ts-glitter 20.2.2 → 20.2.4
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 -2
- package/lowcode/glitterBundle/Glitter.js +1 -1
- package/lowcode/glitterBundle/Glitter.ts +1 -1
- package/lowcode/glitterBundle/module/PageManager.js +4 -3
- package/lowcode/glitterBundle/module/PageManager.ts +3 -3
- package/lowcode/glitterBundle/module/html-generate.js +1 -2
- package/lowcode/glitterBundle/module/html-generate.ts +2 -2
- package/lowcode/public-components/checkout/index.js +1 -1
- package/lowcode/public-components/checkout/index.ts +1 -2
- package/package.json +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -143,7 +143,7 @@ export class Entry {
|
|
|
143
143
|
}
|
|
144
144
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
145
145
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
146
|
-
glitter.share.editerVersion = 'V_20.2.
|
|
146
|
+
glitter.share.editerVersion = 'V_20.2.4';
|
|
147
147
|
glitter.share.start = new Date();
|
|
148
148
|
const vm = { appConfig: [] };
|
|
149
149
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -25,7 +25,6 @@ export class Entry {
|
|
|
25
25
|
return originalReplaceState.apply(history, arguments);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
|
|
29
28
|
function next(){
|
|
30
29
|
//判斷結帳成功清空購物車紀錄
|
|
31
30
|
if (glitter.getUrlParameter('EndCheckout') === '1') {
|
|
@@ -145,7 +144,7 @@ export class Entry {
|
|
|
145
144
|
}
|
|
146
145
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
147
146
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
148
|
-
glitter.share.editerVersion = 'V_20.2.
|
|
147
|
+
glitter.share.editerVersion = 'V_20.2.4';
|
|
149
148
|
|
|
150
149
|
glitter.share.start = new Date();
|
|
151
150
|
const vm = { appConfig: [] };
|
|
@@ -567,7 +567,7 @@ export class Glitter {
|
|
|
567
567
|
link.searchParams.set('appName', this.getUrlParameter('appName'));
|
|
568
568
|
}
|
|
569
569
|
this.waiting_push_state = () => {
|
|
570
|
-
window.history.
|
|
570
|
+
window.history.pushState({}, document.title, link.href);
|
|
571
571
|
};
|
|
572
572
|
this.getModule(new URL('../official_event/page/change-page.js', import.meta.url).href, (cl) => {
|
|
573
573
|
cl.changePage(link.searchParams.get('page') || link.pathname.substring(1), 'page', {});
|
|
@@ -83,7 +83,7 @@ export class Glitter {
|
|
|
83
83
|
link.searchParams.set('appName',this.getUrlParameter('appName'))
|
|
84
84
|
}
|
|
85
85
|
this.waiting_push_state=()=>{
|
|
86
|
-
window.history.
|
|
86
|
+
window.history.pushState({}, document.title, link.href);
|
|
87
87
|
}
|
|
88
88
|
this.getModule(new URL('../official_event/page/change-page.js', import.meta.url).href, (cl) => {
|
|
89
89
|
cl.changePage(link.searchParams.get('page') || link.pathname.substring(1), 'page', {})
|
|
@@ -236,17 +236,18 @@ export class PageManager {
|
|
|
236
236
|
}
|
|
237
237
|
static setHistory(tag, type) {
|
|
238
238
|
const glitter = Glitter.glitter;
|
|
239
|
-
const search = glitter.root_path + Language.getLanguageLinkPrefix() + tag + glitter.window.location.search;
|
|
240
239
|
try {
|
|
241
240
|
if (['home', 'page'].find((dd) => {
|
|
242
241
|
return dd === type;
|
|
243
242
|
})) {
|
|
244
|
-
window.history.pushState({}, glitter.document.title, search);
|
|
245
|
-
glitter.pageConfig[glitter.pageConfig.length - 1].search = search;
|
|
246
243
|
if (glitter.waiting_push_state) {
|
|
247
244
|
glitter.waiting_push_state();
|
|
248
245
|
glitter.waiting_push_state = undefined;
|
|
249
246
|
}
|
|
247
|
+
else {
|
|
248
|
+
window.history.pushState({}, glitter.document.title, (glitter.root_path + Language.getLanguageLinkPrefix() + tag + glitter.window.location.search));
|
|
249
|
+
}
|
|
250
|
+
glitter.pageConfig[glitter.pageConfig.length - 1].search = glitter.root_path + Language.getLanguageLinkPrefix() + tag + glitter.window.location.search;
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
253
|
catch (e) {
|
|
@@ -316,17 +316,17 @@ export class PageManager {
|
|
|
316
316
|
|
|
317
317
|
public static setHistory(tag: string, type: string) {
|
|
318
318
|
const glitter = Glitter.glitter;
|
|
319
|
-
const search = glitter.root_path + Language.getLanguageLinkPrefix()+tag + glitter.window.location.search;
|
|
320
319
|
try {
|
|
321
320
|
if (['home', 'page'].find((dd) => {
|
|
322
321
|
return dd === type
|
|
323
322
|
})) {
|
|
324
|
-
window.history.pushState({}, glitter.document.title, search);
|
|
325
|
-
glitter.pageConfig[glitter.pageConfig.length - 1].search = search;
|
|
326
323
|
if(glitter.waiting_push_state){
|
|
327
324
|
glitter.waiting_push_state()
|
|
328
325
|
glitter.waiting_push_state=undefined
|
|
326
|
+
}else {
|
|
327
|
+
window.history.pushState({}, glitter.document.title, (glitter.root_path + Language.getLanguageLinkPrefix()+tag + glitter.window.location.search));
|
|
329
328
|
}
|
|
329
|
+
glitter.pageConfig[glitter.pageConfig.length - 1].search = glitter.root_path + Language.getLanguageLinkPrefix()+tag + glitter.window.location.search;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
} catch (e) {
|
|
@@ -2402,8 +2402,7 @@ HtmlGenerate.changePage = (obj) => {
|
|
|
2402
2402
|
var _a, _b;
|
|
2403
2403
|
const glitter = Glitter.glitter;
|
|
2404
2404
|
if (obj.tag === 'backend_manager') {
|
|
2405
|
-
glitter.
|
|
2406
|
-
location.reload();
|
|
2405
|
+
location.href = glitter.root_path + 'backend_manager';
|
|
2407
2406
|
return;
|
|
2408
2407
|
}
|
|
2409
2408
|
console.log(`changePage-time:`, window.renderClock.stop());
|
|
@@ -592,8 +592,8 @@ export class HtmlGenerate {
|
|
|
592
592
|
const glitter = Glitter.glitter;
|
|
593
593
|
//複寫back_manager的頁面,避免堆棧問題
|
|
594
594
|
if(obj.tag==='backend_manager'){
|
|
595
|
-
|
|
596
|
-
location.
|
|
595
|
+
|
|
596
|
+
location.href=glitter.root_path+'backend_manager'
|
|
597
597
|
return
|
|
598
598
|
}
|
|
599
599
|
|
|
@@ -2972,7 +2972,7 @@ export class CheckoutIndex {
|
|
|
2972
2972
|
const urlObject = new URL(originalUrl);
|
|
2973
2973
|
urlObject.searchParams.set('EndCheckout', '1');
|
|
2974
2974
|
const newUrl = urlObject.toString();
|
|
2975
|
-
if (ApplicationConfig.device_type === 'ios') {
|
|
2975
|
+
if ((ApplicationConfig.device_type === 'ios') && ['jkopay', 'line_pay'].includes(vm.cartData.customer_info.payment_select)) {
|
|
2976
2976
|
return `${ApplicationConfig.bundle_id}://?path=${encodeURIComponent(newUrl)}`;
|
|
2977
2977
|
}
|
|
2978
2978
|
else {
|
|
@@ -92,7 +92,6 @@ export class CheckoutIndex {
|
|
|
92
92
|
width: obj?.circle?.width ?? 20,
|
|
93
93
|
borderSize: obj?.circle?.borderSize ?? 16,
|
|
94
94
|
};
|
|
95
|
-
|
|
96
95
|
const textAttr = {
|
|
97
96
|
value: obj?.text?.value ?? Language.text('loading'),
|
|
98
97
|
visible: obj?.text?.visible === false ? false : true,
|
|
@@ -3220,7 +3219,7 @@ export class CheckoutIndex {
|
|
|
3220
3219
|
const urlObject = new URL(originalUrl);
|
|
3221
3220
|
urlObject.searchParams.set('EndCheckout', '1');
|
|
3222
3221
|
const newUrl = urlObject.toString();
|
|
3223
|
-
if (ApplicationConfig.device_type === 'ios') {
|
|
3222
|
+
if ((ApplicationConfig.device_type === 'ios') && ['jkopay','line_pay'].includes(vm.cartData.customer_info.payment_select)) {
|
|
3224
3223
|
return `${ApplicationConfig.bundle_id}://?path=${encodeURIComponent(newUrl)}`;
|
|
3225
3224
|
} else {
|
|
3226
3225
|
return newUrl;
|