ts-glitter 21.9.4 → 21.9.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/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/controllers/index.js.map +1 -1
- package/src/api-public/controllers/user.js +2 -2
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -3
- package/src/api-public/services/ai-robot.d.ts +0 -1
- package/src/api-public/services/fb-api.d.ts +0 -1
- package/src/api-public/services/fb-message.d.ts +0 -1
- package/src/api-public/services/fb-service.js +4 -4
- package/src/api-public/services/fb-service.js.map +1 -1
- package/src/api-public/services/financial-service.d.ts +0 -1
- package/src/api-public/services/financial-serviceV2.d.ts +0 -1
- package/src/api-public/services/line-message.d.ts +0 -1
- package/src/api-public/services/monitor.d.ts +0 -1
- package/src/api-public/services/share-permission.d.ts +1 -1
- package/src/api-public/services/shopee.d.ts +3 -4
- package/src/api-public/services/shopee.js +17 -7
- package/src/api-public/services/user.d.ts +0 -1
- package/src/api-public/services/user.js +19 -9
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +2 -2
- package/src/api-public/utils/ut-permission.d.ts +0 -1
- package/src/config.d.ts +1 -1
- package/src/index.js +20 -10
- package/src/modules/AWSLib.js +2 -3
- package/src/modules/AWSLib.js.map +1 -1
- package/src/modules/database.d.ts +1 -1
- package/src/modules/redis.d.ts +1 -1
- package/src/modules/tool.d.ts +4 -4
- package/src/modules/tool.js +1 -2
- package/src/modules/tool.js.map +1 -1
- package/src/run.js +1 -2
- package/src/run.js.map +1 -1
- package/src/seo-config.d.ts +0 -1
- package/src/seo-config.js +3 -3
- package/src/seo-config.js.map +1 -1
- package/src/services/app.d.ts +0 -1
- 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
- package/src/services/create-instance.js +3 -4
- package/src/services/create-instance.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/seo.d.ts +0 -1
- package/src/services/template.d.ts +0 -1
- package/src/services/tool.js +2 -3
- package/src/services/tool.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 { ApiUser } from '../../glitter-base/route/user.js';
|
|
2
11
|
import { Language } from '../../glitter-base/global/language.js';
|
|
3
|
-
import { LanguageView } from
|
|
4
|
-
import { Color } from
|
|
12
|
+
import { LanguageView } from '../public/language-view.js';
|
|
13
|
+
import { Color } from '../public/color.js';
|
|
5
14
|
import { HeadInitial } from './head-initial.js';
|
|
6
15
|
import { HeaderMobile } from './header-mobile.js';
|
|
16
|
+
import { PdClass } from '../product/pd-class.js';
|
|
7
17
|
const html = String.raw;
|
|
8
18
|
export class Sy05 {
|
|
9
19
|
static main(gvc, widget, subData) {
|
|
@@ -11,12 +21,12 @@ export class Sy05 {
|
|
|
11
21
|
widget: widget,
|
|
12
22
|
browser: () => {
|
|
13
23
|
var _a, _b, _c;
|
|
14
|
-
let changePage = (index, type, subData) => {
|
|
15
|
-
|
|
16
|
-
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, (cl) => {
|
|
24
|
+
let changePage = (index, type, subData) => { };
|
|
25
|
+
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, cl => {
|
|
17
26
|
changePage = cl.changePage;
|
|
18
27
|
});
|
|
19
28
|
return html `
|
|
29
|
+
<!--Header Sy05-->
|
|
20
30
|
<div style="height: 76px;"></div>
|
|
21
31
|
<nav
|
|
22
32
|
class="navbar navbar-expand-lg vw-100 header header-place shadow position-fixed top-0 left-0 py-0"
|
|
@@ -38,47 +48,48 @@ export class Sy05 {
|
|
|
38
48
|
view: () => {
|
|
39
49
|
var _a;
|
|
40
50
|
return html ` <div
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
class="div d-flex align-items-center flex-column w-100 p-3"
|
|
52
|
+
style="border-bottom:1px solid ${widget.formData.theme_color['title']};"
|
|
53
|
+
>
|
|
54
|
+
<div class="d-flex align-items-center ">
|
|
55
|
+
<div>
|
|
56
|
+
<div
|
|
57
|
+
class="h-100"
|
|
58
|
+
onclick="${gvc.event(() => {
|
|
49
59
|
changePage('index', 'home', {});
|
|
50
60
|
})}"
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
>
|
|
62
|
+
${widget.formData.logo.type === 'text'
|
|
53
63
|
? html `
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
<div
|
|
65
|
+
class=" fw-bold d-flex align-items-center justify-content-center"
|
|
66
|
+
style="width: 150px; margin-bottom: 20px;font-size: 36px;color: ${(_a = widget
|
|
67
|
+
.formData.theme_color['title']) !== null && _a !== void 0 ? _a : '#000'};"
|
|
68
|
+
>
|
|
69
|
+
${widget.formData.logo.value}
|
|
70
|
+
</div>
|
|
71
|
+
`
|
|
61
72
|
: html `<img
|
|
62
|
-
|
|
73
|
+
style="width: 150px;
|
|
63
74
|
background-position: center;
|
|
64
75
|
background-size: cover;
|
|
65
76
|
background-repeat: no-repeat;
|
|
66
77
|
border-radius: 10px;
|
|
67
78
|
margin-bottom: 20px;"
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
src="${widget.formData.logo.value}"
|
|
80
|
+
/> `}
|
|
81
|
+
</div>
|
|
70
82
|
</div>
|
|
71
83
|
</div>
|
|
72
84
|
</div>
|
|
73
|
-
</div>
|
|
74
85
|
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
<div class="offcanvas-body p-0 ">
|
|
87
|
+
${gvc.bindView(() => {
|
|
77
88
|
const id = gvc.glitter.getUUID();
|
|
78
89
|
const vm = {
|
|
79
90
|
data: [],
|
|
80
91
|
};
|
|
81
|
-
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(
|
|
92
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(res => {
|
|
82
93
|
vm.data = res.response.value[Language.getLanguage()];
|
|
83
94
|
gvc.notifyDataChange(id);
|
|
84
95
|
});
|
|
@@ -100,15 +111,15 @@ export class Sy05 {
|
|
|
100
111
|
.map((dd) => {
|
|
101
112
|
var _a, _b, _c, _d, _e;
|
|
102
113
|
return html `
|
|
103
|
-
|
|
104
|
-
|
|
114
|
+
<li
|
|
115
|
+
style="${show_border
|
|
105
116
|
? `border-bottom: 1px solid ${(_a = widget.formData.theme_color['title']) !== null && _a !== void 0 ? _a : '#000'} !important;`
|
|
106
117
|
: ``}"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
>
|
|
119
|
+
<div
|
|
120
|
+
class="nav-link d-flex justify-content-between"
|
|
121
|
+
style="padding: 16px;"
|
|
122
|
+
onclick="${gvc.event(() => {
|
|
112
123
|
var _a;
|
|
113
124
|
if (((_a = dd.items) !== null && _a !== void 0 ? _a : []).length === 0) {
|
|
114
125
|
if (dd.link) {
|
|
@@ -125,10 +136,10 @@ export class Sy05 {
|
|
|
125
136
|
gvc.notifyDataChange(id);
|
|
126
137
|
}
|
|
127
138
|
})}"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
139
|
+
>
|
|
140
|
+
<div
|
|
141
|
+
style="color: ${(_b = widget.formData.theme_color['title']) !== null && _b !== void 0 ? _b : '#000'} !important;"
|
|
142
|
+
onclick="${gvc.event((e, event) => {
|
|
132
143
|
if (dd.link) {
|
|
133
144
|
gvc.glitter.href = dd.link;
|
|
134
145
|
gvc.glitter.closeDrawer();
|
|
@@ -136,19 +147,21 @@ export class Sy05 {
|
|
|
136
147
|
event.stopPropagation();
|
|
137
148
|
event.preventDefault();
|
|
138
149
|
})}"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
>
|
|
151
|
+
${dd.title}
|
|
152
|
+
</div>
|
|
153
|
+
${((_c = dd.items) !== null && _c !== void 0 ? _c : []).length
|
|
143
154
|
? html `<i
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
155
|
+
class="fa-solid ${dd.open ? `fa-angle-up` : `fa-angle-down`}"
|
|
156
|
+
style="color: ${(_d = widget.formData.theme_color['title']) !== null && _d !== void 0 ? _d : '#000'} !important;"
|
|
157
|
+
></i>`
|
|
147
158
|
: ``}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
159
|
+
</div>
|
|
160
|
+
${dd.open
|
|
161
|
+
? `<ul class="ps-3 pb-2">${loopItems((_e = dd.items) !== null && _e !== void 0 ? _e : [], false)}</ul>`
|
|
162
|
+
: ``}
|
|
163
|
+
</li>
|
|
164
|
+
`;
|
|
152
165
|
})
|
|
153
166
|
.join('');
|
|
154
167
|
}
|
|
@@ -161,7 +174,7 @@ export class Sy05 {
|
|
|
161
174
|
},
|
|
162
175
|
};
|
|
163
176
|
})}
|
|
164
|
-
|
|
177
|
+
</div>`;
|
|
165
178
|
},
|
|
166
179
|
divCreate: {
|
|
167
180
|
class: `w-100 h-100`,
|
|
@@ -185,11 +198,18 @@ background: ${(_a = widget.formData.theme_color['background']) !== null && _a !=
|
|
|
185
198
|
changePage('index', 'home', {});
|
|
186
199
|
})}"> ${widget.formData.logo.type === 'text'
|
|
187
200
|
? html `
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
201
|
+
<div
|
|
202
|
+
class=" fw-bold d-flex align-items-center h-100 mb-1 mb-sm-auto"
|
|
203
|
+
style="font-size: 28px;line-height: 28px;color: ${(_c = widget.formData.theme_color['title']) !== null && _c !== void 0 ? _c : '#000'};"
|
|
204
|
+
>
|
|
205
|
+
${widget.formData.logo.value}
|
|
206
|
+
</div>
|
|
207
|
+
`
|
|
208
|
+
: html `
|
|
209
|
+
<div class="d-flex align-items-center justify-content-center h-100 py-2">
|
|
210
|
+
<img src="${widget.formData.logo.value}" style="height: 100%;" />
|
|
211
|
+
</div>
|
|
212
|
+
`}
|
|
193
213
|
</div>
|
|
194
214
|
<!--選單列表顯示區塊-->
|
|
195
215
|
<ul class="navbar-nav d-none d-md-block flex-fill ps-2" >
|
|
@@ -198,17 +218,21 @@ background: ${(_a = widget.formData.theme_color['background']) !== null && _a !=
|
|
|
198
218
|
const vm = {
|
|
199
219
|
data: [],
|
|
200
220
|
};
|
|
201
|
-
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(
|
|
221
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(res => {
|
|
202
222
|
vm.data = res.response.value[Language.getLanguage()];
|
|
203
223
|
gvc.notifyDataChange(id);
|
|
204
224
|
});
|
|
205
225
|
return {
|
|
206
226
|
bind: id,
|
|
207
|
-
view: () => {
|
|
227
|
+
view: () => __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
const userData = yield ApiUser.getUserData(gvc.glitter.share.GlobalUser.token, 'me');
|
|
208
229
|
function loopItems(data) {
|
|
209
230
|
return data
|
|
210
231
|
.map((dd) => {
|
|
211
232
|
var _a, _b;
|
|
233
|
+
if (!PdClass.menuVisibleVerify(userData, dd)) {
|
|
234
|
+
return '';
|
|
235
|
+
}
|
|
212
236
|
return html ` <li class="nav-item dropdown">
|
|
213
237
|
<a
|
|
214
238
|
class="nav-link header-link "
|
|
@@ -218,22 +242,23 @@ background: ${(_a = widget.formData.theme_color['background']) !== null && _a !=
|
|
|
218
242
|
gvc.glitter.href = dd.link;
|
|
219
243
|
}
|
|
220
244
|
})}"
|
|
221
|
-
|
|
245
|
+
>${dd.title}
|
|
246
|
+
${dd.items.length > 0 ? `<i class="fa-solid fa-angle-down ms-2"></i>` : ``}</a
|
|
222
247
|
>
|
|
223
248
|
${dd.items.length > 0
|
|
224
249
|
? html `<ul
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
250
|
+
class="dropdown-menu"
|
|
251
|
+
style="background:${(_b = widget.formData.theme_color['background']) !== null && _b !== void 0 ? _b : '#000'} !important; cursor: pointer; z-index: 99999;"
|
|
252
|
+
>
|
|
253
|
+
${loopItems(dd.items)}
|
|
254
|
+
</ul>`
|
|
230
255
|
: ``}
|
|
231
256
|
</li>`;
|
|
232
257
|
})
|
|
233
258
|
.join('');
|
|
234
259
|
}
|
|
235
260
|
return loopItems(vm.data);
|
|
236
|
-
},
|
|
261
|
+
}),
|
|
237
262
|
divCreate: {
|
|
238
263
|
class: `navbar-nav ms-3 me-auto`,
|
|
239
264
|
style: `flex-direction: row; gap: 15px;`,
|
|
@@ -255,10 +280,10 @@ background: ${(_a = widget.formData.theme_color['background']) !== null && _a !=
|
|
|
255
280
|
mobile: () => {
|
|
256
281
|
return HeaderMobile.mian({
|
|
257
282
|
gvc: gvc,
|
|
258
|
-
widget: widget
|
|
283
|
+
widget: widget,
|
|
259
284
|
});
|
|
260
285
|
},
|
|
261
|
-
gvc: gvc
|
|
286
|
+
gvc: gvc,
|
|
262
287
|
});
|
|
263
288
|
}
|
|
264
289
|
}
|