ts-glitter 16.0.2 → 16.0.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
CHANGED
|
@@ -79,7 +79,7 @@ export class Entry {
|
|
|
79
79
|
}
|
|
80
80
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
81
81
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
82
|
-
glitter.share.editerVersion = 'V_16.0.
|
|
82
|
+
glitter.share.editerVersion = 'V_16.0.4';
|
|
83
83
|
glitter.share.start = new Date();
|
|
84
84
|
const vm = {
|
|
85
85
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -81,7 +81,7 @@ export class Entry {
|
|
|
81
81
|
|
|
82
82
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
83
83
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
84
|
-
glitter.share.editerVersion = 'V_16.0.
|
|
84
|
+
glitter.share.editerVersion = 'V_16.0.4';
|
|
85
85
|
glitter.share.start = new Date();
|
|
86
86
|
const vm: {
|
|
87
87
|
appConfig: any;
|
package/lowcode/editor-config.js
CHANGED
|
@@ -35,10 +35,15 @@ export class EditorConfig {
|
|
|
35
35
|
let differenceInDays = (differenceInTime / (1000 * 3600 * 24)).toFixed(0);
|
|
36
36
|
if (plan.plan === 'free' && differenceInDays > 1) {
|
|
37
37
|
if (gvc.glitter.getUrlParameter('tab') === 'home_page' || ((gvc.glitter.deviceType !== gvc.glitter.deviceTypeEnum.Web) || document.body.clientWidth > 800)) {
|
|
38
|
-
text = `<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:
|
|
38
|
+
text = `<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:5px;">
|
|
39
39
|
<span class="notice_text">立即聯繫開店顧問,專人協助打造高質感官網</span>
|
|
40
40
|
<button class="btn btn-black " type="button" style="height:30px;" onclick="${gvc.event(() => {
|
|
41
|
-
gvc.glitter.
|
|
41
|
+
if (gvc.glitter.deviceType !== gvc.glitter.deviceTypeEnum.Web) {
|
|
42
|
+
location.href = 'https://liff.line.me/1645278921-kWRPP32q/?accountId=shopnex';
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
gvc.glitter.openNewTab(`https://liff.line.me/1645278921-kWRPP32q/?accountId=shopnex`);
|
|
46
|
+
}
|
|
42
47
|
})}">
|
|
43
48
|
<span class="tx_700_white">聯繫顧問</span>
|
|
44
49
|
</button>
|
|
@@ -48,7 +53,7 @@ export class EditorConfig {
|
|
|
48
53
|
bg_color = '#ff6c02';
|
|
49
54
|
text = `
|
|
50
55
|
|
|
51
|
-
<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:
|
|
56
|
+
<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:5px;">
|
|
52
57
|
<span class="notice_text">立即下載行動後台APP,享受流暢操作體驗</span>
|
|
53
58
|
<button class="btn btn-black " type="button" style="height:30px;" onclick="${gvc.event(() => {
|
|
54
59
|
function isAppleDevice() {
|
package/lowcode/editor-config.ts
CHANGED
|
@@ -115,10 +115,14 @@ export class EditorConfig {
|
|
|
115
115
|
let differenceInDays: any = (differenceInTime / (1000 * 3600 * 24)).toFixed(0);
|
|
116
116
|
if (plan.plan === 'free' && differenceInDays > 1) {
|
|
117
117
|
if (gvc.glitter.getUrlParameter('tab') === 'home_page' || ((gvc.glitter.deviceType !== gvc.glitter.deviceTypeEnum.Web) || document.body.clientWidth > 800)) {
|
|
118
|
-
text = `<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:
|
|
118
|
+
text = `<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:5px;">
|
|
119
119
|
<span class="notice_text">立即聯繫開店顧問,專人協助打造高質感官網</span>
|
|
120
120
|
<button class="btn btn-black " type="button" style="height:30px;" onclick="${gvc.event(()=>{
|
|
121
|
-
|
|
121
|
+
if(gvc.glitter.deviceType !== gvc.glitter.deviceTypeEnum.Web){
|
|
122
|
+
location.href='https://liff.line.me/1645278921-kWRPP32q/?accountId=shopnex'
|
|
123
|
+
}else{
|
|
124
|
+
gvc.glitter.openNewTab(`https://liff.line.me/1645278921-kWRPP32q/?accountId=shopnex`)
|
|
125
|
+
}
|
|
122
126
|
})}">
|
|
123
127
|
<span class="tx_700_white">聯繫顧問</span>
|
|
124
128
|
</button>
|
|
@@ -127,7 +131,7 @@ export class EditorConfig {
|
|
|
127
131
|
bg_color = '#ff6c02'
|
|
128
132
|
text = `
|
|
129
133
|
|
|
130
|
-
<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:
|
|
134
|
+
<div class="d-flex flex-column flex-sm-row align-items-center justify-content-center" style="gap:5px;">
|
|
131
135
|
<span class="notice_text">立即下載行動後台APP,享受流暢操作體驗</span>
|
|
132
136
|
<button class="btn btn-black " type="button" style="height:30px;" onclick="${gvc.event(()=>{
|
|
133
137
|
function isAppleDevice() {
|
|
@@ -968,19 +968,19 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
968
968
|
return {
|
|
969
969
|
bind: id,
|
|
970
970
|
view: () => {
|
|
971
|
+
var _a;
|
|
971
972
|
return html `
|
|
972
|
-
<div class="w-100 d-flex align-items-center justify-content-center p-3 ${richID}-loading">
|
|
973
|
-
<div class="spinner-border"></div>
|
|
974
|
-
</div>
|
|
975
|
-
<div id="${richID}" style="position: relative;"></div>
|
|
976
973
|
<div
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
974
|
+
class="w-100 bg-white d-flex align-items-center justify-content-center flex-column "
|
|
975
|
+
style="top:0px;left:0px;height:${obj.rich_height || '100%'};min-height:${(_a = obj.setHeight) !== null && _a !== void 0 ? _a : 350};z-index:9999;"
|
|
976
|
+
id="hid_${id}"
|
|
980
977
|
>
|
|
981
978
|
<div class="spinner-border"></div>
|
|
982
979
|
載入中
|
|
983
980
|
</div>
|
|
981
|
+
<div id="c_${richID}" class="w-100" style="visibility: hidden;">
|
|
982
|
+
<div id="${richID}" style="position: relative;"></div>
|
|
983
|
+
</div>
|
|
984
984
|
`;
|
|
985
985
|
},
|
|
986
986
|
divCreate: {
|
|
@@ -1099,20 +1099,6 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1099
1099
|
H6: '標題 6',
|
|
1100
1100
|
},
|
|
1101
1101
|
});
|
|
1102
|
-
if (glitter.document.querySelector(`.${richID}-loading`)) {
|
|
1103
|
-
glitter.document.querySelector(`.${richID}-loading`).remove();
|
|
1104
|
-
}
|
|
1105
|
-
if (loading) {
|
|
1106
|
-
loading = false;
|
|
1107
|
-
loadingView = true;
|
|
1108
|
-
setTimeout(() => {
|
|
1109
|
-
delay = false;
|
|
1110
|
-
if (!loadingView && !delay) {
|
|
1111
|
-
gvc.glitter.document.querySelector(`#hid_${id}`).remove();
|
|
1112
|
-
editor.html.set(obj.def || '');
|
|
1113
|
-
}
|
|
1114
|
-
}, 200);
|
|
1115
|
-
}
|
|
1116
1102
|
function checkRender() {
|
|
1117
1103
|
for (const toolBar of toolBarArray) {
|
|
1118
1104
|
if (toolBar != '|' && !glitter.document.querySelector(`#` + richID).querySelector(`[data-cmd="${toolBar}"]`)) {
|
|
@@ -1135,10 +1121,6 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1135
1121
|
}
|
|
1136
1122
|
else {
|
|
1137
1123
|
loadingView = false;
|
|
1138
|
-
if (!loadingView && !delay) {
|
|
1139
|
-
gvc.glitter.document.querySelector(`#hid_${id}`).remove();
|
|
1140
|
-
editor.html.set(obj.def || '');
|
|
1141
|
-
}
|
|
1142
1124
|
const target = glitter.document.querySelector(`#` + richID).querySelector(`[data-cmd="insertImage"]`);
|
|
1143
1125
|
target.outerHTML = html ` <button
|
|
1144
1126
|
id="insertImage-replace"
|
|
@@ -1200,12 +1182,15 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1200
1182
|
glitter.document.querySelector(`#` + richID).querySelector(`.fr-view`).style.minHeight = 'auto';
|
|
1201
1183
|
glitter.document.querySelector(`#` + richID).querySelector(`.fr-view`).style.overflowY = 'auto';
|
|
1202
1184
|
}
|
|
1185
|
+
editor.html.set(obj.def || '');
|
|
1203
1186
|
if (obj.readonly) {
|
|
1204
1187
|
editor.edit.off();
|
|
1205
1188
|
editor.toolbar.disable();
|
|
1206
1189
|
}
|
|
1207
1190
|
console.info(`${richID} rendered richtext`);
|
|
1208
1191
|
glitter.share.richTextRendering = false;
|
|
1192
|
+
gvc.glitter.document.querySelector(`#hid_${id}`).remove();
|
|
1193
|
+
glitter.document.getElementById(`c_${richID}`).style.visibility = 'visible';
|
|
1209
1194
|
}
|
|
1210
1195
|
}
|
|
1211
1196
|
}, 100);
|
|
@@ -1071,18 +1071,17 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1071
1071
|
bind: id,
|
|
1072
1072
|
view: () => {
|
|
1073
1073
|
return html`
|
|
1074
|
-
<div class="w-100 d-flex align-items-center justify-content-center p-3 ${richID}-loading">
|
|
1075
|
-
<div class="spinner-border"></div>
|
|
1076
|
-
</div>
|
|
1077
|
-
<div id="${richID}" style="position: relative;"></div>
|
|
1078
1074
|
<div
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1075
|
+
class="w-100 bg-white d-flex align-items-center justify-content-center flex-column "
|
|
1076
|
+
style="top:0px;left:0px;height:${obj.rich_height || '100%'};min-height:${obj.setHeight ?? 350};z-index:9999;"
|
|
1077
|
+
id="hid_${id}"
|
|
1082
1078
|
>
|
|
1083
1079
|
<div class="spinner-border"></div>
|
|
1084
1080
|
載入中
|
|
1085
1081
|
</div>
|
|
1082
|
+
<div id="c_${richID}" class="w-100" style="visibility: hidden;">
|
|
1083
|
+
<div id="${richID}" style="position: relative;"></div>
|
|
1084
|
+
</div>
|
|
1086
1085
|
`;
|
|
1087
1086
|
},
|
|
1088
1087
|
divCreate: {
|
|
@@ -1210,22 +1209,17 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1210
1209
|
H6: '標題 6',
|
|
1211
1210
|
},
|
|
1212
1211
|
});
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
if (
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
gvc.glitter.document.querySelector(`#hid_${id}`)!!.remove();
|
|
1225
|
-
editor.html.set(obj.def || '');
|
|
1226
|
-
}
|
|
1227
|
-
}, 200);
|
|
1228
|
-
}
|
|
1212
|
+
// if (loading) {
|
|
1213
|
+
// loading = false;
|
|
1214
|
+
// loadingView = true;
|
|
1215
|
+
// setTimeout(() => {
|
|
1216
|
+
// delay = false;
|
|
1217
|
+
// if (!loadingView && !delay) {
|
|
1218
|
+
// gvc.glitter.document.querySelector(`#hid_${id}`)!!.remove();
|
|
1219
|
+
// editor.html.set(obj.def || '');
|
|
1220
|
+
// }
|
|
1221
|
+
// }, 200);
|
|
1222
|
+
// }
|
|
1229
1223
|
|
|
1230
1224
|
function checkRender() {
|
|
1231
1225
|
for (const toolBar of toolBarArray) {
|
|
@@ -1248,10 +1242,6 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1248
1242
|
return;
|
|
1249
1243
|
} else {
|
|
1250
1244
|
loadingView = false;
|
|
1251
|
-
if (!loadingView && !delay) {
|
|
1252
|
-
gvc.glitter.document.querySelector(`#hid_${id}`)!!.remove();
|
|
1253
|
-
editor.html.set(obj.def || '');
|
|
1254
|
-
}
|
|
1255
1245
|
const target: any = glitter.document.querySelector(`#` + richID).querySelector(`[data-cmd="insertImage"]`);
|
|
1256
1246
|
target.outerHTML = html` <button
|
|
1257
1247
|
id="insertImage-replace"
|
|
@@ -1312,7 +1302,7 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1312
1302
|
glitter.document.querySelector(`#` + richID).querySelector(`.fr-view`).style.minHeight = 'auto';
|
|
1313
1303
|
glitter.document.querySelector(`#` + richID).querySelector(`.fr-view`).style.overflowY = 'auto';
|
|
1314
1304
|
}
|
|
1315
|
-
|
|
1305
|
+
editor.html.set(obj.def || '');
|
|
1316
1306
|
if (obj.readonly) {
|
|
1317
1307
|
editor.edit.off();
|
|
1318
1308
|
editor.toolbar.disable();
|
|
@@ -1320,6 +1310,8 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
1320
1310
|
|
|
1321
1311
|
console.info(`${richID} rendered richtext`);
|
|
1322
1312
|
glitter.share.richTextRendering = false;
|
|
1313
|
+
gvc.glitter.document.querySelector(`#hid_${id}`)!!.remove();
|
|
1314
|
+
(glitter.document.getElementById(`c_${richID}`) as any).style.visibility = 'visible';
|
|
1323
1315
|
}
|
|
1324
1316
|
}
|
|
1325
1317
|
}, 100);
|