@fonixtree/magic-design 1.0.131 → 1.0.132
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 +11 -3
- package/es/assets/fonts/magic-box-iconfont.js +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/images/layout-icon/grouped-carousel-layout1.png +0 -0
- package/es/assets/images/layout-icon/news-layout1.png +0 -0
- package/es/assets/images/layout-icon/search-dito-layout1.png +0 -0
- package/es/assets/images/layout-icon/slide-image-layout1.png +0 -0
- package/es/assets/less/global.less +1 -0
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +30 -0
- package/es/composite-comp/dito/components/GroupedCarousel/defaultJSON.js +313 -0
- package/es/composite-comp/dito/components/GroupedCarousel/index.js +86 -0
- package/es/composite-comp/dito/components/GroupedCarousel/pc/index.js +194 -0
- package/es/composite-comp/dito/components/GroupedCarousel/pc/index.less +65 -0
- package/es/composite-comp/dito/components/News/defaultJSON.js +176 -0
- package/es/composite-comp/dito/components/News/index.js +84 -0
- package/es/composite-comp/dito/components/News/pc/index.js +113 -0
- package/es/composite-comp/dito/components/News/pc/index.less +46 -0
- package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +0 -10
- package/es/composite-comp/dito/components/SearchDITO/defaultJSON.js +215 -0
- package/es/composite-comp/dito/components/SearchDITO/index.js +86 -0
- package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +146 -0
- package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +25 -0
- package/es/composite-comp/dito/components/SearchDITO/pc/index.js +591 -0
- package/es/composite-comp/dito/components/SearchDITO/pc/index.less +162 -0
- package/es/composite-comp/dito/components/SlideImage/defaultJSON.js +117 -0
- package/es/composite-comp/dito/components/SlideImage/index.js +86 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +96 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.less +1 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +140 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.less +12 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/SvgMask/imgs/mask.svg +0 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.js +88 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.less +5 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +121 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.less +20 -0
- package/es/composite-comp/dito/components/SlideImage/pc/index.js +26 -0
- package/es/composite-comp/dito/components/SlideImage/pc/index.less +1 -0
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.js +149 -0
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.js +93 -0
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.less +0 -0
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/index.js +106 -0
- package/es/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.js +148 -0
- package/es/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.js +101 -0
- package/es/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.less +0 -0
- package/es/composite-comp/dito/config-panels/NewsConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/NewsConfig/index.js +114 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.js +156 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.less +7 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.js +179 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.less +0 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.js +181 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.less +9 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/SearchDITOConfig/index.js +69 -0
- package/es/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.js +150 -0
- package/es/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/SlideImageConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/SlideImageConfig/index.js +108 -0
- package/es/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.js +198 -0
- package/es/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.less +0 -0
- package/es/composite-comp/dito/second-config-panels/NewsSecondConfig/index.js +133 -0
- package/es/composite-comp/dito/second-config-panels/NewsSecondConfig/index.less +8 -0
- package/es/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +357 -0
- package/es/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.less +79 -0
- package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +349 -0
- package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.less +0 -0
- package/es/constants/component-types.js +27 -3
- package/es/constants/index.js +16 -0
- package/es/constants/layout.js +34 -2
- package/es/locale/en/en.json +5 -1
- package/es/locale/es/es.json +5 -1
- package/es/locale/id/id.json +5 -1
- package/es/meta-comp/components/Button/editable.js +3 -1
- package/es/meta-comp/components/Button/index.js +2 -1
- package/es/meta-comp/components/Image/index.js +11 -4
- package/es/meta-comp/components/Image/index.less +7 -0
- package/es/utils/commonUtil.js +4 -1
- package/es/utils/pluginsUtil.js +1 -0
- package/lib/assets/fonts/magic-box-iconfont.css +11 -3
- package/lib/assets/fonts/magic-box-iconfont.js +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/images/layout-icon/grouped-carousel-layout1.png +0 -0
- package/lib/assets/images/layout-icon/news-layout1.png +0 -0
- package/lib/assets/images/layout-icon/search-dito-layout1.png +0 -0
- package/lib/assets/images/layout-icon/slide-image-layout1.png +0 -0
- package/lib/assets/less/global.less +1 -0
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +30 -0
- package/lib/composite-comp/dito/components/GroupedCarousel/defaultJSON.js +313 -0
- package/lib/composite-comp/dito/components/GroupedCarousel/index.js +86 -0
- package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.js +194 -0
- package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.less +65 -0
- package/lib/composite-comp/dito/components/News/defaultJSON.js +176 -0
- package/lib/composite-comp/dito/components/News/index.js +84 -0
- package/lib/composite-comp/dito/components/News/pc/index.js +113 -0
- package/lib/composite-comp/dito/components/News/pc/index.less +46 -0
- package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +0 -10
- package/lib/composite-comp/dito/components/SearchDITO/defaultJSON.js +215 -0
- package/lib/composite-comp/dito/components/SearchDITO/index.js +86 -0
- package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +146 -0
- package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +25 -0
- package/lib/composite-comp/dito/components/SearchDITO/pc/index.js +591 -0
- package/lib/composite-comp/dito/components/SearchDITO/pc/index.less +162 -0
- package/lib/composite-comp/dito/components/SlideImage/defaultJSON.js +117 -0
- package/lib/composite-comp/dito/components/SlideImage/index.js +86 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +96 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.less +1 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +140 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.less +12 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/SvgMask/imgs/mask.svg +0 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.js +88 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.less +5 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +121 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.less +20 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/index.js +26 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/index.less +1 -0
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.js +149 -0
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.js +93 -0
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/index.js +106 -0
- package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.js +148 -0
- package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.js +101 -0
- package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/NewsConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/NewsConfig/index.js +114 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.js +156 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.less +7 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.js +179 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.js +181 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.less +9 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/SearchDITOConfig/index.js +69 -0
- package/lib/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.js +150 -0
- package/lib/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/SlideImageConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/SlideImageConfig/index.js +108 -0
- package/lib/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.js +198 -0
- package/lib/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.less +0 -0
- package/lib/composite-comp/dito/second-config-panels/NewsSecondConfig/index.js +133 -0
- package/lib/composite-comp/dito/second-config-panels/NewsSecondConfig/index.less +8 -0
- package/lib/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +357 -0
- package/lib/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.less +79 -0
- package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +349 -0
- package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.less +0 -0
- package/lib/constants/component-types.js +27 -3
- package/lib/constants/index.js +16 -0
- package/lib/constants/layout.js +34 -2
- package/lib/locale/en/en.json +5 -1
- package/lib/locale/es/es.json +5 -1
- package/lib/locale/id/id.json +5 -1
- package/lib/meta-comp/components/Button/editable.js +3 -1
- package/lib/meta-comp/components/Button/index.js +2 -1
- package/lib/meta-comp/components/Image/index.js +11 -4
- package/lib/meta-comp/components/Image/index.less +7 -0
- package/lib/utils/commonUtil.js +4 -1
- package/lib/utils/pluginsUtil.js +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,88 @@
|
|
|
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"] = SvgMask;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _framerMotion = require("framer-motion");
|
|
13
|
+
|
|
14
|
+
require("./index.less");
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
function SvgMask(_a) {
|
|
21
|
+
var children = _a.children,
|
|
22
|
+
revealText = _a.revealText,
|
|
23
|
+
_b = _a.size,
|
|
24
|
+
size = _b === void 0 ? 10 : _b,
|
|
25
|
+
_c = _a.revealSize,
|
|
26
|
+
revealSize = _c === void 0 ? 600 : _c,
|
|
27
|
+
className = _a.className;
|
|
28
|
+
|
|
29
|
+
var _d = (0, _react.useState)(false),
|
|
30
|
+
isHovered = _d[0],
|
|
31
|
+
setIsHovered = _d[1];
|
|
32
|
+
|
|
33
|
+
var _e = (0, _react.useState)({
|
|
34
|
+
x: null,
|
|
35
|
+
y: null
|
|
36
|
+
}),
|
|
37
|
+
mousePosition = _e[0],
|
|
38
|
+
setMousePosition = _e[1];
|
|
39
|
+
|
|
40
|
+
var containerRef = (0, _react.useRef)(null);
|
|
41
|
+
|
|
42
|
+
var updateMousePosition = function updateMousePosition(e) {
|
|
43
|
+
var rect = containerRef.current.getBoundingClientRect();
|
|
44
|
+
console.log('...', rect);
|
|
45
|
+
setMousePosition({
|
|
46
|
+
x: e.clientX - rect.left,
|
|
47
|
+
y: e.clientY - rect.top
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
(0, _react.useEffect)(function () {
|
|
52
|
+
containerRef.current.addEventListener('mousemove', updateMousePosition);
|
|
53
|
+
return function () {
|
|
54
|
+
if (containerRef.current) {
|
|
55
|
+
containerRef.current.removeEventListener('mousemove', updateMousePosition);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}, []);
|
|
59
|
+
var maskSize = isHovered ? revealSize : size;
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
61
|
+
ref: containerRef,
|
|
62
|
+
animate: {
|
|
63
|
+
backgroundColor: isHovered ? '#000' : '#fff'
|
|
64
|
+
},
|
|
65
|
+
className: "m-svg-mask"
|
|
66
|
+
}, /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
67
|
+
animate: {
|
|
68
|
+
maskPosition: mousePosition.x - maskSize / 2 + "px " + (mousePosition.y - maskSize / 2) + "px",
|
|
69
|
+
maskSize: maskSize + "px"
|
|
70
|
+
},
|
|
71
|
+
className: "w-full h-full flex items-center justify-center text-6xl absolute bg-black bg-grid-white/[0.2] text-white [mask-image:url(./imgs/mask.svg)] [mask-size:40px] [mask-repeat:no-repeat]",
|
|
72
|
+
transition: {
|
|
73
|
+
duration: 0
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
+
className: "absolute inset-0 bg-black h-full w-full z-0 opacity-50"
|
|
77
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
+
className: "max-w-4xl mx-auto text-center text-white text-4xl font-bold relative z-20",
|
|
79
|
+
onMouseEnter: function onMouseEnter() {
|
|
80
|
+
setIsHovered(true);
|
|
81
|
+
},
|
|
82
|
+
onMouseLeave: function onMouseLeave() {
|
|
83
|
+
setIsHovered(false);
|
|
84
|
+
}
|
|
85
|
+
}, children)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "w-full h-full flex items-center justify-center text-white"
|
|
87
|
+
}, revealText));
|
|
88
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
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 _commonUtil = require("../../../../../../../utils/commonUtil");
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
17
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
18
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
19
|
+
__proto__: []
|
|
20
|
+
} instanceof Array && function (d, b) {
|
|
21
|
+
d.__proto__ = b;
|
|
22
|
+
} || function (d, b) {
|
|
23
|
+
for (var p in b) {
|
|
24
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return _extendStatics(d, b);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return function (d, b) {
|
|
32
|
+
_extendStatics(d, b);
|
|
33
|
+
|
|
34
|
+
function __() {
|
|
35
|
+
this.constructor = d;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
39
|
+
};
|
|
40
|
+
}();
|
|
41
|
+
|
|
42
|
+
var Layout1 =
|
|
43
|
+
/** @class */
|
|
44
|
+
function (_super) {
|
|
45
|
+
__extends(Layout1, _super);
|
|
46
|
+
|
|
47
|
+
function Layout1() {
|
|
48
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
|
+
|
|
50
|
+
_this.state = {
|
|
51
|
+
playing: false
|
|
52
|
+
};
|
|
53
|
+
_this.videoRef = /*#__PURE__*/_react["default"].createRef();
|
|
54
|
+
/** 视频ref映射 */
|
|
55
|
+
|
|
56
|
+
_this.videoRefMap = {};
|
|
57
|
+
|
|
58
|
+
_this.playOrPause = function (group) {
|
|
59
|
+
(0, _commonUtil.ensure)(function () {
|
|
60
|
+
if (_this.videoRefMap[group.id].playing) {
|
|
61
|
+
_this.videoRefMap[group.id].playing = false;
|
|
62
|
+
|
|
63
|
+
_this.videoRefMap[group.id].el.player.pause();
|
|
64
|
+
} else {
|
|
65
|
+
if (group.video.playPosition == 'Popup') {
|
|
66
|
+
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
67
|
+
} else {
|
|
68
|
+
_this.videoRefMap[group.id].playing = true;
|
|
69
|
+
|
|
70
|
+
_this.videoRefMap[group.id].el.player.play();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
_this.setState({});
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
_this.onMouseEnter = function () {
|
|
79
|
+
_this.videoRef.current.play();
|
|
80
|
+
|
|
81
|
+
_this.setState({
|
|
82
|
+
playing: true
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
_this.onMouseLeave = function () {
|
|
87
|
+
_this.videoRef.current.pause();
|
|
88
|
+
|
|
89
|
+
_this.setState({
|
|
90
|
+
playing: false
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
return _this;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
Layout1.prototype.render = function () {
|
|
98
|
+
var _a, _b, _c, _d, _e;
|
|
99
|
+
|
|
100
|
+
var data = this.props.data;
|
|
101
|
+
var playing = this.state.playing;
|
|
102
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
className: "slide-image-video-wrap",
|
|
104
|
+
onMouseEnter: this.onMouseEnter,
|
|
105
|
+
onMouseLeave: this.onMouseLeave
|
|
106
|
+
}, ((_a = data.video) === null || _a === void 0 ? void 0 : _a.sourceUrl) && /*#__PURE__*/_react["default"].createElement("video", {
|
|
107
|
+
ref: this.videoRef,
|
|
108
|
+
src: (_b = data.video) === null || _b === void 0 ? void 0 : _b.sourceUrl
|
|
109
|
+
}), !playing && ((_c = data.overilay) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement("img", {
|
|
110
|
+
className: "video-cover-img",
|
|
111
|
+
src: (_e = (_d = data.overilay) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.pcImgSrc,
|
|
112
|
+
alt: ""
|
|
113
|
+
}));
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
Layout1.defaultProps = {};
|
|
117
|
+
return Layout1;
|
|
118
|
+
}(_react["default"].Component);
|
|
119
|
+
|
|
120
|
+
var _default = Layout1;
|
|
121
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.slide-image-video-wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
|
|
5
|
+
video {
|
|
6
|
+
width: 100%;
|
|
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
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = SlideImagePc;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./index.less");
|
|
11
|
+
|
|
12
|
+
var _ParallaxScroll = _interopRequireDefault(require("./components/ParallaxScroll"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
function SlideImagePc(props) {
|
|
17
|
+
var columnSpace = props.panelProps.spacing.pc.columnSpace;
|
|
18
|
+
var lineSpace = props.panelProps.spacing.pc.lineSpace;
|
|
19
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
|
+
className: "m-slide-image-pc"
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement(_ParallaxScroll["default"], {
|
|
22
|
+
source: props.panelProps.groupSource,
|
|
23
|
+
xGap: columnSpace,
|
|
24
|
+
yGap: lineSpace
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.m-slide-image-pc {}
|
|
@@ -0,0 +1,149 @@
|
|
|
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 _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _defaultImg = _interopRequireDefault(require("../imgs/defaultImg.png"));
|
|
13
|
+
|
|
14
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
15
|
+
|
|
16
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
17
|
+
|
|
18
|
+
var _defaultJSON = require("../../../components/GroupedCarousel/defaultJSON");
|
|
19
|
+
|
|
20
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
21
|
+
|
|
22
|
+
require("./index.less");
|
|
23
|
+
|
|
24
|
+
var _locale = require("../../../../../locale");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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
|
+
|
|
30
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
31
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
32
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
33
|
+
__proto__: []
|
|
34
|
+
} instanceof Array && function (d, b) {
|
|
35
|
+
d.__proto__ = b;
|
|
36
|
+
} || function (d, b) {
|
|
37
|
+
for (var p in b) {
|
|
38
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return _extendStatics(d, b);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return function (d, b) {
|
|
46
|
+
_extendStatics(d, b);
|
|
47
|
+
|
|
48
|
+
function __() {
|
|
49
|
+
this.constructor = d;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
53
|
+
};
|
|
54
|
+
}();
|
|
55
|
+
|
|
56
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
57
|
+
var c = arguments.length,
|
|
58
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
59
|
+
d;
|
|
60
|
+
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--) {
|
|
61
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
62
|
+
}
|
|
63
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var notice = '';
|
|
67
|
+
|
|
68
|
+
var GroupedCarouselConfigGroup =
|
|
69
|
+
/** @class */
|
|
70
|
+
function (_super) {
|
|
71
|
+
__extends(GroupedCarouselConfigGroup, _super);
|
|
72
|
+
|
|
73
|
+
function GroupedCarouselConfigGroup() {
|
|
74
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
|
|
76
|
+
_this.state = {};
|
|
77
|
+
|
|
78
|
+
_this.onClickItem = function (node) {
|
|
79
|
+
_this.props.store.setState({
|
|
80
|
+
clickedGroup: node.id
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
_this.onAddClick = function () {
|
|
85
|
+
var json = (0, _defaultJSON.groupSourceJSON)(_this.props.id, '', 'Tab');
|
|
86
|
+
|
|
87
|
+
_this.props.source.push(json);
|
|
88
|
+
|
|
89
|
+
_this.setState({});
|
|
90
|
+
|
|
91
|
+
(0, _coreUtil.renderPreview)();
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
_this.reRender = function () {
|
|
95
|
+
_this.setState({});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return _this;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
GroupedCarouselConfigGroup.prototype.render = function () {
|
|
102
|
+
var source = this.props.source;
|
|
103
|
+
|
|
104
|
+
var _renderCard = function renderCard(src) {
|
|
105
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
className: "card_wrap"
|
|
107
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
108
|
+
alt: "",
|
|
109
|
+
src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
|
|
110
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
|
+
className: "name",
|
|
112
|
+
dangerouslySetInnerHTML: {
|
|
113
|
+
__html: src.groupName.text
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
}; // console.log('00 reacommend source', JSON.stringify(source));
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
120
|
+
className: "group_wrap"
|
|
121
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
+
className: "node_list"
|
|
123
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
124
|
+
className: "notice"
|
|
125
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
126
|
+
onClickItem: this.onClickItem,
|
|
127
|
+
renderCard: function renderCard(v) {
|
|
128
|
+
return _renderCard(v);
|
|
129
|
+
},
|
|
130
|
+
reRender: this.reRender,
|
|
131
|
+
source: source
|
|
132
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
+
className: "btn_wrap"
|
|
134
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
135
|
+
icon: "icon-add",
|
|
136
|
+
onClick: this.onAddClick,
|
|
137
|
+
type: "primary"
|
|
138
|
+
}, (0, _locale.i18n)('ADD_GROUP'))));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
GroupedCarouselConfigGroup.defaultProps = {
|
|
142
|
+
source: []
|
|
143
|
+
};
|
|
144
|
+
GroupedCarouselConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], GroupedCarouselConfigGroup);
|
|
145
|
+
return GroupedCarouselConfigGroup;
|
|
146
|
+
}(_react["default"].Component);
|
|
147
|
+
|
|
148
|
+
var _default = GroupedCarouselConfigGroup;
|
|
149
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,93 @@
|
|
|
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 _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
11
|
+
|
|
12
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../../common");
|
|
15
|
+
|
|
16
|
+
var _locale = require("../../../../../locale");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
21
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
22
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
23
|
+
__proto__: []
|
|
24
|
+
} instanceof Array && function (d, b) {
|
|
25
|
+
d.__proto__ = b;
|
|
26
|
+
} || function (d, b) {
|
|
27
|
+
for (var p in b) {
|
|
28
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return _extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return function (d, b) {
|
|
36
|
+
_extendStatics(d, b);
|
|
37
|
+
|
|
38
|
+
function __() {
|
|
39
|
+
this.constructor = d;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
};
|
|
44
|
+
}();
|
|
45
|
+
|
|
46
|
+
var AComponent =
|
|
47
|
+
/** @class */
|
|
48
|
+
function (_super) {
|
|
49
|
+
__extends(AComponent, _super);
|
|
50
|
+
|
|
51
|
+
function AComponent() {
|
|
52
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53
|
+
|
|
54
|
+
_this.state = {};
|
|
55
|
+
|
|
56
|
+
_this.reRender = function () {
|
|
57
|
+
(0, _coreUtil.renderPreview)();
|
|
58
|
+
|
|
59
|
+
_this.setState({});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
AComponent.prototype.render = function () {
|
|
66
|
+
var panelProps = this.props.panelProps;
|
|
67
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
|
+
className: "grouped_carousel_content"
|
|
69
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
70
|
+
headerSize: "middle",
|
|
71
|
+
onRefresh: this.reRender,
|
|
72
|
+
source: [{
|
|
73
|
+
key: '1',
|
|
74
|
+
name: (0, _locale.i18n)('HEADLINE'),
|
|
75
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
76
|
+
data: panelProps.headline
|
|
77
|
+
}),
|
|
78
|
+
metaOption: panelProps.headline
|
|
79
|
+
}],
|
|
80
|
+
type: "switch"
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
AComponent.defaultProps = {
|
|
85
|
+
panelProps: {
|
|
86
|
+
headline: {}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return AComponent;
|
|
90
|
+
}(_react["default"].Component);
|
|
91
|
+
|
|
92
|
+
var _default = AComponent;
|
|
93
|
+
exports["default"] = _default;
|
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,106 @@
|
|
|
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 _ConfigGroup = _interopRequireDefault(require("./ConfigGroup"));
|
|
11
|
+
|
|
12
|
+
var _ConfigTitle = _interopRequireDefault(require("./ConfigTitle"));
|
|
13
|
+
|
|
14
|
+
var _layout = require("../../../../constants/layout");
|
|
15
|
+
|
|
16
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
17
|
+
|
|
18
|
+
var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
|
|
19
|
+
|
|
20
|
+
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
21
|
+
|
|
22
|
+
var _locale = require("../../../../locale");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
27
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
28
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
29
|
+
__proto__: []
|
|
30
|
+
} instanceof Array && function (d, b) {
|
|
31
|
+
d.__proto__ = b;
|
|
32
|
+
} || function (d, b) {
|
|
33
|
+
for (var p in b) {
|
|
34
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return _extendStatics(d, b);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return function (d, b) {
|
|
42
|
+
_extendStatics(d, b);
|
|
43
|
+
|
|
44
|
+
function __() {
|
|
45
|
+
this.constructor = d;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
49
|
+
};
|
|
50
|
+
}();
|
|
51
|
+
|
|
52
|
+
var GroupedCarouselConfig =
|
|
53
|
+
/** @class */
|
|
54
|
+
function (_super) {
|
|
55
|
+
__extends(GroupedCarouselConfig, _super);
|
|
56
|
+
|
|
57
|
+
function GroupedCarouselConfig() {
|
|
58
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
GroupedCarouselConfig.prototype.render = function () {
|
|
62
|
+
var data = this.props.data;
|
|
63
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
64
|
+
divider: "bold",
|
|
65
|
+
headerSize: "large",
|
|
66
|
+
source: [{
|
|
67
|
+
key: '1',
|
|
68
|
+
name: (0, _locale.i18n)('TITLE'),
|
|
69
|
+
value: /*#__PURE__*/_react["default"].createElement(_ConfigTitle["default"], {
|
|
70
|
+
panelProps: data.title
|
|
71
|
+
})
|
|
72
|
+
}, {
|
|
73
|
+
key: '2',
|
|
74
|
+
name: (0, _locale.i18n)('GROUP'),
|
|
75
|
+
value: /*#__PURE__*/_react["default"].createElement(_ConfigGroup["default"], {
|
|
76
|
+
id: data.id,
|
|
77
|
+
source: data.groupSource
|
|
78
|
+
})
|
|
79
|
+
}, {
|
|
80
|
+
key: '3',
|
|
81
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
82
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
83
|
+
configCompSpace: true,
|
|
84
|
+
data: data.spacing
|
|
85
|
+
})
|
|
86
|
+
}, {
|
|
87
|
+
key: '4',
|
|
88
|
+
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
89
|
+
value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
|
|
90
|
+
data: data.customize,
|
|
91
|
+
isHideAlign: true,
|
|
92
|
+
layoutSource: _layout.groupedCarouselLayout
|
|
93
|
+
})
|
|
94
|
+
}],
|
|
95
|
+
type: "triangle"
|
|
96
|
+
}));
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
GroupedCarouselConfig.defaultProps = {
|
|
100
|
+
data: {}
|
|
101
|
+
};
|
|
102
|
+
return GroupedCarouselConfig;
|
|
103
|
+
}(_react["default"].Component);
|
|
104
|
+
|
|
105
|
+
var _default = GroupedCarouselConfig;
|
|
106
|
+
exports["default"] = _default;
|