ts-glitter 13.8.65 → 13.8.661

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
@@ -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.65';
67
+ glitter.share.editerVersion = 'V_13.8.661';
68
68
  glitter.share.start = new Date();
69
69
  const vm = {
70
70
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -64,7 +64,7 @@ export class Entry {
64
64
  }
65
65
  (window as any).renderClock = (window as any).renderClock ?? clockF();
66
66
  console.log(`Entry-time:`, (window as any).renderClock.stop());
67
- glitter.share.editerVersion = 'V_13.8.65';
67
+ glitter.share.editerVersion = 'V_13.8.661';
68
68
  glitter.share.start = new Date();
69
69
  const vm: {
70
70
  appConfig: any;
@@ -1192,11 +1192,7 @@ text-transform: uppercase;" onclick="${gvc.event(() => {
1192
1192
  gvc.glitter.innerDialog((gvc) => {
1193
1193
  gvc.glitter.runJsInterFace('credit_card', {
1194
1194
  amount: `${orderDetail.total}`,
1195
- memo: orderDetail.lineItems
1196
- .map((data) => {
1197
- return `${data.title} * ${data.count}`;
1198
- })
1199
- .join(','),
1195
+ memo: `訂單ID:${orderDetail.id}`,
1200
1196
  }, (res) => {
1201
1197
  if (res.result) {
1202
1198
  gvc.closeDialog();
@@ -1637,7 +1633,7 @@ text-transform: uppercase;" onclick="${gvc.event(() => {
1637
1633
  setTimeout(() => __awaiter(this, void 0, void 0, function* () {
1638
1634
  yield IminPrintInstance.printAndFeedPaper(5);
1639
1635
  yield IminPrintInstance.setQrCodeSize(2);
1640
- yield IminPrintInstance.setDoubleQRSize(3);
1636
+ yield IminPrintInstance.setDoubleQRSize(4);
1641
1637
  yield IminPrintInstance.setDoubleQR1MarginLeft(10);
1642
1638
  yield IminPrintInstance.setDoubleQR2MarginLeft(520);
1643
1639
  const ba = (new Blob([invoice.qrcode_0]).size - (new Blob([invoice.qrcode_1]).size)) * 1.1;
@@ -1238,18 +1238,13 @@ text-transform: uppercase;" onclick="${gvc.event(() => {
1238
1238
  function next() {
1239
1239
  PaymentPage.selectInvoice(gvc, orderDetail, vm, passData);
1240
1240
  }
1241
-
1242
1241
  gvc.glitter.innerDialog(
1243
1242
  (gvc: GVC) => {
1244
1243
  gvc.glitter.runJsInterFace(
1245
1244
  'credit_card',
1246
1245
  {
1247
1246
  amount: `${orderDetail.total}`,
1248
- memo: orderDetail.lineItems
1249
- .map((data: any) => {
1250
- return `${data.title} * ${data.count}`;
1251
- })
1252
- .join(','),
1247
+ memo: `訂單ID:${orderDetail.id}`,
1253
1248
  },
1254
1249
  (res: any) => {
1255
1250
  if (res.result) {
@@ -1735,7 +1730,7 @@ text-transform: uppercase;" onclick="${gvc.event(() => {
1735
1730
  setTimeout(async ()=>{
1736
1731
  await IminPrintInstance.printAndFeedPaper(5)
1737
1732
  await IminPrintInstance.setQrCodeSize(2);
1738
- await IminPrintInstance.setDoubleQRSize(3)
1733
+ await IminPrintInstance.setDoubleQRSize(4)
1739
1734
  await IminPrintInstance.setDoubleQR1MarginLeft(10)
1740
1735
  await IminPrintInstance.setDoubleQR2MarginLeft(520)
1741
1736
  const ba=(new Blob([invoice.qrcode_0]).size - (new Blob([invoice.qrcode_1]).size))*1.1
@@ -91,8 +91,8 @@ export class ProductDetail {
91
91
  });
92
92
  return html `<div class="container">
93
93
  <div class="row" style="${isPhone ? 'margin: 1rem 0; width: 100%;' : 'margin: 7rem;'}">
94
- <div class="col-12 col-md-6 px-0 px-md-3">
95
- <div class="swiper" style="height: ${document.body.clientWidth > 450 ? 450 : document.body.clientWidth - 40}px;">
94
+ <div class="col-12 col-md-6 px-0 px-md-3" id="swiper-container">
95
+ <div class="swiper" id="dynamic-swiper">
96
96
  <div class="swiper-wrapper">
97
97
  ${prod.preview_image
98
98
  .map((image, index) => {
@@ -117,7 +117,7 @@ export class ProductDetail {
117
117
  </div>
118
118
  </div>
119
119
  </div>
120
- <div class="col-12 col-md-6 px-0 px-md-3 d-flex flex-column gap-2 mt-4 mt-md-0">${PdClass.selectSpec({ gvc, titleFontColor, prod, vm })}</div>
120
+ <div class="col-12 col-md-6 px-0 px-md-3 d-flex flex-column gap-2 mt-4 mt-md-0">${PdClass.selectSpec({ gvc, titleFontColor, prod, vm })}</div>
121
121
  </div>
122
122
  <div style="d-flex flex-column align-items-center mt-4">
123
123
  ${gvc.bindView((() => {
@@ -243,6 +243,19 @@ export class ProductDetail {
243
243
  clearInterval(si);
244
244
  }
245
245
  }, 200);
246
+ function updateSwiperHeight() {
247
+ const size = setTimeout(() => {
248
+ const container = document.getElementById('swiper-container');
249
+ const swiper = document.getElementById('dynamic-swiper');
250
+ if (swiper && container) {
251
+ const rem = document.body.clientWidth > 768 ? '2rem' : '0rem';
252
+ swiper.style.height = `calc(${container.clientWidth}px - ${rem})`;
253
+ clearInterval(size);
254
+ }
255
+ }, 200);
256
+ }
257
+ updateSwiperHeight();
258
+ window.addEventListener('resize', updateSwiperHeight);
246
259
  }
247
260
  },
248
261
  });
@@ -55,9 +55,9 @@ export class ProductDetail {
55
55
 
56
56
  public static main(gvc: GVC, widget: any, subData: any) {
57
57
  //移除所有查詢
58
- const url=new URL(location.href)
59
- for (const b of url.searchParams.keys()){
60
- gvc.glitter.setUrlParameter(b,undefined);
58
+ const url = new URL(location.href);
59
+ for (const b of url.searchParams.keys()) {
60
+ gvc.glitter.setUrlParameter(b, undefined);
61
61
  }
62
62
  const glitter = gvc.glitter;
63
63
  const isPhone = document.body.clientWidth < 768;
@@ -106,8 +106,8 @@ export class ProductDetail {
106
106
 
107
107
  return html`<div class="container">
108
108
  <div class="row" style="${isPhone ? 'margin: 1rem 0; width: 100%;' : 'margin: 7rem;'}">
109
- <div class="col-12 col-md-6 px-0 px-md-3">
110
- <div class="swiper" style="height: ${document.body.clientWidth > 450 ? 450 : document.body.clientWidth - 40}px;">
109
+ <div class="col-12 col-md-6 px-0 px-md-3" id="swiper-container">
110
+ <div class="swiper" id="dynamic-swiper">
111
111
  <div class="swiper-wrapper">
112
112
  ${prod.preview_image
113
113
  .map((image, index) => {
@@ -132,7 +132,7 @@ export class ProductDetail {
132
132
  </div>
133
133
  </div>
134
134
  </div>
135
- <div class="col-12 col-md-6 px-0 px-md-3 d-flex flex-column gap-2 mt-4 mt-md-0">${PdClass.selectSpec({ gvc, titleFontColor, prod, vm })}</div>
135
+ <div class="col-12 col-md-6 px-0 px-md-3 d-flex flex-column gap-2 mt-4 mt-md-0">${PdClass.selectSpec({ gvc, titleFontColor, prod, vm })}</div>
136
136
  </div>
137
137
  <div style="d-flex flex-column align-items-center mt-4">
138
138
  ${gvc.bindView(
@@ -267,10 +267,23 @@ export class ProductDetail {
267
267
  swiper: thumbs,
268
268
  },
269
269
  });
270
-
271
270
  clearInterval(si);
272
271
  }
273
272
  }, 200);
273
+
274
+ function updateSwiperHeight() {
275
+ const size = setTimeout(() => {
276
+ const container = document.getElementById('swiper-container');
277
+ const swiper = document.getElementById('dynamic-swiper');
278
+ if (swiper && container) {
279
+ const rem = document.body.clientWidth > 768 ? '2rem' : '0rem';
280
+ swiper.style.height = `calc(${container.clientWidth}px - ${rem})`;
281
+ clearInterval(size);
282
+ }
283
+ }, 200);
284
+ }
285
+ updateSwiperHeight();
286
+ window.addEventListener('resize', updateSwiperHeight);
274
287
  }
275
288
  },
276
289
  });
@@ -0,0 +1,6 @@
1
+ export class UMInfo {
2
+ static main(gvc, widget, subData) {
3
+ return '123';
4
+ }
5
+ }
6
+ window.glitter.setModule(import.meta.url, UMInfo);
@@ -0,0 +1,9 @@
1
+ import { GVC } from '../../glitterBundle/GVController.js';
2
+
3
+ export class UMInfo {
4
+ static main(gvc: GVC, widget: any, subData: any) {
5
+ return '123';
6
+ }
7
+ }
8
+
9
+ (window as any).glitter.setModule(import.meta.url, UMInfo);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "13.8.65",
3
+ "version": "13.8.661",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {