ts-glitter 14.4.5 → 14.4.7
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/cms-plugin/shopping-product-setting.js +21 -118
- package/lowcode/cms-plugin/shopping-product-setting.ts +21 -128
- package/lowcode/public-components/footer/footer-01.js +100 -60
- package/lowcode/public-components/footer/footer-01.ts +162 -124
- package/lowcode/public-components/product/pd-card-01.js +0 -1
- package/lowcode/public-components/product/pd-card-01.ts +0 -1
- package/lowcode/public-components/product/pd-card-02.js +0 -1
- package/lowcode/public-components/product/pd-card-02.ts +0 -1
- package/lowcode/public-components/product/pd-card-03.js +0 -1
- package/lowcode/public-components/product/pd-card-03.ts +0 -1
- package/package.json +1 -1
- package/src/api-public/services/shopping.js +9 -2
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +11 -6
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.4.
|
|
73
|
+
glitter.share.editerVersion = 'V_14.4.7';
|
|
74
74
|
glitter.share.start = new Date();
|
|
75
75
|
const vm = {
|
|
76
76
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -73,7 +73,7 @@ export class Entry {
|
|
|
73
73
|
}
|
|
74
74
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
75
75
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
76
|
-
glitter.share.editerVersion = 'V_14.4.
|
|
76
|
+
glitter.share.editerVersion = 'V_14.4.7';
|
|
77
77
|
glitter.share.start = new Date();
|
|
78
78
|
const vm: {
|
|
79
79
|
appConfig: any;
|
|
@@ -1243,8 +1243,8 @@ export class ShoppingProductSetting {
|
|
|
1243
1243
|
active_schedule: {
|
|
1244
1244
|
startDate: this.getDateTime().date,
|
|
1245
1245
|
startTime: this.getDateTime().time,
|
|
1246
|
-
endDate:
|
|
1247
|
-
endTime:
|
|
1246
|
+
endDate: null,
|
|
1247
|
+
endTime: null,
|
|
1248
1248
|
},
|
|
1249
1249
|
};
|
|
1250
1250
|
function setProductType() {
|
|
@@ -1575,10 +1575,6 @@ export class ShoppingProductSetting {
|
|
|
1575
1575
|
return html ` <div class="d-flex align-items-center justify-content-end mb-3">
|
|
1576
1576
|
<div class="d-flex align-items-center gap-2">
|
|
1577
1577
|
<div style="color: #393939; font-weight: 700;">商品描述</div>
|
|
1578
|
-
${BgWidget.aiChatButton({
|
|
1579
|
-
gvc,
|
|
1580
|
-
select: 'writer',
|
|
1581
|
-
})}
|
|
1582
1578
|
</div>
|
|
1583
1579
|
<div class="flex-fill"></div>
|
|
1584
1580
|
<div
|
|
@@ -1712,7 +1708,19 @@ export class ShoppingProductSetting {
|
|
|
1712
1708
|
const originContent = `${postMD.content}`;
|
|
1713
1709
|
BgWidget.fullDialog({
|
|
1714
1710
|
gvc: gvc,
|
|
1715
|
-
title:
|
|
1711
|
+
title: (gvc2) => {
|
|
1712
|
+
return `<div class="d-flex align-items-center" style="gap:10px;">${'商品描述' + BgWidget.aiChatButton({
|
|
1713
|
+
gvc: gvc2,
|
|
1714
|
+
select: 'writer',
|
|
1715
|
+
click: () => {
|
|
1716
|
+
ProductAi.generateRichText(gvc, (text) => {
|
|
1717
|
+
postMD.content += text;
|
|
1718
|
+
gvc.notifyDataChange(vm.id);
|
|
1719
|
+
gvc2.recreateView();
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
})}</div>`;
|
|
1723
|
+
},
|
|
1716
1724
|
innerHTML: (gvc2) => {
|
|
1717
1725
|
return html ` <div>
|
|
1718
1726
|
${EditorElem.richText({
|
|
@@ -3527,113 +3535,7 @@ ${(_c = postMD.seo.content) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
3527
3535
|
}
|
|
3528
3536
|
},
|
|
3529
3537
|
};
|
|
3530
|
-
}))
|
|
3531
|
-
BgWidget.mainCard(html ` <div class="mb-2" style="font-weight: 700;">商品狀態</div>
|
|
3532
|
-
${gvc.bindView((() => {
|
|
3533
|
-
const id = gvc.glitter.getUUID();
|
|
3534
|
-
const inputStyle = 'display: block; width: 200px;';
|
|
3535
|
-
return {
|
|
3536
|
-
bind: id,
|
|
3537
|
-
view: () => {
|
|
3538
|
-
return [
|
|
3539
|
-
BgWidget.select({
|
|
3540
|
-
gvc: obj.gvc,
|
|
3541
|
-
default: postMD.status,
|
|
3542
|
-
options: [
|
|
3543
|
-
{ key: 'active', value: '啟用' },
|
|
3544
|
-
{ key: 'draft', value: '草稿' },
|
|
3545
|
-
{ key: 'schedule', value: '期間限定' },
|
|
3546
|
-
],
|
|
3547
|
-
callback: (text) => {
|
|
3548
|
-
postMD.status = text;
|
|
3549
|
-
gvc.notifyDataChange(id);
|
|
3550
|
-
},
|
|
3551
|
-
}),
|
|
3552
|
-
postMD.status === 'schedule'
|
|
3553
|
-
? html ` <div class="tx_700">啟用期間</div>
|
|
3554
|
-
<div class="d-flex mb-3 ${document.body.clientWidth < 768 ? 'flex-column' : ''}" style="gap: 12px">
|
|
3555
|
-
<div class="d-flex align-items-center">
|
|
3556
|
-
<span class="tx_normal me-2">開始日期</span>
|
|
3557
|
-
${BgWidget.editeInput({
|
|
3558
|
-
gvc: gvc,
|
|
3559
|
-
title: '',
|
|
3560
|
-
type: 'date',
|
|
3561
|
-
style: inputStyle,
|
|
3562
|
-
default: `${postMD.active_schedule.startDate}`,
|
|
3563
|
-
placeHolder: '',
|
|
3564
|
-
callback: (text) => {
|
|
3565
|
-
postMD.active_schedule.startDate = text;
|
|
3566
|
-
},
|
|
3567
|
-
})}
|
|
3568
|
-
</div>
|
|
3569
|
-
<div class="d-flex align-items-center">
|
|
3570
|
-
<span class="tx_normal me-2">開始時間</span>
|
|
3571
|
-
${BgWidget.editeInput({
|
|
3572
|
-
gvc: gvc,
|
|
3573
|
-
title: '',
|
|
3574
|
-
type: 'time',
|
|
3575
|
-
style: inputStyle,
|
|
3576
|
-
default: `${postMD.active_schedule.startTime}`,
|
|
3577
|
-
placeHolder: '',
|
|
3578
|
-
callback: (text) => {
|
|
3579
|
-
postMD.active_schedule.startTime = text;
|
|
3580
|
-
},
|
|
3581
|
-
})}
|
|
3582
|
-
</div>
|
|
3583
|
-
</div>
|
|
3584
|
-
${BgWidget.multiCheckboxContainer(gvc, [
|
|
3585
|
-
{
|
|
3586
|
-
key: 'noEnd',
|
|
3587
|
-
name: '無期限',
|
|
3588
|
-
},
|
|
3589
|
-
{
|
|
3590
|
-
key: 'withEnd',
|
|
3591
|
-
name: '結束時間',
|
|
3592
|
-
innerHtml: html ` <div
|
|
3593
|
-
class="d-flex mt-0 mt-md-1 ${document.body.clientWidth < 768 ? 'flex-column' : ''}"
|
|
3594
|
-
style="gap: 12px"
|
|
3595
|
-
>
|
|
3596
|
-
<div class="d-flex align-items-center">
|
|
3597
|
-
<span class="tx_normal me-2">結束日期</span>
|
|
3598
|
-
${BgWidget.editeInput({
|
|
3599
|
-
gvc: gvc,
|
|
3600
|
-
title: '',
|
|
3601
|
-
type: 'date',
|
|
3602
|
-
style: inputStyle,
|
|
3603
|
-
default: `${postMD.active_schedule.endDate}`,
|
|
3604
|
-
placeHolder: '',
|
|
3605
|
-
callback: (text) => {
|
|
3606
|
-
postMD.active_schedule.endDate = text;
|
|
3607
|
-
},
|
|
3608
|
-
})}
|
|
3609
|
-
</div>
|
|
3610
|
-
<div class="d-flex align-items-center">
|
|
3611
|
-
<span class="tx_normal me-2">結束時間</span>
|
|
3612
|
-
${BgWidget.editeInput({
|
|
3613
|
-
gvc: gvc,
|
|
3614
|
-
title: '',
|
|
3615
|
-
type: 'time',
|
|
3616
|
-
style: inputStyle,
|
|
3617
|
-
default: `${postMD.active_schedule.endTime}`,
|
|
3618
|
-
placeHolder: '',
|
|
3619
|
-
callback: (text) => {
|
|
3620
|
-
postMD.active_schedule.endTime = text;
|
|
3621
|
-
},
|
|
3622
|
-
})}
|
|
3623
|
-
</div>
|
|
3624
|
-
</div>`,
|
|
3625
|
-
},
|
|
3626
|
-
], [postMD.active_schedule.endDate ? `withEnd` : `noEnd`], (text) => {
|
|
3627
|
-
if (text[0] === 'noEnd') {
|
|
3628
|
-
postMD.active_schedule.endDate = undefined;
|
|
3629
|
-
postMD.active_schedule.endTime = undefined;
|
|
3630
|
-
}
|
|
3631
|
-
}, { single: true })}`
|
|
3632
|
-
: '',
|
|
3633
|
-
].join(BgWidget.mbContainer(12));
|
|
3634
|
-
},
|
|
3635
|
-
};
|
|
3636
|
-
})())}`),
|
|
3538
|
+
}))
|
|
3637
3539
|
]
|
|
3638
3540
|
.filter((str) => str.length > 0)
|
|
3639
3541
|
.join(BgWidget.mbContainer(18)),
|
|
@@ -3658,8 +3560,7 @@ ${(_c = postMD.seo.content) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
3658
3560
|
default: postMD.status,
|
|
3659
3561
|
options: [
|
|
3660
3562
|
{ key: 'active', value: '啟用' },
|
|
3661
|
-
{ key: 'draft', value: '草稿' }
|
|
3662
|
-
{ key: 'schedule', value: '期間限定' },
|
|
3563
|
+
{ key: 'draft', value: '草稿' }
|
|
3663
3564
|
],
|
|
3664
3565
|
callback: (text) => {
|
|
3665
3566
|
postMD.status = text;
|
|
@@ -3668,7 +3569,7 @@ ${(_c = postMD.seo.content) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
3668
3569
|
}),
|
|
3669
3570
|
postMD.status === 'schedule'
|
|
3670
3571
|
? html ` <div class="tx_700">啟用期間</div>
|
|
3671
|
-
<div class="d-flex mb-3
|
|
3572
|
+
<div class="d-flex mb-3 flex-column" style="gap: 12px">
|
|
3672
3573
|
<div class="d-flex align-items-center">
|
|
3673
3574
|
<span class="tx_normal me-2">開始日期</span>
|
|
3674
3575
|
${BgWidget.editeInput({
|
|
@@ -3761,6 +3662,8 @@ ${(_c = postMD.seo.content) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
3761
3662
|
return {
|
|
3762
3663
|
key: label.id, value: label.title
|
|
3763
3664
|
};
|
|
3665
|
+
}).concat({
|
|
3666
|
+
key: 'nothing', value: '未設定'
|
|
3764
3667
|
});
|
|
3765
3668
|
console.log("test");
|
|
3766
3669
|
gvc.notifyDataChange(id);
|
|
@@ -3770,7 +3673,7 @@ ${(_c = postMD.seo.content) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
3770
3673
|
view: () => {
|
|
3771
3674
|
return BgWidget.select({
|
|
3772
3675
|
gvc: obj.gvc,
|
|
3773
|
-
default: postMD.label,
|
|
3676
|
+
default: postMD.label || 'nothing',
|
|
3774
3677
|
options: options,
|
|
3775
3678
|
callback: (text) => {
|
|
3776
3679
|
postMD.label = text;
|
|
@@ -1424,8 +1424,8 @@ export class ShoppingProductSetting {
|
|
|
1424
1424
|
active_schedule: {
|
|
1425
1425
|
startDate: this.getDateTime().date,
|
|
1426
1426
|
startTime: this.getDateTime().time,
|
|
1427
|
-
endDate:
|
|
1428
|
-
endTime:
|
|
1427
|
+
endDate: null,
|
|
1428
|
+
endTime: null,
|
|
1429
1429
|
},
|
|
1430
1430
|
};
|
|
1431
1431
|
function setProductType() {
|
|
@@ -1821,10 +1821,6 @@ export class ShoppingProductSetting {
|
|
|
1821
1821
|
return html` <div class="d-flex align-items-center justify-content-end mb-3">
|
|
1822
1822
|
<div class="d-flex align-items-center gap-2">
|
|
1823
1823
|
<div style="color: #393939; font-weight: 700;">商品描述</div>
|
|
1824
|
-
${BgWidget.aiChatButton({
|
|
1825
|
-
gvc,
|
|
1826
|
-
select: 'writer',
|
|
1827
|
-
})}
|
|
1828
1824
|
</div>
|
|
1829
1825
|
<div class="flex-fill"></div>
|
|
1830
1826
|
<div
|
|
@@ -1968,7 +1964,19 @@ export class ShoppingProductSetting {
|
|
|
1968
1964
|
const originContent = `${postMD.content}`;
|
|
1969
1965
|
BgWidget.fullDialog({
|
|
1970
1966
|
gvc: gvc,
|
|
1971
|
-
title:
|
|
1967
|
+
title: (gvc2)=>{
|
|
1968
|
+
return `<div class="d-flex align-items-center" style="gap:10px;">${'商品描述'+BgWidget.aiChatButton({
|
|
1969
|
+
gvc:gvc2,
|
|
1970
|
+
select: 'writer',
|
|
1971
|
+
click:()=>{
|
|
1972
|
+
ProductAi.generateRichText(gvc,(text)=>{
|
|
1973
|
+
postMD.content+=text;
|
|
1974
|
+
gvc.notifyDataChange(vm.id)
|
|
1975
|
+
gvc2.recreateView()
|
|
1976
|
+
})
|
|
1977
|
+
}
|
|
1978
|
+
})}</div>`
|
|
1979
|
+
},
|
|
1972
1980
|
innerHTML: (gvc2) => {
|
|
1973
1981
|
return html` <div>
|
|
1974
1982
|
${EditorElem.richText({
|
|
@@ -3915,123 +3923,7 @@ ${postMD.seo.content ?? ''}</textarea
|
|
|
3915
3923
|
},
|
|
3916
3924
|
};
|
|
3917
3925
|
})
|
|
3918
|
-
)
|
|
3919
|
-
BgWidget.mainCard(
|
|
3920
|
-
html` <div class="mb-2" style="font-weight: 700;">商品狀態</div>
|
|
3921
|
-
${gvc.bindView(
|
|
3922
|
-
(() => {
|
|
3923
|
-
const id = gvc.glitter.getUUID();
|
|
3924
|
-
const inputStyle = 'display: block; width: 200px;';
|
|
3925
|
-
return {
|
|
3926
|
-
bind: id,
|
|
3927
|
-
view: () => {
|
|
3928
|
-
return [
|
|
3929
|
-
BgWidget.select({
|
|
3930
|
-
gvc: obj.gvc,
|
|
3931
|
-
default: postMD.status,
|
|
3932
|
-
options: [
|
|
3933
|
-
{ key: 'active', value: '啟用' },
|
|
3934
|
-
{ key: 'draft', value: '草稿' },
|
|
3935
|
-
{ key: 'schedule', value: '期間限定' },
|
|
3936
|
-
],
|
|
3937
|
-
callback: (text: any) => {
|
|
3938
|
-
postMD.status = text;
|
|
3939
|
-
gvc.notifyDataChange(id);
|
|
3940
|
-
},
|
|
3941
|
-
}),
|
|
3942
|
-
postMD.status === 'schedule'
|
|
3943
|
-
? html` <div class="tx_700">啟用期間</div>
|
|
3944
|
-
<div class="d-flex mb-3 ${document.body.clientWidth < 768 ? 'flex-column' : ''}" style="gap: 12px">
|
|
3945
|
-
<div class="d-flex align-items-center">
|
|
3946
|
-
<span class="tx_normal me-2">開始日期</span>
|
|
3947
|
-
${BgWidget.editeInput({
|
|
3948
|
-
gvc: gvc,
|
|
3949
|
-
title: '',
|
|
3950
|
-
type: 'date',
|
|
3951
|
-
style: inputStyle,
|
|
3952
|
-
default: `${postMD.active_schedule.startDate}`,
|
|
3953
|
-
placeHolder: '',
|
|
3954
|
-
callback: (text) => {
|
|
3955
|
-
postMD.active_schedule.startDate = text;
|
|
3956
|
-
},
|
|
3957
|
-
})}
|
|
3958
|
-
</div>
|
|
3959
|
-
<div class="d-flex align-items-center">
|
|
3960
|
-
<span class="tx_normal me-2">開始時間</span>
|
|
3961
|
-
${BgWidget.editeInput({
|
|
3962
|
-
gvc: gvc,
|
|
3963
|
-
title: '',
|
|
3964
|
-
type: 'time',
|
|
3965
|
-
style: inputStyle,
|
|
3966
|
-
default: `${postMD.active_schedule.startTime}`,
|
|
3967
|
-
placeHolder: '',
|
|
3968
|
-
callback: (text) => {
|
|
3969
|
-
postMD.active_schedule.startTime = text;
|
|
3970
|
-
},
|
|
3971
|
-
})}
|
|
3972
|
-
</div>
|
|
3973
|
-
</div>
|
|
3974
|
-
${BgWidget.multiCheckboxContainer(
|
|
3975
|
-
gvc,
|
|
3976
|
-
[
|
|
3977
|
-
{
|
|
3978
|
-
key: 'noEnd',
|
|
3979
|
-
name: '無期限',
|
|
3980
|
-
},
|
|
3981
|
-
{
|
|
3982
|
-
key: 'withEnd',
|
|
3983
|
-
name: '結束時間',
|
|
3984
|
-
innerHtml: html` <div
|
|
3985
|
-
class="d-flex mt-0 mt-md-1 ${document.body.clientWidth < 768 ? 'flex-column' : ''}"
|
|
3986
|
-
style="gap: 12px"
|
|
3987
|
-
>
|
|
3988
|
-
<div class="d-flex align-items-center">
|
|
3989
|
-
<span class="tx_normal me-2">結束日期</span>
|
|
3990
|
-
${BgWidget.editeInput({
|
|
3991
|
-
gvc: gvc,
|
|
3992
|
-
title: '',
|
|
3993
|
-
type: 'date',
|
|
3994
|
-
style: inputStyle,
|
|
3995
|
-
default: `${postMD.active_schedule.endDate}`,
|
|
3996
|
-
placeHolder: '',
|
|
3997
|
-
callback: (text) => {
|
|
3998
|
-
postMD.active_schedule.endDate = text;
|
|
3999
|
-
},
|
|
4000
|
-
})}
|
|
4001
|
-
</div>
|
|
4002
|
-
<div class="d-flex align-items-center">
|
|
4003
|
-
<span class="tx_normal me-2">結束時間</span>
|
|
4004
|
-
${BgWidget.editeInput({
|
|
4005
|
-
gvc: gvc,
|
|
4006
|
-
title: '',
|
|
4007
|
-
type: 'time',
|
|
4008
|
-
style: inputStyle,
|
|
4009
|
-
default: `${postMD.active_schedule.endTime}`,
|
|
4010
|
-
placeHolder: '',
|
|
4011
|
-
callback: (text) => {
|
|
4012
|
-
postMD.active_schedule.endTime = text;
|
|
4013
|
-
},
|
|
4014
|
-
})}
|
|
4015
|
-
</div>
|
|
4016
|
-
</div>`,
|
|
4017
|
-
},
|
|
4018
|
-
],
|
|
4019
|
-
[postMD.active_schedule.endDate ? `withEnd` : `noEnd`],
|
|
4020
|
-
(text) => {
|
|
4021
|
-
if (text[0] === 'noEnd') {
|
|
4022
|
-
postMD.active_schedule.endDate = undefined;
|
|
4023
|
-
postMD.active_schedule.endTime = undefined;
|
|
4024
|
-
}
|
|
4025
|
-
},
|
|
4026
|
-
{ single: true }
|
|
4027
|
-
)}`
|
|
4028
|
-
: '',
|
|
4029
|
-
].join(BgWidget.mbContainer(12));
|
|
4030
|
-
},
|
|
4031
|
-
};
|
|
4032
|
-
})()
|
|
4033
|
-
)}`
|
|
4034
|
-
),
|
|
3926
|
+
)
|
|
4035
3927
|
]
|
|
4036
3928
|
.filter((str) => str.length > 0)
|
|
4037
3929
|
.join(BgWidget.mbContainer(18)),
|
|
@@ -4061,8 +3953,7 @@ ${postMD.seo.content ?? ''}</textarea
|
|
|
4061
3953
|
default: postMD.status,
|
|
4062
3954
|
options: [
|
|
4063
3955
|
{ key: 'active', value: '啟用' },
|
|
4064
|
-
{ key: 'draft', value: '草稿' }
|
|
4065
|
-
{ key: 'schedule', value: '期間限定' },
|
|
3956
|
+
{ key: 'draft', value: '草稿' }
|
|
4066
3957
|
],
|
|
4067
3958
|
callback: (text: any) => {
|
|
4068
3959
|
postMD.status = text;
|
|
@@ -4071,7 +3962,7 @@ ${postMD.seo.content ?? ''}</textarea
|
|
|
4071
3962
|
}),
|
|
4072
3963
|
postMD.status === 'schedule'
|
|
4073
3964
|
? html` <div class="tx_700">啟用期間</div>
|
|
4074
|
-
<div class="d-flex mb-3
|
|
3965
|
+
<div class="d-flex mb-3 flex-column" style="gap: 12px">
|
|
4075
3966
|
<div class="d-flex align-items-center">
|
|
4076
3967
|
<span class="tx_normal me-2">開始日期</span>
|
|
4077
3968
|
${BgWidget.editeInput({
|
|
@@ -4173,6 +4064,8 @@ ${postMD.seo.content ?? ''}</textarea
|
|
|
4173
4064
|
return {
|
|
4174
4065
|
key: label.id, value: label.title
|
|
4175
4066
|
}
|
|
4067
|
+
}).concat({
|
|
4068
|
+
key:'nothing',value:'未設定'
|
|
4176
4069
|
})
|
|
4177
4070
|
console.log("test")
|
|
4178
4071
|
gvc.notifyDataChange(id)
|
|
@@ -4182,7 +4075,7 @@ ${postMD.seo.content ?? ''}</textarea
|
|
|
4182
4075
|
view: () => {
|
|
4183
4076
|
return BgWidget.select({
|
|
4184
4077
|
gvc: obj.gvc,
|
|
4185
|
-
default: postMD.label,
|
|
4078
|
+
default: postMD.label || 'nothing',
|
|
4186
4079
|
options:options,
|
|
4187
4080
|
callback: (text: any) => {
|
|
4188
4081
|
postMD.label = text;
|