@fonixtree/magic-design 0.1.32 → 0.1.33
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/common/LinkModal/StoreTable/index.js +13 -3
- package/es/common/Video/index.js +15 -64
- package/es/composite-comp/bol/components/Text/index.js +4 -1
- package/es/core/Designer/RenderHtml/index.js +9 -1
- package/lib/common/LinkModal/StoreTable/index.js +13 -3
- package/lib/common/Video/index.js +15 -64
- package/lib/composite-comp/bol/components/Text/index.js +4 -1
- package/lib/core/Designer/RenderHtml/index.js +9 -1
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -209,7 +209,9 @@ function StoreTable(props) {
|
|
|
209
209
|
setLoading(true);
|
|
210
210
|
return [4
|
|
211
211
|
/*yield*/
|
|
212
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", params,
|
|
212
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", __assign(__assign({}, params), {
|
|
213
|
+
state: 'A'
|
|
214
|
+
}), 'GET')];
|
|
213
215
|
|
|
214
216
|
case 1:
|
|
215
217
|
res = _a.sent();
|
|
@@ -235,8 +237,8 @@ function StoreTable(props) {
|
|
|
235
237
|
alt: "",
|
|
236
238
|
src: val,
|
|
237
239
|
style: {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
+
maxWidth: '50px',
|
|
241
|
+
maxHeight: '50px'
|
|
240
242
|
}
|
|
241
243
|
});
|
|
242
244
|
}
|
|
@@ -253,6 +255,14 @@ function StoreTable(props) {
|
|
|
253
255
|
},
|
|
254
256
|
type: 'radio'
|
|
255
257
|
};
|
|
258
|
+
|
|
259
|
+
var reset = function reset() {
|
|
260
|
+
setStoreName('');
|
|
261
|
+
queryStore(__assign({
|
|
262
|
+
storeName: ''
|
|
263
|
+
}, paginationParams));
|
|
264
|
+
};
|
|
265
|
+
|
|
256
266
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
257
267
|
style: {
|
|
258
268
|
height: 550
|
package/es/common/Video/index.js
CHANGED
|
@@ -207,75 +207,26 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
207
207
|
/** 检查youtube依赖包 */
|
|
208
208
|
var checkYoutuVIdeo = function checkYoutuVIdeo() {
|
|
209
209
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
210
|
-
var scriptUrl, ttPolicy, YT, YTConfig;
|
|
211
210
|
return __generator(this, function (_a) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
});
|
|
221
|
-
scriptUrl = ttPolicy.createScriptURL(scriptUrl);
|
|
222
|
-
} catch (e) {}
|
|
223
|
-
|
|
224
|
-
if (!window['YT']) YT = {
|
|
225
|
-
loading: 0,
|
|
226
|
-
loaded: 0
|
|
227
|
-
};
|
|
228
|
-
if (!window['YTConfig']) YTConfig = {
|
|
229
|
-
host: 'https://www.youtube.com'
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
if (!YT.loading) {
|
|
233
|
-
YT.loading = 1;
|
|
234
|
-
|
|
235
|
-
(function () {
|
|
236
|
-
var l = [];
|
|
237
|
-
|
|
238
|
-
YT.ready = function (f) {
|
|
239
|
-
if (YT.loaded) f();else l.push(f);
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
window.onYTReady = function () {
|
|
243
|
-
YT.loaded = 1;
|
|
244
|
-
|
|
245
|
-
for (var i = 0; i < l.length; i++) {
|
|
246
|
-
try {
|
|
247
|
-
l[i]();
|
|
248
|
-
} catch (e$0) {}
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
YT.setConfig = function (c) {
|
|
253
|
-
for (var k in c) {
|
|
254
|
-
if (c.hasOwnProperty(k)) YTConfig[k] = c[k];
|
|
255
|
-
}
|
|
256
|
-
};
|
|
211
|
+
switch (_a.label) {
|
|
212
|
+
case 0:
|
|
213
|
+
if (!!window.YT) return [3
|
|
214
|
+
/*break*/
|
|
215
|
+
, 2];
|
|
216
|
+
return [4
|
|
217
|
+
/*yield*/
|
|
218
|
+
, Promise.all([(0, _commonUtil.importAsync)('https://www.youtube.com/iframe_api', 'js')])];
|
|
257
219
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
a.id = 'www-widgetapi-script';
|
|
261
|
-
a.src = scriptUrl;
|
|
262
|
-
a.async = true;
|
|
263
|
-
var c = document.currentScript;
|
|
220
|
+
case 1:
|
|
221
|
+
_a.sent();
|
|
264
222
|
|
|
265
|
-
|
|
266
|
-
var n = c.nonce || c.getAttribute('nonce');
|
|
267
|
-
if (n) a.setAttribute('nonce', n);
|
|
268
|
-
}
|
|
223
|
+
_a.label = 2;
|
|
269
224
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
225
|
+
case 2:
|
|
226
|
+
return [2
|
|
227
|
+
/*return*/
|
|
228
|
+
];
|
|
274
229
|
}
|
|
275
|
-
|
|
276
|
-
return [2
|
|
277
|
-
/*return*/
|
|
278
|
-
];
|
|
279
230
|
});
|
|
280
231
|
});
|
|
281
232
|
};
|
|
@@ -101,7 +101,10 @@ function (_super) {
|
|
|
101
101
|
var style = ".m-text{display: flex;flex-direction: column;word-break: break-word;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title-text{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{" + groupWrapContainerStyle + "}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}";
|
|
102
102
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
103
|
className: "m-text",
|
|
104
|
-
onClick: this.onComponentClick
|
|
104
|
+
onClick: this.onComponentClick,
|
|
105
|
+
style: {
|
|
106
|
+
flexDirection: 'column'
|
|
107
|
+
}
|
|
105
108
|
}, /*#__PURE__*/_react["default"].createElement("style", null, style), nodeData.title.headline.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
109
|
className: "title-wrap"
|
|
107
110
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -59,8 +59,16 @@ function (_super) {
|
|
|
59
59
|
renderProps: renderProps
|
|
60
60
|
}, function () {
|
|
61
61
|
document.querySelector('#render-html-wrap > div').style = 'max-width:600px;margin:auto;';
|
|
62
|
+
/** 去除设计器模式下元素 */
|
|
63
|
+
|
|
64
|
+
document.querySelectorAll('#render-html-wrap > div .composite_mask').forEach(function (el) {
|
|
65
|
+
el.remove();
|
|
66
|
+
});
|
|
62
67
|
var html = document.querySelector('#render-html-wrap').innerHTML;
|
|
63
|
-
|
|
68
|
+
/** 处理背景图资源引号问题 */
|
|
69
|
+
|
|
70
|
+
html = html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)');
|
|
71
|
+
resolve(html);
|
|
64
72
|
|
|
65
73
|
_this.setState({
|
|
66
74
|
renderProps: null
|
|
@@ -209,7 +209,9 @@ function StoreTable(props) {
|
|
|
209
209
|
setLoading(true);
|
|
210
210
|
return [4
|
|
211
211
|
/*yield*/
|
|
212
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", params,
|
|
212
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", __assign(__assign({}, params), {
|
|
213
|
+
state: 'A'
|
|
214
|
+
}), 'GET')];
|
|
213
215
|
|
|
214
216
|
case 1:
|
|
215
217
|
res = _a.sent();
|
|
@@ -235,8 +237,8 @@ function StoreTable(props) {
|
|
|
235
237
|
alt: "",
|
|
236
238
|
src: val,
|
|
237
239
|
style: {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
+
maxWidth: '50px',
|
|
241
|
+
maxHeight: '50px'
|
|
240
242
|
}
|
|
241
243
|
});
|
|
242
244
|
}
|
|
@@ -253,6 +255,14 @@ function StoreTable(props) {
|
|
|
253
255
|
},
|
|
254
256
|
type: 'radio'
|
|
255
257
|
};
|
|
258
|
+
|
|
259
|
+
var reset = function reset() {
|
|
260
|
+
setStoreName('');
|
|
261
|
+
queryStore(__assign({
|
|
262
|
+
storeName: ''
|
|
263
|
+
}, paginationParams));
|
|
264
|
+
};
|
|
265
|
+
|
|
256
266
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
257
267
|
style: {
|
|
258
268
|
height: 550
|
|
@@ -207,75 +207,26 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
207
207
|
/** 检查youtube依赖包 */
|
|
208
208
|
var checkYoutuVIdeo = function checkYoutuVIdeo() {
|
|
209
209
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
210
|
-
var scriptUrl, ttPolicy, YT, YTConfig;
|
|
211
210
|
return __generator(this, function (_a) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
});
|
|
221
|
-
scriptUrl = ttPolicy.createScriptURL(scriptUrl);
|
|
222
|
-
} catch (e) {}
|
|
223
|
-
|
|
224
|
-
if (!window['YT']) YT = {
|
|
225
|
-
loading: 0,
|
|
226
|
-
loaded: 0
|
|
227
|
-
};
|
|
228
|
-
if (!window['YTConfig']) YTConfig = {
|
|
229
|
-
host: 'https://www.youtube.com'
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
if (!YT.loading) {
|
|
233
|
-
YT.loading = 1;
|
|
234
|
-
|
|
235
|
-
(function () {
|
|
236
|
-
var l = [];
|
|
237
|
-
|
|
238
|
-
YT.ready = function (f) {
|
|
239
|
-
if (YT.loaded) f();else l.push(f);
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
window.onYTReady = function () {
|
|
243
|
-
YT.loaded = 1;
|
|
244
|
-
|
|
245
|
-
for (var i = 0; i < l.length; i++) {
|
|
246
|
-
try {
|
|
247
|
-
l[i]();
|
|
248
|
-
} catch (e$0) {}
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
YT.setConfig = function (c) {
|
|
253
|
-
for (var k in c) {
|
|
254
|
-
if (c.hasOwnProperty(k)) YTConfig[k] = c[k];
|
|
255
|
-
}
|
|
256
|
-
};
|
|
211
|
+
switch (_a.label) {
|
|
212
|
+
case 0:
|
|
213
|
+
if (!!window.YT) return [3
|
|
214
|
+
/*break*/
|
|
215
|
+
, 2];
|
|
216
|
+
return [4
|
|
217
|
+
/*yield*/
|
|
218
|
+
, Promise.all([(0, _commonUtil.importAsync)('https://www.youtube.com/iframe_api', 'js')])];
|
|
257
219
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
a.id = 'www-widgetapi-script';
|
|
261
|
-
a.src = scriptUrl;
|
|
262
|
-
a.async = true;
|
|
263
|
-
var c = document.currentScript;
|
|
220
|
+
case 1:
|
|
221
|
+
_a.sent();
|
|
264
222
|
|
|
265
|
-
|
|
266
|
-
var n = c.nonce || c.getAttribute('nonce');
|
|
267
|
-
if (n) a.setAttribute('nonce', n);
|
|
268
|
-
}
|
|
223
|
+
_a.label = 2;
|
|
269
224
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
225
|
+
case 2:
|
|
226
|
+
return [2
|
|
227
|
+
/*return*/
|
|
228
|
+
];
|
|
274
229
|
}
|
|
275
|
-
|
|
276
|
-
return [2
|
|
277
|
-
/*return*/
|
|
278
|
-
];
|
|
279
230
|
});
|
|
280
231
|
});
|
|
281
232
|
};
|
|
@@ -101,7 +101,10 @@ function (_super) {
|
|
|
101
101
|
var style = ".m-text{display: flex;flex-direction: column;word-break: break-word;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title-text{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{" + groupWrapContainerStyle + "}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}";
|
|
102
102
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
103
|
className: "m-text",
|
|
104
|
-
onClick: this.onComponentClick
|
|
104
|
+
onClick: this.onComponentClick,
|
|
105
|
+
style: {
|
|
106
|
+
flexDirection: 'column'
|
|
107
|
+
}
|
|
105
108
|
}, /*#__PURE__*/_react["default"].createElement("style", null, style), nodeData.title.headline.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
109
|
className: "title-wrap"
|
|
107
110
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -59,8 +59,16 @@ function (_super) {
|
|
|
59
59
|
renderProps: renderProps
|
|
60
60
|
}, function () {
|
|
61
61
|
document.querySelector('#render-html-wrap > div').style = 'max-width:600px;margin:auto;';
|
|
62
|
+
/** 去除设计器模式下元素 */
|
|
63
|
+
|
|
64
|
+
document.querySelectorAll('#render-html-wrap > div .composite_mask').forEach(function (el) {
|
|
65
|
+
el.remove();
|
|
66
|
+
});
|
|
62
67
|
var html = document.querySelector('#render-html-wrap').innerHTML;
|
|
63
|
-
|
|
68
|
+
/** 处理背景图资源引号问题 */
|
|
69
|
+
|
|
70
|
+
html = html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)');
|
|
71
|
+
resolve(html);
|
|
64
72
|
|
|
65
73
|
_this.setState({
|
|
66
74
|
renderProps: null
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|