ts-glitter 16.6.0 → 16.6.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
@@ -79,7 +79,7 @@ export class Entry {
79
79
  }
80
80
  window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
81
81
  console.log(`Entry-time:`, window.renderClock.stop());
82
- glitter.share.editerVersion = 'V_16.6.0';
82
+ glitter.share.editerVersion = 'V_16.6.1';
83
83
  glitter.share.start = new Date();
84
84
  const vm = {
85
85
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -78,7 +78,7 @@ export class Entry {
78
78
  }
79
79
  (window as any).renderClock = (window as any).renderClock ?? clockF();
80
80
  console.log(`Entry-time:`, (window as any).renderClock.stop());
81
- glitter.share.editerVersion = 'V_16.6.0';
81
+ glitter.share.editerVersion = 'V_16.6.1';
82
82
  glitter.share.start = new Date();
83
83
  const vm: {
84
84
  appConfig: any;
@@ -28,7 +28,8 @@ export class MemberSetting {
28
28
  key: 'login_config',
29
29
  value: vm.data,
30
30
  user_id: 'manager',
31
- }).then(() => { });
31
+ }).then(() => {
32
+ });
32
33
  }
33
34
  return gvc.bindView(() => {
34
35
  return {
@@ -44,54 +45,64 @@ export class MemberSetting {
44
45
  </div>
45
46
  ${BgWidget.container([
46
47
  BgWidget.mainCard([
47
- html ` <div class="tx_normal fw-bolder mt-2" style="margin-bottom: 12px;">結帳設定</div>`,
48
- html ` <div class="d-flex align-items-center w-100" style="gap:4px;margin-bottom: 12px;">
49
- <div class="tx_normal d-flex flex-column">允許訪客結帳</div>
50
- <div class="tx_normal ms-2">${vm.data.login_in_to_order ? `關閉` : `開啟`}</div>
51
- <div class="cursor_pointer form-check form-switch m-0">
52
- <input
53
- class="form-check-input"
54
- type="checkbox"
55
- onchange="${gvc.event((e, event) => {
48
+ html `
49
+ <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
50
+ style="margin-bottom: 12px;">結帳設定
51
+ <span class="" style="color:#8D8D8D;font-size: 12px;">是否必需註冊會員後才可進行結帳</span>
52
+ </div>`,
53
+ html `
54
+ <div class="d-flex align-items-center w-100"
55
+ style="gap:4px;margin-bottom: 12px;">
56
+ <div class="tx_normal d-flex flex-column">允許訪客結帳
57
+ </div>
58
+ <div class="tx_normal ms-2">
59
+ ${vm.data.login_in_to_order ? `關閉` : `開啟`}
60
+ </div>
61
+ <div class="cursor_pointer form-check form-switch m-0">
62
+ <input
63
+ class="form-check-input"
64
+ type="checkbox"
65
+ onchange="${gvc.event((e, event) => {
56
66
  vm.data.login_in_to_order = !vm.data.login_in_to_order;
57
67
  saveEvent();
58
68
  gvc.notifyDataChange(vm.id);
59
69
  })}"
60
- ${vm.data.login_in_to_order ? `` : `checked`}
61
- />
62
- </div>
63
- <div class="flex-fill"></div>
64
- </div>`,
70
+ ${vm.data.login_in_to_order ? `` : `checked`}
71
+ />
72
+ </div>
73
+ <div class="flex-fill"></div>
74
+ </div>`,
65
75
  ].join('')),
66
76
  ...(() => {
67
77
  const form = BgWidget.customForm(gvc, [
68
78
  {
69
79
  key: 'custom_form_checkout',
70
80
  title: html `
71
- <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
72
- style="margin-bottom: 12px;">
73
- 顧客資訊表單
74
- <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的顧客資訊表單</span>
75
- </div>
81
+ <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
82
+ style="margin-bottom: 12px;">
83
+ 顧客資訊表單
84
+ <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的顧客資訊表單</span>
85
+ </div>
76
86
 
77
- `
87
+ `
78
88
  },
79
89
  {
80
90
  key: 'custom_form_checkout_recipient',
81
91
  title: html `
82
- <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
83
- style="margin-bottom: 12px;">
84
- 配送資訊表單
85
- <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的配送資訊表單</span>
86
- </div>
92
+ <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
93
+ style="margin-bottom: 12px;">
94
+ 配送資訊表單
95
+ <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的配送資訊表單</span>
96
+ </div>
87
97
 
88
- `
98
+ `
89
99
  }
90
100
  ]);
91
101
  return [
92
102
  form.view,
93
- html ` <div class="update-bar-container">
94
- ${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
103
+ html `
104
+ <div class="update-bar-container">
105
+ ${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
95
106
  const dialog = new ShareDialog(gvc.glitter);
96
107
  dialog.dataLoading({ visible: true });
97
108
  saveEvent();
@@ -99,7 +110,7 @@ export class MemberSetting {
99
110
  dialog.dataLoading({ visible: false });
100
111
  dialog.successMessage({ text: '設定成功' });
101
112
  })))}
102
- </div>`,
113
+ </div>`,
103
114
  ];
104
115
  })(),
105
116
  BgWidget.mbContainer(240),
@@ -1,11 +1,11 @@
1
- import { GVC } from '../glitterBundle/GVController.js';
2
- import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
3
- import { BgWidget } from '../backend-manager/bg-widget.js';
4
- import { ApiUser } from '../glitter-base/route/user.js';
5
- import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
6
- import { EditorConfig } from '../editor-config.js';
7
- import { ViewWidget } from './view-widget.js';
8
- import { FormModule } from './module/form-module.js';
1
+ import {GVC} from '../glitterBundle/GVController.js';
2
+ import {EditorElem} from '../glitterBundle/plugins/editor-elem.js';
3
+ import {BgWidget} from '../backend-manager/bg-widget.js';
4
+ import {ApiUser} from '../glitter-base/route/user.js';
5
+ import {ShareDialog} from '../glitterBundle/dialog/ShareDialog.js';
6
+ import {EditorConfig} from '../editor-config.js';
7
+ import {ViewWidget} from './view-widget.js';
8
+ import {FormModule} from './module/form-module.js';
9
9
 
10
10
  export class MemberSetting {
11
11
  public static main(gvc: GVC) {
@@ -30,7 +30,8 @@ export class MemberSetting {
30
30
  key: 'login_config',
31
31
  value: vm.data,
32
32
  user_id: 'manager',
33
- }).then(() => {});
33
+ }).then(() => {
34
+ });
34
35
  }
35
36
 
36
37
  return gvc.bindView(() => {
@@ -47,73 +48,83 @@ export class MemberSetting {
47
48
  <div class="flex-fill"></div>
48
49
  </div>
49
50
  ${BgWidget.container(
50
- [
51
- BgWidget.mainCard(
52
- [
53
- html` <div class="tx_normal fw-bolder mt-2" style="margin-bottom: 12px;">結帳設定</div>`,
54
- html` <div class="d-flex align-items-center w-100" style="gap:4px;margin-bottom: 12px;">
55
- <div class="tx_normal d-flex flex-column">允許訪客結帳</div>
56
- <div class="tx_normal ms-2">${vm.data.login_in_to_order ? `關閉` : `開啟`}</div>
57
- <div class="cursor_pointer form-check form-switch m-0">
58
- <input
59
- class="form-check-input"
60
- type="checkbox"
61
- onchange="${gvc.event((e, event) => {
62
- vm.data.login_in_to_order = !vm.data.login_in_to_order;
63
- saveEvent();
64
- gvc.notifyDataChange(vm.id);
65
- })}"
66
- ${vm.data.login_in_to_order ? `` : `checked`}
67
- />
68
- </div>
69
- <div class="flex-fill"></div>
70
- </div>`,
71
- ].join('')
72
- ),
73
- ...(() => {
74
- const form = BgWidget.customForm(gvc, [
75
- {
76
- key: 'custom_form_checkout',
77
- title: html`
78
- <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
79
- style="margin-bottom: 12px;">
80
- 顧客資訊表單
81
- <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的顧客資訊表單</span>
82
- </div>
51
+ [
52
+ BgWidget.mainCard(
53
+ [
54
+ html`
55
+ <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
56
+ style="margin-bottom: 12px;">結帳設定
57
+ <span class="" style="color:#8D8D8D;font-size: 12px;">是否必需註冊會員後才可進行結帳</span>
58
+ </div>`,
59
+ html`
60
+ <div class="d-flex align-items-center w-100"
61
+ style="gap:4px;margin-bottom: 12px;">
62
+ <div class="tx_normal d-flex flex-column">允許訪客結帳
63
+ </div>
64
+ <div class="tx_normal ms-2">
65
+ ${vm.data.login_in_to_order ? `關閉` : `開啟`}
66
+ </div>
67
+ <div class="cursor_pointer form-check form-switch m-0">
68
+ <input
69
+ class="form-check-input"
70
+ type="checkbox"
71
+ onchange="${gvc.event((e, event) => {
72
+ vm.data.login_in_to_order = !vm.data.login_in_to_order;
73
+ saveEvent();
74
+ gvc.notifyDataChange(vm.id);
75
+ })}"
76
+ ${vm.data.login_in_to_order ? `` : `checked`}
77
+ />
78
+ </div>
79
+ <div class="flex-fill"></div>
80
+ </div>`,
81
+ ].join('')
82
+ ),
83
+ ...(() => {
84
+ const form = BgWidget.customForm(gvc, [
85
+ {
86
+ key: 'custom_form_checkout',
87
+ title: html`
88
+ <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
89
+ style="margin-bottom: 12px;">
90
+ 顧客資訊表單
91
+ <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的顧客資訊表單</span>
92
+ </div>
83
93
 
84
- `
85
- },
86
- {
87
- key: 'custom_form_checkout_recipient',
88
- title: html`
89
- <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
90
- style="margin-bottom: 12px;">
91
- 配送資訊表單
92
- <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的配送資訊表單</span>
93
- </div>
94
+ `
95
+ },
96
+ {
97
+ key: 'custom_form_checkout_recipient',
98
+ title: html`
99
+ <div class="tx_normal fw-bolder mt-2 d-flex flex-column"
100
+ style="margin-bottom: 12px;">
101
+ 配送資訊表單
102
+ <span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的配送資訊表單</span>
103
+ </div>
94
104
 
95
- `
96
- }
97
- ]);
98
- return [
99
- form.view,
100
- html` <div class="update-bar-container">
101
- ${BgWidget.save(
102
- gvc.event(async () => {
103
- const dialog = new ShareDialog(gvc.glitter);
104
- dialog.dataLoading({ visible: true });
105
- saveEvent();
106
- await form.save();
107
- dialog.dataLoading({ visible: false });
108
-
109
- dialog.successMessage({ text: '設定成功' });
110
- })
111
- )}
112
- </div>`,
113
- ];
114
- })(),
115
- BgWidget.mbContainer(240),
116
- ].join(BgWidget.mbContainer(24))
105
+ `
106
+ }
107
+ ]);
108
+ return [
109
+ form.view,
110
+ html`
111
+ <div class="update-bar-container">
112
+ ${BgWidget.save(
113
+ gvc.event(async () => {
114
+ const dialog = new ShareDialog(gvc.glitter);
115
+ dialog.dataLoading({visible: true});
116
+ saveEvent();
117
+ await form.save();
118
+ dialog.dataLoading({visible: false});
119
+
120
+ dialog.successMessage({text: '設定成功'});
121
+ })
122
+ )}
123
+ </div>`,
124
+ ];
125
+ })(),
126
+ BgWidget.mbContainer(240),
127
+ ].join(BgWidget.mbContainer(24))
117
128
  )}
118
129
  `
119
130
  );
@@ -120,7 +120,7 @@ export type ViewModel = {
120
120
  searchable: boolean;
121
121
  categorySearch: boolean;
122
122
  categories: any[];
123
- paySelect: string;
123
+ paySelect: string | any[];
124
124
  loading:boolean
125
125
  };
126
126