ts-glitter 19.7.7 → 19.7.9

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
@@ -141,7 +141,7 @@ export class Entry {
141
141
  }
142
142
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
143
143
  console.log(`Entry-time:`, window.renderClock.stop());
144
- glitter.share.editerVersion = 'V_19.7.7';
144
+ glitter.share.editerVersion = 'V_19.7.9';
145
145
  glitter.share.start = new Date();
146
146
  const vm = { appConfig: [] };
147
147
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -140,7 +140,7 @@ export class Entry {
140
140
  }
141
141
  (window as any).renderClock = (window as any).renderClock ?? createClock();
142
142
  console.log(`Entry-time:`, (window as any).renderClock.stop());
143
- glitter.share.editerVersion = 'V_19.7.7';
143
+ glitter.share.editerVersion = 'V_19.7.9';
144
144
  glitter.share.start = new Date();
145
145
  const vm = { appConfig: [] };
146
146
  (window as any).saasConfig = {
@@ -974,7 +974,7 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
974
974
  '|',
975
975
  'formatOL',
976
976
  'emoticons',
977
- 'html',
977
+ 'html'
978
978
  ];
979
979
  return {
980
980
  bind: id,
@@ -1043,6 +1043,25 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1043
1043
  catch (e) { }
1044
1044
  obj.callback(doc.documentElement.outerHTML);
1045
1045
  }
1046
+ FroalaEditor.DefineIcon('altManager', {
1047
+ "NAME": "commenting",
1048
+ "FA5NAME": "comment-alt",
1049
+ "SVG_KEY": "imageCaption"
1050
+ });
1051
+ FroalaEditor.RegisterCommand('altManager', {
1052
+ title: 'alt設定',
1053
+ icon: 'altManager',
1054
+ undo: true,
1055
+ focus: true,
1056
+ showOnMobile: true,
1057
+ refreshAfterCallback: true,
1058
+ callback: function () {
1059
+ console.log(this.html.get());
1060
+ },
1061
+ refresh: function () {
1062
+ console.log(this.selection.element());
1063
+ }
1064
+ });
1046
1065
  editor = new FroalaEditor('#' + richID, {
1047
1066
  enter: FroalaEditor.ENTER_DIV,
1048
1067
  language: 'zh_tw',
@@ -1126,6 +1145,10 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1126
1145
  initEvent();
1127
1146
  }, 200);
1128
1147
  },
1148
+ 'mouseup': function () {
1149
+ console.log('光標位置可能改變 (滑鼠點擊):', editor.selection.get());
1150
+ editor.selection.save();
1151
+ },
1129
1152
  },
1130
1153
  key: 'hWA2C-7I2B2C4B3E4E2G3wd1DBKSPF1WKTUCQOa1OURPJ1KDe2F-11D2C2D2D2C3B3C1D6B1C2==',
1131
1154
  toolbarButtons: toolBarArray,
@@ -1125,12 +1125,13 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1125
1125
  'insertTable',
1126
1126
  'insertLink',
1127
1127
  'insertImage',
1128
+ // 'altManager',
1128
1129
  'insertVideo',
1129
1130
  'insertHR',
1130
1131
  '|',
1131
1132
  'formatOL',
1132
1133
  'emoticons',
1133
- 'html',
1134
+ 'html'
1134
1135
  ];
1135
1136
 
1136
1137
  return {
@@ -1180,7 +1181,6 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1180
1181
  let loading = true;
1181
1182
  let delay = true;
1182
1183
  let loadingView = false;
1183
-
1184
1184
  const interval = setInterval(() => {
1185
1185
  if ((glitter.window as any).FroalaEditor && !glitter.share.richTextRendering) {
1186
1186
  clearInterval(interval);
@@ -1206,6 +1206,26 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1206
1206
  obj.callback(doc.documentElement.outerHTML);
1207
1207
  }
1208
1208
 
1209
+ FroalaEditor.DefineIcon('altManager',{
1210
+ "NAME": "commenting",
1211
+ "FA5NAME": "comment-alt",
1212
+ "SVG_KEY": "imageCaption"
1213
+ })
1214
+ FroalaEditor.RegisterCommand('altManager', {
1215
+ title: 'alt設定',
1216
+ icon: 'altManager',
1217
+ undo: true,
1218
+ focus: true,
1219
+ showOnMobile: true,
1220
+ refreshAfterCallback: true,
1221
+ callback: function () {
1222
+ console.log (this.html.get());
1223
+ },
1224
+ refresh: function () {
1225
+ console.log (this.selection.element());
1226
+ }
1227
+ })
1228
+
1209
1229
  editor = new FroalaEditor('#' + richID, {
1210
1230
  enter: FroalaEditor.ENTER_DIV,
1211
1231
  language: 'zh_tw',
@@ -1314,10 +1334,13 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1314
1334
  // console.log('光標位置可能改變 (滑鼠點擊):', editor.selection.get());
1315
1335
  // editor.selection.save()
1316
1336
  // },
1337
+ 'mouseup': function () {
1338
+ console.log('光標位置可能改變 (滑鼠點擊):', editor.selection.get());
1339
+ editor.selection.save()
1340
+ },
1317
1341
  // // 當編輯器獲得焦點時觸發
1318
1342
  // 'focus': function () {
1319
1343
  // console.log('光標位置改變 (焦點獲得):', editor.selection.get());
1320
- // editor.selection.save()
1321
1344
  // }
1322
1345
  },
1323
1346
  key: 'hWA2C-7I2B2C4B3E4E2G3wd1DBKSPF1WKTUCQOa1OURPJ1KDe2F-11D2C2D2D2C3B3C1D6B1C2==',
@@ -45,7 +45,8 @@ ${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text
45
45
  });
46
46
  }
47
47
  else {
48
- gvc.notifyDataChange(['js-cart-count', 'checkout-index']);
48
+ gvc.notifyDataChange(['js-cart-count']);
49
+ (gvc.glitter.share.reloadCartData) && (gvc.glitter.share.reloadCartData());
49
50
  clearInterval(interVal);
50
51
  }
51
52
  }, 300);
@@ -37,8 +37,8 @@ ${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text
37
37
  })
38
38
  });
39
39
  } else {
40
- gvc.notifyDataChange(['js-cart-count','checkout-index'])
41
-
40
+ gvc.notifyDataChange(['js-cart-count']);
41
+ (gvc.glitter.share.reloadCartData) && (gvc.glitter.share.reloadCartData())
42
42
  clearInterval(interVal)
43
43
  }
44
44
  }, 300)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "19.7.7",
3
+ "version": "19.7.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -67,7 +67,7 @@ class SMS {
67
67
  await this.usePoints({
68
68
  message: obj.data,
69
69
  user_count: 1,
70
- order_id: (obj.order_id || (await tool_js_1.default.randomNumber(10))) + '_' + (await tool_js_1.default.randomNumber(4)),
70
+ order_id: (obj.order_id || (await tool_js_1.default.randomNumber(10))) + '_' + (await tool_js_1.default.randomNumber(5)),
71
71
  phone: obj.phone,
72
72
  });
73
73
  return new Promise((resolve, reject) => {