@fonixtree/magic-design 0.0.56 → 0.0.60
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/README.md +320 -0
- package/es/assets/fonts/magic-box-iconfont.css +24 -12
- package/es/assets/fonts/magic-box-iconfont.css.bak +24 -12
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/es/common/Button/index.js +2 -1
- package/es/common/Button/index.less +5 -0
- package/es/common/GroupList/index.js +2 -3
- package/es/common/LinkModal/index.less +1 -1
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +2 -2
- package/es/composite-comp/bol/components/Button/defaultJSON.js +38 -68
- package/es/composite-comp/bol/components/Button/index.js +7 -9
- package/es/composite-comp/bol/components/Button/index.less +1 -0
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
- package/es/composite-comp/bol/components/Carousel/pc/index.js +2 -2
- package/es/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
- package/es/composite-comp/bol/components/Tag/index.js +7 -9
- package/es/composite-comp/bol/components/Tag/index.less +1 -0
- package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
- package/es/composite-comp/bol/components/Text/index.js +3 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/es/composite-comp/common/components/ProductItem/index.less +3 -3
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
- package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +135 -0
- package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +484 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +1 -1
- package/es/composite-comp/dito/components/Recommend/pc/index.less +1 -1
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -2
- package/es/composite-comp/dito/components/SearchBar/index.js +5 -1
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +23 -24
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +57 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +130 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
- package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/es/constants/component-types.js +13 -3
- package/es/constants/index.js +20 -2
- package/es/constants/layout.js +10 -2
- package/es/core/Designer/CompListPanel/index.js +8 -33
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
- package/es/core/Designer/ConfigPanel/index.js +70 -23
- package/es/core/Designer/ConfigPanel/index.less +4 -0
- package/es/core/Designer/History/index.js +34 -28
- package/es/core/Designer/PageCompList/index.js +9 -1
- package/es/core/Designer/ViewArea/index.js +20 -6
- package/es/core/Designer/index.js +36 -31
- package/es/core/Renderer/index.js +17 -2
- package/es/decorator/index.js +8 -0
- package/es/decorator/updateConfigDecorator.js +76 -0
- package/es/locale/en/en.json +10 -1
- package/es/locale/es/es.json +10 -1
- package/es/locale/id/id.json +10 -1
- package/es/meta-comp/components/Button/index.js +8 -8
- package/es/meta-comp/components/Button/index.less +5 -0
- package/es/meta-comp/components/Image/index.js +1 -1
- package/es/meta-comp/components/Text/index.js +18 -7
- package/es/meta-comp/config-panels/BaseConfig.js +8 -10
- package/es/meta-comp/config-panels/TextConfig/index.js +10 -3
- package/es/mobx/Store.js +5 -9
- package/es/utils/coreUtil.js +14 -2
- package/lib/assets/fonts/magic-box-iconfont.css +24 -12
- package/lib/assets/fonts/magic-box-iconfont.css.bak +24 -12
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/lib/common/Button/index.js +2 -1
- package/lib/common/Button/index.less +5 -0
- package/lib/common/GroupList/index.js +2 -3
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +2 -2
- package/lib/composite-comp/bol/components/Button/defaultJSON.js +38 -68
- package/lib/composite-comp/bol/components/Button/index.js +7 -9
- package/lib/composite-comp/bol/components/Button/index.less +1 -0
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +2 -2
- package/lib/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
- package/lib/composite-comp/bol/components/Tag/index.js +7 -9
- package/lib/composite-comp/bol/components/Tag/index.less +1 -0
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
- package/lib/composite-comp/bol/components/Text/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/lib/composite-comp/common/components/ProductItem/index.less +3 -3
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
- package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +135 -0
- package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +484 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +1 -1
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +1 -1
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -2
- package/lib/composite-comp/dito/components/SearchBar/index.js +5 -1
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +23 -24
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +57 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +130 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
- package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/lib/constants/component-types.js +13 -3
- package/lib/constants/index.js +20 -2
- package/lib/constants/layout.js +10 -2
- package/lib/core/Designer/CompListPanel/index.js +8 -33
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
- package/lib/core/Designer/ConfigPanel/index.js +70 -23
- package/lib/core/Designer/ConfigPanel/index.less +4 -0
- package/lib/core/Designer/History/index.js +34 -28
- package/lib/core/Designer/PageCompList/index.js +9 -1
- package/lib/core/Designer/ViewArea/index.js +20 -6
- package/lib/core/Designer/index.js +36 -31
- package/lib/core/Renderer/index.js +17 -2
- package/lib/decorator/index.js +8 -0
- package/lib/decorator/updateConfigDecorator.js +76 -0
- package/lib/locale/en/en.json +10 -1
- package/lib/locale/es/es.json +10 -1
- package/lib/locale/id/id.json +10 -1
- package/lib/meta-comp/components/Button/index.js +8 -8
- package/lib/meta-comp/components/Button/index.less +5 -0
- package/lib/meta-comp/components/Image/index.js +1 -1
- package/lib/meta-comp/components/Text/index.js +18 -7
- package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
- package/lib/meta-comp/config-panels/TextConfig/index.js +10 -3
- package/lib/mobx/Store.js +5 -9
- package/lib/utils/coreUtil.js +14 -2
- package/package.json +86 -1
|
@@ -163,7 +163,7 @@ function (_super) {
|
|
|
163
163
|
autoplaySpeed: data.setting.autoplay.interval * 1000,
|
|
164
164
|
speed: 500,
|
|
165
165
|
slidesToShow: colNum,
|
|
166
|
-
slidesToScroll:
|
|
166
|
+
slidesToScroll: 1,
|
|
167
167
|
beforeChange: function beforeChange(oldIndex, newIndex) {
|
|
168
168
|
_this.setState({
|
|
169
169
|
sliderIndex: newIndex
|
|
@@ -220,7 +220,7 @@ function (_super) {
|
|
|
220
220
|
}), item.secondButtonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
221
221
|
data: item.secondButtonTag
|
|
222
222
|
}))));
|
|
223
|
-
})), data.setting.dots.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
223
|
+
})), data.setting.dots.open && Math.ceil(data.groupSource.length / colNum) > 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
224
|
className: "swiper-ban"
|
|
225
225
|
}, data.groupSource.length > 1 && data.groupSource.map(function (item, i) {
|
|
226
226
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -3,60 +3,51 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getDefaultJSON = void 0;
|
|
6
|
+
exports.tagGroupSourceJSON = exports.getDefaultJSON = void 0;
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
11
|
-
__assign = Object.assign || function (t) {
|
|
12
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13
|
-
s = arguments[i];
|
|
14
|
-
|
|
15
|
-
for (var p in s) {
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return __assign.apply(this, arguments);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
10
|
/**
|
|
27
11
|
* 获取 text 元组件json
|
|
28
12
|
*/
|
|
29
|
-
var
|
|
13
|
+
var tagGroupSourceJSON = function tagGroupSourceJSON() {
|
|
14
|
+
var groupId = (0, _uuid.v4)();
|
|
30
15
|
return {
|
|
31
|
-
id:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
backgroundColor: '#e6eaf0'
|
|
36
|
-
},
|
|
37
|
-
buttonText: {
|
|
38
|
-
sizeType: 'Customize font styles',
|
|
39
|
-
fontFamily: 'Open Sans',
|
|
40
|
-
fontWeight: 600,
|
|
41
|
-
fontSize: 12,
|
|
42
|
-
fontStyle: 'normal',
|
|
43
|
-
color: '#8493AF',
|
|
44
|
-
padding: '2px 8px'
|
|
45
|
-
},
|
|
46
|
-
buttonBorder: {
|
|
16
|
+
id: groupId,
|
|
17
|
+
button: {
|
|
18
|
+
parentId: groupId,
|
|
19
|
+
id: (0, _uuid.v4)(),
|
|
47
20
|
open: true,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
21
|
+
content: {
|
|
22
|
+
url: '',
|
|
23
|
+
backgroundColor: '#e6eaf0'
|
|
24
|
+
},
|
|
25
|
+
buttonText: {
|
|
26
|
+
sizeType: 'Customize font styles',
|
|
27
|
+
fontFamily: 'Open Sans',
|
|
28
|
+
fontWeight: 600,
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
fontStyle: 'normal',
|
|
31
|
+
color: '#8493AF',
|
|
32
|
+
padding: '2px 8px'
|
|
33
|
+
},
|
|
34
|
+
buttonBorder: {
|
|
35
|
+
open: true,
|
|
36
|
+
borderColor: '',
|
|
37
|
+
borderRadius: 4
|
|
38
|
+
},
|
|
39
|
+
buttonIcon: {
|
|
40
|
+
iconUrl: '',
|
|
41
|
+
layout: 'right'
|
|
42
|
+
},
|
|
43
|
+
text: 'Button Tag',
|
|
44
|
+
hover: null
|
|
45
|
+
}
|
|
57
46
|
};
|
|
58
47
|
};
|
|
59
48
|
|
|
49
|
+
exports.tagGroupSourceJSON = tagGroupSourceJSON;
|
|
50
|
+
|
|
60
51
|
var getDefaultJSON = function getDefaultJSON() {
|
|
61
52
|
return {
|
|
62
53
|
id: (0, _uuid.v4)(),
|
|
@@ -80,10 +71,9 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
80
71
|
pcImgHoverUrl: '',
|
|
81
72
|
h5ImgHoverUrl: ''
|
|
82
73
|
}
|
|
83
|
-
}
|
|
84
|
-
button: __assign({}, getDefaultMetaButtonJson()),
|
|
85
|
-
secondaryButton: __assign({}, getDefaultMetaButtonJson())
|
|
74
|
+
}
|
|
86
75
|
},
|
|
76
|
+
groupSource: [tagGroupSourceJSON()],
|
|
87
77
|
spacing: {
|
|
88
78
|
pc: {
|
|
89
79
|
paddingTop: 10,
|
|
@@ -81,15 +81,13 @@ function (_super) {
|
|
|
81
81
|
className: "tag-image"
|
|
82
82
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
83
83
|
data: nodeData.content.image
|
|
84
|
-
})), nodeData.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
data: nodeData.content.secondaryButton
|
|
92
|
-
})));
|
|
84
|
+
})), nodeData.groupSource.map(function (m) {
|
|
85
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "first-button"
|
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
88
|
+
data: m.button
|
|
89
|
+
}));
|
|
90
|
+
}));
|
|
93
91
|
};
|
|
94
92
|
|
|
95
93
|
Tag.defaultProps = {};
|
|
@@ -86,7 +86,7 @@ function (_super) {
|
|
|
86
86
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
87
87
|
data: nodeData.title.subtitle
|
|
88
88
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
|
-
className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.
|
|
89
|
+
className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.pcRowNum, (_a = {}, _a[window.magicDesign.device] = true, _a))
|
|
90
90
|
}, nodeData.groupSource.map(function (group) {
|
|
91
91
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
92
|
className: "group-wrap-container"
|
|
@@ -96,11 +96,11 @@ function (_super) {
|
|
|
96
96
|
style: {
|
|
97
97
|
textAlign: nodeData.customize.align
|
|
98
98
|
}
|
|
99
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
|
+
}, group.content.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
100
|
className: "group-title"
|
|
101
101
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
102
102
|
data: group.content.title
|
|
103
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
})), group.content.text.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
104
|
className: "group-content"
|
|
105
105
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
106
106
|
data: group.content.text
|
|
@@ -21,6 +21,8 @@ require("./index.less");
|
|
|
21
21
|
|
|
22
22
|
var _locale = require("../../../../../locale");
|
|
23
23
|
|
|
24
|
+
var _decorator = require("../../../../../decorator");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
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); }
|
|
@@ -120,7 +122,7 @@ function (_super) {
|
|
|
120
122
|
AComponent.defaultProps = {
|
|
121
123
|
source: []
|
|
122
124
|
};
|
|
123
|
-
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
125
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
124
126
|
return AComponent;
|
|
125
127
|
}(_react["default"].Component);
|
|
126
128
|
|
|
@@ -0,0 +1,141 @@
|
|
|
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 _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
13
|
+
|
|
14
|
+
var _defaultJSON = require("../../../components/Button/defaultJSON");
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
19
|
+
|
|
20
|
+
require("./index.less");
|
|
21
|
+
|
|
22
|
+
var _locale = require("../../../../../locale");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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 __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
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--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var notice = '';
|
|
65
|
+
|
|
66
|
+
var AComponent =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(AComponent, _super);
|
|
70
|
+
|
|
71
|
+
function AComponent() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {};
|
|
75
|
+
|
|
76
|
+
_this.onClickItem = function (node) {
|
|
77
|
+
_this.props.store.setState({
|
|
78
|
+
clickedGroup: node.id
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onAddClick = function () {
|
|
83
|
+
var json = (0, _defaultJSON.buttonGroupSourceJSON)();
|
|
84
|
+
|
|
85
|
+
_this.props.source.push(json);
|
|
86
|
+
|
|
87
|
+
_this.setState({});
|
|
88
|
+
|
|
89
|
+
(0, _coreUtil.renderPreview)();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.reRender = function () {
|
|
93
|
+
_this.setState({});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
_this.renderCard = function (src) {
|
|
97
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
98
|
+
className: "card_wrap"
|
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
className: "name"
|
|
101
|
+
}, "Button Name"));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
return _this;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
AComponent.prototype.render = function () {
|
|
108
|
+
var _this = this;
|
|
109
|
+
|
|
110
|
+
var source = this.props.source;
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "button_group"
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: "node_list"
|
|
115
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
116
|
+
className: "notice"
|
|
117
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
118
|
+
onClickItem: this.onClickItem,
|
|
119
|
+
renderCard: function renderCard(v) {
|
|
120
|
+
return _this.renderCard(v);
|
|
121
|
+
},
|
|
122
|
+
reRender: this.reRender,
|
|
123
|
+
source: source
|
|
124
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
|
+
className: "btn_wrap"
|
|
126
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
127
|
+
icon: "icon-add",
|
|
128
|
+
onClick: this.onAddClick,
|
|
129
|
+
type: "primary"
|
|
130
|
+
}, (0, _locale.i18n)('ADD_BUTTON'))));
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
AComponent.defaultProps = {
|
|
134
|
+
source: []
|
|
135
|
+
};
|
|
136
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
137
|
+
return AComponent;
|
|
138
|
+
}(_react["default"].Component);
|
|
139
|
+
|
|
140
|
+
var _default = AComponent;
|
|
141
|
+
exports["default"] = _default;
|
|
@@ -7,7 +7,7 @@ exports["default"] = ButtonConfig;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _ButtonConfigGroup = _interopRequireDefault(require("./ButtonConfigGroup"));
|
|
11
11
|
|
|
12
12
|
var _layout = _interopRequireDefault(require("./imgs/layout1.png"));
|
|
13
13
|
|
|
@@ -33,8 +33,8 @@ function ButtonConfig(props) {
|
|
|
33
33
|
source: [{
|
|
34
34
|
key: '1',
|
|
35
35
|
name: (0, _locale.i18n)('CONTENT'),
|
|
36
|
-
value: /*#__PURE__*/_react["default"].createElement(
|
|
37
|
-
|
|
36
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfigGroup["default"], {
|
|
37
|
+
source: data.groupSource
|
|
38
38
|
})
|
|
39
39
|
}, {
|
|
40
40
|
key: '2',
|
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _TagConfigGroup = _interopRequireDefault(require("../TagConfigGroup"));
|
|
11
11
|
|
|
12
12
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
13
13
|
|
|
@@ -65,7 +65,9 @@ function (_super) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
AComponent.prototype.render = function () {
|
|
68
|
-
var
|
|
68
|
+
var _a = this.props,
|
|
69
|
+
panelProps = _a.panelProps,
|
|
70
|
+
groupSource = _a.groupSource;
|
|
69
71
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
72
|
className: "recommend_content"
|
|
71
73
|
}, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
@@ -78,22 +80,10 @@ function (_super) {
|
|
|
78
80
|
data: panelProps.image
|
|
79
81
|
}),
|
|
80
82
|
metaOption: panelProps.image
|
|
81
|
-
}, {
|
|
82
|
-
key: '2',
|
|
83
|
-
name: (0, _locale.i18n)('BUTTON_TAG'),
|
|
84
|
-
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
85
|
-
data: panelProps.button
|
|
86
|
-
}),
|
|
87
|
-
metaOption: panelProps.button
|
|
88
|
-
}, {
|
|
89
|
-
key: '3',
|
|
90
|
-
name: (0, _locale.i18n)('SECONDARY_BUTTON_TAG'),
|
|
91
|
-
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
92
|
-
data: panelProps.secondaryButton
|
|
93
|
-
}),
|
|
94
|
-
metaOption: panelProps.secondaryButton
|
|
95
83
|
}],
|
|
96
84
|
type: "switch"
|
|
85
|
+
}), /*#__PURE__*/_react["default"].createElement(_TagConfigGroup["default"], {
|
|
86
|
+
source: groupSource
|
|
97
87
|
}));
|
|
98
88
|
};
|
|
99
89
|
|
|
@@ -0,0 +1,141 @@
|
|
|
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 _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
13
|
+
|
|
14
|
+
var _defaultJSON = require("../../../components/Tag/defaultJSON");
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
19
|
+
|
|
20
|
+
require("./index.less");
|
|
21
|
+
|
|
22
|
+
var _locale = require("../../../../../locale");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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 __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
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--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var notice = '';
|
|
65
|
+
|
|
66
|
+
var AComponent =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(AComponent, _super);
|
|
70
|
+
|
|
71
|
+
function AComponent() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {};
|
|
75
|
+
|
|
76
|
+
_this.onClickItem = function (node) {
|
|
77
|
+
_this.props.store.setState({
|
|
78
|
+
clickedGroup: node.id
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onAddClick = function () {
|
|
83
|
+
var json = (0, _defaultJSON.tagGroupSourceJSON)();
|
|
84
|
+
|
|
85
|
+
_this.props.source.push(json);
|
|
86
|
+
|
|
87
|
+
_this.setState({});
|
|
88
|
+
|
|
89
|
+
(0, _coreUtil.renderPreview)();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.reRender = function () {
|
|
93
|
+
_this.setState({});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
_this.renderCard = function (src) {
|
|
97
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
98
|
+
className: "card_wrap"
|
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
className: "name"
|
|
101
|
+
}, "Button Tag"));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
return _this;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
AComponent.prototype.render = function () {
|
|
108
|
+
var _this = this;
|
|
109
|
+
|
|
110
|
+
var source = this.props.source;
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "tag_group"
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: "node_list"
|
|
115
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
116
|
+
className: "notice"
|
|
117
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
118
|
+
onClickItem: this.onClickItem,
|
|
119
|
+
renderCard: function renderCard(v) {
|
|
120
|
+
return _this.renderCard(v);
|
|
121
|
+
},
|
|
122
|
+
reRender: this.reRender,
|
|
123
|
+
source: source
|
|
124
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
|
+
className: "btn_wrap"
|
|
126
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
127
|
+
icon: "icon-add",
|
|
128
|
+
onClick: this.onAddClick,
|
|
129
|
+
type: "primary"
|
|
130
|
+
}, (0, _locale.i18n)('ADD_TAG'))));
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
AComponent.defaultProps = {
|
|
134
|
+
source: []
|
|
135
|
+
};
|
|
136
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
137
|
+
return AComponent;
|
|
138
|
+
}(_react["default"].Component);
|
|
139
|
+
|
|
140
|
+
var _default = AComponent;
|
|
141
|
+
exports["default"] = _default;
|
|
@@ -17,6 +17,8 @@ var _coreUtil = require("../../../../../utils/coreUtil");
|
|
|
17
17
|
|
|
18
18
|
var _defaultJSON = require("../../../components/Text/defaultJSON");
|
|
19
19
|
|
|
20
|
+
var _decorator = require("../../../../../decorator");
|
|
21
|
+
|
|
20
22
|
require("./index.less");
|
|
21
23
|
|
|
22
24
|
var _locale = require("../../../../../locale");
|
|
@@ -132,7 +134,7 @@ function (_super) {
|
|
|
132
134
|
default_1.defaultProps = {
|
|
133
135
|
source: []
|
|
134
136
|
};
|
|
135
|
-
default_1 = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], default_1);
|
|
137
|
+
default_1 = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], default_1);
|
|
136
138
|
return default_1;
|
|
137
139
|
}(_react["default"].Component);
|
|
138
140
|
|
|
@@ -7,8 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _coreUtil = require("../../../../utils/coreUtil");
|
|
11
|
-
|
|
12
10
|
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
13
11
|
|
|
14
12
|
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
@@ -102,10 +100,8 @@ function (_super) {
|
|
|
102
100
|
metaOption: panelProps.secondButton
|
|
103
101
|
}];
|
|
104
102
|
return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
105
|
-
headerSize: "middle"
|
|
106
|
-
|
|
107
|
-
return (0, _coreUtil.renderPreview)();
|
|
108
|
-
},
|
|
103
|
+
headerSize: "middle" // onRefresh={() => renderPreview()}
|
|
104
|
+
,
|
|
109
105
|
showActiveColor: true,
|
|
110
106
|
source: source,
|
|
111
107
|
type: "switch"
|