@fonixtree/magic-design 0.0.4 → 0.0.7
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/package.json +3 -61
- package/es/assets/fonts/Montserrat-Bold.ttf +0 -0
- package/es/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/es/assets/fonts/Montserrat-Regular.ttf +0 -0
- package/es/assets/fonts/Montserrat-SemiBold.ttf +0 -0
- package/es/assets/fonts/OpenSans-Bold.ttf +0 -0
- package/es/assets/fonts/OpenSans-Regular.ttf +0 -0
- package/es/assets/fonts/OpenSans-SemiBold.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +0 -299
- package/es/assets/fonts/magic-box-iconfont.css.bak +0 -299
- package/es/assets/fonts/magic-box-iconfont.js +0 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +0 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/icon/index.js +0 -68
- package/es/assets/images/layout-icon/carouselLayout1.png +0 -0
- package/es/assets/images/layout-icon/carouselLayout2.png +0 -0
- package/es/assets/images/layout-icon/dividerLayout.svg +0 -4
- package/es/assets/images/layout-icon/imageGalleryLayout1.png +0 -0
- package/es/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
- package/es/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m3-1.svg +0 -18
- package/es/assets/images/layout-icon/layout-imagetext-m3-2.svg +0 -9
- package/es/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
- package/es/assets/images/layout-icon/layout-search.png +0 -0
- package/es/assets/images/layout-icon/newsletter.svg +0 -7
- package/es/assets/less/button.less +0 -9
- package/es/assets/less/common.less +0 -82
- package/es/assets/less/cylon-antd.less +0 -32534
- package/es/assets/less/font.less +0 -50
- package/es/assets/less/global.less +0 -8
- package/es/assets/less/index.less +0 -11
- package/es/assets/less/input.less +0 -8
- package/es/assets/less/menu.less +0 -21
- package/es/assets/less/modal.less +0 -16
- package/es/assets/less/select.less +0 -19
- package/es/assets/less/slider.less +0 -21
- package/es/assets/less/switch.less +0 -20
- package/es/assets/less/table.less +0 -40
- package/es/assets/less/variables.less +0 -4
- package/es/common/AlignSelector/index.js +0 -104
- package/es/common/AlignSelector/index.less +0 -28
- package/es/common/Button/index.js +0 -134
- package/es/common/Button/index.less +0 -68
- package/es/common/ButtonIconLayout/index.js +0 -103
- package/es/common/ButtonIconLayout/index.less +0 -53
- package/es/common/Collapse/index.js +0 -384
- package/es/common/Collapse/index.less +0 -97
- package/es/common/ColorPicker/imgs/no-color.png +0 -0
- package/es/common/ColorPicker/index.js +0 -131
- package/es/common/ColorPicker/index.less +0 -26
- package/es/common/ColorPickerInput/imgs/code.png +0 -0
- package/es/common/ColorPickerInput/index.js +0 -114
- package/es/common/ColorPickerInput/index.less +0 -50
- package/es/common/CountDown/index.js +0 -151
- package/es/common/CountDown/index.less +0 -23
- package/es/common/Field/index.js +0 -80
- package/es/common/Field/index.less +0 -37
- package/es/common/FontStyles/index.js +0 -178
- package/es/common/FontStyles/index.less +0 -63
- package/es/common/GroupList/defaultImg.png +0 -0
- package/es/common/GroupList/index.js +0 -210
- package/es/common/GroupList/index.less +0 -85
- package/es/common/IconPicker/index.js +0 -147
- package/es/common/IconPicker/index.less +0 -46
- package/es/common/Iconfont/index.js +0 -148
- package/es/common/Iconfont/index.less +0 -20
- package/es/common/ImageModal/CommonModal/const.js +0 -22
- package/es/common/ImageModal/CommonModal/index.js +0 -46
- package/es/common/ImageModal/CommonSelPicCard/index.js +0 -80
- package/es/common/ImageModal/CommonSelPicCard/index.less +0 -40
- package/es/common/ImageModal/const.js +0 -24
- package/es/common/ImageModal/index.js +0 -748
- package/es/common/ImageModal/index.less +0 -21
- package/es/common/ImagePicker/index.js +0 -162
- package/es/common/ImagePicker/index.less +0 -104
- package/es/common/InputNumber/index.js +0 -91
- package/es/common/InputNumber/index.less +0 -33
- package/es/common/LayoutSelector/imgs/center.png +0 -0
- package/es/common/LayoutSelector/imgs/left.png +0 -0
- package/es/common/LayoutSelector/imgs/right.png +0 -0
- package/es/common/LayoutSelector/index.js +0 -111
- package/es/common/LayoutSelector/index.less +0 -34
- package/es/common/LinkModal/CatgTable/index.js +0 -234
- package/es/common/LinkModal/CouponTable/index.js +0 -299
- package/es/common/LinkModal/CustomTable/index.js +0 -227
- package/es/common/LinkModal/FilteredProductModal/index.js +0 -640
- package/es/common/LinkModal/FilteredProductModal/index.less +0 -113
- package/es/common/LinkModal/FunctionTable/index.js +0 -221
- package/es/common/LinkModal/ProductDetailPage/index.js +0 -433
- package/es/common/LinkModal/ProductDetailPage/index.less +0 -21
- package/es/common/LinkModal/index.js +0 -136
- package/es/common/LinkModal/index.less +0 -108
- package/es/common/NewImg/index.js +0 -165
- package/es/common/NewImg/index.less +0 -0
- package/es/common/ProductModal/index.js +0 -760
- package/es/common/ProductModal/index.less +0 -238
- package/es/common/ProductSource/index.js +0 -250
- package/es/common/ProductSource/index.less +0 -12
- package/es/common/RcCollapse/Collapse.js +0 -240
- package/es/common/RcCollapse/Panel.js +0 -193
- package/es/common/RcCollapse/PanelContent.js +0 -59
- package/es/common/RcCollapse/index.js +0 -15
- package/es/common/RcCollapse/index.less +0 -108
- package/es/common/RcCollapse/interface.js +0 -1
- package/es/common/RcCollapse/motion.less +0 -12
- package/es/common/RcCollapse/motionUtil.js +0 -44
- package/es/common/Slider/index.js +0 -151
- package/es/common/Slider/index.less +0 -45
- package/es/common/SwitchCollapse/index.js +0 -216
- package/es/common/SwitchCollapse/index.less +0 -40
- package/es/common/UrlPicker/index.js +0 -119
- package/es/common/UrlPicker/index.less +0 -72
- package/es/common/index.js +0 -127
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +0 -268
- package/es/composite-comp/bol/components/Banner/imgs/banner.png +0 -0
- package/es/composite-comp/bol/components/Banner/index.js +0 -89
- package/es/composite-comp/bol/components/Banner/mobile/index.js +0 -216
- package/es/composite-comp/bol/components/Banner/mobile/index.less +0 -73
- package/es/composite-comp/bol/components/Banner/pc/index.js +0 -278
- package/es/composite-comp/bol/components/Banner/pc/index.less +0 -78
- package/es/composite-comp/bol/components/Button/defaultJSON.js +0 -114
- package/es/composite-comp/bol/components/Button/index.js +0 -103
- package/es/composite-comp/bol/components/Button/index.less +0 -47
- package/es/composite-comp/bol/components/Carousel/defaultJSON.js +0 -294
- package/es/composite-comp/bol/components/Carousel/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/components/Carousel/index.js +0 -93
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +0 -251
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +0 -81
- package/es/composite-comp/bol/components/Carousel/pc/index.js +0 -250
- package/es/composite-comp/bol/components/Carousel/pc/index.less +0 -81
- package/es/composite-comp/bol/components/Divider/defaultJSON.js +0 -47
- package/es/composite-comp/bol/components/Divider/index.js +0 -101
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +0 -74
- package/es/composite-comp/bol/components/ImageGallery/imgs/banner.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/index.js +0 -84
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +0 -83
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +0 -73
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +0 -537
- package/es/composite-comp/bol/components/ImageText/index.js +0 -88
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +0 -181
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +0 -288
- package/es/composite-comp/bol/components/ImageText/pc/index.js +0 -155
- package/es/composite-comp/bol/components/ImageText/pc/index.less +0 -106
- package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +0 -135
- package/es/composite-comp/bol/components/Newsletter/index.js +0 -127
- package/es/composite-comp/bol/components/Newsletter/index.less +0 -75
- package/es/composite-comp/bol/components/Tag/defaultJSON.js +0 -112
- package/es/composite-comp/bol/components/Tag/index.js +0 -107
- package/es/composite-comp/bol/components/Tag/index.less +0 -34
- package/es/composite-comp/bol/components/Text/defaultJSON.js +0 -149
- package/es/composite-comp/bol/components/Text/index.js +0 -123
- package/es/composite-comp/bol/components/Text/index.less +0 -61
- package/es/composite-comp/bol/components/Text/slice.svg +0 -1
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +0 -126
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.less +0 -16
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +0 -225
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.less +0 -9
- package/es/composite-comp/bol/config-panels/BannerConfig/index.js +0 -46
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent/index.js +0 -99
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +0 -67
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +0 -144
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.less +0 -0
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.js +0 -199
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.less +0 -9
- package/es/composite-comp/bol/config-panels/CarouselConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -136
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerConfigSetting/index.js +0 -98
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerConfigSetting/index.less +0 -9
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +0 -177
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerSpacingSetting/index.js +0 -89
- package/es/composite-comp/bol/config-panels/DividerConfig/index.js +0 -57
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +0 -144
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.less +0 -0
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +0 -57
- package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +0 -126
- package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +0 -196
- package/es/composite-comp/bol/config-panels/NewsletterConfig/InputField/index.js +0 -185
- package/es/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +0 -111
- package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +0 -57
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +0 -109
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout2.png +0 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +0 -61
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.js +0 -99
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.less +0 -0
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +0 -138
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.less +0 -16
- package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/config-panels/TextCompConfig/index.js +0 -69
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +0 -151
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.less +0 -3
- package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +0 -164
- package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +0 -82
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +0 -141
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.js +0 -99
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.less +0 -0
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +0 -90
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/index.less +0 -3
- package/es/composite-comp/common/components/ImageLabel/index.js +0 -90
- package/es/composite-comp/common/components/ImageLabel/index.less +0 -35
- package/es/composite-comp/common/components/ProductItem/index.js +0 -191
- package/es/composite-comp/common/components/ProductItem/index.less +0 -121
- package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +0 -109
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +0 -204
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +0 -21
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +0 -154
- package/es/composite-comp/common/config-panels/SpacingConfig/index.less +0 -17
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +0 -183
- package/es/composite-comp/dito/components/FlashDeal/index.js +0 -86
- package/es/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +0 -436
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -94
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +0 -220
- package/es/composite-comp/dito/components/Recommend/index.js +0 -86
- package/es/composite-comp/dito/components/Recommend/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/dito/components/Recommend/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/dito/components/Recommend/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +0 -530
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +0 -79
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +0 -56
- package/es/composite-comp/dito/components/SearchBar/imgs/dito-logo.svg +0 -6
- package/es/composite-comp/dito/components/SearchBar/index.js +0 -86
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +0 -108
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +0 -38
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +0 -143
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +0 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.js +0 -125
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.less +0 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +0 -62
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +0 -118
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +0 -143
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.less +0 -16
- package/es/composite-comp/dito/config-panels/RecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +0 -62
- package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +0 -138
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +0 -185
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +0 -3
- package/es/constants/component-types.js +0 -87
- package/es/constants/index.js +0 -144
- package/es/constants/layout.js +0 -120
- package/es/core/Designer/CompListPanel/CompCard/index.js +0 -42
- package/es/core/Designer/CompListPanel/CompCard/index.less +0 -69
- package/es/core/Designer/CompListPanel/index.js +0 -156
- package/es/core/Designer/CompListPanel/index.less +0 -69
- package/es/core/Designer/ConfigPanel/index.js +0 -294
- package/es/core/Designer/ConfigPanel/index.less +0 -139
- package/es/core/Designer/History/index.js +0 -91
- package/es/core/Designer/PageCompList/index.js +0 -266
- package/es/core/Designer/PageCompList/index.less +0 -114
- package/es/core/Designer/QuickMenuBar/index.js +0 -176
- package/es/core/Designer/QuickMenuBar/index.less +0 -67
- package/es/core/Designer/ViewArea/index.js +0 -150
- package/es/core/Designer/ViewArea/index.less +0 -53
- package/es/core/Designer/index.js +0 -454
- package/es/core/Designer/index.less +0 -6
- package/es/core/Renderer/index.js +0 -82
- package/es/decorator/compositeDecorator.js +0 -130
- package/es/decorator/index.js +0 -23
- package/es/decorator/metaDecorator.js +0 -199
- package/es/index.js +0 -27
- package/es/meta-comp/components/Button/index.js +0 -185
- package/es/meta-comp/components/Button/index.less +0 -19
- package/es/meta-comp/components/Image/index.js +0 -171
- package/es/meta-comp/components/Image/index.less +0 -18
- package/es/meta-comp/components/Text/index.js +0 -473
- package/es/meta-comp/components/Text/index.less +0 -38
- package/es/meta-comp/components/index.js +0 -31
- package/es/meta-comp/config-panels/BaseConfig.js +0 -87
- package/es/meta-comp/config-panels/ButtonConfig/index.js +0 -353
- package/es/meta-comp/config-panels/ButtonConfig/index.less +0 -4
- package/es/meta-comp/config-panels/ImageConfig/index.js +0 -204
- package/es/meta-comp/config-panels/ImageConfig/index.less +0 -16
- package/es/meta-comp/config-panels/TextConfig/index.js +0 -327
- package/es/meta-comp/config-panels/TextConfig/index.less +0 -24
- package/es/mobx/Store.js +0 -93
- package/es/mobx/index.js +0 -36
- package/es/utils/androidUtil.js +0 -113
- package/es/utils/businessUtil.js +0 -235
- package/es/utils/commonUtil.js +0 -269
- package/es/utils/compJsonUtil.js +0 -240
- package/es/utils/coreUtil.js +0 -156
- package/es/utils/currencyUtil.js +0 -190
- package/es/utils/dataTreeUtils.js +0 -105
- package/es/utils/dateUtil.js +0 -70
- package/es/utils/storeUtil.js +0 -258
- package/lib/assets/fonts/Montserrat-Bold.ttf +0 -0
- package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/lib/assets/fonts/Montserrat-Regular.ttf +0 -0
- package/lib/assets/fonts/Montserrat-SemiBold.ttf +0 -0
- package/lib/assets/fonts/OpenSans-Bold.ttf +0 -0
- package/lib/assets/fonts/OpenSans-Regular.ttf +0 -0
- package/lib/assets/fonts/OpenSans-SemiBold.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +0 -299
- package/lib/assets/fonts/magic-box-iconfont.css.bak +0 -299
- package/lib/assets/fonts/magic-box-iconfont.js +0 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +0 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/icon/index.js +0 -68
- package/lib/assets/images/layout-icon/carouselLayout1.png +0 -0
- package/lib/assets/images/layout-icon/carouselLayout2.png +0 -0
- package/lib/assets/images/layout-icon/dividerLayout.svg +0 -4
- package/lib/assets/images/layout-icon/imageGalleryLayout1.png +0 -0
- package/lib/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
- package/lib/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m3-1.svg +0 -18
- package/lib/assets/images/layout-icon/layout-imagetext-m3-2.svg +0 -9
- package/lib/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
- package/lib/assets/images/layout-icon/layout-search.png +0 -0
- package/lib/assets/images/layout-icon/newsletter.svg +0 -7
- package/lib/assets/less/button.less +0 -9
- package/lib/assets/less/common.less +0 -82
- package/lib/assets/less/cylon-antd.less +0 -32534
- package/lib/assets/less/font.less +0 -50
- package/lib/assets/less/global.less +0 -8
- package/lib/assets/less/index.less +0 -11
- package/lib/assets/less/input.less +0 -8
- package/lib/assets/less/menu.less +0 -21
- package/lib/assets/less/modal.less +0 -16
- package/lib/assets/less/select.less +0 -19
- package/lib/assets/less/slider.less +0 -21
- package/lib/assets/less/switch.less +0 -20
- package/lib/assets/less/table.less +0 -40
- package/lib/assets/less/variables.less +0 -4
- package/lib/common/AlignSelector/index.js +0 -104
- package/lib/common/AlignSelector/index.less +0 -28
- package/lib/common/Button/index.js +0 -134
- package/lib/common/Button/index.less +0 -68
- package/lib/common/ButtonIconLayout/index.js +0 -103
- package/lib/common/ButtonIconLayout/index.less +0 -53
- package/lib/common/Collapse/index.js +0 -384
- package/lib/common/Collapse/index.less +0 -97
- package/lib/common/ColorPicker/imgs/no-color.png +0 -0
- package/lib/common/ColorPicker/index.js +0 -131
- package/lib/common/ColorPicker/index.less +0 -26
- package/lib/common/ColorPickerInput/imgs/code.png +0 -0
- package/lib/common/ColorPickerInput/index.js +0 -114
- package/lib/common/ColorPickerInput/index.less +0 -50
- package/lib/common/CountDown/index.js +0 -151
- package/lib/common/CountDown/index.less +0 -23
- package/lib/common/Field/index.js +0 -80
- package/lib/common/Field/index.less +0 -37
- package/lib/common/FontStyles/index.js +0 -178
- package/lib/common/FontStyles/index.less +0 -63
- package/lib/common/GroupList/defaultImg.png +0 -0
- package/lib/common/GroupList/index.js +0 -210
- package/lib/common/GroupList/index.less +0 -85
- package/lib/common/IconPicker/index.js +0 -147
- package/lib/common/IconPicker/index.less +0 -46
- package/lib/common/Iconfont/index.js +0 -148
- package/lib/common/Iconfont/index.less +0 -20
- package/lib/common/ImageModal/CommonModal/const.js +0 -22
- package/lib/common/ImageModal/CommonModal/index.js +0 -46
- package/lib/common/ImageModal/CommonSelPicCard/index.js +0 -80
- package/lib/common/ImageModal/CommonSelPicCard/index.less +0 -40
- package/lib/common/ImageModal/const.js +0 -24
- package/lib/common/ImageModal/index.js +0 -748
- package/lib/common/ImageModal/index.less +0 -21
- package/lib/common/ImagePicker/index.js +0 -162
- package/lib/common/ImagePicker/index.less +0 -104
- package/lib/common/InputNumber/index.js +0 -91
- package/lib/common/InputNumber/index.less +0 -33
- package/lib/common/LayoutSelector/imgs/center.png +0 -0
- package/lib/common/LayoutSelector/imgs/left.png +0 -0
- package/lib/common/LayoutSelector/imgs/right.png +0 -0
- package/lib/common/LayoutSelector/index.js +0 -111
- package/lib/common/LayoutSelector/index.less +0 -34
- package/lib/common/LinkModal/CatgTable/index.js +0 -234
- package/lib/common/LinkModal/CouponTable/index.js +0 -299
- package/lib/common/LinkModal/CustomTable/index.js +0 -227
- package/lib/common/LinkModal/FilteredProductModal/index.js +0 -640
- package/lib/common/LinkModal/FilteredProductModal/index.less +0 -113
- package/lib/common/LinkModal/FunctionTable/index.js +0 -221
- package/lib/common/LinkModal/ProductDetailPage/index.js +0 -433
- package/lib/common/LinkModal/ProductDetailPage/index.less +0 -21
- package/lib/common/LinkModal/index.js +0 -136
- package/lib/common/LinkModal/index.less +0 -108
- package/lib/common/NewImg/index.js +0 -165
- package/lib/common/NewImg/index.less +0 -0
- package/lib/common/ProductModal/index.js +0 -760
- package/lib/common/ProductModal/index.less +0 -238
- package/lib/common/ProductSource/index.js +0 -250
- package/lib/common/ProductSource/index.less +0 -12
- package/lib/common/RcCollapse/Collapse.js +0 -240
- package/lib/common/RcCollapse/Panel.js +0 -193
- package/lib/common/RcCollapse/PanelContent.js +0 -59
- package/lib/common/RcCollapse/index.js +0 -15
- package/lib/common/RcCollapse/index.less +0 -108
- package/lib/common/RcCollapse/interface.js +0 -1
- package/lib/common/RcCollapse/motion.less +0 -12
- package/lib/common/RcCollapse/motionUtil.js +0 -44
- package/lib/common/Slider/index.js +0 -151
- package/lib/common/Slider/index.less +0 -45
- package/lib/common/SwitchCollapse/index.js +0 -216
- package/lib/common/SwitchCollapse/index.less +0 -40
- package/lib/common/UrlPicker/index.js +0 -119
- package/lib/common/UrlPicker/index.less +0 -72
- package/lib/common/index.js +0 -127
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +0 -268
- package/lib/composite-comp/bol/components/Banner/imgs/banner.png +0 -0
- package/lib/composite-comp/bol/components/Banner/index.js +0 -89
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +0 -216
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +0 -73
- package/lib/composite-comp/bol/components/Banner/pc/index.js +0 -278
- package/lib/composite-comp/bol/components/Banner/pc/index.less +0 -78
- package/lib/composite-comp/bol/components/Button/defaultJSON.js +0 -114
- package/lib/composite-comp/bol/components/Button/index.js +0 -103
- package/lib/composite-comp/bol/components/Button/index.less +0 -47
- package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +0 -294
- package/lib/composite-comp/bol/components/Carousel/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/components/Carousel/index.js +0 -93
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +0 -251
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +0 -81
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +0 -250
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +0 -81
- package/lib/composite-comp/bol/components/Divider/defaultJSON.js +0 -47
- package/lib/composite-comp/bol/components/Divider/index.js +0 -101
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +0 -74
- package/lib/composite-comp/bol/components/ImageGallery/imgs/banner.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/index.js +0 -84
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +0 -83
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +0 -73
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +0 -537
- package/lib/composite-comp/bol/components/ImageText/index.js +0 -88
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +0 -181
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +0 -288
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +0 -155
- package/lib/composite-comp/bol/components/ImageText/pc/index.less +0 -106
- package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +0 -135
- package/lib/composite-comp/bol/components/Newsletter/index.js +0 -127
- package/lib/composite-comp/bol/components/Newsletter/index.less +0 -75
- package/lib/composite-comp/bol/components/Tag/defaultJSON.js +0 -112
- package/lib/composite-comp/bol/components/Tag/index.js +0 -107
- package/lib/composite-comp/bol/components/Tag/index.less +0 -34
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +0 -149
- package/lib/composite-comp/bol/components/Text/index.js +0 -123
- package/lib/composite-comp/bol/components/Text/index.less +0 -61
- package/lib/composite-comp/bol/components/Text/slice.svg +0 -1
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +0 -126
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.less +0 -16
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +0 -225
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.less +0 -9
- package/lib/composite-comp/bol/config-panels/BannerConfig/index.js +0 -46
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent/index.js +0 -99
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +0 -67
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +0 -144
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.js +0 -199
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.less +0 -9
- package/lib/composite-comp/bol/config-panels/CarouselConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -136
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerConfigSetting/index.js +0 -98
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerConfigSetting/index.less +0 -9
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +0 -177
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerSpacingSetting/index.js +0 -89
- package/lib/composite-comp/bol/config-panels/DividerConfig/index.js +0 -57
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +0 -144
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +0 -57
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +0 -126
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +0 -196
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/InputField/index.js +0 -185
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +0 -111
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +0 -57
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +0 -109
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout2.png +0 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +0 -61
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.js +0 -99
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +0 -138
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.less +0 -16
- package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/config-panels/TextCompConfig/index.js +0 -69
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +0 -151
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.less +0 -3
- package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +0 -164
- package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +0 -82
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +0 -141
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.js +0 -99
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.less +0 -0
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +0 -90
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/index.less +0 -3
- package/lib/composite-comp/common/components/ImageLabel/index.js +0 -90
- package/lib/composite-comp/common/components/ImageLabel/index.less +0 -35
- package/lib/composite-comp/common/components/ProductItem/index.js +0 -191
- package/lib/composite-comp/common/components/ProductItem/index.less +0 -121
- package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +0 -109
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +0 -204
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +0 -21
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +0 -154
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.less +0 -17
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +0 -183
- package/lib/composite-comp/dito/components/FlashDeal/index.js +0 -86
- package/lib/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +0 -436
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -94
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +0 -220
- package/lib/composite-comp/dito/components/Recommend/index.js +0 -86
- package/lib/composite-comp/dito/components/Recommend/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +0 -530
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +0 -79
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +0 -56
- package/lib/composite-comp/dito/components/SearchBar/imgs/dito-logo.svg +0 -6
- package/lib/composite-comp/dito/components/SearchBar/index.js +0 -86
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +0 -108
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +0 -38
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +0 -143
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.js +0 -125
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +0 -62
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +0 -118
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +0 -143
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.less +0 -16
- package/lib/composite-comp/dito/config-panels/RecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +0 -62
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +0 -138
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +0 -185
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +0 -3
- package/lib/constants/component-types.js +0 -87
- package/lib/constants/index.js +0 -144
- package/lib/constants/layout.js +0 -120
- package/lib/core/Designer/CompListPanel/CompCard/index.js +0 -42
- package/lib/core/Designer/CompListPanel/CompCard/index.less +0 -69
- package/lib/core/Designer/CompListPanel/index.js +0 -156
- package/lib/core/Designer/CompListPanel/index.less +0 -69
- package/lib/core/Designer/ConfigPanel/index.js +0 -294
- package/lib/core/Designer/ConfigPanel/index.less +0 -139
- package/lib/core/Designer/History/index.js +0 -91
- package/lib/core/Designer/PageCompList/index.js +0 -266
- package/lib/core/Designer/PageCompList/index.less +0 -114
- package/lib/core/Designer/QuickMenuBar/index.js +0 -176
- package/lib/core/Designer/QuickMenuBar/index.less +0 -67
- package/lib/core/Designer/ViewArea/index.js +0 -150
- package/lib/core/Designer/ViewArea/index.less +0 -53
- package/lib/core/Designer/index.js +0 -454
- package/lib/core/Designer/index.less +0 -6
- package/lib/core/Renderer/index.js +0 -82
- package/lib/decorator/compositeDecorator.js +0 -130
- package/lib/decorator/index.js +0 -23
- package/lib/decorator/metaDecorator.js +0 -199
- package/lib/index.js +0 -27
- package/lib/meta-comp/components/Button/index.js +0 -185
- package/lib/meta-comp/components/Button/index.less +0 -19
- package/lib/meta-comp/components/Image/index.js +0 -171
- package/lib/meta-comp/components/Image/index.less +0 -18
- package/lib/meta-comp/components/Text/index.js +0 -473
- package/lib/meta-comp/components/Text/index.less +0 -38
- package/lib/meta-comp/components/index.js +0 -31
- package/lib/meta-comp/config-panels/BaseConfig.js +0 -87
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +0 -353
- package/lib/meta-comp/config-panels/ButtonConfig/index.less +0 -4
- package/lib/meta-comp/config-panels/ImageConfig/index.js +0 -204
- package/lib/meta-comp/config-panels/ImageConfig/index.less +0 -16
- package/lib/meta-comp/config-panels/TextConfig/index.js +0 -327
- package/lib/meta-comp/config-panels/TextConfig/index.less +0 -24
- package/lib/mobx/Store.js +0 -93
- package/lib/mobx/index.js +0 -36
- package/lib/utils/androidUtil.js +0 -113
- package/lib/utils/businessUtil.js +0 -235
- package/lib/utils/commonUtil.js +0 -269
- package/lib/utils/compJsonUtil.js +0 -240
- package/lib/utils/coreUtil.js +0 -156
- package/lib/utils/currencyUtil.js +0 -190
- package/lib/utils/dataTreeUtils.js +0 -105
- package/lib/utils/dateUtil.js +0 -70
- package/lib/utils/storeUtil.js +0 -258
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _componentTypes = require("../../constants/component-types");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
15
|
-
__assign = Object.assign || function (t) {
|
|
16
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
-
s = arguments[i];
|
|
18
|
-
|
|
19
|
-
for (var p in s) {
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return __assign.apply(this, arguments);
|
|
28
|
-
};
|
|
29
|
-
/* eslint-disable consistent-return */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var setDesignConfig = function setDesignConfig(props) {
|
|
33
|
-
var config = props.config,
|
|
34
|
-
device = props.device,
|
|
35
|
-
isShop = props.isShop;
|
|
36
|
-
window.magicDesign = __assign({
|
|
37
|
-
pageBackground: '#f2f2f2',
|
|
38
|
-
compSpacing: '16',
|
|
39
|
-
mode: 'renderer',
|
|
40
|
-
device: device,
|
|
41
|
-
isShop: isShop
|
|
42
|
-
}, config);
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* @class Renderer 页面预览器,外部工程使用此类来渲染出页面。
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var Renderer = function Renderer(props) {
|
|
50
|
-
var pageData = props.pageData;
|
|
51
|
-
setDesignConfig(props);
|
|
52
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
|
-
className: "render_wrap",
|
|
54
|
-
magic_design: "",
|
|
55
|
-
style: {
|
|
56
|
-
background: window.magicDesign.pageBackground
|
|
57
|
-
}
|
|
58
|
-
}, pageData && pageData.childNodes && pageData.childNodes.map(function (nodeData) {
|
|
59
|
-
var Clazz = _componentTypes.componentMap[nodeData.type];
|
|
60
|
-
|
|
61
|
-
if (!Clazz) {
|
|
62
|
-
console.error("[MagicBox] Can not find type " + nodeData.type);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
var newInstanceProps = __assign(__assign({}, nodeData), {
|
|
67
|
-
nodeData: nodeData
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
-
key: nodeData.id
|
|
72
|
-
}, /*#__PURE__*/_react["default"].createElement(Clazz, __assign({}, newInstanceProps), null));
|
|
73
|
-
}));
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
Renderer.defaultProps = {
|
|
77
|
-
pageData: {},
|
|
78
|
-
device: 'pc',
|
|
79
|
-
config: {}
|
|
80
|
-
};
|
|
81
|
-
var _default = Renderer;
|
|
82
|
-
exports["default"] = _default;
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = compositeDecorator;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _mobx = require("../mobx");
|
|
13
|
-
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
var __extends = void 0 && (void 0).__extends || function () {
|
|
19
|
-
var _extendStatics = function extendStatics(d, b) {
|
|
20
|
-
_extendStatics = Object.setPrototypeOf || {
|
|
21
|
-
__proto__: []
|
|
22
|
-
} instanceof Array && function (d, b) {
|
|
23
|
-
d.__proto__ = b;
|
|
24
|
-
} || function (d, b) {
|
|
25
|
-
for (var p in b) {
|
|
26
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return _extendStatics(d, b);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return function (d, b) {
|
|
34
|
-
_extendStatics(d, b);
|
|
35
|
-
|
|
36
|
-
function __() {
|
|
37
|
-
this.constructor = d;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
41
|
-
};
|
|
42
|
-
}();
|
|
43
|
-
|
|
44
|
-
function compositeDecorator(WrappedComponent) {
|
|
45
|
-
var Wrapper =
|
|
46
|
-
/** @class */
|
|
47
|
-
function (_super) {
|
|
48
|
-
__extends(Wrapper, _super);
|
|
49
|
-
|
|
50
|
-
function Wrapper() {
|
|
51
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
-
|
|
53
|
-
_this.state = {
|
|
54
|
-
clickedFloor: ''
|
|
55
|
-
}; // 复合组件点击事件
|
|
56
|
-
|
|
57
|
-
_this.onCompositeCompClick = function (event) {
|
|
58
|
-
// 触发左侧楼层的滚动
|
|
59
|
-
if (document.getElementById("card" + _this.props.nodeData.id)) {
|
|
60
|
-
document.getElementById("card" + _this.props.nodeData.id).scrollIntoView({
|
|
61
|
-
behavior: 'smooth'
|
|
62
|
-
});
|
|
63
|
-
} // 这里必须阻止事件冒泡,然后再触发自定义的事件
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
event.preventDefault();
|
|
67
|
-
event.stopPropagation(); // 触发点击组件事件
|
|
68
|
-
|
|
69
|
-
var evt = new Event('component-click', {
|
|
70
|
-
bubbles: false
|
|
71
|
-
});
|
|
72
|
-
evt.data = _this.props.nodeData;
|
|
73
|
-
window.document.dispatchEvent(evt);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
_this.getStyle = function () {
|
|
77
|
-
var style = {
|
|
78
|
-
border: 'none'
|
|
79
|
-
}; // 处理复合组件的选中状态
|
|
80
|
-
|
|
81
|
-
if (window.magicDesign.mode === 'designer') {
|
|
82
|
-
// style.border = '1px solid transparent';
|
|
83
|
-
style.border = 'none';
|
|
84
|
-
|
|
85
|
-
if (_this.props.nodeData.id === _this.state.clickedFloor) {
|
|
86
|
-
style.border = '1px dashed red';
|
|
87
|
-
}
|
|
88
|
-
} // 处理复合组件的下边距
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (Wrapper.type !== 'DIVIDER') {
|
|
92
|
-
var rate = window.magicDesign.device === 'pc' ? 1.5 : 1;
|
|
93
|
-
style.marginBottom = Number(window.magicDesign.compSpacing) * rate + "px";
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return style;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
return _this;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
Wrapper.prototype.componentDidMount = function () {
|
|
103
|
-
var _this = this;
|
|
104
|
-
|
|
105
|
-
this.distroy = (0, _mobx.autorun)(function () {
|
|
106
|
-
_this.setState({
|
|
107
|
-
clickedFloor: _mobx.store.clickedFloor
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
Wrapper.prototype.componentWillUnmount = function () {
|
|
113
|
-
this.distroy();
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
Wrapper.prototype.render = function () {
|
|
117
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
-
className: "composite_wrap",
|
|
119
|
-
onClick: this.onCompositeCompClick,
|
|
120
|
-
style: this.getStyle()
|
|
121
|
-
}, /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props));
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
Wrapper.getDefaultJSON = WrappedComponent.getDefaultJSON;
|
|
125
|
-
Wrapper.type = WrappedComponent.type;
|
|
126
|
-
return Wrapper;
|
|
127
|
-
}(_react.Component);
|
|
128
|
-
|
|
129
|
-
return Wrapper;
|
|
130
|
-
}
|
package/es/decorator/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "compositeDecorator", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _compositeDecorator["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "metaDecorator", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _metaDecorator["default"];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _compositeDecorator = _interopRequireDefault(require("./compositeDecorator"));
|
|
20
|
-
|
|
21
|
-
var _metaDecorator = _interopRequireDefault(require("./metaDecorator"));
|
|
22
|
-
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = metaDecorator;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _mobx = require("../mobx");
|
|
13
|
-
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
var __extends = void 0 && (void 0).__extends || function () {
|
|
19
|
-
var _extendStatics = function extendStatics(d, b) {
|
|
20
|
-
_extendStatics = Object.setPrototypeOf || {
|
|
21
|
-
__proto__: []
|
|
22
|
-
} instanceof Array && function (d, b) {
|
|
23
|
-
d.__proto__ = b;
|
|
24
|
-
} || function (d, b) {
|
|
25
|
-
for (var p in b) {
|
|
26
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return _extendStatics(d, b);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return function (d, b) {
|
|
34
|
-
_extendStatics(d, b);
|
|
35
|
-
|
|
36
|
-
function __() {
|
|
37
|
-
this.constructor = d;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
41
|
-
};
|
|
42
|
-
}();
|
|
43
|
-
|
|
44
|
-
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
45
|
-
var t = {};
|
|
46
|
-
|
|
47
|
-
for (var p in s) {
|
|
48
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
53
|
-
}
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
function metaDecorator(WrappedComponent) {
|
|
58
|
-
var Wrapper =
|
|
59
|
-
/** @class */
|
|
60
|
-
function (_super) {
|
|
61
|
-
__extends(Wrapper, _super);
|
|
62
|
-
|
|
63
|
-
function Wrapper() {
|
|
64
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
65
|
-
|
|
66
|
-
_this.state = {
|
|
67
|
-
clickedMeta: '',
|
|
68
|
-
hoveredMeta: ''
|
|
69
|
-
}; // 元组件点击事件
|
|
70
|
-
|
|
71
|
-
_this.onMetaClick = function (event) {
|
|
72
|
-
var _a, _b, _c;
|
|
73
|
-
|
|
74
|
-
if (window.magicDesign.mode === 'renderer') {
|
|
75
|
-
return;
|
|
76
|
-
} // 组织冒泡
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
event.preventDefault();
|
|
80
|
-
event.stopPropagation();
|
|
81
|
-
var parentId = (_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.parentId;
|
|
82
|
-
var metaId = (_b = _this.props.data) === null || _b === void 0 ? void 0 : _b.id;
|
|
83
|
-
var floorId = null; // group中的元组件
|
|
84
|
-
|
|
85
|
-
if (parentId) {
|
|
86
|
-
floorId = _mobx.store.getFloorIdByGroupId(parentId);
|
|
87
|
-
} else {
|
|
88
|
-
// 复合组件中的元组件
|
|
89
|
-
floorId = _mobx.store.getFloorIdByMetaId(metaId);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
_mobx.store.setState({
|
|
93
|
-
clickedMeta: (_c = _this.props.data) === null || _c === void 0 ? void 0 : _c.id,
|
|
94
|
-
clickedGroup: parentId,
|
|
95
|
-
clickedFloor: floorId
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
_this.onMouseEnter = function () {
|
|
100
|
-
var _a;
|
|
101
|
-
|
|
102
|
-
if (window.magicDesign.mode === 'renderer') {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
_mobx.store.setState({
|
|
107
|
-
hoveredMeta: (_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.id
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
_this.onMouseLeave = function () {
|
|
112
|
-
if (window.magicDesign.mode === 'renderer') {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
_mobx.store.setState({
|
|
117
|
-
hoveredMeta: ''
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
_this.isDesignerActive = function () {
|
|
122
|
-
var data = _this.props.data;
|
|
123
|
-
var _a = _this.state,
|
|
124
|
-
hoveredMeta = _a.hoveredMeta,
|
|
125
|
-
clickedMeta = _a.clickedMeta;
|
|
126
|
-
var isHover = (data === null || data === void 0 ? void 0 : data.id) === hoveredMeta;
|
|
127
|
-
var isClick = (data === null || data === void 0 ? void 0 : data.id) === clickedMeta;
|
|
128
|
-
|
|
129
|
-
if (window.magicDesign.mode === 'designer' && (isHover || isClick)) {
|
|
130
|
-
return true;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return false;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
_this.getStyle = function () {
|
|
137
|
-
var _a = _this.state,
|
|
138
|
-
hoveredMeta = _a.hoveredMeta,
|
|
139
|
-
clickedMeta = _a.clickedMeta;
|
|
140
|
-
var data = _this.props.data;
|
|
141
|
-
var isHover = (data === null || data === void 0 ? void 0 : data.id) === hoveredMeta;
|
|
142
|
-
var isClick = (data === null || data === void 0 ? void 0 : data.id) === clickedMeta;
|
|
143
|
-
var style = {
|
|
144
|
-
boxSizing: 'border-box',
|
|
145
|
-
height: '100%'
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
if (window.magicDesign.mode === 'renderer') {
|
|
149
|
-
return style;
|
|
150
|
-
} else {
|
|
151
|
-
style.border = isHover || isClick ? '1px solid #2F54EB' : '1px solid transparent';
|
|
152
|
-
style.backgroundColor = isHover ? 'rgba(47,84,235,0.2)' : '';
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return style;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
return _this;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
Wrapper.prototype.componentDidMount = function () {
|
|
162
|
-
var _this = this;
|
|
163
|
-
|
|
164
|
-
this.distroy = (0, _mobx.autorun)(function () {
|
|
165
|
-
_this.setState({
|
|
166
|
-
clickedMeta: _mobx.store.clickedMeta,
|
|
167
|
-
hoveredMeta: _mobx.store.hoveredMeta
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
Wrapper.prototype.componentWillUnmount = function () {
|
|
173
|
-
this.distroy();
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
Wrapper.prototype.render = function () {
|
|
177
|
-
var _a = this.props,
|
|
178
|
-
className = _a.className,
|
|
179
|
-
style = _a.style,
|
|
180
|
-
rest = __rest(_a, ["className", "style"]);
|
|
181
|
-
|
|
182
|
-
var hoverStyle = this.getStyle();
|
|
183
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
184
|
-
className: className,
|
|
185
|
-
style: style
|
|
186
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
|
-
className: "meta_wrap",
|
|
188
|
-
onClick: this.onMetaClick,
|
|
189
|
-
onMouseEnter: this.onMouseEnter,
|
|
190
|
-
onMouseLeave: this.onMouseLeave,
|
|
191
|
-
style: hoverStyle
|
|
192
|
-
}, /*#__PURE__*/_react["default"].createElement(WrappedComponent, rest)));
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
return Wrapper;
|
|
196
|
-
}(_react.Component);
|
|
197
|
-
|
|
198
|
-
return Wrapper;
|
|
199
|
-
}
|
package/es/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Designer", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _Designer["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "Renderer", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _Renderer["default"];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
require("./assets/less/index.less");
|
|
20
|
-
|
|
21
|
-
require("./assets/less/cylon-antd.less");
|
|
22
|
-
|
|
23
|
-
var _Designer = _interopRequireDefault(require("./core/Designer"));
|
|
24
|
-
|
|
25
|
-
var _Renderer = _interopRequireDefault(require("./core/Renderer"));
|
|
26
|
-
|
|
27
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
require("./index.less");
|
|
13
|
-
|
|
14
|
-
var _businessUtil = require("@/components/utils/businessUtil");
|
|
15
|
-
|
|
16
|
-
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
|
-
|
|
18
|
-
var _decorator = require("../../../decorator");
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
-
|
|
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); }
|
|
23
|
-
|
|
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; }
|
|
25
|
-
|
|
26
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
27
|
-
|
|
28
|
-
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
-
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
-
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
-
__proto__: []
|
|
32
|
-
} instanceof Array && function (d, b) {
|
|
33
|
-
d.__proto__ = b;
|
|
34
|
-
} || function (d, b) {
|
|
35
|
-
for (var p in b) {
|
|
36
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return _extendStatics(d, b);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return function (d, b) {
|
|
44
|
-
_extendStatics(d, b);
|
|
45
|
-
|
|
46
|
-
function __() {
|
|
47
|
-
this.constructor = d;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
-
};
|
|
52
|
-
}();
|
|
53
|
-
|
|
54
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
55
|
-
__assign = Object.assign || function (t) {
|
|
56
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
57
|
-
s = arguments[i];
|
|
58
|
-
|
|
59
|
-
for (var p in s) {
|
|
60
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return t;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return __assign.apply(this, arguments);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
71
|
-
var c = arguments.length,
|
|
72
|
-
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
73
|
-
d;
|
|
74
|
-
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
75
|
-
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
76
|
-
}
|
|
77
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var Button =
|
|
81
|
-
/** @class */
|
|
82
|
-
function (_super) {
|
|
83
|
-
__extends(Button, _super);
|
|
84
|
-
|
|
85
|
-
function Button() {
|
|
86
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
87
|
-
|
|
88
|
-
_this.state = {
|
|
89
|
-
hover: false
|
|
90
|
-
};
|
|
91
|
-
/** 备份历史数据 比对不一致时渲染 */
|
|
92
|
-
|
|
93
|
-
_this.preData = '';
|
|
94
|
-
return _this;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
Button.prototype.shouldComponentUpdate = function (nextProps) {
|
|
98
|
-
return JSON.stringify(nextProps.data) != this.preData;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
Button.prototype.render = function () {
|
|
102
|
-
var _this = this;
|
|
103
|
-
|
|
104
|
-
var _a;
|
|
105
|
-
|
|
106
|
-
var _b = this.props,
|
|
107
|
-
data = _b.data,
|
|
108
|
-
className = _b.className,
|
|
109
|
-
readonly = _b.readonly;
|
|
110
|
-
var hover = this.state.hover;
|
|
111
|
-
this.preData = JSON.stringify(data);
|
|
112
|
-
|
|
113
|
-
var style = __assign({
|
|
114
|
-
backgroundColor: data.content.backgroundColor,
|
|
115
|
-
border: data.buttonBorder.open && data.buttonBorder.borderColor ? "1px solid " + data.buttonBorder.borderColor : '1px solid transparent',
|
|
116
|
-
borderRadius: data.buttonBorder.open ? data.buttonBorder.borderRadius : 0
|
|
117
|
-
}, data.buttonText);
|
|
118
|
-
|
|
119
|
-
var iconUrl = data.buttonIcon.iconUrl;
|
|
120
|
-
var iconLayout = data.buttonIcon.layout;
|
|
121
|
-
|
|
122
|
-
if (hover && ((_a = data.hover) === null || _a === void 0 ? void 0 : _a.open)) {
|
|
123
|
-
style = __assign(__assign(__assign({}, style), {
|
|
124
|
-
backgroundColor: data.hover.content.backgroundColor,
|
|
125
|
-
border: data.hover.buttonBorder.open && data.hover.buttonBorder.borderColor ? "1px solid " + data.hover.buttonBorder.borderColor : '1px solid transparent',
|
|
126
|
-
borderRadius: data.hover.buttonBorder.open ? data.hover.buttonBorder.borderRadius : 0
|
|
127
|
-
}), data.hover.buttonText);
|
|
128
|
-
iconUrl = data.hover.buttonIcon.iconUrl;
|
|
129
|
-
iconLayout = data.hover.buttonIcon.layout;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
var btnText = /*#__PURE__*/_react["default"].createElement("span", {
|
|
133
|
-
className: "item",
|
|
134
|
-
contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
|
|
135
|
-
onInput: function onInput(e) {
|
|
136
|
-
var text = e.target.textContent;
|
|
137
|
-
data.text = text;
|
|
138
|
-
/** 主动更新历史数据避免render */
|
|
139
|
-
|
|
140
|
-
_this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
|
|
141
|
-
text: text
|
|
142
|
-
}));
|
|
143
|
-
},
|
|
144
|
-
suppressContentEditableWarning: true
|
|
145
|
-
}, data.text);
|
|
146
|
-
|
|
147
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
|
|
148
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
|
-
className: (0, _classnames["default"])('m-meta-button', className),
|
|
150
|
-
onClick: function onClick() {
|
|
151
|
-
return (0, _coreUtil.clickUrl)(data.content.url);
|
|
152
|
-
},
|
|
153
|
-
onMouseEnter: function onMouseEnter() {
|
|
154
|
-
return _this.setState({
|
|
155
|
-
hover: true
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
|
-
onMouseLeave: function onMouseLeave() {
|
|
159
|
-
return _this.setState({
|
|
160
|
-
hover: false
|
|
161
|
-
});
|
|
162
|
-
},
|
|
163
|
-
style: __assign(__assign({}, style), wrapStyle)
|
|
164
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
165
|
-
className: (0, _classnames["default"])('btnContent', {
|
|
166
|
-
horizontal: iconLayout === 'left' || iconLayout === 'right'
|
|
167
|
-
})
|
|
168
|
-
}, (iconLayout === 'right' || iconLayout === 'bottom') && btnText, iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
|
|
169
|
-
alt: "",
|
|
170
|
-
className: "item",
|
|
171
|
-
src: iconUrl
|
|
172
|
-
}), (iconLayout === 'left' || iconLayout === 'top') && btnText));
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
Button.defaultProps = {
|
|
176
|
-
data: {},
|
|
177
|
-
className: '',
|
|
178
|
-
readonly: false
|
|
179
|
-
};
|
|
180
|
-
Button = __decorate([_decorator.metaDecorator], Button);
|
|
181
|
-
return Button;
|
|
182
|
-
}(_react.Component);
|
|
183
|
-
|
|
184
|
-
var _default = Button;
|
|
185
|
-
exports["default"] = _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.m-meta-button {
|
|
2
|
-
transition: all 0.25s;
|
|
3
|
-
|
|
4
|
-
.btnContent {
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
|
|
11
|
-
&.horizontal {
|
|
12
|
-
flex-direction: row;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
img {
|
|
16
|
-
height: 20px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|