ts-glitter 13.8.822 → 13.8.823

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 (27) hide show
  1. package/lowcode/Entry.js +1 -1
  2. package/lowcode/Entry.ts +1 -1
  3. package/lowcode/backend-manager/bg-widget.js +123 -20
  4. package/lowcode/backend-manager/bg-widget.ts +122 -19
  5. package/lowcode/cms-plugin/shopping-product-setting.js +4 -7
  6. package/lowcode/cms-plugin/shopping-product-setting.ts +5 -11
  7. package/lowcode/glitterBundle/plugins/editor-elem.js +1 -0
  8. package/lowcode/glitterBundle/plugins/editor-elem.ts +1 -0
  9. package/lowcode/jspage/function-page/main_editor.js +4 -4
  10. package/lowcode/jspage/function-page/main_editor.ts +4 -4
  11. package/lowcode/jspage/function-page/setting_editor.js +3 -3
  12. package/lowcode/jspage/function-page/setting_editor.ts +2 -2
  13. package/lowcode/public-components/footer/footer-01.js +1 -1
  14. package/lowcode/public-components/footer/footer-01.ts +1 -1
  15. package/lowcode/public-components/footer/footer-02.js +1 -1
  16. package/lowcode/public-components/footer/footer-02.ts +1 -1
  17. package/lowcode/public-components/footer/footer-03.js +1 -1
  18. package/lowcode/public-components/footer/footer-03.ts +1 -1
  19. package/lowcode/public-components/product/pd-card-01.js +14 -5
  20. package/lowcode/public-components/product/pd-card-01.ts +24 -15
  21. package/lowcode/public-components/product/pd-card-02.js +15 -5
  22. package/lowcode/public-components/product/pd-card-02.ts +25 -15
  23. package/lowcode/public-components/product/pd-card-03.js +15 -5
  24. package/lowcode/public-components/product/pd-card-03.ts +25 -15
  25. package/lowcode/public-components/product/product-detail.js +155 -61
  26. package/lowcode/public-components/product/product-detail.ts +226 -134
  27. package/package.json +1 -1
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_13.8.822';
73
+ glitter.share.editerVersion = 'V_13.8.823';
74
74
  glitter.share.start = new Date();
75
75
  const vm = {
76
76
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -71,7 +71,7 @@ export class Entry {
71
71
  }
72
72
  (window as any).renderClock = (window as any).renderClock ?? clockF();
73
73
  console.log(`Entry-time:`, (window as any).renderClock.stop());
74
- glitter.share.editerVersion = 'V_13.8.822';
74
+ glitter.share.editerVersion = 'V_13.8.823';
75
75
  glitter.share.start = new Date();
76
76
  const vm: {
77
77
  appConfig: any;
@@ -1881,6 +1881,76 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
1881
1881
  },
1882
1882
  });
1883
1883
  }
1884
+ static richTextView(text) {
1885
+ return html `<div style="width: 100%; height: 150px; position: relative; background: white; border-radius: 10px; overflow: hidden; border: 1px #DDDDDD solid">
1886
+ <div
1887
+ style="left: 18px; right: 18px; top: 59px; position: absolute; color: ${text.length > 0
1888
+ ? '#393939'
1889
+ : '#8D8D8D'}; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
1890
+ >
1891
+ ${text.length > 0 ? text : '點擊填寫商品描述及說明'}
1892
+ </div>
1893
+ <div
1894
+ style="width: 100%; padding-top: 10px; padding-bottom: 10px; padding-left: 18px; padding-right: 18px; left: 0px; top: 0px; position: absolute; background: white; border-top-left-radius: 10px; border-top-right-radius: 10px; overflow: hidden; border-bottom: 1px #DDDDDD solid; justify-content: flex-start; align-items: center; display: inline-flex"
1895
+ >
1896
+ <div style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 24px; display: inline-flex">
1897
+ <div style="justify-content: flex-start; align-items: center; gap: 44px; display: flex">
1898
+ <div style="color: #393939; font-size: 14px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word">段落</div>
1899
+ <svg xmlns="http://www.w3.org/2000/svg" width="9" height="5" viewBox="0 0 9 5" fill="none">
1900
+ <path d="M8 1L4.5 4L1 1" stroke="#393939" stroke-linecap="round" stroke-linejoin="round" />
1901
+ </svg>
1902
+ </div>
1903
+ <div style="width: 0px; height: 16px; border-radius: 1px; border: 1px #8D8D8D solid"></div>
1904
+ <div style="justify-content: flex-start; align-items: center; gap: 16px; display: flex">
1905
+ <div style="width: 12px; position: relative">
1906
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="15" viewBox="0 0 12 15" fill="none">
1907
+ <path
1908
+ d="M0 2.25C0 1.76602 0.446875 1.375 1 1.375H2.5H3H7C9.20938 1.375 11 2.9418 11 4.875C11 5.73086 10.6469 6.51836 10.0625 7.12539C11.2219 7.73789 12 8.85078 12 10.125C12 12.0582 10.2094 13.625 8 13.625H3H2.5H1C0.446875 13.625 0 13.234 0 12.75C0 12.266 0.446875 11.875 1 11.875H1.5V7.5V3.125H1C0.446875 3.125 0 2.73398 0 2.25ZM7 6.625C8.10312 6.625 9 5.84023 9 4.875C9 3.90977 8.10312 3.125 7 3.125H3.5V6.625H7ZM3.5 8.375V11.875H8C9.10312 11.875 10 11.0902 10 10.125C10 9.15977 9.10312 8.375 8 8.375H7H3.5Z"
1909
+ fill="#393939"
1910
+ />
1911
+ </svg>
1912
+ </div>
1913
+ <div style="width: 12px; position: relative">
1914
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="15" viewBox="0 0 12 15" fill="none">
1915
+ <g clip-path="url(#clip0_9874_190584)">
1916
+ <path
1917
+ d="M0.163923 2.25C0.163923 1.76602 0.546959 1.375 1.02107 1.375H3.59249C4.0666 1.375 4.44964 1.76602 4.44964 2.25C4.44964 2.73398 4.0666 3.125 3.59249 3.125H3.16392V6.625C3.16392 8.07422 4.31571 9.25 5.73535 9.25C7.15499 9.25 8.30678 8.07422 8.30678 6.625V3.125H7.87821C7.4041 3.125 7.02107 2.73398 7.02107 2.25C7.02107 1.76602 7.4041 1.375 7.87821 1.375H10.4496C10.9237 1.375 11.3068 1.76602 11.3068 2.25C11.3068 2.73398 10.9237 3.125 10.4496 3.125H10.0211V6.625C10.0211 9.04219 8.10321 11 5.73535 11C3.36749 11 1.44964 9.04219 1.44964 6.625V3.125H1.02107C0.546959 3.125 0.163923 2.73398 0.163923 2.25ZM-0.264648 12.75C-0.264648 12.266 0.118387 11.875 0.592494 11.875H10.8782C11.3523 11.875 11.7354 12.266 11.7354 12.75C11.7354 13.234 11.3523 13.625 10.8782 13.625H0.592494C0.118387 13.625 -0.264648 13.234 -0.264648 12.75Z"
1918
+ fill="#393939"
1919
+ />
1920
+ </g>
1921
+ <defs>
1922
+ <clipPath id="clip0_9874_190584">
1923
+ <rect width="12" height="14" fill="white" transform="translate(0 0.5)" />
1924
+ </clipPath>
1925
+ </defs>
1926
+ </svg>
1927
+ </div>
1928
+ <div style="width: 14px; position: relative">
1929
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none">
1930
+ <path
1931
+ d="M4.41055 4.43771C4.49805 3.96739 4.79336 3.61466 5.33203 3.38224C5.90898 3.13614 6.74844 3.04591 7.75469 3.2045C8.08008 3.25646 9.08906 3.45333 9.39805 3.53263C9.86563 3.65568 10.3441 3.3795 10.4699 2.91192C10.5957 2.44435 10.3168 1.96583 9.84922 1.84005C9.4582 1.73614 8.38359 1.52833 8.02812 1.47364C6.80586 1.28224 5.61367 1.3588 4.6457 1.77169C3.64766 2.19825 2.88477 2.99669 2.68242 4.1588C2.67969 4.17521 2.67695 4.18888 2.67695 4.20528C2.60039 4.8588 2.69062 5.45216 2.95312 5.97169C3.07617 6.21778 3.23203 6.4338 3.40977 6.62521H0.875C0.391016 6.62521 0 7.01622 0 7.50021C0 7.98419 0.391016 8.37521 0.875 8.37521H13.125C13.609 8.37521 14 7.98419 14 7.50021C14 7.01622 13.609 6.62521 13.125 6.62521H7.38555C7.38281 6.62521 7.37734 6.62247 7.37461 6.62247L7.34453 6.61427C6.36016 6.31896 5.56172 6.07833 5.01484 5.70919C4.76055 5.53693 4.60469 5.36466 4.51719 5.18692C4.43242 5.02013 4.375 4.78771 4.41328 4.43771H4.41055ZM9.54023 9.72052C9.61406 9.89825 9.66055 10.1525 9.59219 10.5436C9.51016 11.0248 9.21484 11.3858 8.66523 11.6209C8.08828 11.867 7.25156 11.9572 6.24531 11.7986C5.75312 11.7193 4.90273 11.4295 4.21094 11.1943C4.05781 11.1424 3.91016 11.0932 3.77617 11.0467C3.3168 10.8936 2.82187 11.1424 2.66875 11.6018C2.51562 12.0611 2.76445 12.5561 3.22383 12.7092C3.32227 12.742 3.43984 12.783 3.57109 12.8268C4.25195 13.0592 5.31016 13.4201 5.96641 13.5268H5.97187C7.19414 13.7182 8.38633 13.6416 9.3543 13.2287C10.3523 12.8022 11.1152 12.0037 11.3176 10.8416C11.416 10.2674 11.3914 9.73693 11.2328 9.25294H9.16289C9.3543 9.40607 9.47461 9.55919 9.54297 9.72325L9.54023 9.72052Z"
1932
+ fill="#393939"
1933
+ />
1934
+ </svg>
1935
+ </div>
1936
+ </div>
1937
+ <div style="width: 0px; height: 16px; border-radius: 1px; border: 1px #8D8D8D solid"></div>
1938
+ <div style="justify-content: flex-start; align-items: center; gap: 8px; display: flex">
1939
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none">
1940
+ <path
1941
+ d="M9 1.5C9 2.05313 8.55312 2.5 8 2.5H1C0.446875 2.5 0 2.05313 0 1.5C0 0.946875 0.446875 0.5 1 0.5H8C8.55312 0.5 9 0.946875 9 1.5ZM9 9.5C9 10.0531 8.55312 10.5 8 10.5H1C0.446875 10.5 0 10.0531 0 9.5C0 8.94688 0.446875 8.5 1 8.5H8C8.55312 8.5 9 8.94688 9 9.5ZM0 5.5C0 4.94688 0.446875 4.5 1 4.5H13C13.5531 4.5 14 4.94688 14 5.5C14 6.05313 13.5531 6.5 13 6.5H1C0.446875 6.5 0 6.05313 0 5.5ZM14 13.5C14 14.0531 13.5531 14.5 13 14.5H1C0.446875 14.5 0 14.0531 0 13.5C0 12.9469 0.446875 12.5 1 12.5H13C13.5531 12.5 14 12.9469 14 13.5Z"
1942
+ fill="#393939"
1943
+ />
1944
+ </svg>
1945
+ <svg xmlns="http://www.w3.org/2000/svg" width="9" height="5" viewBox="0 0 9 5" fill="none">
1946
+ <path d="M8 1L4.5 4L1 1" stroke="#393939" stroke-linecap="round" stroke-linejoin="round" />
1947
+ </svg>
1948
+ </div>
1949
+ <div style="width: 0px; height: 16px; border-radius: 1px; border: 1px #8D8D8D solid"></div>
1950
+ </div>
1951
+ </div>
1952
+ </div>`;
1953
+ }
1884
1954
  static selectFilter(obj) {
1885
1955
  var _a;
1886
1956
  return html `<select
@@ -2601,7 +2671,12 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
2601
2671
  id: obj.gvc.glitter.getUUID(),
2602
2672
  loading: false,
2603
2673
  };
2604
- return html ` <div class="bg-white shadow ${document.body.clientWidth < 800 ? `` : `rounded-3`}" style="overflow-y: auto; width: calc(100% - ${document.body.clientWidth > 768 ? 70 : 0}px); ${document.body.clientWidth > 768 ? `height: calc(100% - 70px);` : `height:${window.parent.innerHeight}px;`};padding-top:${gvc.glitter.share.top_inset || 0}px;">
2674
+ return html ` <div
2675
+ class="bg-white shadow ${document.body.clientWidth < 800 ? `` : `rounded-3`}"
2676
+ style="overflow-y: auto; width: calc(100% - ${document.body.clientWidth > 768 ? 70 : 0}px); ${document.body.clientWidth > 768
2677
+ ? `height: calc(100% - 70px);`
2678
+ : `height:${window.parent.innerHeight}px;`};padding-top:${gvc.glitter.share.top_inset || 0}px;"
2679
+ >
2605
2680
  ${gvc.bindView({
2606
2681
  bind: vm.id,
2607
2682
  view: () => {
@@ -2718,36 +2793,64 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
2718
2793
  var _a, _b;
2719
2794
  const imageVM = {
2720
2795
  id: obj.gvc.glitter.getUUID(),
2721
- class: Tool.randomString(6),
2722
2796
  loading: true,
2723
2797
  url: this.noImageURL,
2724
2798
  };
2725
- obj.gvc.addStyle(`
2726
- .${imageVM.class} {
2727
- display: flex;
2728
- min-width: ${obj.width}px;
2729
- min-height: ${(_a = obj.height) !== null && _a !== void 0 ? _a : obj.width}px;
2730
- max-width: ${obj.width}px;
2731
- max-height: ${(_b = obj.height) !== null && _b !== void 0 ? _b : obj.width}px;
2732
- }
2733
- `);
2799
+ const wh = `
2800
+ display: flex;
2801
+ min-width: ${obj.width}px;
2802
+ min-height: ${(_a = obj.height) !== null && _a !== void 0 ? _a : obj.width}px;
2803
+ max-width: ${obj.width}px;
2804
+ max-height: ${(_b = obj.height) !== null && _b !== void 0 ? _b : obj.width}px; */
2805
+ width: 100%;
2806
+ height: 100%;
2807
+ object-fit: cover;
2808
+ object-position: center;
2809
+ `;
2734
2810
  return obj.gvc.bindView({
2735
2811
  bind: imageVM.id,
2736
2812
  view: () => {
2737
- var _a, _b, _c, _d;
2738
2813
  if (imageVM.loading) {
2739
- return html ` <div class="${imageVM.class} ${(_a = obj.class) !== null && _a !== void 0 ? _a : ''}" style="${(_b = obj.style) !== null && _b !== void 0 ? _b : ''}">
2740
- ${this.spinner({
2741
- container: { class: 'mt-0' },
2742
- text: { visible: false },
2743
- })}
2744
- </div>`;
2814
+ return obj.gvc.bindView(() => {
2815
+ var _a, _b;
2816
+ return {
2817
+ bind: obj.gvc.glitter.getUUID(),
2818
+ view: () => {
2819
+ return this.spinner({
2820
+ container: { class: 'mt-0' },
2821
+ text: { visible: false },
2822
+ });
2823
+ },
2824
+ divCreate: {
2825
+ style: `${wh}${(_a = obj.style) !== null && _a !== void 0 ? _a : ''}`,
2826
+ class: (_b = obj.class) !== null && _b !== void 0 ? _b : '',
2827
+ },
2828
+ };
2829
+ });
2745
2830
  }
2746
2831
  else {
2747
- return html `<img class="${imageVM.class} ${(_c = obj.class) !== null && _c !== void 0 ? _c : ''}" style="${(_d = obj.style) !== null && _d !== void 0 ? _d : ''}" src="${imageVM.url}" />`;
2832
+ return obj.gvc.bindView(() => {
2833
+ var _a, _b;
2834
+ return {
2835
+ bind: obj.gvc.glitter.getUUID(),
2836
+ view: () => {
2837
+ return '';
2838
+ },
2839
+ divCreate: {
2840
+ elem: 'img',
2841
+ style: `${wh}${(_a = obj.style) !== null && _a !== void 0 ? _a : ''}`,
2842
+ class: (_b = obj.class) !== null && _b !== void 0 ? _b : '',
2843
+ option: [
2844
+ {
2845
+ key: 'src',
2846
+ value: imageVM.url,
2847
+ },
2848
+ ],
2849
+ },
2850
+ };
2851
+ });
2748
2852
  }
2749
2853
  },
2750
- divCreate: {},
2751
2854
  onCreate: () => {
2752
2855
  if (imageVM.loading) {
2753
2856
  this.isImageUrlValid(obj.image).then((isValid) => {
@@ -2246,6 +2246,77 @@ ${obj.default ?? ''}</textarea
2246
2246
  });
2247
2247
  }
2248
2248
 
2249
+ static richTextView(text: string) {
2250
+ return html`<div style="width: 100%; height: 150px; position: relative; background: white; border-radius: 10px; overflow: hidden; border: 1px #DDDDDD solid">
2251
+ <div
2252
+ style="left: 18px; right: 18px; top: 59px; position: absolute; color: ${text.length > 0
2253
+ ? '#393939'
2254
+ : '#8D8D8D'}; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
2255
+ >
2256
+ ${text.length > 0 ? text : '點擊填寫商品描述及說明'}
2257
+ </div>
2258
+ <div
2259
+ style="width: 100%; padding-top: 10px; padding-bottom: 10px; padding-left: 18px; padding-right: 18px; left: 0px; top: 0px; position: absolute; background: white; border-top-left-radius: 10px; border-top-right-radius: 10px; overflow: hidden; border-bottom: 1px #DDDDDD solid; justify-content: flex-start; align-items: center; display: inline-flex"
2260
+ >
2261
+ <div style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 24px; display: inline-flex">
2262
+ <div style="justify-content: flex-start; align-items: center; gap: 44px; display: flex">
2263
+ <div style="color: #393939; font-size: 14px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word">段落</div>
2264
+ <svg xmlns="http://www.w3.org/2000/svg" width="9" height="5" viewBox="0 0 9 5" fill="none">
2265
+ <path d="M8 1L4.5 4L1 1" stroke="#393939" stroke-linecap="round" stroke-linejoin="round" />
2266
+ </svg>
2267
+ </div>
2268
+ <div style="width: 0px; height: 16px; border-radius: 1px; border: 1px #8D8D8D solid"></div>
2269
+ <div style="justify-content: flex-start; align-items: center; gap: 16px; display: flex">
2270
+ <div style="width: 12px; position: relative">
2271
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="15" viewBox="0 0 12 15" fill="none">
2272
+ <path
2273
+ d="M0 2.25C0 1.76602 0.446875 1.375 1 1.375H2.5H3H7C9.20938 1.375 11 2.9418 11 4.875C11 5.73086 10.6469 6.51836 10.0625 7.12539C11.2219 7.73789 12 8.85078 12 10.125C12 12.0582 10.2094 13.625 8 13.625H3H2.5H1C0.446875 13.625 0 13.234 0 12.75C0 12.266 0.446875 11.875 1 11.875H1.5V7.5V3.125H1C0.446875 3.125 0 2.73398 0 2.25ZM7 6.625C8.10312 6.625 9 5.84023 9 4.875C9 3.90977 8.10312 3.125 7 3.125H3.5V6.625H7ZM3.5 8.375V11.875H8C9.10312 11.875 10 11.0902 10 10.125C10 9.15977 9.10312 8.375 8 8.375H7H3.5Z"
2274
+ fill="#393939"
2275
+ />
2276
+ </svg>
2277
+ </div>
2278
+ <div style="width: 12px; position: relative">
2279
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="15" viewBox="0 0 12 15" fill="none">
2280
+ <g clip-path="url(#clip0_9874_190584)">
2281
+ <path
2282
+ d="M0.163923 2.25C0.163923 1.76602 0.546959 1.375 1.02107 1.375H3.59249C4.0666 1.375 4.44964 1.76602 4.44964 2.25C4.44964 2.73398 4.0666 3.125 3.59249 3.125H3.16392V6.625C3.16392 8.07422 4.31571 9.25 5.73535 9.25C7.15499 9.25 8.30678 8.07422 8.30678 6.625V3.125H7.87821C7.4041 3.125 7.02107 2.73398 7.02107 2.25C7.02107 1.76602 7.4041 1.375 7.87821 1.375H10.4496C10.9237 1.375 11.3068 1.76602 11.3068 2.25C11.3068 2.73398 10.9237 3.125 10.4496 3.125H10.0211V6.625C10.0211 9.04219 8.10321 11 5.73535 11C3.36749 11 1.44964 9.04219 1.44964 6.625V3.125H1.02107C0.546959 3.125 0.163923 2.73398 0.163923 2.25ZM-0.264648 12.75C-0.264648 12.266 0.118387 11.875 0.592494 11.875H10.8782C11.3523 11.875 11.7354 12.266 11.7354 12.75C11.7354 13.234 11.3523 13.625 10.8782 13.625H0.592494C0.118387 13.625 -0.264648 13.234 -0.264648 12.75Z"
2283
+ fill="#393939"
2284
+ />
2285
+ </g>
2286
+ <defs>
2287
+ <clipPath id="clip0_9874_190584">
2288
+ <rect width="12" height="14" fill="white" transform="translate(0 0.5)" />
2289
+ </clipPath>
2290
+ </defs>
2291
+ </svg>
2292
+ </div>
2293
+ <div style="width: 14px; position: relative">
2294
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none">
2295
+ <path
2296
+ d="M4.41055 4.43771C4.49805 3.96739 4.79336 3.61466 5.33203 3.38224C5.90898 3.13614 6.74844 3.04591 7.75469 3.2045C8.08008 3.25646 9.08906 3.45333 9.39805 3.53263C9.86563 3.65568 10.3441 3.3795 10.4699 2.91192C10.5957 2.44435 10.3168 1.96583 9.84922 1.84005C9.4582 1.73614 8.38359 1.52833 8.02812 1.47364C6.80586 1.28224 5.61367 1.3588 4.6457 1.77169C3.64766 2.19825 2.88477 2.99669 2.68242 4.1588C2.67969 4.17521 2.67695 4.18888 2.67695 4.20528C2.60039 4.8588 2.69062 5.45216 2.95312 5.97169C3.07617 6.21778 3.23203 6.4338 3.40977 6.62521H0.875C0.391016 6.62521 0 7.01622 0 7.50021C0 7.98419 0.391016 8.37521 0.875 8.37521H13.125C13.609 8.37521 14 7.98419 14 7.50021C14 7.01622 13.609 6.62521 13.125 6.62521H7.38555C7.38281 6.62521 7.37734 6.62247 7.37461 6.62247L7.34453 6.61427C6.36016 6.31896 5.56172 6.07833 5.01484 5.70919C4.76055 5.53693 4.60469 5.36466 4.51719 5.18692C4.43242 5.02013 4.375 4.78771 4.41328 4.43771H4.41055ZM9.54023 9.72052C9.61406 9.89825 9.66055 10.1525 9.59219 10.5436C9.51016 11.0248 9.21484 11.3858 8.66523 11.6209C8.08828 11.867 7.25156 11.9572 6.24531 11.7986C5.75312 11.7193 4.90273 11.4295 4.21094 11.1943C4.05781 11.1424 3.91016 11.0932 3.77617 11.0467C3.3168 10.8936 2.82187 11.1424 2.66875 11.6018C2.51562 12.0611 2.76445 12.5561 3.22383 12.7092C3.32227 12.742 3.43984 12.783 3.57109 12.8268C4.25195 13.0592 5.31016 13.4201 5.96641 13.5268H5.97187C7.19414 13.7182 8.38633 13.6416 9.3543 13.2287C10.3523 12.8022 11.1152 12.0037 11.3176 10.8416C11.416 10.2674 11.3914 9.73693 11.2328 9.25294H9.16289C9.3543 9.40607 9.47461 9.55919 9.54297 9.72325L9.54023 9.72052Z"
2297
+ fill="#393939"
2298
+ />
2299
+ </svg>
2300
+ </div>
2301
+ </div>
2302
+ <div style="width: 0px; height: 16px; border-radius: 1px; border: 1px #8D8D8D solid"></div>
2303
+ <div style="justify-content: flex-start; align-items: center; gap: 8px; display: flex">
2304
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none">
2305
+ <path
2306
+ d="M9 1.5C9 2.05313 8.55312 2.5 8 2.5H1C0.446875 2.5 0 2.05313 0 1.5C0 0.946875 0.446875 0.5 1 0.5H8C8.55312 0.5 9 0.946875 9 1.5ZM9 9.5C9 10.0531 8.55312 10.5 8 10.5H1C0.446875 10.5 0 10.0531 0 9.5C0 8.94688 0.446875 8.5 1 8.5H8C8.55312 8.5 9 8.94688 9 9.5ZM0 5.5C0 4.94688 0.446875 4.5 1 4.5H13C13.5531 4.5 14 4.94688 14 5.5C14 6.05313 13.5531 6.5 13 6.5H1C0.446875 6.5 0 6.05313 0 5.5ZM14 13.5C14 14.0531 13.5531 14.5 13 14.5H1C0.446875 14.5 0 14.0531 0 13.5C0 12.9469 0.446875 12.5 1 12.5H13C13.5531 12.5 14 12.9469 14 13.5Z"
2307
+ fill="#393939"
2308
+ />
2309
+ </svg>
2310
+ <svg xmlns="http://www.w3.org/2000/svg" width="9" height="5" viewBox="0 0 9 5" fill="none">
2311
+ <path d="M8 1L4.5 4L1 1" stroke="#393939" stroke-linecap="round" stroke-linejoin="round" />
2312
+ </svg>
2313
+ </div>
2314
+ <div style="width: 0px; height: 16px; border-radius: 1px; border: 1px #8D8D8D solid"></div>
2315
+ </div>
2316
+ </div>
2317
+ </div>`;
2318
+ }
2319
+
2249
2320
  // 視窗
2250
2321
  static selectFilter(obj: { gvc: GVC; callback: (value: any) => void; default: string; options: OptionsItem[]; style?: string }) {
2251
2322
  return html`<select
@@ -3067,7 +3138,12 @@ ${obj.default ?? ''}</textarea
3067
3138
  loading: false,
3068
3139
  };
3069
3140
 
3070
- return html` <div class="bg-white shadow ${document.body.clientWidth<800 ? ``:`rounded-3`}" style="overflow-y: auto; width: calc(100% - ${document.body.clientWidth > 768 ? 70 : 0}px); ${document.body.clientWidth > 768 ? `height: calc(100% - 70px);`:`height:${(window.parent as any).innerHeight}px;`};padding-top:${gvc.glitter.share.top_inset || 0}px;">
3141
+ return html` <div
3142
+ class="bg-white shadow ${document.body.clientWidth < 800 ? `` : `rounded-3`}"
3143
+ style="overflow-y: auto; width: calc(100% - ${document.body.clientWidth > 768 ? 70 : 0}px); ${document.body.clientWidth > 768
3144
+ ? `height: calc(100% - 70px);`
3145
+ : `height:${(window.parent as any).innerHeight}px;`};padding-top:${gvc.glitter.share.top_inset || 0}px;"
3146
+ >
3071
3147
  ${gvc.bindView({
3072
3148
  bind: vm.id,
3073
3149
  view: () => {
@@ -3194,34 +3270,61 @@ ${obj.default ?? ''}</textarea
3194
3270
  static validImageBox(obj: { gvc: GVC; image: string; width: number; height?: number; class?: string; style?: string }) {
3195
3271
  const imageVM = {
3196
3272
  id: obj.gvc.glitter.getUUID(),
3197
- class: Tool.randomString(6),
3198
3273
  loading: true,
3199
3274
  url: this.noImageURL,
3200
3275
  };
3201
- obj.gvc.addStyle(`
3202
- .${imageVM.class} {
3203
- display: flex;
3204
- min-width: ${obj.width}px;
3205
- min-height: ${obj.height ?? obj.width}px;
3206
- max-width: ${obj.width}px;
3207
- max-height: ${obj.height ?? obj.width}px;
3208
- }
3209
- `);
3276
+ const wh = `
3277
+ display: flex;
3278
+ min-width: ${obj.width}px;
3279
+ min-height: ${obj.height ?? obj.width}px;
3280
+ max-width: ${obj.width}px;
3281
+ max-height: ${obj.height ?? obj.width}px; */
3282
+ width: 100%;
3283
+ height: 100%;
3284
+ object-fit: cover;
3285
+ object-position: center;
3286
+ `;
3210
3287
  return obj.gvc.bindView({
3211
3288
  bind: imageVM.id,
3212
3289
  view: () => {
3213
3290
  if (imageVM.loading) {
3214
- return html` <div class="${imageVM.class} ${obj.class ?? ''}" style="${obj.style ?? ''}">
3215
- ${this.spinner({
3216
- container: { class: 'mt-0' },
3217
- text: { visible: false },
3218
- })}
3219
- </div>`;
3291
+ return obj.gvc.bindView(() => {
3292
+ return {
3293
+ bind: obj.gvc.glitter.getUUID(),
3294
+ view: () => {
3295
+ return this.spinner({
3296
+ container: { class: 'mt-0' },
3297
+ text: { visible: false },
3298
+ });
3299
+ },
3300
+ divCreate: {
3301
+ style: `${wh}${obj.style ?? ''}`,
3302
+ class: obj.class ?? '',
3303
+ },
3304
+ };
3305
+ });
3220
3306
  } else {
3221
- return html`<img class="${imageVM.class} ${obj.class ?? ''}" style="${obj.style ?? ''}" src="${imageVM.url}" />`;
3307
+ return obj.gvc.bindView(() => {
3308
+ return {
3309
+ bind: obj.gvc.glitter.getUUID(),
3310
+ view: () => {
3311
+ return '';
3312
+ },
3313
+ divCreate: {
3314
+ elem: 'img',
3315
+ style: `${wh}${obj.style ?? ''}`,
3316
+ class: obj.class ?? '',
3317
+ option: [
3318
+ {
3319
+ key: 'src',
3320
+ value: imageVM.url,
3321
+ },
3322
+ ],
3323
+ },
3324
+ };
3325
+ });
3222
3326
  }
3223
3327
  },
3224
- divCreate: {},
3225
3328
  onCreate: () => {
3226
3329
  if (imageVM.loading) {
3227
3330
  this.isImageUrlValid(obj.image).then((isValid) => {
@@ -2260,7 +2260,7 @@ export class ShoppingProductSetting {
2260
2260
  bind: id,
2261
2261
  view: () => {
2262
2262
  return html `<div
2263
- class="d-flex justify-content-between align-items-center gap-3 px-2 mb-1"
2263
+ class="d-flex justify-content-between align-items-center gap-3 mb-1"
2264
2264
  style="cursor: pointer;"
2265
2265
  onclick="${gvc.event(() => {
2266
2266
  const originContent = `${postMD.content}`;
@@ -2317,13 +2317,10 @@ export class ShoppingProductSetting {
2317
2317
  });
2318
2318
  })}"
2319
2319
  >
2320
- <div style="word-break: break-all;">
2321
- ${Tool.truncateString((() => {
2320
+ ${(() => {
2322
2321
  const text = gvc.glitter.utText.removeTag(postMD.content);
2323
- return text.length > 0 ? text : '點擊填寫商品描述';
2324
- })(), 40)}
2325
- </div>
2326
- <i class="fa-solid fa-angle-right" style="font-size: 1.25rem; font-weight: 700;"></i>
2322
+ return BgWidget.richTextView(Tool.truncateString(text, 100));
2323
+ })()}
2327
2324
  </div>`;
2328
2325
  },
2329
2326
  };
@@ -2660,7 +2660,7 @@ export class ShoppingProductSetting {
2660
2660
  bind: id,
2661
2661
  view: () => {
2662
2662
  return html`<div
2663
- class="d-flex justify-content-between align-items-center gap-3 px-2 mb-1"
2663
+ class="d-flex justify-content-between align-items-center gap-3 mb-1"
2664
2664
  style="cursor: pointer;"
2665
2665
  onclick="${gvc.event(() => {
2666
2666
  const originContent = `${postMD.content}`;
@@ -2725,16 +2725,10 @@ export class ShoppingProductSetting {
2725
2725
  });
2726
2726
  })}"
2727
2727
  >
2728
- <div style="word-break: break-all;">
2729
- ${Tool.truncateString(
2730
- (() => {
2731
- const text = gvc.glitter.utText.removeTag(postMD.content);
2732
- return text.length > 0 ? text : '點擊填寫商品描述';
2733
- })(),
2734
- 40
2735
- )}
2736
- </div>
2737
- <i class="fa-solid fa-angle-right" style="font-size: 1.25rem; font-weight: 700;"></i>
2728
+ ${(() => {
2729
+ const text = gvc.glitter.utText.removeTag(postMD.content);
2730
+ return BgWidget.richTextView(Tool.truncateString(text, 100));
2731
+ })()}
2738
2732
  </div>`;
2739
2733
  },
2740
2734
  };
@@ -1039,6 +1039,7 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1039
1039
  },
1040
1040
  key: 'hWA2C-7I2B2C4B3E4E2G3wd1DBKSPF1WKTUCQOa1OURPJ1KDe2F-11D2C2D2D2C3B3C1D6B1C2==',
1041
1041
  });
1042
+ glitter.share.fid = editor;
1042
1043
  if (glitter.document.querySelector(`.${richID}-loading`)) {
1043
1044
  glitter.document.querySelector(`.${richID}-loading`).remove();
1044
1045
  }
@@ -1193,6 +1193,7 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1193
1193
  },
1194
1194
  key: 'hWA2C-7I2B2C4B3E4E2G3wd1DBKSPF1WKTUCQOa1OURPJ1KDe2F-11D2C2D2D2C3B3C1D6B1C2==',
1195
1195
  });
1196
+ glitter.share.fid=editor;
1196
1197
  if (glitter.document.querySelector(`.${richID}-loading`) as any) {
1197
1198
  (glitter.document.querySelector(`.${richID}-loading`) as any).remove();
1198
1199
  }
@@ -393,7 +393,6 @@ export class Main_editor {
393
393
  function swapElements(element, target) {
394
394
  const container = element.parentNode;
395
395
  if (container.children.length !== target) {
396
- console.log(`index==>${Array.from(container.children).indexOf(element)}length===>${container.children.length}===target===>${target}`);
397
396
  if (!(Array.from(container.children).indexOf(element) > target)) {
398
397
  target++;
399
398
  }
@@ -1289,7 +1288,7 @@ export class Main_editor {
1289
1288
  ? `d-flex align-items-center justify-content-center flex-column mx-auto` : `d-flex align-items-center justify-content-center flex-column `,
1290
1289
  style: (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
1291
1290
  ? ``
1292
- : `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
1291
+ : `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `100%`});height: ${Storage.select_function === 'backend-manger' ? window.parent.innerHeight - 56 : window.innerHeight - (EditorConfig.getPaddingTop(gvc)) - 56}px;overflow:hidden;`
1293
1292
  };
1294
1293
  }
1295
1294
  };
@@ -1323,7 +1322,8 @@ export class Main_editor {
1323
1322
  class: Storage.view_type === ViewType.mobile && (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
1324
1323
  ? `d-flex align-items-center justify-content-center flex-column mx-auto` : `d-flex align-items-center justify-content-center flex-column`,
1325
1324
  style: Storage.view_type === ViewType.mobile && (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
1326
- ? `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `414px`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;` : `width: calc(${(document.body.clientWidth < 800) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
1325
+ ? `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `414px`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;`
1326
+ : `width: calc(${(document.body.clientWidth < 800) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
1327
1327
  };
1328
1328
  }
1329
1329
  };
@@ -1574,7 +1574,7 @@ ${dd.value === vm.select ? `background:linear-gradient(135deg, #667eea 0%, #764b
1574
1574
  }
1575
1575
  catch (e) {
1576
1576
  dialog.errorMessage({ text: '代碼輸入錯誤' });
1577
- console.log(`${e}${e.stack}${e.line}`);
1577
+ console.error(`${e}${e.stack}${e.line}`);
1578
1578
  }
1579
1579
  })}"
1580
1580
  >
@@ -421,7 +421,6 @@ export class Main_editor {
421
421
  const container = element.parentNode;
422
422
 
423
423
  if (container.children.length !== target) {
424
- console.log(`index==>${Array.from(container.children).indexOf(element)}length===>${container.children.length}===target===>${target}`)
425
424
  if (!(Array.from(container.children).indexOf(element) > target)) {
426
425
  target++
427
426
  }
@@ -1362,7 +1361,7 @@ export class Main_editor {
1362
1361
  ? `d-flex align-items-center justify-content-center flex-column mx-auto` : `d-flex align-items-center justify-content-center flex-column `,
1363
1362
  style: (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
1364
1363
  ? ``
1365
- : `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
1364
+ : `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `100%`});height: ${Storage.select_function === 'backend-manger' ? window.parent.innerHeight - 56 : window.innerHeight - (EditorConfig.getPaddingTop(gvc)) - 56}px;overflow:hidden;`
1366
1365
  }
1367
1366
  }
1368
1367
  }
@@ -1397,7 +1396,8 @@ export class Main_editor {
1397
1396
  class: Storage.view_type === ViewType.mobile && (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
1398
1397
  ? `d-flex align-items-center justify-content-center flex-column mx-auto` : `d-flex align-items-center justify-content-center flex-column`,
1399
1398
  style: Storage.view_type === ViewType.mobile && (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
1400
- ? `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `414px`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;` : `width: calc(${(document.body.clientWidth < 800) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
1399
+ ? `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `414px`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;`
1400
+ : `width: calc(${(document.body.clientWidth < 800) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
1401
1401
  }
1402
1402
  }
1403
1403
  }
@@ -1671,7 +1671,7 @@ ${dd.value === vm.select ? `background:linear-gradient(135deg, #667eea 0%, #764b
1671
1671
  glitter.htmlGenerate.saveEvent();
1672
1672
  } catch (e: any) {
1673
1673
  dialog.errorMessage({text: '代碼輸入錯誤'});
1674
- console.log(`${e}${e.stack}${e.line}`);
1674
+ console.error(`${e}${e.stack}${e.line}`);
1675
1675
  }
1676
1676
  })}"
1677
1677
  >
@@ -241,7 +241,7 @@ export class Setting_editor {
241
241
  class="w-100 fw-500 d-flex align-items-center fs-6 hoverBtn h_item rounded px-2 tx_700
242
242
  ${(_b = (_a = dd === null || dd === void 0 ? void 0 : dd.info) === null || _a === void 0 ? void 0 : _a.guideClass) !== null && _b !== void 0 ? _b : ''} ${dd.type === 'container' ? ` mainRow${index}` : ''}"
243
243
  style="gap:7px;color:#393939;${dd.toggle ? `border-radius: 5px;background: #F2F2F2;` : ``}"
244
- onclick="${gvc.event(() => {
244
+ onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
245
245
  if (dd.type === 'container') {
246
246
  list.map((d1) => {
247
247
  d1.toggle = false;
@@ -256,13 +256,13 @@ export class Setting_editor {
256
256
  glitter.share.switch_to_web_builder('index-mobile', 'mobile');
257
257
  return;
258
258
  }
259
- if (click_item(dd.index) && ['page_layout', 'dev_mode'].indexOf(items[parseInt(dd.index)].page) === -1) {
259
+ if ((yield click_item(dd.index)) && ['page_layout', 'dev_mode'].indexOf(items[parseInt(dd.index)].page) === -1) {
260
260
  dd.toggle = true;
261
261
  refreshContainer();
262
262
  }
263
263
  glitter.closeDrawer();
264
264
  }
265
- })}"
265
+ }))}"
266
266
  >
267
267
  ${dd.icon ? html `<img src="${dd.icon}"
268
268
  style="width:18px;height:18px;"/>` : ``}
@@ -884,7 +884,7 @@ export class Setting_editor {
884
884
  class="w-100 fw-500 d-flex align-items-center fs-6 hoverBtn h_item rounded px-2 tx_700
885
885
  ${dd?.info?.guideClass ?? ''} ${dd.type === 'container' ? ` mainRow${index}` : ''}"
886
886
  style="gap:7px;color:#393939;${dd.toggle ? `border-radius: 5px;background: #F2F2F2;` : ``}"
887
- onclick="${gvc.event(() => {
887
+ onclick="${gvc.event(async () => {
888
888
  if (dd.type === 'container') {
889
889
  list.map((d1: any) => {
890
890
  d1.toggle = false;
@@ -899,7 +899,7 @@ export class Setting_editor {
899
899
  return;
900
900
  }
901
901
  // app-design
902
- if (click_item(dd.index) && ['page_layout', 'dev_mode'].indexOf(items[parseInt(dd.index)].page) === -1) {
902
+ if (await click_item(dd.index) && ['page_layout', 'dev_mode'].indexOf(items[parseInt(dd.index)].page) === -1) {
903
903
  dd.toggle = true;
904
904
  refreshContainer();
905
905
  }
@@ -79,7 +79,7 @@ export class Footer01 {
79
79
  color: ${colors.content};
80
80
  }
81
81
  `);
82
- return html ` <footer class="f-bgr">
82
+ return html ` <footer class="f-bgr border-top">
83
83
  <div class="border-gray-700 f-padding-top">
84
84
  <div class="container">
85
85
  <div class="row py-sm-5 f-container">
@@ -95,7 +95,7 @@ export class Footer01 {
95
95
  }
96
96
  `);
97
97
 
98
- return html` <footer class="f-bgr">
98
+ return html` <footer class="f-bgr border-top">
99
99
  <div class="border-gray-700 f-padding-top">
100
100
  <div class="container">
101
101
  <div class="row py-sm-5 f-container">
@@ -80,7 +80,7 @@ export class Footer02 {
80
80
  color: ${colors.content};
81
81
  }
82
82
  `);
83
- return html `<footer class="f-bgr">
83
+ return html `<footer class="f-bgr border-top">
84
84
  <div class="border-gray-700 pt-4 pt-md-0">
85
85
  <div class="container">
86
86
  <div class="row py-sm-5 f-container">