ts-glitter 17.0.8 → 17.1.1

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
@@ -88,7 +88,7 @@ export class Entry {
88
88
  }
89
89
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : clockF();
90
90
  console.log(`Entry-time:`, window.renderClock.stop());
91
- glitter.share.editerVersion = 'V_17.0.8';
91
+ glitter.share.editerVersion = 'V_17.1.1';
92
92
  glitter.share.start = new Date();
93
93
  const vm = {
94
94
  appConfig: [],
@@ -463,6 +463,7 @@ export class Entry {
463
463
  callback();
464
464
  }
465
465
  static toNormalRender(glitter, vm, callback) {
466
+ glitter.addStyleLink([`https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css`]);
466
467
  glitter.addMtScript([
467
468
  {
468
469
  src: `https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js`,
package/lowcode/Entry.ts CHANGED
@@ -10,6 +10,7 @@ import {Language} from './glitter-base/global/language.js';
10
10
 
11
11
  export class Entry {
12
12
  public static onCreate(glitter: Glitter) {
13
+
13
14
  //預設為購物網站
14
15
  (window as any).store_info.web_type = (window as any).store_info.web_type ?? ['shop']
15
16
  const shopp=localStorage.getItem('shopee')
@@ -88,7 +89,7 @@ export class Entry {
88
89
  }
89
90
  (window as any).renderClock = (window as any).renderClock ?? clockF();
90
91
  console.log(`Entry-time:`, (window as any).renderClock.stop());
91
- glitter.share.editerVersion = 'V_17.0.8';
92
+ glitter.share.editerVersion = 'V_17.1.1';
92
93
  glitter.share.start = new Date();
93
94
  const vm: {
94
95
  appConfig: any;
@@ -504,6 +505,7 @@ export class Entry {
504
505
  }
505
506
 
506
507
  public static toNormalRender(glitter: Glitter, vm: any, callback: () => void) {
508
+ glitter.addStyleLink([`https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css`])
507
509
  glitter.addMtScript(
508
510
  [
509
511
  {
@@ -1134,24 +1134,6 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1134
1134
  initEvent();
1135
1135
  }, 200);
1136
1136
  },
1137
- 'keydown': function () {
1138
- console.log('光標位置可能改變 (按下鍵):', editor.selection.get());
1139
- editor.selection.save();
1140
- dataChange();
1141
- },
1142
- 'keyup': function () {
1143
- console.log('光標位置改變 (鬆開鍵):', editor.selection.get());
1144
- editor.selection.save();
1145
- dataChange();
1146
- },
1147
- 'mouseup': function () {
1148
- console.log('光標位置可能改變 (滑鼠點擊):', editor.selection.get());
1149
- editor.selection.save();
1150
- },
1151
- 'focus': function () {
1152
- console.log('光標位置改變 (焦點獲得):', editor.selection.get());
1153
- editor.selection.save();
1154
- }
1155
1137
  },
1156
1138
  key: 'hWA2C-7I2B2C4B3E4E2G3wd1DBKSPF1WKTUCQOa1OURPJ1KDe2F-11D2C2D2D2C3B3C1D6B1C2==',
1157
1139
  toolbarButtons: toolBarArray,
@@ -1301,26 +1301,26 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
1301
1301
  initEvent();
1302
1302
  }, 200);
1303
1303
  },
1304
- 'keydown': function () {
1305
- console.log('光標位置可能改變 (按下鍵):', editor.selection.get());
1306
- editor.selection.save()
1307
- dataChange()
1308
- },
1309
- // 在鬆開按鍵時觸發
1310
- 'keyup': function () {
1311
- console.log('光標位置改變 (鬆開鍵):', editor.selection.get());
1312
- editor.selection.save()
1313
- dataChange()
1314
- },
1315
- 'mouseup': function () {
1316
- console.log('光標位置可能改變 (滑鼠點擊):', editor.selection.get());
1317
- editor.selection.save()
1318
- },
1319
- // 當編輯器獲得焦點時觸發
1320
- 'focus': function () {
1321
- console.log('光標位置改變 (焦點獲得):', editor.selection.get());
1322
- editor.selection.save()
1323
- }
1304
+ // 'keydown': function () {
1305
+ // console.log('光標位置可能改變 (按下鍵):', editor.selection.get());
1306
+ // editor.selection.save()
1307
+ // dataChange()
1308
+ // },
1309
+ // // 在鬆開按鍵時觸發
1310
+ // 'keyup': function () {
1311
+ // console.log('光標位置改變 (鬆開鍵):', editor.selection.get());
1312
+ // editor.selection.save()
1313
+ // dataChange()
1314
+ // },
1315
+ // 'mouseup': function () {
1316
+ // console.log('光標位置可能改變 (滑鼠點擊):', editor.selection.get());
1317
+ // editor.selection.save()
1318
+ // },
1319
+ // // 當編輯器獲得焦點時觸發
1320
+ // 'focus': function () {
1321
+ // console.log('光標位置改變 (焦點獲得):', editor.selection.get());
1322
+ // editor.selection.save()
1323
+ // }
1324
1324
  },
1325
1325
  key: 'hWA2C-7I2B2C4B3E4E2G3wd1DBKSPF1WKTUCQOa1OURPJ1KDe2F-11D2C2D2D2C3B3C1D6B1C2==',
1326
1326
  toolbarButtons: toolBarArray,
@@ -587,7 +587,7 @@ export class CheckoutIndex {
587
587
  view: () => {
588
588
  return html `
589
589
  <section>
590
- <div class="${gClass('banner-bgr')}">
590
+ <div class="${gClass('banner-bgr')} shadow">
591
591
  <span class="${gClass('banner-text')}"
592
592
  >${Language.text(ApiCart.checkoutCart === ApiCart.buyItNow ? 'buy_it_now' : 'your_shopping_cart')}</span
593
593
  >
@@ -1242,7 +1242,7 @@ export class CheckoutIndex {
1242
1242
  return ``;
1243
1243
  }
1244
1244
  return html `
1245
- <div class="${gClass('banner-bgr')}">
1245
+ <div class="${gClass('banner-bgr')} shadow">
1246
1246
  <span class="${gClass('banner-text')}">${Language.text('additional_purchase_items')}</span>
1247
1247
  </div>
1248
1248
  <div class="d-flex align-items-center w-100" style="overflow-x:auto;gap:10px;">
@@ -1345,7 +1345,7 @@ export class CheckoutIndex {
1345
1345
  return !dd === isSelected;
1346
1346
  });
1347
1347
  return html `
1348
- <div class="${gClass('banner-bgr')}">
1348
+ <div class="${gClass('banner-bgr')} shadow">
1349
1349
  <span class="${gClass('banner-text')}">${dd.title}</span>
1350
1350
  </div>
1351
1351
  <div class="d-flex align-items-center w-100" style="overflow-x:auto;gap:10px;">
@@ -1459,7 +1459,7 @@ export class CheckoutIndex {
1459
1459
  .join('');
1460
1460
  })()}
1461
1461
  <section>
1462
- <div class="${gClass('banner-bgr')}">
1462
+ <div class="${gClass('banner-bgr')} shadow">
1463
1463
  <span class="${gClass('banner-text')}">${Language.text('payment_and_shipping_methods')}</span>
1464
1464
  </div>
1465
1465
  ${vm.cartData.shipment_info ? html ` <div class="pt-2 mx-2 mx-sm-3">${vm.cartData.shipment_info}</div>` : ''}
@@ -1711,7 +1711,7 @@ export class CheckoutIndex {
1711
1711
  </div>
1712
1712
  </section>
1713
1713
  <section class="${['UNIMARTC2C', 'FAMIC2C', 'HILIFEC2C', 'OKMARTC2C'].includes(vm.cartData.user_info.shipment) ? `` : `mt-4`}">
1714
- <div class="${gClass('banner-bgr')}">
1714
+ <div class="${gClass('banner-bgr')} shadow">
1715
1715
  <span class="${gClass('banner-text')}">${Language.text('customer_info')}</span>
1716
1716
  </div>
1717
1717
  ${gvc.bindView(() => {
@@ -1836,7 +1836,7 @@ export class CheckoutIndex {
1836
1836
  })}
1837
1837
  </section>
1838
1838
  <section>
1839
- <div class="${gClass('banner-bgr')}">
1839
+ <div class="${gClass('banner-bgr')} shadow">
1840
1840
  <span class="${gClass('banner-text')}">${Language.text('recipient_info')}</span>
1841
1841
  </div>
1842
1842
  ${gvc.bindView(() => {
@@ -641,7 +641,7 @@ export class CheckoutIndex {
641
641
  view: () => {
642
642
  return html`
643
643
  <section>
644
- <div class="${gClass('banner-bgr')}">
644
+ <div class="${gClass('banner-bgr')} shadow">
645
645
  <span class="${gClass('banner-text')}"
646
646
  >${Language.text(ApiCart.checkoutCart === ApiCart.buyItNow ? 'buy_it_now' : 'your_shopping_cart')}</span
647
647
  >
@@ -1332,7 +1332,7 @@ export class CheckoutIndex {
1332
1332
  return ``;
1333
1333
  }
1334
1334
  return html`
1335
- <div class="${gClass('banner-bgr')}">
1335
+ <div class="${gClass('banner-bgr')} shadow">
1336
1336
  <span class="${gClass('banner-text')}">${Language.text('additional_purchase_items')}</span>
1337
1337
  </div>
1338
1338
  <div class="d-flex align-items-center w-100" style="overflow-x:auto;gap:10px;">
@@ -1439,7 +1439,7 @@ export class CheckoutIndex {
1439
1439
  return !dd === isSelected;
1440
1440
  });
1441
1441
  return html`
1442
- <div class="${gClass('banner-bgr')}">
1442
+ <div class="${gClass('banner-bgr')} shadow">
1443
1443
  <span class="${gClass('banner-text')}">${dd.title}</span>
1444
1444
  </div>
1445
1445
  <div class="d-flex align-items-center w-100" style="overflow-x:auto;gap:10px;">
@@ -1556,7 +1556,7 @@ export class CheckoutIndex {
1556
1556
  .join('');
1557
1557
  })()}
1558
1558
  <section>
1559
- <div class="${gClass('banner-bgr')}">
1559
+ <div class="${gClass('banner-bgr')} shadow">
1560
1560
  <span class="${gClass('banner-text')}">${Language.text('payment_and_shipping_methods')}</span>
1561
1561
  </div>
1562
1562
  ${vm.cartData.shipment_info ? html` <div class="pt-2 mx-2 mx-sm-3">${vm.cartData.shipment_info}</div>` : ''}
@@ -1810,7 +1810,7 @@ export class CheckoutIndex {
1810
1810
  </div>
1811
1811
  </section>
1812
1812
  <section class="${['UNIMARTC2C', 'FAMIC2C', 'HILIFEC2C', 'OKMARTC2C'].includes(vm.cartData.user_info.shipment) ? `` : `mt-4`}">
1813
- <div class="${gClass('banner-bgr')}">
1813
+ <div class="${gClass('banner-bgr')} shadow">
1814
1814
  <span class="${gClass('banner-text')}">${Language.text('customer_info')}</span>
1815
1815
  </div>
1816
1816
  ${gvc.bindView(() => {
@@ -1941,7 +1941,7 @@ export class CheckoutIndex {
1941
1941
  })}
1942
1942
  </section>
1943
1943
  <section>
1944
- <div class="${gClass('banner-bgr')}">
1944
+ <div class="${gClass('banner-bgr')} shadow">
1945
1945
  <span class="${gClass('banner-text')}">${Language.text('recipient_info')}</span>
1946
1946
  </div>
1947
1947
  ${gvc.bindView(() => {
@@ -255,10 +255,10 @@ export class PdClass {
255
255
  const css = String.raw;
256
256
  const isPhone = document.body.clientWidth < 768;
257
257
  obj.gvc.glitter.addStyleLink(['https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css']);
258
- obj.gvc.glitter.addMtScript([{ src: `https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js` }, { src: `https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js` }], () => {
258
+ obj.gvc.glitter.addMtScript([{ src: `https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js` },
259
+ { src: `https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js` }], () => {
259
260
  }, () => {
260
261
  });
261
- console.log(`obj.prod.preview_image=>`, JSON.stringify(obj.prod.preview_image));
262
262
  obj.prod.variants.forEach((variant) => {
263
263
  variant.preview_image = variant[`preview_image_${Language.getLanguage()}`] || variant.preview_image;
264
264
  if (variant.preview_image && !obj.prod.preview_image.includes(variant.preview_image)) {
@@ -371,13 +371,14 @@ export class PdClass {
371
371
  const isPhone = document.body.clientWidth < 768;
372
372
  obj.gvc.glitter.addStyleLink(['https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css']);
373
373
  obj.gvc.glitter.addMtScript(
374
- [{src: `https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js`}, {src: `https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js`}],
374
+ [{src: `https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js`},
375
+ {src: `https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js`}],
375
376
  () => {
376
377
  },
377
378
  () => {
378
379
  }
379
380
  );
380
- console.log(`obj.prod.preview_image=>`,JSON.stringify(obj.prod.preview_image))
381
+
381
382
  obj.prod.variants.forEach((variant) => {
382
383
  variant.preview_image=(variant as any)[`preview_image_${Language.getLanguage()}`] || variant.preview_image;
383
384
  if (variant.preview_image && !obj.prod.preview_image.includes(variant.preview_image)) {
@@ -257,7 +257,7 @@ export class ProductDetail {
257
257
  }
258
258
  return 'margin: 0 10%;';
259
259
  })() + `max-width:100%;`,
260
- class: `pd_detail_content`,
260
+ class: `pd_detail_content fr-view`,
261
261
  },
262
262
  })}
263
263
  </div>
@@ -286,7 +286,7 @@ export class ProductDetail {
286
286
  }
287
287
  return 'margin: 0 10%;';
288
288
  })() + `max-width:100%;`,
289
- class: `pd_detail_content`,
289
+ class: `pd_detail_content fr-view`,
290
290
  },
291
291
  })}
292
292
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "17.0.8",
3
+ "version": "17.1.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {