ts-glitter 13.8.668 → 13.8.671
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 +59 -1
- package/lowcode/Entry.ts +74 -2
- package/lowcode/cms-plugin/POS-setting.js +7 -7
- package/lowcode/cms-plugin/POS-setting.ts +10 -10
- package/lowcode/jspage/main.js +0 -18
- package/lowcode/jspage/main.ts +1 -28
- package/package.json +2 -1
package/lowcode/Entry.js
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
66
66
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.671';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm = {
|
|
70
70
|
appConfig: [],
|
|
@@ -171,6 +171,50 @@ export class Entry {
|
|
|
171
171
|
Entry.checkIframe(glitter);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
+
else if (glitter.getUrlParameter('page') === 'backend_manager') {
|
|
175
|
+
if (!GlobalUser.token) {
|
|
176
|
+
glitter.setUrlParameter('page', 'login');
|
|
177
|
+
location.reload();
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
try {
|
|
181
|
+
const appList = (yield ApiPageConfig.getAppList(undefined, GlobalUser.token)).response.result;
|
|
182
|
+
localStorage.setItem('select_item', '0');
|
|
183
|
+
if (appList.length === 0) {
|
|
184
|
+
glitter.getModule(new URL('./view-model/saas-view-model.js', location.href).href, (SaasViewModel) => {
|
|
185
|
+
glitter.innerDialog((gvc) => {
|
|
186
|
+
return gvc.bindView(() => {
|
|
187
|
+
const id = gvc.glitter.getUUID();
|
|
188
|
+
return {
|
|
189
|
+
bind: id,
|
|
190
|
+
view: () => {
|
|
191
|
+
return SaasViewModel.createShop(gvc, true);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
}, 'change_app');
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
let appName = appList[0].appName;
|
|
200
|
+
if (appList.find((dd) => {
|
|
201
|
+
return dd.appName === localStorage.getItem('select_app_name');
|
|
202
|
+
})) {
|
|
203
|
+
appName = localStorage.getItem('select_app_name');
|
|
204
|
+
}
|
|
205
|
+
glitter.setUrlParameter('page', 'index');
|
|
206
|
+
glitter.setUrlParameter('type', 'editor');
|
|
207
|
+
glitter.setUrlParameter('appName', appName);
|
|
208
|
+
glitter.setUrlParameter('function', 'backend-manger');
|
|
209
|
+
location.reload();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (e) {
|
|
213
|
+
glitter.setUrlParameter('page', 'login');
|
|
214
|
+
location.reload();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
174
218
|
else {
|
|
175
219
|
Entry.toNormalRender(glitter, vm, () => {
|
|
176
220
|
Entry.checkIframe(glitter);
|
|
@@ -432,6 +476,20 @@ export class Entry {
|
|
|
432
476
|
});
|
|
433
477
|
}
|
|
434
478
|
static resourceInitial(glitter, vm, callback) {
|
|
479
|
+
glitter.runJsInterFace('getTopInset', {}, (response) => {
|
|
480
|
+
glitter.share.top_inset = (response.data);
|
|
481
|
+
}, {
|
|
482
|
+
webFunction: () => {
|
|
483
|
+
return { data: 0 };
|
|
484
|
+
},
|
|
485
|
+
});
|
|
486
|
+
glitter.runJsInterFace('getBottomInset', {}, (response) => {
|
|
487
|
+
glitter.share.bottom_inset = (response.data);
|
|
488
|
+
}, {
|
|
489
|
+
webFunction: () => {
|
|
490
|
+
return { data: 0 };
|
|
491
|
+
},
|
|
492
|
+
});
|
|
435
493
|
window.glitterInitialHelper.getPlugin((dd) => {
|
|
436
494
|
var _a, _b, _c, _d, _e;
|
|
437
495
|
console.log(`getPlugin-time:`, window.renderClock.stop());
|
package/lowcode/Entry.ts
CHANGED
|
@@ -6,6 +6,8 @@ import {BaseApi} from './glitterBundle/api/base.js';
|
|
|
6
6
|
import {GlobalUser} from './glitter-base/global/global-user.js';
|
|
7
7
|
import {EditorConfig} from './editor-config.js';
|
|
8
8
|
import {ShareDialog} from './glitterBundle/dialog/ShareDialog.js';
|
|
9
|
+
import {TriggerEvent} from "./glitterBundle/plugins/trigger-event.js";
|
|
10
|
+
import {ApiUser} from "./glitter-base/route/user.js";
|
|
9
11
|
|
|
10
12
|
export class Entry {
|
|
11
13
|
public static onCreate(glitter: Glitter) {
|
|
@@ -64,7 +66,7 @@ export class Entry {
|
|
|
64
66
|
}
|
|
65
67
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
66
68
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
69
|
+
glitter.share.editerVersion = 'V_13.8.671';
|
|
68
70
|
glitter.share.start = new Date();
|
|
69
71
|
const vm: {
|
|
70
72
|
appConfig: any;
|
|
@@ -180,7 +182,51 @@ export class Entry {
|
|
|
180
182
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
181
183
|
Entry.checkIframe(glitter);
|
|
182
184
|
});
|
|
183
|
-
} else {
|
|
185
|
+
} else if(glitter.getUrlParameter('page')==='backend_manager'){
|
|
186
|
+
if (!GlobalUser.token) {
|
|
187
|
+
glitter.setUrlParameter('page', 'login');
|
|
188
|
+
location.reload()
|
|
189
|
+
}else{
|
|
190
|
+
try {
|
|
191
|
+
const appList = (await ApiPageConfig.getAppList(
|
|
192
|
+
undefined,
|
|
193
|
+
GlobalUser.token
|
|
194
|
+
)).response.result;
|
|
195
|
+
localStorage.setItem('select_item', '0')
|
|
196
|
+
if(appList.length===0){
|
|
197
|
+
glitter.getModule(new URL('./view-model/saas-view-model.js', location.href).href, (SaasViewModel) => {
|
|
198
|
+
glitter.innerDialog((gvc) => {
|
|
199
|
+
return gvc.bindView(() => {
|
|
200
|
+
const id = gvc.glitter.getUUID();
|
|
201
|
+
return {
|
|
202
|
+
bind: id,
|
|
203
|
+
view: () => {
|
|
204
|
+
return SaasViewModel.createShop(gvc, true)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
}, 'change_app')
|
|
210
|
+
})
|
|
211
|
+
}else{
|
|
212
|
+
let appName = appList[0].appName;
|
|
213
|
+
if (appList.find((dd:any) => {
|
|
214
|
+
return dd.appName === localStorage.getItem('select_app_name')
|
|
215
|
+
})) {
|
|
216
|
+
appName = localStorage.getItem('select_app_name')
|
|
217
|
+
}
|
|
218
|
+
glitter.setUrlParameter('page', 'index')
|
|
219
|
+
glitter.setUrlParameter('type', 'editor')
|
|
220
|
+
glitter.setUrlParameter('appName', appName)
|
|
221
|
+
glitter.setUrlParameter('function', 'backend-manger')
|
|
222
|
+
location.reload()
|
|
223
|
+
}
|
|
224
|
+
}catch (e) {
|
|
225
|
+
glitter.setUrlParameter('page', 'login');
|
|
226
|
+
location.reload()
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}else {
|
|
184
230
|
// 一般頁面
|
|
185
231
|
Entry.toNormalRender(glitter, vm, () => {
|
|
186
232
|
Entry.checkIframe(glitter);
|
|
@@ -491,6 +537,32 @@ export class Entry {
|
|
|
491
537
|
|
|
492
538
|
// 資源初始化
|
|
493
539
|
public static resourceInitial(glitter: Glitter, vm: any, callback: (data: any) => void) {
|
|
540
|
+
//取得APP的上間隔距離
|
|
541
|
+
glitter.runJsInterFace(
|
|
542
|
+
'getTopInset',
|
|
543
|
+
{},
|
|
544
|
+
(response: any) => {
|
|
545
|
+
glitter.share.top_inset=(response.data);
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
webFunction: () => {
|
|
549
|
+
return {data: 0};
|
|
550
|
+
},
|
|
551
|
+
}
|
|
552
|
+
);
|
|
553
|
+
//取得APP的底部間隔距離
|
|
554
|
+
glitter.runJsInterFace(
|
|
555
|
+
'getBottomInset',
|
|
556
|
+
{},
|
|
557
|
+
(response: any) => {
|
|
558
|
+
glitter.share.bottom_inset=(response.data);
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
webFunction: () => {
|
|
562
|
+
return {data: 0};
|
|
563
|
+
},
|
|
564
|
+
}
|
|
565
|
+
);
|
|
494
566
|
(window as any).glitterInitialHelper.getPlugin((dd: any) => {
|
|
495
567
|
console.log(`getPlugin-time:`, (window as any).renderClock.stop());
|
|
496
568
|
(window as any).saasConfig.appConfig = dd.response.data;
|
|
@@ -314,18 +314,18 @@ height: 51px;
|
|
|
314
314
|
return html `
|
|
315
315
|
<div
|
|
316
316
|
class="d-flex nav-top"
|
|
317
|
-
style="z-index:20;
|
|
317
|
+
style="z-index:20;padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
318
|
+
>
|
|
319
|
+
<div
|
|
320
|
+
class="POS-logo d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
321
|
+
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}height: ${(() => {
|
|
318
322
|
if (document.body.offsetWidth > 800) {
|
|
319
323
|
return `86px`;
|
|
320
324
|
}
|
|
321
325
|
else {
|
|
322
326
|
return `66px`;
|
|
323
327
|
}
|
|
324
|
-
})()};
|
|
325
|
-
>
|
|
326
|
-
<div
|
|
327
|
-
class="POS-logo h-100 d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
328
|
-
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}"
|
|
328
|
+
})()};"
|
|
329
329
|
>
|
|
330
330
|
${document.body.offsetWidth < 800 && vm.type === 'menu'
|
|
331
331
|
? ` `
|
|
@@ -611,7 +611,7 @@ cursor: pointer;
|
|
|
611
611
|
}),
|
|
612
612
|
divCreate: {
|
|
613
613
|
class: `h-100 ${document.body.clientWidth < 768 ? `` : `d-flex`}`,
|
|
614
|
-
style: `background: #F7F7F7;`,
|
|
614
|
+
style: `background: #F7F7F7;padding-top:${glitter.share.top_inset}px;`,
|
|
615
615
|
},
|
|
616
616
|
})}
|
|
617
617
|
${gvc.bindView({
|
|
@@ -355,17 +355,17 @@ height: 51px;
|
|
|
355
355
|
return html`
|
|
356
356
|
<div
|
|
357
357
|
class="d-flex nav-top"
|
|
358
|
-
style="z-index:20;
|
|
359
|
-
if (document.body.offsetWidth > 800) {
|
|
360
|
-
return `86px`
|
|
361
|
-
} else {
|
|
362
|
-
return `66px`
|
|
363
|
-
}
|
|
364
|
-
})()};width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
358
|
+
style="z-index:20;padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
365
359
|
>
|
|
366
360
|
<div
|
|
367
|
-
class="POS-logo
|
|
368
|
-
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}
|
|
361
|
+
class="POS-logo d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
362
|
+
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}height: ${(() => {
|
|
363
|
+
if (document.body.offsetWidth > 800) {
|
|
364
|
+
return `86px`
|
|
365
|
+
} else {
|
|
366
|
+
return `66px`
|
|
367
|
+
}
|
|
368
|
+
})()};"
|
|
369
369
|
>
|
|
370
370
|
${document.body.offsetWidth < 800 && vm.type === 'menu'
|
|
371
371
|
? ` `
|
|
@@ -654,7 +654,7 @@ cursor: pointer;
|
|
|
654
654
|
},
|
|
655
655
|
divCreate: {
|
|
656
656
|
class: `h-100 ${document.body.clientWidth < 768 ? `` : `d-flex`}`,
|
|
657
|
-
style: `background: #F7F7F7;`,
|
|
657
|
+
style: `background: #F7F7F7;padding-top:${glitter.share.top_inset}px;`,
|
|
658
658
|
},
|
|
659
659
|
})}
|
|
660
660
|
${gvc.bindView({
|
package/lowcode/jspage/main.js
CHANGED
|
@@ -180,15 +180,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
180
180
|
else {
|
|
181
181
|
dialog.dataLoading({ visible: true });
|
|
182
182
|
}
|
|
183
|
-
glitter.share.top_inset = yield new Promise((resolve, reject) => {
|
|
184
|
-
glitter.runJsInterFace('getTopInset', {}, (response) => {
|
|
185
|
-
resolve(response.data);
|
|
186
|
-
}, {
|
|
187
|
-
webFunction: () => {
|
|
188
|
-
return { data: 0 };
|
|
189
|
-
},
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
183
|
if (parseInt(glitter.share.top_inset, 10)) {
|
|
193
184
|
gvc.addStyle(css `
|
|
194
185
|
.scroll-in {
|
|
@@ -200,15 +191,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
200
191
|
}
|
|
201
192
|
`);
|
|
202
193
|
}
|
|
203
|
-
glitter.share.bottom_inset = yield new Promise((resolve, reject) => {
|
|
204
|
-
glitter.runJsInterFace('getBottomInset', {}, (response) => {
|
|
205
|
-
resolve(response.data);
|
|
206
|
-
}, {
|
|
207
|
-
webFunction: () => {
|
|
208
|
-
return { data: 0 };
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
194
|
const waitGetData = [
|
|
213
195
|
() => __awaiter(this, void 0, void 0, function* () {
|
|
214
196
|
return yield new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
package/lowcode/jspage/main.ts
CHANGED
|
@@ -203,20 +203,7 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
203
203
|
} else {
|
|
204
204
|
dialog.dataLoading({visible: true})
|
|
205
205
|
}
|
|
206
|
-
|
|
207
|
-
glitter.runJsInterFace(
|
|
208
|
-
'getTopInset',
|
|
209
|
-
{},
|
|
210
|
-
(response: any) => {
|
|
211
|
-
resolve(response.data);
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
webFunction: () => {
|
|
215
|
-
return {data: 0};
|
|
216
|
-
},
|
|
217
|
-
}
|
|
218
|
-
)
|
|
219
|
-
})
|
|
206
|
+
|
|
220
207
|
if (parseInt(glitter.share.top_inset, 10)) {
|
|
221
208
|
gvc.addStyle(css`
|
|
222
209
|
.scroll-in {
|
|
@@ -229,20 +216,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
229
216
|
`)
|
|
230
217
|
}
|
|
231
218
|
|
|
232
|
-
glitter.share.bottom_inset = await new Promise((resolve, reject) => {
|
|
233
|
-
glitter.runJsInterFace(
|
|
234
|
-
'getBottomInset',
|
|
235
|
-
{},
|
|
236
|
-
(response: any) => {
|
|
237
|
-
resolve(response.data);
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
webFunction: () => {
|
|
241
|
-
return {data: 0};
|
|
242
|
-
},
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
})
|
|
246
219
|
|
|
247
220
|
|
|
248
221
|
const waitGetData = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-glitter",
|
|
3
|
-
"version": "13.8.
|
|
3
|
+
"version": "13.8.671",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"axios": "^1.6.2",
|
|
33
33
|
"bcrypt": "^5.1.0",
|
|
34
34
|
"body-parser": "^1.20.2",
|
|
35
|
+
"ts-glitter": "13.8.671",
|
|
35
36
|
"compression": "^1.7.4",
|
|
36
37
|
"cookie-parser": "^1.4.6",
|
|
37
38
|
"cors": "^2.8.5",
|