@fonixtree/magic-design 0.0.159 → 0.0.161

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 (57) hide show
  1. package/es/common/ImageModal/CommonModal/index.js +0 -1
  2. package/es/common/LinkModal/FilteredProductModal/index.js +1 -1
  3. package/es/common/SwiperBan/index.less +1 -1
  4. package/es/common/Video/index.js +9 -6
  5. package/es/common/Video/index.less +9 -0
  6. package/es/composite-comp/bol/components/Video/components/ShareBtn/index.less +2 -2
  7. package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -2
  8. package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -0
  9. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +31 -22
  10. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
  11. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +31 -23
  12. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +2 -1
  13. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +31 -22
  14. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +3 -2
  15. package/es/composite-comp/bol/components/Video/mobile/index.js +0 -1
  16. package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
  17. package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
  18. package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +42 -41
  19. package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
  20. package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
  21. package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
  22. package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
  23. package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
  24. package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
  25. package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
  26. package/es/locale/en/en.json +1 -0
  27. package/es/locale/es/es.json +1 -0
  28. package/es/locale/id/id.json +1 -0
  29. package/lib/common/ImageModal/CommonModal/index.js +0 -1
  30. package/lib/common/LinkModal/FilteredProductModal/index.js +1 -1
  31. package/lib/common/SwiperBan/index.less +1 -1
  32. package/lib/common/Video/index.js +9 -6
  33. package/lib/common/Video/index.less +9 -0
  34. package/lib/composite-comp/bol/components/Video/components/ShareBtn/index.less +2 -2
  35. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -2
  36. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -0
  37. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +31 -22
  38. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
  39. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +31 -23
  40. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +2 -1
  41. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +31 -22
  42. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +3 -2
  43. package/lib/composite-comp/bol/components/Video/mobile/index.js +0 -1
  44. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
  45. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
  46. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +42 -41
  47. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
  48. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
  49. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
  50. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
  51. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
  52. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
  53. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
  54. package/lib/locale/en/en.json +1 -0
  55. package/lib/locale/es/es.json +1 -0
  56. package/lib/locale/id/id.json +1 -0
  57. package/package.json +1 -1
@@ -28,6 +28,7 @@
28
28
  width: 100px;
29
29
  height: 100px;
30
30
  z-index: 1;
31
+ cursor: pointer;
31
32
 
32
33
  img {
33
34
  width: 100%;
@@ -81,6 +81,27 @@ function (_super) {
81
81
  /** 视频ref映射 */
82
82
 
83
83
  _this.videoRefMap = {};
84
+
85
+ _this.playOrPause = function (group) {
86
+ (0, _commonUtil.ensure)(function () {
87
+ if (_this.videoRefMap[group.id].playing) {
88
+ _this.videoRefMap[group.id].playing = false;
89
+
90
+ _this.videoRefMap[group.id].el.player.pause();
91
+ } else {
92
+ if (group.video.playPosition == 'Popup') {
93
+ _this.videoRefMap[group.id].el.fullPlay('pc');
94
+ } else {
95
+ _this.videoRefMap[group.id].playing = true;
96
+
97
+ _this.videoRefMap[group.id].el.player.play();
98
+ }
99
+ }
100
+
101
+ _this.setState({});
102
+ });
103
+ };
104
+
84
105
  return _this;
85
106
  }
86
107
 
@@ -91,7 +112,7 @@ function (_super) {
91
112
  return /*#__PURE__*/_react["default"].createElement("div", {
92
113
  className: "video-layout4-wrap"
93
114
  }, data.groupSource.map(function (group) {
94
- var _a;
115
+ var _a, _b;
95
116
  /** 当前是否在播放 */
96
117
 
97
118
 
@@ -101,25 +122,6 @@ function (_super) {
101
122
  }, /*#__PURE__*/_react["default"].createElement("div", {
102
123
  key: group.id,
103
124
  className: "video-item-wrap",
104
- onClick: function onClick() {
105
- (0, _commonUtil.ensure)(function () {
106
- if (_this.videoRefMap[group.id].playing) {
107
- _this.videoRefMap[group.id].playing = false;
108
-
109
- _this.videoRefMap[group.id].el.player.pause();
110
- } else {
111
- if (group.video.playPosition == 'Popup') {
112
- _this.videoRefMap[group.id].el.fullPlay('pc');
113
- } else {
114
- _this.videoRefMap[group.id].playing = true;
115
-
116
- _this.videoRefMap[group.id].el.player.play();
117
- }
118
- }
119
-
120
- _this.setState({});
121
- });
122
- },
123
125
  style: {
124
126
  height: data.pcHeight
125
127
  }
@@ -138,12 +140,16 @@ function (_super) {
138
140
  cover: (0, _coreUtil.getVideoCover)(group),
139
141
  source: group.video.sourceUrl
140
142
  }),
143
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
141
144
  videoId: group.id
142
145
  }), !isPlaying && /*#__PURE__*/_react["default"].createElement("div", {
143
146
  className: (0, _classnames["default"])('play-btn', {
144
147
  middle: group.video.playButton == 'Middle',
145
148
  bottomLeft: group.video.playButton == 'Bottom Left'
146
- })
149
+ }),
150
+ onClick: function onClick() {
151
+ _this.playOrPause(group);
152
+ }
147
153
  }, /*#__PURE__*/_react["default"].createElement("img", {
148
154
  alt: "",
149
155
  src: _playCircle["default"]
@@ -162,6 +168,9 @@ function (_super) {
162
168
  data: group,
163
169
  layout: 'pc-' + data.customize.layout.pcLayout,
164
170
  noShare: true,
171
+ onPlayClick: function onPlayClick() {
172
+ return _this.playOrPause(group);
173
+ },
165
174
  position: "relative"
166
175
  })));
167
176
  }));
@@ -30,6 +30,7 @@
30
30
  width: 70px;
31
31
  height: 70px;
32
32
  z-index: 1;
33
+ cursor: pointer;
33
34
 
34
35
  img {
35
36
  width: 100%;
@@ -81,6 +81,27 @@ function (_super) {
81
81
  /** 视频ref映射 */
82
82
 
83
83
  _this.videoRefMap = {};
84
+
85
+ _this.playOrPause = function (group) {
86
+ (0, _commonUtil.ensure)(function () {
87
+ if (_this.videoRefMap[group.id].playing) {
88
+ _this.videoRefMap[group.id].playing = false;
89
+
90
+ _this.videoRefMap[group.id].el.player.pause();
91
+ } else {
92
+ if (group.video.playPosition == 'Popup') {
93
+ _this.videoRefMap[group.id].el.fullPlay('pc');
94
+ } else {
95
+ _this.videoRefMap[group.id].playing = true;
96
+
97
+ _this.videoRefMap[group.id].el.player.play();
98
+ }
99
+ }
100
+
101
+ _this.setState({});
102
+ });
103
+ };
104
+
84
105
  return _this;
85
106
  }
86
107
 
@@ -91,7 +112,7 @@ function (_super) {
91
112
  return /*#__PURE__*/_react["default"].createElement("div", {
92
113
  className: "video-layout5-wrap"
93
114
  }, data.groupSource.map(function (group) {
94
- var _a;
115
+ var _a, _b;
95
116
  /** 当前是否在播放 */
96
117
 
97
118
 
@@ -101,25 +122,6 @@ function (_super) {
101
122
  }, /*#__PURE__*/_react["default"].createElement("div", {
102
123
  key: group.id,
103
124
  className: "video-item-wrap",
104
- onClick: function onClick() {
105
- (0, _commonUtil.ensure)(function () {
106
- if (_this.videoRefMap[group.id].playing) {
107
- _this.videoRefMap[group.id].playing = false;
108
-
109
- _this.videoRefMap[group.id].el.player.pause();
110
- } else {
111
- if (group.video.playPosition == 'Popup') {
112
- _this.videoRefMap[group.id].el.fullPlay('pc');
113
- } else {
114
- _this.videoRefMap[group.id].playing = true;
115
-
116
- _this.videoRefMap[group.id].el.player.play();
117
- }
118
- }
119
-
120
- _this.setState({});
121
- });
122
- },
123
125
  style: {
124
126
  height: data.pcHeight
125
127
  }
@@ -138,12 +140,16 @@ function (_super) {
138
140
  cover: (0, _coreUtil.getVideoCover)(group),
139
141
  source: group.video.sourceUrl
140
142
  }),
143
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
141
144
  videoId: group.id
142
145
  }), !isPlaying && /*#__PURE__*/_react["default"].createElement("div", {
143
146
  className: (0, _classnames["default"])('play-btn', {
144
147
  middle: group.video.playButton == 'Middle',
145
148
  bottomLeft: group.video.playButton == 'Bottom Left'
146
- })
149
+ }),
150
+ onClick: function onClick() {
151
+ _this.playOrPause(group);
152
+ }
147
153
  }, /*#__PURE__*/_react["default"].createElement("img", {
148
154
  alt: "",
149
155
  src: _playCircle["default"]
@@ -162,6 +168,9 @@ function (_super) {
162
168
  data: group,
163
169
  layout: 'pc-' + data.customize.layout.pcLayout,
164
170
  noShare: true,
171
+ onPlayClick: function onPlayClick() {
172
+ return _this.playOrPause(group);
173
+ },
165
174
  position: "relative"
166
175
  })));
167
176
  }));
@@ -27,6 +27,7 @@
27
27
  width: 60px;
28
28
  height: 60px;
29
29
  z-index: 1;
30
+ cursor: pointer;
30
31
 
31
32
  img {
32
33
  width: 100%;
@@ -1,4 +1,5 @@
1
1
  {
2
+ "VIDEO": "Video",
2
3
  "BACK": "Back",
3
4
  "VIDEO_HEIGHT": "Video Height",
4
5
  "HEIGHT": "Height",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "VIDEO": "Video",
2
3
  "BACK": "Back",
3
4
  "VIDEO_HEIGHT": "Video Height",
4
5
  "HEIGHT": "Height",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "VIDEO": "Video",
2
3
  "BACK": "Back",
3
4
  "VIDEO_HEIGHT": "Video Height",
4
5
  "HEIGHT": "Height",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.159",
4
+ "version": "0.0.161",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",