ts-glitter 21.8.4 → 21.8.7
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/cms-plugin/POS-setting.js +18 -6
- package/lowcode/cms-plugin/POS-setting.ts +22 -10
- package/lowcode/cms-plugin/pos-pages/payment-page.js +9 -2
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +11 -3
- package/lowcode/cms-plugin/stock-stores.js +55 -0
- package/lowcode/cms-plugin/stock-stores.ts +59 -0
- package/lowcode/editor/basic-component.js +10 -0
- package/lowcode/editor/basic-component.ts +11 -1
- package/lowcode/glitterBundle/plugins/html-render.js +0 -2
- package/lowcode/glitterBundle/plugins/html-render.ts +0 -1
- package/lowcode/jspage/function-page/setting_editor.js +1 -1
- package/lowcode/jspage/function-page/setting_editor.ts +1 -1
- package/lowcode/jspage/function-page/tool-setting.js +1 -5
- package/lowcode/jspage/function-page/tool-setting.ts +5 -4
- package/lowcode/jspage/main.js +1 -6
- package/lowcode/jspage/main.ts +1 -6
- package/lowcode/modules/image-library.js +0 -1
- package/lowcode/modules/image-library.ts +1 -1
- package/lowcode/official_view_component/official/component.js +1 -1
- package/lowcode/official_view_component/official/component.ts +1 -1
- package/lowcode/public-components/banner/first-banner.js +50 -85
- package/lowcode/public-components/banner/first-banner.ts +59 -96
- package/lowcode/public-components/layout-plugin/social-links-01.js +55 -34
- package/lowcode/public-components/layout-plugin/social-links-01.ts +68 -43
- package/package.json +1 -1
- package/src/api-public/services/checkout-event.js +75 -40
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +82 -31
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/shopping.d.ts +1 -0
- package/src/api-public/services/shopping.js +60 -49
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +87 -62
- package/src/services/saas-table-check.js +1 -1
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/saas-table-check.ts +1 -1
|
@@ -7,8 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { ApiPageConfig } from "../../api/pageConfig.js";
|
|
11
|
-
import { GlobalWidget } from "../../glitterBundle/html-component/global-widget.js";
|
|
12
10
|
const html = String.raw;
|
|
13
11
|
const css = String.raw;
|
|
14
12
|
export class FirstBanner {
|
|
@@ -39,50 +37,18 @@ export class FirstBanner {
|
|
|
39
37
|
background: #393939!important;
|
|
40
38
|
}
|
|
41
39
|
`);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, (d2) => {
|
|
51
|
-
const data = d2.response.result[0];
|
|
52
|
-
function getFormData(ref) {
|
|
53
|
-
var _a, _b;
|
|
54
|
-
ref = window.parent.glitter.share.updated_form_data[`${widget.refer_app}_${widget.tag}`] || ref;
|
|
55
|
-
let formData = JSON.parse(JSON.stringify(ref || {}));
|
|
56
|
-
if ((widget.data.refer_app)) {
|
|
57
|
-
GlobalWidget.initialShowCaseData({
|
|
58
|
-
widget: widget,
|
|
59
|
-
gvc: gvc
|
|
60
|
-
});
|
|
61
|
-
if (gvc.glitter.document.body.clientWidth < 800 && widget.mobile.refer === 'custom') {
|
|
62
|
-
((_a = widget[`mobile_editable`]) !== null && _a !== void 0 ? _a : []).map((dd) => {
|
|
63
|
-
formData[dd] = JSON.parse(JSON.stringify((widget.mobile.data.refer_form_data || data.page_config.formData)[dd] || {}));
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
else if (gvc.glitter.document.body.clientWidth >= 800 && widget.desktop.refer === 'custom') {
|
|
67
|
-
((_b = widget[`desktop_editable`]) !== null && _b !== void 0 ? _b : []).map((dd) => {
|
|
68
|
-
formData[dd] = JSON.parse(JSON.stringify((widget.desktop.data.refer_form_data || data.page_config.formData)[dd] || {}));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return formData;
|
|
73
|
-
}
|
|
74
|
-
const formData = getFormData((widget.data.refer_app) ? (widget.data.refer_form_data || data.page_config.formData) : data.page_config.formData);
|
|
75
|
-
if (formData.list && formData.list.length) {
|
|
76
|
-
obj.gvc.glitter.innerDialog((gvc) => {
|
|
77
|
-
return gvc.bindView(() => {
|
|
78
|
-
return {
|
|
79
|
-
bind: id,
|
|
80
|
-
view: () => {
|
|
81
|
-
return html `
|
|
40
|
+
const formData = obj.widget.formData;
|
|
41
|
+
if (formData.list && formData.list.length) {
|
|
42
|
+
obj.gvc.glitter.innerDialog((gvc) => {
|
|
43
|
+
return gvc.bindView(() => {
|
|
44
|
+
return {
|
|
45
|
+
bind: id,
|
|
46
|
+
view: () => {
|
|
47
|
+
return html `
|
|
82
48
|
<div class="swiper mySwiper_${id}" style="width:520px;max-width:100vw;height:auto !important;">
|
|
83
49
|
<div class="swiper-wrapper">
|
|
84
50
|
${formData.list.map((dd) => {
|
|
85
|
-
|
|
51
|
+
return html `
|
|
86
52
|
<div class="swiper-slide pb-4 d-flex align-items-center justify-content-center position-relative"
|
|
87
53
|
style="background: none;
|
|
88
54
|
overflow: hidden;;
|
|
@@ -90,61 +56,60 @@ overflow: hidden;;
|
|
|
90
56
|
<img src="${dd.img || 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg'}" style="width:520px;max-width:calc(100vw - 40px);max-height: 100vh;cursor: pointer;
|
|
91
57
|
border-radius: 25px;
|
|
92
58
|
" onclick="${gvc.event(() => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
59
|
+
gvc.glitter.href = dd.link;
|
|
60
|
+
gvc.closeDialog();
|
|
61
|
+
})}" >
|
|
96
62
|
<div class="position-absolute d-flex align-items-center justify-content-center"
|
|
97
63
|
style="top:0px;right: 0px;width:50px;height: 50px;
|
|
98
64
|
background: rgba(0,0,0,0.5);border-top-right-radius: 25px;border-bottom-left-radius: 10px;cursor: pointer;" onclick="${(() => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
65
|
+
if (gvc.glitter.htmlGenerate.isEditMode()) {
|
|
66
|
+
return gvc.editorEvent(() => {
|
|
67
|
+
gvc.closeDialog();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return gvc.event(() => {
|
|
72
|
+
gvc.closeDialog();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
})()}">
|
|
110
76
|
<i class="fa-regular fa-circle-xmark text-white fs-5"
|
|
111
77
|
></i>
|
|
112
78
|
</div>
|
|
113
79
|
</div>
|
|
114
80
|
`;
|
|
115
|
-
|
|
81
|
+
}).join('')}
|
|
116
82
|
</div>
|
|
117
83
|
<div class="swiper-pagination swiper-pagination-${id}"></div>
|
|
118
84
|
</div>`;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
85
|
+
},
|
|
86
|
+
divCreate: {
|
|
87
|
+
class: `vw-100 vh-100 position-fixed ${id} d-flex align-items-center justify-content-center`,
|
|
88
|
+
style: css `z-index: 999999;
|
|
123
89
|
background: rgba(0, 0, 0, 0.5);`
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
90
|
+
},
|
|
91
|
+
onCreate: () => {
|
|
92
|
+
const interval = setInterval(() => {
|
|
93
|
+
if (gvc.glitter.window.Swiper) {
|
|
94
|
+
const swiper = new gvc.glitter.window.Swiper(`.mySwiper_${id}`, {
|
|
95
|
+
loop: true,
|
|
96
|
+
pagination: {
|
|
97
|
+
el: `.swiper-pagination-${id}`,
|
|
98
|
+
clickable: true,
|
|
99
|
+
},
|
|
100
|
+
on: {
|
|
101
|
+
slideChange: function () {
|
|
133
102
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
145
|
-
}, 'first-banner', {});
|
|
146
|
-
}
|
|
147
|
-
});
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
clearTimeout(interval);
|
|
106
|
+
}
|
|
107
|
+
}, 100);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
}, 'first-banner', {});
|
|
112
|
+
}
|
|
148
113
|
return ``;
|
|
149
114
|
});
|
|
150
115
|
}
|
|
@@ -8,9 +8,10 @@ const css = String.raw
|
|
|
8
8
|
|
|
9
9
|
export class FirstBanner {
|
|
10
10
|
|
|
11
|
-
public static async main(obj:
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
public static async main(obj:{
|
|
12
|
+
gvc: GVC,
|
|
13
|
+
widget: any,
|
|
14
|
+
subData: any
|
|
14
15
|
}) {
|
|
15
16
|
|
|
16
17
|
const gvc = obj.gvc
|
|
@@ -38,57 +39,21 @@ export class FirstBanner {
|
|
|
38
39
|
background: #393939!important;
|
|
39
40
|
}
|
|
40
41
|
`)
|
|
41
|
-
|
|
42
|
-
await ApiPageConfig.getPage({
|
|
43
|
-
appName: (gvc.glitter.window as any).appName,
|
|
44
|
-
type: 'template',
|
|
45
|
-
tag:'advertise',
|
|
46
|
-
})
|
|
47
|
-
).response.result[0]).config[0];
|
|
48
|
-
((gvc.glitter.window as any).glitterInitialHelper).getPageData( {
|
|
49
|
-
tag: widget.data.tag,
|
|
50
|
-
appName: widget.data.refer_app
|
|
51
|
-
}, (d2: any) => {
|
|
52
|
-
const data = d2.response.result[0]
|
|
53
|
-
function getFormData(ref: any) {
|
|
54
|
-
//判斷是否有上次的更新資料
|
|
55
|
-
ref= (window.parent as any).glitter.share.updated_form_data[`${widget.refer_app}_${widget.tag}`] || ref;
|
|
56
|
-
let formData = JSON.parse(JSON.stringify(ref || {}))
|
|
57
|
-
if ((widget.data.refer_app)) {
|
|
58
|
-
GlobalWidget.initialShowCaseData({
|
|
59
|
-
widget: widget,
|
|
60
|
-
gvc: gvc
|
|
61
|
-
});
|
|
62
|
-
if (gvc.glitter.document.body.clientWidth < 800 && (widget as any).mobile.refer === 'custom') {
|
|
63
|
-
((widget as any)[`mobile_editable`] ?? []).map((dd: any) => {
|
|
64
|
-
formData[dd] = JSON.parse(JSON.stringify(((widget as any).mobile.data.refer_form_data || data.page_config.formData)[dd] || {}))
|
|
65
|
-
});
|
|
66
|
-
// data.page_config.formData = (widget.data.refer_form_data || data.page_config.formData)
|
|
67
|
-
} else if (gvc.glitter.document.body.clientWidth >= 800 && (widget as any).desktop.refer === 'custom') {
|
|
68
|
-
((widget as any)[`desktop_editable`] ?? []).map((dd: any) => {
|
|
69
|
-
formData[dd] = JSON.parse(JSON.stringify(((widget as any).desktop.data.refer_form_data || data.page_config.formData)[dd] || {}))
|
|
70
|
-
});
|
|
42
|
+
const formData = obj.widget.formData;
|
|
71
43
|
|
|
72
|
-
|
|
73
|
-
|
|
44
|
+
if(formData.list && formData.list.length){
|
|
45
|
+
obj.gvc.glitter.innerDialog((gvc) => {
|
|
46
|
+
return gvc.bindView(() => {
|
|
74
47
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if(formData.list && formData.list.length){
|
|
80
|
-
obj.gvc.glitter.innerDialog((gvc) => {
|
|
81
|
-
return gvc.bindView(() => {
|
|
82
|
-
|
|
83
|
-
return {
|
|
84
|
-
bind: id,
|
|
85
|
-
view: () => {
|
|
86
|
-
return html`
|
|
48
|
+
return {
|
|
49
|
+
bind: id,
|
|
50
|
+
view: () => {
|
|
51
|
+
return html`
|
|
87
52
|
<div class="swiper mySwiper_${id}" style="width:520px;max-width:100vw;height:auto !important;">
|
|
88
53
|
<div class="swiper-wrapper">
|
|
89
54
|
${
|
|
90
|
-
|
|
91
|
-
|
|
55
|
+
formData.list.map((dd:any) => {
|
|
56
|
+
return html`
|
|
92
57
|
<div class="swiper-slide pb-4 d-flex align-items-center justify-content-center position-relative"
|
|
93
58
|
style="background: none;
|
|
94
59
|
overflow: hidden;;
|
|
@@ -96,68 +61,66 @@ overflow: hidden;;
|
|
|
96
61
|
<img src="${dd.img || 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg'}" style="width:520px;max-width:calc(100vw - 40px);max-height: 100vh;cursor: pointer;
|
|
97
62
|
border-radius: 25px;
|
|
98
63
|
" onclick="${gvc.event(() => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
64
|
+
gvc.glitter.href=dd.link;
|
|
65
|
+
gvc.closeDialog()
|
|
66
|
+
})}" >
|
|
102
67
|
<div class="position-absolute d-flex align-items-center justify-content-center"
|
|
103
68
|
style="top:0px;right: 0px;width:50px;height: 50px;
|
|
104
69
|
background: rgba(0,0,0,0.5);border-top-right-radius: 25px;border-bottom-left-radius: 10px;cursor: pointer;" onclick="${
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
70
|
+
(()=>{
|
|
71
|
+
if(gvc.glitter.htmlGenerate.isEditMode()){
|
|
72
|
+
return gvc.editorEvent(()=>{
|
|
73
|
+
gvc.closeDialog()
|
|
74
|
+
})
|
|
75
|
+
}else{
|
|
76
|
+
return gvc.event(()=>{
|
|
77
|
+
gvc.closeDialog()
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
})()}">
|
|
116
81
|
<i class="fa-regular fa-circle-xmark text-white fs-5"
|
|
117
82
|
></i>
|
|
118
83
|
</div>
|
|
119
84
|
</div>
|
|
120
85
|
`
|
|
121
|
-
|
|
122
|
-
|
|
86
|
+
}).join('')
|
|
87
|
+
}
|
|
123
88
|
</div>
|
|
124
89
|
<div class="swiper-pagination swiper-pagination-${id}"></div>
|
|
125
90
|
</div>`
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
91
|
+
},
|
|
92
|
+
divCreate: {
|
|
93
|
+
class: `vw-100 vh-100 position-fixed ${id} d-flex align-items-center justify-content-center`,
|
|
94
|
+
style: css`z-index: 999999;
|
|
130
95
|
background: rgba(0, 0, 0, 0.5);`
|
|
131
|
-
|
|
132
|
-
|
|
96
|
+
},
|
|
97
|
+
onCreate: () => {
|
|
133
98
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
99
|
+
const interval = setInterval(() => {
|
|
100
|
+
if ((gvc.glitter.window as any).Swiper) {
|
|
101
|
+
const swiper = new (gvc.glitter.window as any).Swiper(`.mySwiper_${id}`, {
|
|
102
|
+
// Optional parameters
|
|
103
|
+
loop: true,
|
|
104
|
+
// If we need pagination
|
|
105
|
+
pagination: {
|
|
106
|
+
el: `.swiper-pagination-${id}`,
|
|
107
|
+
clickable: true,
|
|
108
|
+
},
|
|
109
|
+
on: {
|
|
110
|
+
slideChange: function () {
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
},
|
|
113
|
+
},
|
|
149
114
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
})
|
|
157
|
-
}, 'first-banner', {})
|
|
115
|
+
});
|
|
116
|
+
clearTimeout(interval)
|
|
117
|
+
}
|
|
118
|
+
}, 100)
|
|
119
|
+
}
|
|
158
120
|
}
|
|
159
|
-
|
|
160
|
-
|
|
121
|
+
})
|
|
122
|
+
}, 'first-banner', {})
|
|
123
|
+
}
|
|
161
124
|
|
|
162
125
|
|
|
163
126
|
return ``
|
|
@@ -23,17 +23,33 @@ 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
|
+
}
|
|
35
37
|
}
|
|
36
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
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
37
53
|
.social-links {
|
|
38
54
|
display: flex;
|
|
39
55
|
flex-direction: column;
|
|
@@ -59,57 +75,62 @@ 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
|
-
.component-img {
|
|
67
|
-
width: 40px;
|
|
68
|
-
height: 40px;
|
|
69
|
-
object-fit: contain;
|
|
70
|
-
}
|
|
71
84
|
|
|
72
|
-
|
|
85
|
+
|
|
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({
|
|
81
95
|
bind: vm.id,
|
|
82
96
|
view: () => {
|
|
83
97
|
return html `
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
98
|
+
<div class="floating-action-panel">
|
|
99
|
+
<div class="social-links">
|
|
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
|
-
|
|
96
|
-
|
|
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>
|
|
116
|
+
`;
|
|
97
117
|
})
|
|
98
118
|
.join('')}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
</div>
|
|
120
|
+
<button
|
|
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; "
|
|
123
|
+
onclick="${gvc.event(() => {
|
|
103
124
|
scrollToTop();
|
|
104
125
|
})}"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
>
|
|
127
|
+
<i class="fa-solid fa-angle-up fs-3"></i>
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
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
|
}
|