ts-glitter 20.6.7 → 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.
Files changed (160) hide show
  1. package/lowcode/Entry.js +2 -2
  2. package/lowcode/Entry.ts +2 -2
  3. package/lowcode/backend-manager/bg-blog.js +617 -621
  4. package/lowcode/backend-manager/bg-blog.ts +2323 -2325
  5. package/lowcode/backend-manager/bg-line.js +5 -4
  6. package/lowcode/backend-manager/bg-line.ts +5 -4
  7. package/lowcode/backend-manager/bg-list-component.js +9 -0
  8. package/lowcode/backend-manager/bg-list-component.ts +15 -1
  9. package/lowcode/backend-manager/bg-notify.js +6 -4
  10. package/lowcode/backend-manager/bg-notify.ts +6 -4
  11. package/lowcode/backend-manager/bg-product.js +145 -0
  12. package/lowcode/backend-manager/bg-product.ts +153 -0
  13. package/lowcode/backend-manager/bg-sns.js +5 -3
  14. package/lowcode/backend-manager/bg-sns.ts +5 -3
  15. package/lowcode/backend-manager/bg-widget.js +92 -4
  16. package/lowcode/backend-manager/bg-widget.ts +122 -6
  17. package/lowcode/backend-manager/splitPage.js +0 -39
  18. package/lowcode/backend-manager/splitPage.ts +0 -40
  19. package/lowcode/cms-plugin/auto-fcm-advertise.js +17 -5
  20. package/lowcode/cms-plugin/auto-fcm-advertise.ts +19 -6
  21. package/lowcode/cms-plugin/auto-fcm-history.js +2732 -0
  22. package/lowcode/cms-plugin/auto-fcm-history.ts +2995 -0
  23. package/lowcode/cms-plugin/cms-router.js +5 -0
  24. package/lowcode/cms-plugin/cms-router.ts +6 -0
  25. package/lowcode/cms-plugin/filter-options.js +80 -27
  26. package/lowcode/cms-plugin/filter-options.ts +83 -27
  27. package/lowcode/cms-plugin/language-backend.js +50 -39
  28. package/lowcode/cms-plugin/language-backend.ts +109 -95
  29. package/lowcode/cms-plugin/menus-setting.js +175 -151
  30. package/lowcode/cms-plugin/menus-setting.ts +620 -591
  31. package/lowcode/cms-plugin/model/order.d.ts +1 -0
  32. package/lowcode/cms-plugin/module/data.js +7 -7
  33. package/lowcode/cms-plugin/module/data.ts +262 -233
  34. package/lowcode/cms-plugin/module/delivery-html.js +18 -10
  35. package/lowcode/cms-plugin/module/delivery-html.ts +26 -10
  36. package/lowcode/cms-plugin/module/order-setting.js +458 -328
  37. package/lowcode/cms-plugin/module/order-setting.ts +622 -351
  38. package/lowcode/cms-plugin/module/product-excel.js +1 -1
  39. package/lowcode/cms-plugin/module/product-excel.ts +2 -1
  40. package/lowcode/cms-plugin/order/order-module.js +90 -1
  41. package/lowcode/cms-plugin/order/order-module.ts +106 -1
  42. package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -8
  43. package/lowcode/cms-plugin/pos-pages/payment-page.ts +28 -15
  44. package/lowcode/cms-plugin/pos-pages/products-page.js +0 -39
  45. package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -40
  46. package/lowcode/cms-plugin/shopping-collections.ts +1 -3
  47. package/lowcode/cms-plugin/shopping-finance-setting.js +19 -80
  48. package/lowcode/cms-plugin/shopping-finance-setting.ts +19 -87
  49. package/lowcode/cms-plugin/shopping-order-manager.js +122 -38
  50. package/lowcode/cms-plugin/shopping-order-manager.ts +160 -58
  51. package/lowcode/cms-plugin/shopping-product-setting.js +364 -376
  52. package/lowcode/cms-plugin/shopping-product-setting.ts +406 -415
  53. package/lowcode/cms-plugin/shopping-setting-advance.js +57 -16
  54. package/lowcode/cms-plugin/shopping-setting-advance.ts +69 -18
  55. package/lowcode/cms-plugin/user/user-module.js +2 -43
  56. package/lowcode/cms-plugin/user/user-module.ts +2 -46
  57. package/lowcode/cms-plugin/user-list.js +4 -6
  58. package/lowcode/cms-plugin/user-list.ts +35 -38
  59. package/lowcode/css/editor.css +42 -3
  60. package/lowcode/glitter-base/global/language.js +6 -1
  61. package/lowcode/glitter-base/global/language.ts +10 -4
  62. package/lowcode/glitter-base/global/payment-config.js +19 -16
  63. package/lowcode/glitter-base/global/payment-config.ts +22 -16
  64. package/lowcode/glitter-base/global/shipment-config.js +6 -5
  65. package/lowcode/glitter-base/global/shipment-config.ts +12 -10
  66. package/lowcode/glitter-base/route/fcm.js +21 -1
  67. package/lowcode/glitter-base/route/fcm.ts +22 -2
  68. package/lowcode/glitter-base/route/shopping.js +8 -32
  69. package/lowcode/glitter-base/route/shopping.ts +10 -33
  70. package/lowcode/glitter-base/route/user.js +11 -2
  71. package/lowcode/glitter-base/route/user.ts +23 -12
  72. package/lowcode/jspage/function-page/setting_editor.js +9 -0
  73. package/lowcode/jspage/function-page/setting_editor.ts +9 -0
  74. package/lowcode/public-components/blogs/list.js +223 -195
  75. package/lowcode/public-components/blogs/list.ts +383 -352
  76. package/lowcode/public-components/product/product-list.js +8 -4
  77. package/lowcode/public-components/product/product-list.ts +9 -4
  78. package/lowcode/public-components/terms-related/index.js +1 -1
  79. package/lowcode/public-components/terms-related/index.ts +1 -1
  80. package/lowcode/public-components/user-manager/um-login.js +1 -1
  81. package/lowcode/public-components/user-manager/um-login.ts +2 -2
  82. package/lowcode/public-components/user-manager/um-order.js +41 -5
  83. package/lowcode/public-components/user-manager/um-order.ts +58 -20
  84. package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
  85. package/nhi4veq3gk.json +1 -0
  86. package/package.json +1 -1
  87. package/src/Language.d.ts +2 -0
  88. package/src/Language.js +66 -65
  89. package/src/Language.js.map +1 -1
  90. package/src/Language.ts +719 -715
  91. package/src/api-public/config/shipment-config.js +3 -2
  92. package/src/api-public/config/shipment-config.js.map +1 -1
  93. package/src/api-public/config/shipment-config.ts +3 -2
  94. package/src/api-public/controllers/ai-chat.js.map +1 -1
  95. package/src/api-public/controllers/ai-chat.ts +1 -2
  96. package/src/api-public/controllers/fcm.js +23 -58
  97. package/src/api-public/controllers/fcm.js.map +1 -1
  98. package/src/api-public/controllers/fcm.ts +28 -56
  99. package/src/api-public/controllers/shop.js +7 -1
  100. package/src/api-public/controllers/shop.js.map +1 -1
  101. package/src/api-public/controllers/shop.ts +17 -10
  102. package/src/api-public/controllers/user.js +1 -0
  103. package/src/api-public/controllers/user.js.map +1 -1
  104. package/src/api-public/controllers/user.ts +2 -0
  105. package/src/api-public/services/auto-send-email.js +247 -187
  106. package/src/api-public/services/auto-send-email.js.map +1 -1
  107. package/src/api-public/services/auto-send-email.ts +568 -505
  108. package/src/api-public/services/delivery.js +1 -1
  109. package/src/api-public/services/delivery.js.map +1 -1
  110. package/src/api-public/services/delivery.ts +6 -5
  111. package/src/api-public/services/financial-service.js +1 -2
  112. package/src/api-public/services/financial-service.js.map +1 -1
  113. package/src/api-public/services/financial-service.ts +4 -6
  114. package/src/api-public/services/manager.d.ts +4 -3
  115. package/src/api-public/services/manager.js +8 -12
  116. package/src/api-public/services/manager.js.map +1 -1
  117. package/src/api-public/services/manager.ts +57 -59
  118. package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
  119. package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
  120. package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
  121. package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
  122. package/src/api-public/services/schedule.d.ts +1 -0
  123. package/src/api-public/services/schedule.js +27 -0
  124. package/src/api-public/services/schedule.js.map +1 -1
  125. package/src/api-public/services/schedule.ts +30 -0
  126. package/src/api-public/services/shopping.d.ts +22 -2
  127. package/src/api-public/services/shopping.js +362 -90
  128. package/src/api-public/services/shopping.js.map +1 -1
  129. package/src/api-public/services/shopping.ts +481 -134
  130. package/src/api-public/services/user.d.ts +1 -0
  131. package/src/api-public/services/user.js +36 -16
  132. package/src/api-public/services/user.js.map +1 -1
  133. package/src/api-public/services/user.ts +42 -23
  134. package/src/api-public/services/workers.js +3 -3
  135. package/src/api-public/services/workers.js.map +1 -1
  136. package/src/api-public/services/workers.ts +103 -103
  137. package/src/app-project/serverless/src/modules/database.js +1 -1
  138. package/src/app-project/serverless/src/modules/database.js.map +1 -1
  139. package/src/app-project/serverless/src/modules/database.ts +171 -171
  140. package/src/controllers/template.d.ts +1 -1
  141. package/src/controllers/template.js +16 -16
  142. package/src/controllers/template.js.map +1 -1
  143. package/src/controllers/template.ts +98 -84
  144. package/src/modules/database.js +3 -1
  145. package/src/modules/database.js.map +1 -1
  146. package/src/modules/database.ts +185 -181
  147. package/src/modules/firebase.d.ts +17 -0
  148. package/src/modules/firebase.js +126 -0
  149. package/src/modules/firebase.js.map +1 -1
  150. package/src/modules/firebase.ts +169 -0
  151. package/src/public-config-initial/auto-fcm.js +8 -2
  152. package/src/public-config-initial/auto-fcm.js.map +1 -1
  153. package/src/public-config-initial/auto-fcm.ts +15 -6
  154. package/src/services/app.d.ts +2 -1
  155. package/src/services/app.js.map +1 -1
  156. package/src/services/app.ts +2 -1
  157. package/src/services/template.d.ts +3 -2
  158. package/src/services/template.js +2 -1
  159. package/src/services/template.js.map +1 -1
  160. 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 "./language-backend.js";
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
- <div class="title-container">
40
- ${BgWidget.title('選單管理')}
41
- <div class="flex-fill"></div>
42
- ${false
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
- </div>
49
- ${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
48
+ </div>
49
+ ${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
50
50
  gvc: gvc,
51
- getData: (vmi) => {
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
- "en-US": [],
104
- "zh-CN": [],
105
- "zh-TW": []
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((dd) => {
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 ["en-US", 'zh-CN', 'zh-TW']) {
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((data) => {
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((dd) => {
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((dd) => {
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((d1) => {
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
- ${BgWidget.goBack(cf.gvc.event(() => {
191
+ ${BgWidget.goBack(cf.gvc.event(() => {
192
192
  cf.goBack();
193
193
  }))}${BgWidget.title((_a = cf.title) !== null && _a !== void 0 ? _a : '選單設定')}
194
- <div class="flex-fill"></div>
195
- ${LanguageBackend.switchBtn({
194
+ <div class="flex-fill"></div>
195
+ ${LanguageBackend.switchBtn({
196
196
  gvc: gvc,
197
197
  language: vm.language,
198
- callback: (language) => {
198
+ callback: language => {
199
199
  vm.language = language;
200
200
  refresh();
201
- }
201
+ },
202
202
  })}
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 style="width: 100%; left: 0px; top: 0px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 20px; display: inline-flex">
209
- <div
210
- class="w-100 ${getSelectCount({
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
- style="height: 40px; padding: 12px 18px;background: #F7F7F7; border-radius: 10px; justify-content: flex-end; align-items: center; gap: 8px; display: inline-flex"
216
- >
217
- <div style="flex: 1 1 0; color: #393939; font-size: 14px; font-family: Noto Sans; font-weight: 700; word-wrap: break-word">
218
- 已選取${getSelectCount({
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
- </div>
222
- <div
223
- 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"
224
- >
225
- <div
226
- style="color: #393939; font-size: 14px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
227
- onclick="${gvc.event(() => {
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
- </div>
234
- </div>
235
- </div>
236
- <div class="d-flex align-items-center" style="width: 100%; height: 22px; position: relative;gap:29px;">
237
- <div
238
- class="${allSelect({
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((dd) => {
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
- style="color:#393939;width: 16px; height: 16px;cursor: pointer;"
247
- onclick="${cf.gvc.event((e, event) => {
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((dd) => {
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
- ></div>
264
- <div style="left: 61px; top: 0px; color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 700; word-wrap: break-word">選單名稱 ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}</div>
265
- </div>
266
- <div style="align-self: stretch; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: flex">
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
- <div
278
- class=" w-100 "
279
- style="width: 100%; justify-content: flex-start; align-items: center; gap: 5px; display: inline-flex;cursor: pointer;"
280
- onclick="${cf.gvc.event(() => {
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
- <div
288
- class="${allSelect(dd) ? `fa-solid fa-square-check` : `fa-regular fa-square`}"
289
- style="color:#393939;width: 16px; height: 16px;"
290
- onclick="${cf.gvc.event((e, event) => {
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
- ></div>
302
- <div
303
- class="hoverF2 pe-2 my-1"
304
- style="width: 100%; justify-content: flex-start; align-items: center; gap: 8px; display: flex"
305
- >
306
- <i
307
- class="ms-2 fa-solid fa-grip-dots-vertical color39 dragItem hoverBtn d-flex align-items-center justify-content-center"
308
- style="cursor: pointer;width:25px;height: 25px;"
309
- ></i>
310
- <div
311
- style="flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; display: inline-flex;white-space: normal;word-break: break-all;"
312
- >
313
- <div style="justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex">
314
- <div
315
- style="color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-break: break-all;"
316
- >
317
- ${dd.title}
318
- </div>
319
- ${dd.items && dd.items.length > 0
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
- </div>
325
- <div
326
- style="justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;white-space: normal;word-break: break-all;"
327
- >
328
- <div
329
- style="color: #3366BB; font-size: 14px; font-family: Noto Sans; font-weight: 400; line-height: 14px; word-wrap: break-word"
330
- >
331
- ${dd.title}
332
- </div>
333
- <div
334
- style="color: #159240; font-size: 14px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
335
- >
336
- ${dd.link}
337
- </div>
338
- </div>
339
- </div>
340
- <div class="flex-fill"></div>
341
- <div
342
- class="child me-2"
343
- onclick="${cf.gvc.event((e, event) => {
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
- }, (data) => {
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
- <i class="fa-solid fa-plus" style="color:#393939;"></i>
357
- </div>
358
- <div
359
- class="child"
360
- onclick="${cf.gvc.event((e, event) => {
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, (data) => {
379
+ MenusSetting.editEvent(dd, data => {
363
380
  array[index] = data;
364
381
  gvc.notifyDataChange(vm.id);
365
382
  });
366
383
  })}"
367
- >
368
- <i class="fa-solid fa-pencil" style="color:#393939;"></i>
369
- </div>
370
- </div>
371
- </div>
372
- ${dd.items && dd.items.length > 0
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
- <div class=" w-100 ${dd.toggle ? `` : `d-none`}" style="padding-left: 35px;">
375
- ${renderItems(dd.items)}
376
- </div>
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
- style="cursor:pointer;align-self: stretch; height: 50px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; display: flex"
433
- onclick="${cf.gvc.event(() => {
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
- }, (data) => {
458
+ }, data => {
439
459
  array.push(data);
440
460
  gvc.notifyDataChange(vm.id);
441
461
  });
442
462
  })}"
443
- >
444
- <div
445
- style="align-self: stretch; height: 54px; border-radius: 10px; border: 1px #DDDDDD solid; justify-content: center; align-items: center; gap: 6px; display: inline-flex"
446
- >
447
- <i class="fa-solid fa-plus" style="color: #3366BB;font-size: 16px; "></i>
448
- <div style="color: #3366BB; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word">新增選單</div>
449
- </div>
450
- </div>`);
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
- </div>
455
- </div>
456
- </div>
457
- </div>`)}
458
- <div class="update-bar-container">
459
- ${BgWidget.cancel(gvc.event(() => {
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
- ${BgWidget.save(gvc.event(() => {
486
+ ${BgWidget.save(gvc.event(() => {
463
487
  save();
464
488
  }))}
465
- </div>`;
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: (text) => {
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: (text) => {
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: (text) => {
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: (text) => {
576
+ callback: text => {
553
577
  data.link = text;
554
578
  },
555
579
  }),