ts-glitter 21.9.6 → 21.9.8
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/backend-manager/bg-blog.js +2 -0
- package/lowcode/backend-manager/bg-blog.ts +4 -0
- package/lowcode/backend-manager/bg-product.js +3 -3
- package/lowcode/backend-manager/bg-product.ts +3 -3
- package/lowcode/backend-manager/bg-widget.js +15 -11
- package/lowcode/backend-manager/bg-widget.ts +30 -21
- package/lowcode/cms-plugin/menus-setting.js +389 -141
- package/lowcode/cms-plugin/menus-setting.ts +519 -228
- package/lowcode/cms-plugin/shopping-collections.js +5 -38
- package/lowcode/cms-plugin/shopping-collections.ts +5 -47
- package/lowcode/jspage/function-page/setting_editor.js +0 -27
- package/lowcode/jspage/function-page/setting_editor.ts +27 -27
- package/lowcode/public-components/footer/footer-01.js +183 -158
- package/lowcode/public-components/footer/footer-01.ts +275 -256
- package/lowcode/public-components/footer/footer-02.js +83 -63
- package/lowcode/public-components/footer/footer-02.ts +160 -145
- package/lowcode/public-components/footer/footer-03.js +78 -60
- package/lowcode/public-components/footer/footer-03.ts +149 -137
- package/lowcode/public-components/headers/sy-02.js +17 -2
- package/lowcode/public-components/headers/sy-02.ts +18 -6
- package/lowcode/public-components/headers/sy-03.js +18 -4
- package/lowcode/public-components/headers/sy-03.ts +26 -15
- package/lowcode/public-components/headers/sy-04.js +18 -4
- package/lowcode/public-components/headers/sy-04.ts +26 -15
- package/lowcode/public-components/headers/sy-05.js +93 -68
- package/lowcode/public-components/headers/sy-05.ts +174 -151
- package/lowcode/public-components/product/pd-class.js +27 -8
- package/lowcode/public-components/product/pd-class.ts +60 -35
- package/package.json +1 -1
- package/src/api-public/services/shopee.js +17 -7
- package/src/api-public/services/user.js +17 -7
- package/src/index.js +17 -7
- package/src/services/app.js +17 -7
- package/src/services/app.js.map +1 -1
- package/src/services/backend-service.js +17 -7
- package/src/services/backend-service.js.map +1 -1
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { Color } from '../public/color.js';
|
|
2
11
|
import { ApiUser } from '../../glitter-base/route/user.js';
|
|
3
12
|
import { LanguageView } from '../public/language-view.js';
|
|
4
13
|
import { Language } from '../../glitter-base/global/language.js';
|
|
5
14
|
import { FooterInitial } from './footer-initial.js';
|
|
6
15
|
import { Footer } from '../../app-component/footer.js';
|
|
16
|
+
import { PdClass } from '../product/pd-class.js';
|
|
7
17
|
const html = String.raw;
|
|
8
18
|
export class Footer01 {
|
|
9
19
|
static main(gvc, widget, subData) {
|
|
@@ -15,127 +25,133 @@ export class Footer01 {
|
|
|
15
25
|
list: [],
|
|
16
26
|
};
|
|
17
27
|
const css = String.raw;
|
|
18
|
-
gvc.addStyle(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
gvc.addStyle(`
|
|
29
|
+
.f-title {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
letter-spacing: 0.64px;
|
|
33
|
+
word-break: break-all;
|
|
34
|
+
color: ${colors.title};
|
|
35
|
+
}
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
.f-ul {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 5px;
|
|
41
|
+
}
|
|
32
42
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
.f-li {
|
|
44
|
+
color: ${colors.content};
|
|
45
|
+
}
|
|
36
46
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
.f-aclass {
|
|
48
|
+
color: ${colors.content} !important;
|
|
49
|
+
}
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
.f-bgr {
|
|
52
|
+
background: ${colors.bgr};
|
|
53
|
+
}
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
.f-container {
|
|
56
|
+
margin-left: 10px;
|
|
57
|
+
margin-right: 10px;
|
|
58
|
+
}
|
|
49
59
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
.f-title-container {
|
|
61
|
+
margin-bottom: 18px;
|
|
62
|
+
}
|
|
53
63
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
.f-content-container {
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: space-around;
|
|
67
|
+
margin-bottom: 10px;
|
|
68
|
+
}
|
|
59
69
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
.f-copyright {
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
color: ${colors.content};
|
|
73
|
+
border-top: 1px solid ${colors.content};
|
|
74
|
+
padding: 6px 0;
|
|
75
|
+
}
|
|
66
76
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
.f-icon-div {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
73
83
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
.f-icon-image {
|
|
85
|
+
color: #ffffff;
|
|
86
|
+
width: 30px;
|
|
87
|
+
height: 30px;
|
|
88
|
+
}
|
|
79
89
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
.f-intro {
|
|
91
|
+
margin-top: 12px;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
font-weight: 400;
|
|
94
|
+
line-height: 160%;
|
|
95
|
+
letter-spacing: 0.56px;
|
|
96
|
+
color: ${colors.content};
|
|
97
|
+
}
|
|
88
98
|
`);
|
|
89
|
-
gvc.addStyle(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
gvc.addStyle(`
|
|
100
|
+
.f-copyright {
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
color: ${colors.content};
|
|
103
|
+
border-top: 1px solid ${colors.content};
|
|
104
|
+
padding: 6px 0;
|
|
105
|
+
}
|
|
96
106
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
.f-h4 {
|
|
108
|
+
color: ${colors.title};
|
|
109
|
+
font-size: 32px;
|
|
110
|
+
font-weight: 700;
|
|
111
|
+
}
|
|
102
112
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
.f-icon-list {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: 5px;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
.f-icon {
|
|
121
|
+
color: ${colors.content};
|
|
122
|
+
}
|
|
113
123
|
`);
|
|
114
|
-
return html `
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
return html ` <!-- Footer 01 -->
|
|
125
|
+
<footer class="f-bgr border-top">
|
|
126
|
+
<div class="border-gray-700 f-padding-top">
|
|
127
|
+
<div class="container">
|
|
128
|
+
<div class="row py-sm-5 f-container ">
|
|
129
|
+
<div
|
|
130
|
+
class="col-12 col-md-3 col-lg-4 f-title-container pt-3 pt-sm-0 ${document.body.clientWidth < 800
|
|
131
|
+
? ` d-flex flex-column align-items-center justify-content-center`
|
|
132
|
+
: ``}"
|
|
133
|
+
>
|
|
134
|
+
<img src="${formData.logo}" style="max-height: 90px" />
|
|
135
|
+
${(window.store_info.language_setting.support.length > 1 ||
|
|
136
|
+
window.store_info.multi_currency) &&
|
|
137
|
+
document.body.clientWidth < 800
|
|
138
|
+
? LanguageView.selectLanguage(gvc, colors)
|
|
139
|
+
: ``}
|
|
140
|
+
<ul class="d-flex list-unstyled list-inline mt-3 mb-md-0 text-gray-350">
|
|
141
|
+
${(() => {
|
|
125
142
|
try {
|
|
126
143
|
return formData.kkk.link
|
|
127
144
|
.map((item) => {
|
|
128
|
-
return html `
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
onclick="${gvc.event(() => {
|
|
145
|
+
return html ` <li class="list-inline-item f-icon-list">
|
|
146
|
+
<div class="f-icon-div">
|
|
147
|
+
<div
|
|
148
|
+
onclick="${gvc.event(() => {
|
|
133
149
|
gvc.glitter.href = item.link;
|
|
134
150
|
})}"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
151
|
+
>
|
|
152
|
+
<img
|
|
153
|
+
class="f-icon-image"
|
|
154
|
+
src="${(() => {
|
|
139
155
|
switch (item.type) {
|
|
140
156
|
case 'fb':
|
|
141
157
|
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847285395-img_facebook.svg';
|
|
@@ -151,10 +167,10 @@ export class Footer01 {
|
|
|
151
167
|
return '';
|
|
152
168
|
}
|
|
153
169
|
})()}"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</li>`;
|
|
158
174
|
})
|
|
159
175
|
.join('');
|
|
160
176
|
}
|
|
@@ -162,75 +178,85 @@ export class Footer01 {
|
|
|
162
178
|
return '';
|
|
163
179
|
}
|
|
164
180
|
})()}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
181
|
+
</ul>
|
|
182
|
+
<div>
|
|
183
|
+
<h4 class="f-intro mb-0">${formData.intro ? formData.intro.replace(/\n/g, '<br/>') : ''}</h4>
|
|
184
|
+
</div>
|
|
185
|
+
${(window.store_info.language_setting.support.length > 1 ||
|
|
186
|
+
window.store_info.multi_currency) &&
|
|
187
|
+
document.body.clientWidth >= 800
|
|
188
|
+
? LanguageView.selectLanguage(gvc, colors)
|
|
189
|
+
: ``}
|
|
190
|
+
</div>
|
|
191
|
+
<div class="col f-content-container ${document.body.clientWidth > 768 ? '' : 'row'}">
|
|
192
|
+
${(() => {
|
|
174
193
|
try {
|
|
175
194
|
return gvc.bindView((() => {
|
|
176
195
|
const id = gvc.glitter.getUUID();
|
|
177
196
|
let loading = true;
|
|
178
197
|
return {
|
|
179
198
|
bind: id,
|
|
180
|
-
view: () => {
|
|
199
|
+
view: () => __awaiter(this, void 0, void 0, function* () {
|
|
181
200
|
if (loading) {
|
|
182
201
|
return '';
|
|
183
202
|
}
|
|
184
203
|
else {
|
|
204
|
+
const userData = yield ApiUser.getUserData(gvc.glitter.share.GlobalUser.token, 'me');
|
|
185
205
|
return footer.list
|
|
186
206
|
.map((data) => {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
207
|
+
if (!PdClass.menuVisibleVerify(userData, data)) {
|
|
208
|
+
return '';
|
|
209
|
+
}
|
|
210
|
+
return html ` <div class="${document.body.clientWidth > 768 ? '' : 'col-12 mt-3'}">
|
|
211
|
+
<h6
|
|
212
|
+
class="heading-xxs mb-3 f-title"
|
|
213
|
+
onclick="${gvc.event(() => {
|
|
193
214
|
if (data.link) {
|
|
194
215
|
gvc.glitter.href = data.link;
|
|
195
216
|
}
|
|
196
217
|
})}"
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
.map(
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
218
|
+
>
|
|
219
|
+
${data.title}
|
|
220
|
+
</h6>
|
|
221
|
+
<ul class="list-unstyled mb-7 f-ul">
|
|
222
|
+
${data.items
|
|
223
|
+
.map(chi => {
|
|
224
|
+
if (!PdClass.menuVisibleVerify(userData, chi)) {
|
|
225
|
+
return '';
|
|
226
|
+
}
|
|
227
|
+
return html ` <li
|
|
228
|
+
class="f-li"
|
|
229
|
+
style="${chi.link ? 'cursor: pointer;' : ''}"
|
|
230
|
+
onclick="${gvc.event(() => {
|
|
208
231
|
if (chi.link) {
|
|
209
232
|
gvc.glitter.href = chi.link;
|
|
210
233
|
}
|
|
211
234
|
})}"
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
235
|
+
>
|
|
236
|
+
<a
|
|
237
|
+
class="f-aclass"
|
|
238
|
+
title="${chi.title}"
|
|
239
|
+
onclick="${gvc.event((e, event) => {
|
|
216
240
|
event.preventDefault();
|
|
217
241
|
})}"
|
|
218
|
-
|
|
219
|
-
|
|
242
|
+
href="${chi.link}"
|
|
243
|
+
>${chi.title}</a
|
|
244
|
+
>
|
|
245
|
+
</li>`;
|
|
220
246
|
})
|
|
221
247
|
.join('')}
|
|
222
|
-
|
|
223
|
-
|
|
248
|
+
</ul>
|
|
249
|
+
</div>`;
|
|
224
250
|
})
|
|
225
251
|
.join('');
|
|
226
252
|
}
|
|
227
|
-
},
|
|
253
|
+
}),
|
|
228
254
|
divCreate: {
|
|
229
255
|
class: document.body.clientWidth > 768 ? 'd-flex gap-5' : 'row p-0',
|
|
230
256
|
},
|
|
231
257
|
onCreate: () => {
|
|
232
258
|
if (loading) {
|
|
233
|
-
ApiUser.getPublicConfig(widget.formData.menu_refer || 'footer-setting', 'manager').then(
|
|
259
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'footer-setting', 'manager').then(data => {
|
|
234
260
|
if (data.result && data.response.value) {
|
|
235
261
|
footer.list = data.response.value[Language.getLanguage()];
|
|
236
262
|
}
|
|
@@ -246,23 +272,22 @@ export class Footer01 {
|
|
|
246
272
|
return '';
|
|
247
273
|
}
|
|
248
274
|
})()}
|
|
249
|
-
|
|
250
|
-
</div>
|
|
251
|
-
</div>
|
|
275
|
+
</div>
|
|
252
276
|
</div>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="py-6">
|
|
280
|
+
<div class="container">
|
|
281
|
+
${formData.copy_right
|
|
282
|
+
? html ` <div class="row">
|
|
283
|
+
<div class="col text-center">
|
|
284
|
+
<p class="my-2 f-copyright">${formData.copy_right}</p>
|
|
285
|
+
</div>
|
|
286
|
+
</div>`
|
|
262
287
|
: ''}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</footer>`;
|
|
266
291
|
},
|
|
267
292
|
mobile: () => {
|
|
268
293
|
return Footer.main({
|
|
@@ -270,10 +295,10 @@ export class Footer01 {
|
|
|
270
295
|
formData: {},
|
|
271
296
|
key: '',
|
|
272
297
|
widget: widget,
|
|
273
|
-
callback: () => { }
|
|
298
|
+
callback: () => { },
|
|
274
299
|
});
|
|
275
300
|
},
|
|
276
|
-
gvc: gvc
|
|
301
|
+
gvc: gvc,
|
|
277
302
|
});
|
|
278
303
|
}
|
|
279
304
|
}
|