ts-glitter 21.8.1 → 21.8.2
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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/editor/basic-component.js +5 -0
- package/lowcode/editor/basic-component.ts +6 -1
- package/lowcode/public-components/layout-plugin/social-links-01.js +44 -23
- package/lowcode/public-components/layout-plugin/social-links-01.ts +48 -23
- package/package.json +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -146,7 +146,7 @@ export class Entry {
|
|
|
146
146
|
}
|
|
147
147
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
148
148
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
149
|
-
glitter.share.editerVersion = 'V_21.8.
|
|
149
|
+
glitter.share.editerVersion = 'V_21.8.2';
|
|
150
150
|
glitter.share.start = new Date();
|
|
151
151
|
const vm = { appConfig: [] };
|
|
152
152
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -150,7 +150,7 @@ export class Entry {
|
|
|
150
150
|
}
|
|
151
151
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
152
152
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
153
|
-
glitter.share.editerVersion = 'V_21.8.
|
|
153
|
+
glitter.share.editerVersion = 'V_21.8.2';
|
|
154
154
|
glitter.share.start = new Date();
|
|
155
155
|
const vm = { appConfig: [] };
|
|
156
156
|
(window as any).saasConfig = {
|
|
@@ -9452,6 +9452,11 @@ BasicComponent.componentList = [
|
|
|
9452
9452
|
"formData": {}
|
|
9453
9453
|
},
|
|
9454
9454
|
image: `https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_scs0sfs1sasbs1sf_Screenshot2024-11-14at2.03.47 AM.jpg`
|
|
9455
|
+
},
|
|
9456
|
+
{
|
|
9457
|
+
title: '社群按鈕',
|
|
9458
|
+
config: { "id": "s6s7sbs4s5s5sasd", "js": "./official_view_component/official.js", "css": { "class": {}, "style": {} }, "data": { "tag": "social_popup", "_gap": "", "attr": [], "elem": "div", "list": [], "inner": "", "_other": {}, "_border": {}, "_margin": {}, "_radius": "", "_padding": {}, "_reverse": "false", "carryData": {}, "refer_app": "shop_template_black_style", "_max_width": "", "_background": "", "_style_refer": "global", "_hor_position": "center", "refer_form_data": { "social_list": [{ "icon": "https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg", "social_type": "fb" }, { "social_type": "ig" }, { "social_type": "line" }] }, "_background_setting": { "type": "none" } }, "list": [], "type": "component", "class": "w-100", "index": 2, "label": "社群彈窗", "style": "", "global": [], "mobile": { "id": "s6s7sbs4s5s5sasd", "js": "./official_view_component/official.js", "css": { "class": {}, "style": {} }, "data": { "refer_app": "shop_template_black_style" }, "list": [], "type": "component", "class": "w-100", "index": 2, "label": "社群彈窗", "style": "", "global": [], "toggle": true, "stylist": [], "version": "v2", "visible": true, "dataType": "static", "style_from": "code", "classDataType": "static", "editor_bridge": {}, "preloadEvenet": {}, "container_fonts": 0, "mobile_editable": [], "desktop_editable": [], "refreshAllParameter": {}, "refreshComponentParameter": {}, "refer": "custom" }, "toggle": true, "desktop": { "data": { "refer_app": "shop_template_black_style", "refer_form_data": {} }, "refer": "custom" }, "stylist": [], "version": "v2", "visible": true, "dataType": "static", "style_from": "code", "classDataType": "static", "editor_bridge": {}, "preloadEvenet": {}, "container_fonts": 0, "mobile_editable": [], "desktop_editable": [], "refreshAllParameter": {}, "refreshComponentParameter": {}, "formData": {} },
|
|
9459
|
+
image: `https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/Screenshot 2025-05-21 at 6.22.03 PM.jpg`
|
|
9455
9460
|
}
|
|
9456
9461
|
];
|
|
9457
9462
|
BasicComponent.productList = [
|
|
@@ -9067,7 +9067,12 @@ export class BasicComponent {
|
|
|
9067
9067
|
"formData": {}
|
|
9068
9068
|
},
|
|
9069
9069
|
image: `https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_scs0sfs1sasbs1sf_Screenshot2024-11-14at2.03.47 AM.jpg`
|
|
9070
|
-
}
|
|
9070
|
+
},
|
|
9071
|
+
{
|
|
9072
|
+
title: '社群按鈕',
|
|
9073
|
+
config: {"id":"s6s7sbs4s5s5sasd","js":"./official_view_component/official.js","css":{"class":{},"style":{}},"data":{"tag":"social_popup","_gap":"","attr":[],"elem":"div","list":[],"inner":"","_other":{},"_border":{},"_margin":{},"_radius":"","_padding":{},"_reverse":"false","carryData":{},"refer_app":"shop_template_black_style","_max_width":"","_background":"","_style_refer":"global","_hor_position":"center","refer_form_data":{"social_list":[{"icon":"https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg","social_type":"fb"},{"social_type":"ig"},{"social_type":"line"}]},"_background_setting":{"type":"none"}},"list":[],"type":"component","class":"w-100","index":2,"label":"社群彈窗","style":"","global":[],"mobile":{"id":"s6s7sbs4s5s5sasd","js":"./official_view_component/official.js","css":{"class":{},"style":{}},"data":{"refer_app":"shop_template_black_style"},"list":[],"type":"component","class":"w-100","index":2,"label":"社群彈窗","style":"","global":[],"toggle":true,"stylist":[],"version":"v2","visible":true,"dataType":"static","style_from":"code","classDataType":"static","editor_bridge":{},"preloadEvenet":{},"container_fonts":0,"mobile_editable":[],"desktop_editable":[],"refreshAllParameter":{},"refreshComponentParameter":{},"refer":"custom"},"toggle":true,"desktop":{"data":{"refer_app":"shop_template_black_style","refer_form_data":{}},"refer":"custom"},"stylist":[],"version":"v2","visible":true,"dataType":"static","style_from":"code","classDataType":"static","editor_bridge":{},"preloadEvenet":{},"container_fonts":0,"mobile_editable":[],"desktop_editable":[],"refreshAllParameter":{},"refreshComponentParameter":{},"formData":{}},
|
|
9074
|
+
image: `https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/Screenshot 2025-05-21 at 6.22.03 PM.jpg`
|
|
9075
|
+
}
|
|
9071
9076
|
]
|
|
9072
9077
|
|
|
9073
9078
|
public static productList = [
|
|
@@ -23,16 +23,32 @@ export class SocialLinks01 {
|
|
|
23
23
|
};
|
|
24
24
|
const gotoTopImg = 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/arrow-up-to-line-light.svg';
|
|
25
25
|
gvc.addStyle(css `
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
@media (max-width: 768px) {
|
|
27
|
+
.floating-action-panel {
|
|
28
|
+
position: fixed;
|
|
29
|
+
bottom: 20px;
|
|
30
|
+
right: 10px;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column; /* 垂直排列 */
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 10px; /* 按鈕間距 */
|
|
35
|
+
z-index: 1000;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: 769px) {
|
|
40
|
+
.floating-action-panel {
|
|
41
|
+
position: fixed;
|
|
42
|
+
bottom: 30px;
|
|
43
|
+
right: 30px;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column; /* 垂直排列 */
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: 10px; /* 按鈕間距 */
|
|
48
|
+
z-index: 1000;
|
|
49
|
+
}
|
|
35
50
|
}
|
|
51
|
+
|
|
36
52
|
|
|
37
53
|
.social-links {
|
|
38
54
|
display: flex;
|
|
@@ -59,22 +75,20 @@ export class SocialLinks01 {
|
|
|
59
75
|
border: none;
|
|
60
76
|
padding: 2px;
|
|
61
77
|
cursor: pointer;
|
|
78
|
+
width: 40px;
|
|
79
|
+
height: 40px;
|
|
62
80
|
border-radius: 50%;
|
|
63
81
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
64
82
|
}
|
|
65
83
|
|
|
66
|
-
|
|
67
|
-
width: 40px;
|
|
68
|
-
height: 40px;
|
|
69
|
-
object-fit: contain;
|
|
70
|
-
}
|
|
84
|
+
|
|
71
85
|
|
|
72
|
-
.component-circle:hover
|
|
86
|
+
.component-circle:hover {
|
|
73
87
|
opacity: 0.8;
|
|
74
88
|
}
|
|
75
89
|
|
|
76
90
|
.up-to-top.hidden {
|
|
77
|
-
display: none;
|
|
91
|
+
display: none !important;
|
|
78
92
|
}
|
|
79
93
|
`);
|
|
80
94
|
return gvc.bindView({
|
|
@@ -86,30 +100,37 @@ export class SocialLinks01 {
|
|
|
86
100
|
${socialList
|
|
87
101
|
.map(socialLink => {
|
|
88
102
|
var _a;
|
|
103
|
+
if (socialLink.icon === 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg') {
|
|
104
|
+
socialLink.icon = undefined;
|
|
105
|
+
}
|
|
89
106
|
const imgSrc = supportSocial.includes(socialLink.social_type)
|
|
90
107
|
? socialIMG[socialLink.social_type]
|
|
91
108
|
: socialIMG.other;
|
|
92
109
|
return html `
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
110
|
+
<div onclick="${gvc.event(() => {
|
|
111
|
+
gvc.glitter.href = socialLink.link;
|
|
112
|
+
})}" class="component-circle" style="overflow: hidden;
|
|
113
|
+
background-image: url('${(_a = socialLink.icon) !== null && _a !== void 0 ? _a : imgSrc}');background-size: cover;background-position: center;"
|
|
114
|
+
>
|
|
115
|
+
</div>
|
|
96
116
|
`;
|
|
97
117
|
})
|
|
98
118
|
.join('')}
|
|
99
119
|
</div>
|
|
100
120
|
<button
|
|
101
|
-
class="component-circle up-to-top hidden"
|
|
121
|
+
class="component-circle up-to-top hidden rounded-circle align-items-center justify-content-center"
|
|
122
|
+
style="overflow: hidden; background-color: white;display: flex; "
|
|
102
123
|
onclick="${gvc.event(() => {
|
|
103
124
|
scrollToTop();
|
|
104
125
|
})}"
|
|
105
126
|
>
|
|
106
|
-
<
|
|
127
|
+
<i class="fa-solid fa-angle-up fs-3"></i>
|
|
107
128
|
</button>
|
|
108
129
|
</div>
|
|
109
130
|
`;
|
|
110
131
|
}, divCreate: {},
|
|
111
132
|
onInitial: () => {
|
|
112
|
-
window.
|
|
133
|
+
window.addEventListener('scroll', function () {
|
|
113
134
|
const scrollPosition = window.scrollY;
|
|
114
135
|
const threshold = window.innerHeight / 2;
|
|
115
136
|
const panel = document.querySelector('.up-to-top');
|
|
@@ -119,7 +140,7 @@ export class SocialLinks01 {
|
|
|
119
140
|
else {
|
|
120
141
|
panel.classList.add('hidden');
|
|
121
142
|
}
|
|
122
|
-
};
|
|
143
|
+
});
|
|
123
144
|
}
|
|
124
145
|
});
|
|
125
146
|
}
|
|
@@ -33,16 +33,32 @@ export class SocialLinks01 {
|
|
|
33
33
|
};
|
|
34
34
|
const gotoTopImg = 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/arrow-up-to-line-light.svg';
|
|
35
35
|
gvc.addStyle(css`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
@media (max-width: 768px) {
|
|
37
|
+
.floating-action-panel {
|
|
38
|
+
position: fixed;
|
|
39
|
+
bottom: 20px;
|
|
40
|
+
right: 10px;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column; /* 垂直排列 */
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 10px; /* 按鈕間距 */
|
|
45
|
+
z-index: 1000;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (min-width: 769px) {
|
|
50
|
+
.floating-action-panel {
|
|
51
|
+
position: fixed;
|
|
52
|
+
bottom: 30px;
|
|
53
|
+
right: 30px;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column; /* 垂直排列 */
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 10px; /* 按鈕間距 */
|
|
58
|
+
z-index: 1000;
|
|
59
|
+
}
|
|
45
60
|
}
|
|
61
|
+
|
|
46
62
|
|
|
47
63
|
.social-links {
|
|
48
64
|
display: flex;
|
|
@@ -69,24 +85,23 @@ export class SocialLinks01 {
|
|
|
69
85
|
border: none;
|
|
70
86
|
padding: 2px;
|
|
71
87
|
cursor: pointer;
|
|
88
|
+
width: 40px;
|
|
89
|
+
height: 40px;
|
|
72
90
|
border-radius: 50%;
|
|
73
91
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
74
92
|
}
|
|
75
93
|
|
|
76
|
-
|
|
77
|
-
width: 40px;
|
|
78
|
-
height: 40px;
|
|
79
|
-
object-fit: contain;
|
|
80
|
-
}
|
|
94
|
+
|
|
81
95
|
|
|
82
|
-
.component-circle:hover
|
|
96
|
+
.component-circle:hover {
|
|
83
97
|
opacity: 0.8;
|
|
84
98
|
}
|
|
85
99
|
|
|
86
100
|
.up-to-top.hidden {
|
|
87
|
-
display: none;
|
|
101
|
+
display: none !important;
|
|
88
102
|
}
|
|
89
103
|
`);
|
|
104
|
+
|
|
90
105
|
return gvc.bindView({
|
|
91
106
|
bind:vm.id,
|
|
92
107
|
view:()=>{
|
|
@@ -95,30 +110,39 @@ export class SocialLinks01 {
|
|
|
95
110
|
<div class="social-links">
|
|
96
111
|
${socialList
|
|
97
112
|
.map(socialLink => {
|
|
113
|
+
if(socialLink.icon==='https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg'){
|
|
114
|
+
(socialLink.icon as any) = undefined;
|
|
115
|
+
}
|
|
98
116
|
const imgSrc = supportSocial.includes(socialLink.social_type)
|
|
99
117
|
? socialIMG[socialLink.social_type]
|
|
100
118
|
: socialIMG.other;
|
|
101
119
|
return html`
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
120
|
+
<div onclick="${
|
|
121
|
+
gvc.event(()=>{
|
|
122
|
+
gvc.glitter.href = socialLink.link;
|
|
123
|
+
})
|
|
124
|
+
}" class="component-circle" style="overflow: hidden;
|
|
125
|
+
background-image: url('${socialLink.icon??imgSrc}');background-size: cover;background-position: center;"
|
|
126
|
+
>
|
|
127
|
+
</div>
|
|
105
128
|
`;
|
|
106
129
|
})
|
|
107
130
|
.join('')}
|
|
108
131
|
</div>
|
|
109
132
|
<button
|
|
110
|
-
class="component-circle up-to-top hidden"
|
|
133
|
+
class="component-circle up-to-top hidden rounded-circle align-items-center justify-content-center"
|
|
134
|
+
style="overflow: hidden; background-color: white;display: flex; "
|
|
111
135
|
onclick="${gvc.event(() => {
|
|
112
136
|
scrollToTop();
|
|
113
137
|
})}"
|
|
114
138
|
>
|
|
115
|
-
<
|
|
139
|
+
<i class="fa-solid fa-angle-up fs-3"></i>
|
|
116
140
|
</button>
|
|
117
141
|
</div>
|
|
118
142
|
`;
|
|
119
143
|
},divCreate:{}
|
|
120
144
|
,onInitial:()=>{
|
|
121
|
-
|
|
145
|
+
window.addEventListener('scroll', function() {
|
|
122
146
|
const scrollPosition = window.scrollY;
|
|
123
147
|
|
|
124
148
|
const threshold = window.innerHeight / 2;
|
|
@@ -130,7 +154,8 @@ export class SocialLinks01 {
|
|
|
130
154
|
} else {
|
|
131
155
|
panel!.classList.add('hidden');
|
|
132
156
|
}
|
|
133
|
-
};
|
|
157
|
+
});
|
|
158
|
+
|
|
134
159
|
}
|
|
135
160
|
})
|
|
136
161
|
|