@fonixtree/magic-design 0.0.84 → 0.0.88
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/fonts/magic-box-iconfont.css +7 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +7 -3
- 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/less/button.less +23 -0
- package/es/assets/less/datepicker.less +11 -0
- package/es/assets/less/index.less +2 -1
- package/es/common/SystemNotification/Confirm/index.js +263 -0
- package/es/common/SystemNotification/Confirm/index.less +33 -0
- package/es/common/SystemNotification/index.js +115 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Carousel/pc/index.js +17 -13
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +4 -1
- package/es/composite-comp/bol/components/ImageGallery/index.js +5 -1
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +1 -1
- package/es/composite-comp/bol/components/ImageGallery/pc/index.js +138 -0
- package/es/composite-comp/bol/components/ImageGallery/pc/index.less +21 -0
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +16 -1
- package/es/composite-comp/common/components/ProductItem/index.less +0 -1
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +0 -12
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +0 -42
- package/es/composite-comp/dito/components/FlashDeal/pc/index.less +1 -0
- package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +6 -1
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +3 -5
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +23 -5
- package/es/composite-comp/dito/components/Recommend/pc/index.js +22 -4
- package/es/constants/index.js +1 -0
- package/es/core/Designer/AppointmentModal/index.js +83 -0
- package/es/core/Designer/AppointmentModal/index.less +10 -0
- package/es/core/Designer/QuickMenuBar/index.js +34 -2
- package/es/core/Designer/QuickMenuBar/index.less +34 -0
- package/es/core/Designer/ViewArea/index.js +27 -2
- package/es/core/Designer/ViewArea/index.less +29 -0
- package/es/core/Designer/index.js +50 -4
- package/es/decorator/metaDecorator.js +1 -1
- package/es/locale/en/en.json +4 -0
- package/es/locale/es/es.json +4 -0
- package/es/locale/id/id.json +4 -0
- package/es/meta-comp/components/Image/index.less +1 -0
- package/es/mobx/Frame.js +64 -0
- package/es/mobx/index.js +9 -3
- package/lib/assets/fonts/magic-box-iconfont.css +7 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +7 -3
- 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/less/button.less +23 -0
- package/lib/assets/less/datepicker.less +11 -0
- package/lib/assets/less/index.less +2 -1
- package/lib/common/SystemNotification/Confirm/index.js +263 -0
- package/lib/common/SystemNotification/Confirm/index.less +33 -0
- package/lib/common/SystemNotification/index.js +115 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +17 -13
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +4 -1
- package/lib/composite-comp/bol/components/ImageGallery/index.js +5 -1
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +1 -1
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +138 -0
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.less +21 -0
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +16 -1
- package/lib/composite-comp/common/components/ProductItem/index.less +0 -1
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +0 -12
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +0 -42
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +1 -0
- package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +6 -1
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +3 -5
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +23 -5
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +22 -4
- package/lib/constants/index.js +1 -0
- package/lib/core/Designer/AppointmentModal/index.js +83 -0
- package/lib/core/Designer/AppointmentModal/index.less +10 -0
- package/lib/core/Designer/QuickMenuBar/index.js +34 -2
- package/lib/core/Designer/QuickMenuBar/index.less +34 -0
- package/lib/core/Designer/ViewArea/index.js +27 -2
- package/lib/core/Designer/ViewArea/index.less +29 -0
- package/lib/core/Designer/index.js +50 -4
- package/lib/decorator/metaDecorator.js +1 -1
- package/lib/locale/en/en.json +4 -0
- package/lib/locale/es/es.json +4 -0
- package/lib/locale/id/id.json +4 -0
- package/lib/meta-comp/components/Image/index.less +1 -0
- package/lib/mobx/Frame.js +64 -0
- package/lib/mobx/index.js +9 -3
- package/package.json +1 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = Confirm;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _Button = _interopRequireDefault(require("../../Button"));
|
|
13
|
+
|
|
14
|
+
var _Iconfont = _interopRequireDefault(require("../../Iconfont"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
22
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
23
|
+
function adopt(value) {
|
|
24
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
25
|
+
resolve(value);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
+
function fulfilled(value) {
|
|
31
|
+
try {
|
|
32
|
+
step(generator.next(value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function rejected(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator["throw"](value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function step(result) {
|
|
47
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
55
|
+
var _ = {
|
|
56
|
+
label: 0,
|
|
57
|
+
sent: function sent() {
|
|
58
|
+
if (t[0] & 1) throw t[1];
|
|
59
|
+
return t[1];
|
|
60
|
+
},
|
|
61
|
+
trys: [],
|
|
62
|
+
ops: []
|
|
63
|
+
},
|
|
64
|
+
f,
|
|
65
|
+
y,
|
|
66
|
+
t,
|
|
67
|
+
g;
|
|
68
|
+
return g = {
|
|
69
|
+
next: verb(0),
|
|
70
|
+
"throw": verb(1),
|
|
71
|
+
"return": verb(2)
|
|
72
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
73
|
+
return this;
|
|
74
|
+
}), g;
|
|
75
|
+
|
|
76
|
+
function verb(n) {
|
|
77
|
+
return function (v) {
|
|
78
|
+
return step([n, v]);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function step(op) {
|
|
83
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
84
|
+
|
|
85
|
+
while (_) {
|
|
86
|
+
try {
|
|
87
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
88
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
89
|
+
|
|
90
|
+
switch (op[0]) {
|
|
91
|
+
case 0:
|
|
92
|
+
case 1:
|
|
93
|
+
t = op;
|
|
94
|
+
break;
|
|
95
|
+
|
|
96
|
+
case 4:
|
|
97
|
+
_.label++;
|
|
98
|
+
return {
|
|
99
|
+
value: op[1],
|
|
100
|
+
done: false
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
case 5:
|
|
104
|
+
_.label++;
|
|
105
|
+
y = op[1];
|
|
106
|
+
op = [0];
|
|
107
|
+
continue;
|
|
108
|
+
|
|
109
|
+
case 7:
|
|
110
|
+
op = _.ops.pop();
|
|
111
|
+
|
|
112
|
+
_.trys.pop();
|
|
113
|
+
|
|
114
|
+
continue;
|
|
115
|
+
|
|
116
|
+
default:
|
|
117
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
118
|
+
_ = 0;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
123
|
+
_.label = op[1];
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
128
|
+
_.label = t[1];
|
|
129
|
+
t = op;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (t && _.label < t[2]) {
|
|
134
|
+
_.label = t[2];
|
|
135
|
+
|
|
136
|
+
_.ops.push(op);
|
|
137
|
+
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (t[2]) _.ops.pop();
|
|
142
|
+
|
|
143
|
+
_.trys.pop();
|
|
144
|
+
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
op = body.call(thisArg, _);
|
|
149
|
+
} catch (e) {
|
|
150
|
+
op = [6, e];
|
|
151
|
+
y = 0;
|
|
152
|
+
} finally {
|
|
153
|
+
f = t = 0;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (op[0] & 5) throw op[1];
|
|
158
|
+
return {
|
|
159
|
+
value: op[0] ? op[1] : void 0,
|
|
160
|
+
done: true
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
166
|
+
var t = {};
|
|
167
|
+
|
|
168
|
+
for (var p in s) {
|
|
169
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
173
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
174
|
+
}
|
|
175
|
+
return t;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
var debug = require('debug')('worker:confirm');
|
|
179
|
+
|
|
180
|
+
function Confirm(props) {
|
|
181
|
+
var _this = this;
|
|
182
|
+
|
|
183
|
+
var okText = props.okText,
|
|
184
|
+
cancelText = props.cancelText,
|
|
185
|
+
title = props.title,
|
|
186
|
+
content = props.content,
|
|
187
|
+
onOk = props.onOk,
|
|
188
|
+
onCancel = props.onCancel,
|
|
189
|
+
onClose = props.onClose,
|
|
190
|
+
rest = __rest(props, ["okText", "cancelText", "title", "content", "onOk", "onCancel", "onClose"]);
|
|
191
|
+
|
|
192
|
+
var onOkClick = function onOkClick() {
|
|
193
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
194
|
+
var error_1;
|
|
195
|
+
return __generator(this, function (_a) {
|
|
196
|
+
switch (_a.label) {
|
|
197
|
+
case 0:
|
|
198
|
+
_a.trys.push([0, 2,, 3]);
|
|
199
|
+
|
|
200
|
+
return [4
|
|
201
|
+
/*yield*/
|
|
202
|
+
, onOk()];
|
|
203
|
+
|
|
204
|
+
case 1:
|
|
205
|
+
_a.sent();
|
|
206
|
+
|
|
207
|
+
onClose();
|
|
208
|
+
return [3
|
|
209
|
+
/*break*/
|
|
210
|
+
, 3];
|
|
211
|
+
|
|
212
|
+
case 2:
|
|
213
|
+
error_1 = _a.sent();
|
|
214
|
+
debug(error_1);
|
|
215
|
+
return [3
|
|
216
|
+
/*break*/
|
|
217
|
+
, 3];
|
|
218
|
+
|
|
219
|
+
case 3:
|
|
220
|
+
return [2
|
|
221
|
+
/*return*/
|
|
222
|
+
];
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
var onCancelClick = function onCancelClick() {
|
|
229
|
+
try {
|
|
230
|
+
onCancel();
|
|
231
|
+
onClose();
|
|
232
|
+
} catch (error) {
|
|
233
|
+
debug(error);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, _extends({}, rest, {
|
|
238
|
+
closable: false,
|
|
239
|
+
footer: null
|
|
240
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
241
|
+
className: "confirm_wrap"
|
|
242
|
+
}, title && /*#__PURE__*/_react["default"].createElement("div", {
|
|
243
|
+
className: "confirm_title"
|
|
244
|
+
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
245
|
+
color: "#FFBF1B",
|
|
246
|
+
size: 24,
|
|
247
|
+
type: "icon-notice1"
|
|
248
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
249
|
+
className: "confirm_title_text"
|
|
250
|
+
}, title)), content && /*#__PURE__*/_react["default"].createElement("div", {
|
|
251
|
+
className: "confirm_content"
|
|
252
|
+
}, content), /*#__PURE__*/_react["default"].createElement("div", {
|
|
253
|
+
className: "confirm_footer"
|
|
254
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
255
|
+
onClick: onCancelClick,
|
|
256
|
+
size: "small",
|
|
257
|
+
type: "light"
|
|
258
|
+
}, cancelText), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
259
|
+
onClick: onOkClick,
|
|
260
|
+
size: "small",
|
|
261
|
+
type: "primary"
|
|
262
|
+
}, okText))));
|
|
263
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
.confirm_wrap {
|
|
3
|
+
padding: 16px 16px 12px 16px;
|
|
4
|
+
.confirm_title {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
font-family: 'Open Sans';
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
line-height: 24px;
|
|
12
|
+
color: #232F46;
|
|
13
|
+
.confirm_title_text {
|
|
14
|
+
margin-left: 16px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.confirm_content {
|
|
18
|
+
font-family: 'Open Sans';
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
font-size: 13px;
|
|
22
|
+
line-height: 18px;
|
|
23
|
+
color: #232F46;
|
|
24
|
+
margin-left: 40px;
|
|
25
|
+
margin-top: 10px;
|
|
26
|
+
}
|
|
27
|
+
.confirm_footer {
|
|
28
|
+
margin-top: 24px;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: flex-end;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 _Confirm = _interopRequireDefault(require("./Confirm"));
|
|
13
|
+
|
|
14
|
+
var _mobx = require("../../mobx");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
51
|
+
__assign = Object.assign || function (t) {
|
|
52
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
|
+
s = arguments[i];
|
|
54
|
+
|
|
55
|
+
for (var p in s) {
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return t;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return __assign.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var SystemNotification =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(SystemNotification, _super);
|
|
70
|
+
|
|
71
|
+
function SystemNotification() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {
|
|
75
|
+
confirmState: _mobx.frameStore.confirmState
|
|
76
|
+
};
|
|
77
|
+
/** 弹窗关闭 */
|
|
78
|
+
|
|
79
|
+
_this.onCloseConfirm = function () {
|
|
80
|
+
_mobx.frameStore.setState({
|
|
81
|
+
confirmState: __assign(__assign({}, _this.state.confirmState), {
|
|
82
|
+
visible: false
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return _this;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
SystemNotification.prototype.componentDidMount = function () {
|
|
91
|
+
var _this = this;
|
|
92
|
+
|
|
93
|
+
this.destroy = (0, _mobx.autorun)(function () {
|
|
94
|
+
_this.setState({
|
|
95
|
+
confirmState: _mobx.frameStore.confirmState
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
SystemNotification.prototype.componentWillUnmount = function () {
|
|
101
|
+
this.destroy();
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
SystemNotification.prototype.render = function () {
|
|
105
|
+
var confirmState = this.state.confirmState;
|
|
106
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, confirmState.visible && /*#__PURE__*/_react["default"].createElement(_Confirm["default"], _extends({}, confirmState, {
|
|
107
|
+
onClose: this.onCloseConfirm
|
|
108
|
+
})));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return SystemNotification;
|
|
112
|
+
}(_react.Component);
|
|
113
|
+
|
|
114
|
+
var _default = SystemNotification;
|
|
115
|
+
exports["default"] = _default;
|
package/es/common/index.js
CHANGED
|
@@ -93,6 +93,12 @@ Object.defineProperty(exports, "SwitchCollapse", {
|
|
|
93
93
|
return _SwitchCollapse["default"];
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
+
Object.defineProperty(exports, "SystemNotification", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function get() {
|
|
99
|
+
return _SystemNotification["default"];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
96
102
|
Object.defineProperty(exports, "UrlPicker", {
|
|
97
103
|
enumerable: true,
|
|
98
104
|
get: function get() {
|
|
@@ -132,4 +138,6 @@ var _ProductSource = _interopRequireDefault(require("./ProductSource"));
|
|
|
132
138
|
|
|
133
139
|
var _ImgArea = _interopRequireDefault(require("./ImgArea"));
|
|
134
140
|
|
|
141
|
+
var _SystemNotification = _interopRequireDefault(require("./SystemNotification"));
|
|
142
|
+
|
|
135
143
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -29,14 +29,10 @@ require("slick-carousel/slick/slick.css");
|
|
|
29
29
|
|
|
30
30
|
require("slick-carousel/slick/slick-theme.css");
|
|
31
31
|
|
|
32
|
-
var _ref, _ref2, _ref3, _ref4;
|
|
33
|
-
|
|
34
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
33
|
|
|
36
34
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
37
35
|
|
|
38
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
-
|
|
40
36
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
41
37
|
var _extendStatics = function extendStatics(d, b) {
|
|
42
38
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -73,19 +69,27 @@ var PC_IMG_SIZE = [{
|
|
|
73
69
|
maxW: 524,
|
|
74
70
|
minH: 150,
|
|
75
71
|
maxH: 524
|
|
76
|
-
},
|
|
72
|
+
}, {
|
|
77
73
|
minW: 100,
|
|
78
|
-
maxW: 341
|
|
79
|
-
|
|
74
|
+
maxW: 341,
|
|
75
|
+
minH: 100,
|
|
76
|
+
maxH: 341
|
|
77
|
+
}, {
|
|
80
78
|
minW: 100,
|
|
81
|
-
maxW: 251
|
|
82
|
-
|
|
79
|
+
maxW: 251,
|
|
80
|
+
minH: 100,
|
|
81
|
+
maxH: 251
|
|
82
|
+
}, {
|
|
83
83
|
minW: 100,
|
|
84
|
-
maxW: 195
|
|
85
|
-
|
|
84
|
+
maxW: 195,
|
|
85
|
+
minH: 100,
|
|
86
|
+
maxH: 195
|
|
87
|
+
}, {
|
|
86
88
|
minW: 100,
|
|
87
|
-
maxW: 168
|
|
88
|
-
|
|
89
|
+
maxW: 168,
|
|
90
|
+
minH: 100,
|
|
91
|
+
maxH: 168
|
|
92
|
+
}];
|
|
89
93
|
|
|
90
94
|
var CarouselPc =
|
|
91
95
|
/** @class */
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
+
var _pc = _interopRequireDefault(require("./pc"));
|
|
11
|
+
|
|
10
12
|
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
11
13
|
|
|
12
14
|
var _defaultJSON = require("./defaultJSON");
|
|
@@ -68,7 +70,9 @@ function (_super) {
|
|
|
68
70
|
|
|
69
71
|
ImageGallery.prototype.render = function () {
|
|
70
72
|
var nodeData = this.props.nodeData;
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ?
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
74
|
+
data: nodeData
|
|
75
|
+
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
72
76
|
data: nodeData
|
|
73
77
|
}));
|
|
74
78
|
};
|
|
@@ -83,7 +83,7 @@ function (_super) {
|
|
|
83
83
|
|
|
84
84
|
ImageGalleryMobile.prototype.render = function () {
|
|
85
85
|
var data = this.props.data;
|
|
86
|
-
var isHorizontal = data.customize.layout === 'layout2';
|
|
86
|
+
var isHorizontal = data.customize.layout.h5Layout === 'layout2';
|
|
87
87
|
var colNum = isHorizontal ? data.customize.rowNum : 1;
|
|
88
88
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
89
|
className: "m-image-gallery-mobile"
|
|
@@ -0,0 +1,138 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
var _components = require("../../../../../meta-comp/components");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
19
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
20
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
21
|
+
__proto__: []
|
|
22
|
+
} instanceof Array && function (d, b) {
|
|
23
|
+
d.__proto__ = b;
|
|
24
|
+
} || function (d, b) {
|
|
25
|
+
for (var p in b) {
|
|
26
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return _extendStatics(d, b);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return function (d, b) {
|
|
34
|
+
_extendStatics(d, b);
|
|
35
|
+
|
|
36
|
+
function __() {
|
|
37
|
+
this.constructor = d;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
41
|
+
};
|
|
42
|
+
}();
|
|
43
|
+
|
|
44
|
+
var PC_IMG_SIZE = {
|
|
45
|
+
1: {
|
|
46
|
+
minW: 150,
|
|
47
|
+
maxW: '100%',
|
|
48
|
+
minH: 150,
|
|
49
|
+
maxH: 960,
|
|
50
|
+
gap: 20
|
|
51
|
+
},
|
|
52
|
+
2: {
|
|
53
|
+
minW: 150,
|
|
54
|
+
maxW: 628,
|
|
55
|
+
minH: 150,
|
|
56
|
+
maxH: 471,
|
|
57
|
+
gap: 24
|
|
58
|
+
},
|
|
59
|
+
3: {
|
|
60
|
+
minW: 100,
|
|
61
|
+
maxW: 410,
|
|
62
|
+
minH: 100,
|
|
63
|
+
maxH: 308,
|
|
64
|
+
gap: 24
|
|
65
|
+
},
|
|
66
|
+
4: {
|
|
67
|
+
minW: 100,
|
|
68
|
+
maxW: 302,
|
|
69
|
+
minH: 100,
|
|
70
|
+
maxH: 227,
|
|
71
|
+
gap: 24
|
|
72
|
+
},
|
|
73
|
+
5: {
|
|
74
|
+
minW: 100,
|
|
75
|
+
maxW: 236,
|
|
76
|
+
minH: 100,
|
|
77
|
+
maxH: 177,
|
|
78
|
+
gap: 24
|
|
79
|
+
},
|
|
80
|
+
6: {
|
|
81
|
+
minW: 100,
|
|
82
|
+
maxW: 193,
|
|
83
|
+
minH: 100,
|
|
84
|
+
maxH: 145,
|
|
85
|
+
gap: 24
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var ImageGalleryPc =
|
|
90
|
+
/** @class */
|
|
91
|
+
function (_super) {
|
|
92
|
+
__extends(ImageGalleryPc, _super);
|
|
93
|
+
|
|
94
|
+
function ImageGalleryPc() {
|
|
95
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
96
|
+
|
|
97
|
+
_this.state = {};
|
|
98
|
+
return _this;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
ImageGalleryPc.prototype.render = function () {
|
|
102
|
+
var data = this.props.data;
|
|
103
|
+
var isHorizontal = data.customize.layout.pcLayout === 'layout2';
|
|
104
|
+
var colNum = isHorizontal ? data.customize.pcRowNum : 1;
|
|
105
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
className: "m-image-gallery-pc"
|
|
107
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
|
+
className: (0, _classnames["default"])('content', {
|
|
109
|
+
horizontal: isHorizontal
|
|
110
|
+
}),
|
|
111
|
+
style: {
|
|
112
|
+
gap: PC_IMG_SIZE[colNum].gap
|
|
113
|
+
}
|
|
114
|
+
}, data.groupSource.map(function (m) {
|
|
115
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
+
key: m.id,
|
|
117
|
+
className: "img-wrap",
|
|
118
|
+
style: {
|
|
119
|
+
width: PC_IMG_SIZE[colNum].maxW
|
|
120
|
+
}
|
|
121
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
122
|
+
data: m.image,
|
|
123
|
+
maxHeight: PC_IMG_SIZE[colNum].maxH,
|
|
124
|
+
maxWidth: PC_IMG_SIZE[colNum].maxW
|
|
125
|
+
}));
|
|
126
|
+
})));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
ImageGalleryPc.defaultProps = {
|
|
130
|
+
data: {
|
|
131
|
+
groupSource: []
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
return ImageGalleryPc;
|
|
135
|
+
}(_react["default"].Component);
|
|
136
|
+
|
|
137
|
+
var _default = ImageGalleryPc;
|
|
138
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.m-image-gallery-pc {
|
|
2
|
+
overflow-x: auto;
|
|
3
|
+
|
|
4
|
+
.content {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
width: 1280px;
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
|
|
11
|
+
&.horizontal {
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.img-wrap {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|