ts-glitter 14.0.4 → 14.0.6

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 (55) hide show
  1. package/lowcode/Entry.js +1 -1
  2. package/lowcode/Entry.ts +1 -1
  3. package/lowcode/backend-manager/bg-blog.js +8 -136
  4. package/lowcode/backend-manager/bg-blog.ts +8 -136
  5. package/lowcode/backend-manager/bg-product.js +4 -1
  6. package/lowcode/backend-manager/bg-product.ts +5 -2
  7. package/lowcode/cms-plugin/product-config.js +17 -0
  8. package/lowcode/cms-plugin/product-config.ts +14 -0
  9. package/lowcode/cms-plugin/shopping-market-america.js +83 -11
  10. package/lowcode/cms-plugin/shopping-market-america.ts +107 -33
  11. package/lowcode/cms-plugin/shopping-product-setting.js +11 -5
  12. package/lowcode/cms-plugin/shopping-product-setting.ts +76 -70
  13. package/lowcode/cms-plugin/template_refer.js +398 -0
  14. package/lowcode/cms-plugin/template_refer.ts +401 -0
  15. package/lowcode/glitter-base/route/shopping.d.ts +65 -0
  16. package/lowcode/glitter-base/route/shopping.js.map +1 -1
  17. package/lowcode/glitter-base/route/user.d.ts +24 -4
  18. package/lowcode/glitter-base/route/user.js.map +1 -1
  19. package/lowcode/glitterBundle/api/base.js.map +1 -1
  20. package/lowcode/public-components/footer/footer-01.js +1 -1
  21. package/lowcode/public-components/footer/footer-01.ts +1 -1
  22. package/lowcode/public-components/footer/footer-02.js +2 -2
  23. package/lowcode/public-components/footer/footer-02.ts +2 -2
  24. package/lowcode/public-components/footer/footer-03.js +2 -2
  25. package/lowcode/public-components/footer/footer-03.ts +2 -2
  26. package/lowcode/public-components/headers/sy-02.js +117 -114
  27. package/lowcode/public-components/headers/sy-02.ts +239 -234
  28. package/lowcode/public-components/headers/sy-03.js +10 -9
  29. package/lowcode/public-components/headers/sy-03.ts +22 -21
  30. package/lowcode/public-components/headers/sy-04.js +11 -10
  31. package/lowcode/public-components/headers/sy-04.ts +23 -22
  32. package/lowcode/public-components/product/pd-card-01.js +5 -3
  33. package/lowcode/public-components/product/pd-card-01.ts +5 -3
  34. package/lowcode/public-components/product/pd-card-02.js +4 -2
  35. package/lowcode/public-components/product/pd-card-02.ts +4 -2
  36. package/lowcode/public-components/product/pd-card-03.js +4 -2
  37. package/lowcode/public-components/product/pd-card-03.ts +4 -2
  38. package/lowcode/public-components/product/pd-class.js +7 -1
  39. package/lowcode/public-components/product/pd-class.ts +9 -1
  40. package/lowcode/public-components/product/product-detail.js +116 -117
  41. package/lowcode/public-components/product/product-detail.ts +234 -228
  42. package/lowcode/public-components/product/product-list.js +16 -5
  43. package/lowcode/public-components/product/product-list.ts +19 -8
  44. package/package.json +1 -1
  45. package/src/api-public/services/auto-send-email.js.map +1 -1
  46. package/src/api-public/services/shopping.ts +1 -1
  47. package/src/api-public/services/sms.js.map +1 -1
  48. package/src/api-public/services/user.js.map +1 -1
  49. package/src/helper/glitter-util.d.ts +1 -1
  50. package/src/helper/glitter-util.js +5 -5
  51. package/src/helper/glitter-util.js.map +1 -1
  52. package/src/helper/glitter-util.ts +7 -7
  53. package/src/index.js +93 -52
  54. package/src/index.js.map +1 -1
  55. package/src/index.ts +158 -116
package/lowcode/Entry.js CHANGED
@@ -70,7 +70,7 @@ export class Entry {
70
70
  }
71
71
  window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
72
72
  console.log(`Entry-time:`, window.renderClock.stop());
73
- glitter.share.editerVersion = 'V_14.0.4';
73
+ glitter.share.editerVersion = 'V_14.0.6';
74
74
  glitter.share.start = new Date();
75
75
  const vm = {
76
76
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -72,7 +72,7 @@ export class Entry {
72
72
  }
73
73
  (window as any).renderClock = (window as any).renderClock ?? clockF();
74
74
  console.log(`Entry-time:`, (window as any).renderClock.stop());
75
- glitter.share.editerVersion = 'V_14.0.4';
75
+ glitter.share.editerVersion = 'V_14.0.6';
76
76
  glitter.share.start = new Date();
77
77
  const vm: {
78
78
  appConfig: any;
@@ -17,6 +17,7 @@ import { MenusSetting } from '../cms-plugin/menus-setting.js';
17
17
  import { BaseApi } from '../glitterBundle/api/base.js';
18
18
  import { BgProduct } from './bg-product.js';
19
19
  import { CheckInput } from '../modules/checkInput.js';
20
+ import { Template_refer } from "../cms-plugin/template_refer.js";
20
21
  const html = String.raw;
21
22
  export class BgBlog {
22
23
  static contentManager(gvc, type = 'list', callback = () => {
@@ -475,8 +476,12 @@ export class BgBlog {
475
476
  style="height: 28px;width: 75px;gap:5px;"
476
477
  onclick="${gvc.event(() => {
477
478
  if (dd.tag === 'empty') {
478
- const a = [];
479
- a.name = '空白頁面';
479
+ const a = [
480
+ Template_refer.bigTitle(page_tab === 'hidden' ? `隱形賣場` : `一頁商店`),
481
+ Template_refer.productList(),
482
+ Template_refer.checkoutPage()
483
+ ];
484
+ a.name = page_tab === 'hidden' ? `隱形賣場` : `一頁商店`;
480
485
  callback(a);
481
486
  }
482
487
  else {
@@ -492,140 +497,7 @@ export class BgBlog {
492
497
  res.response.result[0].config.name = dd.template_config.name;
493
498
  res.response.result[0].config.splice(0, 1);
494
499
  res.response.result[0].config.splice(res.response.result[0].config.length - 1, 1);
495
- res.response.result[0].config.push({
496
- "id": "sas5s2s0s1s6s1sf",
497
- "js": "./official_view_component/official.js",
498
- "css": {
499
- "class": {},
500
- "style": {}
501
- },
502
- "data": {
503
- "refer_app": "shop_template_black_style",
504
- "tag": "sy01_checkout_detail",
505
- "list": [],
506
- "carryData": {},
507
- "refer_form_data": {
508
- "carry_info": [{
509
- "index": 0,
510
- "title": "預購商品大約7~21個工作天",
511
- "c_v_id": "s1s9sds9s4s2s4sa",
512
- "toggle": false
513
- }, {
514
- "index": 1,
515
- "title": "現貨商品將於下單後隔天寄出(不包含例假日)",
516
- "c_v_id": "s7s9sbsas4s2s0sc",
517
- "toggle": false
518
- }, {
519
- "index": 2,
520
- "title": "如訂單量較大或是有缺貨狀況,寄出時間將不一定,敬請見諒",
521
- "c_v_id": "s9sbs4sasds6s7s9",
522
- "toggle": false
523
- }, {
524
- "index": 3,
525
- "title": "寄出後大概2至3天會送達指定地點(週末不配送)",
526
- "c_v_id": "s6s4s6s1s4s0s9s9",
527
- "toggle": false
528
- }]
529
- },
530
- "_style_refer_global": { "index": "0" },
531
- "_style_refer": "custom",
532
- "elem": "div",
533
- "inner": "",
534
- "attr": [],
535
- "_padding": {},
536
- "_margin": {},
537
- "_border": {},
538
- "_max_width": "",
539
- "_gap": "",
540
- "_background": "",
541
- "_other": {},
542
- "_radius": "",
543
- "_reverse": "false",
544
- "_hor_position": "center",
545
- "_background_setting": { "type": "none" }
546
- },
547
- "type": "component",
548
- "class": "w-100",
549
- "index": 0,
550
- "label": "一頁購物",
551
- "style": "",
552
- "bundle": {},
553
- "global": [],
554
- "toggle": false,
555
- "stylist": [],
556
- "dataType": "static",
557
- "style_from": "code",
558
- "classDataType": "static",
559
- "preloadEvenet": {},
560
- "share": {},
561
- "refreshAllParameter": {},
562
- "editor_bridge": {},
563
- "refreshComponentParameter": {},
564
- "list": [],
565
- "version": "v2",
566
- "storage": {},
567
- "mobile": {
568
- "id": "sas5s2s0s1s6s1sf",
569
- "js": "./official_view_component/official.js",
570
- "css": {
571
- "class": {},
572
- "style": {}
573
- },
574
- "data": { "refer_app": "shop_template_black_style" },
575
- "type": "component",
576
- "class": "w-100",
577
- "index": 0,
578
- "label": "一頁購物",
579
- "style": "",
580
- "global": [],
581
- "toggle": false,
582
- "stylist": [],
583
- "dataType": "static",
584
- "style_from": "code",
585
- "classDataType": "static",
586
- "preloadEvenet": {},
587
- "refreshAllParameter": {},
588
- "editor_bridge": {},
589
- "refreshComponentParameter": {},
590
- "list": [],
591
- "version": "v2",
592
- "mobile_editable": [],
593
- "desktop_editable": [],
594
- "refer": "custom"
595
- },
596
- "mobile_editable": [],
597
- "desktop": {
598
- "id": "sas5s2s0s1s6s1sf",
599
- "js": "./official_view_component/official.js",
600
- "css": {
601
- "class": {},
602
- "style": {}
603
- },
604
- "data": { "refer_app": "shop_template_black_style" },
605
- "type": "component",
606
- "class": "w-100",
607
- "index": 0,
608
- "label": "一頁購物",
609
- "style": "",
610
- "global": [],
611
- "toggle": false,
612
- "stylist": [],
613
- "dataType": "static",
614
- "style_from": "code",
615
- "classDataType": "static",
616
- "preloadEvenet": {},
617
- "refreshAllParameter": {},
618
- "editor_bridge": {},
619
- "refreshComponentParameter": {},
620
- "list": [],
621
- "version": "v2",
622
- "mobile_editable": [],
623
- "desktop_editable": [],
624
- "refer": "custom"
625
- },
626
- "desktop_editable": [],
627
- "container_fonts": 0
628
- });
500
+ res.response.result[0].config.push(Template_refer.checkoutPage());
629
501
  callback(res.response.result[0].config);
630
502
  });
631
503
  }
@@ -9,6 +9,7 @@ import {MenusSetting} from '../cms-plugin/menus-setting.js';
9
9
  import {BaseApi} from '../glitterBundle/api/base.js';
10
10
  import {BgProduct, OptionsItem} from './bg-product.js';
11
11
  import {CheckInput} from '../modules/checkInput.js';
12
+ import {Template_refer} from "../cms-plugin/template_refer.js";
12
13
 
13
14
  interface MenuItem {
14
15
  link: string;
@@ -515,8 +516,12 @@ export class BgBlog {
515
516
  style="height: 28px;width: 75px;gap:5px;"
516
517
  onclick="${gvc.event(() => {
517
518
  if (dd.tag === 'empty') {
518
- const a: any = [];
519
- (a as any).name = '空白頁面';
519
+ const a: any = [
520
+ Template_refer.bigTitle(page_tab==='hidden' ? `隱形賣場`:`一頁商店`),
521
+ Template_refer.productList(),
522
+ Template_refer.checkoutPage()
523
+ ];
524
+ (a as any).name = page_tab==='hidden' ? `隱形賣場`:`一頁商店`;
520
525
  callback(a);
521
526
  } else {
522
527
  if (dd._config) {
@@ -532,140 +537,7 @@ export class BgBlog {
532
537
  res.response.result[0].config.name = dd.template_config.name;
533
538
  res.response.result[0].config.splice(0, 1)
534
539
  res.response.result[0].config.splice(res.response.result[0].config.length - 1, 1)
535
- res.response.result[0].config.push({
536
- "id": "sas5s2s0s1s6s1sf",
537
- "js": "./official_view_component/official.js",
538
- "css": {
539
- "class": {},
540
- "style": {}
541
- },
542
- "data": {
543
- "refer_app": "shop_template_black_style",
544
- "tag": "sy01_checkout_detail",
545
- "list": [],
546
- "carryData": {},
547
- "refer_form_data": {
548
- "carry_info": [{
549
- "index": 0,
550
- "title": "預購商品大約7~21個工作天",
551
- "c_v_id": "s1s9sds9s4s2s4sa",
552
- "toggle": false
553
- }, {
554
- "index": 1,
555
- "title": "現貨商品將於下單後隔天寄出(不包含例假日)",
556
- "c_v_id": "s7s9sbsas4s2s0sc",
557
- "toggle": false
558
- }, {
559
- "index": 2,
560
- "title": "如訂單量較大或是有缺貨狀況,寄出時間將不一定,敬請見諒",
561
- "c_v_id": "s9sbs4sasds6s7s9",
562
- "toggle": false
563
- }, {
564
- "index": 3,
565
- "title": "寄出後大概2至3天會送達指定地點(週末不配送)",
566
- "c_v_id": "s6s4s6s1s4s0s9s9",
567
- "toggle": false
568
- }]
569
- },
570
- "_style_refer_global": {"index": "0"},
571
- "_style_refer": "custom",
572
- "elem": "div",
573
- "inner": "",
574
- "attr": [],
575
- "_padding": {},
576
- "_margin": {},
577
- "_border": {},
578
- "_max_width": "",
579
- "_gap": "",
580
- "_background": "",
581
- "_other": {},
582
- "_radius": "",
583
- "_reverse": "false",
584
- "_hor_position": "center",
585
- "_background_setting": {"type": "none"}
586
- },
587
- "type": "component",
588
- "class": "w-100",
589
- "index": 0,
590
- "label": "一頁購物",
591
- "style": "",
592
- "bundle": {},
593
- "global": [],
594
- "toggle": false,
595
- "stylist": [],
596
- "dataType": "static",
597
- "style_from": "code",
598
- "classDataType": "static",
599
- "preloadEvenet": {},
600
- "share": {},
601
- "refreshAllParameter": {},
602
- "editor_bridge": {},
603
- "refreshComponentParameter": {},
604
- "list": [],
605
- "version": "v2",
606
- "storage": {},
607
- "mobile": {
608
- "id": "sas5s2s0s1s6s1sf",
609
- "js": "./official_view_component/official.js",
610
- "css": {
611
- "class": {},
612
- "style": {}
613
- },
614
- "data": {"refer_app": "shop_template_black_style"},
615
- "type": "component",
616
- "class": "w-100",
617
- "index": 0,
618
- "label": "一頁購物",
619
- "style": "",
620
- "global": [],
621
- "toggle": false,
622
- "stylist": [],
623
- "dataType": "static",
624
- "style_from": "code",
625
- "classDataType": "static",
626
- "preloadEvenet": {},
627
- "refreshAllParameter": {},
628
- "editor_bridge": {},
629
- "refreshComponentParameter": {},
630
- "list": [],
631
- "version": "v2",
632
- "mobile_editable": [],
633
- "desktop_editable": [],
634
- "refer": "custom"
635
- },
636
- "mobile_editable": [],
637
- "desktop": {
638
- "id": "sas5s2s0s1s6s1sf",
639
- "js": "./official_view_component/official.js",
640
- "css": {
641
- "class": {},
642
- "style": {}
643
- },
644
- "data": {"refer_app": "shop_template_black_style"},
645
- "type": "component",
646
- "class": "w-100",
647
- "index": 0,
648
- "label": "一頁購物",
649
- "style": "",
650
- "global": [],
651
- "toggle": false,
652
- "stylist": [],
653
- "dataType": "static",
654
- "style_from": "code",
655
- "classDataType": "static",
656
- "preloadEvenet": {},
657
- "refreshAllParameter": {},
658
- "editor_bridge": {},
659
- "refreshComponentParameter": {},
660
- "list": [],
661
- "version": "v2",
662
- "mobile_editable": [],
663
- "desktop_editable": [],
664
- "refer": "custom"
665
- },
666
- "desktop_editable": [],
667
- "container_fonts": 0
668
- })
540
+ res.response.result[0].config.push(Template_refer.checkoutPage())
669
541
  callback(res.response.result[0].config);
670
542
  });
671
543
  }
@@ -2,6 +2,7 @@ import { BgWidget } from './bg-widget.js';
2
2
  import { ApiShop } from '../glitter-base/route/shopping.js';
3
3
  import { FilterOptions } from '../cms-plugin/filter-options.js';
4
4
  import { StockList } from '../cms-plugin/shopping-product-stock.js';
5
+ import { ProductConfig } from "../cms-plugin/product-config.js";
5
6
  const html = String.raw;
6
7
  export class BgProduct {
7
8
  static variantsSelector(obj) {
@@ -140,7 +141,8 @@ export class BgProduct {
140
141
  image: opt.image,
141
142
  width: 40,
142
143
  })}
143
- <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
144
+ <div class="tx_normal ${opt.note ? 'mb-1' : ''} d-flex flex-column" style="gap:5px;">
145
+ ${(obj.show_product_type) ? BgWidget.infoInsignia(`來源:${ProductConfig.getName(opt.content)}`) : ''}${opt.value}</div>
144
146
  ${opt.note ? html ` <div class="tx_gray_12">${opt.note}</div> ` : ''}
145
147
  </div>`;
146
148
  },
@@ -196,6 +198,7 @@ export class BgProduct {
196
198
  return {
197
199
  key: product.content.id,
198
200
  value: product.content.title,
201
+ content: product.content,
199
202
  image: (_a = product.content.preview_image[0]) !== null && _a !== void 0 ? _a : BgWidget.noImageURL,
200
203
  };
201
204
  });
@@ -3,6 +3,7 @@ import { BgWidget } from './bg-widget.js';
3
3
  import { ApiShop } from '../glitter-base/route/shopping.js';
4
4
  import { FilterOptions } from '../cms-plugin/filter-options.js';
5
5
  import { StockList } from '../cms-plugin/shopping-product-stock.js';
6
+ import {ProductConfig} from "../cms-plugin/product-config.js";
6
7
 
7
8
  const html = String.raw;
8
9
 
@@ -55,7 +56,7 @@ export class BgProduct {
55
56
  }, 'variantsSelector');
56
57
  }
57
58
 
58
- static productsDialog(obj: { gvc:GVC, title?: string; default: (number | string)[]; callback: (value: any) => void; filter?: (data: any) => boolean; productType?: string; single?: boolean;filter_visible?:string }) {
59
+ static productsDialog(obj: { gvc:GVC, title?: string; default: (number | string)[]; callback: (value: any) => void; filter?: (data: any) => boolean; productType?: string; single?: boolean;filter_visible?:string,show_product_type?:boolean }) {
59
60
  const glitter=(window.parent as any).glitter
60
61
  return (window.parent as any).glitter.innerDialog((gvc: GVC) => {
61
62
  const vm = {
@@ -170,7 +171,8 @@ export class BgProduct {
170
171
  image: opt.image,
171
172
  width: 40,
172
173
  })}
173
- <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
174
+ <div class="tx_normal ${opt.note ? 'mb-1' : ''} d-flex flex-column" style="gap:5px;">
175
+ ${(obj.show_product_type) ? BgWidget.infoInsignia(`來源:${ProductConfig.getName((opt as any).content as any)}`):''}${opt.value}</div>
174
176
  ${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
175
177
  </div>`;
176
178
  },
@@ -236,6 +238,7 @@ export class BgProduct {
236
238
  return {
237
239
  key: product.content.id,
238
240
  value: product.content.title,
241
+ content:product.content,
239
242
  image: product.content.preview_image[0] ?? BgWidget.noImageURL,
240
243
  };
241
244
  });
@@ -0,0 +1,17 @@
1
+ export class ProductConfig {
2
+ static getName(data) {
3
+ if (`${data.visible}` === `false`) {
4
+ return `隱形商品`;
5
+ }
6
+ else if (data.productType.giveaway) {
7
+ return `贈品`;
8
+ }
9
+ else if (data.productType.addProduct) {
10
+ return `加購品`;
11
+ }
12
+ else if (data.productType.product) {
13
+ return `前台商品`;
14
+ }
15
+ return `前台商品`;
16
+ }
17
+ }
@@ -0,0 +1,14 @@
1
+ export class ProductConfig {
2
+ public static getName(data:any){
3
+ if(`${data.visible}`===`false`){
4
+ return `隱形商品`
5
+ }else if(data.productType.giveaway){
6
+ return `贈品`
7
+ }else if(data.productType.addProduct){
8
+ return `加購品`
9
+ }else if(data.productType.product){
10
+ return `前台商品`
11
+ }
12
+ return `前台商品`
13
+ }
14
+ }
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { BgWidget } from '../backend-manager/bg-widget.js';
11
11
  import { ApiUser } from '../glitter-base/route/user.js';
12
12
  import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
13
+ import { ApiShop } from "../glitter-base/route/shopping.js";
13
14
  export class MarketAmerica {
14
15
  static main(gvc) {
15
16
  return (BgWidget.container(gvc.bindView(() => {
@@ -36,10 +37,11 @@ export class MarketAmerica {
36
37
  }
37
38
  const html = String.raw;
38
39
  return [
39
- html `<div class="title-container">
40
- ${BgWidget.title('美安串接')}
41
- <div class="flex-fill"></div>
42
- </div>`,
40
+ html `
41
+ <div class="title-container">
42
+ ${BgWidget.title('美安串接')}
43
+ <div class="flex-fill"></div>
44
+ </div>`,
43
45
  BgWidget.mbContainer(18),
44
46
  BgWidget.mainCard(html `
45
47
  <div class="d-flex flex-column" style="gap:12px;">
@@ -49,10 +51,13 @@ export class MarketAmerica {
49
51
  `),
50
52
  BgWidget.mbContainer(18),
51
53
  BgWidget.container(BgWidget.mainCard([
52
- html `<div class="tx_700">串接綁定</div>`,
54
+ html `
55
+ <div class="tx_700">串接綁定</div>`,
53
56
  BgWidget.editeInput({
54
57
  gvc: gvc,
55
- title: html `<div class="d-flex align-items-center" style="gap:10px;">Offer ID</div>`,
58
+ title: html `
59
+ <div class="d-flex align-items-center" style="gap:10px;">Offer ID
60
+ </div>`,
56
61
  default: vm.data.offer_ID,
57
62
  placeHolder: '請填入Offer ID',
58
63
  callback: (text) => {
@@ -61,7 +66,10 @@ export class MarketAmerica {
61
66
  }),
62
67
  BgWidget.editeInput({
63
68
  gvc: gvc,
64
- title: html `<div class="d-flex align-items-center" style="gap:10px;">Advertiser ID</div>`,
69
+ title: html `
70
+ <div class="d-flex align-items-center" style="gap:10px;">Advertiser
71
+ ID
72
+ </div>`,
65
73
  default: vm.data.advertiser_ID,
66
74
  placeHolder: '請填入Advertiser ID',
67
75
  callback: (text) => {
@@ -70,7 +78,70 @@ export class MarketAmerica {
70
78
  }),
71
79
  BgWidget.editeInput({
72
80
  gvc: gvc,
73
- title: html `<div class="d-flex align-items-center" style="gap:10px;">佣金%數</div>`,
81
+ title: html `
82
+ <div class="d-flex align-items-center" style="gap:10px;">佣金%數
83
+ </div>`,
84
+ default: vm.data.commission,
85
+ type: 'number',
86
+ placeHolder: '請填入佣金%數',
87
+ callback: (text) => {
88
+ vm.data.commission = text;
89
+ },
90
+ }),
91
+ html `
92
+ <div
93
+ onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
94
+ const dialog = new ShareDialog(gvc.glitter);
95
+ const appData = (yield ApiUser.getPublicConfig('store-information', 'manager')).response.value;
96
+ ApiShop.getProduct({
97
+ page: 0,
98
+ limit: 1000,
99
+ search: '',
100
+ }).then((data) => {
101
+ let printData = data.response.data.map((product) => {
102
+ return product.content.variants.map((variant) => {
103
+ var _a, _b;
104
+ return html `
105
+ <Product>
106
+ <SKU>${variant.sku}</SKU>
107
+ <Name>${product.content.title}</Name>
108
+ <Description>${appData.shop_name} - ${product.content.title}</Description>
109
+ <URL>
110
+ ${`https://` + window.parent.glitter.share.editorViewModel.domain + '/products/' + product.content.title}
111
+ </URL>
112
+ <Price>${(_a = variant.compare_price) !== null && _a !== void 0 ? _a : variant.sale_price}</Price>
113
+ <LargeImage>
114
+ ${(_b = variant.preview_image) !== null && _b !== void 0 ? _b : ""}
115
+ </LargeImage>
116
+ <SalePrice>${variant.sale_price}</SalePrice>
117
+ <Category>${product.content.collection.join('')}</Category>
118
+ </Product>
119
+ `;
120
+ }).join('');
121
+ }).join('');
122
+ console.log("printData -- ", printData);
123
+ });
124
+ }))}"
125
+ >
126
+ ${BgWidget.editeInput({
127
+ readonly: true,
128
+ gvc: gvc,
129
+ title: html `
130
+ <div class="d-flex flex-column" style="gap:5px;">
131
+ 產品資料XML
132
+ </div>`,
133
+ default: `https://` + window.parent.glitter.share.editorViewModel.domain + '/tw_shop',
134
+ placeHolder: '',
135
+ callback: (text) => {
136
+ },
137
+ })}
138
+ </div>`,
139
+ BgWidget.editeInput({
140
+ gvc: gvc,
141
+ title: html `
142
+ <div class="d-flex align-items-center" style="gap:10px;">
143
+ 產品資料xml
144
+ </div>`,
74
145
  default: vm.data.commission,
75
146
  type: 'number',
76
147
  placeHolder: '請填入佣金%數',
@@ -79,8 +150,9 @@ export class MarketAmerica {
79
150
  },
80
151
  }),
81
152
  ].join(BgWidget.mbContainer(12)))),
82
- html `<div class="update-bar-container">
83
- ${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
153
+ html `
154
+ <div class="update-bar-container">
155
+ ${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
84
156
  const dialog = new ShareDialog(gvc.glitter);
85
157
  dialog.dataLoading({ visible: true });
86
158
  ApiUser.setPublicConfig({
@@ -93,7 +165,7 @@ export class MarketAmerica {
93
165
  gvc.closeDialog();
94
166
  });
95
167
  })))}
96
- </div>`,
168
+ </div>`,
97
169
  ].join('');
98
170
  },
99
171
  };