ts-glitter 20.5.3 → 20.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lowcode/Entry.js CHANGED
@@ -144,7 +144,7 @@ export class Entry {
144
144
  }
145
145
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
146
146
  console.log(`Entry-time:`, window.renderClock.stop());
147
- glitter.share.editerVersion = 'V_20.5.3';
147
+ glitter.share.editerVersion = 'V_20.5.5';
148
148
  glitter.share.start = new Date();
149
149
  const vm = { appConfig: [] };
150
150
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -146,7 +146,7 @@ export class Entry {
146
146
  }
147
147
  (window as any).renderClock = (window as any).renderClock ?? createClock();
148
148
  console.log(`Entry-time:`, (window as any).renderClock.stop());
149
- glitter.share.editerVersion = 'V_20.5.3';
149
+ glitter.share.editerVersion = 'V_20.5.5';
150
150
  glitter.share.start = new Date();
151
151
  const vm = { appConfig: [] };
152
152
  (window as any).saasConfig = {
@@ -434,6 +434,24 @@ export class BgProduct {
434
434
  vm.loading = false;
435
435
  gvc.notifyDataChange(id);
436
436
  });
437
+ function checkboxList() {
438
+ return [
439
+ BgWidget.tripletCheckboxContainer(gvc, '會員階級', (() => {
440
+ if (vm.postData.length === 0)
441
+ return -1;
442
+ return vm.postData.length === vm.dataList.length ? 1 : 0;
443
+ })(), r => {
444
+ vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
445
+ gvc.notifyDataChange(id);
446
+ }),
447
+ BgWidget.horizontalLine(),
448
+ BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-bottom: 12px;'),
449
+ BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
450
+ vm.postData = text;
451
+ gvc.notifyDataChange(id);
452
+ }),
453
+ ].join('');
454
+ }
437
455
  return gvc.bindView({
438
456
  bind: id,
439
457
  view: () => html ` <div
@@ -451,7 +469,7 @@ export class BgProduct {
451
469
  class="w-100 d-flex align-items-center p-3 border-bottom"
452
470
  style="position: sticky; top: 0; z-index: 2; background: #fff;"
453
471
  >
454
- <div class="tx_700">會員專屬價格設定</div>
472
+ <div class="tx_700">會員等級價格設定</div>
455
473
  <div class="flex-fill"></div>
456
474
  <i
457
475
  class="fa-regular fa-circle-xmark fs-5 text-dark cursor_pointer"
@@ -461,20 +479,9 @@ export class BgProduct {
461
479
  <div class="c_dialog h-100">
462
480
  <div class="c_dialog_body h-100">
463
481
  <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 20px; gap: 0;">
464
- ${BgWidget.tripletCheckboxContainer(gvc, '會員階級', (() => {
465
- if (vm.postData.length === 0)
466
- return -1;
467
- return vm.postData.length === vm.dataList.length ? 1 : 0;
468
- })(), r => {
469
- vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
470
- gvc.notifyDataChange(id);
471
- })}
472
- ${BgWidget.horizontalLine()}
473
- ${BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
474
- vm.postData = text;
475
- gvc.notifyDataChange(id);
476
- })}
477
- ${BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-top: 12px;')}
482
+ ${vm.dataList.length > 0
483
+ ? checkboxList()
484
+ : '尚未建立會員等級,請至「顧客管理」>「會員等級」新增'}
478
485
  </div>
479
486
  <div class="c_dialog_bar" style="z-index: 2;">
480
487
  ${BgWidget.cancel(gvc.event(() => gvc.closeDialog()))}
@@ -515,6 +522,28 @@ export class BgProduct {
515
522
  vm.loading = false;
516
523
  gvc.notifyDataChange(id);
517
524
  });
525
+ function checkboxList() {
526
+ return [
527
+ html ` <div class="d-none gap-2 mb-3">
528
+ <div class="textbox textbox-uncheck">依照門市</div>
529
+ <div class="textbox textbox-checked">依照門市標籤</div>
530
+ </div>`,
531
+ BgWidget.tripletCheckboxContainer(gvc, '門市名稱', (() => {
532
+ if (vm.postData.length === 0)
533
+ return -1;
534
+ return vm.postData.length === vm.dataList.length ? 1 : 0;
535
+ })(), r => {
536
+ vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
537
+ gvc.notifyDataChange(id);
538
+ }),
539
+ BgWidget.horizontalLine(),
540
+ BgWidget.grayNote('※只有被選取的門市/標籤才能設置專屬價格,其餘依售價計算', 'margin-bottom: 12px;'),
541
+ BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
542
+ vm.postData = text;
543
+ gvc.notifyDataChange(id);
544
+ }),
545
+ ].join('');
546
+ }
518
547
  return gvc.bindView({
519
548
  bind: id,
520
549
  view: () => html ` <div
@@ -542,24 +571,9 @@ export class BgProduct {
542
571
  <div class="c_dialog h-100">
543
572
  <div class="c_dialog_body h-100">
544
573
  <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 20px; gap: 0;">
545
- <div class="d-none gap-2 mb-3">
546
- <div class="textbox textbox-uncheck">依照門市</div>
547
- <div class="textbox textbox-checked">依照門市標籤</div>
548
- </div>
549
- ${BgWidget.tripletCheckboxContainer(gvc, '門市名稱', (() => {
550
- if (vm.postData.length === 0)
551
- return -1;
552
- return vm.postData.length === vm.dataList.length ? 1 : 0;
553
- })(), r => {
554
- vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
555
- gvc.notifyDataChange(id);
556
- })}
557
- ${BgWidget.horizontalLine()}
558
- ${BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
559
- vm.postData = text;
560
- gvc.notifyDataChange(id);
561
- })}
562
- ${BgWidget.grayNote('※只有被選取的門市/標籤才能設置專屬價格,其餘依售價計算', 'margin-top: 12px;')}
574
+ ${vm.dataList.length > 0
575
+ ? checkboxList()
576
+ : '尚未建立門市,請至「庫存管理」>「庫存點管理」新增'}
563
577
  </div>
564
578
  <div class="c_dialog_bar" style="z-index: 2;">
565
579
  ${BgWidget.cancel(gvc.event(() => gvc.closeDialog()))}
@@ -595,6 +609,24 @@ export class BgProduct {
595
609
  vm.loading = false;
596
610
  gvc.notifyDataChange(id);
597
611
  });
612
+ function checkboxList() {
613
+ return [
614
+ BgWidget.tripletCheckboxContainer(gvc, '顧客標籤', (() => {
615
+ if (vm.postData.length === 0)
616
+ return -1;
617
+ return vm.postData.length === vm.dataList.length ? 1 : 0;
618
+ })(), r => {
619
+ vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
620
+ gvc.notifyDataChange(id);
621
+ }),
622
+ BgWidget.horizontalLine(),
623
+ BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-bottom: 12px;'),
624
+ BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
625
+ vm.postData = text;
626
+ gvc.notifyDataChange(id);
627
+ }),
628
+ ].join('');
629
+ }
598
630
  return gvc.bindView({
599
631
  bind: id,
600
632
  view: () => html ` <div
@@ -622,20 +654,9 @@ export class BgProduct {
622
654
  <div class="c_dialog h-100">
623
655
  <div class="c_dialog_body h-100">
624
656
  <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 20px; gap: 0;">
625
- ${BgWidget.tripletCheckboxContainer(gvc, '顧客標籤', (() => {
626
- if (vm.postData.length === 0)
627
- return -1;
628
- return vm.postData.length === vm.dataList.length ? 1 : 0;
629
- })(), r => {
630
- vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
631
- gvc.notifyDataChange(id);
632
- })}
633
- ${BgWidget.horizontalLine()}
634
- ${BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
635
- vm.postData = text;
636
- gvc.notifyDataChange(id);
637
- })}
638
- ${BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-top: 12px;')}
657
+ ${vm.dataList.length > 0
658
+ ? checkboxList()
659
+ : '尚未建立顧客標籤,請編輯任一顧客的「顧客標籤」欄位'}
639
660
  </div>
640
661
  <div class="c_dialog_bar" style="z-index: 2;">
641
662
  ${BgWidget.cancel(gvc.event(() => gvc.closeDialog()))}
@@ -602,6 +602,29 @@ export class BgProduct {
602
602
  gvc.notifyDataChange(id);
603
603
  });
604
604
 
605
+ function checkboxList() {
606
+ return [
607
+ BgWidget.tripletCheckboxContainer(
608
+ gvc,
609
+ '會員階級',
610
+ (() => {
611
+ if (vm.postData.length === 0) return -1;
612
+ return vm.postData.length === vm.dataList.length ? 1 : 0;
613
+ })(),
614
+ r => {
615
+ vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
616
+ gvc.notifyDataChange(id);
617
+ }
618
+ ),
619
+ BgWidget.horizontalLine(),
620
+ BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-bottom: 12px;'),
621
+ BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
622
+ vm.postData = text;
623
+ gvc.notifyDataChange(id);
624
+ }),
625
+ ].join('');
626
+ }
627
+
605
628
  return gvc.bindView({
606
629
  bind: id,
607
630
  view: () =>
@@ -620,7 +643,7 @@ export class BgProduct {
620
643
  class="w-100 d-flex align-items-center p-3 border-bottom"
621
644
  style="position: sticky; top: 0; z-index: 2; background: #fff;"
622
645
  >
623
- <div class="tx_700">會員專屬價格設定</div>
646
+ <div class="tx_700">會員等級價格設定</div>
624
647
  <div class="flex-fill"></div>
625
648
  <i
626
649
  class="fa-regular fa-circle-xmark fs-5 text-dark cursor_pointer"
@@ -630,24 +653,9 @@ export class BgProduct {
630
653
  <div class="c_dialog h-100">
631
654
  <div class="c_dialog_body h-100">
632
655
  <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 20px; gap: 0;">
633
- ${BgWidget.tripletCheckboxContainer(
634
- gvc,
635
- '會員階級',
636
- (() => {
637
- if (vm.postData.length === 0) return -1;
638
- return vm.postData.length === vm.dataList.length ? 1 : 0;
639
- })(),
640
- r => {
641
- vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
642
- gvc.notifyDataChange(id);
643
- }
644
- )}
645
- ${BgWidget.horizontalLine()}
646
- ${BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
647
- vm.postData = text;
648
- gvc.notifyDataChange(id);
649
- })}
650
- ${BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-top: 12px;')}
656
+ ${vm.dataList.length > 0
657
+ ? checkboxList()
658
+ : '尚未建立會員等級,請至「顧客管理」>「會員等級」新增'}
651
659
  </div>
652
660
  <div class="c_dialog_bar" style="z-index: 2;">
653
661
  ${BgWidget.cancel(gvc.event(() => gvc.closeDialog()))}
@@ -696,6 +704,33 @@ export class BgProduct {
696
704
  gvc.notifyDataChange(id);
697
705
  });
698
706
 
707
+ function checkboxList() {
708
+ return [
709
+ html` <div class="d-none gap-2 mb-3">
710
+ <div class="textbox textbox-uncheck">依照門市</div>
711
+ <div class="textbox textbox-checked">依照門市標籤</div>
712
+ </div>`,
713
+ BgWidget.tripletCheckboxContainer(
714
+ gvc,
715
+ '門市名稱',
716
+ (() => {
717
+ if (vm.postData.length === 0) return -1;
718
+ return vm.postData.length === vm.dataList.length ? 1 : 0;
719
+ })(),
720
+ r => {
721
+ vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
722
+ gvc.notifyDataChange(id);
723
+ }
724
+ ),
725
+ BgWidget.horizontalLine(),
726
+ BgWidget.grayNote('※只有被選取的門市/標籤才能設置專屬價格,其餘依售價計算', 'margin-bottom: 12px;'),
727
+ BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
728
+ vm.postData = text;
729
+ gvc.notifyDataChange(id);
730
+ }),
731
+ ].join('');
732
+ }
733
+
699
734
  return gvc.bindView({
700
735
  bind: id,
701
736
  view: () =>
@@ -724,31 +759,9 @@ export class BgProduct {
724
759
  <div class="c_dialog h-100">
725
760
  <div class="c_dialog_body h-100">
726
761
  <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 20px; gap: 0;">
727
- <div class="d-none gap-2 mb-3">
728
- <div class="textbox textbox-uncheck">依照門市</div>
729
- <div class="textbox textbox-checked">依照門市標籤</div>
730
- </div>
731
- ${BgWidget.tripletCheckboxContainer(
732
- gvc,
733
- '門市名稱',
734
- (() => {
735
- if (vm.postData.length === 0) return -1;
736
- return vm.postData.length === vm.dataList.length ? 1 : 0;
737
- })(),
738
- r => {
739
- vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
740
- gvc.notifyDataChange(id);
741
- }
742
- )}
743
- ${BgWidget.horizontalLine()}
744
- ${BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
745
- vm.postData = text;
746
- gvc.notifyDataChange(id);
747
- })}
748
- ${BgWidget.grayNote(
749
- '※只有被選取的門市/標籤才能設置專屬價格,其餘依售價計算',
750
- 'margin-top: 12px;'
751
- )}
762
+ ${vm.dataList.length > 0
763
+ ? checkboxList()
764
+ : '尚未建立門市,請至「庫存管理」>「庫存點管理」新增'}
752
765
  </div>
753
766
  <div class="c_dialog_bar" style="z-index: 2;">
754
767
  ${BgWidget.cancel(gvc.event(() => gvc.closeDialog()))}
@@ -792,6 +805,29 @@ export class BgProduct {
792
805
  gvc.notifyDataChange(id);
793
806
  });
794
807
 
808
+ function checkboxList() {
809
+ return [
810
+ BgWidget.tripletCheckboxContainer(
811
+ gvc,
812
+ '顧客標籤',
813
+ (() => {
814
+ if (vm.postData.length === 0) return -1;
815
+ return vm.postData.length === vm.dataList.length ? 1 : 0;
816
+ })(),
817
+ r => {
818
+ vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
819
+ gvc.notifyDataChange(id);
820
+ }
821
+ ),
822
+ BgWidget.horizontalLine(),
823
+ BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-bottom: 12px;'),
824
+ BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
825
+ vm.postData = text;
826
+ gvc.notifyDataChange(id);
827
+ }),
828
+ ].join('');
829
+ }
830
+
795
831
  return gvc.bindView({
796
832
  bind: id,
797
833
  view: () =>
@@ -820,24 +856,9 @@ export class BgProduct {
820
856
  <div class="c_dialog h-100">
821
857
  <div class="c_dialog_body h-100">
822
858
  <div class="c_dialog_main h-100" style="min-height: ${mainHeight}; padding: 20px; gap: 0;">
823
- ${BgWidget.tripletCheckboxContainer(
824
- gvc,
825
- '顧客標籤',
826
- (() => {
827
- if (vm.postData.length === 0) return -1;
828
- return vm.postData.length === vm.dataList.length ? 1 : 0;
829
- })(),
830
- r => {
831
- vm.postData = r === 1 ? vm.dataList.map(({ key }) => key) : [];
832
- gvc.notifyDataChange(id);
833
- }
834
- )}
835
- ${BgWidget.horizontalLine()}
836
- ${BgWidget.multiCheckboxContainer(gvc, vm.dataList, vm.postData, text => {
837
- vm.postData = text;
838
- gvc.notifyDataChange(id);
839
- })}
840
- ${BgWidget.grayNote('※只有被選取的會員才能設置專屬價格,其餘依售價計算', 'margin-top: 12px;')}
859
+ ${vm.dataList.length > 0
860
+ ? checkboxList()
861
+ : '尚未建立顧客標籤,請編輯任一顧客的「顧客標籤」欄位'}
841
862
  </div>
842
863
  <div class="c_dialog_bar" style="z-index: 2;">
843
864
  ${BgWidget.cancel(gvc.event(() => gvc.closeDialog()))}
@@ -29,7 +29,7 @@ export class CmsRouter {
29
29
  case 'ig_live':
30
30
  case 'line_plus':
31
31
  resolve(`<div class="d-flex w-100 align-items-center justify-content-center">
32
- <div class="insignia insignia-warning">功能優化中,預計於4月15號重新開放!</div>
32
+ <div class="insignia insignia-warning">功能優化中,預計於4月30號重新開放!</div>
33
33
  </div>`);
34
34
  break;
35
35
  case 'shipment_list':
@@ -34,7 +34,7 @@ export class CmsRouter{
34
34
  case 'ig_live':
35
35
  case 'line_plus':
36
36
  resolve(`<div class="d-flex w-100 align-items-center justify-content-center">
37
- <div class="insignia insignia-warning">功能優化中,預計於4月15號重新開放!</div>
37
+ <div class="insignia insignia-warning">功能優化中,預計於4月30號重新開放!</div>
38
38
  </div>`)
39
39
  break
40
40
  // case 'fb_live':