ts-glitter 13.8.821 → 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.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-widget.js +123 -20
- package/lowcode/backend-manager/bg-widget.ts +122 -19
- package/lowcode/cms-plugin/shopping-product-setting.js +8 -7
- package/lowcode/cms-plugin/shopping-product-setting.ts +9 -14
- package/lowcode/glitterBundle/plugins/editor-elem.js +1 -0
- package/lowcode/glitterBundle/plugins/editor-elem.ts +1 -0
- package/lowcode/jspage/function-page/main_editor.js +4 -4
- package/lowcode/jspage/function-page/main_editor.ts +4 -4
- package/lowcode/jspage/function-page/setting_editor.js +134 -82
- package/lowcode/jspage/function-page/setting_editor.ts +239 -198
- package/lowcode/public-components/footer/footer-01.js +1 -1
- package/lowcode/public-components/footer/footer-01.ts +1 -1
- package/lowcode/public-components/footer/footer-02.js +1 -1
- package/lowcode/public-components/footer/footer-02.ts +1 -1
- package/lowcode/public-components/footer/footer-03.js +1 -1
- package/lowcode/public-components/footer/footer-03.ts +1 -1
- package/lowcode/public-components/product/pd-card-01.js +14 -5
- package/lowcode/public-components/product/pd-card-01.ts +24 -15
- package/lowcode/public-components/product/pd-card-02.js +15 -5
- package/lowcode/public-components/product/pd-card-02.ts +25 -15
- package/lowcode/public-components/product/pd-card-03.js +15 -5
- package/lowcode/public-components/product/pd-card-03.ts +25 -15
- package/lowcode/public-components/product/product-detail.js +155 -61
- package/lowcode/public-components/product/product-detail.ts +226 -134
- 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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
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
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
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
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
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
|
|
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) => {
|
|
@@ -1880,6 +1880,10 @@ export class ShoppingProductSetting {
|
|
|
1880
1880
|
else {
|
|
1881
1881
|
obj.vm.replaceData = postMD;
|
|
1882
1882
|
}
|
|
1883
|
+
const origin_data = JSON.stringify(postMD);
|
|
1884
|
+
window.parent.glitter.share.checkData = () => {
|
|
1885
|
+
return origin_data === JSON.stringify(postMD);
|
|
1886
|
+
};
|
|
1883
1887
|
const html = String.raw;
|
|
1884
1888
|
const gvc = obj.gvc;
|
|
1885
1889
|
const seoID = gvc.glitter.getUUID();
|
|
@@ -2256,7 +2260,7 @@ export class ShoppingProductSetting {
|
|
|
2256
2260
|
bind: id,
|
|
2257
2261
|
view: () => {
|
|
2258
2262
|
return html `<div
|
|
2259
|
-
class="d-flex justify-content-between align-items-center gap-3
|
|
2263
|
+
class="d-flex justify-content-between align-items-center gap-3 mb-1"
|
|
2260
2264
|
style="cursor: pointer;"
|
|
2261
2265
|
onclick="${gvc.event(() => {
|
|
2262
2266
|
const originContent = `${postMD.content}`;
|
|
@@ -2313,13 +2317,10 @@ export class ShoppingProductSetting {
|
|
|
2313
2317
|
});
|
|
2314
2318
|
})}"
|
|
2315
2319
|
>
|
|
2316
|
-
|
|
2317
|
-
${Tool.truncateString((() => {
|
|
2320
|
+
${(() => {
|
|
2318
2321
|
const text = gvc.glitter.utText.removeTag(postMD.content);
|
|
2319
|
-
return
|
|
2320
|
-
})()
|
|
2321
|
-
</div>
|
|
2322
|
-
<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
|
+
})()}
|
|
2323
2324
|
</div>`;
|
|
2324
2325
|
},
|
|
2325
2326
|
};
|
|
@@ -1572,7 +1572,6 @@ export class ShoppingProductSetting {
|
|
|
1572
1572
|
}) {
|
|
1573
1573
|
const html = String.raw;
|
|
1574
1574
|
let postMD: any = obj.defData;
|
|
1575
|
-
|
|
1576
1575
|
let variant: any = {};
|
|
1577
1576
|
let orignData: any = {};
|
|
1578
1577
|
let index: number = 0;
|
|
@@ -1584,7 +1583,6 @@ export class ShoppingProductSetting {
|
|
|
1584
1583
|
orignData = data;
|
|
1585
1584
|
}
|
|
1586
1585
|
});
|
|
1587
|
-
|
|
1588
1586
|
function checkStore(next: () => void) {
|
|
1589
1587
|
const dialog = new ShareDialog(gvc.glitter);
|
|
1590
1588
|
if (JSON.stringify(orignData) !== JSON.stringify(variant)) {
|
|
@@ -1601,7 +1599,6 @@ export class ShoppingProductSetting {
|
|
|
1601
1599
|
next();
|
|
1602
1600
|
}
|
|
1603
1601
|
}
|
|
1604
|
-
|
|
1605
1602
|
document.querySelector('.pd-w-c')!.scrollTop = 0;
|
|
1606
1603
|
return html` <div class="d-flex" style="font-size: 16px;color:#393939;font-weight: 400;position: relative;padding:0;padding-bottom: ${obj.single ? `0px` : `80px`};">
|
|
1607
1604
|
${BgWidget.container(
|
|
@@ -2213,6 +2210,10 @@ export class ShoppingProductSetting {
|
|
|
2213
2210
|
} else {
|
|
2214
2211
|
obj.vm.replaceData = postMD;
|
|
2215
2212
|
}
|
|
2213
|
+
const origin_data=JSON.stringify(postMD);
|
|
2214
|
+
(window.parent as any).glitter.share.checkData=()=>{
|
|
2215
|
+
return origin_data===JSON.stringify(postMD)
|
|
2216
|
+
}
|
|
2216
2217
|
const html = String.raw;
|
|
2217
2218
|
const gvc = obj.gvc;
|
|
2218
2219
|
const seoID = gvc.glitter.getUUID();
|
|
@@ -2659,7 +2660,7 @@ export class ShoppingProductSetting {
|
|
|
2659
2660
|
bind: id,
|
|
2660
2661
|
view: () => {
|
|
2661
2662
|
return html`<div
|
|
2662
|
-
class="d-flex justify-content-between align-items-center gap-3
|
|
2663
|
+
class="d-flex justify-content-between align-items-center gap-3 mb-1"
|
|
2663
2664
|
style="cursor: pointer;"
|
|
2664
2665
|
onclick="${gvc.event(() => {
|
|
2665
2666
|
const originContent = `${postMD.content}`;
|
|
@@ -2724,16 +2725,10 @@ export class ShoppingProductSetting {
|
|
|
2724
2725
|
});
|
|
2725
2726
|
})}"
|
|
2726
2727
|
>
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
return text.length > 0 ? text : '點擊填寫商品描述';
|
|
2732
|
-
})(),
|
|
2733
|
-
40
|
|
2734
|
-
)}
|
|
2735
|
-
</div>
|
|
2736
|
-
<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
|
+
})()}
|
|
2737
2732
|
</div>`;
|
|
2738
2733
|
},
|
|
2739
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;`
|
|
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.
|
|
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;`
|
|
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.
|
|
1674
|
+
console.error(`${e}${e.stack}${e.line}`);
|
|
1675
1675
|
}
|
|
1676
1676
|
})}"
|
|
1677
1677
|
>
|