@fonixtree/magic-design 1.0.218 → 1.0.220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/assets/images/layout-icon/banner-layout1.png +0 -0
- package/es/assets/images/layout-icon/banner-layout2.svg +6 -0
- package/es/assets/images/layout-icon/center.png +0 -0
- package/es/assets/images/layout-icon/grouped-image-layout1.png +0 -0
- package/es/assets/images/layout-icon/left.png +0 -0
- package/es/assets/images/layout-icon/right.png +0 -0
- package/es/common/LinkModal/SelectPicture/imgs/picture-bg.png +0 -0
- package/es/common/LinkModal/SelectPicture/index.js +135 -0
- package/es/common/LinkModal/SelectPicture/index.less +88 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/common/PictureModal/index.js +37 -0
- package/es/common/PictureModal/index.less +41 -0
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +28 -0
- package/es/composite-comp/bol/components/Banner/pc/components/BannerContent.js +82 -0
- package/es/composite-comp/bol/components/Banner/pc/components/SwiperBannerPc.js +270 -0
- package/es/composite-comp/bol/components/Banner/pc/index.js +43 -14
- package/es/composite-comp/bol/components/Banner/pc/index.less +81 -9
- package/es/composite-comp/bol/config-panels/BannerConfig/index.js +26 -0
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +17 -1
- package/es/composite-comp/dito/components/GroupedImage/defaultJSON.js +149 -0
- package/es/composite-comp/dito/components/GroupedImage/index.js +88 -0
- package/es/composite-comp/dito/components/GroupedImage/pc/index.js +417 -0
- package/es/composite-comp/dito/components/GroupedImage/pc/index.less +124 -0
- package/es/composite-comp/dito/components/Recommend/pc/index.js +2 -2
- package/es/composite-comp/dito/components/Recommend/pc/index.less +3 -1
- package/es/composite-comp/dito/config-panels/GroupedImageConfig/ConfigGroup/index.js +146 -0
- package/es/composite-comp/dito/config-panels/GroupedImageConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/GroupedImageConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/GroupedImageSecondConfig/index.js +290 -0
- package/es/composite-comp/dito/second-config-panels/GroupedImageSecondConfig/index.less +21 -0
- package/es/constants/component-types.js +9 -3
- package/es/constants/index.js +6 -1
- package/es/constants/layout.js +30 -2
- package/es/core/Designer/ConfigPanel/index.js +217 -4
- package/es/core/Designer/ConfigPanel/index.less +39 -0
- package/es/core/Renderer/index.js +25 -4
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/id/id.json +1 -0
- package/es/meta-comp/components/Image/index.js +15 -11
- package/es/meta-comp/config-panels/ImageConfig/index.js +25 -8
- package/es/mobx/Frame.js +5 -0
- package/es/mobx/Store.js +4 -1
- package/es/utils/businessUtil.js +11 -0
- package/es/utils/coreUtil.js +23 -4
- package/es/utils/dataUtil.js +14 -0
- package/lib/assets/images/layout-icon/banner-layout1.png +0 -0
- package/lib/assets/images/layout-icon/banner-layout2.svg +6 -0
- package/lib/assets/images/layout-icon/center.png +0 -0
- package/lib/assets/images/layout-icon/grouped-image-layout1.png +0 -0
- package/lib/assets/images/layout-icon/left.png +0 -0
- package/lib/assets/images/layout-icon/right.png +0 -0
- package/lib/common/LinkModal/SelectPicture/imgs/picture-bg.png +0 -0
- package/lib/common/LinkModal/SelectPicture/index.js +135 -0
- package/lib/common/LinkModal/SelectPicture/index.less +88 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/common/PictureModal/index.js +37 -0
- package/lib/common/PictureModal/index.less +41 -0
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +28 -0
- package/lib/composite-comp/bol/components/Banner/pc/components/BannerContent.js +82 -0
- package/lib/composite-comp/bol/components/Banner/pc/components/SwiperBannerPc.js +270 -0
- package/lib/composite-comp/bol/components/Banner/pc/index.js +43 -14
- package/lib/composite-comp/bol/components/Banner/pc/index.less +81 -9
- package/lib/composite-comp/bol/config-panels/BannerConfig/index.js +26 -0
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +17 -1
- package/lib/composite-comp/dito/components/GroupedImage/defaultJSON.js +149 -0
- package/lib/composite-comp/dito/components/GroupedImage/index.js +88 -0
- package/lib/composite-comp/dito/components/GroupedImage/pc/index.js +417 -0
- package/lib/composite-comp/dito/components/GroupedImage/pc/index.less +124 -0
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +2 -2
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +3 -1
- package/lib/composite-comp/dito/config-panels/GroupedImageConfig/ConfigGroup/index.js +146 -0
- package/lib/composite-comp/dito/config-panels/GroupedImageConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/GroupedImageConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/GroupedImageSecondConfig/index.js +290 -0
- package/lib/composite-comp/dito/second-config-panels/GroupedImageSecondConfig/index.less +21 -0
- package/lib/constants/component-types.js +9 -3
- package/lib/constants/index.js +6 -1
- package/lib/constants/layout.js +30 -2
- package/lib/core/Designer/ConfigPanel/index.js +217 -4
- package/lib/core/Designer/ConfigPanel/index.less +39 -0
- package/lib/core/Renderer/index.js +25 -4
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/id/id.json +1 -0
- package/lib/meta-comp/components/Image/index.js +15 -11
- package/lib/meta-comp/config-panels/ImageConfig/index.js +25 -8
- package/lib/mobx/Frame.js +5 -0
- package/lib/mobx/Store.js +4 -1
- package/lib/utils/businessUtil.js +11 -0
- package/lib/utils/coreUtil.js +23 -4
- package/lib/utils/dataUtil.js +14 -0
- package/package.json +3 -2
- package/es/utils/pluginsUtil.js +0 -1
- package/lib/utils/pluginsUtil.js +0 -1
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="94" height="66" viewBox="0 0 94 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="6" y="17" width="6" height="32" rx="2" fill="#D2D9E5"/>
|
|
3
|
+
<rect x="15" y="17" width="6" height="32" rx="2" fill="#D2D9E5"/>
|
|
4
|
+
<rect x="81" y="17" width="6" height="32" rx="2" fill="#D2D9E5"/>
|
|
5
|
+
<rect x="24" y="17" width="54" height="32" rx="2" fill="#D2D9E5"/>
|
|
6
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,135 @@
|
|
|
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"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _ImageModal = _interopRequireDefault(require("../../../common/ImageModal"));
|
|
13
|
+
|
|
14
|
+
var _pictureBg = _interopRequireDefault(require("./imgs/picture-bg.png"));
|
|
15
|
+
|
|
16
|
+
var _Iconfont = _interopRequireDefault(require("../../Iconfont"));
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../../locale");
|
|
19
|
+
|
|
20
|
+
require("./index.less");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
29
|
+
__assign = Object.assign || function (t) {
|
|
30
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31
|
+
s = arguments[i];
|
|
32
|
+
|
|
33
|
+
for (var p in s) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return __assign.apply(this, arguments);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var SelectPicture = function SelectPicture(props) {
|
|
45
|
+
var onChange = props.onChange;
|
|
46
|
+
|
|
47
|
+
var _a = (0, _react.useState)(false),
|
|
48
|
+
visible = _a[0],
|
|
49
|
+
setVisible = _a[1];
|
|
50
|
+
|
|
51
|
+
var _b = (0, _react.useState)(null),
|
|
52
|
+
imgUrl = _b[0],
|
|
53
|
+
setImgUrl = _b[1];
|
|
54
|
+
|
|
55
|
+
var onModalOk = function onModalOk(data) {
|
|
56
|
+
setVisible(false);
|
|
57
|
+
|
|
58
|
+
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
59
|
+
var url = data[0].url;
|
|
60
|
+
setImgUrl(url);
|
|
61
|
+
onChange(__assign(__assign({}, data[0]), {
|
|
62
|
+
name: data[0].contentTitle
|
|
63
|
+
}));
|
|
64
|
+
} else {
|
|
65
|
+
var url = null;
|
|
66
|
+
setImgUrl(url);
|
|
67
|
+
onChange(url);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var handleDelete = function handleDelete(e) {
|
|
72
|
+
e.stopPropagation();
|
|
73
|
+
setImgUrl(null);
|
|
74
|
+
onChange(null);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var handleEdit = function handleEdit(e) {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
setVisible(true);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
(0, _react.useEffect)(function () {}, []);
|
|
83
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: "mSelectPicture"
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement("p", null, "Pop-up picture"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "picture-wrap"
|
|
87
|
+
}, !imgUrl && /*#__PURE__*/_react["default"].createElement("img", {
|
|
88
|
+
className: "empty-img",
|
|
89
|
+
src: _pictureBg["default"],
|
|
90
|
+
alt: "upload",
|
|
91
|
+
onClick: function onClick() {
|
|
92
|
+
return setVisible(true);
|
|
93
|
+
}
|
|
94
|
+
}), visible && /*#__PURE__*/_react["default"].createElement(_ImageModal["default"], {
|
|
95
|
+
onCancel: function onCancel() {
|
|
96
|
+
setVisible(false);
|
|
97
|
+
},
|
|
98
|
+
onOk: onModalOk,
|
|
99
|
+
visible: true
|
|
100
|
+
}), imgUrl && /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
|
+
className: "img-wrap"
|
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
103
|
+
src: imgUrl,
|
|
104
|
+
alt: ""
|
|
105
|
+
}), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
106
|
+
className: "closeIcon",
|
|
107
|
+
color: "#929292",
|
|
108
|
+
size: 20,
|
|
109
|
+
type: "icon-close"
|
|
110
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
|
+
className: "btn-icons-modal",
|
|
112
|
+
onClick: function onClick(e) {
|
|
113
|
+
return e.stopPropagation();
|
|
114
|
+
}
|
|
115
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
+
className: "btn-edit",
|
|
117
|
+
onClick: handleEdit
|
|
118
|
+
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
119
|
+
color: "#fff",
|
|
120
|
+
size: 25,
|
|
121
|
+
type: "icon-edit"
|
|
122
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('EDIT'))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
123
|
+
className: "line"
|
|
124
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
|
+
className: "btn-del",
|
|
126
|
+
onClick: handleDelete
|
|
127
|
+
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
128
|
+
color: "#fff",
|
|
129
|
+
size: 25,
|
|
130
|
+
type: "icon-delete1"
|
|
131
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('DELETE')))))));
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
var _default = SelectPicture;
|
|
135
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.mSelectPicture {
|
|
2
|
+
height: 500px;
|
|
3
|
+
|
|
4
|
+
.picture-wrap {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
|
|
7
|
+
.empty-img {
|
|
8
|
+
width: 489px;
|
|
9
|
+
height: 288px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.img-wrap {
|
|
13
|
+
position: relative;
|
|
14
|
+
width: fit-content;
|
|
15
|
+
height: fit-content;
|
|
16
|
+
|
|
17
|
+
img {
|
|
18
|
+
max-width: 489px;
|
|
19
|
+
max-height: 288px;
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
.btn-icons-modal {
|
|
25
|
+
display: flex;
|
|
26
|
+
transition: all .25s;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.btn-icons-modal {
|
|
31
|
+
display: none;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
font-family: 'Open Sans';
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
line-height: 24px;
|
|
42
|
+
color: #FFFFFF;
|
|
43
|
+
background: rgba(35, 47, 70, 0.6);
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
border-radius: 8px;
|
|
47
|
+
|
|
48
|
+
.btn-edit {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
margin-right: 20px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
|
|
54
|
+
>span {
|
|
55
|
+
margin-left: 5px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.btn-del {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
margin-left: 20px;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
|
|
65
|
+
>span {
|
|
66
|
+
margin-left: 5px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.line {
|
|
71
|
+
display: inline-block;
|
|
72
|
+
width: 1px;
|
|
73
|
+
height: 16px;
|
|
74
|
+
background: rgba(255, 255, 255, 0.5);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.closeIcon {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 16px;
|
|
82
|
+
right: 16px;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
z-index: 3;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -39,6 +39,8 @@ var _AffiliateProductTable = _interopRequireDefault(require("./AffiliateProductT
|
|
|
39
39
|
|
|
40
40
|
var _ProductList = _interopRequireDefault(require("./ProductList"));
|
|
41
41
|
|
|
42
|
+
var _SelectPicture = _interopRequireDefault(require("./SelectPicture"));
|
|
43
|
+
|
|
42
44
|
var _locale = require("../../locale");
|
|
43
45
|
|
|
44
46
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -366,6 +368,10 @@ var LinkModal = function LinkModal(props) {
|
|
|
366
368
|
setLinkUrl(url);
|
|
367
369
|
setTotal(t);
|
|
368
370
|
}
|
|
371
|
+
}), item.linkTypeCode === 'ImageLibrary' && /*#__PURE__*/_react["default"].createElement(_SelectPicture["default"], {
|
|
372
|
+
onChange: function onChange(value) {
|
|
373
|
+
return setLinkUrl(value);
|
|
374
|
+
}
|
|
369
375
|
}));
|
|
370
376
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
371
377
|
className: "footer"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = PictureModal;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
function PictureModal(_a) {
|
|
17
|
+
var _b = _a.url,
|
|
18
|
+
url = _b === void 0 ? '' : _b,
|
|
19
|
+
onClose = _a.onClose;
|
|
20
|
+
if (!url) return null;
|
|
21
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
|
+
className: "pictureModalWrap"
|
|
23
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: "content"
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
26
|
+
alt: "",
|
|
27
|
+
className: "pictureImg",
|
|
28
|
+
src: url,
|
|
29
|
+
draggable: false
|
|
30
|
+
}), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
31
|
+
className: "closeIcon",
|
|
32
|
+
color: "#929292",
|
|
33
|
+
onClick: onClose,
|
|
34
|
+
size: 20,
|
|
35
|
+
type: "icon-close"
|
|
36
|
+
})));
|
|
37
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.pictureModalWrap {
|
|
2
|
+
background: rgba(0, 0, 0, 0.3);
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 1000;
|
|
5
|
+
top: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
width: 100vw;
|
|
10
|
+
height: 100vh;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
|
|
15
|
+
.content {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
border-radius: 16px;
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
|
|
24
|
+
.pictureImg {
|
|
25
|
+
max-width: 60vw;
|
|
26
|
+
max-height: 90vh;
|
|
27
|
+
object-fit: contain;
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.closeIcon {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 16px;
|
|
34
|
+
right: 16px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
z-index: 3;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -31,6 +31,28 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
|
|
|
31
31
|
h5ImgHoverUrl: ''
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
+
name: {
|
|
35
|
+
parentId: groupId,
|
|
36
|
+
id: (0, _uuid.v4)(),
|
|
37
|
+
open: true,
|
|
38
|
+
type: 'TEXT',
|
|
39
|
+
text: 'Text',
|
|
40
|
+
specialContent: [],
|
|
41
|
+
content: {
|
|
42
|
+
sizeType: 'Customize font styles',
|
|
43
|
+
fontFamily: 'Open Sans',
|
|
44
|
+
fontWeight: 700,
|
|
45
|
+
fontSize: 28,
|
|
46
|
+
color: '#FFFFFF',
|
|
47
|
+
width: 319
|
|
48
|
+
},
|
|
49
|
+
underline: {
|
|
50
|
+
open: false,
|
|
51
|
+
textDecorationColor: '',
|
|
52
|
+
textDecorationStyle: 'solid'
|
|
53
|
+
},
|
|
54
|
+
vertical: {}
|
|
55
|
+
},
|
|
34
56
|
title: {
|
|
35
57
|
parentId: groupId,
|
|
36
58
|
id: (0, _uuid.v4)(),
|
|
@@ -269,6 +291,12 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
269
291
|
paddingBottom: 0,
|
|
270
292
|
marginBottom: window.magicDesign.compSpacing
|
|
271
293
|
}
|
|
294
|
+
},
|
|
295
|
+
customize: {
|
|
296
|
+
layout: {
|
|
297
|
+
pcLayout: 'layout1',
|
|
298
|
+
h5Layout: 'layout1'
|
|
299
|
+
}
|
|
272
300
|
}
|
|
273
301
|
};
|
|
274
302
|
};
|
|
@@ -0,0 +1,82 @@
|
|
|
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 _components = require("../../../../../../meta-comp/components");
|
|
11
|
+
|
|
12
|
+
var _AlignSelector = require("../../../../../../common/AlignSelector");
|
|
13
|
+
|
|
14
|
+
var _ConfigPanel = require("../../../../../../core/Designer/ConfigPanel");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
19
|
+
__assign = Object.assign || function (t) {
|
|
20
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
+
s = arguments[i];
|
|
22
|
+
|
|
23
|
+
for (var p in s) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var BannerContent = function BannerContent(_a) {
|
|
35
|
+
var _b, _c;
|
|
36
|
+
|
|
37
|
+
var item = _a.item,
|
|
38
|
+
data = _a.data,
|
|
39
|
+
GAData = _a.GAData,
|
|
40
|
+
contentStyle = _a.contentStyle;
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: "carouseContent",
|
|
43
|
+
style: contentStyle
|
|
44
|
+
}, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
45
|
+
className: "title",
|
|
46
|
+
data: item.title,
|
|
47
|
+
GAData: __assign(__assign({}, GAData), {
|
|
48
|
+
groupId: item.id,
|
|
49
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
50
|
+
})
|
|
51
|
+
}), item.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
52
|
+
className: "sub-title",
|
|
53
|
+
data: item.text,
|
|
54
|
+
GAData: __assign(__assign({}, GAData), {
|
|
55
|
+
groupId: item.id,
|
|
56
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
57
|
+
})
|
|
58
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
|
+
className: "btn-wrap",
|
|
60
|
+
style: {
|
|
61
|
+
justifyContent: _AlignSelector.alignItemMap[item.customize.align],
|
|
62
|
+
width: Math.max((_b = item.title.content) === null || _b === void 0 ? void 0 : _b.pcWidth, (_c = item.text.content) === null || _c === void 0 ? void 0 : _c.pcWidth) + "%"
|
|
63
|
+
}
|
|
64
|
+
}, item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
65
|
+
className: "btn",
|
|
66
|
+
data: item.button,
|
|
67
|
+
GAData: __assign(__assign({}, GAData), {
|
|
68
|
+
groupId: item.id,
|
|
69
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
70
|
+
})
|
|
71
|
+
}), item.secondButton.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
72
|
+
className: "btn",
|
|
73
|
+
data: item.secondButton,
|
|
74
|
+
GAData: __assign(__assign({}, GAData), {
|
|
75
|
+
groupId: item.id,
|
|
76
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
77
|
+
})
|
|
78
|
+
})));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var _default = BannerContent;
|
|
82
|
+
exports["default"] = _default;
|