@fonixtree/magic-design 1.0.130 → 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/PersonalInformation/mobile/index.less +4 -3
- 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/PersonalInformation/mobile/index.less +4 -3
- 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,162 @@
|
|
|
1
|
+
.m-search-dito-pc {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
|
|
5
|
+
.search-bar {
|
|
6
|
+
display: block;
|
|
7
|
+
max-width: 1200px;
|
|
8
|
+
height: 64px;
|
|
9
|
+
padding: 16px 40px;
|
|
10
|
+
border-radius: 80px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
background: rgba(0, 0, 0, 0.3);
|
|
15
|
+
border: 1px solid linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.16) 100%);
|
|
16
|
+
box-shadow: 0px 4px 16px 0px #0000001F;
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: 120px;
|
|
19
|
+
right: 120px;
|
|
20
|
+
top: 12px;
|
|
21
|
+
margin: auto;
|
|
22
|
+
z-index: 2;
|
|
23
|
+
|
|
24
|
+
.logo {
|
|
25
|
+
img {
|
|
26
|
+
width: auto;
|
|
27
|
+
height: 30px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.navigation {
|
|
32
|
+
position: relative;
|
|
33
|
+
|
|
34
|
+
ul {
|
|
35
|
+
padding: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.nav-list {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
gap: 12px;
|
|
43
|
+
|
|
44
|
+
li {
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
color: #fff;
|
|
48
|
+
padding: 8px 12px;
|
|
49
|
+
list-style: none;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: 6px;
|
|
54
|
+
|
|
55
|
+
&.active {
|
|
56
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
57
|
+
border-radius: 8px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.nav-card {
|
|
63
|
+
background-color: #fff;
|
|
64
|
+
padding: 8px;
|
|
65
|
+
border-radius: 16px;
|
|
66
|
+
display: flex;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
width: fit-content;
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 50px;
|
|
71
|
+
transition: all 0.2s ease;
|
|
72
|
+
|
|
73
|
+
ul {
|
|
74
|
+
max-height: 200px;
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
|
|
77
|
+
li {
|
|
78
|
+
list-style: none;
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
color: #2c2c2c;
|
|
82
|
+
padding: 0 16px;
|
|
83
|
+
height: 36px;
|
|
84
|
+
// width: 240px;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
|
|
89
|
+
>div {
|
|
90
|
+
max-width: 188px;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.icon_right {
|
|
97
|
+
margin-left: 4px;
|
|
98
|
+
visibility: hidden;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
color: #CE1126;
|
|
103
|
+
|
|
104
|
+
.icon_right {
|
|
105
|
+
visibility: visible;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
img {
|
|
112
|
+
width: 200px;
|
|
113
|
+
height: 200px;
|
|
114
|
+
border-radius: 8px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.right {
|
|
120
|
+
display: flex;
|
|
121
|
+
gap: 15px;
|
|
122
|
+
align-items: center;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.carousel-img {
|
|
127
|
+
.bgImg {
|
|
128
|
+
height: 700px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.swiper-ban {
|
|
133
|
+
position: absolute;
|
|
134
|
+
z-index: 2;
|
|
135
|
+
width: 100%;
|
|
136
|
+
bottom: 16px;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
|
|
141
|
+
.ban {
|
|
142
|
+
font-size: 16px;
|
|
143
|
+
width: 1em;
|
|
144
|
+
height: 0.25em;
|
|
145
|
+
background: #FFF;
|
|
146
|
+
cursor: inherit;
|
|
147
|
+
margin-right: 8px;
|
|
148
|
+
transition: all .5s;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
|
|
151
|
+
&.active {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&.isCircle {
|
|
156
|
+
width: 1em;
|
|
157
|
+
height: 1em;
|
|
158
|
+
border-radius: 50%;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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) {
|
|
11
|
+
var groupId = (0, _uuid.v4)();
|
|
12
|
+
return {
|
|
13
|
+
id: groupId,
|
|
14
|
+
parentId: parentId,
|
|
15
|
+
overilay: {
|
|
16
|
+
open: true,
|
|
17
|
+
content: {
|
|
18
|
+
h5Name: 'Video Name',
|
|
19
|
+
pcName: 'Video Name',
|
|
20
|
+
h5ImgSrc: '',
|
|
21
|
+
pcImgSrc: '',
|
|
22
|
+
clickUrl: ''
|
|
23
|
+
},
|
|
24
|
+
hover: {}
|
|
25
|
+
},
|
|
26
|
+
video: {
|
|
27
|
+
sourceType: 'Upload',
|
|
28
|
+
sourceUrl: '',
|
|
29
|
+
startAt: '',
|
|
30
|
+
progressBar: true,
|
|
31
|
+
loop: true,
|
|
32
|
+
autoplay: false,
|
|
33
|
+
videoSound: false,
|
|
34
|
+
speed: 1,
|
|
35
|
+
playPosition: 'Play in Box',
|
|
36
|
+
playButton: 'Middle'
|
|
37
|
+
},
|
|
38
|
+
playIcon: {
|
|
39
|
+
open: true,
|
|
40
|
+
parentId: groupId,
|
|
41
|
+
id: (0, _uuid.v4)(),
|
|
42
|
+
type: 'PLAY',
|
|
43
|
+
size: 48,
|
|
44
|
+
pcSize: 60,
|
|
45
|
+
iconType: 'light-playicon-01',
|
|
46
|
+
iconColor: 'Light'
|
|
47
|
+
},
|
|
48
|
+
groupName: {
|
|
49
|
+
parentId: groupId,
|
|
50
|
+
id: (0, _uuid.v4)(),
|
|
51
|
+
open: true,
|
|
52
|
+
type: 'TEXT',
|
|
53
|
+
specialContent: [],
|
|
54
|
+
text: 'Group Name',
|
|
55
|
+
content: {
|
|
56
|
+
sizeType: 'Customize font styles',
|
|
57
|
+
fontFamily: 'Open Sans',
|
|
58
|
+
fontWeight: 600,
|
|
59
|
+
pcFontSize: 22,
|
|
60
|
+
color: '#232F46',
|
|
61
|
+
textAlign: 'center'
|
|
62
|
+
},
|
|
63
|
+
underline: {
|
|
64
|
+
open: false,
|
|
65
|
+
textDecorationColor: '',
|
|
66
|
+
textDecorationStyle: 'solid'
|
|
67
|
+
},
|
|
68
|
+
vertical: {}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
exports.groupSourceJSON = groupSourceJSON;
|
|
74
|
+
|
|
75
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
76
|
+
var groupId = (0, _uuid.v4)();
|
|
77
|
+
return {
|
|
78
|
+
id: groupId,
|
|
79
|
+
type: 'SLIDE_IMAGE',
|
|
80
|
+
groupSource: [groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId)],
|
|
81
|
+
spacing: {
|
|
82
|
+
pc: {
|
|
83
|
+
paddingTop: 0,
|
|
84
|
+
paddingBottom: 0,
|
|
85
|
+
paddingLeft: 0,
|
|
86
|
+
paddingRight: 0,
|
|
87
|
+
marginBottom: window.magicDesign.compSpacing * 1.5,
|
|
88
|
+
lineSpace: 68,
|
|
89
|
+
columnSpace: 48
|
|
90
|
+
},
|
|
91
|
+
mobile: {
|
|
92
|
+
paddingTop: 0,
|
|
93
|
+
paddingBottom: 0,
|
|
94
|
+
paddingLeft: 0,
|
|
95
|
+
paddingRight: 0,
|
|
96
|
+
marginBottom: window.magicDesign.compSpacing
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
customize: {
|
|
100
|
+
layout: 'layout1'
|
|
101
|
+
},
|
|
102
|
+
background: {
|
|
103
|
+
opacity: 100,
|
|
104
|
+
color: '#fff',
|
|
105
|
+
image: '',
|
|
106
|
+
bgType: 'color',
|
|
107
|
+
tabBackground: {
|
|
108
|
+
opacity: 100,
|
|
109
|
+
color: '#fff',
|
|
110
|
+
image: '',
|
|
111
|
+
tabBgType: 'color'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
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 _pc = _interopRequireDefault(require("./pc"));
|
|
11
|
+
|
|
12
|
+
var _defaultJSON = require("./defaultJSON");
|
|
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 SlideImage =
|
|
63
|
+
/** @class */
|
|
64
|
+
function (_super) {
|
|
65
|
+
__extends(SlideImage, _super);
|
|
66
|
+
|
|
67
|
+
function SlideImage() {
|
|
68
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
SlideImage.prototype.render = function () {
|
|
72
|
+
var nodeData = this.props.nodeData;
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
74
|
+
panelProps: nodeData
|
|
75
|
+
}) : null);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
SlideImage.defaultProps = {};
|
|
79
|
+
SlideImage.type = 'SLIDE_IMAGE';
|
|
80
|
+
SlideImage.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
81
|
+
SlideImage = __decorate([_compositeDecorator["default"]], SlideImage);
|
|
82
|
+
return SlideImage;
|
|
83
|
+
}(_react.Component);
|
|
84
|
+
|
|
85
|
+
var _default = SlideImage;
|
|
86
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _components = require("../../../../../../../meta-comp/components");
|
|
13
|
+
|
|
14
|
+
var _VideoItem = _interopRequireDefault(require("../VideoItem"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
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 __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
49
|
+
var t = {};
|
|
50
|
+
|
|
51
|
+
for (var p in s) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
56
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var CardItem =
|
|
62
|
+
/** @class */
|
|
63
|
+
function (_super) {
|
|
64
|
+
__extends(CardItem, _super);
|
|
65
|
+
|
|
66
|
+
function CardItem() {
|
|
67
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
68
|
+
|
|
69
|
+
_this.state = {};
|
|
70
|
+
return _this;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
CardItem.prototype.componentDidMount = function () {};
|
|
74
|
+
|
|
75
|
+
CardItem.prototype.render = function () {
|
|
76
|
+
var _a = this.props,
|
|
77
|
+
data = _a.data,
|
|
78
|
+
rest = __rest(_a, ["data"]);
|
|
79
|
+
|
|
80
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
81
|
+
className: (0, _classnames["default"])('slide-image-card-item-wrap')
|
|
82
|
+
}, rest), /*#__PURE__*/_react["default"].createElement(_VideoItem["default"], {
|
|
83
|
+
data: data
|
|
84
|
+
}), data.groupName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
85
|
+
data: data.groupName
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
CardItem.defaultProps = {
|
|
90
|
+
data: {}
|
|
91
|
+
};
|
|
92
|
+
return CardItem;
|
|
93
|
+
}(_react["default"].Component);
|
|
94
|
+
|
|
95
|
+
var _default = CardItem;
|
|
96
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.slide-image-card-item-wrap {}
|
|
@@ -0,0 +1,140 @@
|
|
|
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"] = ParallaxScroll;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _framerMotion = require("framer-motion");
|
|
13
|
+
|
|
14
|
+
var _CardItem = _interopRequireDefault(require("../CardItem"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _coreUtil = require("../../../../../../../utils/coreUtil");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function ParallaxScroll(_a) {
|
|
27
|
+
var source = _a.source,
|
|
28
|
+
xGap = _a.xGap,
|
|
29
|
+
yGap = _a.yGap;
|
|
30
|
+
|
|
31
|
+
var _b = (0, _react.useState)(0),
|
|
32
|
+
colOneScrollY = _b[0],
|
|
33
|
+
setColOneScrollY = _b[1];
|
|
34
|
+
|
|
35
|
+
var _c = (0, _react.useState)(0),
|
|
36
|
+
colTwoScrollY = _c[0],
|
|
37
|
+
setColTwoScrollY = _c[1];
|
|
38
|
+
|
|
39
|
+
var _d = (0, _react.useState)(0),
|
|
40
|
+
colThreeScrollY = _d[0],
|
|
41
|
+
setColThreeScrollY = _d[1];
|
|
42
|
+
|
|
43
|
+
var third = Math.ceil(source.length / 3);
|
|
44
|
+
var firstPart = source.slice(0, third);
|
|
45
|
+
var secondPart = source.slice(third, 2 * third);
|
|
46
|
+
var thirdPart = source.slice(2 * third);
|
|
47
|
+
var gridRef = (0, _react.useRef)(null);
|
|
48
|
+
var colOneRef = (0, _react.useRef)(null);
|
|
49
|
+
var colTwoRef = (0, _react.useRef)(null);
|
|
50
|
+
var colThreeRef = (0, _react.useRef)(null); // 获取视口滚动信息
|
|
51
|
+
|
|
52
|
+
var scrollYProgress = (0, _framerMotion.useScroll)({
|
|
53
|
+
target: gridRef,
|
|
54
|
+
// 定义滚动监听的起始和结束位置
|
|
55
|
+
offset: ['start start', 'end end']
|
|
56
|
+
}).scrollYProgress;
|
|
57
|
+
var translateFirst = (0, _framerMotion.useTransform)(scrollYProgress, [0, 1], [0, colOneScrollY]);
|
|
58
|
+
var translateSecond = (0, _framerMotion.useTransform)(scrollYProgress, [0, 1], [0, colTwoScrollY]);
|
|
59
|
+
var translateThird = (0, _framerMotion.useTransform)(scrollYProgress, [0, 1], [0, colThreeScrollY]);
|
|
60
|
+
(0, _react.useEffect)(function () {
|
|
61
|
+
setTimeout(function () {
|
|
62
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
63
|
+
var colOneHeight = colOneRef.current.offsetHeight;
|
|
64
|
+
var colTwoHeight = colTwoRef.current.offsetHeight;
|
|
65
|
+
var colThreeHeight = colThreeRef.current.offsetHeight;
|
|
66
|
+
var colHeights = [colOneHeight, colTwoHeight, colThreeHeight];
|
|
67
|
+
var space = Math.max.apply(Math, colHeights) - Math.min.apply(Math, colHeights) - 20;
|
|
68
|
+
var minHeightIndex = colHeights.indexOf(Math.min.apply(Math, colHeights));
|
|
69
|
+
|
|
70
|
+
if (minHeightIndex === 0) {
|
|
71
|
+
setColOneScrollY(space);
|
|
72
|
+
setColTwoScrollY(colOneHeight - colTwoHeight + space);
|
|
73
|
+
setColThreeScrollY(colOneHeight - colThreeHeight + space);
|
|
74
|
+
} else if (minHeightIndex === 1) {
|
|
75
|
+
setColOneScrollY(colTwoHeight - colOneHeight + space);
|
|
76
|
+
setColTwoScrollY(space);
|
|
77
|
+
setColThreeScrollY(colTwoHeight - colThreeHeight + space);
|
|
78
|
+
} else {
|
|
79
|
+
setColOneScrollY(colThreeHeight - colOneHeight + space);
|
|
80
|
+
setColTwoScrollY(colThreeHeight - colTwoHeight + space);
|
|
81
|
+
setColThreeScrollY(space);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, 1000);
|
|
85
|
+
}, [scrollYProgress]);
|
|
86
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
|
+
className: "m-parallax-scroll"
|
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
|
+
ref: gridRef,
|
|
90
|
+
className: "grid grid-cols-3",
|
|
91
|
+
style: {
|
|
92
|
+
gap: xGap + 'px'
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
|
+
ref: colOneRef,
|
|
96
|
+
className: "grid",
|
|
97
|
+
style: {
|
|
98
|
+
gap: yGap + 'px'
|
|
99
|
+
}
|
|
100
|
+
}, firstPart.map(function (el, idx) {
|
|
101
|
+
return /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
102
|
+
key: 'grid-1' + idx,
|
|
103
|
+
style: {
|
|
104
|
+
y: translateFirst
|
|
105
|
+
}
|
|
106
|
+
}, /*#__PURE__*/_react["default"].createElement(_CardItem["default"], {
|
|
107
|
+
data: el
|
|
108
|
+
}));
|
|
109
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
|
+
ref: colTwoRef,
|
|
111
|
+
className: "grid",
|
|
112
|
+
style: {
|
|
113
|
+
gap: yGap + 'px'
|
|
114
|
+
}
|
|
115
|
+
}, secondPart.map(function (el, idx) {
|
|
116
|
+
return /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
117
|
+
key: 'grid-2' + idx,
|
|
118
|
+
style: {
|
|
119
|
+
y: translateSecond
|
|
120
|
+
}
|
|
121
|
+
}, /*#__PURE__*/_react["default"].createElement(_CardItem["default"], {
|
|
122
|
+
data: el
|
|
123
|
+
}));
|
|
124
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
|
+
ref: colThreeRef,
|
|
126
|
+
className: "grid",
|
|
127
|
+
style: {
|
|
128
|
+
gap: yGap + 'px'
|
|
129
|
+
}
|
|
130
|
+
}, thirdPart.map(function (el, idx) {
|
|
131
|
+
return /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
132
|
+
key: 'grid-3' + idx,
|
|
133
|
+
style: {
|
|
134
|
+
y: translateThird
|
|
135
|
+
}
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement(_CardItem["default"], {
|
|
137
|
+
data: el
|
|
138
|
+
}));
|
|
139
|
+
}))));
|
|
140
|
+
}
|
|
File without changes
|