ts-glitter 22.4.7 → 22.4.9
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/lib/glitterBundle/Glitter.css +74 -62
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-product.js +49 -32
- package/lowcode/backend-manager/bg-product.ts +57 -39
- package/lowcode/backend-manager/bg-widget.js +17 -0
- package/lowcode/backend-manager/bg-widget.ts +18 -0
- package/lowcode/cms-plugin/information/information-module.js +5 -5
- package/lowcode/cms-plugin/information/information-module.ts +9 -5
- package/lowcode/cms-plugin/menus-setting.js +69 -55
- package/lowcode/cms-plugin/menus-setting.ts +77 -61
- package/lowcode/cms-plugin/module/form-module.js +109 -89
- package/lowcode/cms-plugin/module/form-module.ts +680 -650
- package/lowcode/cms-plugin/module/product-excel.js +1 -0
- package/lowcode/cms-plugin/module/product-excel.ts +2 -0
- package/lowcode/cms-plugin/pos-pages/payment-page.js +28 -10
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +29 -10
- package/lowcode/cms-plugin/shopping-allowance-manager.js +0 -1
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +0 -1
- package/lowcode/cms-plugin/shopping-collections.js +367 -193
- package/lowcode/cms-plugin/shopping-collections.ts +664 -243
- package/lowcode/cms-plugin/shopping-information.js +392 -38
- package/lowcode/cms-plugin/shopping-information.ts +479 -87
- package/lowcode/cms-plugin/shopping-product-setting.js +2 -2
- package/lowcode/cms-plugin/shopping-product-setting.ts +2 -2
- package/lowcode/cms-plugin/shopping-setting-advance.js +906 -766
- package/lowcode/cms-plugin/shopping-setting-advance.ts +977 -841
- package/lowcode/cms-plugin/shopping-setting-basic.js +1547 -1285
- package/lowcode/cms-plugin/shopping-setting-basic.ts +1742 -1466
- package/lowcode/cms-plugin/stock-stores.js +1 -0
- package/lowcode/cms-plugin/stock-stores.ts +1 -0
- package/lowcode/cms-plugin/user-list.js +47 -12
- package/lowcode/cms-plugin/user-list.ts +52 -14
- package/lowcode/css/editor.css +6 -0
- package/lowcode/glitterBundle/Glitter.css +74 -62
- package/lowcode/jslib/nestable/index.html +317 -0
- package/lowcode/jslib/nestable/jquery.nestable.js +484 -0
- package/lowcode/official_view_component/form-widget/input-custom.js +98 -6
- package/lowcode/official_view_component/form-widget/input-custom.ts +121 -16
- package/lowcode/public-components/headers/header-class.js +63 -0
- package/lowcode/public-components/headers/header-class.ts +65 -0
- package/lowcode/public-components/headers/sy-02.js +386 -400
- package/lowcode/public-components/headers/sy-02.ts +482 -492
- package/lowcode/public-components/headers/sy-03.js +42 -43
- package/lowcode/public-components/headers/sy-03.ts +46 -43
- package/lowcode/public-components/headers/sy-04.js +43 -41
- package/lowcode/public-components/headers/sy-04.ts +48 -41
- package/lowcode/public-components/headers/sy-05.js +30 -27
- package/lowcode/public-components/headers/sy-05.ts +33 -27
- package/lowcode/public-components/product/product-list.js +160 -148
- package/lowcode/public-components/product/product-list.ts +186 -165
- package/lowcode/public-models/product.ts +26 -1
- package/lowcode/src/glitterBundle/Glitter.css +74 -62
- package/package.json +1 -1
- package/rxmnt81tnk.json +1 -0
- package/src/api-public/controllers/shop.js +10 -4
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +14 -9
- package/src/api-public/services/ezpay/tool.d.ts +1 -0
- package/src/api-public/services/mail.js +1 -1
- package/src/api-public/services/mail.js.map +1 -1
- package/src/api-public/services/mail.ts +1 -1
- package/src/api-public/services/schedule.d.ts +0 -1
- package/src/api-public/services/schedule.js +12 -35
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +15 -39
- package/src/api-public/services/shopee.js +7 -17
- package/src/api-public/services/shopping.d.ts +27 -6
- package/src/api-public/services/shopping.js +364 -85
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +510 -101
- package/src/api-public/services/updated-table-checked.js +58 -1
- package/src/api-public/services/updated-table-checked.js.map +1 -1
- package/src/api-public/services/updated-table-checked.ts +62 -1
- package/src/api-public/services/user-update.js +14 -0
- package/src/api-public/services/user-update.js.map +1 -1
- package/src/api-public/services/user-update.ts +15 -0
- package/src/api-public/services/user.js +1 -1
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/index.js +7 -5
- package/src/index.js.map +1 -1
- package/src/index.ts +45 -38
- package/src/modules/firebase.js +1 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +1 -0
- package/src/seo-config.d.ts +1 -1
- package/src/seo-config.js +1 -2
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -2
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/ses.js +4 -3
- package/src/services/ses.js.map +1 -1
- package/src/services/system-schedule.js.map +1 -1
- package/src/services/system-schedule.ts +1 -0
|
@@ -26,20 +26,18 @@ export class Sy03 {
|
|
|
26
26
|
browser: () => {
|
|
27
27
|
var _a, _b, _c;
|
|
28
28
|
let changePage = (index, type, subData) => { };
|
|
29
|
-
gvc.glitter.getModule(
|
|
30
|
-
changePage = cl.changePage;
|
|
31
|
-
});
|
|
29
|
+
gvc.glitter.getModule(HeaderClass.getChangePagePath(gvc), cl => (changePage = cl.changePage));
|
|
32
30
|
const colors = Color.getTheme(gvc, widget.formData);
|
|
31
|
+
HeaderClass.addStyle(gvc);
|
|
33
32
|
return html ` <!--Header Sy03-->
|
|
34
33
|
<div class="d-sm-none" style="height: 76px;"></div>
|
|
35
34
|
<nav
|
|
36
35
|
class="navbar navbar-expand-lg vw-100 header header-place shadow top-0 left-0 py-0 position-fixed position-sm-relative"
|
|
37
|
-
style="background: ${(_a = widget.formData.theme_color['background']) !== null && _a !== void 0 ? _a : '#000'} !important;z-index:9999;
|
|
38
|
-
"
|
|
36
|
+
style="background: ${(_a = widget.formData.theme_color['background']) !== null && _a !== void 0 ? _a : '#000'} !important;z-index:9999;"
|
|
39
37
|
>
|
|
40
38
|
<div
|
|
41
39
|
class="container header-place h-100 align-items-center justify-content-center d-flex"
|
|
42
|
-
style="${document.body.clientWidth < 800 ? `height:76px !important;` :
|
|
40
|
+
style="${document.body.clientWidth < 800 ? `height:76px !important;` : ''}"
|
|
43
41
|
>
|
|
44
42
|
<div class="d-flex flex-column align-items-center justify-content-center pb-md-3 pt-md-3 flex-fill">
|
|
45
43
|
<!--LOGO顯示區塊-->
|
|
@@ -69,20 +67,12 @@ export class Sy03 {
|
|
|
69
67
|
changePage('index', 'home', {});
|
|
70
68
|
})}"
|
|
71
69
|
>
|
|
72
|
-
<img
|
|
73
|
-
style="width: 150px;
|
|
74
|
-
background-position: center;
|
|
75
|
-
background-size: cover;
|
|
76
|
-
background-repeat: no-repeat;
|
|
77
|
-
border-radius: 10px;
|
|
78
|
-
margin-bottom: 20px;"
|
|
79
|
-
src="${widget.formData.logo}"
|
|
80
|
-
/>
|
|
70
|
+
<img class="h-logo-image" src="${widget.formData.logo}" />
|
|
81
71
|
</div>
|
|
82
72
|
</div>
|
|
83
73
|
</div>
|
|
84
74
|
<div class="mb-3">${LanguageView.selectLanguage(gvc, colors)}</div>
|
|
85
|
-
<div class="position-relative ${HeaderClass.hideShopperBtn() ? `d-none` :
|
|
75
|
+
<div class="position-relative ${HeaderClass.hideShopperBtn() ? `d-none` : ''}">
|
|
86
76
|
<input
|
|
87
77
|
class="form-control fw-500 "
|
|
88
78
|
placeholder="${Language.text('find_product')}"
|
|
@@ -93,13 +83,7 @@ export class Sy03 {
|
|
|
93
83
|
})}"
|
|
94
84
|
/>
|
|
95
85
|
|
|
96
|
-
<div
|
|
97
|
-
style=" position: absolute;
|
|
98
|
-
right: 10px;
|
|
99
|
-
top: 50%;
|
|
100
|
-
transform: translateY(-50%);
|
|
101
|
-
color: rgb(107, 114, 128);"
|
|
102
|
-
>
|
|
86
|
+
<div class="h-glass-div">
|
|
103
87
|
<i class="fa-solid fa-magnifying-glass"></i>
|
|
104
88
|
</div>
|
|
105
89
|
</div>
|
|
@@ -128,19 +112,28 @@ export class Sy03 {
|
|
|
128
112
|
}
|
|
129
113
|
loop(vm.data);
|
|
130
114
|
}
|
|
131
|
-
function
|
|
115
|
+
function openParent(data, current_path, depth) {
|
|
116
|
+
data.open = current_path[depth] === data.title;
|
|
117
|
+
if ((data.items || []).length > 0) {
|
|
118
|
+
for (const d87 of data.items) {
|
|
119
|
+
openParent(d87, current_path, depth + 1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function loopItems(data, show_border, current_path) {
|
|
132
124
|
return data
|
|
133
125
|
.map((dd) => {
|
|
134
126
|
var _a, _b, _c, _d, _e;
|
|
127
|
+
const path = [...current_path, dd.title];
|
|
135
128
|
return html `
|
|
136
129
|
<li
|
|
137
130
|
style="${show_border
|
|
138
131
|
? `border-bottom: 1px solid ${(_a = widget.formData.theme_color['title']) !== null && _a !== void 0 ? _a : '#000'} !important;`
|
|
139
|
-
:
|
|
132
|
+
: ''}"
|
|
140
133
|
>
|
|
141
134
|
<div
|
|
142
135
|
class="nav-link d-flex justify-content-between"
|
|
143
|
-
style="padding: 16px;"
|
|
136
|
+
style="padding: 16px; gap: 30px;"
|
|
144
137
|
onclick="${gvc.event(() => {
|
|
145
138
|
var _a;
|
|
146
139
|
if (((_a = dd.items) !== null && _a !== void 0 ? _a : []).length === 0) {
|
|
@@ -155,6 +148,9 @@ export class Sy03 {
|
|
|
155
148
|
if (!og) {
|
|
156
149
|
dd.open = true;
|
|
157
150
|
}
|
|
151
|
+
for (const d4 of vm.data) {
|
|
152
|
+
openParent(d4, path, 0);
|
|
153
|
+
}
|
|
158
154
|
gvc.notifyDataChange(id);
|
|
159
155
|
}
|
|
160
156
|
})}"
|
|
@@ -175,21 +171,21 @@ export class Sy03 {
|
|
|
175
171
|
${((_c = dd.items) !== null && _c !== void 0 ? _c : []).length
|
|
176
172
|
? `<i class="fa-solid ${dd.open ? `fa-angle-up` : `fa-angle-down`}"
|
|
177
173
|
style="color: ${(_d = widget.formData.theme_color['title']) !== null && _d !== void 0 ? _d : '#000'} !important;"></i>`
|
|
178
|
-
:
|
|
174
|
+
: ''}
|
|
179
175
|
</div>
|
|
180
176
|
${dd.open
|
|
181
|
-
? `<ul class="ps-3 pb-2">${loopItems((_e = dd.items) !== null && _e !== void 0 ? _e : [], false)}</ul>`
|
|
182
|
-
:
|
|
177
|
+
? `<ul class="ps-3 pb-2">${loopItems((_e = dd.items) !== null && _e !== void 0 ? _e : [], false, path)}</ul>`
|
|
178
|
+
: ''}
|
|
183
179
|
</li>
|
|
184
180
|
`;
|
|
185
181
|
})
|
|
186
182
|
.join('');
|
|
187
183
|
}
|
|
188
|
-
return loopItems(vm.data, true);
|
|
184
|
+
return loopItems(vm.data, true, []);
|
|
189
185
|
},
|
|
190
186
|
divCreate: {
|
|
191
187
|
class: `navbar-nav me-auto mb-2 mb-lg-0`,
|
|
192
|
-
style:
|
|
188
|
+
style: '',
|
|
193
189
|
elem: `ul`,
|
|
194
190
|
},
|
|
195
191
|
};
|
|
@@ -239,7 +235,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
239
235
|
</div>
|
|
240
236
|
</div>
|
|
241
237
|
<!--選單列表顯示區塊-->
|
|
242
|
-
<ul class="navbar-nav
|
|
238
|
+
<ul class="navbar-nav d-none d-md-block flex-fill ps-2 position-sticky">
|
|
243
239
|
${gvc.bindView(() => {
|
|
244
240
|
const id = gvc.glitter.getUUID();
|
|
245
241
|
const vm = {
|
|
@@ -270,13 +266,16 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
270
266
|
}
|
|
271
267
|
})}"
|
|
272
268
|
>${dd.title}
|
|
273
|
-
${dd.items.length > 0 ? `<i class="fa-solid fa-angle-down
|
|
269
|
+
${dd.items.length > 0 ? html `<i class="fa-solid m-2 fa-angle-down fs-5"></i>` : ''}</a
|
|
274
270
|
>
|
|
275
271
|
${dd.items.length > 0
|
|
276
|
-
? `<ul
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
? html `<ul
|
|
273
|
+
class="dropdown-menu"
|
|
274
|
+
style="background:${(_b = widget.formData.theme_color['background']) !== null && _b !== void 0 ? _b : '#000'} !important; cursor: pointer; z-index: 99999;"
|
|
275
|
+
>
|
|
276
|
+
${loopItems(dd.items)}
|
|
277
|
+
</ul>`
|
|
278
|
+
: ''}
|
|
280
279
|
</li>`;
|
|
281
280
|
})
|
|
282
281
|
.join('');
|
|
@@ -284,8 +283,8 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
284
283
|
return loopItems(vm.data);
|
|
285
284
|
}),
|
|
286
285
|
divCreate: {
|
|
287
|
-
class: `navbar-nav ms-3 me-auto mt-3`,
|
|
288
|
-
style: `flex-direction: row; gap: 15px;`,
|
|
286
|
+
class: `navbar-nav ms-3 me-auto mt-3 flex-wrap`,
|
|
287
|
+
style: `flex-direction: row; gap: 15px; align-items: center;`,
|
|
289
288
|
elem: `ul`,
|
|
290
289
|
},
|
|
291
290
|
};
|
|
@@ -296,7 +295,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
296
295
|
class="d-flex align-items-center ${document.body.clientWidth >= 800
|
|
297
296
|
? `position-lg-absolute`
|
|
298
297
|
: `position-relative`} "
|
|
299
|
-
style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` :
|
|
298
|
+
style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` : ''}"
|
|
300
299
|
>
|
|
301
300
|
<!--固定按鈕顯示區塊-->
|
|
302
301
|
<ul class="navbar-nav flex-row ms-auto">
|
|
@@ -341,7 +340,7 @@ padding-bottom: 2px;
|
|
|
341
340
|
};
|
|
342
341
|
})}
|
|
343
342
|
${HeaderClass.hideShopperBtn()
|
|
344
|
-
?
|
|
343
|
+
? ''
|
|
345
344
|
: `<li class="nav-item d-none d-sm-flex align-items-center justify-content-center" style="min-width:45px !important;">
|
|
346
345
|
${gvc.bindView(() => {
|
|
347
346
|
const vm = {
|
|
@@ -353,7 +352,7 @@ padding-bottom: 2px;
|
|
|
353
352
|
view: () => {
|
|
354
353
|
var _a, _b;
|
|
355
354
|
if (PdClass.isShoppingPage()) {
|
|
356
|
-
return
|
|
355
|
+
return '';
|
|
357
356
|
}
|
|
358
357
|
if (!vm.toggle) {
|
|
359
358
|
return html `<i
|
|
@@ -440,7 +439,7 @@ padding-bottom: 2px;
|
|
|
440
439
|
${vm.count}
|
|
441
440
|
</div>
|
|
442
441
|
</div>`
|
|
443
|
-
:
|
|
442
|
+
: '');
|
|
444
443
|
});
|
|
445
444
|
});
|
|
446
445
|
},
|
|
@@ -19,21 +19,20 @@ export class Sy03 {
|
|
|
19
19
|
widget: widget,
|
|
20
20
|
browser: () => {
|
|
21
21
|
let changePage = (index: string, type: 'page' | 'home', subData: any) => {};
|
|
22
|
-
gvc.glitter.getModule(
|
|
23
|
-
|
|
24
|
-
});
|
|
22
|
+
gvc.glitter.getModule(HeaderClass.getChangePagePath(gvc), cl => (changePage = cl.changePage));
|
|
23
|
+
|
|
25
24
|
const colors = Color.getTheme(gvc, widget.formData);
|
|
25
|
+
HeaderClass.addStyle(gvc);
|
|
26
26
|
|
|
27
27
|
return html` <!--Header Sy03-->
|
|
28
28
|
<div class="d-sm-none" style="height: 76px;"></div>
|
|
29
29
|
<nav
|
|
30
30
|
class="navbar navbar-expand-lg vw-100 header header-place shadow top-0 left-0 py-0 position-fixed position-sm-relative"
|
|
31
|
-
style="background: ${widget.formData.theme_color['background'] ?? '#000'} !important;z-index:9999;
|
|
32
|
-
"
|
|
31
|
+
style="background: ${widget.formData.theme_color['background'] ?? '#000'} !important;z-index:9999;"
|
|
33
32
|
>
|
|
34
33
|
<div
|
|
35
34
|
class="container header-place h-100 align-items-center justify-content-center d-flex"
|
|
36
|
-
style="${document.body.clientWidth < 800 ? `height:76px !important;` :
|
|
35
|
+
style="${document.body.clientWidth < 800 ? `height:76px !important;` : ''}"
|
|
37
36
|
>
|
|
38
37
|
<div class="d-flex flex-column align-items-center justify-content-center pb-md-3 pt-md-3 flex-fill">
|
|
39
38
|
<!--LOGO顯示區塊-->
|
|
@@ -63,20 +62,12 @@ export class Sy03 {
|
|
|
63
62
|
changePage('index', 'home', {});
|
|
64
63
|
})}"
|
|
65
64
|
>
|
|
66
|
-
<img
|
|
67
|
-
style="width: 150px;
|
|
68
|
-
background-position: center;
|
|
69
|
-
background-size: cover;
|
|
70
|
-
background-repeat: no-repeat;
|
|
71
|
-
border-radius: 10px;
|
|
72
|
-
margin-bottom: 20px;"
|
|
73
|
-
src="${widget.formData.logo}"
|
|
74
|
-
/>
|
|
65
|
+
<img class="h-logo-image" src="${widget.formData.logo}" />
|
|
75
66
|
</div>
|
|
76
67
|
</div>
|
|
77
68
|
</div>
|
|
78
69
|
<div class="mb-3">${LanguageView.selectLanguage(gvc, colors)}</div>
|
|
79
|
-
<div class="position-relative ${HeaderClass.hideShopperBtn() ? `d-none` :
|
|
70
|
+
<div class="position-relative ${HeaderClass.hideShopperBtn() ? `d-none` : ''}">
|
|
80
71
|
<input
|
|
81
72
|
class="form-control fw-500 "
|
|
82
73
|
placeholder="${Language.text('find_product')}"
|
|
@@ -87,13 +78,7 @@ export class Sy03 {
|
|
|
87
78
|
})}"
|
|
88
79
|
/>
|
|
89
80
|
|
|
90
|
-
<div
|
|
91
|
-
style=" position: absolute;
|
|
92
|
-
right: 10px;
|
|
93
|
-
top: 50%;
|
|
94
|
-
transform: translateY(-50%);
|
|
95
|
-
color: rgb(107, 114, 128);"
|
|
96
|
-
>
|
|
81
|
+
<div class="h-glass-div">
|
|
97
82
|
<i class="fa-solid fa-magnifying-glass"></i>
|
|
98
83
|
</div>
|
|
99
84
|
</div>
|
|
@@ -127,18 +112,29 @@ export class Sy03 {
|
|
|
127
112
|
loop(vm.data);
|
|
128
113
|
}
|
|
129
114
|
|
|
130
|
-
function
|
|
115
|
+
function openParent(data: any, current_path: string[], depth: number) {
|
|
116
|
+
data.open = current_path[depth] === data.title;
|
|
117
|
+
|
|
118
|
+
if ((data.items || []).length > 0) {
|
|
119
|
+
for (const d87 of data.items) {
|
|
120
|
+
openParent(d87, current_path, depth + 1);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function loopItems(data: any, show_border: boolean, current_path: string[]) {
|
|
131
126
|
return data
|
|
132
127
|
.map((dd: any) => {
|
|
128
|
+
const path = [...current_path, dd.title];
|
|
133
129
|
return html`
|
|
134
130
|
<li
|
|
135
131
|
style="${show_border
|
|
136
132
|
? `border-bottom: 1px solid ${widget.formData.theme_color['title'] ?? '#000'} !important;`
|
|
137
|
-
:
|
|
133
|
+
: ''}"
|
|
138
134
|
>
|
|
139
135
|
<div
|
|
140
136
|
class="nav-link d-flex justify-content-between"
|
|
141
|
-
style="padding: 16px;"
|
|
137
|
+
style="padding: 16px; gap: 30px;"
|
|
142
138
|
onclick="${gvc.event(() => {
|
|
143
139
|
if (((dd as any).items ?? []).length === 0) {
|
|
144
140
|
if (dd.link) {
|
|
@@ -151,6 +147,9 @@ export class Sy03 {
|
|
|
151
147
|
if (!og) {
|
|
152
148
|
dd.open = true;
|
|
153
149
|
}
|
|
150
|
+
for (const d4 of vm.data) {
|
|
151
|
+
openParent(d4, path, 0);
|
|
152
|
+
}
|
|
154
153
|
gvc.notifyDataChange(id);
|
|
155
154
|
}
|
|
156
155
|
})}"
|
|
@@ -172,22 +171,22 @@ export class Sy03 {
|
|
|
172
171
|
${(dd.items ?? []).length
|
|
173
172
|
? `<i class="fa-solid ${dd.open ? `fa-angle-up` : `fa-angle-down`}"
|
|
174
173
|
style="color: ${widget.formData.theme_color['title'] ?? '#000'} !important;"></i>`
|
|
175
|
-
:
|
|
174
|
+
: ''}
|
|
176
175
|
</div>
|
|
177
176
|
${dd.open
|
|
178
|
-
? `<ul class="ps-3 pb-2">${loopItems(dd.items ?? [], false)}</ul>`
|
|
179
|
-
:
|
|
177
|
+
? `<ul class="ps-3 pb-2">${loopItems(dd.items ?? [], false, path)}</ul>`
|
|
178
|
+
: ''}
|
|
180
179
|
</li>
|
|
181
180
|
`;
|
|
182
181
|
})
|
|
183
182
|
.join('');
|
|
184
183
|
}
|
|
185
184
|
|
|
186
|
-
return loopItems(vm.data, true);
|
|
185
|
+
return loopItems(vm.data, true, []);
|
|
187
186
|
},
|
|
188
187
|
divCreate: {
|
|
189
188
|
class: `navbar-nav me-auto mb-2 mb-lg-0`,
|
|
190
|
-
style:
|
|
189
|
+
style: '',
|
|
191
190
|
elem: `ul`,
|
|
192
191
|
},
|
|
193
192
|
};
|
|
@@ -238,7 +237,7 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
|
|
|
238
237
|
</div>
|
|
239
238
|
</div>
|
|
240
239
|
<!--選單列表顯示區塊-->
|
|
241
|
-
<ul class="navbar-nav
|
|
240
|
+
<ul class="navbar-nav d-none d-md-block flex-fill ps-2 position-sticky">
|
|
242
241
|
${gvc.bindView(() => {
|
|
243
242
|
const id = gvc.glitter.getUUID();
|
|
244
243
|
const vm = {
|
|
@@ -275,13 +274,17 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
|
|
|
275
274
|
}
|
|
276
275
|
})}"
|
|
277
276
|
>${dd.title}
|
|
278
|
-
${dd.items.length > 0 ? `<i class="fa-solid fa-angle-down
|
|
277
|
+
${dd.items.length > 0 ? html`<i class="fa-solid m-2 fa-angle-down fs-5"></i>` : ''}</a
|
|
279
278
|
>
|
|
280
279
|
${dd.items.length > 0
|
|
281
|
-
? `<ul
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
? html`<ul
|
|
281
|
+
class="dropdown-menu"
|
|
282
|
+
style="background:${widget.formData.theme_color['background'] ??
|
|
283
|
+
'#000'} !important; cursor: pointer; z-index: 99999;"
|
|
284
|
+
>
|
|
285
|
+
${loopItems(dd.items)}
|
|
286
|
+
</ul>`
|
|
287
|
+
: ''}
|
|
285
288
|
</li>`;
|
|
286
289
|
})
|
|
287
290
|
.join('');
|
|
@@ -290,8 +293,8 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
|
|
|
290
293
|
return loopItems(vm.data);
|
|
291
294
|
},
|
|
292
295
|
divCreate: {
|
|
293
|
-
class: `navbar-nav ms-3 me-auto mt-3`,
|
|
294
|
-
style: `flex-direction: row; gap: 15px;`,
|
|
296
|
+
class: `navbar-nav ms-3 me-auto mt-3 flex-wrap`,
|
|
297
|
+
style: `flex-direction: row; gap: 15px; align-items: center;`,
|
|
295
298
|
elem: `ul`,
|
|
296
299
|
},
|
|
297
300
|
};
|
|
@@ -302,7 +305,7 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
|
|
|
302
305
|
class="d-flex align-items-center ${document.body.clientWidth >= 800
|
|
303
306
|
? `position-lg-absolute`
|
|
304
307
|
: `position-relative`} "
|
|
305
|
-
style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` :
|
|
308
|
+
style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` : ''}"
|
|
306
309
|
>
|
|
307
310
|
<!--固定按鈕顯示區塊-->
|
|
308
311
|
<ul class="navbar-nav flex-row ms-auto">
|
|
@@ -346,7 +349,7 @@ padding-bottom: 2px;
|
|
|
346
349
|
};
|
|
347
350
|
})}
|
|
348
351
|
${HeaderClass.hideShopperBtn()
|
|
349
|
-
?
|
|
352
|
+
? ''
|
|
350
353
|
: `<li class="nav-item d-none d-sm-flex align-items-center justify-content-center" style="min-width:45px !important;">
|
|
351
354
|
${gvc.bindView(() => {
|
|
352
355
|
const vm = {
|
|
@@ -357,7 +360,7 @@ padding-bottom: 2px;
|
|
|
357
360
|
bind: vm.id,
|
|
358
361
|
view: () => {
|
|
359
362
|
if (PdClass.isShoppingPage()) {
|
|
360
|
-
return
|
|
363
|
+
return '';
|
|
361
364
|
}
|
|
362
365
|
if (!vm.toggle) {
|
|
363
366
|
return html`<i
|
|
@@ -446,7 +449,7 @@ padding-bottom: 2px;
|
|
|
446
449
|
${vm.count}
|
|
447
450
|
</div>
|
|
448
451
|
</div>`
|
|
449
|
-
:
|
|
452
|
+
: ''
|
|
450
453
|
);
|
|
451
454
|
});
|
|
452
455
|
});
|
|
@@ -26,15 +26,14 @@ export class Sy04 {
|
|
|
26
26
|
browser: () => {
|
|
27
27
|
var _a, _b, _c, _d;
|
|
28
28
|
let changePage = (index, type, subData) => { };
|
|
29
|
-
gvc.glitter.getModule(
|
|
30
|
-
changePage = cl.changePage;
|
|
31
|
-
});
|
|
29
|
+
gvc.glitter.getModule(HeaderClass.getChangePagePath(gvc), cl => (changePage = cl.changePage));
|
|
32
30
|
const colors = Color.getTheme(gvc, widget.formData);
|
|
31
|
+
HeaderClass.addStyle(gvc);
|
|
33
32
|
return html ` <!--Header Sy04-->
|
|
34
|
-
<div style="height:
|
|
33
|
+
<div style="height: 88px;"></div>
|
|
35
34
|
<nav
|
|
36
35
|
class="navbar navbar-expand-lg vw-100 header header-place shadow position-fixed top-0 left-0 py-0"
|
|
37
|
-
style="background: ${(_a = widget.formData.theme_color['background']) !== null && _a !== void 0 ? _a : '#000'} !important;height:
|
|
36
|
+
style="background: ${(_a = widget.formData.theme_color['background']) !== null && _a !== void 0 ? _a : '#000'} !important;height: 88px;z-index:9999;"
|
|
38
37
|
>
|
|
39
38
|
<div class="container header-place h-100">
|
|
40
39
|
<!--LOGO顯示區塊-->
|
|
@@ -67,26 +66,18 @@ export class Sy04 {
|
|
|
67
66
|
? html `
|
|
68
67
|
<div
|
|
69
68
|
class=" fw-bold d-flex align-items-center justify-content-center"
|
|
70
|
-
style="
|
|
71
|
-
.theme_color['title']) !== null && _a !== void 0 ? _a : '#000'};"
|
|
69
|
+
style="color: ${(_a = widget.formData.theme_color['title']) !== null && _a !== void 0 ? _a : '#000'};"
|
|
72
70
|
>
|
|
73
71
|
${widget.formData.logo.value}
|
|
74
72
|
</div>
|
|
75
73
|
`
|
|
76
|
-
: html `<img
|
|
77
|
-
style="width: 150px;
|
|
78
|
-
background-position: center;
|
|
79
|
-
background-size: cover;
|
|
80
|
-
background-repeat: no-repeat;
|
|
81
|
-
margin-bottom: 20px;"
|
|
82
|
-
src="${widget.formData.logo.value}"
|
|
83
|
-
/> `}
|
|
74
|
+
: html `<img class="h-logo-image" src="${widget.formData.logo.value}" /> `}
|
|
84
75
|
</div>
|
|
85
76
|
</div>
|
|
86
77
|
</div>
|
|
87
78
|
${LanguageView.selectLanguage(gvc, colors)
|
|
88
79
|
? `<div class="mb-3">${LanguageView.selectLanguage(gvc, colors)}</div>`
|
|
89
|
-
:
|
|
80
|
+
: ''}
|
|
90
81
|
<div class="position-relative">
|
|
91
82
|
<input
|
|
92
83
|
class="form-control fw-500 "
|
|
@@ -98,13 +89,7 @@ export class Sy04 {
|
|
|
98
89
|
})}"
|
|
99
90
|
/>
|
|
100
91
|
|
|
101
|
-
<div
|
|
102
|
-
style=" position: absolute;
|
|
103
|
-
right: 10px;
|
|
104
|
-
top: 50%;
|
|
105
|
-
transform: translateY(-50%);
|
|
106
|
-
color: rgb(107, 114, 128);"
|
|
107
|
-
>
|
|
92
|
+
<div class="h-glass-div">
|
|
108
93
|
<i class="fa-solid fa-magnifying-glass"></i>
|
|
109
94
|
</div>
|
|
110
95
|
</div>
|
|
@@ -133,19 +118,28 @@ export class Sy04 {
|
|
|
133
118
|
}
|
|
134
119
|
loop(vm.data);
|
|
135
120
|
}
|
|
136
|
-
function
|
|
121
|
+
function openParent(data, current_path, depth) {
|
|
122
|
+
data.open = current_path[depth] === data.title;
|
|
123
|
+
if ((data.items || []).length > 0) {
|
|
124
|
+
for (const d87 of data.items) {
|
|
125
|
+
openParent(d87, current_path, depth + 1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function loopItems(data, show_border, current_path) {
|
|
137
130
|
return data
|
|
138
131
|
.map((dd) => {
|
|
139
132
|
var _a, _b, _c, _d, _e;
|
|
133
|
+
const path = [...current_path, dd.title];
|
|
140
134
|
return html `
|
|
141
135
|
<li
|
|
142
136
|
style="${show_border
|
|
143
137
|
? `border-bottom: 1px solid ${(_a = widget.formData.theme_color['title']) !== null && _a !== void 0 ? _a : '#000'} !important;`
|
|
144
|
-
:
|
|
138
|
+
: ''}"
|
|
145
139
|
>
|
|
146
140
|
<div
|
|
147
141
|
class="nav-link d-flex justify-content-between"
|
|
148
|
-
style="padding: 16px;"
|
|
142
|
+
style="padding: 16px; gap: 30px;"
|
|
149
143
|
onclick="${gvc.event(() => {
|
|
150
144
|
var _a;
|
|
151
145
|
if (((_a = dd.items) !== null && _a !== void 0 ? _a : []).length === 0) {
|
|
@@ -160,6 +154,9 @@ export class Sy04 {
|
|
|
160
154
|
if (!og) {
|
|
161
155
|
dd.open = true;
|
|
162
156
|
}
|
|
157
|
+
for (const d4 of vm.data) {
|
|
158
|
+
openParent(d4, path, 0);
|
|
159
|
+
}
|
|
163
160
|
gvc.notifyDataChange(id);
|
|
164
161
|
}
|
|
165
162
|
})}"
|
|
@@ -180,21 +177,21 @@ export class Sy04 {
|
|
|
180
177
|
${((_c = dd.items) !== null && _c !== void 0 ? _c : []).length
|
|
181
178
|
? `<i class="fa-solid ${dd.open ? `fa-angle-up` : `fa-angle-down`}"
|
|
182
179
|
style="color: ${(_d = widget.formData.theme_color['title']) !== null && _d !== void 0 ? _d : '#000'} !important;"></i>`
|
|
183
|
-
:
|
|
180
|
+
: ''}
|
|
184
181
|
</div>
|
|
185
182
|
${dd.open
|
|
186
|
-
? `<ul class="ps-3 pb-2">${loopItems((_e = dd.items) !== null && _e !== void 0 ? _e : [], false)}</ul>`
|
|
187
|
-
:
|
|
183
|
+
? `<ul class="ps-3 pb-2">${loopItems((_e = dd.items) !== null && _e !== void 0 ? _e : [], false, path)}</ul>`
|
|
184
|
+
: ''}
|
|
188
185
|
</li>
|
|
189
186
|
`;
|
|
190
187
|
})
|
|
191
188
|
.join('');
|
|
192
189
|
}
|
|
193
|
-
return loopItems(vm.data, true);
|
|
190
|
+
return loopItems(vm.data, true, []);
|
|
194
191
|
},
|
|
195
192
|
divCreate: {
|
|
196
193
|
class: `navbar-nav me-auto mb-2 mb-lg-0`,
|
|
197
|
-
style:
|
|
194
|
+
style: '',
|
|
198
195
|
elem: `ul`,
|
|
199
196
|
},
|
|
200
197
|
};
|
|
@@ -219,7 +216,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
219
216
|
></i>
|
|
220
217
|
</div>
|
|
221
218
|
<div
|
|
222
|
-
class="${widget.formData.logo.type === 'text' ?
|
|
219
|
+
class="${widget.formData.logo.type === 'text' ? '' : `h-100`}"
|
|
223
220
|
onclick="${gvc.event(() => {
|
|
224
221
|
changePage('index', 'home', {});
|
|
225
222
|
})}"
|
|
@@ -287,13 +284,18 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
287
284
|
}
|
|
288
285
|
})}"
|
|
289
286
|
>${dd.title}
|
|
290
|
-
${dd.items.length > 0 ? `<i class="fa-solid fa-angle-down ms-2"></i>` :
|
|
287
|
+
${dd.items.length > 0 ? `<i class="fa-solid fa-angle-down ms-2"></i>` : ''}</a
|
|
291
288
|
>
|
|
292
289
|
${dd.items.length > 0
|
|
293
|
-
? `<ul
|
|
290
|
+
? html `<ul
|
|
291
|
+
class="dropdown-menu mt-0"
|
|
292
|
+
style="background:${(_b = widget.formData.theme_color['background']) !== null && _b !== void 0 ? _b : '#000'} !important;
|
|
294
293
|
cursor: pointer;
|
|
295
|
-
z-index: 99999;"
|
|
296
|
-
|
|
294
|
+
z-index: 99999;"
|
|
295
|
+
>
|
|
296
|
+
${loopItems(dd.items)}
|
|
297
|
+
</ul>`
|
|
298
|
+
: ''}
|
|
297
299
|
</li>`;
|
|
298
300
|
})
|
|
299
301
|
.join('');
|
|
@@ -301,8 +303,8 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
301
303
|
return loopItems(vm.data);
|
|
302
304
|
}),
|
|
303
305
|
divCreate: {
|
|
304
|
-
class: `navbar-nav ms-3 me-auto `,
|
|
305
|
-
style: `flex-direction: row; gap: 0px;`,
|
|
306
|
+
class: `navbar-nav ms-3 me-auto flex-wrap`,
|
|
307
|
+
style: `flex-direction: row; gap: 0px; justify-content: center;`,
|
|
306
308
|
elem: `ul`,
|
|
307
309
|
},
|
|
308
310
|
};
|
|
@@ -351,7 +353,7 @@ padding-bottom: 2px;
|
|
|
351
353
|
};
|
|
352
354
|
})}
|
|
353
355
|
${HeaderClass.hideShopperBtn()
|
|
354
|
-
?
|
|
356
|
+
? ''
|
|
355
357
|
: `<li class="nav-item d-none d-sm-flex align-items-center justify-content-center" >
|
|
356
358
|
${gvc.bindView(() => {
|
|
357
359
|
const vm = {
|
|
@@ -363,7 +365,7 @@ padding-bottom: 2px;
|
|
|
363
365
|
view: () => {
|
|
364
366
|
var _a, _b;
|
|
365
367
|
if (PdClass.isShoppingPage()) {
|
|
366
|
-
return
|
|
368
|
+
return '';
|
|
367
369
|
}
|
|
368
370
|
if (!vm.toggle) {
|
|
369
371
|
return html `<i
|
|
@@ -445,7 +447,7 @@ padding-bottom: 2px;
|
|
|
445
447
|
${vm.count}
|
|
446
448
|
</div>
|
|
447
449
|
</div>`
|
|
448
|
-
:
|
|
450
|
+
: '');
|
|
449
451
|
});
|
|
450
452
|
});
|
|
451
453
|
},
|