@fonixtree/magic-design 0.0.7 → 0.0.10
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/_virtual/__node-resolve_empty.js +6 -0
- package/_virtual/_cloneBuffer.js +3 -0
- package/_virtual/_commonjsHelpers.js +24 -0
- package/_virtual/_node-resolve_empty.js +3 -0
- package/_virtual/_nodeUtil.js +3 -0
- package/_virtual/_rollupPluginBabelHelpers.js +18 -0
- package/_virtual/index.js +3 -0
- package/_virtual/index2.js +3 -0
- package/_virtual/index3.js +3 -0
- package/_virtual/index4.js +3 -0
- package/_virtual/index5.js +5 -0
- package/_virtual/interopRequireDefault.js +3 -0
- package/_virtual/isBuffer.js +3 -0
- package/_virtual/react-is.development.js +3 -0
- package/_virtual/react-is.production.min.js +3 -0
- package/_virtual/rng-browser.js +3 -0
- package/_virtual/toArray.js +3 -0
- package/package.json +22 -3
- package/src/components/assets/images/layout-icon/carouselLayout1.png.js +3 -0
- package/src/components/assets/images/layout-icon/carouselLayout2.png.js +3 -0
- package/src/components/assets/images/layout-icon/dividerLayout.svg.js +3 -0
- package/src/components/assets/images/layout-icon/imageGalleryLayout1.png.js +3 -0
- package/src/components/assets/images/layout-icon/imageGalleryLayout2.png.js +3 -0
- package/src/components/assets/images/layout-icon/imageGalleryLayout3.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-m1-1.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-m1-2.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-m1-3.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-m2.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-m3.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-p1.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-p2.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-imagetext-p4.png.js +3 -0
- package/src/components/assets/images/layout-icon/layout-search.png.js +3 -0
- package/src/components/assets/images/layout-icon/newsletter.svg.js +3 -0
- package/src/components/assets/less/cylon-antd.less.js +3 -0
- package/src/components/assets/less/index.less.js +4 -0
- package/src/components/common/AlignSelector/index.js +65 -0
- package/src/components/common/AlignSelector/index.less.js +4 -0
- package/src/components/common/Button/index.js +75 -0
- package/src/components/common/Button/index.less.js +4 -0
- package/src/components/common/ButtonIconLayout/index.js +66 -0
- package/src/components/common/ButtonIconLayout/index.less.js +4 -0
- package/src/components/common/Collapse/index.js +323 -0
- package/src/components/common/Collapse/index.less.js +4 -0
- package/src/components/common/ColorPicker/index.js +94 -0
- package/src/components/common/ColorPicker/index.less.js +4 -0
- package/src/components/common/ColorPickerInput/index.js +76 -0
- package/src/components/common/ColorPickerInput/index.less.js +4 -0
- package/src/components/common/CountDown/index.js +110 -0
- package/src/components/common/CountDown/index.less.js +4 -0
- package/src/components/common/Field/index.js +43 -0
- package/src/components/common/Field/index.less.js +4 -0
- package/src/components/common/FontStyles/index.js +124 -0
- package/src/components/common/FontStyles/index.less.js +4 -0
- package/src/components/common/GroupList/defaultImg.png.js +3 -0
- package/src/components/common/GroupList/index.js +170 -0
- package/src/components/common/GroupList/index.less.js +4 -0
- package/src/components/common/IconPicker/index.js +93 -0
- package/src/components/common/IconPicker/index.less.js +4 -0
- package/src/components/common/Iconfont/index.js +74 -0
- package/src/components/common/Iconfont/index.less.js +4 -0
- package/src/components/common/ImageModal/CommonModal/const.js +16 -0
- package/src/components/common/ImageModal/CommonModal/index.js +33 -0
- package/src/components/common/ImageModal/CommonSelPicCard/index.js +66 -0
- package/src/components/common/ImageModal/CommonSelPicCard/index.less.js +4 -0
- package/src/components/common/ImageModal/const.js +18 -0
- package/src/components/common/ImageModal/index.js +547 -0
- package/src/components/common/ImageModal/index.less.js +4 -0
- package/src/components/common/ImagePicker/index.js +124 -0
- package/src/components/common/ImagePicker/index.less.js +4 -0
- package/src/components/common/InputNumber/index.js +54 -0
- package/src/components/common/InputNumber/index.less.js +4 -0
- package/src/components/common/LayoutSelector/imgs/center.png.js +3 -0
- package/src/components/common/LayoutSelector/imgs/left.png.js +3 -0
- package/src/components/common/LayoutSelector/imgs/right.png.js +3 -0
- package/src/components/common/LayoutSelector/index.js +70 -0
- package/src/components/common/LayoutSelector/index.less.js +4 -0
- package/src/components/common/LinkModal/CatgTable/index.js +78 -0
- package/src/components/common/LinkModal/CouponTable/index.js +111 -0
- package/src/components/common/LinkModal/CustomTable/index.js +72 -0
- package/src/components/common/LinkModal/FilteredProductModal/index.js +463 -0
- package/src/components/common/LinkModal/FilteredProductModal/index.less.js +4 -0
- package/src/components/common/LinkModal/FunctionTable/index.js +66 -0
- package/src/components/common/LinkModal/ProductDetailPage/index.js +241 -0
- package/src/components/common/LinkModal/ProductDetailPage/index.less.js +4 -0
- package/src/components/common/LinkModal/index.js +112 -0
- package/src/components/common/LinkModal/index.less.js +4 -0
- package/src/components/common/NewImg/index.js +91 -0
- package/src/components/common/ProductModal/index.js +556 -0
- package/src/components/common/ProductModal/index.less.js +4 -0
- package/src/components/common/ProductSource/index.js +91 -0
- package/src/components/common/ProductSource/index.less.js +4 -0
- package/src/components/common/RcCollapse/Collapse.js +176 -0
- package/src/components/common/RcCollapse/Panel.js +146 -0
- package/src/components/common/RcCollapse/PanelContent.js +41 -0
- package/src/components/common/RcCollapse/index.js +6 -0
- package/src/components/common/RcCollapse/index.less.js +4 -0
- package/src/components/common/RcCollapse/motionUtil.js +37 -0
- package/src/components/common/Slider/index.js +95 -0
- package/src/components/common/Slider/index.less.js +4 -0
- package/src/components/common/SwitchCollapse/index.js +162 -0
- package/src/components/common/SwitchCollapse/index.less.js +4 -0
- package/src/components/common/UrlPicker/index.js +81 -0
- package/src/components/common/UrlPicker/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Banner/defaultJSON.js +258 -0
- package/src/components/composite-comp/bol/components/Banner/imgs/banner.png.js +3 -0
- package/src/components/composite-comp/bol/components/Banner/index.js +34 -0
- package/src/components/composite-comp/bol/components/Banner/mobile/index.js +176 -0
- package/src/components/composite-comp/bol/components/Banner/mobile/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Banner/pc/index.js +254 -0
- package/src/components/composite-comp/bol/components/Banner/pc/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Button/defaultJSON.js +93 -0
- package/src/components/composite-comp/bol/components/Button/index.js +48 -0
- package/src/components/composite-comp/bol/components/Button/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Carousel/defaultJSON.js +286 -0
- package/src/components/composite-comp/bol/components/Carousel/imgs/defaultImg.png.js +3 -0
- package/src/components/composite-comp/bol/components/Carousel/index.js +37 -0
- package/src/components/composite-comp/bol/components/Carousel/mobile/index.js +217 -0
- package/src/components/composite-comp/bol/components/Carousel/mobile/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Carousel/pc/index.js +208 -0
- package/src/components/composite-comp/bol/components/Carousel/pc/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Divider/defaultJSON.js +40 -0
- package/src/components/composite-comp/bol/components/Divider/index.js +48 -0
- package/src/components/composite-comp/bol/components/ImageGallery/defaultJSON.js +64 -0
- package/src/components/composite-comp/bol/components/ImageGallery/index.js +30 -0
- package/src/components/composite-comp/bol/components/ImageGallery/mobile/index.js +47 -0
- package/src/components/composite-comp/bol/components/ImageGallery/mobile/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/ImageText/defaultJSON.js +535 -0
- package/src/components/composite-comp/bol/components/ImageText/index.js +33 -0
- package/src/components/composite-comp/bol/components/ImageText/mobile/index.js +143 -0
- package/src/components/composite-comp/bol/components/ImageText/mobile/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/ImageText/pc/index.js +112 -0
- package/src/components/composite-comp/bol/components/ImageText/pc/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Newsletter/defaultJSON.js +114 -0
- package/src/components/composite-comp/bol/components/Newsletter/index.js +65 -0
- package/src/components/composite-comp/bol/components/Newsletter/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Tag/defaultJSON.js +91 -0
- package/src/components/composite-comp/bol/components/Tag/index.js +52 -0
- package/src/components/composite-comp/bol/components/Tag/index.less.js +4 -0
- package/src/components/composite-comp/bol/components/Text/defaultJSON.js +125 -0
- package/src/components/composite-comp/bol/components/Text/index.js +68 -0
- package/src/components/composite-comp/bol/components/Text/index.less.js +4 -0
- package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +73 -0
- package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.less.js +4 -0
- package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +200 -0
- package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.less.js +4 -0
- package/src/components/composite-comp/bol/config-panels/BannerConfig/index.js +35 -0
- package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent/index.js +79 -0
- package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png.js +3 -0
- package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png.js +3 -0
- package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/index.js +53 -0
- package/src/components/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +91 -0
- package/src/components/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.js +175 -0
- package/src/components/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.less.js +4 -0
- package/src/components/composite-comp/bol/config-panels/CarouselConfig/imgs/defaultImg.png.js +3 -0
- package/src/components/composite-comp/bol/config-panels/CarouselConfig/index.js +54 -0
- package/src/components/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +153 -0
- package/src/components/composite-comp/bol/config-panels/DividerConfig/DividerSpacingSetting/index.js +66 -0
- package/src/components/composite-comp/bol/config-panels/DividerConfig/index.js +44 -0
- package/src/components/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +91 -0
- package/src/components/composite-comp/bol/config-panels/ImageGalleryConfig/imgs/defaultImg.png.js +3 -0
- package/src/components/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +44 -0
- package/src/components/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +74 -0
- package/src/components/composite-comp/bol/config-panels/ImageTextConfig/index.js +170 -0
- package/src/components/composite-comp/bol/config-panels/NewsletterConfig/InputField/index.js +143 -0
- package/src/components/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +89 -0
- package/src/components/composite-comp/bol/config-panels/NewsletterConfig/index.js +44 -0
- package/src/components/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +88 -0
- package/src/components/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png.js +3 -0
- package/src/components/composite-comp/bol/config-panels/TagCompConfig/index.js +48 -0
- package/src/components/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.js +79 -0
- package/src/components/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +85 -0
- package/src/components/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.less.js +4 -0
- package/src/components/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png.js +3 -0
- package/src/components/composite-comp/bol/config-panels/TextCompConfig/index.js +55 -0
- package/src/components/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +109 -0
- package/src/components/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +107 -0
- package/src/components/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +116 -0
- package/src/components/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.js +79 -0
- package/src/components/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +70 -0
- package/src/components/composite-comp/common/components/ImageLabel/index.js +47 -0
- package/src/components/composite-comp/common/components/ImageLabel/index.less.js +4 -0
- package/src/components/composite-comp/common/components/ProductItem/index.js +121 -0
- package/src/components/composite-comp/common/components/ProductItem/index.less.js +4 -0
- package/src/components/composite-comp/common/config-panels/BackgroundConfig/index.js +89 -0
- package/src/components/composite-comp/common/config-panels/CustomizeConfig/index.js +182 -0
- package/src/components/composite-comp/common/config-panels/CustomizeConfig/index.less.js +4 -0
- package/src/components/composite-comp/common/config-panels/SpacingConfig/index.js +133 -0
- package/src/components/composite-comp/common/config-panels/SpacingConfig/index.less.js +4 -0
- package/src/components/composite-comp/dito/components/FlashDeal/defaultJSON.js +176 -0
- package/src/components/composite-comp/dito/components/FlashDeal/index.js +31 -0
- package/src/components/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg1.png.js +3 -0
- package/src/components/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg2.png.js +3 -0
- package/src/components/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg3.png.js +3 -0
- package/src/components/composite-comp/dito/components/FlashDeal/mobile/index.js +233 -0
- package/src/components/composite-comp/dito/components/FlashDeal/mobile/index.less.js +4 -0
- package/src/components/composite-comp/dito/components/Recommend/defaultJSON.js +210 -0
- package/src/components/composite-comp/dito/components/Recommend/index.js +31 -0
- package/src/components/composite-comp/dito/components/Recommend/mobile/index.js +317 -0
- package/src/components/composite-comp/dito/components/Recommend/mobile/index.less.js +4 -0
- package/src/components/composite-comp/dito/components/SearchBar/defaultJSON.js +44 -0
- package/src/components/composite-comp/dito/components/SearchBar/imgs/dito-logo.svg.js +3 -0
- package/src/components/composite-comp/dito/components/SearchBar/index.js +31 -0
- package/src/components/composite-comp/dito/components/SearchBar/mobile/index.js +89 -0
- package/src/components/composite-comp/dito/components/SearchBar/mobile/index.less.js +4 -0
- package/src/components/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +121 -0
- package/src/components/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.js +102 -0
- package/src/components/composite-comp/dito/config-panels/FlashDealConfig/imgs/layout1.png.js +3 -0
- package/src/components/composite-comp/dito/config-panels/FlashDealConfig/index.js +49 -0
- package/src/components/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +97 -0
- package/src/components/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +89 -0
- package/src/components/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.less.js +4 -0
- package/src/components/composite-comp/dito/config-panels/RecommendConfig/imgs/defaultImg.png.js +3 -0
- package/src/components/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png.js +3 -0
- package/src/components/composite-comp/dito/config-panels/RecommendConfig/index.js +49 -0
- package/src/components/composite-comp/dito/config-panels/SearchBarConfig/index.js +115 -0
- package/src/components/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +156 -0
- package/src/components/constants/component-types.js +48 -0
- package/src/components/constants/index.js +74 -0
- package/src/components/constants/layout.js +90 -0
- package/src/components/core/Designer/CompListPanel/CompCard/index.js +33 -0
- package/src/components/core/Designer/CompListPanel/CompCard/index.less.js +4 -0
- package/src/components/core/Designer/CompListPanel/index.js +109 -0
- package/src/components/core/Designer/CompListPanel/index.less.js +4 -0
- package/src/components/core/Designer/ConfigPanel/index.js +246 -0
- package/src/components/core/Designer/ConfigPanel/index.less.js +4 -0
- package/src/components/core/Designer/History/index.js +82 -0
- package/src/components/core/Designer/PageCompList/index.js +248 -0
- package/src/components/core/Designer/PageCompList/index.less.js +4 -0
- package/src/components/core/Designer/QuickMenuBar/index.js +130 -0
- package/src/components/core/Designer/QuickMenuBar/index.less.js +4 -0
- package/src/components/core/Designer/ViewArea/index.js +86 -0
- package/src/components/core/Designer/ViewArea/index.less.js +4 -0
- package/src/components/core/Designer/index.js +364 -0
- package/src/components/core/Designer/index.less.js +4 -0
- package/src/components/core/Renderer/index.js +55 -0
- package/src/components/decorator/compositeDecorator.js +94 -0
- package/src/components/decorator/metaDecorator.js +150 -0
- package/src/components/index.js +4 -0
- package/src/components/meta-comp/components/Button/index.js +113 -0
- package/src/components/meta-comp/components/Button/index.less.js +4 -0
- package/src/components/meta-comp/components/Image/index.js +121 -0
- package/src/components/meta-comp/components/Image/index.less.js +4 -0
- package/src/components/meta-comp/components/Text/index.js +385 -0
- package/src/components/meta-comp/components/Text/index.less.js +4 -0
- package/src/components/meta-comp/config-panels/BaseConfig.js +47 -0
- package/src/components/meta-comp/config-panels/ButtonConfig/index.js +308 -0
- package/src/components/meta-comp/config-panels/ButtonConfig/index.less.js +4 -0
- package/src/components/meta-comp/config-panels/ImageConfig/index.js +179 -0
- package/src/components/meta-comp/config-panels/ImageConfig/index.less.js +4 -0
- package/src/components/meta-comp/config-panels/TextConfig/index.js +310 -0
- package/src/components/meta-comp/config-panels/TextConfig/index.less.js +4 -0
- package/src/components/mobx/Store.js +88 -0
- package/src/components/mobx/index.js +12 -0
- package/src/components/utils/androidUtil.js +22 -0
- package/src/components/utils/businessUtil.js +214 -0
- package/src/components/utils/commonUtil.js +223 -0
- package/src/components/utils/coreUtil.js +108 -0
- package/src/components/utils/currencyUtil.js +110 -0
- package/src/components/utils/dataTreeUtils.js +93 -0
- package/src/components/utils/dateUtil.js +30 -0
- package/src/components/utils/storeUtil.js +113 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { __extends } from '../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default, { Component } from 'react';
|
|
3
|
+
import { isPc } from '../../../utils/coreUtil.js';
|
|
4
|
+
import { ensure } from '../../../utils/commonUtil.js';
|
|
5
|
+
import Button from '../../../common/Button/index.js';
|
|
6
|
+
import { compInfoMap, deviceTypeMap } from '../../../constants/index.js';
|
|
7
|
+
import { configPanelMap, secondConfigPanelMap } from '../../../constants/component-types.js';
|
|
8
|
+
import { store } from '../../../mobx/index.js';
|
|
9
|
+
import './index.less.js';
|
|
10
|
+
import { autorun } from 'mobx';
|
|
11
|
+
|
|
12
|
+
var ConfigPanel =
|
|
13
|
+
/** @class */
|
|
14
|
+
function (_super) {
|
|
15
|
+
__extends(ConfigPanel, _super);
|
|
16
|
+
|
|
17
|
+
function ConfigPanel() {
|
|
18
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
19
|
+
|
|
20
|
+
_this.preClickedGroup = null; // 以及面板展开状态
|
|
21
|
+
|
|
22
|
+
_this.configOpen = false;
|
|
23
|
+
_this.state = {
|
|
24
|
+
selectedNode: {}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
_this.animation = function (type) {
|
|
28
|
+
document.getElementsByClassName('config_wrap')[0].setAttribute('style', "animation-name:".concat(type, ";animation-duration: 0.3s;animation-fill-mode:both"));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
_this.openPcConfig = function () {
|
|
32
|
+
_this.animation('openPcConfig');
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
_this.closePcConfig = function () {
|
|
36
|
+
_this.animation('closePcConfig');
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
_this.openMobileConfig = function () {
|
|
40
|
+
_this.animation('openMobileConfig');
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
_this.closeMobileConfig = function () {
|
|
44
|
+
_this.animation('closeMobileConfig');
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
_this.openConfig = function () {
|
|
48
|
+
if (_this.configOpen) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (window.magicDesign.device === 'pc') {
|
|
53
|
+
_this.openPcConfig();
|
|
54
|
+
} else {
|
|
55
|
+
_this.openMobileConfig();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_this.configOpen = true;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
_this.closeConfig = function () {
|
|
62
|
+
if (!_this.configOpen) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (window.magicDesign.device === 'pc') {
|
|
67
|
+
_this.closePcConfig();
|
|
68
|
+
} else {
|
|
69
|
+
_this.closeMobileConfig();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
_this.configOpen = false;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
_this.openSecConfig = function () {
|
|
76
|
+
var _a;
|
|
77
|
+
|
|
78
|
+
(_a = document.getElementsByClassName('sec_config_wrap')[0]) === null || _a === void 0 ? void 0 : _a.setAttribute('style', 'animation-name:openSecConfig;animation-duration: 0.3s;animation-fill-mode:both');
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
_this.closeSecConfig = function () {
|
|
82
|
+
var _a;
|
|
83
|
+
|
|
84
|
+
(_a = document.getElementsByClassName('sec_config_wrap')[0]) === null || _a === void 0 ? void 0 : _a.setAttribute('style', 'animation-name:closeSecConfig;animation-duration: 0.3s;animation-fill-mode:both');
|
|
85
|
+
store.setState({
|
|
86
|
+
clickedMeta: ''
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
_this.onDoneClick = function () {
|
|
91
|
+
var _a = _this.props,
|
|
92
|
+
device = _a.device,
|
|
93
|
+
onClose = _a.onClose;
|
|
94
|
+
|
|
95
|
+
if (device === deviceTypeMap.PC) {
|
|
96
|
+
_this.closePcConfig();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
onClose();
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
_this.getConfigPanelInstance = function () {
|
|
103
|
+
var device = _this.props.device;
|
|
104
|
+
var selectedNode = _this.state.selectedNode;
|
|
105
|
+
var Clazz = configPanelMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type];
|
|
106
|
+
var panelProps = {
|
|
107
|
+
data: selectedNode,
|
|
108
|
+
device: device
|
|
109
|
+
};
|
|
110
|
+
var instance = Clazz ? /*#__PURE__*/React__default.createElement(Clazz, panelProps) : null;
|
|
111
|
+
return instance;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
_this.getSecondConfigInstance = function () {
|
|
115
|
+
var selectedNode = _this.state.selectedNode;
|
|
116
|
+
var Clazz = secondConfigPanelMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type];
|
|
117
|
+
var panelProps = ensure(function () {
|
|
118
|
+
return selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.groupSource.find(function (src) {
|
|
119
|
+
return src.id === _this.state.clickedGroup;
|
|
120
|
+
});
|
|
121
|
+
}, null);
|
|
122
|
+
|
|
123
|
+
if (panelProps) {
|
|
124
|
+
var instance = Clazz ? /*#__PURE__*/React__default.createElement(Clazz, {
|
|
125
|
+
panelProps: panelProps
|
|
126
|
+
}) : null;
|
|
127
|
+
return instance;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return null;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
_this.getSecondConfigName = function () {
|
|
134
|
+
var _a, _b, _c, _d, _e;
|
|
135
|
+
|
|
136
|
+
var selectedNode = _this.state.selectedNode;
|
|
137
|
+
|
|
138
|
+
if (!selectedNode || !selectedNode.groupSource) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
var panelProps = selectedNode.groupSource.find(function (src) {
|
|
143
|
+
return src.id === _this.state.clickedGroup;
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
if (!panelProps) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
var groupName = '';
|
|
151
|
+
|
|
152
|
+
switch (selectedNode.type) {
|
|
153
|
+
case 'BANNER':
|
|
154
|
+
groupName = (_a = panelProps.title) === null || _a === void 0 ? void 0 : _a.text;
|
|
155
|
+
|
|
156
|
+
if (!groupName) {
|
|
157
|
+
groupName = isPc() ? (_c = (_b = panelProps.image) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.pcName : (_e = (_d = panelProps.image) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.h5Name;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
break;
|
|
161
|
+
|
|
162
|
+
case 'RECOMMEND':
|
|
163
|
+
groupName = panelProps.groupName.text;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return groupName || 'Group Name';
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
_this.onSecConfigBack = function () {
|
|
170
|
+
store.setState({
|
|
171
|
+
clickedGroup: null
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
return _this;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
ConfigPanel.prototype.componentDidMount = function () {
|
|
179
|
+
var _this = this;
|
|
180
|
+
|
|
181
|
+
this.distroy = autorun(function () {
|
|
182
|
+
var selectedNode = store.getFloorInfo();
|
|
183
|
+
|
|
184
|
+
_this.setState({
|
|
185
|
+
clickedGroup: store.clickedGroup,
|
|
186
|
+
selectedNode: selectedNode
|
|
187
|
+
}); // 展开以及面板
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
if (selectedNode) {
|
|
191
|
+
_this.openConfig();
|
|
192
|
+
} else {
|
|
193
|
+
_this.closeConfig();
|
|
194
|
+
} // 展开首期二级面板
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
if (!store.clickedGroup) {
|
|
198
|
+
_this.closeSecConfig();
|
|
199
|
+
} else if (store.clickedGroup !== _this.preClickedGroup) {
|
|
200
|
+
_this.openSecConfig();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
_this.preClickedGroup = store.clickedGroup;
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
ConfigPanel.prototype.componentWillUnmount = function () {
|
|
208
|
+
this.distroy();
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
ConfigPanel.prototype.render = function () {
|
|
212
|
+
var _a, _b;
|
|
213
|
+
|
|
214
|
+
var device = this.props.device;
|
|
215
|
+
var selectedNode = this.state.selectedNode;
|
|
216
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
217
|
+
className: "config_wrap"
|
|
218
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
219
|
+
className: "first_config_wrap"
|
|
220
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
221
|
+
className: "config_header"
|
|
222
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
223
|
+
className: "title",
|
|
224
|
+
title: (_a = compInfoMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type]) === null || _a === void 0 ? void 0 : _a.name
|
|
225
|
+
}, (_b = compInfoMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type]) === null || _b === void 0 ? void 0 : _b.name), device === deviceTypeMap.PC && /*#__PURE__*/React__default.createElement(Button, {
|
|
226
|
+
onClick: this.onDoneClick,
|
|
227
|
+
type: "light"
|
|
228
|
+
}, "Done")), this.getConfigPanelInstance()), /*#__PURE__*/React__default.createElement("div", {
|
|
229
|
+
className: "sec_config_wrap"
|
|
230
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
231
|
+
className: "config_header"
|
|
232
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
233
|
+
className: "button_wrap"
|
|
234
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
235
|
+
icon: "icon-left",
|
|
236
|
+
onClick: this.onSecConfigBack,
|
|
237
|
+
type: "icon"
|
|
238
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
239
|
+
className: "title"
|
|
240
|
+
}, this.getSecondConfigName())), this.getSecondConfigInstance()));
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
return ConfigPanel;
|
|
244
|
+
}(Component);
|
|
245
|
+
|
|
246
|
+
export { ConfigPanel as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import styleInject from '../../../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".index_config_wrap__ZFRcU {\n width: 354px;\n background: #ffffff;\n height: 100vh;\n overflow: scroll;\n transition-property: transform;\n transition-duration: 0.3s;\n transition-timing-function: ease;\n left: -354px;\n z-index: 200;\n position: absolute;\n flex-shrink: 0;\n}\n.index_config_wrap__ZFRcU.index_show_config__vn9GX {\n position: fixed;\n transform: translateX(354px);\n}\n.index_config_wrap__ZFRcU .index_first_config_wrap__bNQvD {\n height: 100%;\n padding: 24px;\n}\n.index_config_wrap__ZFRcU .index_first_config_wrap__bNQvD .index_config_header__t6JNr {\n font-size: 26px;\n line-height: 36px;\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n}\n.index_config_wrap__ZFRcU .index_first_config_wrap__bNQvD .index_config_header__t6JNr .index_title__kHwtD {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 700;\n font-size: 26px;\n line-height: 32px;\n color: #232F46;\n}\n.index_config_wrap__ZFRcU .index_sec_config_wrap__Jb4MT {\n position: absolute;\n width: 354px;\n left: -354px;\n bottom: 0;\n top: 0;\n background-color: #FFF;\n padding: 24px;\n}\n.index_config_wrap__ZFRcU .index_sec_config_wrap__Jb4MT .index_config_header__t6JNr .index_button_wrap__6Lv2T {\n display: flex;\n}\n.index_config_wrap__ZFRcU .index_sec_config_wrap__Jb4MT .index_config_header__t6JNr .index_title__kHwtD {\n margin-top: 20px;\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 700;\n font-size: 26px;\n line-height: 32px;\n color: #232F46;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@keyframes index_openPcConfig__7z4O4 {\n from {\n left: -354px;\n }\n to {\n left: 0px;\n }\n}\n@keyframes index_closePcConfig__-h55I {\n from {\n left: 0px;\n }\n to {\n left: -354px;\n }\n}\n@keyframes index_openMobileConfig__amVYY {\n from {\n left: 0px;\n z-index: 50;\n }\n to {\n left: 355px;\n z-index: 50;\n }\n}\n@keyframes index_closeMobileConfig__FMac7 {\n from {\n left: 355px;\n z-index: 50;\n }\n to {\n left: 0px;\n z-index: 50;\n }\n}\n@keyframes index_openSecConfig__vl7hj {\n from {\n left: -354px;\n }\n to {\n left: 0px;\n }\n}\n@keyframes index_closeSecConfig__W2NxA {\n from {\n left: 0px;\n }\n to {\n left: -354px;\n }\n}\n";
|
|
4
|
+
styleInject(css_248z);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import cloneDeep_1 from '../../../../../node_modules/lodash/cloneDeep.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 历史队列,使用数组存放
|
|
5
|
+
* 有新的操作时存入数组的0位置,游标设置为0
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
var debug = require('debug')('worker:History');
|
|
10
|
+
|
|
11
|
+
var History =
|
|
12
|
+
/** @class */
|
|
13
|
+
function () {
|
|
14
|
+
function History(hist) {
|
|
15
|
+
var _this = this;
|
|
16
|
+
/**
|
|
17
|
+
* 游标位置
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
this.cursor = 0;
|
|
22
|
+
/**
|
|
23
|
+
* 历史数据
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
this.list = [];
|
|
27
|
+
|
|
28
|
+
this.redoAble = function () {
|
|
29
|
+
return _this.cursor !== 0;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
this.undoAble = function () {
|
|
33
|
+
return _this.cursor !== _this.list.length - 1;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 清空0~cursor之间的数据,将data插入 位置0
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
this.push = function (data) {
|
|
41
|
+
debug('push data', data);
|
|
42
|
+
var cloneData = cloneDeep_1(data);
|
|
43
|
+
|
|
44
|
+
_this.list.splice(0, _this.cursor, cloneData);
|
|
45
|
+
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* redu操作只修改当前游标-1
|
|
50
|
+
* 并且返回后一步的json对象
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
this.redo = function () {
|
|
55
|
+
debug('redo click');
|
|
56
|
+
var newCursor = _this.cursor - 1;
|
|
57
|
+
_this.cursor = newCursor;
|
|
58
|
+
var newData = _this.list[newCursor];
|
|
59
|
+
return newData;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* undo操作只修改当前的游标+1
|
|
63
|
+
* 并且返回前一步的json对象
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
this.undo = function () {
|
|
68
|
+
debug('undo click');
|
|
69
|
+
var newCursor = _this.cursor + 1;
|
|
70
|
+
_this.cursor = newCursor;
|
|
71
|
+
var newData = _this.list[newCursor];
|
|
72
|
+
return newData;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
this.cursor = 0;
|
|
76
|
+
this.list = [hist];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return History;
|
|
80
|
+
}();
|
|
81
|
+
|
|
82
|
+
export { History as default };
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { __spreadArray } from '../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { Menu, Dropdown } from 'antd';
|
|
3
|
+
import classNames from '../../../../../node_modules/classnames/index.js';
|
|
4
|
+
import update from 'immutability-helper';
|
|
5
|
+
import React__default, { useState, useRef, useEffect, useCallback } from 'react';
|
|
6
|
+
import '../../../common/LayoutSelector/index.js';
|
|
7
|
+
import '../../../common/Field/index.js';
|
|
8
|
+
import '../../../common/UrlPicker/index.js';
|
|
9
|
+
import Iconfont from '../../../common/Iconfont/index.js';
|
|
10
|
+
import Button from '../../../common/Button/index.js';
|
|
11
|
+
import '../../../common/AlignSelector/index.js';
|
|
12
|
+
import '../../../common/Collapse/index.js';
|
|
13
|
+
import '../../../common/ColorPickerInput/index.js';
|
|
14
|
+
import '../../../common/ImagePicker/index.js';
|
|
15
|
+
import '../../../common/IconPicker/index.js';
|
|
16
|
+
import '../../../common/SwitchCollapse/index.js';
|
|
17
|
+
import '../../../common/Slider/index.js';
|
|
18
|
+
import '../../../common/FontStyles/index.js';
|
|
19
|
+
import '../../../common/ButtonIconLayout/index.js';
|
|
20
|
+
import 'axios';
|
|
21
|
+
import '../../../../../node_modules/qs/lib/stringify.js';
|
|
22
|
+
import '../../../../../node_modules/qs/lib/utils.js';
|
|
23
|
+
import '../../../common/ProductModal/index.js';
|
|
24
|
+
import '../../../common/ProductSource/index.less.js';
|
|
25
|
+
import { copyNode } from '../../../utils/coreUtil.js';
|
|
26
|
+
import './index.less.js';
|
|
27
|
+
import { compInfoMap } from '../../../constants/index.js';
|
|
28
|
+
import { store } from '../../../mobx/index.js';
|
|
29
|
+
import { autorun } from 'mobx';
|
|
30
|
+
|
|
31
|
+
var operTypeMap = {
|
|
32
|
+
MOVE_UP: '1',
|
|
33
|
+
MOVE_DOWN: '2',
|
|
34
|
+
COPY: '3',
|
|
35
|
+
DELETE: '4'
|
|
36
|
+
};
|
|
37
|
+
function PageCompList(_a) {
|
|
38
|
+
var setPageData = _a.setPageData,
|
|
39
|
+
pageData = _a.pageData,
|
|
40
|
+
onAdd = _a.onAdd,
|
|
41
|
+
renderPagesManage = _a.renderPagesManage,
|
|
42
|
+
pageName = _a.pageName;
|
|
43
|
+
|
|
44
|
+
var _b = useState(pageData || []),
|
|
45
|
+
components = _b[0],
|
|
46
|
+
setComponents = _b[1];
|
|
47
|
+
|
|
48
|
+
var _c = useState(''),
|
|
49
|
+
dragId = _c[0],
|
|
50
|
+
setDragId = _c[1];
|
|
51
|
+
|
|
52
|
+
var _d = useState(''),
|
|
53
|
+
clickedFloor = _d[0],
|
|
54
|
+
setClickedFloor = _d[1];
|
|
55
|
+
|
|
56
|
+
var ref = useRef();
|
|
57
|
+
useEffect(function () {
|
|
58
|
+
setComponents(pageData || []);
|
|
59
|
+
}, [pageData]);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
var distroy = autorun(function () {
|
|
62
|
+
setClickedFloor(store.clickedFloor);
|
|
63
|
+
});
|
|
64
|
+
return distroy;
|
|
65
|
+
}, []);
|
|
66
|
+
var moveCard = useCallback(function (dragNodeId, hoverNodeId) {
|
|
67
|
+
var dragIndex = components.findIndex(function (comp) {
|
|
68
|
+
return comp.id === dragNodeId;
|
|
69
|
+
});
|
|
70
|
+
var hoverIndex = components.findIndex(function (comp) {
|
|
71
|
+
return comp.id === hoverNodeId;
|
|
72
|
+
});
|
|
73
|
+
setComponents(function (prevCards) {
|
|
74
|
+
var newComps = update(prevCards, {
|
|
75
|
+
$splice: [[dragIndex, 1], [hoverIndex, 0, prevCards[dragIndex]]]
|
|
76
|
+
});
|
|
77
|
+
ref.current = newComps;
|
|
78
|
+
return newComps;
|
|
79
|
+
});
|
|
80
|
+
}, [components]);
|
|
81
|
+
|
|
82
|
+
var onDragStart = function (e) {
|
|
83
|
+
setDragId(e.currentTarget.dataset.nodeid);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var onDragEnter = function (e) {
|
|
87
|
+
var hoverNodeId = e.currentTarget.dataset.nodeid;
|
|
88
|
+
|
|
89
|
+
if (dragId === hoverNodeId) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
moveCard(dragId, hoverNodeId);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var onDragEnd = function () {
|
|
97
|
+
setDragId('');
|
|
98
|
+
|
|
99
|
+
if (ref.current) {
|
|
100
|
+
setPageData(ref.current);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var onMenuClick = function (index, operType) {
|
|
105
|
+
var newComponents = __spreadArray([], components, true);
|
|
106
|
+
|
|
107
|
+
if (operType === operTypeMap.MOVE_UP) {
|
|
108
|
+
var temp = newComponents[index - 1];
|
|
109
|
+
newComponents[index - 1] = newComponents[index];
|
|
110
|
+
newComponents[index] = temp;
|
|
111
|
+
} else if (operType === operTypeMap.MOVE_DOWN) {
|
|
112
|
+
var temp = newComponents[index + 1];
|
|
113
|
+
newComponents[index + 1] = newComponents[index];
|
|
114
|
+
newComponents[index] = temp;
|
|
115
|
+
} else if (operType === operTypeMap.COPY) {
|
|
116
|
+
var copyComponent = copyNode(newComponents[index]);
|
|
117
|
+
newComponents.splice(index + 1, 0, copyComponent);
|
|
118
|
+
} else if (operType === operTypeMap.DELETE) {
|
|
119
|
+
if (newComponents[index].id === clickedFloor) {
|
|
120
|
+
store.setState({
|
|
121
|
+
clickedFloor: null
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
newComponents.splice(index, 1);
|
|
126
|
+
} // setComponents(newComponents);
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
setPageData(newComponents);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var componentScrollTop = function (data) {
|
|
133
|
+
if (document.getElementById("view".concat(data.id))) {
|
|
134
|
+
document.getElementById("view".concat(data.id)).scrollIntoView({
|
|
135
|
+
behavior: 'smooth'
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
var onCardClick = function (event, data) {
|
|
141
|
+
componentScrollTop(data); // 这里必须阻止事件冒泡,然后再触发自定义的事件
|
|
142
|
+
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
event.stopPropagation();
|
|
145
|
+
var evt = new Event('component-click', {
|
|
146
|
+
bubbles: false
|
|
147
|
+
});
|
|
148
|
+
evt.data = data;
|
|
149
|
+
window.document.dispatchEvent(evt);
|
|
150
|
+
if (clickedFloor === data.id) return;
|
|
151
|
+
store.setState({
|
|
152
|
+
clickedFloor: data.id
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var renderCard = function (comp, index) {
|
|
157
|
+
var menu = /*#__PURE__*/React__default.createElement(Menu, {
|
|
158
|
+
onClick: function (_a) {
|
|
159
|
+
var item = _a.item;
|
|
160
|
+
return onMenuClick(index, item.props.value);
|
|
161
|
+
}
|
|
162
|
+
}, index !== 0 && /*#__PURE__*/React__default.createElement(Menu.Item, {
|
|
163
|
+
className: "menu_item",
|
|
164
|
+
value: "1"
|
|
165
|
+
}, "Move Up"), index !== components.length - 1 && /*#__PURE__*/React__default.createElement(Menu.Item, {
|
|
166
|
+
className: "menu_item",
|
|
167
|
+
value: "2"
|
|
168
|
+
}, "Move Down"), /*#__PURE__*/React__default.createElement(Menu.Item, {
|
|
169
|
+
className: "menu_item",
|
|
170
|
+
value: "3"
|
|
171
|
+
}, "Copy"), /*#__PURE__*/React__default.createElement(Menu.Item, {
|
|
172
|
+
className: "menu_item",
|
|
173
|
+
value: "4"
|
|
174
|
+
}, "Delete"));
|
|
175
|
+
var dragging = dragId === String(comp.id);
|
|
176
|
+
var active = clickedFloor === String(comp.id);
|
|
177
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
178
|
+
key: "card".concat(comp.id),
|
|
179
|
+
className: classNames('card-wrap', {
|
|
180
|
+
active: active
|
|
181
|
+
}),
|
|
182
|
+
"data-nodeid": comp.id,
|
|
183
|
+
draggable: "true",
|
|
184
|
+
id: "card".concat(comp.id),
|
|
185
|
+
onDragEnd: onDragEnd,
|
|
186
|
+
onDragEnter: onDragEnter,
|
|
187
|
+
onDragOver: function (e) {
|
|
188
|
+
e.preventDefault();
|
|
189
|
+
},
|
|
190
|
+
onDragStart: onDragStart,
|
|
191
|
+
style: {
|
|
192
|
+
opacity: dragging ? '0.4' : '1'
|
|
193
|
+
}
|
|
194
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
195
|
+
className: "left",
|
|
196
|
+
onClick: function (e) {
|
|
197
|
+
return onCardClick(e, comp);
|
|
198
|
+
}
|
|
199
|
+
}, /*#__PURE__*/React__default.createElement(Iconfont, {
|
|
200
|
+
className: "comp-icon",
|
|
201
|
+
color: active ? '#2F54EB' : '',
|
|
202
|
+
size: "20px",
|
|
203
|
+
type: compInfoMap[comp.type].icon
|
|
204
|
+
}), /*#__PURE__*/React__default.createElement(Iconfont, {
|
|
205
|
+
className: "drag-icon",
|
|
206
|
+
color: "#2F54EB",
|
|
207
|
+
size: "20px",
|
|
208
|
+
type: "icon-drag"
|
|
209
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
210
|
+
className: "card-title ml16"
|
|
211
|
+
}, index + 1, ". ", compInfoMap[comp.type].name)), /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
212
|
+
overlay: menu,
|
|
213
|
+
placement: "bottomRight",
|
|
214
|
+
trigger: ['click']
|
|
215
|
+
}, /*#__PURE__*/React__default.createElement(Iconfont, {
|
|
216
|
+
className: "more-btn",
|
|
217
|
+
color: "#2F54EB",
|
|
218
|
+
size: "20px",
|
|
219
|
+
style: {
|
|
220
|
+
height: '40px'
|
|
221
|
+
},
|
|
222
|
+
type: "icon-more"
|
|
223
|
+
})));
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
227
|
+
className: "page-comp-wrap"
|
|
228
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
229
|
+
className: "page-comp-head"
|
|
230
|
+
}, renderPagesManage), /*#__PURE__*/React__default.createElement("div", {
|
|
231
|
+
className: "page-comp-list"
|
|
232
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
233
|
+
className: "title mb16"
|
|
234
|
+
}, pageName), /*#__PURE__*/React__default.createElement(Button, {
|
|
235
|
+
icon: "icon-add",
|
|
236
|
+
onClick: onAdd,
|
|
237
|
+
size: "large",
|
|
238
|
+
type: "light"
|
|
239
|
+
}, "Add Component"), /*#__PURE__*/React__default.createElement("div", {
|
|
240
|
+
className: "list mt16"
|
|
241
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
242
|
+
className: "inner-list"
|
|
243
|
+
}, /*#__PURE__*/React__default.createElement("div", null, components.length > 0 && components.map(function (comp, i) {
|
|
244
|
+
return renderCard(comp, i);
|
|
245
|
+
}))))));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export { PageCompList as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import styleInject from '../../../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".index_page-comp-wrap__hAT7M {\n z-index: 100;\n background-color: #FFF;\n width: 354px;\n flex-shrink: 0;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-head__rt3Bk {\n height: 81px;\n box-shadow: inset 0px -1px 0px #EDF0F4;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-list__msp13 {\n padding: 24px;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-list__msp13 .index_title__1DebN {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 700;\n font-size: 26px;\n line-height: 36px;\n color: #232F46;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-list__msp13 .index_list__hxWna .index_inner-list__G1GvV {\n margin-right: -21px;\n overflow-y: auto;\n width: 100%;\n padding: 8px 0px 8px 0;\n height: calc(100vh - 260px);\n background: #F5F6F7;\n border-radius: 8px;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-list__msp13 .index_list__hxWna .index_inner-list__G1GvV::-webkit-scrollbar {\n width: 8px;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-list__msp13 .index_list__hxWna .index_inner-list__G1GvV::-webkit-scrollbar-track-piece {\n background-color: #fff;\n}\n.index_page-comp-wrap__hAT7M .index_page-comp-list__msp13 .index_list__hxWna .index_inner-list__G1GvV::-webkit-scrollbar-thumb {\n background-color: #C1C9D7;\n background-clip: padding-box;\n border-radius: 100px;\n}\n.index_card-wrap__l74jT {\n display: flex;\n justify-content: space-between;\n cursor: move;\n height: 64px;\n line-height: 64px;\n padding: 0 20px;\n color: #232F46;\n}\n.index_card-wrap__l74jT .index_left__pBraq {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.index_card-wrap__l74jT .index_left__pBraq .index_comp-icon__YbnCQ {\n display: block;\n}\n.index_card-wrap__l74jT .index_left__pBraq .index_drag-icon__8anEd {\n display: none;\n}\n.index_card-wrap__l74jT .index_left__pBraq .index_card-title__A3MdO {\n line-height: 24px;\n font-family: 'Open Sans';\n font-weight: 400;\n font-size: 16px;\n font-style: normal;\n}\n.index_card-wrap__l74jT .index_more-btn__lWkrz {\n display: none;\n cursor: pointer;\n}\n.index_card-wrap__l74jT:hover {\n background: #E9F0FF;\n color: #2F54EB;\n}\n.index_card-wrap__l74jT:hover .index_left__pBraq {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n}\n.index_card-wrap__l74jT:hover .index_left__pBraq .index_comp-icon__YbnCQ {\n display: none;\n}\n.index_card-wrap__l74jT:hover .index_left__pBraq .index_drag-icon__8anEd {\n display: block;\n}\n.index_card-wrap__l74jT:hover .index_left__pBraq .index_card-title__A3MdO {\n font-weight: 600;\n}\n.index_card-wrap__l74jT:hover .index_more-btn__lWkrz {\n display: block;\n}\n.index_active__dMPSq {\n background: #E9F0FF;\n color: #2F54EB;\n}\n.index_active__dMPSq .index_left__pBraq .index_card-title__A3MdO {\n font-weight: 600;\n}\n.index_active__dMPSq .index_more-btn__lWkrz {\n display: block;\n}\n";
|
|
4
|
+
styleInject(css_248z);
|