ts-glitter 18.2.6 → 18.2.8
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 +30 -1
- package/lowcode/Entry.ts +36 -1
- package/lowcode/cms-plugin/customer-message-user.js +503 -8
- package/lowcode/cms-plugin/customer-message-user.ts +549 -12
- package/lowcode/cms-plugin/shopping-finance-setting.js +4 -4
- package/lowcode/cms-plugin/shopping-finance-setting.ts +4 -4
- package/lowcode/cms-plugin/shopping-information.js +16 -0
- package/lowcode/cms-plugin/shopping-information.ts +16 -0
- package/lowcode/cms-plugin/shopping-order-manager.js +138 -77
- package/lowcode/cms-plugin/shopping-order-manager.ts +177 -102
- package/lowcode/glitter-base/global/language.js +6 -0
- package/lowcode/glitter-base/global/language.ts +6 -0
- package/lowcode/glitterBundle/GVController.js +2 -2
- package/lowcode/glitterBundle/GVController.ts +2 -2
- package/lowcode/glitterBundle/dialog/dialog_inner.js +5 -2
- package/lowcode/glitterBundle/dialog/dialog_inner.ts +5 -2
- package/lowcode/glitterBundle/module/Animation.js +59 -0
- package/lowcode/glitterBundle/module/Animation.ts +62 -0
- package/lowcode/glitterBundle/module/PageManager.js +3 -3
- package/lowcode/glitterBundle/module/PageManager.ts +1 -1
- package/lowcode/index.html +1 -0
- package/lowcode/public-components/checkout/index.js +77 -117
- package/lowcode/public-components/checkout/index.ts +174 -221
- package/lowcode/public-components/footer/footer-01.js +3 -0
- package/lowcode/public-components/footer/footer-01.ts +3 -0
- package/lowcode/public-components/footer/footer-02.js +3 -0
- package/lowcode/public-components/footer/footer-02.ts +3 -0
- package/lowcode/public-components/footer/footer-03.js +3 -0
- package/lowcode/public-components/footer/footer-03.ts +3 -0
- package/lowcode/public-components/product/pd-class.js +868 -355
- package/lowcode/public-components/product/pd-class.ts +1005 -438
- package/lowcode/public-components/product/product-detail.js +1 -1
- package/lowcode/public-components/product/product-detail.ts +3 -1
- package/package.json +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/delivery.js.map +1 -1
- package/src/api-public/controllers/delivery.ts +2 -0
- package/src/api-public/controllers/shop.js +3 -2
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +4 -3
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/financial-service.d.ts +4 -0
- package/src/api-public/services/financial-service.js +48 -23
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +57 -26
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/shopping.js +7 -0
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +9 -0
- package/src/api-public/services/user.d.ts +2 -2
- package/src/api-public/services/user.js +8 -2
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +8 -2
- package/src/index.js +3 -3
- package/src/index.js.map +1 -1
|
@@ -75,21 +75,32 @@ interface ViewModel {
|
|
|
75
75
|
filter_type: 'normal' | 'block' | 'pos';
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
interface EcCashFlow {
|
|
79
|
+
HandlingCharge: string,
|
|
80
|
+
PaymentType: 'ATM_CHINATRUST' | 'Credit_CreditCard',
|
|
81
|
+
PaymentDate: string,
|
|
82
|
+
TradeStatus: '0' | '1' | '10200095',
|
|
83
|
+
TradeAmt: string,
|
|
84
|
+
TradeNo: string,
|
|
85
|
+
credit_receipt: any
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface PayNowCashFlow {
|
|
89
|
+
amount: number,
|
|
90
|
+
status: string,
|
|
91
|
+
payment: {
|
|
92
|
+
paymentMethod: 'ATM' | 'CreditCard' | 'ConvenienceStore',
|
|
93
|
+
paidAt: string
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
78
97
|
interface OrderData {
|
|
79
98
|
id: number;
|
|
80
99
|
cart_token: string;
|
|
81
100
|
status: number;
|
|
82
101
|
email: string;
|
|
83
102
|
orderData: {
|
|
84
|
-
cash_flow?:
|
|
85
|
-
HandlingCharge: string,
|
|
86
|
-
PaymentType: 'ATM_CHINATRUST' | 'Credit_CreditCard',
|
|
87
|
-
PaymentDate: string,
|
|
88
|
-
TradeStatus: '0' | '1' | '10200095',
|
|
89
|
-
TradeAmt: string,
|
|
90
|
-
TradeNo: string,
|
|
91
|
-
credit_receipt: any
|
|
92
|
-
},
|
|
103
|
+
cash_flow?: EcCashFlow | PayNowCashFlow,
|
|
93
104
|
distribution_info?: {
|
|
94
105
|
code: string;
|
|
95
106
|
condition: number;
|
|
@@ -150,7 +161,7 @@ interface OrderData {
|
|
|
150
161
|
CVSAddress: string;
|
|
151
162
|
note?: string;
|
|
152
163
|
code_note?: string;
|
|
153
|
-
shipment_detail?:any;
|
|
164
|
+
shipment_detail?: any;
|
|
154
165
|
};
|
|
155
166
|
custom_receipt_form?: any;
|
|
156
167
|
custom_form_format?: any;
|
|
@@ -1543,9 +1554,21 @@ export class ShoppingOrderManager {
|
|
|
1543
1554
|
},
|
|
1544
1555
|
],
|
|
1545
1556
|
callback: (text) => {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1557
|
+
const dialog=new ShareDialog(gvc.glitter)
|
|
1558
|
+
dialog.checkYesOrNot({
|
|
1559
|
+
text:'是否確認變更付款狀態?',
|
|
1560
|
+
callback:(response)=>{
|
|
1561
|
+
if(response){
|
|
1562
|
+
if (text && text !== `${orderData.status}`) {
|
|
1563
|
+
orderData.status = parseInt(text, 10);
|
|
1564
|
+
saveEvent();
|
|
1565
|
+
}
|
|
1566
|
+
}else{
|
|
1567
|
+
gvc.notifyDataChange(mainViewID)
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
})
|
|
1571
|
+
|
|
1549
1572
|
},
|
|
1550
1573
|
})}
|
|
1551
1574
|
</div>
|
|
@@ -1558,75 +1581,123 @@ export class ShoppingOrderManager {
|
|
|
1558
1581
|
</div>
|
|
1559
1582
|
${ShoppingOrderManager.getProofPurchaseString(orderData.orderData, gvc)}
|
|
1560
1583
|
</div>`,
|
|
1561
|
-
(
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1584
|
+
(() => {
|
|
1585
|
+
if ((orderData.orderData.customer_info.payment_select === 'ecPay')) {
|
|
1586
|
+
const cash_flow = orderData.orderData.cash_flow as EcCashFlow
|
|
1587
|
+
return html`
|
|
1588
|
+
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
|
|
1589
|
+
<div class="tx_700">金流對帳
|
|
1590
|
+
</div>
|
|
1591
|
+
<div> ${
|
|
1592
|
+
(cash_flow.TradeStatus === '1' ? [
|
|
1593
|
+
`<div class="d-flex align-items-center">
|
|
1594
|
+
金流交易結果: ${(cash_flow.credit_receipt && cash_flow.credit_receipt.status) || '已付款'} <button class="btn btn-gray rounded-2 ms-2 ${(cash_flow.PaymentType.toLowerCase().includes('credit') && (cash_flow.credit_receipt && cash_flow.credit_receipt.status === '已授權')) ? `` : `d-none`}" type="button" style="height:22px;" onclick="${gvc.event(() => {
|
|
1595
|
+
const doalog = new ShareDialog(gvc.glitter)
|
|
1596
|
+
doalog.checkYesOrNot({
|
|
1597
|
+
text: '是否確認退刷交易?',
|
|
1598
|
+
callback: (response) => {
|
|
1599
|
+
if (response) {
|
|
1600
|
+
doalog.dataLoading({visible: true})
|
|
1601
|
+
ApiShop.ecPayBrushOrders({
|
|
1602
|
+
tradNo: cash_flow.TradeNo,
|
|
1603
|
+
orderID: orderData.cart_token,
|
|
1604
|
+
total: cash_flow.TradeAmt
|
|
1605
|
+
}).then((res) => {
|
|
1606
|
+
doalog.dataLoading({visible: false})
|
|
1607
|
+
orderData.status = -2;
|
|
1608
|
+
saveEvent()
|
|
1609
|
+
})
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
})
|
|
1586
1613
|
|
|
1587
|
-
|
|
1614
|
+
})}">
|
|
1588
1615
|
<span class=" tx_700" style="font-size:13px;">退刷</span>
|
|
1589
1616
|
</button>
|
|
1590
1617
|
</div>`,
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1618
|
+
`金流交易方式: ${
|
|
1619
|
+
[
|
|
1620
|
+
{
|
|
1621
|
+
title: 'WebATM',
|
|
1622
|
+
key: 'WebATM'
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
title: 'ATM',
|
|
1626
|
+
key: 'ATM'
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
title: '超商代碼',
|
|
1630
|
+
key: 'CVS'
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
title: '超商條碼',
|
|
1634
|
+
key: 'BARCODE'
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
title: '信用卡',
|
|
1638
|
+
key: 'Credit'
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
title: '未知付款方式',
|
|
1642
|
+
key: ''
|
|
1643
|
+
}
|
|
1644
|
+
].find((dd) => {
|
|
1645
|
+
return cash_flow.PaymentType.toLowerCase().includes(dd.key.toLowerCase())
|
|
1646
|
+
})?.title
|
|
1647
|
+
}`,
|
|
1648
|
+
`交易手續費: ${cash_flow.HandlingCharge}`,
|
|
1649
|
+
`交易總金額: ${cash_flow.TradeAmt}`,
|
|
1650
|
+
`交易時間: ${cash_flow.PaymentDate}`
|
|
1651
|
+
] : [
|
|
1652
|
+
`金流交易結果: 未付款`
|
|
1653
|
+
]).join(`<div class="my-2"></div>`)
|
|
1654
|
+
}
|
|
1655
|
+
</div>
|
|
1656
|
+
</div>`
|
|
1657
|
+
} else if (orderData.orderData.customer_info.payment_select === 'paynow') {
|
|
1658
|
+
const cash_flow = orderData.orderData.cash_flow as PayNowCashFlow
|
|
1659
|
+
|
|
1660
|
+
return html`
|
|
1661
|
+
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
|
|
1662
|
+
<div class="tx_700">金流對帳
|
|
1663
|
+
</div>
|
|
1664
|
+
<div> ${
|
|
1665
|
+
(cash_flow.status === 'success' ? [
|
|
1666
|
+
html`
|
|
1667
|
+
<div class="d-flex align-items-center">
|
|
1668
|
+
金流交易結果: 已付款
|
|
1669
|
+
</div>`,
|
|
1670
|
+
html`金流交易方式: ${
|
|
1671
|
+
[
|
|
1672
|
+
{
|
|
1673
|
+
title: 'ATM',
|
|
1674
|
+
key: 'ATM'
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
title: '信用卡',
|
|
1678
|
+
key: 'CreditCard'
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
title: '超商代碼',
|
|
1682
|
+
key: 'ConvenienceStore'
|
|
1683
|
+
}
|
|
1684
|
+
].find((dd) => {
|
|
1685
|
+
return cash_flow.payment.paymentMethod === dd.key
|
|
1686
|
+
})?.title
|
|
1687
|
+
}`,
|
|
1688
|
+
`交易總金額: ${cash_flow.amount}`,
|
|
1689
|
+
`交易時間: ${gvc.glitter.ut.dateFormat(new Date(cash_flow.payment.paidAt),'yyyy-MM-dd hh:mm:ss')}`
|
|
1690
|
+
] : [
|
|
1691
|
+
`金流交易結果: 未付款`
|
|
1692
|
+
]).join(`<div class="my-2"></div>`)
|
|
1693
|
+
}
|
|
1694
|
+
</div>
|
|
1695
|
+
</div>
|
|
1696
|
+
`
|
|
1697
|
+
} else {
|
|
1698
|
+
return ``
|
|
1699
|
+
}
|
|
1700
|
+
})()
|
|
1630
1701
|
].filter((dd) => {
|
|
1631
1702
|
return dd
|
|
1632
1703
|
}).join(BgWidget.mbContainer(18))
|
|
@@ -1830,31 +1901,31 @@ export class ShoppingOrderManager {
|
|
|
1830
1901
|
})}
|
|
1831
1902
|
</div>
|
|
1832
1903
|
|
|
1833
|
-
${(()=>{
|
|
1834
|
-
|
|
1904
|
+
${(() => {
|
|
1905
|
+
try {
|
|
1835
1906
|
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1907
|
+
if (ShipmentConfig.supportPrintList.includes(orderData.orderData.user_info.shipment) && ((orderData.orderData.user_info.shipment_number && orderData.orderData.user_info.shipment_refer === 'paynow'))) {
|
|
1908
|
+
return html`
|
|
1909
|
+
${BgWidget.mbContainer(12)}
|
|
1910
|
+
<div class="tx_700 d-flex align-items-end"
|
|
1911
|
+
style="gap:5px;">
|
|
1912
|
+
物流追蹤
|
|
1913
|
+
</div>
|
|
1914
|
+
${BgWidget.mbContainer(12)}
|
|
1915
|
+
${
|
|
1916
|
+
[
|
|
1917
|
+
`狀態: ${orderData.orderData.user_info.shipment_detail.Detail_Status_Description ?? '追蹤異常'}`,
|
|
1918
|
+
`追蹤碼: ${orderData.orderData.user_info.shipment_detail.paymentno ?? '尚未生成'}`
|
|
1919
|
+
].join(`<div class="w-100 my-1"></div>`)
|
|
1920
|
+
}
|
|
1921
|
+
`
|
|
1922
|
+
} else {
|
|
1923
|
+
return ``
|
|
1924
|
+
}
|
|
1925
|
+
} catch (e) {
|
|
1926
|
+
console.log(e)
|
|
1927
|
+
return `${e}`
|
|
1928
|
+
}
|
|
1858
1929
|
})()}
|
|
1859
1930
|
`,
|
|
1860
1931
|
html` ${['UNIMARTC2C', 'FAMIC2C', 'OKMARTC2C', 'HILIFEC2C', 'normal', 'UNIMARTFREEZE', 'black_cat', 'black_cat_freezing'].includes(orderData.orderData.user_info.shipment)
|
|
@@ -4423,6 +4494,10 @@ export class ShoppingOrderManager {
|
|
|
4423
4494
|
`
|
|
4424
4495
|
}
|
|
4425
4496
|
switch (orderData.customer_info.payment_select) {
|
|
4497
|
+
case 'jkopay':
|
|
4498
|
+
return '街口支付'
|
|
4499
|
+
case 'paynow':
|
|
4500
|
+
return `PayNow立吉富`
|
|
4426
4501
|
case 'off_line':
|
|
4427
4502
|
return `線下付款`;
|
|
4428
4503
|
case 'newWebPay':
|
|
@@ -135,6 +135,7 @@ export class Language {
|
|
|
135
135
|
{ key: 'country', tw: '國家', cn: '国家', en: `Country` },
|
|
136
136
|
{ key: 'select_country', tw: '選擇國家', cn: '选择国家', en: `Select country` },
|
|
137
137
|
{ key: 'stock_count', tw: '商品庫存', cn: '商品库存', en: `Stock quantity` },
|
|
138
|
+
{ key: 'can_buy', tw: '可售數量', cn: '可售数量', en: `Available quantity` },
|
|
138
139
|
{ key: 'login_in_to_checkout', tw: '登入後結帳', cn: '登入后结帐', en: `Log in and checkout` },
|
|
139
140
|
{ key: 'birth', tw: '生日', cn: '生日', en: `Birth` },
|
|
140
141
|
{ key: 'buy_it_now', tw: '立即購買', cn: '立即购买', en: `Buy it now` },
|
|
@@ -839,6 +840,11 @@ export class Language {
|
|
|
839
840
|
{ key: 'search_article', tw: '搜尋文章', cn: '搜寻文章', en: 'Search articles' },
|
|
840
841
|
{ key: 'blog_list', tw: '網誌列表', cn: '网志列表', en: 'Blog list' },
|
|
841
842
|
{ key: 'all_article', tw: '所有文章', cn: '所有文章', en: 'All articles' },
|
|
843
|
+
{ key: 'share', tw: '分享', cn: '分享', en: 'share' },
|
|
844
|
+
{ key: 'copy_link_success', tw: '已成功複製連結', cn: '已成功复制连结', en: 'Link copied successfully' },
|
|
845
|
+
{ key: 'chat', tw: '聊聊', cn: '聊聊', en: 'chat' },
|
|
846
|
+
{ key: 'collect', tw: '收藏', cn: '收藏', en: 'collect' },
|
|
847
|
+
{ key: 'h_collect', tw: '已收藏', cn: '已收藏', en: 'collected' },
|
|
842
848
|
];
|
|
843
849
|
}
|
|
844
850
|
static getLanguageCustomText(text) {
|
|
@@ -142,6 +142,7 @@ export class Language {
|
|
|
142
142
|
{ key: 'country', tw: '國家', cn: '国家', en: `Country` },
|
|
143
143
|
{ key: 'select_country', tw: '選擇國家', cn: '选择国家', en: `Select country` },
|
|
144
144
|
{ key: 'stock_count', tw: '商品庫存', cn: '商品库存', en: `Stock quantity` },
|
|
145
|
+
{ key: 'can_buy', tw: '可售數量', cn: '可售数量', en: `Available quantity` },
|
|
145
146
|
{ key: 'login_in_to_checkout', tw: '登入後結帳', cn: '登入后结帐', en: `Log in and checkout` },
|
|
146
147
|
{ key: 'birth', tw: '生日', cn: '生日', en: `Birth` },
|
|
147
148
|
{ key: 'buy_it_now', tw: '立即購買', cn: '立即购买', en: `Buy it now` },
|
|
@@ -847,6 +848,11 @@ export class Language {
|
|
|
847
848
|
{ key: 'search_article', tw: '搜尋文章', cn: '搜寻文章', en: 'Search articles' },
|
|
848
849
|
{ key: 'blog_list', tw: '網誌列表', cn: '网志列表', en: 'Blog list' },
|
|
849
850
|
{ key: 'all_article', tw: '所有文章', cn: '所有文章', en: 'All articles' },
|
|
851
|
+
{ key: 'share', tw: '分享', cn: '分享', en: 'share' },
|
|
852
|
+
{ key: 'copy_link_success', tw: '已成功複製連結', cn: '已成功复制连结', en: 'Link copied successfully' },
|
|
853
|
+
{ key: 'chat', tw: '聊聊', cn: '聊聊', en: 'chat' },
|
|
854
|
+
{ key: 'collect', tw: '收藏', cn: '收藏', en: 'collect' },
|
|
855
|
+
{ key: 'h_collect', tw: '已收藏', cn: '已收藏', en: 'collected' },
|
|
850
856
|
];
|
|
851
857
|
}
|
|
852
858
|
|
|
@@ -471,8 +471,8 @@ ${lifeCycle.onCreateView()}
|
|
|
471
471
|
document.querySelector('html').scrollTop = 1;
|
|
472
472
|
}
|
|
473
473
|
else {
|
|
474
|
-
$('#glitterPage').append(`<div id="page${cf.pageConfig.id}" style="min-width: 100vw;min-height:
|
|
475
|
-
background: ${cf.pageConfig.backGroundColor};display: none;z-index:99999;overflow: hidden;position: fixed;width:100vw;height:
|
|
474
|
+
$('#glitterPage').append(`<div id="page${cf.pageConfig.id}" style="min-width: 100vw;min-height: ${window.innerHeight}px;left: 0;top: 0;
|
|
475
|
+
background: ${cf.pageConfig.backGroundColor};display: none;z-index:99999;overflow: hidden;position: fixed;width:100vw;height: ${window.innerHeight}px;" class="page-box glitter-dialog">
|
|
476
476
|
${lifeCycle.onCreateView()}
|
|
477
477
|
</div>`);
|
|
478
478
|
}
|
|
@@ -500,8 +500,8 @@ ${lifeCycle.onCreateView()}
|
|
|
500
500
|
document.querySelector('html')!.scrollTop=1
|
|
501
501
|
} else {
|
|
502
502
|
|
|
503
|
-
$('#glitterPage').append(`<div id="page${cf.pageConfig.id}" style="min-width: 100vw;min-height:
|
|
504
|
-
background: ${cf.pageConfig!.backGroundColor};display: none;z-index:99999;overflow: hidden;position: fixed;width:100vw;height:
|
|
503
|
+
$('#glitterPage').append(`<div id="page${cf.pageConfig.id}" style="min-width: 100vw;min-height: ${window.innerHeight}px;left: 0;top: 0;
|
|
504
|
+
background: ${cf.pageConfig!.backGroundColor};display: none;z-index:99999;overflow: hidden;position: fixed;width:100vw;height: ${window.innerHeight}px;" class="page-box glitter-dialog">
|
|
505
505
|
${lifeCycle.onCreateView()}
|
|
506
506
|
</div>`)
|
|
507
507
|
}
|
|
@@ -19,9 +19,12 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
19
19
|
return {
|
|
20
20
|
bind: id,
|
|
21
21
|
view: () => {
|
|
22
|
-
return html ` <div class="vw-100
|
|
23
|
-
<div class="vw-100
|
|
22
|
+
return html ` <div class="vw-100 h-100 position-absolute" style="background: rgba(0,0,0,0.7); z-index: 0;"></div>
|
|
23
|
+
<div class="vw-100 h-100 d-flex align-items-center justify-content-center position-relative" style="z-index: 1;">${view}</div>`;
|
|
24
24
|
},
|
|
25
|
+
divCreate: {
|
|
26
|
+
class: `h-100 w-100`
|
|
27
|
+
}
|
|
25
28
|
};
|
|
26
29
|
});
|
|
27
30
|
},
|
|
@@ -19,9 +19,12 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
19
19
|
return {
|
|
20
20
|
bind: id,
|
|
21
21
|
view: () => {
|
|
22
|
-
return html` <div class="vw-100
|
|
23
|
-
<div class="vw-100
|
|
22
|
+
return html` <div class="vw-100 h-100 position-absolute" style="background: rgba(0,0,0,0.7); z-index: 0;"></div>
|
|
23
|
+
<div class="vw-100 h-100 d-flex align-items-center justify-content-center position-relative" style="z-index: 1;">${view}</div>`;
|
|
24
24
|
},
|
|
25
|
+
divCreate:{
|
|
26
|
+
class:`h-100 w-100`
|
|
27
|
+
}
|
|
25
28
|
};
|
|
26
29
|
});
|
|
27
30
|
},
|
|
@@ -132,3 +132,62 @@ Animation.topToBottom = new AnimationConfig((pageConfig, finish) => {
|
|
|
132
132
|
finish();
|
|
133
133
|
}, 250);
|
|
134
134
|
});
|
|
135
|
+
Animation.popup = new AnimationConfig((pageConfig, finish) => {
|
|
136
|
+
Glitter.glitter.addStyle(`.popup{
|
|
137
|
+
animation:PopToUp 0.3s ; /*IE*/
|
|
138
|
+
-moz-animation:PopToUp 0.3s; /*FireFox*/
|
|
139
|
+
-webkit-animation:PopToUp 0.3s ; /*Chrome, Safari*/
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes PopToUp{
|
|
143
|
+
from {bottom:-100%;}
|
|
144
|
+
to {bottom:0%;}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@-moz-keyframes PopToUp{
|
|
148
|
+
from {bottom:-100%;}
|
|
149
|
+
to {bottom:0%;}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@-webkit-keyframes PopToUp{
|
|
153
|
+
from {bottom:-100%;}
|
|
154
|
+
to {bottom:0%;}
|
|
155
|
+
}`);
|
|
156
|
+
Glitter.glitter.addStyle(`.popupDismiss{
|
|
157
|
+
animation:PopToUpD 0.3s ; /*IE*/
|
|
158
|
+
-moz-animation:PopToUpD 0.3s; /*FireFox*/
|
|
159
|
+
-webkit-animation:PopToUpD 0.3s ; /*Chrome, Safari*/
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@keyframes PopToUpD{
|
|
163
|
+
from {bottom:0%;}
|
|
164
|
+
to {bottom:-100%;}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@-moz-keyframes PopToUpD{
|
|
168
|
+
from {bottom:0%;}
|
|
169
|
+
to {bottom:-100%;}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@-webkit-keyframes PopToUpD{
|
|
173
|
+
from {bottom:0%;}
|
|
174
|
+
to {bottom:-100%;}
|
|
175
|
+
}`);
|
|
176
|
+
pageConfig.getElement()[0].style.top = '';
|
|
177
|
+
pageConfig.getElement()[0].style.bottom = '0px';
|
|
178
|
+
pageConfig.getElement().addClass(`d-none`);
|
|
179
|
+
setTimeout(() => {
|
|
180
|
+
pageConfig.getElement().removeClass(`d-none`);
|
|
181
|
+
pageConfig.getElement().addClass(`popup`);
|
|
182
|
+
}, 100);
|
|
183
|
+
setTimeout(() => {
|
|
184
|
+
pageConfig.getElement().removeClass('popup');
|
|
185
|
+
finish();
|
|
186
|
+
}, 400);
|
|
187
|
+
}, (pageConfig, finish) => {
|
|
188
|
+
pageConfig.getElement().addClass('position-fixed');
|
|
189
|
+
pageConfig.getElement().addClass(`popupDismiss`);
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
finish();
|
|
192
|
+
}, 250);
|
|
193
|
+
});
|
|
@@ -141,6 +141,68 @@ export class Animation {
|
|
|
141
141
|
}, 250)
|
|
142
142
|
})
|
|
143
143
|
|
|
144
|
+
public static popup = new AnimationConfig((pageConfig, finish) => {
|
|
145
|
+
Glitter.glitter.addStyle(`.popup{
|
|
146
|
+
animation:PopToUp 0.3s ; /*IE*/
|
|
147
|
+
-moz-animation:PopToUp 0.3s; /*FireFox*/
|
|
148
|
+
-webkit-animation:PopToUp 0.3s ; /*Chrome, Safari*/
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@keyframes PopToUp{
|
|
152
|
+
from {bottom:-100%;}
|
|
153
|
+
to {bottom:0%;}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@-moz-keyframes PopToUp{
|
|
157
|
+
from {bottom:-100%;}
|
|
158
|
+
to {bottom:0%;}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@-webkit-keyframes PopToUp{
|
|
162
|
+
from {bottom:-100%;}
|
|
163
|
+
to {bottom:0%;}
|
|
164
|
+
}`)
|
|
165
|
+
Glitter.glitter.addStyle(`.popupDismiss{
|
|
166
|
+
animation:PopToUpD 0.3s ; /*IE*/
|
|
167
|
+
-moz-animation:PopToUpD 0.3s; /*FireFox*/
|
|
168
|
+
-webkit-animation:PopToUpD 0.3s ; /*Chrome, Safari*/
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@keyframes PopToUpD{
|
|
172
|
+
from {bottom:0%;}
|
|
173
|
+
to {bottom:-100%;}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@-moz-keyframes PopToUpD{
|
|
177
|
+
from {bottom:0%;}
|
|
178
|
+
to {bottom:-100%;}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@-webkit-keyframes PopToUpD{
|
|
182
|
+
from {bottom:0%;}
|
|
183
|
+
to {bottom:-100%;}
|
|
184
|
+
}`)
|
|
185
|
+
// console.log(`pageConfig.getElement()=>`,pageConfig.getElement())
|
|
186
|
+
pageConfig.getElement()[0].style.top='';
|
|
187
|
+
pageConfig.getElement()[0].style.bottom='0px';
|
|
188
|
+
pageConfig.getElement().addClass(`d-none`)
|
|
189
|
+
setTimeout(()=>{
|
|
190
|
+
pageConfig.getElement().removeClass(`d-none`)
|
|
191
|
+
pageConfig.getElement().addClass(`popup`)
|
|
192
|
+
},100)
|
|
193
|
+
|
|
194
|
+
setTimeout(() => {
|
|
195
|
+
pageConfig.getElement().removeClass('popup')
|
|
196
|
+
finish()
|
|
197
|
+
}, 400)
|
|
198
|
+
}, (pageConfig: PageConfig, finish: () => void) => {
|
|
199
|
+
pageConfig.getElement().addClass('position-fixed')
|
|
200
|
+
pageConfig.getElement().addClass(`popupDismiss`)
|
|
201
|
+
setTimeout(() => {
|
|
202
|
+
finish()
|
|
203
|
+
}, 250)
|
|
204
|
+
})
|
|
205
|
+
|
|
144
206
|
|
|
145
207
|
|
|
146
208
|
}
|
|
@@ -124,7 +124,7 @@ export class PageManager {
|
|
|
124
124
|
callback: (gvFunction) => {
|
|
125
125
|
const original = new URL(glitter.root_path + Language.getLanguageLinkPrefix() + tag + location.hash + window.location.search);
|
|
126
126
|
function switchFunction() {
|
|
127
|
-
var _a, _b
|
|
127
|
+
var _a, _b;
|
|
128
128
|
glitter.page = tag;
|
|
129
129
|
try {
|
|
130
130
|
window.history.replaceState({}, document.title, original.href);
|
|
@@ -145,8 +145,8 @@ export class PageManager {
|
|
|
145
145
|
},
|
|
146
146
|
backGroundColor: (_a = option.backGroundColor) !== null && _a !== void 0 ? _a : 'transparent',
|
|
147
147
|
type: GVCType.Page,
|
|
148
|
-
animation:
|
|
149
|
-
dismiss: (
|
|
148
|
+
animation: option.animation || glitter.defaultSetting.pageAnimation || glitter.animation.none,
|
|
149
|
+
dismiss: (_b = option.dismiss) !== null && _b !== void 0 ? _b : (() => {
|
|
150
150
|
}),
|
|
151
151
|
renderFinish: () => {
|
|
152
152
|
glitter.pageConfig = glitter.pageConfig.filter((dd) => {
|
|
@@ -204,7 +204,7 @@ export class PageManager {
|
|
|
204
204
|
},
|
|
205
205
|
backGroundColor: option.backGroundColor ?? 'transparent',
|
|
206
206
|
type: GVCType.Page,
|
|
207
|
-
animation: option.animation
|
|
207
|
+
animation: option.animation || glitter.defaultSetting.pageAnimation || glitter.animation.none,
|
|
208
208
|
dismiss: option.dismiss ?? (() => {
|
|
209
209
|
}),
|
|
210
210
|
renderFinish: () => {
|