@fonixtree/magic-design 1.0.142 → 1.0.145

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.
Files changed (45) hide show
  1. package/es/common/Video/index.js +4 -2
  2. package/es/common/VideoPC/background.png +0 -0
  3. package/es/common/VideoPC/closeImg.png +0 -0
  4. package/es/common/VideoPC/components/index.js +100 -0
  5. package/es/common/VideoPC/components/index.less +62 -0
  6. package/es/common/VideoPC/cover.png +0 -0
  7. package/es/common/VideoPC/index.js +748 -0
  8. package/es/common/VideoPC/index.less +79 -0
  9. package/es/common/index.js +8 -0
  10. package/es/composite-comp/dito/components/GroupedCarousel/pc/index.js +0 -1
  11. package/es/composite-comp/dito/components/SearchDITO/defaultJSON.js +2 -1
  12. package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +8 -2
  13. package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +1 -1
  14. package/es/composite-comp/dito/components/SearchDITO/pc/index.js +1 -2
  15. package/es/composite-comp/dito/components/SearchDITO/pc/index.less +1 -1
  16. package/es/composite-comp/dito/components/SlideImage/defaultJSON.js +3 -2
  17. package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +7 -2
  18. package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +5 -3
  19. package/es/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +9 -0
  20. package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +10 -1
  21. package/es/core/Renderer/index.js +0 -1
  22. package/es/utils/coreUtil.js +2 -2
  23. package/lib/common/Video/index.js +4 -2
  24. package/lib/common/VideoPC/background.png +0 -0
  25. package/lib/common/VideoPC/closeImg.png +0 -0
  26. package/lib/common/VideoPC/components/index.js +100 -0
  27. package/lib/common/VideoPC/components/index.less +62 -0
  28. package/lib/common/VideoPC/cover.png +0 -0
  29. package/lib/common/VideoPC/index.js +748 -0
  30. package/lib/common/VideoPC/index.less +79 -0
  31. package/lib/common/index.js +8 -0
  32. package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.js +0 -1
  33. package/lib/composite-comp/dito/components/SearchDITO/defaultJSON.js +2 -1
  34. package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +8 -2
  35. package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +1 -1
  36. package/lib/composite-comp/dito/components/SearchDITO/pc/index.js +1 -2
  37. package/lib/composite-comp/dito/components/SearchDITO/pc/index.less +1 -1
  38. package/lib/composite-comp/dito/components/SlideImage/defaultJSON.js +3 -2
  39. package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +7 -2
  40. package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +5 -3
  41. package/lib/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +9 -0
  42. package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +10 -1
  43. package/lib/core/Renderer/index.js +0 -1
  44. package/lib/utils/coreUtil.js +2 -2
  45. package/package.json +1 -1
@@ -0,0 +1,79 @@
1
+ .video-container {
2
+ position: relative;
3
+ height: 100%;
4
+ background-image: linear-gradient(0, rgba(0, 0, 0, .2), rgba(0, 0, 0, .1), rgba(0, 0, 0, .2));
5
+ &:empty {
6
+ height: 400px;
7
+ }
8
+
9
+ .video-cover-img {
10
+ position: absolute;
11
+ top: 0;
12
+ right: 0;
13
+ left: 0;
14
+ bottom: 0;
15
+ object-fit: cover;
16
+ width: 100%;
17
+ height: 100%;
18
+ z-index: 0;
19
+ }
20
+
21
+ .prism-player .prism-cover {
22
+ z-index: 0;
23
+ }
24
+ .prism-player video{
25
+ position:relative !important;
26
+ left: 0 !important;
27
+ top: 0 !important;
28
+ transform: none !important;
29
+ display: block !important;
30
+ }
31
+
32
+ .video-wrap {
33
+ width: 100%;
34
+ height: 100%;
35
+ }
36
+ }
37
+
38
+ .pc-video-modal-wrap {
39
+ position: fixed;
40
+ top: 0;
41
+ left: 0;
42
+ right: 0;
43
+ bottom: 0;
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ z-index: 999;
48
+
49
+ .video-shadow-wrap {
50
+ position: fixed;
51
+ top: 0;
52
+ left: 0;
53
+ right: 0;
54
+ bottom: 0;
55
+ z-index: 1000;
56
+ opacity: .4;
57
+ background-color: #000;
58
+ }
59
+
60
+ .content-wrap {
61
+ width: 1100px;
62
+ max-width: 90%;
63
+ height: 600px;
64
+ // padding: 10px;
65
+ background: rgb(255 255 255);
66
+ border-radius: 5px;
67
+ z-index: 1001;
68
+ position: relative;
69
+
70
+ .close-img-wrap {
71
+ position: absolute;
72
+ right: 14px;
73
+ top: 14px;
74
+ width: 20px;
75
+ height: 20px;
76
+ cursor: pointer;
77
+ }
78
+ }
79
+ }
@@ -159,6 +159,12 @@ Object.defineProperty(exports, "Video", {
159
159
  return _Video["default"];
160
160
  }
161
161
  });
162
+ Object.defineProperty(exports, "VideoPC", {
163
+ enumerable: true,
164
+ get: function get() {
165
+ return _VideoPC["default"];
166
+ }
167
+ });
162
168
  Object.defineProperty(exports, "VideoUpload", {
163
169
  enumerable: true,
164
170
  get: function get() {
@@ -202,6 +208,8 @@ var _SystemNotification = _interopRequireDefault(require("./SystemNotification")
202
208
 
203
209
  var _Video = _interopRequireDefault(require("./Video"));
204
210
 
211
+ var _VideoPC = _interopRequireDefault(require("./VideoPC"));
212
+
205
213
  var _SwiperBan = _interopRequireDefault(require("./SwiperBan"));
206
214
 
207
215
  var _InputNumber = _interopRequireDefault(require("./InputNumber"));
@@ -62,7 +62,6 @@ function (_super) {
62
62
  var nextIndex = groupSource.findIndex(function (item) {
63
63
  return item.id === _mobx.store.clickedGroup;
64
64
  });
65
- console.log('nextIndex', nextIndex);
66
65
 
67
66
  if (nextIndex != -1 && nextIndex != _this.state.tabIndex) {
68
67
  _this.carouselImgRef.current.goTo(nextIndex);
@@ -71,7 +71,8 @@ var groupSourceJSON = function groupSourceJSON(parentId, type) {
71
71
  pcSize: 60,
72
72
  iconType: 'light-playicon-01',
73
73
  iconColor: 'Light'
74
- }
74
+ },
75
+ clickUrl: ''
75
76
  };
76
77
  }
77
78
  };
@@ -104,8 +104,11 @@ function (_super) {
104
104
 
105
105
  var data = this.props.data;
106
106
  return /*#__PURE__*/_react["default"].createElement("div", {
107
- className: "video-item-wrap"
108
- }, /*#__PURE__*/_react["default"].createElement(_common.Video, {
107
+ className: "video-item-wrap",
108
+ style: {
109
+ cursor: data.clickUrl ? 'pointer' : 'auto'
110
+ }
111
+ }, /*#__PURE__*/_react["default"].createElement(_common.VideoPC, {
109
112
  ref: function ref(el) {
110
113
  if (!_this.videoRefMap[data.id]) {
111
114
  _this.videoRefMap[data.id] = {
@@ -116,6 +119,9 @@ function (_super) {
116
119
  _this.setState({});
117
120
  }
118
121
  },
122
+ onClick: function onClick() {
123
+ (0, _coreUtil.clickUrl)(data.clickUrl);
124
+ },
119
125
  onEnd: function onEnd() {
120
126
  _this.videoRefMap[data.id].playing = false;
121
127
 
@@ -1,5 +1,5 @@
1
1
  .video-item-wrap {
2
- height: 700px;
2
+ // height: 700px;
3
3
  position: relative;
4
4
  margin-bottom: 10px;
5
5
 
@@ -589,7 +589,7 @@ function (_super) {
589
589
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
590
590
  color: (_h = (_g = data.content.icon) === null || _g === void 0 ? void 0 : _g.color) === null || _h === void 0 ? void 0 : _h.pc,
591
591
  onClick: function onClick() {
592
- return (0, _coreUtil.clickUrl)('/search-page');
592
+ return (0, _coreUtil.clickUrl)('/search-page?from=home');
593
593
  },
594
594
  size: 24,
595
595
  type: "icon-search-short"
@@ -656,7 +656,6 @@ function (_super) {
656
656
  }, m.image && m.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
657
657
  className: "bgImg",
658
658
  data: m.image,
659
- imgCover: true,
660
659
  isBackground: true
661
660
  }), m.video && i === carouseIndex && /*#__PURE__*/_react["default"].createElement(_VideoItem["default"], {
662
661
  data: m
@@ -175,7 +175,7 @@
175
175
 
176
176
  .carousel-img {
177
177
  .bgImg {
178
- height: 700px;
178
+ // height: 700px;
179
179
  }
180
180
  }
181
181
 
@@ -58,7 +58,7 @@ var groupSourceJSON = function groupSourceJSON(parentId) {
58
58
  fontWeight: 600,
59
59
  pcFontSize: 22,
60
60
  color: '#232F46',
61
- textAlign: 'center'
61
+ textAlign: 'left'
62
62
  },
63
63
  underline: {
64
64
  open: false,
@@ -66,7 +66,8 @@ var groupSourceJSON = function groupSourceJSON(parentId) {
66
66
  textDecorationStyle: 'solid'
67
67
  },
68
68
  vertical: {}
69
- }
69
+ },
70
+ clickUrl: ''
70
71
  };
71
72
  };
72
73
 
@@ -15,6 +15,8 @@ var _VideoItem = _interopRequireDefault(require("../VideoItem"));
15
15
 
16
16
  require("./index.less");
17
17
 
18
+ var _coreUtil = require("../../../../../../../utils/coreUtil");
19
+
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
21
 
20
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); }
@@ -75,14 +77,17 @@ function (_super) {
75
77
  rest = __rest(_a, ["data"]);
76
78
 
77
79
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", _extends({
78
- className: (0, _classnames["default"])('slide-image-card-item-wrap')
80
+ className: (0, _classnames["default"])('slide-image-card-item-wrap'),
81
+ onClick: function onClick() {
82
+ return (0, _coreUtil.clickUrl)(data.clickUrl || '');
83
+ }
79
84
  }, rest), /*#__PURE__*/_react["default"].createElement(_VideoItem["default"], {
80
85
  data: data
81
86
  }), data.groupName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
82
87
  className: "img-text",
83
88
  data: data.groupName,
84
89
  style: {
85
- pointerEvents: 'none'
90
+ pointerEvents: (0, _coreUtil.isDesignMode)() ? 'unset' : 'none'
86
91
  }
87
92
  })));
88
93
  };
@@ -59,10 +59,12 @@ function ParallaxScroll(_a) {
59
59
  var translateThird = (0, _framerMotion.useTransform)(scrollYProgress, [0, 1], [0, colThreeScrollY]);
60
60
  (0, _react.useEffect)(function () {
61
61
  setTimeout(function () {
62
+ var _a, _b, _c;
63
+
62
64
  if (!(0, _coreUtil.isDesignMode)()) {
63
- var colOneHeight = colOneRef.current.offsetHeight;
64
- var colTwoHeight = colTwoRef.current.offsetHeight;
65
- var colThreeHeight = colThreeRef.current.offsetHeight;
65
+ var colOneHeight = (_a = colOneRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
66
+ var colTwoHeight = (_b = colTwoRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight;
67
+ var colThreeHeight = (_c = colThreeRef.current) === null || _c === void 0 ? void 0 : _c.offsetHeight;
66
68
  var colHeights = [colOneHeight, colTwoHeight, colThreeHeight];
67
69
  var space = Math.max.apply(Math, colHeights) - Math.min.apply(Math, colHeights) - 20;
68
70
  var minHeightIndex = colHeights.indexOf(Math.min.apply(Math, colHeights));
@@ -202,6 +202,15 @@ function (_super) {
202
202
  },
203
203
  showNow: false,
204
204
  value: (0, _moment["default"])(panelProps.video.startAt / 60 + ":" + panelProps.video.startAt % 60, 'mm:ss')
205
+ })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
206
+ title: "URL"
207
+ }, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
208
+ onChange: function onChange(v) {
209
+ panelProps.clickUrl = v;
210
+
211
+ _this.reRender();
212
+ },
213
+ value: panelProps.clickUrl
205
214
  })), /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
206
215
  headerSize: "middle",
207
216
  onRefresh: function onRefresh() {
@@ -182,7 +182,16 @@ function (_super) {
182
182
  _this.reRender();
183
183
  },
184
184
  value: panelProps.video.sourceUrl
185
- }), /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
185
+ }), /*#__PURE__*/_react["default"].createElement(_common.Field, {
186
+ title: "URL"
187
+ }, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
188
+ onChange: function onChange(v) {
189
+ panelProps.clickUrl = v;
190
+
191
+ _this.reRender();
192
+ },
193
+ value: panelProps.clickUrl
194
+ })), /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
186
195
  headerSize: "middle",
187
196
  onRefresh: function onRefresh() {
188
197
  return (0, _coreUtil.renderPreview)();
@@ -46,7 +46,6 @@ var setDesignConfig = function setDesignConfig(props) {
46
46
  device = props.device,
47
47
  isPreview = props.isPreview,
48
48
  projectCode = props.projectCode;
49
- console.log('window.magicDesign', props);
50
49
  window.magicDesign = __assign(__assign({
51
50
  pageBackground: '#f2f2f2',
52
51
  mode: 'renderer',
@@ -313,6 +313,7 @@ var createProdCardModal = function createProdCardModal(ids) {
313
313
  return __generator(this, function (_b) {
314
314
  switch (_b.label) {
315
315
  case 0:
316
+ console.log('ids', ids);
316
317
  if (ids.length === 0) return [2
317
318
  /*return*/
318
319
  ];
@@ -375,10 +376,9 @@ var clickUrl = function clickUrl(url, state) {
375
376
  createProdCardModal(params.offerIds);
376
377
  return;
377
378
  }
378
-
379
- return;
380
379
  /** 锚点跳转 */
381
380
 
381
+
382
382
  if (params.type === 'ANCHOR') {
383
383
  ensure(function () {
384
384
  var nodeId = isPc() ? params.data.pcNodeId : params.data.mobileNodeId;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.142",
4
+ "version": "1.0.145",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",