ts-glitter 20.6.8 → 20.6.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/lowcode/Entry.js +2 -2
- package/lowcode/Entry.ts +2 -2
- package/lowcode/backend-manager/bg-blog.js +617 -621
- package/lowcode/backend-manager/bg-blog.ts +2323 -2325
- package/lowcode/backend-manager/bg-line.js +5 -4
- package/lowcode/backend-manager/bg-line.ts +5 -4
- package/lowcode/backend-manager/bg-list-component.js +9 -0
- package/lowcode/backend-manager/bg-list-component.ts +15 -1
- package/lowcode/backend-manager/bg-notify.js +6 -4
- package/lowcode/backend-manager/bg-notify.ts +6 -4
- package/lowcode/backend-manager/bg-product.js +145 -0
- package/lowcode/backend-manager/bg-product.ts +153 -0
- package/lowcode/backend-manager/bg-sns.js +5 -3
- package/lowcode/backend-manager/bg-sns.ts +5 -3
- package/lowcode/backend-manager/bg-widget.js +92 -4
- package/lowcode/backend-manager/bg-widget.ts +122 -6
- package/lowcode/backend-manager/splitPage.js +0 -39
- package/lowcode/backend-manager/splitPage.ts +0 -40
- package/lowcode/cms-plugin/auto-fcm-advertise.js +17 -5
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +19 -6
- package/lowcode/cms-plugin/auto-fcm-history.js +2732 -0
- package/lowcode/cms-plugin/auto-fcm-history.ts +2995 -0
- package/lowcode/cms-plugin/cms-router.js +5 -0
- package/lowcode/cms-plugin/cms-router.ts +6 -0
- package/lowcode/cms-plugin/filter-options.js +80 -27
- package/lowcode/cms-plugin/filter-options.ts +83 -27
- package/lowcode/cms-plugin/language-backend.js +50 -39
- package/lowcode/cms-plugin/language-backend.ts +109 -95
- package/lowcode/cms-plugin/menus-setting.js +175 -151
- package/lowcode/cms-plugin/menus-setting.ts +620 -591
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/data.js +7 -7
- package/lowcode/cms-plugin/module/data.ts +262 -233
- package/lowcode/cms-plugin/module/delivery-html.js +18 -10
- package/lowcode/cms-plugin/module/delivery-html.ts +26 -10
- package/lowcode/cms-plugin/module/order-setting.js +458 -328
- package/lowcode/cms-plugin/module/order-setting.ts +622 -351
- package/lowcode/cms-plugin/module/product-excel.js +1 -1
- package/lowcode/cms-plugin/module/product-excel.ts +2 -1
- package/lowcode/cms-plugin/order/order-module.js +90 -1
- package/lowcode/cms-plugin/order/order-module.ts +106 -1
- package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -8
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +28 -15
- package/lowcode/cms-plugin/pos-pages/products-page.js +0 -39
- package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -40
- package/lowcode/cms-plugin/shopping-collections.ts +1 -3
- package/lowcode/cms-plugin/shopping-finance-setting.js +19 -80
- package/lowcode/cms-plugin/shopping-finance-setting.ts +19 -87
- package/lowcode/cms-plugin/shopping-order-manager.js +122 -38
- package/lowcode/cms-plugin/shopping-order-manager.ts +160 -58
- package/lowcode/cms-plugin/shopping-product-setting.js +364 -376
- package/lowcode/cms-plugin/shopping-product-setting.ts +406 -415
- package/lowcode/cms-plugin/shopping-setting-advance.js +57 -16
- package/lowcode/cms-plugin/shopping-setting-advance.ts +69 -18
- package/lowcode/cms-plugin/user/user-module.js +2 -43
- package/lowcode/cms-plugin/user/user-module.ts +2 -46
- package/lowcode/cms-plugin/user-list.js +4 -6
- package/lowcode/cms-plugin/user-list.ts +35 -38
- package/lowcode/css/editor.css +42 -3
- package/lowcode/glitter-base/global/language.js +6 -1
- package/lowcode/glitter-base/global/language.ts +10 -4
- package/lowcode/glitter-base/global/payment-config.js +19 -16
- package/lowcode/glitter-base/global/payment-config.ts +22 -16
- package/lowcode/glitter-base/global/shipment-config.js +6 -5
- package/lowcode/glitter-base/global/shipment-config.ts +12 -10
- package/lowcode/glitter-base/route/fcm.js +21 -1
- package/lowcode/glitter-base/route/fcm.ts +22 -2
- package/lowcode/glitter-base/route/shopping.js +8 -32
- package/lowcode/glitter-base/route/shopping.ts +10 -33
- package/lowcode/glitter-base/route/user.js +11 -2
- package/lowcode/glitter-base/route/user.ts +23 -12
- package/lowcode/jspage/function-page/setting_editor.js +9 -0
- package/lowcode/jspage/function-page/setting_editor.ts +9 -0
- package/lowcode/public-components/blogs/list.js +223 -195
- package/lowcode/public-components/blogs/list.ts +383 -352
- package/lowcode/public-components/product/product-list.js +8 -4
- package/lowcode/public-components/product/product-list.ts +9 -4
- package/lowcode/public-components/terms-related/index.js +1 -1
- package/lowcode/public-components/terms-related/index.ts +1 -1
- package/lowcode/public-components/user-manager/um-login.js +1 -1
- package/lowcode/public-components/user-manager/um-login.ts +2 -2
- package/lowcode/public-components/user-manager/um-order.js +41 -5
- package/lowcode/public-components/user-manager/um-order.ts +58 -20
- package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
- package/nhi4veq3gk.json +1 -0
- package/package.json +1 -1
- package/src/Language.d.ts +2 -0
- package/src/Language.js +66 -65
- package/src/Language.js.map +1 -1
- package/src/Language.ts +719 -715
- package/src/api-public/config/shipment-config.js +3 -2
- package/src/api-public/config/shipment-config.js.map +1 -1
- package/src/api-public/config/shipment-config.ts +3 -2
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-chat.ts +1 -2
- package/src/api-public/controllers/fcm.js +23 -58
- package/src/api-public/controllers/fcm.js.map +1 -1
- package/src/api-public/controllers/fcm.ts +28 -56
- package/src/api-public/controllers/shop.js +7 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +17 -10
- package/src/api-public/controllers/user.js +1 -0
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -0
- package/src/api-public/services/auto-send-email.js +247 -187
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/auto-send-email.ts +568 -505
- package/src/api-public/services/delivery.js +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/delivery.ts +6 -5
- package/src/api-public/services/financial-service.js +1 -2
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +4 -6
- package/src/api-public/services/manager.d.ts +4 -3
- package/src/api-public/services/manager.js +8 -12
- package/src/api-public/services/manager.js.map +1 -1
- package/src/api-public/services/manager.ts +57 -59
- package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
- package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
- package/src/api-public/services/schedule.d.ts +1 -0
- package/src/api-public/services/schedule.js +27 -0
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +30 -0
- package/src/api-public/services/shopping.d.ts +22 -2
- package/src/api-public/services/shopping.js +362 -90
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +481 -134
- package/src/api-public/services/user.d.ts +1 -0
- package/src/api-public/services/user.js +32 -12
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +38 -19
- package/src/api-public/services/workers.js +3 -3
- package/src/api-public/services/workers.js.map +1 -1
- package/src/api-public/services/workers.ts +103 -103
- package/src/app-project/serverless/src/modules/database.js +1 -1
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.ts +171 -171
- package/src/controllers/template.d.ts +1 -1
- package/src/controllers/template.js +16 -16
- package/src/controllers/template.js.map +1 -1
- package/src/controllers/template.ts +98 -84
- package/src/modules/database.js +3 -1
- package/src/modules/database.js.map +1 -1
- package/src/modules/database.ts +185 -181
- package/src/modules/firebase.d.ts +17 -0
- package/src/modules/firebase.js +126 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +169 -0
- package/src/public-config-initial/auto-fcm.js +8 -2
- package/src/public-config-initial/auto-fcm.js.map +1 -1
- package/src/public-config-initial/auto-fcm.ts +15 -6
- package/src/services/app.d.ts +2 -1
- package/src/services/app.js.map +1 -1
- package/src/services/app.ts +2 -1
- package/src/services/template.d.ts +3 -2
- package/src/services/template.js +2 -1
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +13 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
2
2
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
3
3
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
4
|
-
import { LanguageBackend } from
|
|
4
|
+
import { LanguageBackend } from './language-backend.js';
|
|
5
5
|
const html = String.raw;
|
|
6
6
|
export class MenusSetting {
|
|
7
7
|
static main(gvc, widget) {
|
|
@@ -11,7 +11,7 @@ export class MenusSetting {
|
|
|
11
11
|
type: 'list',
|
|
12
12
|
index: 0,
|
|
13
13
|
dataList: undefined,
|
|
14
|
-
query: ''
|
|
14
|
+
query: '',
|
|
15
15
|
};
|
|
16
16
|
const filterID = gvc.glitter.getUUID();
|
|
17
17
|
let vmi = undefined;
|
|
@@ -36,19 +36,19 @@ export class MenusSetting {
|
|
|
36
36
|
view: () => {
|
|
37
37
|
if (vm.type === 'list') {
|
|
38
38
|
return BgWidget.container(html `
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
<div class="title-container">
|
|
40
|
+
${BgWidget.title('選單管理')}
|
|
41
|
+
<div class="flex-fill"></div>
|
|
42
|
+
${false
|
|
43
43
|
? BgWidget.darkButton('新增', gvc.event(() => {
|
|
44
44
|
vm.type = 'add';
|
|
45
45
|
gvc.notifyDataChange(id);
|
|
46
46
|
}))
|
|
47
47
|
: ''}
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
</div>
|
|
49
|
+
${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
|
|
50
50
|
gvc: gvc,
|
|
51
|
-
getData:
|
|
51
|
+
getData: vmi => {
|
|
52
52
|
vm.dataList = [
|
|
53
53
|
{ tag: 'menu-setting', title: '主選單' },
|
|
54
54
|
{ tag: 'footer-setting', title: '頁腳' },
|
|
@@ -65,7 +65,7 @@ export class MenusSetting {
|
|
|
65
65
|
},
|
|
66
66
|
filter: [],
|
|
67
67
|
})))}
|
|
68
|
-
|
|
68
|
+
`);
|
|
69
69
|
}
|
|
70
70
|
else if (vm.type == 'add') {
|
|
71
71
|
return BgWidget.container(this.setMenu({
|
|
@@ -100,13 +100,13 @@ export class MenusSetting {
|
|
|
100
100
|
const vm = {
|
|
101
101
|
id: cf.gvc.glitter.getUUID(),
|
|
102
102
|
link: {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
'en-US': [],
|
|
104
|
+
'zh-CN': [],
|
|
105
|
+
'zh-TW': [],
|
|
106
106
|
},
|
|
107
107
|
selected: false,
|
|
108
108
|
loading: true,
|
|
109
|
-
language: window.parent.store_info.language_setting.def
|
|
109
|
+
language: window.parent.store_info.language_setting.def,
|
|
110
110
|
};
|
|
111
111
|
ApiUser.getPublicConfig(cf.key, 'manager').then((data) => {
|
|
112
112
|
if (data.response.value) {
|
|
@@ -115,13 +115,13 @@ export class MenusSetting {
|
|
|
115
115
|
gvc.notifyDataChange(vm.id);
|
|
116
116
|
});
|
|
117
117
|
function clearNoNeedData(items) {
|
|
118
|
-
items.map(
|
|
118
|
+
items.map(dd => {
|
|
119
119
|
dd.selected = undefined;
|
|
120
120
|
clearNoNeedData(dd.items || []);
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
function save() {
|
|
124
|
-
for (const a of [
|
|
124
|
+
for (const a of ['en-US', 'zh-CN', 'zh-TW']) {
|
|
125
125
|
clearNoNeedData(vm.link[a]);
|
|
126
126
|
}
|
|
127
127
|
cf.widget.event('loading', {
|
|
@@ -131,7 +131,7 @@ export class MenusSetting {
|
|
|
131
131
|
key: cf.key,
|
|
132
132
|
value: vm.link,
|
|
133
133
|
user_id: 'manager',
|
|
134
|
-
}).then(
|
|
134
|
+
}).then(data => {
|
|
135
135
|
setTimeout(() => {
|
|
136
136
|
cf.widget.event('loading', {
|
|
137
137
|
visible: false,
|
|
@@ -144,14 +144,14 @@ export class MenusSetting {
|
|
|
144
144
|
}
|
|
145
145
|
function selectAll(array) {
|
|
146
146
|
array.selected = true;
|
|
147
|
-
array.items.map(
|
|
147
|
+
array.items.map(dd => {
|
|
148
148
|
dd.selected = true;
|
|
149
149
|
selectAll(dd);
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
function clearAll(array) {
|
|
153
153
|
array.selected = false;
|
|
154
|
-
array.items.map(
|
|
154
|
+
array.items.map(dd => {
|
|
155
155
|
dd.selected = false;
|
|
156
156
|
clearAll(dd);
|
|
157
157
|
});
|
|
@@ -172,7 +172,7 @@ export class MenusSetting {
|
|
|
172
172
|
return count;
|
|
173
173
|
}
|
|
174
174
|
function deleteSelect(items) {
|
|
175
|
-
return items.filter(
|
|
175
|
+
return items.filter(d1 => {
|
|
176
176
|
d1.items = deleteSelect(d1.items || []);
|
|
177
177
|
return !d1.selected;
|
|
178
178
|
});
|
|
@@ -188,65 +188,72 @@ export class MenusSetting {
|
|
|
188
188
|
var _a;
|
|
189
189
|
const link = vm.link[vm.language];
|
|
190
190
|
return html `<div class="title-container" style="width: 856px; max-width: 100%;">
|
|
191
|
-
|
|
191
|
+
${BgWidget.goBack(cf.gvc.event(() => {
|
|
192
192
|
cf.goBack();
|
|
193
193
|
}))}${BgWidget.title((_a = cf.title) !== null && _a !== void 0 ? _a : '選單設定')}
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
<div class="flex-fill"></div>
|
|
195
|
+
${LanguageBackend.switchBtn({
|
|
196
196
|
gvc: gvc,
|
|
197
197
|
language: vm.language,
|
|
198
|
-
callback:
|
|
198
|
+
callback: language => {
|
|
199
199
|
vm.language = language;
|
|
200
200
|
refresh();
|
|
201
|
-
}
|
|
201
|
+
},
|
|
202
202
|
})}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
</div>
|
|
204
|
+
${BgWidget.container(html `<div
|
|
205
|
+
style="max-width:100%;width: 856px; padding: 20px; background: white; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.08); border-radius: 10px; overflow: hidden; justify-content: center; align-items: center; display: inline-flex"
|
|
206
|
+
>
|
|
207
|
+
<div style="width: 100%; position: relative">
|
|
208
|
+
<div
|
|
209
|
+
style="width: 100%; left: 0px; top: 0px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 20px; display: inline-flex"
|
|
210
|
+
>
|
|
211
|
+
<div
|
|
212
|
+
class="w-100 ${getSelectCount({
|
|
211
213
|
items: link,
|
|
212
214
|
}) > 0
|
|
213
215
|
? ``
|
|
214
216
|
: `d-none`}"
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
style="height: 40px; padding: 12px 18px;background: #F7F7F7; border-radius: 10px; justify-content: flex-end; align-items: center; gap: 8px; display: inline-flex"
|
|
218
|
+
>
|
|
219
|
+
<div
|
|
220
|
+
style="flex: 1 1 0; color: #393939; font-size: 14px; font-family: Noto Sans; font-weight: 700; word-wrap: break-word"
|
|
221
|
+
>
|
|
222
|
+
已選取${getSelectCount({
|
|
219
223
|
items: link,
|
|
220
224
|
})}項
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
</div>
|
|
226
|
+
<div
|
|
227
|
+
style="cursor:pointer;padding: 4px 14px;background: white; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.10); border-radius: 20px; border: 1px #DDDDDD solid; justify-content: flex-start; align-items: flex-start; gap: 10px; display: flex"
|
|
228
|
+
>
|
|
229
|
+
<div
|
|
230
|
+
style="color: #393939; font-size: 14px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
|
|
231
|
+
onclick="${gvc.event(() => {
|
|
228
232
|
vm.link[vm.language] = deleteSelect(link);
|
|
229
233
|
gvc.notifyDataChange(vm.id);
|
|
230
234
|
})}"
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
>
|
|
236
|
+
刪除
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
<div
|
|
241
|
+
class="d-flex align-items-center"
|
|
242
|
+
style="width: 100%; height: 22px; position: relative;gap:29px;"
|
|
243
|
+
>
|
|
244
|
+
<div
|
|
245
|
+
class="${allSelect({
|
|
239
246
|
items: link,
|
|
240
|
-
selected: !link.find(
|
|
247
|
+
selected: !link.find(dd => {
|
|
241
248
|
return !dd.selected;
|
|
242
249
|
}),
|
|
243
250
|
})
|
|
244
251
|
? `fa-solid fa-square-check`
|
|
245
252
|
: `fa-regular fa-square`}"
|
|
246
|
-
|
|
247
|
-
|
|
253
|
+
style="color:#393939;width: 16px; height: 16px;cursor: pointer;"
|
|
254
|
+
onclick="${cf.gvc.event((e, event) => {
|
|
248
255
|
event.stopPropagation();
|
|
249
|
-
if (link.find(
|
|
256
|
+
if (link.find(dd => {
|
|
250
257
|
return !dd.selected;
|
|
251
258
|
})) {
|
|
252
259
|
selectAll({
|
|
@@ -260,11 +267,17 @@ export class MenusSetting {
|
|
|
260
267
|
}
|
|
261
268
|
gvc.notifyDataChange(vm.id);
|
|
262
269
|
})}"
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
270
|
+
></div>
|
|
271
|
+
<div
|
|
272
|
+
style="left: 61px; top: 0px; color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 700; word-wrap: break-word"
|
|
273
|
+
>
|
|
274
|
+
選單名稱 ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
<div
|
|
278
|
+
style="align-self: stretch; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: flex"
|
|
279
|
+
>
|
|
280
|
+
${(() => {
|
|
268
281
|
function renderItems(array) {
|
|
269
282
|
const id = gvc.glitter.getUUID();
|
|
270
283
|
return (gvc.bindView(() => {
|
|
@@ -274,20 +287,22 @@ export class MenusSetting {
|
|
|
274
287
|
return array
|
|
275
288
|
.map((dd, index) => {
|
|
276
289
|
const list = html `
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
290
|
+
<div
|
|
291
|
+
class=" w-100 "
|
|
292
|
+
style="width: 100%; justify-content: flex-start; align-items: center; gap: 5px; display: inline-flex;cursor: pointer;"
|
|
293
|
+
onclick="${cf.gvc.event(() => {
|
|
281
294
|
if (dd.items && dd.items.length > 0) {
|
|
282
295
|
dd.toggle = !dd.toggle;
|
|
283
296
|
gvc.notifyDataChange(vm.id);
|
|
284
297
|
}
|
|
285
298
|
})}"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
299
|
+
>
|
|
300
|
+
<div
|
|
301
|
+
class="${allSelect(dd)
|
|
302
|
+
? `fa-solid fa-square-check`
|
|
303
|
+
: `fa-regular fa-square`}"
|
|
304
|
+
style="color:#393939;width: 16px; height: 16px;"
|
|
305
|
+
onclick="${cf.gvc.event((e, event) => {
|
|
291
306
|
event.stopPropagation();
|
|
292
307
|
dd.selected = !dd.selected;
|
|
293
308
|
if (dd.selected) {
|
|
@@ -298,85 +313,90 @@ export class MenusSetting {
|
|
|
298
313
|
}
|
|
299
314
|
gvc.notifyDataChange(vm.id);
|
|
300
315
|
})}"
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
></div>
|
|
317
|
+
<div
|
|
318
|
+
class="hoverF2 pe-2 my-1"
|
|
319
|
+
style="width: 100%; justify-content: flex-start; align-items: center; gap: 8px; display: flex"
|
|
320
|
+
>
|
|
321
|
+
<i
|
|
322
|
+
class="ms-2 fa-solid fa-grip-dots-vertical color39 dragItem hoverBtn d-flex align-items-center justify-content-center"
|
|
323
|
+
style="cursor: pointer;width:25px;height: 25px;"
|
|
324
|
+
></i>
|
|
325
|
+
<div
|
|
326
|
+
style="flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; display: inline-flex;white-space: normal;word-break: break-all;"
|
|
327
|
+
>
|
|
328
|
+
<div
|
|
329
|
+
style="justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex"
|
|
330
|
+
>
|
|
331
|
+
<div
|
|
332
|
+
style="color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-break: break-all;"
|
|
333
|
+
>
|
|
334
|
+
${dd.title}
|
|
335
|
+
</div>
|
|
336
|
+
${dd.items && dd.items.length > 0
|
|
320
337
|
? !dd.toggle
|
|
321
338
|
? `<i class="fa-solid fa-angle-down color39"></i>`
|
|
322
339
|
: `<i class="fa-solid fa-angle-up color39"></i>`
|
|
323
340
|
: ``}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
</div>
|
|
342
|
+
<div
|
|
343
|
+
style="justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;white-space: normal;word-break: break-all;"
|
|
344
|
+
>
|
|
345
|
+
<div
|
|
346
|
+
style="color: #3366BB; font-size: 14px; font-family: Noto Sans; font-weight: 400; line-height: 14px; word-wrap: break-word"
|
|
347
|
+
>
|
|
348
|
+
${dd.title}
|
|
349
|
+
</div>
|
|
350
|
+
<div
|
|
351
|
+
style="color: #159240; font-size: 14px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
|
|
352
|
+
>
|
|
353
|
+
${dd.link}
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<div class="flex-fill"></div>
|
|
358
|
+
<div
|
|
359
|
+
class="child me-2"
|
|
360
|
+
onclick="${cf.gvc.event((e, event) => {
|
|
344
361
|
event.stopPropagation();
|
|
345
362
|
MenusSetting.editEvent({
|
|
346
363
|
link: '',
|
|
347
364
|
title: '',
|
|
348
365
|
items: [],
|
|
349
|
-
},
|
|
366
|
+
}, data => {
|
|
350
367
|
dd.items = dd.items || [];
|
|
351
368
|
dd.items.push(data);
|
|
352
369
|
gvc.notifyDataChange(vm.id);
|
|
353
370
|
});
|
|
354
371
|
})}"
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
372
|
+
>
|
|
373
|
+
<i class="fa-solid fa-plus" style="color:#393939;"></i>
|
|
374
|
+
</div>
|
|
375
|
+
<div
|
|
376
|
+
class="child"
|
|
377
|
+
onclick="${cf.gvc.event((e, event) => {
|
|
361
378
|
event.stopPropagation();
|
|
362
|
-
MenusSetting.editEvent(dd,
|
|
379
|
+
MenusSetting.editEvent(dd, data => {
|
|
363
380
|
array[index] = data;
|
|
364
381
|
gvc.notifyDataChange(vm.id);
|
|
365
382
|
});
|
|
366
383
|
})}"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
384
|
+
>
|
|
385
|
+
<i class="fa-solid fa-pencil" style="color:#393939;"></i>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
${dd.items && dd.items.length > 0
|
|
373
390
|
? html `
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
391
|
+
<div
|
|
392
|
+
class=" w-100 ${dd.toggle ? `` : `d-none`}"
|
|
393
|
+
style="padding-left: 35px;"
|
|
394
|
+
>
|
|
395
|
+
${renderItems(dd.items)}
|
|
396
|
+
</div>
|
|
397
|
+
`
|
|
378
398
|
: ``}
|
|
379
|
-
|
|
399
|
+
`;
|
|
380
400
|
return html `<li class="w-100 ">${list}</li>`;
|
|
381
401
|
})
|
|
382
402
|
.join('');
|
|
@@ -429,40 +449,44 @@ export class MenusSetting {
|
|
|
429
449
|
};
|
|
430
450
|
}) +
|
|
431
451
|
html ` <div
|
|
432
|
-
|
|
433
|
-
|
|
452
|
+
style="cursor:pointer;align-self: stretch; height: 50px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; display: flex"
|
|
453
|
+
onclick="${cf.gvc.event(() => {
|
|
434
454
|
MenusSetting.editEvent({
|
|
435
455
|
link: '',
|
|
436
456
|
title: '',
|
|
437
457
|
items: [],
|
|
438
|
-
},
|
|
458
|
+
}, data => {
|
|
439
459
|
array.push(data);
|
|
440
460
|
gvc.notifyDataChange(vm.id);
|
|
441
461
|
});
|
|
442
462
|
})}"
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
463
|
+
>
|
|
464
|
+
<div
|
|
465
|
+
style="align-self: stretch; height: 54px; border-radius: 10px; border: 1px #DDDDDD solid; justify-content: center; align-items: center; gap: 6px; display: inline-flex"
|
|
466
|
+
>
|
|
467
|
+
<i class="fa-solid fa-plus" style="color: #3366BB;font-size: 16px; "></i>
|
|
468
|
+
<div
|
|
469
|
+
style="color: #3366BB; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
|
|
470
|
+
>
|
|
471
|
+
新增選單
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
</div>`);
|
|
451
475
|
}
|
|
452
476
|
return renderItems(link);
|
|
453
477
|
})()}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
</div>`)}
|
|
482
|
+
<div class="update-bar-container">
|
|
483
|
+
${BgWidget.cancel(gvc.event(() => {
|
|
460
484
|
cf.goBack();
|
|
461
485
|
}))}
|
|
462
|
-
|
|
486
|
+
${BgWidget.save(gvc.event(() => {
|
|
463
487
|
save();
|
|
464
488
|
}))}
|
|
465
|
-
|
|
489
|
+
</div>`;
|
|
466
490
|
},
|
|
467
491
|
divCreate: {
|
|
468
492
|
style: `padding-bottom:60px;`,
|
|
@@ -493,7 +517,7 @@ export class MenusSetting {
|
|
|
493
517
|
title: '選單名稱',
|
|
494
518
|
default: data.title || '',
|
|
495
519
|
placeHolder: '請輸入選單名稱',
|
|
496
|
-
callback:
|
|
520
|
+
callback: text => {
|
|
497
521
|
data.title = text;
|
|
498
522
|
},
|
|
499
523
|
}),
|
|
@@ -502,7 +526,7 @@ export class MenusSetting {
|
|
|
502
526
|
title: '',
|
|
503
527
|
default: data.link || '',
|
|
504
528
|
placeHolder: '選擇或貼上外部連結',
|
|
505
|
-
callback:
|
|
529
|
+
callback: text => {
|
|
506
530
|
data.link = text;
|
|
507
531
|
},
|
|
508
532
|
}),
|
|
@@ -540,7 +564,7 @@ export class MenusSetting {
|
|
|
540
564
|
title: '分類名稱',
|
|
541
565
|
default: data.title || '',
|
|
542
566
|
placeHolder: '請輸入分類名稱',
|
|
543
|
-
callback:
|
|
567
|
+
callback: text => {
|
|
544
568
|
data.title = text;
|
|
545
569
|
},
|
|
546
570
|
}),
|
|
@@ -549,7 +573,7 @@ export class MenusSetting {
|
|
|
549
573
|
title: '',
|
|
550
574
|
default: data.link || '',
|
|
551
575
|
placeHolder: '請輸入分類標籤',
|
|
552
|
-
callback:
|
|
576
|
+
callback: text => {
|
|
553
577
|
data.link = text;
|
|
554
578
|
},
|
|
555
579
|
}),
|