ts-glitter 17.2.2 → 17.2.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
@@ -89,7 +89,7 @@ export class Entry {
89
89
  }
90
90
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : clockF();
91
91
  console.log(`Entry-time:`, window.renderClock.stop());
92
- glitter.share.editerVersion = 'V_17.2.2';
92
+ glitter.share.editerVersion = 'V_17.2.4';
93
93
  glitter.share.start = new Date();
94
94
  const vm = {
95
95
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -90,7 +90,7 @@ export class Entry {
90
90
  }
91
91
  (window as any).renderClock = (window as any).renderClock ?? clockF();
92
92
  console.log(`Entry-time:`, (window as any).renderClock.stop());
93
- glitter.share.editerVersion = 'V_17.2.2';
93
+ glitter.share.editerVersion = 'V_17.2.4';
94
94
  glitter.share.start = new Date();
95
95
  const vm: {
96
96
  appConfig: any;
@@ -32,6 +32,7 @@ export class BgCustomerMessage {
32
32
  const html = String.raw;
33
33
  const vm = BgCustomerMessage.vm;
34
34
  gvc.addStyle(`
35
+
35
36
  .btn-white-primary {
36
37
  border: 2px solid #ffb400;;
37
38
  justify-content: space-between;
@@ -75,7 +76,7 @@ export class BgCustomerMessage {
75
76
  if (!BgCustomerMessage.visible) {
76
77
  return html `
77
78
  <div class="d-flex align-items-center justify-content-center w-100 flex-column pt-3">
78
- <div class="spinner-border" role="status">
79
+ <div class="spinner-border" role="status" >
79
80
  <span class="sr-only"></span>
80
81
  </div>
81
82
  <span class="mt-2">載入中...</span>
@@ -47,6 +47,7 @@ export class BgCustomerMessage {
47
47
  const html = String.raw;
48
48
  const vm = BgCustomerMessage.vm;
49
49
  gvc.addStyle(`
50
+
50
51
  .btn-white-primary {
51
52
  border: 2px solid #ffb400;;
52
53
  justify-content: space-between;
@@ -88,11 +89,11 @@ export class BgCustomerMessage {
88
89
  bind: BgCustomerMessage.id,
89
90
  view: () => {
90
91
 
91
-
92
92
  if (!BgCustomerMessage.visible) {
93
+
93
94
  return html`
94
95
  <div class="d-flex align-items-center justify-content-center w-100 flex-column pt-3">
95
- <div class="spinner-border" role="status">
96
+ <div class="spinner-border" role="status" >
96
97
  <span class="sr-only"></span>
97
98
  </div>
98
99
  <span class="mt-2">載入中...</span>
@@ -91,6 +91,7 @@ export class Glitter {
91
91
  }
92
92
  }
93
93
 
94
+
94
95
  /*Getter*/
95
96
 
96
97
  //@ts-ignore
@@ -199,7 +199,9 @@ export class Footer01 {
199
199
  }
200
200
  })}"
201
201
  >
202
- <a class="f-aclass" title="${chi.title}">${chi.title}</a>
202
+ <a class="f-aclass" title="${chi.title}" onclick="${gvc.event((e, event) => {
203
+ event.preventDefault();
204
+ })}" href="${chi.link}">${chi.title}</a>
203
205
  </li>`;
204
206
  })
205
207
  .join('')}
@@ -212,7 +212,9 @@ export class Footer01 {
212
212
  }
213
213
  })}"
214
214
  >
215
- <a class="f-aclass" title="${chi.title}">${chi.title}</a>
215
+ <a class="f-aclass" title="${chi.title}" onclick="${gvc.event((e,event) => {
216
+ event.preventDefault();
217
+ })}" href="${chi.link}">${chi.title}</a>
216
218
  </li>`;
217
219
  })
218
220
  .join('')}
@@ -124,7 +124,9 @@ export class Footer02 {
124
124
  }
125
125
  })}"
126
126
  >
127
- <a class="f-aclass" title="${chi.title}">${chi.title}</a>
127
+ <a class="f-aclass" title="${chi.title}" onclick="${gvc.event((e, event) => {
128
+ event.preventDefault();
129
+ })}" href="${chi.link}">${chi.title}</a>
128
130
  </li>`;
129
131
  })
130
132
  .join('')}
@@ -139,7 +139,9 @@ export class Footer02 {
139
139
  }
140
140
  })}"
141
141
  >
142
- <a class="f-aclass" title="${chi.title}">${chi.title}</a>
142
+ <a class="f-aclass" title="${chi.title}" onclick="${gvc.event((e,event) => {
143
+ event.preventDefault();
144
+ })}" href="${chi.link}">${chi.title}</a>
143
145
  </li>`;
144
146
  })
145
147
  .join('')}
@@ -173,7 +173,9 @@ export class Footer02 {
173
173
  }
174
174
  })}"
175
175
  >
176
- <a class="f-aclass" title="${chi.title}">${chi.title}</a>
176
+ <a class="f-aclass" title="${chi.title}" onclick="${gvc.event((e, event) => {
177
+ event.preventDefault();
178
+ })}" href="${chi.link}">${chi.title}</a>
177
179
  </li>`;
178
180
  })
179
181
  .join('')}
@@ -187,7 +187,9 @@ export class Footer02 {
187
187
  }
188
188
  })}"
189
189
  >
190
- <a class="f-aclass" title="${chi.title}">${chi.title}</a>
190
+ <a class="f-aclass" title="${chi.title}" onclick="${gvc.event((e,event) => {
191
+ event.preventDefault();
192
+ })}" href="${chi.link}">${chi.title}</a>
191
193
  </li>`;
192
194
  })
193
195
  .join('')}
@@ -196,7 +196,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
196
196
  changePage('index', 'home', {});
197
197
  })}"
198
198
  >
199
- <img src="${widget.formData.logo}" style="${document.body.clientWidth < 800 ? `max-height: 100%;max-width:200px;` : `height: 150px;`}" />
199
+ <img src="${widget.formData.logo}" style="${document.body.clientWidth < 800 ? `max-height: 76px;max-width:200px;` : `height: 150px;`}" />
200
200
  </div>
201
201
  </div>
202
202
  <!--選單列表顯示區塊-->
@@ -248,7 +248,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
248
248
  })}
249
249
  </ul>
250
250
  </div>
251
- <div class="d-flex align-items-center position-relative position-lg-absolute" style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` : ``}">
251
+ <div class="d-flex align-items-center ${document.body.clientWidth >= 800 ? `position-lg-absolute` : `position-relative`} " style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` : ``}">
252
252
  <!--固定按鈕顯示區塊-->
253
253
  <ul class="navbar-nav flex-row ms-auto">
254
254
  ${gvc.bindView(() => {
@@ -200,7 +200,7 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
200
200
  changePage('index', 'home', {});
201
201
  })}"
202
202
  >
203
- <img src="${widget.formData.logo}" style="${document.body.clientWidth < 800 ? `max-height: 100%;max-width:200px;` : `height: 150px;`}" />
203
+ <img src="${widget.formData.logo}" style="${document.body.clientWidth < 800 ? `max-height: 76px;max-width:200px;` : `height: 150px;`}" />
204
204
  </div>
205
205
  </div>
206
206
  <!--選單列表顯示區塊-->
@@ -252,7 +252,7 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
252
252
  })}
253
253
  </ul>
254
254
  </div>
255
- <div class="d-flex align-items-center position-relative position-lg-absolute" style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` : ``}">
255
+ <div class="d-flex align-items-center ${document.body.clientWidth>=800 ? `position-lg-absolute`:`position-relative`} " style="${document.body.clientWidth > 800 ? `top:10px;right:30px;` : ``}">
256
256
  <!--固定按鈕顯示區塊-->
257
257
  <ul class="navbar-nav flex-row ms-auto">
258
258
  ${gvc.bindView(() => {
@@ -300,34 +300,17 @@ export class ProductDetail {
300
300
  <div style="align-self: stretch; height: 0px; border: 1px ${ProductDetail.titleFontColor} solid"></div>
301
301
  </div>
302
302
  </div>
303
- <div class="w-100 d-flex align-items-center justify-content-center py-3 py-sm-4">
304
- <div
305
- class=""
306
- style="${product.length <
307
- glitter.ut.frSize({
308
- sm: 4,
309
- lg: 6,
310
- }, 2)
311
- ? `width:${200 * product.length}px;`
312
- : `width:100%;`}"
313
- >
314
- <div class="swiper w-100" id="${swipID}">
315
- <div class="swiper-wrapper">
316
- ${product
303
+ <div class="w-100 row p-0 align-items-center justify-content-center mt-4 mt-lg-4 mx-0">
304
+ ${product
317
305
  .map((dd, index) => {
318
- return html ` <div class="swiper-slide" style="width:100%;height: 350px;">
319
- ${glitter.htmlGenerate.renderComponent({
306
+ return `<div class="col-6 col-sm-4 col-lg-3">${glitter.htmlGenerate.renderComponent({
320
307
  appName: window.appName,
321
308
  tag: 'product_widget',
322
309
  gvc: gvc,
323
310
  subData: dd,
324
- })}
325
- </div>`;
311
+ })}</div>`;
326
312
  })
327
313
  .join('')}
328
- </div>
329
- </div>
330
- </div>
331
314
  </div>
332
315
  `);
333
316
  }));
@@ -337,37 +337,17 @@ export class ProductDetail {
337
337
  <div style="align-self: stretch; height: 0px; border: 1px ${ProductDetail.titleFontColor} solid"></div>
338
338
  </div>
339
339
  </div>
340
- <div class="w-100 d-flex align-items-center justify-content-center py-3 py-sm-4">
341
- <div
342
- class=""
343
- style="${product.length <
344
- glitter.ut.frSize(
345
- {
346
- sm: 4,
347
- lg: 6,
348
- },
349
- 2
350
- )
351
- ? `width:${200 * product.length}px;`
352
- : `width:100%;`}"
353
- >
354
- <div class="swiper w-100" id="${swipID}">
355
- <div class="swiper-wrapper">
356
- ${product
357
- .map((dd: any, index: number) => {
358
- return html` <div class="swiper-slide" style="width:100%;height: 350px;">
359
- ${glitter.htmlGenerate.renderComponent({
360
- appName: (window as any).appName,
361
- tag: 'product_widget',
362
- gvc: gvc,
363
- subData: dd,
364
- })}
365
- </div>`;
366
- })
367
- .join('')}
368
- </div>
369
- </div>
370
- </div>
340
+ <div class="w-100 row p-0 align-items-center justify-content-center mt-4 mt-lg-4 mx-0">
341
+ ${product
342
+ .map((dd: any, index: number) => {
343
+ return `<div class="col-6 col-sm-4 col-lg-3">${glitter.htmlGenerate.renderComponent({
344
+ appName: (window as any).appName,
345
+ tag: 'product_widget',
346
+ gvc: gvc,
347
+ subData: dd,
348
+ })}</div>`
349
+ })
350
+ .join('')}
371
351
  </div>
372
352
  `);
373
353
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "17.2.2",
3
+ "version": "17.2.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -282,9 +282,6 @@ class Shopping {
282
282
  query.min_price && querySql.push(`(id in (select product_id from \`${this.app}\`.t_variants where content->>'$.sale_price'>=${query.min_price})) `);
283
283
  query.max_price && querySql.push(`(id in (select product_id from \`${this.app}\`.t_variants where content->>'$.sale_price'<=${query.max_price})) `);
284
284
  const products = await this.querySql(querySql, query);
285
- querySql.map((dd) => {
286
- console.log(`querySql=>${dd}`);
287
- });
288
285
  const productList = (Array.isArray(products.data) ? products.data : [products.data]).filter((product) => product);
289
286
  if (this.token && this.token.userID) {
290
287
  for (const b of productList) {
@@ -384,7 +381,6 @@ class Shopping {
384
381
  FROM \`${this.app}\`.t_manager_post
385
382
  WHERE ${querySql.join(' and ')} ${query.order_by || `order by id desc`}
386
383
  `;
387
- console.log(`query.order_by=>`, query.order_by);
388
384
  if (query.id) {
389
385
  const data = (await database_js_1.default.query(`SELECT *
390
386
  FROM (${sql}) as subqyery