ts-glitter 21.8.1 → 21.8.3
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 +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/tool-setting.js +1 -0
- package/lowcode/jspage/function-page/tool-setting.ts +1 -0
- package/lowcode/jspage/main.js +1 -6
- package/lowcode/jspage/main.ts +1 -6
- 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 +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.3';
|
|
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.3';
|
|
154
154
|
glitter.share.start = new Date();
|
|
155
155
|
const vm = { appConfig: [] };
|
|
156
156
|
(window as any).saasConfig = {
|
|
@@ -9452,6 +9452,16 @@ 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`
|
|
9460
|
+
},
|
|
9461
|
+
{
|
|
9462
|
+
title: '首頁廣告',
|
|
9463
|
+
config: { "id": "s4s1sfs7s9s8sds5", "js": "./official_view_component/official.js", "css": { "class": {}, "style": {} }, "data": { "tag": "banner-first", "_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": "custom", "_hor_position": "center", "refer_form_data": { "map": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3625.9857346364677!2d121.56387331536634!3d25.033964283970027!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3442abbff9f1f2cd%3A0xa5e9e25b96d47b6!2z5p2x5Y2A5rC45bq36Zmi!5e0!3m2!1szh-TW!2stw!4v1697247462832!5m2!1szh-TW!2stw", "list": [{ "img": "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/s*px$_s7s4s2sas9s7s1s8_1747824490757.png", "link": "/all-product", "title": "所有商品頁面" }], "width": { "unit": "px", "value": "450px", "number": "450" }, "height": { "unit": "px", "value": "450px", "number": "450" } }, "_background_setting": { "type": "none" }, "_style_refer_global": { "index": "0" } }, "list": [], "type": "component", "class": "w-100", "index": 21, "label": "首圖廣告", "style": "", "global": [], "mobile": { "id": "s4s1sfs7s9s8sds5", "js": "./official_view_component/official.js", "css": { "class": {}, "style": {} }, "data": { "refer_app": "shop_template_black_style" }, "list": [], "type": "component", "class": "w-100", "index": 21, "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": {} },
|
|
9464
|
+
image: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/Screenshot 2025-05-21 at 6.50.46 PM.jpg`
|
|
9455
9465
|
}
|
|
9456
9466
|
];
|
|
9457
9467
|
BasicComponent.productList = [
|
|
@@ -9067,7 +9067,17 @@ 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
|
+
},
|
|
9076
|
+
{
|
|
9077
|
+
title: '首頁廣告',
|
|
9078
|
+
config: {"id":"s4s1sfs7s9s8sds5","js":"./official_view_component/official.js","css":{"class":{},"style":{}},"data":{"tag":"banner-first","_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":"custom","_hor_position":"center","refer_form_data":{"map":"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3625.9857346364677!2d121.56387331536634!3d25.033964283970027!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3442abbff9f1f2cd%3A0xa5e9e25b96d47b6!2z5p2x5Y2A5rC45bq36Zmi!5e0!3m2!1szh-TW!2stw!4v1697247462832!5m2!1szh-TW!2stw","list":[{"img":"https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/s*px$_s7s4s2sas9s7s1s8_1747824490757.png","link":"/all-product","title":"所有商品頁面"}],"width":{"unit":"px","value":"450px","number":"450"},"height":{"unit":"px","value":"450px","number":"450"}},"_background_setting":{"type":"none"},"_style_refer_global":{"index":"0"}},"list":[],"type":"component","class":"w-100","index":21,"label":"首圖廣告","style":"","global":[],"mobile":{"id":"s4s1sfs7s9s8sds5","js":"./official_view_component/official.js","css":{"class":{},"style":{}},"data":{"refer_app":"shop_template_black_style"},"list":[],"type":"component","class":"w-100","index":21,"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":{}},
|
|
9079
|
+
image: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/Screenshot 2025-05-21 at 6.50.46 PM.jpg`
|
|
9080
|
+
}
|
|
9071
9081
|
]
|
|
9072
9082
|
|
|
9073
9083
|
public static productList = [
|
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { init } from '../GVController.js';
|
|
11
11
|
import { TriggerEvent } from './trigger-event.js';
|
|
12
12
|
import { GlobalUser } from '../../glitter-base/global/global-user.js';
|
|
13
|
-
import { FirstBanner } from '../../public-components/banner/first-banner.js';
|
|
14
13
|
import { Language } from '../../glitter-base/global/language.js';
|
|
15
14
|
import { ApplicationConfig } from '../../application-config.js';
|
|
16
15
|
const html = String.raw;
|
|
@@ -91,7 +90,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
91
90
|
return {
|
|
92
91
|
onCreateView: () => {
|
|
93
92
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
94
|
-
FirstBanner.main({ gvc: gvc });
|
|
95
93
|
if (gBundle.page_config.seo && gBundle.page_config.seo.type === 'custom' && gBundle.page_config.seo.title) {
|
|
96
94
|
glitter.setUrlParameter('', undefined, [
|
|
97
95
|
(_a = gBundle.page_config.seo.title_prefix) !== null && _a !== void 0 ? _a : '',
|
|
@@ -76,7 +76,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
76
76
|
|
|
77
77
|
return {
|
|
78
78
|
onCreateView: () => {
|
|
79
|
-
FirstBanner.main({ gvc: gvc });
|
|
80
79
|
//定義SEO TITLE
|
|
81
80
|
if (gBundle.page_config.seo && gBundle.page_config.seo.type === 'custom' && gBundle.page_config.seo.title) {
|
|
82
81
|
glitter.setUrlParameter(
|
|
@@ -173,6 +173,7 @@ export class ToolSetting {
|
|
|
173
173
|
const htmlGenerate = new gvc.glitter.htmlGenerate(widget_container, [], {
|
|
174
174
|
editor_updated_callback: (oWidget) => {
|
|
175
175
|
if (dd.tag === '廣告輪播') {
|
|
176
|
+
console.log(`oWidget==>`, oWidget);
|
|
176
177
|
FirstBanner.main({
|
|
177
178
|
gvc: document.querySelector('.iframe_view').contentWindow.glitter.pageConfig[0].gvc,
|
|
178
179
|
ed_widget: oWidget,
|
|
@@ -213,6 +213,7 @@ export class ToolSetting {
|
|
|
213
213
|
{
|
|
214
214
|
editor_updated_callback: (oWidget: any) => {
|
|
215
215
|
if (dd.tag === '廣告輪播') {
|
|
216
|
+
console.log(`oWidget==>`,oWidget)
|
|
216
217
|
FirstBanner.main({
|
|
217
218
|
gvc: (document.querySelector('.iframe_view') as any).contentWindow.glitter.pageConfig[0].gvc,
|
|
218
219
|
ed_widget: oWidget,
|
package/lowcode/jspage/main.js
CHANGED
|
@@ -743,12 +743,7 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
743
743
|
src: `fa-sharp fa-regular fa-globe guide-user-editor-11-icon`,
|
|
744
744
|
index: 'color',
|
|
745
745
|
hint: '全站樣式',
|
|
746
|
-
}
|
|
747
|
-
{
|
|
748
|
-
src: `fa-regular fa-grid-2 design-guide-1-icon`,
|
|
749
|
-
index: 'widget',
|
|
750
|
-
hint: '設計元件',
|
|
751
|
-
},
|
|
746
|
+
}
|
|
752
747
|
]
|
|
753
748
|
.filter(dd => {
|
|
754
749
|
if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|
package/lowcode/jspage/main.ts
CHANGED
|
@@ -804,12 +804,7 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
804
804
|
src: `fa-sharp fa-regular fa-globe guide-user-editor-11-icon`,
|
|
805
805
|
index: 'color',
|
|
806
806
|
hint: '全站樣式',
|
|
807
|
-
}
|
|
808
|
-
{
|
|
809
|
-
src: `fa-regular fa-grid-2 design-guide-1-icon`,
|
|
810
|
-
index: 'widget',
|
|
811
|
-
hint: '設計元件',
|
|
812
|
-
},
|
|
807
|
+
}
|
|
813
808
|
]
|
|
814
809
|
.filter(dd => {
|
|
815
810
|
if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|
|
@@ -1178,7 +1178,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter, editM
|
|
|
1178
1178
|
</div>`,
|
|
1179
1179
|
` <div class="mx-n3" style="background: #DDD;height: 1px;"></div>`,
|
|
1180
1180
|
].join(`<div style="height:18px;"></div>`);
|
|
1181
|
-
if (app_editor || glitter.share.editorViewModel.selectItem.is_customer_header) {
|
|
1181
|
+
if (app_editor || ((glitter.share.editorViewModel.selectItem) && glitter.share.editorViewModel.selectItem.is_customer_header)) {
|
|
1182
1182
|
global_setting_view = ``;
|
|
1183
1183
|
}
|
|
1184
1184
|
if (vm.page === 'editor') {
|
|
@@ -1355,7 +1355,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
1355
1355
|
</div>`,
|
|
1356
1356
|
` <div class="mx-n3" style="background: #DDD;height: 1px;"></div>`,
|
|
1357
1357
|
].join(`<div style="height:18px;"></div>`);
|
|
1358
|
-
if (app_editor || glitter.share.editorViewModel.selectItem.is_customer_header) {
|
|
1358
|
+
if (app_editor || ((glitter.share.editorViewModel.selectItem) && glitter.share.editorViewModel.selectItem.is_customer_header)) {
|
|
1359
1359
|
global_setting_view = ``;
|
|
1360
1360
|
}
|
|
1361
1361
|
if (vm.page === 'editor') {
|
|
@@ -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,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
|
|