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.
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 +32 -12
  132. package/src/api-public/services/user.js.map +1 -1
  133. package/src/api-public/services/user.ts +38 -19
  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
@@ -35,11 +35,28 @@ export class ShoppingSettingAdvance {
35
35
  BgWidget.mainCard([
36
36
  html `
37
37
  <div class="guide5-4">
38
- <div class="d-flex align-items-center">
39
- <div style="color: #393939; font-weight: 700;">${carTitle}標籤</div>
40
- ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
38
+ <div class="d-flex align-items-center justify-content-between">
39
+ <div>
40
+ <div class="d-flex align-items-center">
41
+ <div style="color: #393939; font-weight: 700;">${carTitle}標籤</div>
42
+ ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
43
+ </div>
44
+ ${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
45
+ </div>
46
+ ${BgWidget.blueNote('使用現有標籤', gvc.event(() => {
47
+ var _a;
48
+ BgProduct.useProductTags({
49
+ gvc,
50
+ config_key: 'product_general_tags',
51
+ config_lang: vm.language,
52
+ def: (_a = postMD.product_tag.language[vm.language]) !== null && _a !== void 0 ? _a : [],
53
+ callback: tags => {
54
+ postMD.product_tag.language[vm.language] = tags;
55
+ gvc.notifyDataChange(id);
56
+ },
57
+ });
58
+ }))}
41
59
  </div>
42
- ${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
43
60
  ${BgWidget.multipleInput(gvc, postMD.product_tag.language[vm.language], {
44
61
  save: def => {
45
62
  postMD.product_tag.language[vm.language] = def;
@@ -48,15 +65,29 @@ export class ShoppingSettingAdvance {
48
65
  </div>
49
66
  `,
50
67
  html `
51
- <div>
52
- <div style="color: #393939; font-weight: 700;">${carTitle}管理員標籤</div>
53
- ${BgWidget.grayNote('操作後台人員登記與分類用,不會顯示於前台')} ${BgWidget.mbContainer(4)}
54
- ${BgWidget.multipleInput(gvc, (_a = postMD.product_customize_tag) !== null && _a !== void 0 ? _a : [], {
68
+ <div class="d-flex align-items-center justify-content-between">
69
+ <div>
70
+ <div style="color: #393939; font-weight: 700;">${carTitle}管理員標籤</div>
71
+ ${BgWidget.grayNote('操作後台人員登記與分類用,不會顯示於前台')} ${BgWidget.mbContainer(4)}
72
+ </div>
73
+ ${BgWidget.blueNote('使用現有標籤', gvc.event(() => {
74
+ var _a;
75
+ BgProduct.useProductTags({
76
+ gvc,
77
+ config_key: 'product_manager_tags',
78
+ def: (_a = postMD.product_customize_tag) !== null && _a !== void 0 ? _a : [],
79
+ callback: tags => {
80
+ postMD.product_customize_tag = tags;
81
+ gvc.notifyDataChange(id);
82
+ },
83
+ });
84
+ }))}
85
+ </div>
86
+ ${BgWidget.multipleInput(gvc, (_a = postMD.product_customize_tag) !== null && _a !== void 0 ? _a : [], {
55
87
  save: def => {
56
- postMD.product_customize_tag = def;
88
+ postMD.product_customize_tag = [...new Set(def)];
57
89
  },
58
- })}
59
- </div>
90
+ }, true)}
60
91
  `,
61
92
  html ` <div class="d-flex align-items-center gap-2">
62
93
  <div style="color: #393939; font-weight: 700;">${carTitle}促銷標籤</div>
@@ -430,7 +461,7 @@ export class ShoppingSettingAdvance {
430
461
  };
431
462
  const isDesktop = document.body.clientWidth > 768;
432
463
  const getIndexStyle = (index) => index === 0
433
- ? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 : 125}px; max-width: ${isDesktop ? 250 : 125}px;position: sticky; left: 0; background: #fff; box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.10);`
464
+ ? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 : 200}px; max-width: ${isDesktop ? 250 : 200}px;position: sticky; left: 0; background: #fff; box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.10);`
434
465
  : 'height: 100%; padding: 0; text-align: center; justify-content: center; min-width: 126px;';
435
466
  const resetPostList = (result, type) => {
436
467
  var _a, _b, _c;
@@ -695,13 +726,23 @@ export class ShoppingSettingAdvance {
695
726
  }
696
727
  else {
697
728
  const scrollDiv = document.getElementById('scrollDiv');
698
- if (isDesktop && scrollDiv) {
699
- scrollDiv.addEventListener('scroll', () => {
700
- const status = scrollDiv.scrollLeft > 360;
729
+ if (scrollDiv) {
730
+ function setStatus(scrollDiv, delta = 360) {
731
+ const status = scrollDiv.scrollLeft > delta;
701
732
  if (priceVM.showPriceDetail !== status) {
702
733
  priceVM.showPriceDetail = status;
703
734
  }
704
- });
735
+ }
736
+ if (isDesktop) {
737
+ scrollDiv.addEventListener('scroll', () => {
738
+ setStatus(scrollDiv);
739
+ });
740
+ }
741
+ else {
742
+ scrollDiv.addEventListener('touchmove', () => {
743
+ setStatus(scrollDiv);
744
+ });
745
+ }
705
746
  }
706
747
  }
707
748
  },
@@ -3,6 +3,7 @@ import { BgWidget } from '../backend-manager/bg-widget.js';
3
3
  import { BgProduct, OptionsItem } from '../backend-manager/bg-product.js';
4
4
  import { ApiPageConfig } from '../api/pageConfig.js';
5
5
  import { ApiUser } from '../glitter-base/route/user.js';
6
+ import { LanguageLocation } from '../glitter-base/global/language.js';
6
7
  import { ShipmentConfig } from '../glitter-base/global/shipment-config.js';
7
8
  import { QuestionInfo } from './module/question-info.js';
8
9
  import { Tool } from '../modules/tool.js';
@@ -16,7 +17,7 @@ export class ShoppingSettingAdvance {
16
17
  vm: any;
17
18
  vm2: {
18
19
  id: string;
19
- language: any;
20
+ language: LanguageLocation;
20
21
  content_detail: any;
21
22
  };
22
23
  reload: () => void;
@@ -45,11 +46,30 @@ export class ShoppingSettingAdvance {
45
46
  [
46
47
  html`
47
48
  <div class="guide5-4">
48
- <div class="d-flex align-items-center">
49
- <div style="color: #393939; font-weight: 700;">${carTitle}標籤</div>
50
- ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
49
+ <div class="d-flex align-items-center justify-content-between">
50
+ <div>
51
+ <div class="d-flex align-items-center">
52
+ <div style="color: #393939; font-weight: 700;">${carTitle}標籤</div>
53
+ ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
54
+ </div>
55
+ ${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
56
+ </div>
57
+ ${BgWidget.blueNote(
58
+ '使用現有標籤',
59
+ gvc.event(() => {
60
+ BgProduct.useProductTags({
61
+ gvc,
62
+ config_key: 'product_general_tags',
63
+ config_lang: vm.language,
64
+ def: (postMD.product_tag.language as any)[vm.language] ?? [],
65
+ callback: tags => {
66
+ (postMD.product_tag.language as any)[vm.language] = tags;
67
+ gvc.notifyDataChange(id);
68
+ },
69
+ });
70
+ })
71
+ )}
51
72
  </div>
52
- ${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
53
73
  ${BgWidget.multipleInput(gvc, (postMD.product_tag.language as any)[vm.language], {
54
74
  save: def => {
55
75
  (postMD.product_tag.language as any)[vm.language] = def;
@@ -58,15 +78,36 @@ export class ShoppingSettingAdvance {
58
78
  </div>
59
79
  `,
60
80
  html`
61
- <div>
62
- <div style="color: #393939; font-weight: 700;">${carTitle}管理員標籤</div>
63
- ${BgWidget.grayNote('操作後台人員登記與分類用,不會顯示於前台')} ${BgWidget.mbContainer(4)}
64
- ${BgWidget.multipleInput(gvc, postMD.product_customize_tag ?? [], {
81
+ <div class="d-flex align-items-center justify-content-between">
82
+ <div>
83
+ <div style="color: #393939; font-weight: 700;">${carTitle}管理員標籤</div>
84
+ ${BgWidget.grayNote('操作後台人員登記與分類用,不會顯示於前台')} ${BgWidget.mbContainer(4)}
85
+ </div>
86
+ ${BgWidget.blueNote(
87
+ '使用現有標籤',
88
+ gvc.event(() => {
89
+ BgProduct.useProductTags({
90
+ gvc,
91
+ config_key: 'product_manager_tags',
92
+ def: postMD.product_customize_tag ?? [],
93
+ callback: tags => {
94
+ postMD.product_customize_tag = tags;
95
+ gvc.notifyDataChange(id);
96
+ },
97
+ });
98
+ })
99
+ )}
100
+ </div>
101
+ ${BgWidget.multipleInput(
102
+ gvc,
103
+ postMD.product_customize_tag ?? [],
104
+ {
65
105
  save: def => {
66
- postMD.product_customize_tag = def;
106
+ postMD.product_customize_tag = [...new Set(def)];
67
107
  },
68
- })}
69
- </div>
108
+ },
109
+ true
110
+ )}
70
111
  `,
71
112
  html` <div class="d-flex align-items-center gap-2">
72
113
  <div style="color: #393939; font-weight: 700;">${carTitle}促銷標籤</div>
@@ -141,7 +182,7 @@ export class ShoppingSettingAdvance {
141
182
  type: 'text',
142
183
  placeHolder: '數字越大商品排序會越靠前',
143
184
  callback: (text: any) => {
144
- postMD.sort_weight=text
185
+ postMD.sort_weight = text;
145
186
  gvc.notifyDataChange(id);
146
187
  },
147
188
  })}
@@ -478,7 +519,7 @@ export class ShoppingSettingAdvance {
478
519
 
479
520
  const getIndexStyle = (index: number) =>
480
521
  index === 0
481
- ? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 : 125}px; max-width: ${isDesktop ? 250 : 125}px;position: sticky; left: 0; background: #fff; box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.10);`
522
+ ? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 : 200}px; max-width: ${isDesktop ? 250 : 200}px;position: sticky; left: 0; background: #fff; box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.10);`
482
523
  : 'height: 100%; padding: 0; text-align: center; justify-content: center; min-width: 126px;';
483
524
 
484
525
  const resetPostList = (result: string[], type: MultiSaleType) => {
@@ -759,13 +800,23 @@ export class ShoppingSettingAdvance {
759
800
  } else {
760
801
  // 滾動監視事件
761
802
  const scrollDiv = document.getElementById('scrollDiv');
762
- if (isDesktop && scrollDiv) {
763
- scrollDiv.addEventListener('scroll', () => {
764
- const status = scrollDiv.scrollLeft > 360;
803
+ if (scrollDiv) {
804
+ function setStatus(scrollDiv: HTMLElement, delta: number = 360) {
805
+ const status = scrollDiv.scrollLeft > delta;
765
806
  if (priceVM.showPriceDetail !== status) {
766
807
  priceVM.showPriceDetail = status;
767
808
  }
768
- });
809
+ }
810
+
811
+ if (isDesktop) {
812
+ scrollDiv.addEventListener('scroll', () => {
813
+ setStatus(scrollDiv);
814
+ });
815
+ } else {
816
+ scrollDiv.addEventListener('touchmove', () => {
817
+ setStatus(scrollDiv);
818
+ });
819
+ }
769
820
  }
770
821
  }
771
822
  },
@@ -25,47 +25,6 @@ export class UserModule {
25
25
  dialog.dataLoading({ visible: false });
26
26
  });
27
27
  }
28
- static printOption(gvc, vmt, opt) {
29
- const id = `user-tag-${opt.key}`;
30
- opt.key = `${opt.key}`;
31
- function call() {
32
- if (vmt.postData.includes(opt.key)) {
33
- vmt.postData = vmt.postData.filter(item => item !== opt.key);
34
- }
35
- else {
36
- vmt.postData.push(opt.key);
37
- }
38
- gvc.notifyDataChange(vmt.id);
39
- }
40
- return html `<div class="d-flex align-items-center gap-3 mb-3">
41
- ${gvc.bindView({
42
- bind: id,
43
- view: () => {
44
- return html `<input
45
- class="form-check-input mt-0 ${BgWidget.getCheckedClass(gvc)}"
46
- type="checkbox"
47
- id="${opt.key}"
48
- name="radio_${opt.key}"
49
- onclick="${gvc.event(() => call())}"
50
- ${vmt.postData.includes(opt.key) ? 'checked' : ''}
51
- />`;
52
- },
53
- divCreate: {
54
- class: 'd-flex align-items-center justify-content-center',
55
- },
56
- })}
57
- <div class="form-check-label c_updown_label cursor_pointer" onclick="${gvc.event(() => call())}">
58
- <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
59
- ${opt.note ? html ` <div class="tx_gray_12">${opt.note}</div> ` : ''}
60
- </div>
61
- </div>`;
62
- }
63
- static renderOptions(gvc, vmt) {
64
- if (vmt.dataList.length === 0) {
65
- return html `<div class="d-flex justify-content-center fs-5">查無標籤</div>`;
66
- }
67
- return vmt.dataList.map((item) => this.printOption(gvc, vmt, { key: item, value: item })).join('');
68
- }
69
28
  static addTags(obj) {
70
29
  const gvc = obj.gvc;
71
30
  const dataArray = obj.dataArray;
@@ -95,7 +54,7 @@ export class UserModule {
95
54
  gvc2.notifyDataChange(vmt.id);
96
55
  }), vmt.search, '搜尋標籤', '0', '0'),
97
56
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中新增'),
98
- this.renderOptions(gvc2, vmt),
57
+ BgWidget.renderOptions(gvc2, vmt),
99
58
  ].join(BgWidget.mbContainer(18));
100
59
  }
101
60
  },
@@ -166,7 +125,7 @@ export class UserModule {
166
125
  else {
167
126
  return [
168
127
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中移除'),
169
- this.renderOptions(gvc2, vmt),
128
+ BgWidget.renderOptions(gvc2, vmt),
170
129
  ].join(BgWidget.mbContainer(18));
171
130
  }
172
131
  },
@@ -19,50 +19,6 @@ export class UserModule {
19
19
  });
20
20
  }
21
21
 
22
- static printOption(gvc: GVC, vmt: { id: string; postData: string[] }, opt: OptionsItem) {
23
- const id = `user-tag-${opt.key}`;
24
- opt.key = `${opt.key}`;
25
-
26
- function call() {
27
- if (vmt.postData.includes(opt.key)) {
28
- vmt.postData = vmt.postData.filter(item => item !== opt.key);
29
- } else {
30
- vmt.postData.push(opt.key);
31
- }
32
- gvc.notifyDataChange(vmt.id);
33
- }
34
-
35
- return html`<div class="d-flex align-items-center gap-3 mb-3">
36
- ${gvc.bindView({
37
- bind: id,
38
- view: () => {
39
- return html`<input
40
- class="form-check-input mt-0 ${BgWidget.getCheckedClass(gvc)}"
41
- type="checkbox"
42
- id="${opt.key}"
43
- name="radio_${opt.key}"
44
- onclick="${gvc.event(() => call())}"
45
- ${vmt.postData.includes(opt.key) ? 'checked' : ''}
46
- />`;
47
- },
48
- divCreate: {
49
- class: 'd-flex align-items-center justify-content-center',
50
- },
51
- })}
52
- <div class="form-check-label c_updown_label cursor_pointer" onclick="${gvc.event(() => call())}">
53
- <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
54
- ${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
55
- </div>
56
- </div>`;
57
- }
58
-
59
- static renderOptions(gvc: GVC, vmt: { id: string; postData: string[]; dataList: any }) {
60
- if (vmt.dataList.length === 0) {
61
- return html`<div class="d-flex justify-content-center fs-5">查無標籤</div>`;
62
- }
63
- return vmt.dataList.map((item: any) => this.printOption(gvc, vmt, { key: item, value: item })).join('');
64
- }
65
-
66
22
  static addTags(obj: { gvc: GVC; vm: any; dataArray: any }) {
67
23
  const gvc = obj.gvc;
68
24
  const dataArray = obj.dataArray;
@@ -98,7 +54,7 @@ export class UserModule {
98
54
  '0'
99
55
  ),
100
56
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中新增'),
101
- this.renderOptions(gvc2, vmt),
57
+ BgWidget.renderOptions(gvc2, vmt),
102
58
  ].join(BgWidget.mbContainer(18));
103
59
  }
104
60
  },
@@ -170,7 +126,7 @@ export class UserModule {
170
126
  } else {
171
127
  return [
172
128
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中移除'),
173
- this.renderOptions(gvc2, vmt),
129
+ BgWidget.renderOptions(gvc2, vmt),
174
130
  ].join(BgWidget.mbContainer(18));
175
131
  }
176
132
  },
@@ -228,12 +228,11 @@ export class UserList {
228
228
  UserList.setUserForm(gvc, () => gvc.notifyDataChange(vm.id));
229
229
  })}"
230
230
  >
231
- <i class="fa-regular fa-gear me-2 "></i>
231
+ <i class="fa-regular fa-gear me-2"></i>
232
232
  自訂資料
233
233
  </button>
234
234
  </div>
235
- <div class="title-container">
236
- ${BgWidget.tab(((_b = vm.group) === null || _b === void 0 ? void 0 : _b.type) === 'subscriber'
235
+ ${BgWidget.tab(((_b = vm.group) === null || _b === void 0 ? void 0 : _b.type) === 'subscriber'
237
236
  ? [
238
237
  {
239
238
  title: '一般列表',
@@ -260,8 +259,7 @@ export class UserList {
260
259
  ], gvc, vm.filter_type, text => {
261
260
  vm.filter_type = text;
262
261
  gvc.notifyDataChange(vm.id);
263
- }, 'margin: 0; margin-top: 24px;')}
264
- </div>
262
+ })}
265
263
  ${BgWidget.container((() => {
266
264
  if (vm.filter_type === 'notRegistered') {
267
265
  return BgNotify.email(gvc, 'list', () => obj === null || obj === void 0 ? void 0 : obj.backButtonEvent);
@@ -1095,7 +1093,7 @@ export class UserList {
1095
1093
  vmt.loading = true;
1096
1094
  gvc2.notifyDataChange(vmt.id);
1097
1095
  }), vmt.search, '搜尋標籤', '0', '0'),
1098
- UserModule.renderOptions(gvc2, vmt),
1096
+ BgWidget.renderOptions(gvc2, vmt),
1099
1097
  ].join(BgWidget.mbContainer(18));
1100
1098
  }
1101
1099
  },
@@ -276,46 +276,43 @@ export class UserList {
276
276
  UserList.setUserForm(gvc, () => gvc.notifyDataChange(vm.id));
277
277
  })}"
278
278
  >
279
- <i class="fa-regular fa-gear me-2 "></i>
279
+ <i class="fa-regular fa-gear me-2"></i>
280
280
  自訂資料
281
281
  </button>
282
282
  </div>
283
- <div class="title-container">
284
- ${BgWidget.tab(
285
- vm.group?.type === 'subscriber'
286
- ? [
287
- {
288
- title: '一般列表',
289
- key: 'normal',
290
- },
291
- {
292
- title: '黑名單',
293
- key: 'block',
294
- },
295
- {
296
- title: '未註冊',
297
- key: 'notRegistered',
298
- },
299
- ]
300
- : [
301
- {
302
- title: '一般列表',
303
- key: 'normal',
304
- },
305
- {
306
- title: '黑名單',
307
- key: 'block',
308
- },
309
- ],
310
- gvc,
311
- vm.filter_type,
312
- text => {
313
- vm.filter_type = text as any;
314
- gvc.notifyDataChange(vm.id);
315
- },
316
- 'margin: 0; margin-top: 24px;'
317
- )}
318
- </div>
283
+ ${BgWidget.tab(
284
+ vm.group?.type === 'subscriber'
285
+ ? [
286
+ {
287
+ title: '一般列表',
288
+ key: 'normal',
289
+ },
290
+ {
291
+ title: '黑名單',
292
+ key: 'block',
293
+ },
294
+ {
295
+ title: '未註冊',
296
+ key: 'notRegistered',
297
+ },
298
+ ]
299
+ : [
300
+ {
301
+ title: '一般列表',
302
+ key: 'normal',
303
+ },
304
+ {
305
+ title: '黑名單',
306
+ key: 'block',
307
+ },
308
+ ],
309
+ gvc,
310
+ vm.filter_type,
311
+ text => {
312
+ vm.filter_type = text as any;
313
+ gvc.notifyDataChange(vm.id);
314
+ }
315
+ )}
319
316
  ${BgWidget.container(
320
317
  (() => {
321
318
  if (vm.filter_type === 'notRegistered') {
@@ -1256,7 +1253,7 @@ export class UserList {
1256
1253
  '0',
1257
1254
  '0'
1258
1255
  ),
1259
- UserModule.renderOptions(gvc2, vmt),
1256
+ BgWidget.renderOptions(gvc2, vmt),
1260
1257
  ].join(BgWidget.mbContainer(18));
1261
1258
  }
1262
1259
  },
@@ -312,6 +312,44 @@ h6 {
312
312
  font-size: 1rem;
313
313
  }
314
314
 
315
+ .angle-style {
316
+ font-size: 12px;
317
+ color: var(--main-black);
318
+ }
319
+
320
+ .page-link-v2 {
321
+ display: inline-flex;
322
+ height: 32px;
323
+ padding: 10px;
324
+ flex-direction: column;
325
+ justify-content: center;
326
+ align-items: center;
327
+ gap: 10px;
328
+ cursor: pointer;
329
+ background: var(--main-white);
330
+ border: 1px solid var(--main-black);
331
+ color: var(--main-black);
332
+ }
333
+
334
+ .page-link-active {
335
+ background: var(--main-black);
336
+ color: var(--background-2);
337
+ }
338
+
339
+ .page-link-prev {
340
+ border-radius: 7px 0px 0px 7px;
341
+ border: 1px solid var(--main-black);
342
+ background: var(--main-white);
343
+ color: var(--main-black);
344
+ }
345
+
346
+ .page-link-next {
347
+ border-radius: 0px 7px 7px 0px;
348
+ border: 1px solid var(--main-black);
349
+ background: var(--main-white);
350
+ color: var(--main-black);
351
+ }
352
+
315
353
  .h_item {
316
354
  height: 36px;
317
355
  }
@@ -1237,9 +1275,10 @@ h6 {
1237
1275
  }
1238
1276
 
1239
1277
  .title-container {
1240
- padding-left: 8px;
1241
- padding-right: 8px;
1242
- margin-top: 10px;
1278
+ padding-left: 12px;
1279
+ padding-right: 12px;
1280
+ margin-top: 12px;
1281
+ margin-bottom: 12px;
1243
1282
  }
1244
1283
 
1245
1284
  .bt_orange_lin {
@@ -587,7 +587,12 @@ export class Language {
587
587
  cn: '此电话号码已存在',
588
588
  en: 'This phone number already exists',
589
589
  },
590
- { key: 'phone_verify_check', tw: '請前往認證電話號碼', cn: '請前往認證電話號碼', en: 'Please proceed to verify your phone number.' },
590
+ {
591
+ key: 'phone_verify_check',
592
+ tw: '請前往認證電話號碼',
593
+ cn: '請前往認證電話號碼',
594
+ en: 'Please proceed to verify your phone number.',
595
+ },
591
596
  { key: 'email_already_exists', tw: '此信箱已存在', cn: '此邮箱已存在', en: 'This email already exists' },
592
597
  { key: 'update_exception', tw: '更新異常', cn: '更新异常', en: 'Update Exception' },
593
598
  { key: 'change_success', tw: '更改成功', cn: '更改成功', en: 'Change Success' },
@@ -1,3 +1,5 @@
1
+ export type LanguageLocation = 'en-US' | 'zh-CN' | 'zh-TW';
2
+
1
3
  export class Language {
2
4
  public static languageSupport() {
3
5
  const sup = [
@@ -453,8 +455,8 @@ export class Language {
453
455
  { key: 'my', tw: '我的', cn: '我的', en: 'My' },
454
456
  { key: 'my_coupons', tw: '我的優惠券', cn: '我的优惠券', en: 'Coupons' },
455
457
  { key: 'coupons', tw: '優惠券', cn: '优惠券', en: 'Coupons' },
456
- {key: 'wait_ship',tw:'待出貨',cn: `待出货`,en: `To Ship`},
457
- {key: 'shipped',tw:'已出貨',cn: `已出货`,en: `Shipped`},
458
+ { key: 'wait_ship', tw: '待出貨', cn: `待出货`, en: `To Ship` },
459
+ { key: 'shipped', tw: '已出貨', cn: `已出货`, en: `Shipped` },
458
460
  { key: 'order_history', tw: '訂單記錄', cn: '订单记录', en: 'OrderEvent History' },
459
461
  { key: 'wishlist', tw: '心願單', cn: '心愿单', en: 'Wishlist' },
460
462
  { key: 'add_to_wishlist', tw: '添加至心願單', cn: '添加至心愿单', en: 'Add to Wishlist' },
@@ -595,7 +597,12 @@ export class Language {
595
597
  cn: '此电话号码已存在',
596
598
  en: 'This phone number already exists',
597
599
  },
598
- { key: 'phone_verify_check', tw: '請前往認證電話號碼', cn: '請前往認證電話號碼', en: 'Please proceed to verify your phone number.' },
600
+ {
601
+ key: 'phone_verify_check',
602
+ tw: '請前往認證電話號碼',
603
+ cn: '請前往認證電話號碼',
604
+ en: 'Please proceed to verify your phone number.',
605
+ },
599
606
  { key: 'email_already_exists', tw: '此信箱已存在', cn: '此邮箱已存在', en: 'This email already exists' },
600
607
  { key: 'update_exception', tw: '更新異常', cn: '更新异常', en: 'Update Exception' },
601
608
  { key: 'change_success', tw: '更改成功', cn: '更改成功', en: 'Change Success' },
@@ -944,7 +951,6 @@ export class Language {
944
951
  { key: 'quick_input', tw: '快速帶入', cn: '快速带入', en: 'Quick Fill' },
945
952
  { key: 'home_page', tw: '首頁', cn: '首页', en: 'Home page' },
946
953
  { key: 'account_user_info', tw: '會員中心', cn: '会员中心', en: 'Member Center' },
947
-
948
954
  ];
949
955
  }
950
956