@fonixtree/magic-design 1.0.131 → 1.0.133
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 +330 -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 +330 -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,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.groupSourceJSON = exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var groupSourceJSON = function groupSourceJSON(parentId, type) {
|
|
11
|
+
var groupId = (0, _uuid.v4)();
|
|
12
|
+
|
|
13
|
+
if (type === 'image') {
|
|
14
|
+
return {
|
|
15
|
+
id: groupId,
|
|
16
|
+
parentId: parentId,
|
|
17
|
+
image: {
|
|
18
|
+
id: (0, _uuid.v4)(),
|
|
19
|
+
parentId: groupId,
|
|
20
|
+
open: true,
|
|
21
|
+
type: 'IMAGE',
|
|
22
|
+
content: {
|
|
23
|
+
h5Name: 'Image Name',
|
|
24
|
+
pcName: 'Image Name',
|
|
25
|
+
h5ImgSrc: '',
|
|
26
|
+
pcImgSrc: '',
|
|
27
|
+
clickUrl: ''
|
|
28
|
+
},
|
|
29
|
+
hover: {
|
|
30
|
+
open: false,
|
|
31
|
+
backgroundType: 'enlarge',
|
|
32
|
+
magnification: 1.5,
|
|
33
|
+
pcImgHoverUrl: '',
|
|
34
|
+
h5ImgHoverUrl: ''
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
} else {
|
|
39
|
+
return {
|
|
40
|
+
id: groupId,
|
|
41
|
+
parentId: parentId,
|
|
42
|
+
overilay: {
|
|
43
|
+
open: true,
|
|
44
|
+
content: {
|
|
45
|
+
h5Name: 'Video Name',
|
|
46
|
+
pcName: 'Video Name',
|
|
47
|
+
h5ImgSrc: '',
|
|
48
|
+
pcImgSrc: '',
|
|
49
|
+
clickUrl: ''
|
|
50
|
+
},
|
|
51
|
+
hover: {}
|
|
52
|
+
},
|
|
53
|
+
video: {
|
|
54
|
+
sourceType: 'Upload',
|
|
55
|
+
sourceUrl: '',
|
|
56
|
+
startAt: '',
|
|
57
|
+
progressBar: true,
|
|
58
|
+
loop: true,
|
|
59
|
+
autoplay: false,
|
|
60
|
+
videoSound: false,
|
|
61
|
+
speed: 1,
|
|
62
|
+
playPosition: 'Play in Box',
|
|
63
|
+
playButton: 'Middle'
|
|
64
|
+
},
|
|
65
|
+
playIcon: {
|
|
66
|
+
open: true,
|
|
67
|
+
parentId: groupId,
|
|
68
|
+
id: (0, _uuid.v4)(),
|
|
69
|
+
type: 'PLAY',
|
|
70
|
+
size: 48,
|
|
71
|
+
pcSize: 60,
|
|
72
|
+
iconType: 'light-playicon-01',
|
|
73
|
+
iconColor: 'Light'
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.groupSourceJSON = groupSourceJSON;
|
|
80
|
+
|
|
81
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
82
|
+
var compId = (0, _uuid.v4)();
|
|
83
|
+
return {
|
|
84
|
+
id: compId,
|
|
85
|
+
type: 'SEARCH_DITO',
|
|
86
|
+
content: {
|
|
87
|
+
logo: {
|
|
88
|
+
id: (0, _uuid.v4)(),
|
|
89
|
+
open: true,
|
|
90
|
+
type: 'IMAGE',
|
|
91
|
+
content: {
|
|
92
|
+
h5Name: 'name2',
|
|
93
|
+
pcName: 'name2',
|
|
94
|
+
h5ImgSrc: '',
|
|
95
|
+
pcImgSrc: '',
|
|
96
|
+
clickUrl: ''
|
|
97
|
+
},
|
|
98
|
+
hover: {
|
|
99
|
+
open: false,
|
|
100
|
+
backgroundType: 'enlarge',
|
|
101
|
+
magnification: 1.5,
|
|
102
|
+
pcImgHoverUrl: '',
|
|
103
|
+
h5ImgHoverUrl: ''
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
navigation: {
|
|
107
|
+
id: (0, _uuid.v4)(),
|
|
108
|
+
open: true
|
|
109
|
+
},
|
|
110
|
+
icon: {
|
|
111
|
+
open: true,
|
|
112
|
+
color: {
|
|
113
|
+
pc: '#fff'
|
|
114
|
+
},
|
|
115
|
+
searchIcon: {
|
|
116
|
+
pc: true
|
|
117
|
+
},
|
|
118
|
+
cartIcon: {
|
|
119
|
+
pc: true
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
login: {
|
|
123
|
+
id: (0, _uuid.v4)(),
|
|
124
|
+
open: true,
|
|
125
|
+
type: 'BUTTON',
|
|
126
|
+
text: 'Login',
|
|
127
|
+
content: {
|
|
128
|
+
url: '',
|
|
129
|
+
backgroundColor: '#CE1126'
|
|
130
|
+
},
|
|
131
|
+
buttonText: {
|
|
132
|
+
sizeType: 'Customize font styles',
|
|
133
|
+
fontFamily: 'Open Sans',
|
|
134
|
+
fontWeight: 500,
|
|
135
|
+
pcFontSize: 14,
|
|
136
|
+
fontStyle: 'normal',
|
|
137
|
+
color: '#fff'
|
|
138
|
+
},
|
|
139
|
+
buttonBorder: {
|
|
140
|
+
open: true,
|
|
141
|
+
borderColor: '',
|
|
142
|
+
borderRadius: 8
|
|
143
|
+
},
|
|
144
|
+
spacing: {
|
|
145
|
+
pc: {
|
|
146
|
+
paddingTop: 5,
|
|
147
|
+
paddingBottom: 5,
|
|
148
|
+
paddingLeft: 12,
|
|
149
|
+
paddingRight: 12
|
|
150
|
+
},
|
|
151
|
+
mobile: {
|
|
152
|
+
paddingTop: 0,
|
|
153
|
+
paddingBottom: 0,
|
|
154
|
+
paddingLeft: 0,
|
|
155
|
+
paddingRight: 0
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
buttonIcon: {
|
|
159
|
+
iconUrl: '',
|
|
160
|
+
layout: 'right'
|
|
161
|
+
},
|
|
162
|
+
hover: null
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
groupSource: [groupSourceJSON(compId, 'video')],
|
|
166
|
+
setting: {
|
|
167
|
+
// 自动轮播
|
|
168
|
+
autoplay: {
|
|
169
|
+
open: true,
|
|
170
|
+
interval: 3
|
|
171
|
+
},
|
|
172
|
+
// 面板指示点
|
|
173
|
+
dots: {
|
|
174
|
+
open: true,
|
|
175
|
+
layout: 'layout1',
|
|
176
|
+
color: {
|
|
177
|
+
pc: '#eee',
|
|
178
|
+
mobile: '#fff'
|
|
179
|
+
},
|
|
180
|
+
hoverColor: {
|
|
181
|
+
pc: '#fff',
|
|
182
|
+
mobile: '#fff'
|
|
183
|
+
},
|
|
184
|
+
size: {
|
|
185
|
+
pc: 16,
|
|
186
|
+
mobile: 8
|
|
187
|
+
},
|
|
188
|
+
hoverSize: {
|
|
189
|
+
pc: 16,
|
|
190
|
+
mobile: 8
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
spacing: {
|
|
195
|
+
pc: {
|
|
196
|
+
paddingTop: 0,
|
|
197
|
+
paddingBottom: 0,
|
|
198
|
+
marginBottom: window.magicDesign.compSpacing * 1.5,
|
|
199
|
+
fillUp: false
|
|
200
|
+
},
|
|
201
|
+
mobile: {
|
|
202
|
+
paddingTop: 0,
|
|
203
|
+
paddingBottom: 0,
|
|
204
|
+
paddingLeft: 0,
|
|
205
|
+
paddingRight: 0,
|
|
206
|
+
marginBottom: window.magicDesign.compSpacing
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
customize: {
|
|
210
|
+
layout: 'layout1'
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _defaultJSON = require("./defaultJSON");
|
|
11
|
+
|
|
12
|
+
var _index = _interopRequireDefault(require("./pc/index"));
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
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 __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
53
|
+
var c = arguments.length,
|
|
54
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
55
|
+
d;
|
|
56
|
+
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--) {
|
|
57
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
58
|
+
}
|
|
59
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var SearchDito =
|
|
63
|
+
/** @class */
|
|
64
|
+
function (_super) {
|
|
65
|
+
__extends(SearchDito, _super);
|
|
66
|
+
|
|
67
|
+
function SearchDito() {
|
|
68
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
SearchDito.prototype.render = function () {
|
|
72
|
+
var nodeData = this.props.nodeData;
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? /*#__PURE__*/_react["default"].createElement(_index["default"], {
|
|
74
|
+
data: nodeData
|
|
75
|
+
}) : null);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
SearchDito.defaultProps = {};
|
|
79
|
+
SearchDito.type = 'SEARCH_DITO';
|
|
80
|
+
SearchDito.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
81
|
+
SearchDito = __decorate([_compositeDecorator["default"]], SearchDito);
|
|
82
|
+
return SearchDito;
|
|
83
|
+
}(_react.Component);
|
|
84
|
+
|
|
85
|
+
var _default = SearchDito;
|
|
86
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,146 @@
|
|
|
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 _common = require("../../../../../../../common");
|
|
11
|
+
|
|
12
|
+
var _commonUtil = require("../../../../../../../utils/commonUtil");
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _PlaySvg = _interopRequireDefault(require("../../../../../../../meta-comp/config-panels/PlayIconConfig/PlaySvg"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
23
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
24
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
25
|
+
__proto__: []
|
|
26
|
+
} instanceof Array && function (d, b) {
|
|
27
|
+
d.__proto__ = b;
|
|
28
|
+
} || function (d, b) {
|
|
29
|
+
for (var p in b) {
|
|
30
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return _extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return function (d, b) {
|
|
38
|
+
_extendStatics(d, b);
|
|
39
|
+
|
|
40
|
+
function __() {
|
|
41
|
+
this.constructor = d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
|
|
48
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
49
|
+
__assign = Object.assign || function (t) {
|
|
50
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
51
|
+
s = arguments[i];
|
|
52
|
+
|
|
53
|
+
for (var p in s) {
|
|
54
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return __assign.apply(this, arguments);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var Layout1 =
|
|
65
|
+
/** @class */
|
|
66
|
+
function (_super) {
|
|
67
|
+
__extends(Layout1, _super);
|
|
68
|
+
|
|
69
|
+
function Layout1() {
|
|
70
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
+
|
|
72
|
+
_this.state = {};
|
|
73
|
+
/** 视频ref映射 */
|
|
74
|
+
|
|
75
|
+
_this.videoRefMap = {};
|
|
76
|
+
|
|
77
|
+
_this.playOrPause = function (group) {
|
|
78
|
+
(0, _commonUtil.ensure)(function () {
|
|
79
|
+
if (_this.videoRefMap[group.id].playing) {
|
|
80
|
+
_this.videoRefMap[group.id].playing = false;
|
|
81
|
+
|
|
82
|
+
_this.videoRefMap[group.id].el.player.pause();
|
|
83
|
+
} else {
|
|
84
|
+
if (group.video.playPosition == 'Popup') {
|
|
85
|
+
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
86
|
+
} else {
|
|
87
|
+
_this.videoRefMap[group.id].playing = true;
|
|
88
|
+
|
|
89
|
+
_this.videoRefMap[group.id].el.player.play();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
_this.setState({});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return _this;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
Layout1.prototype.render = function () {
|
|
101
|
+
var _this = this;
|
|
102
|
+
|
|
103
|
+
var _a, _b, _c, _d, _e;
|
|
104
|
+
|
|
105
|
+
var data = this.props.data;
|
|
106
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
|
+
className: "video-item-wrap"
|
|
108
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Video, {
|
|
109
|
+
ref: function ref(el) {
|
|
110
|
+
if (!_this.videoRefMap[data.id]) {
|
|
111
|
+
_this.videoRefMap[data.id] = {
|
|
112
|
+
el: el,
|
|
113
|
+
playing: data.video.autoplay
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
_this.setState({});
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
onEnd: function onEnd() {
|
|
120
|
+
_this.videoRefMap[data.id].playing = false;
|
|
121
|
+
|
|
122
|
+
_this.setState({});
|
|
123
|
+
},
|
|
124
|
+
opts: __assign(__assign({}, data.video), {
|
|
125
|
+
cover: (0, _coreUtil.getVideoCover)(data),
|
|
126
|
+
source: data.video.sourceUrl
|
|
127
|
+
}),
|
|
128
|
+
play: (_a = this.videoRefMap[data.id]) === null || _a === void 0 ? void 0 : _a.playing,
|
|
129
|
+
videoId: data.id
|
|
130
|
+
}), !((_b = this.videoRefMap[data.id]) === null || _b === void 0 ? void 0 : _b.playing) && data.video.playButton == 'Middle' && ((_c = data === null || data === void 0 ? void 0 : data.playIcon) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
131
|
+
className: "play-btn center",
|
|
132
|
+
onClick: function onClick() {
|
|
133
|
+
_this.playOrPause(data);
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/_react["default"].createElement(_PlaySvg["default"], {
|
|
136
|
+
imgName: (_d = data === null || data === void 0 ? void 0 : data.playIcon) === null || _d === void 0 ? void 0 : _d.iconType,
|
|
137
|
+
imgWidth: (_e = data === null || data === void 0 ? void 0 : data.playIcon) === null || _e === void 0 ? void 0 : _e.pcSize
|
|
138
|
+
})));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
Layout1.defaultProps = {};
|
|
142
|
+
return Layout1;
|
|
143
|
+
}(_react["default"].Component);
|
|
144
|
+
|
|
145
|
+
var _default = Layout1;
|
|
146
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.video-item-wrap {
|
|
2
|
+
height: 700px;
|
|
3
|
+
position: relative;
|
|
4
|
+
margin-bottom: 10px;
|
|
5
|
+
|
|
6
|
+
&:last-child {
|
|
7
|
+
margin-bottom: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.play-btn {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
left: 50%;
|
|
14
|
+
transform: translate(-50%, -50%);
|
|
15
|
+
// width: 100px;
|
|
16
|
+
// height: 100px;
|
|
17
|
+
z-index: 1;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
|
|
20
|
+
img {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|