@fonixtree/magic-design 0.0.98 → 0.0.100
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/imageGalleryLayout1.png +0 -0
- package/es/common/LinkModal/FilteredProductModal/index.js +21 -18
- package/es/composite-comp/bol/components/Banner/mobile/index.js +11 -18
- package/es/composite-comp/bol/components/Banner/pc/index.js +10 -10
- package/es/composite-comp/bol/components/Carousel/defaultJSON.js +4 -4
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +2 -5
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +8 -7
- package/es/composite-comp/bol/components/Carousel/pc/index.js +1 -4
- package/es/composite-comp/bol/components/Carousel/pc/index.less +8 -7
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +4 -4
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +3 -3
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +0 -3
- package/es/composite-comp/bol/components/ImageGallery/pc/index.js +6 -4
- package/es/composite-comp/bol/components/ImageGallery/pc/index.less +0 -3
- package/es/composite-comp/bol/components/ImageText/pc/index.less +2 -0
- package/es/composite-comp/bol/components/Newsletter/index.js +15 -2
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +14 -1
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +0 -2
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +5 -4
- package/es/composite-comp/dito/components/SearchBar/imgs/xt-logo.png +0 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +2 -1
- package/es/core/Designer/AppointmentModal/index.js +4 -1
- package/es/core/Designer/PageCompList/index.js +29 -1
- package/es/core/Designer/QuickMenuBar/index.js +3 -1
- package/es/core/Designer/ViewArea/index.js +3 -4
- package/es/core/Designer/ViewArea/index.less +3 -7
- package/es/core/Designer/index.js +1 -1
- package/es/core/Renderer/index.js +5 -3
- package/es/decorator/compositeDecorator.js +131 -38
- package/es/decorator/metaDecorator.js +1 -1
- package/es/mobx/Store.js +4 -1
- package/lib/assets/images/layout-icon/imageGalleryLayout1.png +0 -0
- package/lib/common/LinkModal/FilteredProductModal/index.js +21 -18
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +11 -18
- package/lib/composite-comp/bol/components/Banner/pc/index.js +10 -10
- package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +4 -4
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +2 -5
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +8 -7
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +1 -4
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +8 -7
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +4 -4
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +3 -3
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +0 -3
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +6 -4
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.less +0 -3
- package/lib/composite-comp/bol/components/ImageText/pc/index.less +2 -0
- package/lib/composite-comp/bol/components/Newsletter/index.js +15 -2
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +14 -1
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +0 -2
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +5 -4
- package/lib/composite-comp/dito/components/SearchBar/imgs/xt-logo.png +0 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +2 -1
- package/lib/core/Designer/AppointmentModal/index.js +4 -1
- package/lib/core/Designer/PageCompList/index.js +29 -1
- package/lib/core/Designer/QuickMenuBar/index.js +3 -1
- package/lib/core/Designer/ViewArea/index.js +3 -4
- package/lib/core/Designer/ViewArea/index.less +3 -7
- package/lib/core/Designer/index.js +1 -1
- package/lib/core/Renderer/index.js +5 -3
- package/lib/decorator/compositeDecorator.js +131 -38
- package/lib/decorator/metaDecorator.js +1 -1
- package/lib/mobx/Store.js +4 -1
- package/package.json +1 -1
|
Binary file
|
|
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
217
217
|
storeName = _g[0],
|
|
218
218
|
setStoreName = _g[1];
|
|
219
219
|
|
|
220
|
-
var _h = (0, _react.useState)(
|
|
220
|
+
var _h = (0, _react.useState)(''),
|
|
221
221
|
storeId = _h[0],
|
|
222
222
|
setStoreId = _h[1];
|
|
223
223
|
|
|
@@ -293,27 +293,29 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
293
293
|
|
|
294
294
|
var columns = [{
|
|
295
295
|
title: 'Image',
|
|
296
|
-
dataIndex: '
|
|
297
|
-
key: '
|
|
298
|
-
|
|
296
|
+
dataIndex: 'imgUrl',
|
|
297
|
+
key: 'imgUrl',
|
|
298
|
+
width: 100,
|
|
299
|
+
render: function render(imgUrl, record) {
|
|
299
300
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
301
|
className: "prodImage",
|
|
301
302
|
style: {
|
|
302
|
-
backgroundImage: "url(" +
|
|
303
|
+
backgroundImage: "url(\"" + (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent) + "\")"
|
|
303
304
|
}
|
|
304
305
|
});
|
|
305
306
|
}
|
|
306
307
|
}, {
|
|
307
|
-
title: '
|
|
308
|
-
dataIndex: '
|
|
309
|
-
key: '
|
|
308
|
+
title: 'Offer Name',
|
|
309
|
+
dataIndex: 'offerName',
|
|
310
|
+
key: 'offerName',
|
|
310
311
|
ellipsis: true
|
|
311
|
-
}, {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
},
|
|
312
|
+
}, // {
|
|
313
|
+
// title: 'SKU',
|
|
314
|
+
// dataIndex: 'attrValues',
|
|
315
|
+
// key: 'attrValues',
|
|
316
|
+
// ellipsis: true,
|
|
317
|
+
// },
|
|
318
|
+
{
|
|
317
319
|
title: 'Price',
|
|
318
320
|
dataIndex: 'salesPrice',
|
|
319
321
|
key: 'salesPrice',
|
|
@@ -453,8 +455,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
453
455
|
return v.key;
|
|
454
456
|
}).join(','),
|
|
455
457
|
labelIds: labelId.key,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
+
q: productName,
|
|
459
|
+
// productName,
|
|
458
460
|
storeId: storeId,
|
|
459
461
|
minPrice: minimum * precision || '',
|
|
460
462
|
maxPrice: maximum * precision || '',
|
|
@@ -466,10 +468,11 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
466
468
|
};
|
|
467
469
|
return [4
|
|
468
470
|
/*yield*/
|
|
469
|
-
, (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/
|
|
471
|
+
, (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
|
|
470
472
|
|
|
471
473
|
case 1:
|
|
472
|
-
res = _a.sent();
|
|
474
|
+
res = _a.sent(); // const res = await commonFetch(`${window.magicDesign.MBaseUrl}/products`, params, 'GET');
|
|
475
|
+
|
|
473
476
|
setLoading(false);
|
|
474
477
|
paginationParams.total = res.total;
|
|
475
478
|
|
|
@@ -19,8 +19,6 @@ var _coreUtil = require("../../../../../utils/coreUtil");
|
|
|
19
19
|
|
|
20
20
|
var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
21
21
|
|
|
22
|
-
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
23
|
-
|
|
24
22
|
var _components = require("../../../../../meta-comp/components");
|
|
25
23
|
|
|
26
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -90,18 +88,18 @@ function (_super) {
|
|
|
90
88
|
if (nextIndex != -1 && nextIndex != _this.state.carouseIndex) {
|
|
91
89
|
_this.carouselRef.current.goTo(nextIndex);
|
|
92
90
|
}
|
|
93
|
-
};
|
|
91
|
+
}; // padding用统一设置
|
|
94
92
|
|
|
95
|
-
_this.getPaddingAndBackground = function (item) {
|
|
96
|
-
var spacing = _this.props.data.spacing; // const { spacing, background } = data;
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
_this.getBackgroundStyle = function (item) {
|
|
95
|
+
// const { data: { spacing } } = this.props;
|
|
96
|
+
// const { spacing, background } = data;
|
|
97
|
+
// const { device } = window.magicDesign;
|
|
99
98
|
var wrapStyle = {}; // 边距
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
// if (spacing && spacing[device]) {
|
|
100
|
+
// wrapStyle = { ...wrapStyle, ...spacing[device] };
|
|
101
|
+
// }
|
|
102
|
+
// 背景
|
|
105
103
|
|
|
106
104
|
if (item.background) {
|
|
107
105
|
if (item.background.bgType === 'color') {
|
|
@@ -171,12 +169,7 @@ function (_super) {
|
|
|
171
169
|
}
|
|
172
170
|
|
|
173
171
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
|
-
className: "m-banner-mobile"
|
|
175
|
-
style: {
|
|
176
|
-
marginBottom: (0, _commonUtil.ensure)(function () {
|
|
177
|
-
return data.spacing.mobile.marginBottom;
|
|
178
|
-
}, 0)
|
|
179
|
-
}
|
|
172
|
+
className: "m-banner-mobile"
|
|
180
173
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
|
|
181
174
|
ref: this.carouselRef,
|
|
182
175
|
afterChange: function afterChange(n) {
|
|
@@ -191,7 +184,7 @@ function (_super) {
|
|
|
191
184
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
185
|
key: item.id
|
|
193
186
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
|
-
style: _this.
|
|
187
|
+
style: _this.getBackgroundStyle(item)
|
|
195
188
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
189
|
className: "carouselItem",
|
|
197
190
|
onMouseEnter: _this.mouseEnterWrap,
|
|
@@ -132,18 +132,18 @@ function (_super) {
|
|
|
132
132
|
if ((_b = data.setting.navigation) === null || _b === void 0 ? void 0 : _b.size) {
|
|
133
133
|
e.target.style.fontSize = data.setting.navigation.size;
|
|
134
134
|
}
|
|
135
|
-
};
|
|
135
|
+
}; // padding用统一设置
|
|
136
136
|
|
|
137
|
-
_this.getPaddingAndBackground = function (item) {
|
|
138
|
-
var spacing = _this.props.data.spacing; // const { spacing, background } = data;
|
|
139
137
|
|
|
140
|
-
|
|
138
|
+
_this.getBackgroundStyle = function (item) {
|
|
139
|
+
// const { data: { spacing } } = this.props;
|
|
140
|
+
// const { spacing, background } = data;
|
|
141
|
+
// const { device } = window.magicDesign;
|
|
141
142
|
var wrapStyle = {}; // 边距
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
// if (spacing && spacing[device]) {
|
|
144
|
+
// wrapStyle = { ...wrapStyle, ...spacing[device] };
|
|
145
|
+
// }
|
|
146
|
+
// 背景
|
|
147
147
|
|
|
148
148
|
if (item.background) {
|
|
149
149
|
if (item.background.bgType === 'color') {
|
|
@@ -229,7 +229,7 @@ function (_super) {
|
|
|
229
229
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
230
|
key: item.id
|
|
231
231
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
|
-
style: _this.
|
|
232
|
+
style: _this.getBackgroundStyle(item)
|
|
233
233
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
234
|
className: "carouselItem",
|
|
235
235
|
onMouseEnter: _this.mouseEnterWrap,
|
|
@@ -260,13 +260,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
260
260
|
},
|
|
261
261
|
spacing: {
|
|
262
262
|
pc: {
|
|
263
|
-
paddingTop:
|
|
264
|
-
paddingBottom:
|
|
263
|
+
paddingTop: 0,
|
|
264
|
+
paddingBottom: 0,
|
|
265
265
|
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
266
266
|
},
|
|
267
267
|
mobile: {
|
|
268
|
-
paddingTop:
|
|
269
|
-
paddingBottom:
|
|
268
|
+
paddingTop: 0,
|
|
269
|
+
paddingBottom: 0,
|
|
270
270
|
marginBottom: window.magicDesign.compSpacing
|
|
271
271
|
}
|
|
272
272
|
},
|
|
@@ -210,9 +210,7 @@ function (_super) {
|
|
|
210
210
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
211
211
|
className: "m-carousel-mobile"
|
|
212
212
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
213
|
-
className:
|
|
214
|
-
isHorizontal: colNum === 1
|
|
215
|
-
}),
|
|
213
|
+
className: "content",
|
|
216
214
|
style: {
|
|
217
215
|
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '20px' : '0'
|
|
218
216
|
}
|
|
@@ -228,8 +226,7 @@ function (_super) {
|
|
|
228
226
|
className: "img"
|
|
229
227
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
230
228
|
data: item.image,
|
|
231
|
-
maxHeight: MOBILE_IMG_SIZE[colNum - 1].maxH
|
|
232
|
-
maxWidth: MOBILE_IMG_SIZE[colNum - 1].maxW
|
|
229
|
+
maxHeight: MOBILE_IMG_SIZE[colNum - 1].maxH
|
|
233
230
|
})), showText && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
231
|
className: "title"
|
|
235
232
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
.content {
|
|
6
6
|
display: flex;
|
|
7
7
|
margin: 0 auto;
|
|
8
|
-
|
|
9
|
-
&.isHorizontal {
|
|
10
|
-
.slick-track {
|
|
11
|
-
gap: 0;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
8
|
}
|
|
15
9
|
|
|
16
10
|
.slider-wrap {
|
|
@@ -21,7 +15,14 @@
|
|
|
21
15
|
.slick-track {
|
|
22
16
|
display: flex;
|
|
23
17
|
align-items: center;
|
|
24
|
-
|
|
18
|
+
|
|
19
|
+
.slick-slide {
|
|
20
|
+
margin-right: 12px;
|
|
21
|
+
|
|
22
|
+
&:last-child {
|
|
23
|
+
margin-right: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.img-wrap {
|
|
@@ -207,9 +207,7 @@ function (_super) {
|
|
|
207
207
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
208
|
className: "m-carousel-pc"
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
|
-
className:
|
|
211
|
-
isHorizontal: colNum === 1
|
|
212
|
-
}),
|
|
210
|
+
className: "content",
|
|
213
211
|
style: {
|
|
214
212
|
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '30px' : '0'
|
|
215
213
|
}
|
|
@@ -235,7 +233,6 @@ function (_super) {
|
|
|
235
233
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
236
234
|
data: item.image,
|
|
237
235
|
maxHeight: PC_IMG_SIZE[colNum - 1].maxH,
|
|
238
|
-
maxWidth: PC_IMG_SIZE[colNum - 1].maxW,
|
|
239
236
|
minHeight: PC_IMG_SIZE[colNum - 1].minH,
|
|
240
237
|
minWidth: PC_IMG_SIZE[colNum - 1].minW
|
|
241
238
|
})), showText && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && !((0, _coreUtil.isPc)() && item.title.pcText === '') && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
.content {
|
|
6
6
|
display: flex;
|
|
7
7
|
margin: 0 auto;
|
|
8
|
-
|
|
9
|
-
&.isHorizontal {
|
|
10
|
-
.slick-track {
|
|
11
|
-
gap: 0;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
8
|
}
|
|
15
9
|
|
|
16
10
|
.carousel-icon-left {
|
|
@@ -31,7 +25,14 @@
|
|
|
31
25
|
.slick-track {
|
|
32
26
|
display: flex;
|
|
33
27
|
align-items: center;
|
|
34
|
-
|
|
28
|
+
|
|
29
|
+
.slick-slide {
|
|
30
|
+
margin-right: 24px;
|
|
31
|
+
|
|
32
|
+
&:last-child {
|
|
33
|
+
margin-right: 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
.img-wrap {
|
|
@@ -48,13 +48,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
48
48
|
groupSource: [imagesGroupSourceJSON()],
|
|
49
49
|
spacing: {
|
|
50
50
|
pc: {
|
|
51
|
-
paddingTop:
|
|
52
|
-
paddingBottom:
|
|
51
|
+
paddingTop: 0,
|
|
52
|
+
paddingBottom: 0,
|
|
53
53
|
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
54
54
|
},
|
|
55
55
|
mobile: {
|
|
56
|
-
paddingTop:
|
|
57
|
-
paddingBottom:
|
|
56
|
+
paddingTop: 0,
|
|
57
|
+
paddingBottom: 0,
|
|
58
58
|
marginBottom: window.magicDesign.compSpacing
|
|
59
59
|
}
|
|
60
60
|
},
|
|
@@ -114,9 +114,9 @@ function (_super) {
|
|
|
114
114
|
className: (0, _classnames["default"])('line', {
|
|
115
115
|
isHorizontal: isHorizontal
|
|
116
116
|
}),
|
|
117
|
-
style: {
|
|
117
|
+
style: isHorizontal ? {
|
|
118
118
|
gap: MOBILE_IMG_SIZE[colNum].gap
|
|
119
|
-
}
|
|
119
|
+
} : {}
|
|
120
120
|
}, arr.map(function (item) {
|
|
121
121
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
122
|
key: item.id,
|
|
@@ -127,7 +127,7 @@ function (_super) {
|
|
|
127
127
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
128
128
|
data: item.image,
|
|
129
129
|
maxHeight: MOBILE_IMG_SIZE[colNum].maxH,
|
|
130
|
-
maxWidth:
|
|
130
|
+
maxWidth: "100%"
|
|
131
131
|
}));
|
|
132
132
|
}));
|
|
133
133
|
})));
|
|
@@ -61,6 +61,8 @@ var PC_IMG_SIZE = {
|
|
|
61
61
|
maxW: 1280,
|
|
62
62
|
minH: 150,
|
|
63
63
|
maxH: 960,
|
|
64
|
+
defW: 1072,
|
|
65
|
+
defH: 400,
|
|
64
66
|
gap: 20
|
|
65
67
|
},
|
|
66
68
|
2: {
|
|
@@ -131,9 +133,9 @@ function (_super) {
|
|
|
131
133
|
className: (0, _classnames["default"])('line', {
|
|
132
134
|
isHorizontal: isHorizontal
|
|
133
135
|
}),
|
|
134
|
-
style: {
|
|
136
|
+
style: isHorizontal ? {
|
|
135
137
|
gap: PC_IMG_SIZE[colNum].gap
|
|
136
|
-
}
|
|
138
|
+
} : {}
|
|
137
139
|
}, arr.map(function (item) {
|
|
138
140
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
141
|
key: item.id,
|
|
@@ -143,8 +145,8 @@ function (_super) {
|
|
|
143
145
|
}
|
|
144
146
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
145
147
|
data: item.image,
|
|
146
|
-
maxHeight: PC_IMG_SIZE[colNum].maxH,
|
|
147
|
-
maxWidth: PC_IMG_SIZE[colNum].
|
|
148
|
+
maxHeight: item.image.content.pcImgSrc ? PC_IMG_SIZE[colNum].maxH : PC_IMG_SIZE[colNum].defH,
|
|
149
|
+
maxWidth: item.image.content.pcImgSrc ? '100%' : PC_IMG_SIZE[colNum].defW,
|
|
148
150
|
minHeight: PC_IMG_SIZE[colNum].minH,
|
|
149
151
|
minWidth: PC_IMG_SIZE[colNum].minW
|
|
150
152
|
}));
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -17,6 +15,8 @@ var _components = require("../../../../meta-comp/components");
|
|
|
17
15
|
|
|
18
16
|
var _Text = require("../../../../meta-comp/components/Text");
|
|
19
17
|
|
|
18
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
19
|
+
|
|
20
20
|
require("./index.less");
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
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
27
|
|
|
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); }
|
|
29
|
+
|
|
28
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
31
|
var _extendStatics = function extendStatics(d, b) {
|
|
30
32
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -67,6 +69,16 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
67
69
|
return __assign.apply(this, arguments);
|
|
68
70
|
};
|
|
69
71
|
|
|
72
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
73
|
+
var c = arguments.length,
|
|
74
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
75
|
+
d;
|
|
76
|
+
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--) {
|
|
77
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
78
|
+
}
|
|
79
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
80
|
+
};
|
|
81
|
+
|
|
70
82
|
var Newsletter =
|
|
71
83
|
/** @class */
|
|
72
84
|
function (_super) {
|
|
@@ -115,6 +127,7 @@ function (_super) {
|
|
|
115
127
|
|
|
116
128
|
Newsletter.type = 'NEWSLETTER';
|
|
117
129
|
Newsletter.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
130
|
+
Newsletter = __decorate([_compositeDecorator["default"]], Newsletter);
|
|
118
131
|
return Newsletter;
|
|
119
132
|
}(_react.Component);
|
|
120
133
|
|
|
@@ -63,7 +63,8 @@ function (_super) {
|
|
|
63
63
|
var _a = this.props,
|
|
64
64
|
data = _a.data,
|
|
65
65
|
configCompSpace = _a.configCompSpace,
|
|
66
|
-
configWidth = _a.configWidth
|
|
66
|
+
configWidth = _a.configWidth,
|
|
67
|
+
fillUpWidth = _a.fillUpWidth;
|
|
67
68
|
var obj = data[window.magicDesign.device] || {};
|
|
68
69
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
70
|
className: "spacing-config-container"
|
|
@@ -80,6 +81,17 @@ function (_super) {
|
|
|
80
81
|
value: {
|
|
81
82
|
count: obj.contentWidth
|
|
82
83
|
}
|
|
84
|
+
})), fillUpWidth && window.magicDesign.device === 'pc' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
85
|
+
layout: "horizontal",
|
|
86
|
+
title: "Fill the page"
|
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
|
|
88
|
+
checked: obj.fillUp,
|
|
89
|
+
onChange: function onChange(e) {
|
|
90
|
+
console.log('ddd fill up', e.target.checked);
|
|
91
|
+
obj.fillUp = e.target.checked;
|
|
92
|
+
|
|
93
|
+
_this.selfRender();
|
|
94
|
+
}
|
|
83
95
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
84
96
|
title: (0, _locale.i18n)('PADDING')
|
|
85
97
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -147,6 +159,7 @@ function (_super) {
|
|
|
147
159
|
SpacingConfig.defaultProps = {
|
|
148
160
|
configCompSpace: true,
|
|
149
161
|
configWidth: false,
|
|
162
|
+
fillUpWidth: false,
|
|
150
163
|
data: {
|
|
151
164
|
pc: {
|
|
152
165
|
paddingTop: 0,
|
|
@@ -7,7 +7,7 @@ exports.getDefaultJSON = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _xtLogo = _interopRequireDefault(require("./imgs/xt-logo.png"));
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
@@ -25,8 +25,8 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
25
25
|
content: {
|
|
26
26
|
h5Name: 'name2',
|
|
27
27
|
pcName: 'name2',
|
|
28
|
-
h5ImgSrc:
|
|
29
|
-
pcImgSrc:
|
|
28
|
+
h5ImgSrc: _xtLogo["default"],
|
|
29
|
+
pcImgSrc: _xtLogo["default"],
|
|
30
30
|
clickUrl: ''
|
|
31
31
|
},
|
|
32
32
|
hover: {
|
|
@@ -58,7 +58,8 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
58
58
|
pc: {
|
|
59
59
|
paddingTop: 20,
|
|
60
60
|
paddingBottom: 30,
|
|
61
|
-
marginBottom: 0
|
|
61
|
+
marginBottom: 0,
|
|
62
|
+
fillUp: false
|
|
62
63
|
},
|
|
63
64
|
mobile: {
|
|
64
65
|
paddingTop: 8,
|
|
Binary file
|
|
@@ -74,7 +74,8 @@ function (_super) {
|
|
|
74
74
|
name: (0, _locale.i18n)('SPACING'),
|
|
75
75
|
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
76
76
|
configCompSpace: true,
|
|
77
|
-
data: data.spacing
|
|
77
|
+
data: data.spacing,
|
|
78
|
+
fillUpWidth: true
|
|
78
79
|
})
|
|
79
80
|
}, {
|
|
80
81
|
key: 'searchBar2',
|
|
@@ -36,7 +36,7 @@ function AppointmentModal(props) {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
var disabledDate = function disabledDate(current) {
|
|
39
|
-
return current && current < (0, _moment["default"])().add(30, 'minutes');
|
|
39
|
+
return current && (current < (0, _moment["default"])().add(30, 'minutes') || current > (0, _moment["default"])().add(30, 'days'));
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
@@ -62,6 +62,9 @@ function AppointmentModal(props) {
|
|
|
62
62
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
|
|
63
63
|
autoComplete: "off",
|
|
64
64
|
form: form,
|
|
65
|
+
initialValues: {
|
|
66
|
+
date: (0, _moment["default"])().add(31, 'minutes')
|
|
67
|
+
},
|
|
65
68
|
layout: "vertical",
|
|
66
69
|
onFinish: onFinish
|
|
67
70
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
@@ -73,6 +73,10 @@ function PageCompList(_a) {
|
|
|
73
73
|
clickedFloor = _d[0],
|
|
74
74
|
setClickedFloor = _d[1];
|
|
75
75
|
|
|
76
|
+
var _e = (0, _react.useState)(''),
|
|
77
|
+
hoveredFloor = _e[0],
|
|
78
|
+
setHoveredFloor = _e[1];
|
|
79
|
+
|
|
76
80
|
var ref = (0, _react.useRef)();
|
|
77
81
|
(0, _react.useEffect)(function () {
|
|
78
82
|
setComponents(pageData || []);
|
|
@@ -80,6 +84,7 @@ function PageCompList(_a) {
|
|
|
80
84
|
(0, _react.useEffect)(function () {
|
|
81
85
|
var distroy = (0, _mobx.autorun)(function () {
|
|
82
86
|
setClickedFloor(_mobx.store.clickedFloor);
|
|
87
|
+
setHoveredFloor(_mobx.store.hoveredFloor);
|
|
83
88
|
});
|
|
84
89
|
return distroy;
|
|
85
90
|
}, []);
|
|
@@ -104,6 +109,7 @@ function PageCompList(_a) {
|
|
|
104
109
|
};
|
|
105
110
|
|
|
106
111
|
var onDragEnter = function onDragEnter(e) {
|
|
112
|
+
console.log('drag enter');
|
|
107
113
|
var hoverNodeId = e.currentTarget.dataset.nodeid;
|
|
108
114
|
|
|
109
115
|
if (dragId === hoverNodeId) {
|
|
@@ -196,8 +202,28 @@ function PageCompList(_a) {
|
|
|
196
202
|
value: "4"
|
|
197
203
|
}, (0, _locale.i18n)('DELETE')));
|
|
198
204
|
|
|
205
|
+
var onMouseEnter = function onMouseEnter() {
|
|
206
|
+
if (window.magicDesign.mode === 'renderer') {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
_mobx.store.setState({
|
|
211
|
+
hoveredFloor: comp.id
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
var onMouseLeave = function onMouseLeave() {
|
|
216
|
+
if (window.magicDesign.mode === 'renderer') {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
_mobx.store.setState({
|
|
221
|
+
hoveredFloor: ''
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
|
|
199
225
|
var dragging = dragId === String(comp.id);
|
|
200
|
-
var active = clickedFloor
|
|
226
|
+
var active = [hoveredFloor, clickedFloor].includes(comp.id);
|
|
201
227
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
202
228
|
key: "card" + comp.id,
|
|
203
229
|
className: (0, _classnames["default"])('card-wrap', {
|
|
@@ -212,6 +238,8 @@ function PageCompList(_a) {
|
|
|
212
238
|
e.preventDefault();
|
|
213
239
|
},
|
|
214
240
|
onDragStart: onDragStart,
|
|
241
|
+
onMouseEnter: onMouseEnter,
|
|
242
|
+
onMouseLeave: onMouseLeave,
|
|
215
243
|
style: {
|
|
216
244
|
opacity: dragging ? '0.4' : '1'
|
|
217
245
|
}
|