ts-glitter 22.5.7 → 22.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lowcode/Entry.js +1 -1
  2. package/lowcode/Entry.ts +1 -1
  3. package/lowcode/backend-manager/bg-product.js +13 -13
  4. package/lowcode/backend-manager/bg-product.ts +13 -13
  5. package/lowcode/backend-manager/bg-shopping.js +8 -13
  6. package/lowcode/backend-manager/bg-shopping.ts +8 -15
  7. package/lowcode/backend-manager/bg-widget.js +62 -49
  8. package/lowcode/backend-manager/bg-widget.ts +129 -93
  9. package/lowcode/cms-plugin/POS-setting.js +30 -9
  10. package/lowcode/cms-plugin/POS-setting.ts +49 -16
  11. package/lowcode/cms-plugin/cms-router.js +27 -21
  12. package/lowcode/cms-plugin/cms-router.ts +116 -101
  13. package/lowcode/cms-plugin/filter-options.js +25 -17
  14. package/lowcode/cms-plugin/filter-options.ts +27 -17
  15. package/lowcode/cms-plugin/module/product-excel.js +2 -0
  16. package/lowcode/cms-plugin/module/product-excel.ts +2 -0
  17. package/lowcode/cms-plugin/module/product-setting.js +13 -12
  18. package/lowcode/cms-plugin/module/product-setting.ts +26 -23
  19. package/lowcode/cms-plugin/order/order-module.js +91 -68
  20. package/lowcode/cms-plugin/order/order-module.ts +105 -73
  21. package/lowcode/cms-plugin/pos-checkout-setting.js +46 -39
  22. package/lowcode/cms-plugin/pos-checkout-setting.ts +237 -227
  23. package/lowcode/cms-plugin/pos-config-setting.js +25 -23
  24. package/lowcode/cms-plugin/pos-config-setting.ts +35 -32
  25. package/lowcode/cms-plugin/pos-pages/payment-function.js +253 -139
  26. package/lowcode/cms-plugin/pos-pages/payment-function.ts +405 -279
  27. package/lowcode/cms-plugin/pos-pages/payment-page.js +348 -267
  28. package/lowcode/cms-plugin/pos-pages/payment-page.ts +378 -296
  29. package/lowcode/cms-plugin/pos-pages/pos-function.js +76 -19
  30. package/lowcode/cms-plugin/pos-pages/pos-function.ts +84 -19
  31. package/lowcode/cms-plugin/shopping-discount-setting.js +2 -2
  32. package/lowcode/cms-plugin/shopping-discount-setting.ts +2 -2
  33. package/lowcode/cms-plugin/shopping-finance-setting.js +1590 -1701
  34. package/lowcode/cms-plugin/shopping-finance-setting.ts +1967 -2011
  35. package/lowcode/cms-plugin/shopping-order-manager.js +74 -62
  36. package/lowcode/cms-plugin/shopping-order-manager.ts +119 -85
  37. package/lowcode/cms-plugin/shopping-product-text.js +874 -531
  38. package/lowcode/cms-plugin/shopping-product-text.ts +1656 -1305
  39. package/lowcode/cms-plugin/shopping-setting-basic.js +152 -124
  40. package/lowcode/cms-plugin/shopping-setting-basic.ts +315 -247
  41. package/lowcode/css/editor.css +3 -2
  42. package/lowcode/glitter-base/global/language.js +5 -3
  43. package/lowcode/glitter-base/global/language.ts +8 -6
  44. package/lowcode/glitter-base/global/payment-config.js +6 -0
  45. package/lowcode/glitter-base/global/payment-config.ts +6 -3
  46. package/lowcode/public-components/product/pd-class.js +1 -3
  47. package/lowcode/public-components/product/pd-class.ts +1 -3
  48. package/lowcode/public-components/user-manager/um-order.js +2 -1
  49. package/lowcode/public-components/user-manager/um-order.ts +2 -1
  50. package/package.json +1 -1
  51. package/src/api-public/controllers/index.js +14 -3
  52. package/src/api-public/controllers/index.js.map +1 -1
  53. package/src/api-public/controllers/index.ts +16 -3
  54. package/src/api-public/controllers/shop.js +14 -7
  55. package/src/api-public/controllers/shop.js.map +1 -1
  56. package/src/api-public/controllers/shop.ts +14 -8
  57. package/src/api-public/services/data-analyze.d.ts +1 -1
  58. package/src/api-public/services/ezpay/tool.d.ts +0 -1
  59. package/src/api-public/services/financial-serviceV2.js +7 -17
  60. package/src/api-public/services/financial-serviceV2.js.map +1 -1
  61. package/src/api-public/services/shopee.js.map +1 -1
  62. package/src/api-public/services/updated-table-checked.js +20 -0
  63. package/src/api-public/services/updated-table-checked.js.map +1 -1
  64. package/src/api-public/services/updated-table-checked.ts +21 -0
  65. package/src/app-project/serverless/src/modules/database.d.ts +1 -1
  66. package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
  67. package/src/helper/glitter-util.d.ts +0 -1
  68. package/src/index.js +3 -3
  69. package/src/index.js.map +13 -1
  70. package/src/modules/tool.d.ts +2 -0
  71. package/src/modules/tool.js +7 -0
  72. package/src/modules/tool.js.map +1 -1
  73. package/src/modules/tool.ts +7 -0
  74. package/src/seo-config.js +3 -3
  75. package/src/seo-config.js.map +9 -1
  76. package/src/services/private_config.js +11 -0
  77. package/src/services/private_config.js.map +1 -1
  78. package/src/services/private_config.ts +11 -0
  79. package/src/services/saas-table-check.js +12 -0
  80. package/src/services/saas-table-check.js.map +1 -1
  81. package/src/services/saas-table-check.ts +12 -0
  82. package/src/services/ses.js +3 -4
  83. package/src/services/ses.js.map +1 -1
package/lowcode/Entry.js CHANGED
@@ -154,7 +154,7 @@ export class Entry {
154
154
  }
155
155
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
156
156
  console.log(`Entry-time:`, window.renderClock.stop());
157
- glitter.share.editerVersion = 'V_22.5.7';
157
+ glitter.share.editerVersion = 'V_22.5.8';
158
158
  glitter.share.start = new Date();
159
159
  const vm = { appConfig: [] };
160
160
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -159,7 +159,7 @@ export class Entry {
159
159
  }
160
160
  (window as any).renderClock = (window as any).renderClock ?? createClock();
161
161
  console.log(`Entry-time:`, (window as any).renderClock.stop());
162
- glitter.share.editerVersion = 'V_22.5.7';
162
+ glitter.share.editerVersion = 'V_22.5.8';
163
163
  glitter.share.start = new Date();
164
164
  const vm = { appConfig: [] };
165
165
  (window as any).saasConfig = {
@@ -136,7 +136,7 @@ export class BgProduct {
136
136
  });
137
137
  }
138
138
  return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
139
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
139
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
140
140
  <div class="tx_700">${(_a = obj.title) !== null && _a !== void 0 ? _a : '產品列表'}</div>
141
141
  <div class="flex-fill"></div>
142
142
  <i
@@ -406,7 +406,7 @@ export class BgProduct {
406
406
  return `_collections_opt_${key}`;
407
407
  }
408
408
  return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
409
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
409
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
410
410
  <div class="tx_700">${(_a = obj.title) !== null && _a !== void 0 ? _a : '商品分類'}</div>
411
411
  <div class="flex-fill"></div>
412
412
  <i
@@ -503,8 +503,8 @@ export class BgProduct {
503
503
  }
504
504
  static getWidthHeigth(isDesktop) {
505
505
  return isDesktop
506
- ? ['800px', '600px', 'calc(600px - 120px) !important']
507
- : ['95vw', '70vh', 'calc(70vh - 120px) !important'];
506
+ ? ['800px', '600px', 'calc(600px - 112px) !important']
507
+ : ['95vw', '70vh', 'calc(70vh - 108px) !important'];
508
508
  }
509
509
  static setMemberPriceSetting(obj) {
510
510
  const { gvc, postData, callback } = obj;
@@ -560,8 +560,8 @@ export class BgProduct {
560
560
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
561
561
  >
562
562
  <div
563
- class="w-100 d-flex align-items-center p-3 border-bottom"
564
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
563
+ class="w-100 d-flex align-items-center border-bottom"
564
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
565
565
  >
566
566
  <div class="tx_700">會員等級價格設定</div>
567
567
  <div class="flex-fill"></div>
@@ -572,7 +572,7 @@ export class BgProduct {
572
572
  </div>
573
573
  <div class="c_dialog h-100">
574
574
  <div class="c_dialog_body h-100">
575
- <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 8px; gap: 0;">
575
+ <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; gap: 0;">
576
576
  ${vm.dataList.length > 0
577
577
  ? checkboxList()
578
578
  : '尚未建立會員等級,請至「顧客管理」>「會員等級」新增'}
@@ -652,8 +652,8 @@ export class BgProduct {
652
652
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
653
653
  >
654
654
  <div
655
- class="w-100 d-flex align-items-center p-3 border-bottom"
656
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
655
+ class="w-100 d-flex align-items-center border-bottom"
656
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
657
657
  >
658
658
  <div class="tx_700">門市專屬價格設定</div>
659
659
  <div class="flex-fill"></div>
@@ -664,7 +664,7 @@ export class BgProduct {
664
664
  </div>
665
665
  <div class="c_dialog h-100">
666
666
  <div class="c_dialog_body h-100">
667
- <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 8px; gap: 0;">
667
+ <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; gap: 0;">
668
668
  ${vm.dataList.length > 0
669
669
  ? checkboxList()
670
670
  : '尚未建立門市,請至「庫存管理」>「庫存點管理」新增'}
@@ -735,8 +735,8 @@ export class BgProduct {
735
735
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
736
736
  >
737
737
  <div
738
- class="w-100 d-flex align-items-center p-3 border-bottom"
739
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
738
+ class="w-100 d-flex align-items-center border-bottom"
739
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
740
740
  >
741
741
  <div class="tx_700">顧客標籤價格設定</div>
742
742
  <div class="flex-fill"></div>
@@ -747,7 +747,7 @@ export class BgProduct {
747
747
  </div>
748
748
  <div class="c_dialog h-100">
749
749
  <div class="c_dialog_body h-100">
750
- <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 8px; gap: 0;">
750
+ <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; gap: 0;">
751
751
  ${vm.dataList.length > 0
752
752
  ? checkboxList()
753
753
  : '尚未建立顧客標籤,請編輯任一顧客的「顧客標籤」欄位'}
@@ -187,7 +187,7 @@ export class BgProduct {
187
187
  }
188
188
 
189
189
  return html` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
190
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
190
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
191
191
  <div class="tx_700">${obj.title ?? '產品列表'}</div>
192
192
  <div class="flex-fill"></div>
193
193
  <i
@@ -528,7 +528,7 @@ export class BgProduct {
528
528
  }
529
529
 
530
530
  return html` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
531
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
531
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
532
532
  <div class="tx_700">${obj.title ?? '商品分類'}</div>
533
533
  <div class="flex-fill"></div>
534
534
  <i
@@ -679,8 +679,8 @@ export class BgProduct {
679
679
 
680
680
  static getWidthHeigth(isDesktop: boolean): [string, string, string] {
681
681
  return isDesktop
682
- ? ['800px', '600px', 'calc(600px - 120px) !important']
683
- : ['95vw', '70vh', 'calc(70vh - 120px) !important'];
682
+ ? ['800px', '600px', 'calc(600px - 112px) !important']
683
+ : ['95vw', '70vh', 'calc(70vh - 108px) !important'];
684
684
  }
685
685
 
686
686
  static setMemberPriceSetting(obj: { gvc: GVC; postData: string[]; callback: (data: string[]) => void }) {
@@ -746,8 +746,8 @@ export class BgProduct {
746
746
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
747
747
  >
748
748
  <div
749
- class="w-100 d-flex align-items-center p-3 border-bottom"
750
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
749
+ class="w-100 d-flex align-items-center border-bottom"
750
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
751
751
  >
752
752
  <div class="tx_700">會員等級價格設定</div>
753
753
  <div class="flex-fill"></div>
@@ -758,7 +758,7 @@ export class BgProduct {
758
758
  </div>
759
759
  <div class="c_dialog h-100">
760
760
  <div class="c_dialog_body h-100">
761
- <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 8px; gap: 0;">
761
+ <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; gap: 0;">
762
762
  ${vm.dataList.length > 0
763
763
  ? checkboxList()
764
764
  : '尚未建立會員等級,請至「顧客管理」>「會員等級」新增'}
@@ -852,8 +852,8 @@ export class BgProduct {
852
852
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
853
853
  >
854
854
  <div
855
- class="w-100 d-flex align-items-center p-3 border-bottom"
856
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
855
+ class="w-100 d-flex align-items-center border-bottom"
856
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
857
857
  >
858
858
  <div class="tx_700">門市專屬價格設定</div>
859
859
  <div class="flex-fill"></div>
@@ -864,7 +864,7 @@ export class BgProduct {
864
864
  </div>
865
865
  <div class="c_dialog h-100">
866
866
  <div class="c_dialog_body h-100">
867
- <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 8px; gap: 0;">
867
+ <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; gap: 0;">
868
868
  ${vm.dataList.length > 0
869
869
  ? checkboxList()
870
870
  : '尚未建立門市,請至「庫存管理」>「庫存點管理」新增'}
@@ -949,8 +949,8 @@ export class BgProduct {
949
949
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
950
950
  >
951
951
  <div
952
- class="w-100 d-flex align-items-center p-3 border-bottom"
953
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
952
+ class="w-100 d-flex align-items-center border-bottom"
953
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
954
954
  >
955
955
  <div class="tx_700">顧客標籤價格設定</div>
956
956
  <div class="flex-fill"></div>
@@ -961,7 +961,7 @@ export class BgProduct {
961
961
  </div>
962
962
  <div class="c_dialog h-100">
963
963
  <div class="c_dialog_body h-100">
964
- <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 8px; gap: 0;">
964
+ <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; gap: 0;">
965
965
  ${vm.dataList.length > 0
966
966
  ? checkboxList()
967
967
  : '尚未建立顧客標籤,請編輯任一顧客的「顧客標籤」欄位'}
@@ -957,7 +957,7 @@ export class BgShopping {
957
957
  </button>
958
958
  </div>
959
959
  <div class="d-flex" style="gap:10px;">
960
- <div style="width:700px;">
960
+ <div style="width:700px;">
961
961
  ${[
962
962
  BgWidget.card(`
963
963
  <h3 class="fs-7 mb-2">折扣券名稱</h3>
@@ -2489,7 +2489,7 @@ ${EditorElem.editeInput({
2489
2489
  <span>運費權重</span>
2490
2490
  <div class="alert-info alert mt-2 mb-0">
2491
2491
  <span>( 每單位金額*權重 ) + 基本運費 = 總運費</span><br />
2492
- <span
2492
+ <span
2493
2493
  >試算 : ( ${shipmentSetting.weight} *
2494
2494
  ${dd.shipment_weight} ) + ${shipmentSetting.basic_fee} =
2495
2495
  ${shipmentSetting.weight * dd.shipment_weight +
@@ -2514,10 +2514,8 @@ ${EditorElem.editeInput({
2514
2514
  編輯商品
2515
2515
  </button>
2516
2516
  </div>`,
2517
- innerHtml: (gvc) => {
2518
- return [].join('');
2519
- },
2520
- editTitle: `編輯規格`,
2517
+ innerHtml: () => '',
2518
+ editTitle: '編輯規格',
2521
2519
  };
2522
2520
  });
2523
2521
  },
@@ -2529,7 +2527,6 @@ ${EditorElem.editeInput({
2529
2527
  plus: {
2530
2528
  title: '添加商品項目',
2531
2529
  event: obj.gvc.event(() => {
2532
- let ct = '';
2533
2530
  let cType = [];
2534
2531
  function generateCombinations(specs, currentCombination, index = 0) {
2535
2532
  if (index === specs.length) {
@@ -2692,7 +2689,6 @@ ${EditorElem.editeInput({
2692
2689
  >
2693
2690
  <div
2694
2691
  class="editor_item d-flex pe-2 my-0 hi me-n1 "
2695
-
2696
2692
  onclick="${gvc.event(() => {
2697
2693
  dd.toogle = !dd.toogle;
2698
2694
  gvc.recreateView();
@@ -2718,7 +2714,6 @@ ${EditorElem.editeInput({
2718
2714
  >
2719
2715
  <div
2720
2716
  class="editor_item d-flex pe-2 my-0 hi "
2721
-
2722
2717
  onclick="${gvc.event(() => {
2723
2718
  if (postMD.collection.find(dd => {
2724
2719
  return dd === indt;
@@ -3006,12 +3001,12 @@ ${EditorElem.editeInput({
3006
3001
  }),
3007
3002
  EditorElem.editeInput({
3008
3003
  gvc: gvc,
3009
- title: '特店編號',
3004
+ title: '商店代號',
3010
3005
  default: keyData.MERCHANT_ID,
3011
3006
  callback: text => {
3012
3007
  keyData.MERCHANT_ID = text;
3013
3008
  },
3014
- placeHolder: '請輸入特店編號',
3009
+ placeHolder: '請輸入商店代號',
3015
3010
  }),
3016
3011
  EditorElem.editeInput({
3017
3012
  gvc: gvc,
@@ -3152,10 +3147,10 @@ ${EditorElem.editeInput({
3152
3147
  return [
3153
3148
  EditorElem.editeInput({
3154
3149
  gvc: gvc,
3155
- title: '特店編號',
3150
+ title: '商店代號',
3156
3151
  default: (_c = vm.data.merchNO) !== null && _c !== void 0 ? _c : '',
3157
3152
  type: 'text',
3158
- placeHolder: '請輸入特店編號',
3153
+ placeHolder: '請輸入商店代號',
3159
3154
  callback: text => {
3160
3155
  vm.data.merchNO = text;
3161
3156
  },
@@ -1078,7 +1078,7 @@ export class BgShopping {
1078
1078
  </button>
1079
1079
  </div>
1080
1080
  <div class="d-flex" style="gap:10px;">
1081
- <div style="width:700px;">
1081
+ <div style="width:700px;">
1082
1082
  ${[
1083
1083
  BgWidget.card(`
1084
1084
  <h3 class="fs-7 mb-2">折扣券名稱</h3>
@@ -2710,7 +2710,7 @@ ${EditorElem.editeInput({
2710
2710
  <span>運費權重</span>
2711
2711
  <div class="alert-info alert mt-2 mb-0">
2712
2712
  <span>( 每單位金額*權重 ) + 基本運費 = 總運費</span><br />
2713
- <span
2713
+ <span
2714
2714
  >試算 : ( ${shipmentSetting.weight} *
2715
2715
  ${dd.shipment_weight} ) + ${shipmentSetting.basic_fee} =
2716
2716
  ${shipmentSetting.weight * dd.shipment_weight +
@@ -2735,11 +2735,8 @@ ${EditorElem.editeInput({
2735
2735
  編輯商品
2736
2736
  </button>
2737
2737
  </div>`,
2738
- innerHtml: (gvc: GVC) => {
2739
- // refresh()
2740
- return [].join('');
2741
- },
2742
- editTitle: `編輯規格`,
2738
+ innerHtml: () => '',
2739
+ editTitle: '編輯規格',
2743
2740
  };
2744
2741
  });
2745
2742
  },
@@ -2751,12 +2748,10 @@ ${EditorElem.editeInput({
2751
2748
  plus: {
2752
2749
  title: '添加商品項目',
2753
2750
  event: obj.gvc.event(() => {
2754
- let ct = '';
2755
2751
  let cType: any = [];
2756
2752
 
2757
2753
  function generateCombinations(specs: any, currentCombination: any, index = 0) {
2758
2754
  if (index === specs.length) {
2759
- // 当达到规格数组的末尾,表示一种组合已生成,打印它或执行其他操作
2760
2755
  cType.push(JSON.parse(JSON.stringify(currentCombination)));
2761
2756
  return;
2762
2757
  }
@@ -2936,7 +2931,6 @@ ${EditorElem.editeInput({
2936
2931
  >
2937
2932
  <div
2938
2933
  class="editor_item d-flex pe-2 my-0 hi me-n1 "
2939
-
2940
2934
  onclick="${gvc.event(() => {
2941
2935
  dd.toogle = !dd.toogle;
2942
2936
  gvc.recreateView();
@@ -2961,7 +2955,6 @@ ${EditorElem.editeInput({
2961
2955
  >
2962
2956
  <div
2963
2957
  class="editor_item d-flex pe-2 my-0 hi "
2964
-
2965
2958
  onclick="${gvc.event(() => {
2966
2959
  if (
2967
2960
  postMD.collection.find(dd => {
@@ -3267,12 +3260,12 @@ ${EditorElem.editeInput({
3267
3260
  }),
3268
3261
  EditorElem.editeInput({
3269
3262
  gvc: gvc,
3270
- title: '特店編號',
3263
+ title: '商店代號',
3271
3264
  default: keyData.MERCHANT_ID,
3272
3265
  callback: text => {
3273
3266
  keyData.MERCHANT_ID = text;
3274
3267
  },
3275
- placeHolder: '請輸入特店編號',
3268
+ placeHolder: '請輸入商店代號',
3276
3269
  }),
3277
3270
  EditorElem.editeInput({
3278
3271
  gvc: gvc,
@@ -3419,10 +3412,10 @@ ${EditorElem.editeInput({
3419
3412
  return [
3420
3413
  EditorElem.editeInput({
3421
3414
  gvc: gvc,
3422
- title: '特店編號',
3415
+ title: '商店代號',
3423
3416
  default: vm.data.merchNO ?? '',
3424
3417
  type: 'text',
3425
- placeHolder: '請輸入特店編號',
3418
+ placeHolder: '請輸入商店代號',
3426
3419
  callback: text => {
3427
3420
  vm.data.merchNO = text;
3428
3421
  },
@@ -283,19 +283,27 @@ export class BgWidget {
283
283
  }
284
284
  static checkInput(gvc, def, callback) {
285
285
  const id = gvc.glitter.getUUID();
286
- const trueImg = html `<i class="fa-solid fa-square-check" style="width: 16px;height: 16px;" onclick="${gvc.event(e => {
286
+ const trueImg = html `<i
287
+ class="fa-solid fa-square-check"
288
+ style="width: 16px;height: 16px;"
289
+ onclick="${gvc.event(e => {
287
290
  callback(def);
288
291
  gvc.notifyDataChange(id);
289
- })}"></i>`;
290
- const falseImg = html `<div style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;" onclick="${gvc.event(e => {
292
+ })}"
293
+ ></i>`;
294
+ const falseImg = html `<div
295
+ style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;"
296
+ onclick="${gvc.event(e => {
291
297
  callback(def);
292
298
  gvc.notifyDataChange(id);
293
- })}"></div>`;
299
+ })}"
300
+ ></div>`;
294
301
  return gvc.bindView({
295
302
  bind: id,
296
303
  view: () => {
297
- return (def) ? trueImg : falseImg;
298
- }, divCreate: {}
304
+ return def ? trueImg : falseImg;
305
+ },
306
+ divCreate: {},
299
307
  });
300
308
  }
301
309
  static switchTextButton(gvc, def, text, callback) {
@@ -742,7 +750,7 @@ export class BgWidget {
742
750
  : ''}
743
751
  <div
744
752
  class="d-flex w-100 align-items-center border rounded-3 ${obj.readonly ? `bgw-input-readonly` : ``}"
745
- style="margin: 8px 0;overflow: hidden;"
753
+ style="margin: 8px 0; overflow: hidden;"
746
754
  >
747
755
  ${obj.global_language
748
756
  ? html `
@@ -1766,6 +1774,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
1766
1774
  header: Tool.randomString(6),
1767
1775
  headerCell: Tool.randomString(6),
1768
1776
  tr: Tool.randomString(6),
1777
+ table: glitter.getUUID(),
1769
1778
  textClass: Tool.randomString(6),
1770
1779
  };
1771
1780
  const created = {
@@ -1843,11 +1852,11 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
1843
1852
  var _b;
1844
1853
  const checkboxSelector = result ? 'i.fa-square' : 'i.fa-square-check';
1845
1854
  vm.originalData.forEach((item, index) => {
1846
- const checkboxParent = gvc.glitter.document.querySelector(`[gvc-checkbox="checkbox${index}"]`);
1855
+ const checkboxParent = gvc.glitter.document.querySelector(`.${ids.table} [gvc-checkbox="checkbox${index}"]`);
1847
1856
  const checkboxIcon = checkboxParent === null || checkboxParent === void 0 ? void 0 : checkboxParent.querySelector(checkboxSelector);
1848
1857
  checkboxIcon === null || checkboxIcon === void 0 ? void 0 : checkboxIcon.click();
1849
1858
  });
1850
- gvc.notifyDataChange(ids.filter);
1859
+ gvc.notifyDataChange([ids.filter, ids.table]);
1851
1860
  (_b = obj.itemSelect) === null || _b === void 0 ? void 0 : _b.call(obj);
1852
1861
  changeHeaderStyle();
1853
1862
  }
@@ -1939,9 +1948,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
1939
1948
  return html ` <div style="margin-top: 4px; overflow-x: scroll; position: relative; min-height: 350px">
1940
1949
  <div
1941
1950
  class="w-100 h-100 bg-white top-0"
1942
- style="position: absolute; z-index: ${defWidth > 0 ? 0 : 2}; display: ${defWidth > 0
1943
- ? 'none'
1944
- : 'block'};"
1951
+ style="position: absolute; z-index: ${defWidth > 0 ? 0 : 2}; display: ${defWidth > 0 ? 'none' : 'block'};"
1945
1952
  ></div>
1946
1953
  ${gvc.bindView({
1947
1954
  bind: ids.header,
@@ -2059,23 +2066,24 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
2059
2066
  })}
2060
2067
  <table class="table table-centered table-nowrap text-center table-hover" style="width: ${defWidth}px;">
2061
2068
  <tbody>
2062
- ${vm.tableData
2069
+ <tbody class="${ids.table}">
2070
+ ${vm.tableData
2063
2071
  .map((dd, trIndex) => {
2064
2072
  return html ` <tr
2065
- class="${trIndex === 0 ? ids.tr : ''} ${dd.find(d3 => d3.tooltip)
2073
+ class="${trIndex === 0 ? ids.tr : ''} ${dd.find(d3 => d3.tooltip)
2066
2074
  ? 'tr-tooltip-container'
2067
2075
  : ''}"
2068
- onclick="${gvc.event((e, event) => {
2076
+ onclick="${gvc.event((e, event) => {
2069
2077
  obj.rowClick && obj.rowClick(dd, trIndex, e, event);
2070
2078
  })}"
2071
- onmouseover="${gvc.event(() => {
2079
+ onmouseover="${gvc.event(() => {
2072
2080
  $(`#${ids.pencil}${trIndex}`).removeClass('d-none');
2073
2081
  })}"
2074
- onmouseout="${gvc.event(() => {
2082
+ onmouseout="${gvc.event(() => {
2075
2083
  $(`#${ids.pencil}${trIndex}`).addClass('d-none');
2076
2084
  })}"
2077
- >
2078
- ${dd
2085
+ >
2086
+ ${dd
2079
2087
  .map((d3, tdIndex) => {
2080
2088
  const tdClass = Tool.randomString(5);
2081
2089
  const style = `
@@ -2087,25 +2095,27 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
2087
2095
  ${dd.length === 1 ? 'border-radius: 10px;' : ''}
2088
2096
  `;
2089
2097
  return html ` <td
2090
- class="${ids.textClass} ${tdClass} tb-v3 tx_normal position-relative"
2091
- style="${style}"
2092
- ${obj.filter.length !== 0 && tdIndex === 0 ? `gvc-checkbox="checkbox${trIndex}"` : ''}
2093
- onclick="${d3.stopClick ? gvc.event((_, event) => event.stopPropagation()) : ''}"
2094
- >
2095
- <div
2096
- class="text-nowrap ${d3.tooltip ? 'hover-element' : ''}"
2097
- style="color: #393939 !important;"
2098
- ${d3.tooltip ? `data-tooltip="${d3.tooltip}"` : ''}
2098
+ class="${ids.textClass} ${tdClass} tb-v3 tx_normal position-relative"
2099
+ style="${style}"
2100
+ ${obj.filter.length !== 0 && tdIndex === 0 ? `gvc-checkbox="checkbox${trIndex}"` : ''}
2101
+ onclick="${d3.stopClick ? gvc.event((_, event) => event.stopPropagation()) : ''}"
2099
2102
  >
2100
- ${d3.value}
2101
- </div>
2102
- ${d3.tooltip ? html `<div class="td-tooltip">${d3.tooltip}</div>` : ''}
2103
- </td>`;
2103
+ <div
2104
+ class="text-nowrap ${d3.tooltip ? 'hover-element' : ''}"
2105
+ style="color: #393939 !important;"
2106
+ ${d3.tooltip ? `data-tooltip="${d3.tooltip}"` : ''}
2107
+ >
2108
+ ${d3.value}
2109
+ </div>
2110
+ ${d3.tooltip ? html `<div class="td-tooltip">${d3.tooltip}</div>` : ''}
2111
+ </td>`;
2104
2112
  })
2105
2113
  .join('')}
2106
- </tr>`;
2114
+ </tr>`;
2107
2115
  })
2108
2116
  .join('')}
2117
+ </tbody>
2118
+
2109
2119
  </tbody>
2110
2120
  </table>
2111
2121
  </div>
@@ -2197,8 +2207,10 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
2197
2207
  static container(htmlString, obj) {
2198
2208
  var _b;
2199
2209
  return html ` <div
2200
- class="mb-0 ${document.body.clientWidth > 768 ? 'mx-auto mt-3' : 'w-100 mx-0'}"
2201
- style="max-width: 100%; width: ${this.getContainerWidth()}px; ${(_b = obj === null || obj === void 0 ? void 0 : obj.style) !== null && _b !== void 0 ? _b : ''}"
2210
+ class="mb-0 ${this.isPhone() ? 'w-100 mx-0' : 'mx-auto'}"
2211
+ style="max-width: 100%; width: ${this.getContainerWidth()}px; ${this.isPhone()
2212
+ ? ''
2213
+ : 'border-top: 1rem solid #f5f5f5;'} ${(_b = obj === null || obj === void 0 ? void 0 : obj.style) !== null && _b !== void 0 ? _b : ''}"
2202
2214
  >
2203
2215
  ${htmlString}
2204
2216
  </div>`;
@@ -3447,7 +3459,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
3447
3459
  return html ` <div class="my-4">${this.spinner()}</div>`;
3448
3460
  }
3449
3461
  return html ` <div style="width: 100%; overflow-y: auto;" class="bg-white shadow rounded-3">
3450
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
3462
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
3451
3463
  <div class="tx_700">${obj.title}</div>
3452
3464
  <div class="flex-fill"></div>
3453
3465
  <i
@@ -3610,7 +3622,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
3610
3622
  return html ` <div class="my-4">${this.spinner()}</div>`;
3611
3623
  }
3612
3624
  return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
3613
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
3625
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
3614
3626
  <div class="tx_700">${(_b = obj.title) !== null && _b !== void 0 ? _b : '產品列表'}</div>
3615
3627
  <div class="flex-fill"></div>
3616
3628
  <i
@@ -3735,7 +3747,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
3735
3747
  return html ` <div class="my-4">${this.spinner()}</div>`;
3736
3748
  }
3737
3749
  return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
3738
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
3750
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
3739
3751
  <div class="tx_700">${(_b = obj.title) !== null && _b !== void 0 ? _b : '產品列表'}</div>
3740
3752
  <div class="flex-fill"></div>
3741
3753
  <i
@@ -3907,7 +3919,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
3907
3919
  return html ` <div class="my-4">${this.spinner()}</div>`;
3908
3920
  }
3909
3921
  return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
3910
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
3922
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
3911
3923
  <div class="tx_700">${(_b = obj.title) !== null && _b !== void 0 ? _b : '產品列表'}</div>
3912
3924
  <div class="flex-fill"></div>
3913
3925
  <i
@@ -4030,7 +4042,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
4030
4042
  return html ` <div class="my-4">${this.spinner()}</div>`;
4031
4043
  }
4032
4044
  return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
4033
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
4045
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
4034
4046
  <div class="tx_700">${(_c = obj.title) !== null && _c !== void 0 ? _c : '產品列表'}</div>
4035
4047
  <div class="flex-fill"></div>
4036
4048
  <i
@@ -4047,9 +4059,9 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
4047
4059
  <div class="c_dialog_body">
4048
4060
  <div
4049
4061
  class="c_dialog_main"
4050
- style="${obj.d_main_style || ''};gap: 24px; ${obj.height
4051
- ? `height:${obj.height}px;max-height: 100vh;`
4052
- : `height:auto;max-height: 500px;`} "
4062
+ style="gap: 24px; ${obj.d_main_style || ''}; ${obj.height
4063
+ ? `height: ${obj.height}px; max-height: 100vh;`
4064
+ : `height: auto; max-height: 500px;`} "
4053
4065
  >
4054
4066
  ${(_d = obj.innerHTML(gvc)) !== null && _d !== void 0 ? _d : ''}
4055
4067
  </div>
@@ -4077,7 +4089,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
4077
4089
  : 'min-width: 90vw; max-width: 92.5vw;'}"
4078
4090
  >
4079
4091
  <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
4080
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
4092
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
4081
4093
  <div class="tx_700">${obj.title}</div>
4082
4094
  <div class="flex-fill"></div>
4083
4095
  <i
@@ -4211,7 +4223,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
4211
4223
  var _b, _c;
4212
4224
  return html ` <div class="bg-white shadow rounded-3" style="overflow-y: auto;width:414px;">
4213
4225
  <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
4214
- <div class="w-100 d-flex align-items-center p-3 border-bottom">
4226
+ <div class="w-100 d-flex align-items-center border-bottom" style="padding: 12px 20px;">
4215
4227
  <div class="tx_700">${obj.title}</div>
4216
4228
  <div class="flex-fill"></div>
4217
4229
  <i
@@ -4363,8 +4375,8 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
4363
4375
  style="width: 100%; max-height: 100%; overflow-y: auto; position: relative;"
4364
4376
  >
4365
4377
  <div
4366
- class="w-100 d-flex align-items-center p-3 border-bottom"
4367
- style="position: sticky; top: 0; z-index: 2; background: #fff;"
4378
+ class="w-100 d-flex align-items-center border-bottom"
4379
+ style="position: sticky; top: 0; z-index: 2; background: #fff; padding: 12px 20px;"
4368
4380
  >
4369
4381
  <div class="tx_700">
4370
4382
  ${typeof obj.title === 'function' ? obj.title(gvc) : ((_c = obj.title) !== null && _c !== void 0 ? _c : '產品列表')}
@@ -4794,8 +4806,8 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
4794
4806
  style="width: 100%; padding-top: 61px;"
4795
4807
  >
4796
4808
  <div
4797
- class="w-100 d-flex align-items-center p-3 border-bottom position-absolute"
4798
- style="background: #F2F2F2;top:0;left:0"
4809
+ class="w-100 d-flex align-items-center border-bottom position-absolute"
4810
+ style="background: #F2F2F2; top: 0; left: 0; padding: 12px 20px;"
4799
4811
  >
4800
4812
  <div class="tx_700 dialog-title">${(_b = obj.title) !== null && _b !== void 0 ? _b : '圖片庫'}</div>
4801
4813
  <div class="flex-fill"></div>
@@ -5151,6 +5163,7 @@ BgWidget.richTextQuickList = [
5151
5163
  },
5152
5164
  ];
5153
5165
  BgWidget.dotlottieJS = 'https://unpkg.com/@dotlottie/player-component@latest/dist/dotlottie-player.mjs';
5166
+ BgWidget.isPhone = () => document.body.offsetWidth < 768;
5154
5167
  BgWidget.getContainerWidth = (obj) => {
5155
5168
  const clientWidth = document.body.clientWidth;
5156
5169
  const rateForWeb = obj && obj.rate && obj.rate.web ? obj.rate.web : 0.95;