ts-glitter 21.1.8 → 21.2.0

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.
Files changed (78) hide show
  1. package/lowcode/Entry.js +14 -1
  2. package/lowcode/Entry.ts +13 -1
  3. package/lowcode/backend-manager/bg-line.js +18 -10
  4. package/lowcode/backend-manager/bg-line.ts +19 -10
  5. package/lowcode/backend-manager/bg-list-component.js +1 -2
  6. package/lowcode/backend-manager/bg-list-component.ts +1 -1
  7. package/lowcode/backend-manager/bg-notify.js +17 -10
  8. package/lowcode/backend-manager/bg-notify.ts +19 -11
  9. package/lowcode/backend-manager/bg-recommend.js +15 -9
  10. package/lowcode/backend-manager/bg-recommend.ts +16 -9
  11. package/lowcode/backend-manager/bg-sns.js +16 -9
  12. package/lowcode/backend-manager/bg-sns.ts +18 -11
  13. package/lowcode/backend-manager/bg-widget.js +325 -261
  14. package/lowcode/backend-manager/bg-widget.ts +117 -45
  15. package/lowcode/cms-plugin/auto-fcm-history.js +15 -6
  16. package/lowcode/cms-plugin/auto-fcm-history.ts +18 -11
  17. package/lowcode/cms-plugin/auto-reply.js +17 -1
  18. package/lowcode/cms-plugin/auto-reply.ts +16 -1
  19. package/lowcode/cms-plugin/exhibition-list.js +11 -2
  20. package/lowcode/cms-plugin/exhibition-list.ts +12 -2
  21. package/lowcode/cms-plugin/live_capture.js +2 -2
  22. package/lowcode/cms-plugin/live_capture.ts +2 -2
  23. package/lowcode/cms-plugin/model/order.d.ts +1 -0
  24. package/lowcode/cms-plugin/module/order-excel.js +15 -1
  25. package/lowcode/cms-plugin/module/order-excel.ts +22 -2
  26. package/lowcode/cms-plugin/module/table-storage.js +11 -0
  27. package/lowcode/cms-plugin/module/table-storage.ts +12 -0
  28. package/lowcode/cms-plugin/permission-setting.js +16 -9
  29. package/lowcode/cms-plugin/permission-setting.ts +18 -10
  30. package/lowcode/cms-plugin/reconciliation-area.js +12 -3
  31. package/lowcode/cms-plugin/reconciliation-area.ts +13 -3
  32. package/lowcode/cms-plugin/shopping-allowance-manager.js +12 -3
  33. package/lowcode/cms-plugin/shopping-allowance-manager.ts +13 -3
  34. package/lowcode/cms-plugin/shopping-invoice-manager.js +12 -3
  35. package/lowcode/cms-plugin/shopping-invoice-manager.ts +13 -4
  36. package/lowcode/cms-plugin/shopping-order-manager.js +12 -3
  37. package/lowcode/cms-plugin/shopping-order-manager.ts +13 -4
  38. package/lowcode/cms-plugin/shopping-product-setting.js +16 -10
  39. package/lowcode/cms-plugin/shopping-product-setting.ts +17 -10
  40. package/lowcode/cms-plugin/shopping-product-stock.js +17 -11
  41. package/lowcode/cms-plugin/shopping-product-stock.ts +18 -11
  42. package/lowcode/cms-plugin/shopping-setting-basic.js +129 -38
  43. package/lowcode/cms-plugin/shopping-setting-basic.ts +134 -38
  44. package/lowcode/cms-plugin/stock-history.js +14 -7
  45. package/lowcode/cms-plugin/stock-history.ts +15 -7
  46. package/lowcode/cms-plugin/stock-stores.js +13 -6
  47. package/lowcode/cms-plugin/stock-stores.ts +14 -6
  48. package/lowcode/cms-plugin/stock-vendors.js +13 -6
  49. package/lowcode/cms-plugin/stock-vendors.ts +14 -6
  50. package/lowcode/cms-plugin/user-list.js +24 -7
  51. package/lowcode/cms-plugin/user-list.ts +25 -7
  52. package/lowcode/css/editor.css +9 -4
  53. package/lowcode/public-components/product/pd-class.js +11 -2
  54. package/lowcode/public-components/product/pd-class.ts +16 -3
  55. package/lowcode/public-components/public/ad.js +42 -10
  56. package/lowcode/public-components/public/ad.ts +28 -1
  57. package/lowcode/public-models/product.ts +1 -0
  58. package/lowcode/view-model/saas-view-model.js +394 -379
  59. package/lowcode/view-model/saas-view-model.ts +1451 -1405
  60. package/package.json +1 -1
  61. package/src/api-public/controllers/user.js +4 -4
  62. package/src/api-public/controllers/user.js.map +1 -1
  63. package/src/api-public/controllers/user.ts +4 -4
  64. package/src/api-public/services/checkout-event.js +7 -17
  65. package/src/api-public/services/checkout-event.js.map +1 -1
  66. package/src/api-public/services/fb-api.d.ts +4 -3
  67. package/src/api-public/services/fb-api.js +71 -27
  68. package/src/api-public/services/fb-api.js.map +1 -1
  69. package/src/api-public/services/fb-api.ts +182 -127
  70. package/src/api-public/services/user.d.ts +6 -5
  71. package/src/api-public/services/user.js +19 -27
  72. package/src/api-public/services/user.js.map +1 -1
  73. package/src/api-public/services/user.ts +14 -10
  74. package/src/seo-config.js +1 -0
  75. package/src/seo-config.js.map +1 -1
  76. package/src/seo-config.ts +1 -0
  77. package/src/services/app.js +7 -17
  78. package/src/services/app.js.map +1 -1
@@ -21,6 +21,7 @@ import { BgListComponent } from './bg-list-component.js';
21
21
  import { Tool } from '../modules/tool.js';
22
22
  import { ApiWallet } from '../glitter-base/route/wallet.js';
23
23
  import { ApiSns } from '../glitter-base/route/sms.js';
24
+ import { TableStorage } from '../cms-plugin/module/table-storage.js';
24
25
  const html = String.raw;
25
26
  const inputStyle = 'font-size: 16px; height:40px; width:300px;';
26
27
  export class BgSNS {
@@ -265,6 +266,7 @@ export class BgSNS {
265
266
  query: '',
266
267
  queryType: 'email',
267
268
  filter: {},
269
+ listLimit: TableStorage.getLimit(),
268
270
  };
269
271
  return gvc.bindView(() => {
270
272
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.emailFilterFrame);
@@ -290,17 +292,23 @@ export class BgSNS {
290
292
  gvc,
291
293
  callback: (value) => {
292
294
  vm.queryType = value;
293
- gvc.notifyDataChange(vm.tableId);
294
- gvc.notifyDataChange(id);
295
+ gvc.notifyDataChange([vm.tableId, id]);
295
296
  },
296
297
  default: vm.queryType || 'email',
297
298
  options: FilterOptions.snsSelect,
298
299
  }),
299
300
  BgWidget.searchFilter(gvc.event(e => {
300
301
  vm.query = `${e.value}`.trim();
301
- gvc.notifyDataChange(vm.tableId);
302
- gvc.notifyDataChange(id);
302
+ gvc.notifyDataChange([vm.tableId, id]);
303
303
  }), vm.query || '', '搜尋所有信件內容'),
304
+ BgWidget.countingFilter({
305
+ gvc,
306
+ callback: value => {
307
+ vm.listLimit = value;
308
+ gvc.notifyDataChange([vm.tableId, id]);
309
+ },
310
+ default: vm.listLimit,
311
+ }),
304
312
  BgWidget.funnelFilter({
305
313
  gvc,
306
314
  callback: () => {
@@ -320,10 +328,9 @@ export class BgSNS {
320
328
  gvc: gvc,
321
329
  getData: vmi => {
322
330
  var _a, _b;
323
- const limit = 20;
324
331
  ApiSns.history({
325
332
  page: vmi.page - 1,
326
- limit: limit,
333
+ limit: vm.listLimit,
327
334
  search: (_a = vm.query) !== null && _a !== void 0 ? _a : '',
328
335
  searchType: (_b = vm.queryType) !== null && _b !== void 0 ? _b : 'email',
329
336
  sendTime: undefined,
@@ -409,7 +416,7 @@ export class BgSNS {
409
416
  });
410
417
  }
411
418
  vm.dataList = data.response.data;
412
- vmi.pageSize = Math.ceil(data.response.total / limit);
419
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
413
420
  vmi.originalData = vm.dataList;
414
421
  vmi.tableData = getDatalist();
415
422
  vmi.loading = false;
@@ -843,7 +850,7 @@ export class BgSNS {
843
850
  ApiUser.getUserList({
844
851
  page: 0,
845
852
  limit: 99999,
846
- only_id: true
853
+ only_id: true,
847
854
  }).then(dd => {
848
855
  dd.response.data.map((user) => {
849
856
  if (user.userData.email && user.userData.email.length > 0 && user.userData.phone) {
@@ -1195,7 +1202,7 @@ export class BgSNS {
1195
1202
  ApiUser.getUserList({
1196
1203
  page: 0,
1197
1204
  limit: 99999,
1198
- only_id: true
1205
+ only_id: true,
1199
1206
  }).then(dd => {
1200
1207
  if (dd.response.data) {
1201
1208
  const ids = [];
@@ -9,11 +9,11 @@ import { FormWidget } from '../official_view_component/official/form.js';
9
9
  import { Chat } from '../glitter-base/route/chat.js';
10
10
  import { FilterOptions } from '../cms-plugin/filter-options.js';
11
11
  import { ShoppingDiscountSetting } from '../cms-plugin/shopping-discount-setting.js';
12
- import { ApiSmtp } from '../glitter-base/route/smtp.js';
13
12
  import { BgListComponent } from './bg-list-component.js';
14
13
  import { Tool } from '../modules/tool.js';
15
14
  import { ApiWallet } from '../glitter-base/route/wallet.js';
16
15
  import { ApiSns } from '../glitter-base/route/sms.js';
16
+ import { TableStorage } from '../cms-plugin/module/table-storage.js';
17
17
 
18
18
  const html = String.raw;
19
19
 
@@ -320,6 +320,7 @@ export class BgSNS {
320
320
  query?: string;
321
321
  queryType?: string;
322
322
  filter?: any;
323
+ listLimit: number;
323
324
  } = {
324
325
  id: glitter.getUUID(),
325
326
  tableId: glitter.getUUID(),
@@ -329,6 +330,7 @@ export class BgSNS {
329
330
  query: '',
330
331
  queryType: 'email',
331
332
  filter: {},
333
+ listLimit: TableStorage.getLimit(),
332
334
  };
333
335
  return gvc.bindView(() => {
334
336
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.emailFilterFrame);
@@ -356,8 +358,7 @@ export class BgSNS {
356
358
  gvc,
357
359
  callback: (value: any) => {
358
360
  vm.queryType = value;
359
- gvc.notifyDataChange(vm.tableId);
360
- gvc.notifyDataChange(id);
361
+ gvc.notifyDataChange([vm.tableId, id]);
361
362
  },
362
363
  default: vm.queryType || 'email',
363
364
  options: FilterOptions.snsSelect,
@@ -365,12 +366,19 @@ export class BgSNS {
365
366
  BgWidget.searchFilter(
366
367
  gvc.event(e => {
367
368
  vm.query = `${e.value}`.trim();
368
- gvc.notifyDataChange(vm.tableId);
369
- gvc.notifyDataChange(id);
369
+ gvc.notifyDataChange([vm.tableId, id]);
370
370
  }),
371
371
  vm.query || '',
372
372
  '搜尋所有信件內容'
373
373
  ),
374
+ BgWidget.countingFilter({
375
+ gvc,
376
+ callback: value => {
377
+ vm.listLimit = value;
378
+ gvc.notifyDataChange([vm.tableId, id]);
379
+ },
380
+ default: vm.listLimit,
381
+ }),
374
382
  BgWidget.funnelFilter({
375
383
  gvc,
376
384
  callback: () => {
@@ -390,10 +398,9 @@ export class BgSNS {
390
398
  return BgWidget.tableV3({
391
399
  gvc: gvc,
392
400
  getData: vmi => {
393
- const limit = 20;
394
401
  ApiSns.history({
395
402
  page: vmi.page - 1,
396
- limit: limit,
403
+ limit: vm.listLimit,
397
404
  search: vm.query ?? '',
398
405
  searchType: vm.queryType ?? 'email',
399
406
  sendTime: undefined,
@@ -483,7 +490,7 @@ export class BgSNS {
483
490
  }
484
491
 
485
492
  vm.dataList = data.response.data;
486
- vmi.pageSize = Math.ceil(data.response.total / limit);
493
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
487
494
  vmi.originalData = vm.dataList;
488
495
  vmi.tableData = getDatalist();
489
496
  vmi.loading = false;
@@ -946,7 +953,7 @@ export class BgSNS {
946
953
  ApiUser.getUserList({
947
954
  page: 0,
948
955
  limit: 99999,
949
- only_id:true
956
+ only_id: true,
950
957
  }).then(dd => {
951
958
  dd.response.data.map((user: any) => {
952
959
  if (user.userData.email && user.userData.email.length > 0 && user.userData.phone) {
@@ -1321,7 +1328,7 @@ export class BgSNS {
1321
1328
  ApiUser.getUserList({
1322
1329
  page: 0,
1323
1330
  limit: 99999,
1324
- only_id:true
1331
+ only_id: true,
1325
1332
  }).then(dd => {
1326
1333
  if (dd.response.data) {
1327
1334
  const ids: number[] = [];
@@ -1387,7 +1394,7 @@ export class BgSNS {
1387
1394
  ApiUser.getUserList({
1388
1395
  page: 0,
1389
1396
  limit: 99999,
1390
- only_id:true,
1397
+ only_id: true,
1391
1398
  search: data.query,
1392
1399
  }).then(dd => {
1393
1400
  if (dd.response.data) {