ts-glitter 22.0.4 → 22.0.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.
@@ -4,10 +4,11 @@ import { BgProduct, OptionsItem } from '../backend-manager/bg-product.js';
4
4
  import { ApiShop } from '../glitter-base/route/shopping.js';
5
5
  import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
6
6
  import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
7
- import { FilterOptions } from './filter-options.js';
8
7
  import { CheckInput } from '../modules/checkInput.js';
9
8
  import { Language, LanguageLocation } from '../glitter-base/global/language.js';
10
9
 
10
+ const html = String.raw;
11
+
11
12
  type ViewModel = {
12
13
  id: string;
13
14
  filterID: string;
@@ -64,7 +65,7 @@ function getEmptyLanguageData() {
64
65
  }
65
66
 
66
67
  export class ShoppingCollections {
67
- public static main(gvc: GVC) {
68
+ static main(gvc: GVC) {
68
69
  const glitter = gvc.glitter;
69
70
  const vm: ViewModel = {
70
71
  id: glitter.getUUID(),
@@ -92,7 +93,6 @@ export class ShoppingCollections {
92
93
  query: '',
93
94
  allParents: [],
94
95
  };
95
- const html = String.raw;
96
96
  const dialog = new ShareDialog(gvc.glitter);
97
97
 
98
98
  const updateCollections = (data: { products: Product[]; collections: Collection[] }): Collection[] => {
@@ -198,51 +198,7 @@ export class ShoppingCollections {
198
198
  bind: id,
199
199
  view: () => {
200
200
  if (loading) {
201
- gvc.addStyle(`
202
- .parent-container,
203
- .child-container {
204
- flex: 1;
205
- margin-right: 20px;
206
- }
207
-
208
- .parent-container:last-child,
209
- .child-container:last-child {
210
- margin-right: 0;
211
- }
212
-
213
- .ul-style {
214
- list-style-type: none;
215
- padding: 0;
216
- margin: 0;
217
- min-height: 200px;
218
- border: 1px solid #ccc;
219
- }
220
-
221
- .li-style {
222
- padding: 6px 10px;
223
- margin-bottom: 5px;
224
- background-color: #eee;
225
- cursor: move;
226
- border: 1px solid #ccc;
227
- display: flex;
228
- align-items: center;
229
- }
230
-
231
- .drag-icon {
232
- margin-right: 10px;
233
- cursor: move;
234
- }
235
-
236
- .drag-icon::before {
237
- content: '↕';
238
- font-size: 18px;
239
- margin-right: 10px;
240
- }
241
-
242
- .selectCol {
243
- background-color: #dcdcdc;
244
- }
245
- `);
201
+ this.addStyle(gvc);
246
202
  return '';
247
203
  } else {
248
204
  return html` <div class="d-flex">
@@ -429,7 +385,7 @@ export class ShoppingCollections {
429
385
  ApiShop.putCollections({
430
386
  data: { replace: dd, original },
431
387
  token: (window.parent as any).config.token,
432
- }).then(r => {
388
+ }).then(() => {
433
389
  dialog.dataLoading({ visible: false });
434
390
  gvc.notifyDataChange(vm.id);
435
391
  });
@@ -502,7 +458,7 @@ export class ShoppingCollections {
502
458
  }
503
459
  });
504
460
  },
505
- rowClick: (data, index) => {
461
+ rowClick: (_, index) => {
506
462
  vm.data = vm.dataList[index];
507
463
  vm.type = 'replace';
508
464
  },
@@ -559,9 +515,57 @@ export class ShoppingCollections {
559
515
  });
560
516
  }
561
517
 
562
- public static editorDetail(obj: { vm: ViewModel; gvc: GVC; type?: 'add' | 'replace' }) {
563
- const html = String.raw;
518
+ static addStyle(gvc: GVC) {
519
+ gvc.addStyle(`
520
+ .parent-container,
521
+ .child-container {
522
+ flex: 1;
523
+ margin-right: 20px;
524
+ }
525
+
526
+ .parent-container:last-child,
527
+ .child-container:last-child {
528
+ margin-right: 0;
529
+ }
530
+
531
+ .ul-style {
532
+ list-style-type: none;
533
+ padding: 0;
534
+ margin: 0;
535
+ min-height: 200px;
536
+ border: 1px solid #ccc;
537
+ }
538
+
539
+ .li-style {
540
+ padding: 6px 10px;
541
+ margin-bottom: 5px;
542
+ background-color: #eee;
543
+ cursor: move;
544
+ border: 1px solid #ccc;
545
+ display: flex;
546
+ align-items: center;
547
+ }
548
+
549
+ .drag-icon {
550
+ margin-right: 10px;
551
+ cursor: move;
552
+ }
553
+
554
+ .drag-icon::before {
555
+ content: '↕';
556
+ font-size: 18px;
557
+ margin-right: 10px;
558
+ }
559
+
560
+ .selectCol {
561
+ background-color: #dcdcdc;
562
+ }
563
+ `);
564
+ }
565
+
566
+ static editorDetail(obj: { vm: ViewModel; gvc: GVC; type?: 'add' | 'replace' }) {
564
567
  const gvc = obj.gvc;
568
+ const glitter = gvc.glitter;
565
569
  const vm = obj.vm;
566
570
  const original = JSON.parse(JSON.stringify(vm.data));
567
571
  const dialog = new ShareDialog(gvc.glitter);
@@ -589,13 +593,13 @@ export class ShoppingCollections {
589
593
 
590
594
  for (const data of lagDomain) {
591
595
  if (data.domains.includes(vm.data.language_data[data.lang].seo.domain)) {
592
- const langTExt = Language.getLanguageText({
596
+ const text = Language.getLanguageText({
593
597
  local: true,
594
598
  compare: data.lang,
595
599
  });
596
600
  return {
597
601
  result: false,
598
- text: `語系「${langTExt}」的連結網址「${vm.data.language_data[data.lang].seo.domain}」<br/>已存在於其他類別,請更換連結網址`,
602
+ text: `語系「${text}」的連結網址「${vm.data.language_data[data.lang].seo.domain}」<br />已存在於其他類別,請更換連結網址`,
599
603
  };
600
604
  }
601
605
  }
@@ -657,8 +661,6 @@ export class ShoppingCollections {
657
661
  return gvc.bindView(
658
662
  (() => {
659
663
  const id = gvc.glitter.getUUID();
660
- const glitter = gvc.glitter;
661
- const html = String.raw;
662
664
  return {
663
665
  bind: id,
664
666
  view: () => {
@@ -667,7 +669,6 @@ export class ShoppingCollections {
667
669
  >
668
670
  ${BgWidget.grayNote('前往商店設定->商店訊息中,設定支援的語言。')}
669
671
  ${gvc.bindView(() => {
670
- const html = String.raw;
671
672
  return {
672
673
  bind: glitter.getUUID(),
673
674
  view: () => {
@@ -738,7 +739,7 @@ export class ShoppingCollections {
738
739
  },
739
740
  title: '切換語系',
740
741
  footer_html: gvc => {
741
- return ``;
742
+ return '';
742
743
  },
743
744
  width: 300,
744
745
  });
@@ -752,7 +753,7 @@ export class ShoppingCollections {
752
753
  // 左容器
753
754
  html: [
754
755
  BgWidget.mainCard(
755
- html` <div class="tx_700" style="margin-bottom: 18px">分類標籤 ${BgWidget.requiredStar()}</div>
756
+ html` <div class="tx_700" style="margin-bottom: 12px">分類標籤 ${BgWidget.requiredStar()}</div>
756
757
  ${EditorElem.editeInput({
757
758
  gvc: gvc,
758
759
  title: '',
@@ -772,7 +773,7 @@ export class ShoppingCollections {
772
773
  gvc: gvc,
773
774
  title: '',
774
775
  default: language_data.title,
775
- placeHolder: vm.data.title || '',
776
+ placeHolder: vm.data.title || '預設為「分類標籤」輸入值',
776
777
  callback: text => {
777
778
  language_data.title = text;
778
779
  if (language_data.seo.domain === '') {
@@ -789,7 +790,7 @@ export class ShoppingCollections {
789
790
  view: () => {
790
791
  return BgWidget.mainCard(
791
792
  [
792
- html` <div class="tx_normal fw-normal mb-2">
793
+ html` <div class="tx_700 mb-2">
793
794
  連結網址 ${BgWidget.requiredStar()} ${BgWidget.languageInsignia(select_lan)}
794
795
  </div>`,
795
796
  gvc.bindView({
@@ -797,8 +798,8 @@ export class ShoppingCollections {
797
798
  view: () => {
798
799
  return html`<div
799
800
  class="${document.body.clientWidth < 800
800
- ? `w-100`
801
- : ``} justify-content-start justify-content-lg-center"
801
+ ? 'w-100'
802
+ : ''} justify-content-start justify-content-lg-center"
802
803
  style="padding: 9px 18px;background: #EAEAEA; justify-content: center; align-items: center; gap: 5px; display: flex"
803
804
  >
804
805
  <div
@@ -818,7 +819,6 @@ export class ShoppingCollections {
818
819
  onchange="${gvc.event(e => {
819
820
  let text = e.value;
820
821
  if (text.length > 0 && !CheckInput.isChineseEnglishNumberHyphen(text)) {
821
- const dialog = new ShareDialog(gvc.glitter);
822
822
  dialog.infoMessage({ text: '連結僅限使用中英文數字與連接號' });
823
823
  } else {
824
824
  language_data.seo.domain = text;
@@ -829,9 +829,7 @@ export class ShoppingCollections {
829
829
  },
830
830
  divCreate: {
831
831
  style: `width: 100%; justify-content: flex-start; align-items: center; display: inline-flex;border:1px solid #EAEAEA;border-radius: 10px;overflow: hidden; ${
832
- document.body.clientWidth > 768
833
- ? 'gap: 18px; '
834
- : 'flex-direction: column; gap: 0px; '
832
+ document.body.clientWidth > 768 ? 'gap: 18px;' : 'flex-direction: column; gap: 0px;'
835
833
  }`,
836
834
  },
837
835
  }),
@@ -848,115 +846,98 @@ export class ShoppingCollections {
848
846
  );
849
847
  },
850
848
  divCreate: {
851
- class: `${gvc.glitter.ut.frSize(
852
- {
853
- sm: ``,
854
- },
855
- `p-0`
856
- )}`,
849
+ class: `${gvc.glitter.ut.frSize({ sm: '' }, 'p-0')}`,
857
850
  },
858
851
  };
859
852
  }),
860
853
  BgWidget.mainCard(
861
- html` <div class="tx_700" style="margin-bottom: 18px">商品</div>
862
- ${(() => {
863
- const pvm = {
864
- id: gvc.glitter.getUUID(),
865
- loading: true,
866
- dataList: vm.data.product_id,
867
- productList: [],
868
- };
869
- return html`
870
- <div class="d-flex flex-column p-2" style="gap: 18px;">
871
- <div
872
- class="d-flex align-items-center gray-bottom-line-18"
873
- style="justify-content: space-between;"
874
- >
875
- <div class="form-check-label c_updown_label">
876
- <div class="tx_normal">商品名稱</div>
877
- </div>
878
- ${BgWidget.grayButton(
879
- '選擇商品',
880
- gvc.event(() => {
881
- BgProduct.productsDialog({
882
- gvc: gvc,
883
- default: vm.data.product_id,
884
- callback: value => {
885
- pvm.dataList = value;
886
- vm.data.product_id = value;
887
- pvm.loading = true;
888
- gvc.notifyDataChange(pvm.id);
889
- },
890
- });
854
+ (() => {
855
+ const pvm = {
856
+ id: gvc.glitter.getUUID(),
857
+ loading: true,
858
+ dataList: vm.data.product_id,
859
+ productList: [],
860
+ };
861
+ return html`
862
+ <div class="d-flex flex-column">
863
+ <div class="d-flex align-items-center" style="justify-content: space-between;">
864
+ <div class="tx_700" style="margin-bottom: 12px">商品</div>
865
+ ${BgWidget.grayButton(
866
+ '選擇商品',
867
+ gvc.event(() => {
868
+ BgProduct.productsDialog({
869
+ gvc: gvc,
870
+ default: vm.data.product_id,
871
+ callback: value => {
872
+ pvm.dataList = value;
873
+ vm.data.product_id = value;
874
+ pvm.loading = true;
875
+ gvc.notifyDataChange(pvm.id);
876
+ },
877
+ });
878
+ })
879
+ )}
880
+ </div>
881
+ ${gvc.bindView({
882
+ bind: pvm.id,
883
+ view: () => {
884
+ if (pvm.loading) {
885
+ return '資料載入中';
886
+ }
887
+ if (pvm.productList.length === 0) {
888
+ return '目前無選取任何商品';
889
+ }
890
+ return gvc.map(
891
+ pvm.productList.map((opt: OptionsItem, index: number) => {
892
+ return html` <div
893
+ class="form-check-label c_updown_label"
894
+ style="display: flex; align-items: center; min-height: 60px; gap: 8px;"
895
+ >
896
+ <span class="tx_normal" style="min-width: 30px;">${index + 1}.</span>
897
+ ${BgWidget.validImageBox({ gvc, image: opt.image, width: 40 })}
898
+ <span class="tx_normal">${opt.value}</span>
899
+ ${opt.note ? html` <span class="tx_gray_12 ms-2">${opt.note}</span> ` : ''}
900
+ </div>`;
891
901
  })
892
- )}
893
- </div>
894
- ${gvc.bindView({
895
- bind: pvm.id,
896
- view: () => {
897
- if (pvm.loading) {
898
- return '資料載入中';
899
- }
900
- if (pvm.productList.length === 0) {
901
- return '目前無選取任何商品';
902
- }
903
- return gvc.map(
904
- pvm.productList.map((opt: OptionsItem, index: number) => {
905
- return html` <div
906
- class="form-check-label c_updown_label"
907
- style="display: flex; align-items: center; min-height: 56px; gap: 8px;"
908
- >
909
- <span class="tx_normal">${index + 1} .</span>
910
- <div style="line-height: 40px;">
911
- <img
912
- class="rounded border me-1"
913
- src="${opt.image ?? BgWidget.noImageURL}"
914
- style="width:40px; height:40px;"
915
- />
916
- </div>
917
- <span class="tx_normal">${opt.value}</span>
918
- ${opt.note ? html` <span class="tx_gray_12 ms-2">${opt.note}</span> ` : ''}
919
- </div>`;
920
- })
921
- );
922
- },
923
- onCreate: () => {
924
- if (pvm.loading) {
925
- if (pvm.dataList.length === 0) {
926
- pvm.productList = [];
902
+ );
903
+ },
904
+ onCreate: () => {
905
+ if (pvm.loading) {
906
+ if (pvm.dataList.length === 0) {
907
+ pvm.productList = [];
908
+ pvm.loading = false;
909
+ setTimeout(() => gvc.notifyDataChange(pvm.id), 100);
910
+ } else {
911
+ ApiShop.getProduct({
912
+ page: 0,
913
+ limit: 99999,
914
+ id_list: pvm.dataList.join(','),
915
+ }).then(data => {
916
+ pvm.productList = data.response.data.map(
917
+ (product: {
918
+ content: {
919
+ id: number;
920
+ title: string;
921
+ preview_image: string[];
922
+ };
923
+ }) => {
924
+ return {
925
+ key: product.content.id,
926
+ value: product.content.title,
927
+ image: product.content.preview_image[0] ?? BgWidget.noImageURL,
928
+ };
929
+ }
930
+ );
927
931
  pvm.loading = false;
928
- setTimeout(() => gvc.notifyDataChange(pvm.id), 100);
929
- } else {
930
- ApiShop.getProduct({
931
- page: 0,
932
- limit: 99999,
933
- id_list: pvm.dataList.join(','),
934
- }).then(data => {
935
- pvm.productList = data.response.data.map(
936
- (product: {
937
- content: {
938
- id: number;
939
- title: string;
940
- preview_image: string[];
941
- };
942
- }) => {
943
- return {
944
- key: product.content.id,
945
- value: product.content.title,
946
- image: product.content.preview_image[0] ?? BgWidget.noImageURL,
947
- };
948
- }
949
- );
950
- pvm.loading = false;
951
- gvc.notifyDataChange(pvm.id);
952
- });
953
- }
932
+ gvc.notifyDataChange(pvm.id);
933
+ });
954
934
  }
955
- },
956
- })}
957
- </div>
958
- `;
959
- })()}`
935
+ }
936
+ },
937
+ })}
938
+ </div>
939
+ `;
940
+ })()
960
941
  ),
961
942
  BgWidget.mainCard(
962
943
  [
@@ -1012,7 +993,7 @@ export class ShoppingCollections {
1012
993
  vm.data.parentTitles.length > 0) ||
1013
994
  vm.type === 'add'
1014
995
  ) {
1015
- return html` <div class="tx_700" style="margin-bottom: 18px">父層</div>
996
+ return html` <div class="tx_700" style="margin-bottom: 12px">父層</div>
1016
997
  ${BgWidget.select({
1017
998
  gvc: gvc,
1018
999
  callback: text => {
@@ -1027,7 +1008,7 @@ export class ShoppingCollections {
1027
1008
  }
1028
1009
  const id = gvc.glitter.getUUID();
1029
1010
  return html`
1030
- <div class="tx_700" style="margin-bottom: 18px">子分類</div>
1011
+ <div class="tx_700" style="margin-bottom: 12px">子分類</div>
1031
1012
  ${gvc.bindView({
1032
1013
  bind: id,
1033
1014
  view: () => {
@@ -1100,7 +1081,6 @@ export class ShoppingCollections {
1100
1081
  return;
1101
1082
  }
1102
1083
 
1103
- // const regexTitle = /[\s,\/\\]+/g;
1104
1084
  const forbiddenRegex = /[,/\\]/;
1105
1085
  if (forbiddenRegex.test(vm.data.title)) {
1106
1086
  dialog.infoMessage({ text: '標題不可包含空白格與以下符號:<br />「 , 」「 / 」「 \\ 」' });
@@ -899,7 +899,7 @@ export class ShoppingFinanceSetting {
899
899
  BgWidget.tab(viewList, gvc, vm.key, res => {
900
900
  vm.key = res;
901
901
  gvc.notifyDataChange(vm.id);
902
- }, 'margin-bottom: 0px; margin-top: -10px;'),
902
+ }, 'margin: 10px 0 !important'),
903
903
  page,
904
904
  ].join(BgWidget.mbContainer(12));
905
905
  },
@@ -1117,9 +1117,8 @@ export class ShoppingFinanceSetting {
1117
1117
  }, { single: false }),
1118
1118
  BgWidget.editeInput({
1119
1119
  gvc: gvc,
1120
- title: html `<div class="d-flex align-items-center mt-2 gap-2">
1121
- 最低消費金額(輸入0則沒有限制) ${questionDialog(`顧客的購物車必須要消費到這個金額,才能啟用此${t}流`)}
1122
- </div>`,
1120
+ title: html `<div class="d-flex align-items-center mt-3 gap-2">最低消費金額(輸入 0 則沒有限制)</div>
1121
+ ${BgWidget.grayNote(`購物車需達到此金額,才可使用此${t}流`)}`,
1123
1122
  default: `${data.cartSetting.minimumTotal}`,
1124
1123
  type: 'number',
1125
1124
  callback: text => {
@@ -1129,9 +1128,8 @@ export class ShoppingFinanceSetting {
1129
1128
  }),
1130
1129
  BgWidget.editeInput({
1131
1130
  gvc: gvc,
1132
- title: html `<div class="d-flex align-items-center mt-2 gap-2">
1133
- 最高消費金額(輸入0則沒有限制) ${questionDialog(`顧客的購物車不可超出這個金額,才能啟用此${t}流`)}
1134
- </div>`,
1131
+ title: html `<div class="d-flex align-items-center mt-3 gap-2">最高消費金額(輸入 0 則沒有限制)</div>
1132
+ ${BgWidget.grayNote(`購物車需低於此金額,才可使用此${t}流`)}`,
1135
1133
  default: `${data.cartSetting.maximumTotal}`,
1136
1134
  type: 'number',
1137
1135
  callback: text => {
@@ -1139,13 +1137,11 @@ export class ShoppingFinanceSetting {
1139
1137
  },
1140
1138
  placeHolder: '請輸入金額',
1141
1139
  }),
1142
- BgWidget.horizontalLine(),
1140
+ BgWidget.horizontalLine({ margin: 1.5 }),
1143
1141
  BgWidget.editeInput({
1144
1142
  gvc: gvc,
1145
- title: html `<div class="d-flex align-items-center mt-2 gap-2">
1146
- <div style="white-space: break-spaces;">達指定消費金額,訂單免運費(輸入0則不設定此功能)</div>
1147
- ${questionDialog(html `訂單中「所有商品小計(A)」若達到輸入的指定值,使用此物流則免運`)}
1148
- </div>`,
1143
+ title: html `<div class="mt-3" style="white-space: break-spaces;">滿額免運(輸入 0 則不啟用)</div>
1144
+ ${BgWidget.grayNote('購物車達到此金額即享有免運優惠')}`,
1149
1145
  default: `${data.cartSetting.freeShipmnetTarget}`,
1150
1146
  type: 'number',
1151
1147
  callback: text => {
@@ -993,7 +993,7 @@ export class ShoppingFinanceSetting {
993
993
  vm.key = res;
994
994
  gvc.notifyDataChange(vm.id);
995
995
  },
996
- 'margin-bottom: 0px; margin-top: -10px;'
996
+ 'margin: 10px 0 !important'
997
997
  ),
998
998
  page,
999
999
  ].join(BgWidget.mbContainer(12));
@@ -1238,9 +1238,8 @@ export class ShoppingFinanceSetting {
1238
1238
  ),
1239
1239
  BgWidget.editeInput({
1240
1240
  gvc: gvc,
1241
- title: html`<div class="d-flex align-items-center mt-2 gap-2">
1242
- 最低消費金額(輸入0則沒有限制) ${questionDialog(`顧客的購物車必須要消費到這個金額,才能啟用此${t}流`)}
1243
- </div>`,
1241
+ title: html`<div class="d-flex align-items-center mt-3 gap-2">最低消費金額(輸入 0 則沒有限制)</div>
1242
+ ${BgWidget.grayNote(`購物車需達到此金額,才可使用此${t}流`)}`,
1244
1243
  default: `${data.cartSetting.minimumTotal}`,
1245
1244
  type: 'number',
1246
1245
  callback: text => {
@@ -1250,9 +1249,8 @@ export class ShoppingFinanceSetting {
1250
1249
  }),
1251
1250
  BgWidget.editeInput({
1252
1251
  gvc: gvc,
1253
- title: html`<div class="d-flex align-items-center mt-2 gap-2">
1254
- 最高消費金額(輸入0則沒有限制) ${questionDialog(`顧客的購物車不可超出這個金額,才能啟用此${t}流`)}
1255
- </div>`,
1252
+ title: html`<div class="d-flex align-items-center mt-3 gap-2">最高消費金額(輸入 0 則沒有限制)</div>
1253
+ ${BgWidget.grayNote(`購物車需低於此金額,才可使用此${t}流`)}`,
1256
1254
  default: `${data.cartSetting.maximumTotal}`,
1257
1255
  type: 'number',
1258
1256
  callback: text => {
@@ -1260,13 +1258,11 @@ export class ShoppingFinanceSetting {
1260
1258
  },
1261
1259
  placeHolder: '請輸入金額',
1262
1260
  }),
1263
- BgWidget.horizontalLine(),
1261
+ BgWidget.horizontalLine({ margin: 1.5 }),
1264
1262
  BgWidget.editeInput({
1265
1263
  gvc: gvc,
1266
- title: html`<div class="d-flex align-items-center mt-2 gap-2">
1267
- <div style="white-space: break-spaces;">達指定消費金額,訂單免運費(輸入0則不設定此功能)</div>
1268
- ${questionDialog(html`訂單中「所有商品小計(A)」若達到輸入的指定值,使用此物流則免運`)}
1269
- </div>`,
1264
+ title: html`<div class="mt-3" style="white-space: break-spaces;">滿額免運(輸入 0 則不啟用)</div>
1265
+ ${BgWidget.grayNote('購物車達到此金額即享有免運優惠')}`,
1270
1266
  default: `${data.cartSetting.freeShipmnetTarget}`,
1271
1267
  type: 'number',
1272
1268
  callback: text => {
@@ -29,7 +29,7 @@
29
29
  --main-orange-2: #ffb400;
30
30
  --main-orange-3: #ff6c02;
31
31
  --main-green: #10931d;
32
- --main-yellow: #FFB21C;
32
+ --main-yellow: #ffb21c;
33
33
 
34
34
  --item-primary: #4d86db;
35
35
  --item-success: #d8ecda;
@@ -1130,7 +1130,7 @@ h6 {
1130
1130
  .insignia-sm {
1131
1131
  border-radius: 0.25rem;
1132
1132
  min-height: 20px;
1133
- padding: 3px 4px;
1133
+ padding: 3px 6px;
1134
1134
  font-size: 12px;
1135
1135
  }
1136
1136
 
@@ -790,7 +790,7 @@ export class ApiShop {
790
790
  });
791
791
  }
792
792
  static getCollection() {
793
- return new Promise((resolve, reject) => {
793
+ return new Promise(resolve => {
794
794
  var _a;
795
795
  window.glitter.share._public_config = (_a = window.glitter.share._public_config) !== null && _a !== void 0 ? _a : {};
796
796
  const config = window.glitter.share._public_config;
@@ -654,8 +654,8 @@ export class ApiShop {
654
654
  valid?: boolean;
655
655
  is_shipment?: boolean;
656
656
  is_reconciliation?: boolean;
657
- buyer_name?:string,
658
- buyer_phone?:string
657
+ buyer_name?: string;
658
+ buyer_phone?: string;
659
659
  }) {
660
660
  const filterString = this.orderListFilterString(json.filter);
661
661
  return BaseApi.create({
@@ -936,7 +936,7 @@ export class ApiShop {
936
936
  }
937
937
 
938
938
  static getCollection() {
939
- return new Promise<{ result: boolean; response: any }>((resolve, reject) => {
939
+ return new Promise<{ result: boolean; response: any }>(resolve => {
940
940
  (window as any).glitter.share._public_config = (window as any).glitter.share._public_config ?? {};
941
941
  const config = (window as any).glitter.share._public_config;
942
942
  if (config[`collection-manager`] && (window as any).glitter.getUrlParameter('cms') !== 'true') {
@@ -1459,8 +1459,11 @@ export class PdClass {
1459
1459
  let minVariant = null;
1460
1460
  let maxVariant = null;
1461
1461
  for (const variant of variants) {
1462
- const { sale_price, origin_price } = variant;
1462
+ const { sale_price, origin_price, invisible } = variant;
1463
1463
  specPriceMap.set(sale_price, { sale_price, origin_price });
1464
+ if (invisible) {
1465
+ continue;
1466
+ }
1464
1467
  if (!minVariant || sale_price < minVariant.sale_price) {
1465
1468
  minVariant = { sale_price, origin_price };
1466
1469
  }