ts-glitter 21.4.4 → 21.4.6

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 (39) hide show
  1. package/lowcode/Entry.js +18 -18
  2. package/lowcode/Entry.ts +18 -19
  3. package/lowcode/backend-manager/bg-product.js +8 -6
  4. package/lowcode/backend-manager/bg-product.ts +17 -15
  5. package/lowcode/backend-manager/bg-recommend.js +16 -5
  6. package/lowcode/backend-manager/bg-recommend.ts +15 -5
  7. package/lowcode/backend-manager/bg-widget.js +160 -160
  8. package/lowcode/backend-manager/bg-widget.ts +169 -166
  9. package/lowcode/cms-plugin/POS-setting.js +75 -23
  10. package/lowcode/cms-plugin/POS-setting.ts +87 -30
  11. package/lowcode/cms-plugin/menus-setting.js +165 -37
  12. package/lowcode/cms-plugin/menus-setting.ts +144 -21
  13. package/lowcode/cms-plugin/module/order-excel.js +8 -8
  14. package/lowcode/cms-plugin/module/order-excel.ts +10 -10
  15. package/lowcode/cms-plugin/module/stock-excel.js +184 -0
  16. package/lowcode/cms-plugin/module/stock-excel.ts +205 -0
  17. package/lowcode/cms-plugin/module/vendor-excel.js +375 -0
  18. package/lowcode/cms-plugin/module/vendor-excel.ts +450 -0
  19. package/lowcode/cms-plugin/order/order-module.js +6 -4
  20. package/lowcode/cms-plugin/order/order-module.ts +16 -14
  21. package/lowcode/cms-plugin/pos-pages/models.ts +6 -2
  22. package/lowcode/cms-plugin/pos-pages/products-page.js +589 -469
  23. package/lowcode/cms-plugin/pos-pages/products-page.ts +657 -491
  24. package/lowcode/cms-plugin/shopping-product-setting.js +7 -10
  25. package/lowcode/cms-plugin/shopping-product-setting.ts +12 -10
  26. package/lowcode/cms-plugin/shopping-setting-basic.js +2 -5
  27. package/lowcode/cms-plugin/shopping-setting-basic.ts +2 -5
  28. package/lowcode/cms-plugin/stock-history.js +39 -26
  29. package/lowcode/cms-plugin/stock-history.ts +58 -49
  30. package/lowcode/cms-plugin/stock-vendors.js +18 -13
  31. package/lowcode/cms-plugin/stock-vendors.ts +31 -16
  32. package/lowcode/glitterBundle/html-component/global-widget.js +162 -136
  33. package/lowcode/glitterBundle/html-component/global-widget.ts +430 -382
  34. package/lowcode/public-components/blogs/blogs-01.js +22 -9
  35. package/lowcode/public-components/blogs/blogs-01.ts +28 -14
  36. package/package.json +1 -1
  37. package/src/api-public/services/schedule.js +6 -1
  38. package/src/api-public/services/schedule.js.map +1 -1
  39. package/src/api-public/services/schedule.ts +4 -1
@@ -1,29 +1,31 @@
1
- import { OrderDetail, ViewModel } from './models.js';
2
1
  import { GVC } from '../../glitterBundle/GVController.js';
3
2
  import { ApiShop } from '../../glitter-base/route/shopping.js';
4
3
  import { ShareDialog } from '../../glitterBundle/dialog/ShareDialog.js';
5
- import { POSSetting } from '../POS-setting.js';
6
4
  import { Swal } from '../../modules/sweetAlert.js';
5
+ import { POSSetting } from '../POS-setting.js';
6
+ import { OrderDetail, ViewModel } from './models.js';
7
7
  import { PaymentPage } from './payment-page.js';
8
8
  import { PayConfig } from './pay-config.js';
9
+ import { BgProduct } from '../../backend-manager/bg-product.js';
9
10
 
10
11
  const html = String.raw;
11
12
 
12
13
  export class ProductsPage {
13
- public static pageSplitV2 = (gvc: GVC, countPage: number, nowPage: number, callback: (p: number) => void) => {
14
- const generator = (n: number) => {
15
- return html`<li class="page-item my-0 mx-0">
16
- <div class="page-link-v2" onclick="${gvc.event(() => callback(n))}">${n}</div>
17
- </li>`;
18
- };
14
+ static pageSplitV2 = (gvc: GVC, countPage: number, nowPage: number, callback: (p: number) => void) => {
19
15
  const glitter = gvc.glitter;
20
16
 
21
- let vm = {
17
+ const vm = {
22
18
  id: glitter.getUUID(),
23
19
  loading: false,
24
20
  dataList: <any>[],
25
21
  };
26
22
 
23
+ const generator = (n: number) => {
24
+ return html`<li class="page-item m-0">
25
+ <div class="page-link-v2" onclick="${gvc.event(() => callback(n))}">${n}</div>
26
+ </li>`;
27
+ };
28
+
27
29
  return gvc.bindView({
28
30
  bind: vm.id,
29
31
  view: () => {
@@ -31,59 +33,58 @@ export class ProductsPage {
31
33
  return html`<div class="w-100 d-flex align-items-center justify-content-center p-3">
32
34
  <div class="spinner-border"></div>
33
35
  </div>`;
34
- } else {
35
- return html`
36
- <nav class="d-flex my-3 justify-content-center">
37
- <ul class="pagination pagination-rounded mb-0">
38
- <li class="page-item me-0">
39
- <div
40
- class="page-link-v2 page-link-prev"
41
- aria-label="Previous"
42
- style="cursor:pointer"
43
- onclick="${gvc.event(() => {
44
- nowPage - 1 > 0 && callback(nowPage - 1);
45
- })}"
46
- >
47
- <i class="fa-solid fa-angle-left angle-style"></i>
48
- </div>
49
- </li>
50
- ${glitter.print(() => {
51
- let result = '';
52
- // 產生前面四頁的按鈕
53
- for (let i = Math.max(1, nowPage - 4); i < nowPage; i++) {
54
- result += generator(i);
55
- }
56
- return result;
57
- })}
58
- <li class="page-item active mx-0" style="border-radius: 100%">
59
- <div class="page-link-v2 page-link-active">${nowPage}</div>
60
- </li>
61
- ${glitter.print(() => {
62
- let result = '';
63
- // 產生後面四頁的按鈕
64
- for (let i = nowPage + 1; i <= Math.min(nowPage + 4, countPage); i++) {
65
- result += generator(i);
66
- }
67
- return result;
68
- })}
69
- <li class="page-item ms-0">
70
- <div
71
- class="page-link-v2 page-link-next"
72
- aria-label="Next"
73
- style="cursor:pointer"
74
- onclick="${gvc.event(() => {
75
- nowPage + 1 <= countPage && callback(nowPage + 1);
76
- })}"
77
- >
78
- <i class="fa-solid fa-angle-right angle-style"></i>
79
- </div>
80
- </li>
81
- </ul>
82
- </nav>
83
- `;
84
36
  }
37
+
38
+ return html`
39
+ <nav class="d-flex my-3 justify-content-center">
40
+ <ul class="pagination pagination-rounded mb-0">
41
+ <li class="page-item me-0">
42
+ <div
43
+ class="page-link-v2 page-link-prev"
44
+ aria-label="Previous"
45
+ style="cursor:pointer"
46
+ onclick="${gvc.event(() => {
47
+ nowPage - 1 > 0 && callback(nowPage - 1);
48
+ })}"
49
+ >
50
+ <i class="fa-solid fa-angle-left angle-style"></i>
51
+ </div>
52
+ </li>
53
+ ${glitter.print(() => {
54
+ let result = '';
55
+ // 產生前面四頁的按鈕
56
+ for (let i = Math.max(1, nowPage - 4); i < nowPage; i++) {
57
+ result += generator(i);
58
+ }
59
+ return result;
60
+ })}
61
+ <li class="page-item active mx-0" style="border-radius: 100%">
62
+ <div class="page-link-v2 page-link-active">${nowPage}</div>
63
+ </li>
64
+ ${glitter.print(() => {
65
+ let result = '';
66
+ // 產生後面四頁的按鈕
67
+ for (let i = nowPage + 1; i <= Math.min(nowPage + 4, countPage); i++) {
68
+ result += generator(i);
69
+ }
70
+ return result;
71
+ })}
72
+ <li class="page-item ms-0">
73
+ <div
74
+ class="page-link-v2 page-link-next"
75
+ aria-label="Next"
76
+ style="cursor:pointer"
77
+ onclick="${gvc.event(() => {
78
+ nowPage + 1 <= countPage && callback(nowPage + 1);
79
+ })}"
80
+ >
81
+ <i class="fa-solid fa-angle-right angle-style"></i>
82
+ </div>
83
+ </li>
84
+ </ul>
85
+ </nav>
86
+ `;
85
87
  },
86
- divCreate: {},
87
88
  onCreate: () => {
88
89
  if (vm.loading) {
89
90
  vm.loading = false;
@@ -93,488 +94,653 @@ export class ProductsPage {
93
94
  });
94
95
  };
95
96
 
96
- public static main(obj: { gvc: GVC; vm: ViewModel; orderDetail: OrderDetail }) {
97
- const swal = new Swal(obj.gvc);
97
+ static main(obj: { gvc: GVC; vm: ViewModel; orderDetail: OrderDetail }) {
98
98
  const gvc = obj.gvc;
99
+ const swal = new Swal(gvc);
99
100
  const vm = obj.vm;
100
101
  const orderDetail = obj.orderDetail;
101
102
  const dialog = new ShareDialog(gvc.glitter);
103
+ const isPhone = document.body.offsetWidth < 800;
102
104
  (orderDetail as any).total = orderDetail.total || 0;
105
+
103
106
  const pVM = {
104
107
  pageSize: 0,
105
108
  pageIndex: 1,
106
109
  limit: 50,
110
+ loadOption: 'collection', // 預設載入的選項
111
+ selectOption: 'collection', // 被選取的選項
107
112
  };
108
113
 
109
114
  function loadData() {
110
- let category = vm.categories.find((category: any) => category.select == true);
111
- if((!vm.productSearch) || !vm.productSearch.length){
112
- dialog.dataLoading({ visible: true });
113
- }
114
- // dialog.dataLoading({ visible: true });
115
+ const resetOption = pVM.selectOption !== pVM.loadOption;
116
+ const category = (resetOption ? null : vm.categories.find(c => c.select)) || { key: 'all' };
117
+
118
+ dialog.dataLoading({ visible: true });
119
+
115
120
  ApiShop.getProduct({
116
121
  page: pVM.pageIndex - 1,
117
- collection: category.key == 'all' ? '' : category.key,
118
122
  limit: pVM.limit,
119
123
  search: vm.query,
124
+ collection: pVM.selectOption === 'collection' && category.key !== 'all' ? category.key : '',
125
+ general_tag: pVM.selectOption === 'general_tag' && category.key !== 'all' ? category.key : '',
126
+ manager_tag: pVM.selectOption === 'manager_tag' && category.key !== 'all' ? category.key : '',
120
127
  status: 'inRange',
121
128
  channel: POSSetting.config.where_store.includes('store_') ? 'pos' : 'exhibition',
122
129
  whereStore: POSSetting.config.where_store,
123
130
  orderBy: 'created_time_desc',
124
131
  }).then(res => {
125
- if((!vm.productSearch) || !vm.productSearch.length){
126
- dialog.dataLoading({ visible: false });
127
- }
132
+ dialog.dataLoading({ visible: false });
133
+
128
134
  vm.productSearch = res.response.data;
135
+ pVM.loadOption = pVM.selectOption;
129
136
  pVM.pageSize = Math.ceil(res.response.total / parseInt(pVM.limit as any, 10));
130
- // dialog.dataLoading({ visible: false });
131
- gvc.notifyDataChange(`productShow`);
137
+ gvc.notifyDataChange('productShow');
132
138
  });
133
139
  }
134
140
 
135
141
  loadData();
136
142
  gvc.glitter.share.reloadProduct = loadData;
137
143
 
138
- return html`
139
- <div
140
- class="left-panel"
141
- style="${document.body.offsetWidth < 800
142
- ? `width:calc(100%);padding-top: 42px`
143
- : `width:calc(100% - 352px);padding-top: 32px ;padding-bottom:32px;`}overflow: hidden;"
144
- >
145
- ${gvc.bindView({
146
- bind: `category`,
147
- view: () => {
148
- try {
149
- if (vm.categorySearch) {
144
+ gvc.addStyle(`
145
+ .pos-select {
146
+ font-size: 18px;
147
+ width: ${isPhone ? '100%' : '131px'};
148
+ height: 51px;
149
+ white-space: nowrap;
150
+ display: flex;
151
+ padding: 12px;
152
+ justify-content: center;
153
+ align-items: center;
154
+ border-radius: 10px;
155
+ box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.1);
156
+ }
157
+
158
+ .pos-category {
159
+ font-size: 18px;
160
+ width: 131px;
161
+ height: 51px;
162
+ margin-right: 16px;
163
+ white-space: nowrap;
164
+ display: flex;
165
+ padding: 12px 24px;
166
+ justify-content: center;
167
+ align-items: center;
168
+ border-radius: 10px;
169
+ box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.1);
170
+ }
171
+
172
+ .pos-product-card {
173
+ flex-basis: 188px;
174
+ flex-grow: 1;
175
+ border-radius: 10px;
176
+ box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
177
+ }
178
+
179
+ .pos-bgr-image {
180
+ border-radius: 10px 10px 0 0;
181
+ background: 50% / cover no-repeat;
182
+ }
183
+
184
+ .pos-product-title {
185
+ font-size: 18px;
186
+ width: 100%;
187
+ overflow: hidden;
188
+ display: -webkit-box;
189
+ -webkit-line-clamp: 2;
190
+ text-overflow: ellipsis;
191
+ word-break: break-word;
192
+ -webkit-box-orient: vertical;
193
+ }
194
+
195
+ .pos-product-container {
196
+ overflow: scroll;
197
+ max-height: 100%;
198
+ padding-bottom: 100px !important;
199
+ ${
200
+ isPhone
201
+ ? `
202
+ padding-left: 12px;
203
+ padding-right: 12px;
204
+ justify-content: space-between;
205
+ `
206
+ : `
207
+ gap: 26px;
208
+ margin-left: 32px;
209
+ margin-right: 32px;
210
+ `
211
+ }
212
+ }
213
+
214
+ .pos-drawer {
215
+ height: 100%;
216
+ width: 352px;
217
+ max-width: 100%;
218
+ overflow: auto;
219
+ background: #fff;
220
+ box-shadow: 1px 0 10px 0 rgba(0, 0, 0, 0.1);
221
+ }
222
+
223
+ .pos-check-container {
224
+ height: 50px;
225
+ margin-bottom: 24px;
226
+ margin-top: ${gvc.glitter.share.top_inset}px;
227
+ }
228
+
229
+ .pos-check-loading {
230
+ background: #ffb400;
231
+ color: #393939;
232
+ gap: 10px;
233
+ }
234
+
235
+ .pos-cart-list {
236
+ color: #393939;
237
+ font-size: 32px;
238
+ font-weight: 700;
239
+ letter-spacing: 3px;
240
+ }
241
+
242
+ .pos-cart-image {
243
+ height: 67px;
244
+ width: 66px;
245
+ margin-right: 12px;
246
+ min-height: 67px;
247
+ min-width: 66px;
248
+ background: 50% / cover;
249
+ }
250
+
251
+ .pos-spec {
252
+ color: #949494;
253
+ font-size: 16px;
254
+ font-style: normal;
255
+ font-weight: 500;
256
+ }
257
+
258
+ .pos-count-button {
259
+ display: flex;
260
+ width: 30px;
261
+ height: 30px;
262
+ padding: 8px;
263
+ justify-content: center;
264
+ align-items: center;
265
+ border-radius: 10px;
266
+ background: #393939;
267
+ }
268
+
269
+ .pos-count-input {
270
+ width: 50px;
271
+ height: 25px;
272
+ color: #393939;
273
+ font-size: 18px;
274
+ font-weight: 500;
275
+ text-align: center;
276
+ }
277
+
278
+ .pos-subtotal {
279
+ color: #393939;
280
+ font-size: 18px;
281
+ font-style: normal;
282
+ font-weight: 500;
283
+ letter-spacing: 0.72px;
284
+ }
285
+
286
+ .pos-price-container {
287
+ margin-top: 24px;
288
+ border-radius: 10px;
289
+ border: 1px solid #ddd;
290
+ background: #fff;
291
+ display: flex;
292
+ padding: 24px;
293
+ flex-direction: column;
294
+ justify-content: center;
295
+ }
296
+
297
+ .pos-goto-checkout {
298
+ margin-top: 32px;
299
+ display: flex;
300
+ padding: 12px 24px;
301
+ justify-content: center;
302
+ align-items: center;
303
+ border-radius: 10px;
304
+ background: #393939;
305
+ font-size: 20px;
306
+ font-style: normal;
307
+ font-weight: 500;
308
+ color: #fff;
309
+ }
310
+ `);
311
+
312
+ const selectOptionView = gvc.bindView({
313
+ bind: 'selectOption',
314
+ view: () => {
315
+ const options = [
316
+ { key: 'collection', title: '商品類別' },
317
+ { key: 'general_tag', title: '商品標籤' },
318
+ { key: 'manager_tag', title: '管理員標籤' },
319
+ ];
320
+
321
+ return html` <select
322
+ class="pos-select"
323
+ onchange="${gvc.event(e => {
324
+ pVM.selectOption = e.value;
325
+ vm.categorySearch = true;
326
+ loadData();
327
+ gvc.notifyDataChange(['category', 'productShow']);
328
+ })}"
329
+ >
330
+ ${options.map(opt => html`<option value="${opt.key}">${opt.title}</option>`)}
331
+ </select>`;
332
+ },
333
+ divCreate: {
334
+ class: 'position-sticky',
335
+ style: 'left: 0;',
336
+ },
337
+ });
338
+
339
+ const categoryView = gvc.bindView({
340
+ bind: 'category',
341
+ view: () => {
342
+ try {
343
+ if (vm.categorySearch) {
344
+ vm.categories = [{ key: 'all', value: '全部商品', select: true }];
345
+
346
+ function render() {
347
+ vm.categorySearch = false;
348
+ gvc.notifyDataChange('category');
349
+ }
350
+
351
+ const selectOptionRecord: Record<string, () => void> = {
352
+ collection: () =>
150
353
  ApiShop.getCollection().then(r => {
151
- vm.categorySearch = false;
354
+ r.response.value.map((data: any) => {
355
+ vm.categories.push({ key: data.code, value: data.title });
356
+ });
357
+ render();
358
+ }),
359
+ general_tag: () =>
360
+ BgProduct.getProductGeneralTag().then(tags => {
361
+ tags.map((data: any) => vm.categories.push({ key: data.key, value: data.name }));
362
+ render();
363
+ }),
364
+ manager_tag: () =>
365
+ BgProduct.getProductManagerTag().then(tags => {
366
+ tags.map((data: any) => vm.categories.push({ key: data.key, value: data.name }));
367
+ render();
368
+ }),
369
+ };
152
370
 
153
- r.response.value.forEach((data: any) => {
154
- vm.categories.push({
155
- key: data.code,
156
- value: data.title,
157
- });
371
+ const selectEvent = selectOptionRecord[pVM.selectOption];
372
+ selectEvent ? selectEvent() : selectOptionRecord.collection();
373
+ }
374
+
375
+ const categoryButton = vm.categories.map(data => {
376
+ return html`
377
+ <div
378
+ class="pos-category"
379
+ style="${data?.select ? 'background: #393939; color: #FFF;' : 'background: #FFF; color: #393939;'}"
380
+ onclick="${gvc.event(() => {
381
+ vm.categories.forEach(category => {
382
+ category.select = false;
158
383
  });
159
- gvc.notifyDataChange('category');
384
+ data.select = true;
385
+ pVM.pageIndex = 1;
386
+ loadData();
387
+ gvc.notifyDataChange(['category', 'productShow']);
388
+ })}"
389
+ >
390
+ ${data.value}
391
+ </div>
392
+ `;
393
+ });
394
+
395
+ return categoryButton.join('');
396
+ } catch (e) {
397
+ console.error(e);
398
+ return `${e}`;
399
+ }
400
+ },
401
+ divCreate: {
402
+ class: 'd-flex px-0 px-md-3 w-100 position-relative',
403
+ style: 'overflow: scroll;',
404
+ },
405
+ });
406
+
407
+ const productShowView = gvc.bindView({
408
+ bind: 'productShow',
409
+ view: () => {
410
+ const parent = document.querySelector(`.left-panel`) as HTMLElement;
411
+
412
+ let rowItem = Math.floor((parent.offsetWidth - 72) / 188);
413
+ rowItem = rowItem * 188 + 26 * (rowItem - 1) > parent.offsetWidth - 72 ? rowItem - 1 : rowItem;
414
+ if (isPhone) {
415
+ rowItem = 2;
416
+ }
417
+
418
+ let maxwidth = (parent.offsetWidth - 72 - (rowItem - 1) * 26) / rowItem;
419
+ if (isPhone) {
420
+ maxwidth += 30;
421
+ }
422
+
423
+ if (vm.productSearch.length > 0) {
424
+ return (
425
+ vm.productSearch
426
+ .map(data => {
427
+ let selectVariant = data.content.variants[0];
428
+ data.content.specs.forEach((spec: any) => {
429
+ spec.option[0].select = true;
160
430
  });
161
- }
162
431
 
163
- return vm.categories
164
- .map((data: any) => {
165
- return html`
432
+ const paddingBottomPercent = (() => {
433
+ if (PayConfig.pos_config.prdouct_card_layout) {
434
+ const wi = PayConfig.pos_config.prdouct_card_layout.split(':').map((dd: any) => parseInt(dd, 10));
435
+ return parseInt(`${(wi[0] / wi[1]) * 100}`, 10);
436
+ } else {
437
+ return 56;
438
+ }
439
+ })();
440
+
441
+ const image = data.content.preview_image[0] || this.noImage;
442
+
443
+ return html`
444
+ <div
445
+ class="d-flex flex-column mb-4 mb-sm-0 pos-product-card"
446
+ style="max-width: ${maxwidth}px;"
447
+ onclick="${gvc.event(() => {
448
+ POSSetting.productDialog({
449
+ gvc,
450
+ selectVariant,
451
+ defaultData: data,
452
+ orderDetail,
453
+ callback: data => {
454
+ selectVariant = data;
455
+ },
456
+ });
457
+ })}"
458
+ >
166
459
  <div
167
- style="font-size: 18px;;width:131px;height:51px;margin-right:24px;white-space: nowrap;display: flex;padding: 12px 24px;justify-content: center;align-items: center;border-radius: 10px;box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.10);${data?.select
168
- ? `background: #393939;color: #FFF;`
169
- : `background: #FFF;color#393939;`}"
170
- onclick="${gvc.event(() => {
171
- vm.categories.forEach(category => {
172
- category.select = false;
173
- });
174
- data.select = true;
175
- pVM.pageIndex = 1;
176
- loadData();
177
- gvc.notifyDataChange(['category', 'productShow']);
178
- })}"
179
- >
180
- ${data.value}
460
+ class="w-100 pos-bgr-image"
461
+ style="padding-bottom: ${paddingBottomPercent}%; background-image: url('${image}');"
462
+ ></div>
463
+ <div class="d-flex flex-column" style="padding: 12px 10px; gap: 4px;">
464
+ <div class="pos-product-title">${data.content.title || 'No Name'}</div>
465
+ <div class="w-100 align-items-center justify-content-end text-end fw-500 fs-5">
466
+ $ ${parseInt(`${data.content.min_price ?? 0}`, 10).toLocaleString()}
467
+ </div>
181
468
  </div>
182
- `;
183
- })
184
- .join('');
185
- } catch (e) {
186
- console.error(e);
187
- return `${e}`;
188
- }
189
- },
190
- divCreate: {
191
- class: `d-flex px-3 `,
192
- style: `width:100%;overflow: scroll;${document.body.clientWidth > 992 ? `padding-left:32px !important;padding-right:32px !important;padding-bottom:32px;` : `padding-top:20px;padding-bottom:20px;`}`,
193
- },
194
- })}
195
- ${gvc.bindView(() => {
196
- return {
197
- bind: `productShow`,
198
- view: () => {
199
- let image = 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg';
200
- let parent = document.querySelector(`.left-panel`) as HTMLElement;
201
- let rowItem = Math.floor((parent.offsetWidth - 72) / 188);
202
- rowItem = rowItem * 188 + 26 * (rowItem - 1) > parent.offsetWidth - 72 ? rowItem - 1 : rowItem;
203
- if (document.body.offsetWidth < 600) {
204
- rowItem = 2;
205
- }
206
- let maxwidth = (parent.offsetWidth - 72 - (rowItem - 1) * 26) / rowItem;
207
- if (document.body.offsetWidth < 600) {
208
- maxwidth += 30;
209
- }
469
+ </div>
470
+ `;
471
+ })
472
+ .join('') +
473
+ html`
474
+ <div class="w-100">
475
+ ${this.pageSplitV2(gvc, pVM.pageSize, pVM.pageIndex, p => {
476
+ pVM.pageIndex = p;
477
+ (document.querySelector('html') as any).scrollTo(0, 0);
478
+ loadData();
479
+ })}
480
+ </div>
481
+ `
482
+ );
483
+ }
484
+ return POSSetting.emptyView('查無相關商品');
485
+ },
486
+ divCreate: {
487
+ class: `d-flex flex-wrap w-100 product-show pos-product-container ${isPhone ? '' : 'p-2'}`,
488
+ },
489
+ });
210
490
 
211
- if (vm.productSearch.length > 0) {
212
- return (
213
- vm.productSearch
214
- .map(data => {
215
- let selectVariant = data.content.variants[0];
216
- data.content.specs.forEach((spec: any) => {
217
- spec.option[0].select = true;
218
- });
491
+ const checkId = gvc.glitter.getUUID();
492
+ let checking = true;
493
+ let interVal: any = undefined;
494
+
495
+ function checkStock() {
496
+ checking = true;
497
+ PaymentPage.storeHistory(orderDetail);
498
+ checking = false;
499
+ gvc.notifyDataChange(checkId);
500
+ }
501
+
502
+ gvc.glitter.share.checkStock = checkStock;
503
+ checkStock();
504
+
505
+ function checkStockInterVal() {
506
+ clearInterval(interVal);
507
+ interVal = setTimeout(() => checkStock(), 300);
508
+ }
509
+
510
+ const checkView = gvc.bindView({
511
+ bind: checkId,
512
+ view: () => {
513
+ if (!checking) {
514
+ return html` <div class="pos-cart-list">購物清單</div>`;
515
+ }
516
+ return html` <div class="w-100">
517
+ <div class="d-flex align-items-center justify-content-center mb-4 p-2 fw-500 rounded-3 pos-check-loading">
518
+ <div class="spinner-border" style="width: 20px; height: 20px;"></div>
519
+ 庫存檢查中...
520
+ </div>
521
+ </div>`;
522
+ },
523
+ divCreate: {
524
+ class: 'd-flex flex-column pos-check-container',
525
+ },
526
+ });
527
+
528
+ const orderView = gvc.bindView({
529
+ bind: 'order',
530
+ dataList: [{ obj: vm, key: 'order' }],
531
+ view: () => {
532
+ orderDetail.subtotal = 0;
533
+ orderDetail.lineItems.forEach(item => {
534
+ orderDetail.subtotal += item.sale_price * item.count;
535
+ });
219
536
 
220
- return html`
537
+ return html`
538
+ <div class="d-flex flex-column" style="gap: 18px;">
539
+ ${orderDetail.lineItems
540
+ .map((item, index) => {
541
+ const image = item.preview_image || this.noImage;
542
+
543
+ return html`
544
+ ${index > 0 ? html`<div class="w-100" style="background-color: #DDD; height: 1px;"></div>` : ''}
545
+ <div class="d-flex align-items-center" style="min-height: 87px;">
546
+ <div class="rounded-3 pos-cart-image" style="background-image: url('${image}');"></div>
547
+ <div class="d-flex flex-column flex-fill">
548
+ <div>${item.title}</div>
549
+ <div class="d-flex gap-2">
550
+ ${item.spec.length > 0
551
+ ? item.spec.map(spec => html`<div class="pos-spec">${spec}</div>`).join('')
552
+ : '單一規格'}
553
+ </div>
554
+ <div class="d-flex align-items-center" style="margin-top: 6px;">
221
555
  <div
222
- class="d-flex flex-column mb-4 mb-sm-0"
223
- style="max-width:${maxwidth}px;flex-basis: 188px;flex-grow: 1;border-radius: 10px;box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);"
556
+ class="pos-count-button"
224
557
  onclick="${gvc.event(() => {
225
- POSSetting.productDialog({
226
- gvc,
227
- selectVariant,
228
- defaultData: data,
229
- orderDetail,
230
- callback: data => {
231
- selectVariant = data;
232
- },
233
- });
558
+ item.count = item.count < 2 ? item.count : item.count - 1;
559
+ checkStockInterVal();
560
+ gvc.notifyDataChange('order');
234
561
  })}"
235
562
  >
236
- <div
237
- class="w-100"
238
- style="border-radius: 10px 10px 0 0;;padding-bottom: ${
239
- (()=>{
240
- if(PayConfig.pos_config.prdouct_card_layout){
241
- const wi=PayConfig.pos_config.prdouct_card_layout.split(':').map((dd:any)=>{
242
- return parseInt(dd,10)
243
- })
244
- return parseInt(`${wi[0] / wi[1] * 100}`,10)
245
- }else{
246
- return `56`
247
- }
248
- })()
249
- }%;background: 50%/cover no-repeat url('${data
250
- .content.preview_image[0] ??
251
- image ??
252
- image}');"
253
- ></div>
254
- <div class="d-flex flex-column" style="padding: 12px 10px;gap: 4px;">
255
- <div
256
- style="font-size: 18px;width: 100%;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;text-overflow: ellipsis;word-break: break-word;-webkit-box-orient: vertical;"
257
- >
258
- ${data.content.title ?? 'no name'}
259
- </div>
260
- <div
261
- class="w-100 align-items-center justify-content-end"
262
- style="font-size: 16px;font-weight: 700;text-align: right;"
263
- >
264
- NT.${parseInt(`${data.content.min_price ?? 0}`, 10).toLocaleString()}
265
- </div>
266
- </div>
563
+ ${this.minusSVG}
267
564
  </div>
268
- `;
269
- })
270
- .join('') +
271
- html`
272
- <div class="w-100">
273
- ${this.pageSplitV2(gvc, pVM.pageSize, pVM.pageIndex, p => {
274
- pVM.pageIndex = p;
275
- (document.querySelector('html') as any).scrollTo(0, 0);
276
- loadData();
277
- })}
565
+ <input
566
+ class="border-0 pos-count-input"
567
+ value="${item.count}"
568
+ onchange="${gvc.event(e => {
569
+ const category = orderDetail.lineItems[index].product_category;
570
+ const n = category === 'weighing' ? parseFloat(e.value) : parseInt(e.value);
571
+ item.count = isNaN(n) ? 0 : n;
572
+ checkStockInterVal();
573
+ gvc.notifyDataChange('order');
574
+ })}"
575
+ />
576
+ <div
577
+ class="pos-count-button"
578
+ onclick="${gvc.event(() => {
579
+ item.count++;
580
+ checkStockInterVal();
581
+ gvc.notifyDataChange('order');
582
+ })}"
583
+ >
584
+ ${this.plusSVG}
585
+ </div>
586
+ </div>
278
587
  </div>
279
- `
280
- );
281
- }
282
- return POSSetting.emptyView('查無相關商品');
283
- },
284
- divCreate: () => {
285
- if (document.body.offsetWidth < 800) {
286
- return {
287
- class: `d-flex flex-wrap w-100 product-show`,
288
- style: `overflow:scroll;max-height:100%;padding-left:12px;padding-right:12px;justify-content: space-between;padding-bottom:100px;`,
289
- };
290
- } else {
291
- return {
292
- class: `d-flex flex-wrap w-100 product-show p-2`,
293
- style: `gap:26px;overflow:scroll;max-height:100%;padding-bottom:100px !important;margin-left:32px;margin-right:32px;`,
294
- };
588
+ <div class="h-100 d-flex flex-column align-items-end justify-content-between">
589
+ <div
590
+ onclick="${gvc.event(() => {
591
+ const rmProd = orderDetail.lineItems[index];
592
+ PaymentPage.rmProductHistory(rmProd.id);
593
+ orderDetail.lineItems.splice(index, 1);
594
+ if (document.querySelector('.js-cart-count')) {
595
+ (document.querySelector('.js-cart-count') as any).recreateView();
596
+ }
597
+ gvc.notifyDataChange('order');
598
+ })}"
599
+ >
600
+ ${this.xmarkSVG}
601
+ </div>
602
+ <div class="pos-subtotal">$${(item.sale_price * item.count).toLocaleString()}</div>
603
+ </div>
604
+ </div>
605
+ `;
606
+ })
607
+ .join('')}
608
+ </div>
609
+ <div class="w-100 pos-price-container">
610
+ <div class="w-100 d-flex flex-column gap-2">
611
+ ${[
612
+ {
613
+ left: '小計總額',
614
+ right: parseInt((orderDetail.subtotal ?? 0) as any, 10).toLocaleString(),
615
+ },
616
+ // {
617
+ // left: '活動折扣',
618
+ // right: parseInt((orderDetail.discount ?? 0) as any, 10).toLocaleString(),
619
+ // },
620
+ ]
621
+ .map(data => {
622
+ return html`
623
+ <div class="w-100 d-flex">
624
+ <div style="font-size: 18px; font-style: normal; font-weight: 700;">${data.left}</div>
625
+ <div class="ms-auto" style="font-size: 16px; font-weight: 700;">$ ${data.right}</div>
626
+ </div>
627
+ `;
628
+ })
629
+ .join('')}
630
+ </div>
631
+ </div>
632
+ `;
633
+ },
634
+ onCreate: () => {
635
+ obj.gvc.glitter.share.scan_back = (text: string) => {
636
+ dialog.dataLoading({ visible: true });
637
+ ApiShop.getProduct({
638
+ page: 0,
639
+ limit: 50000,
640
+ accurate_search_text: true,
641
+ search: text,
642
+ status: 'inRange',
643
+ channel: POSSetting.config.where_store.includes('store_') ? 'pos' : 'exhibition',
644
+ whereStore: POSSetting.config.where_store,
645
+ orderBy: 'created_time_desc',
646
+ }).then(res => {
647
+ dialog.dataLoading({ visible: false });
648
+
649
+ if (res.response.data[0]) {
650
+ const data = res.response.data[0];
651
+ const selectVariant = data.content.variants.find((d1: any) => d1.barcode === text);
652
+
653
+ if (
654
+ !orderDetail.lineItems.find(dd => {
655
+ return dd.id + dd.spec.join('-') === data.id + selectVariant.spec.join('-');
656
+ })
657
+ ) {
658
+ orderDetail.lineItems.push({
659
+ id: data.id,
660
+ title: data.content.title,
661
+ preview_image:
662
+ selectVariant.preview_image.length > 1
663
+ ? selectVariant.preview_image
664
+ : data.content.preview_image[0],
665
+ spec: selectVariant.spec,
666
+ count: 0,
667
+ sale_price: selectVariant.sale_price,
668
+ sku: selectVariant.sku,
669
+ });
295
670
  }
296
- },
297
- };
298
- })}
299
- </div>
300
- ${(() => {
301
- const checkId = gvc.glitter.getUUID();
302
- let checking = true;
303
- let interVal: any = 0;
304
-
305
- async function checkStock() {
306
- checking = true;
307
- PaymentPage.storeHistory(orderDetail);
308
- checking = false;
309
- gvc.notifyDataChange(checkId);
310
- }
311
671
 
312
- gvc.glitter.share.checkStock = checkStock;
313
- checkStock();
672
+ orderDetail.lineItems.find(dd => {
673
+ return dd.id + dd.spec.join('-') === data.id + selectVariant.spec.join('-');
674
+ })!.count++;
314
675
 
315
- function checkStockInterVal() {
316
- clearInterval(interVal);
317
- interVal = setTimeout(() => checkStock(), 300);
318
- }
676
+ gvc.notifyDataChange('order');
677
+ } else {
678
+ swal.toast({ icon: 'error', title: '無此商品' });
679
+ }
319
680
 
320
- const view = html` <div
321
- class=""
322
- style="height: 100%;width: 352px;max-width:100%;overflow: auto;${document.body.clientWidth > 800
323
- ? `padding: 36px 24px;`
324
- : `padding: 10px 12px;`};background: #FFF;box-shadow: 1px 0 10px 0 rgba(0, 0, 0, 0.10);"
681
+ gvc.notifyDataChange(`order`);
682
+ });
683
+ };
684
+ },
685
+ });
686
+
687
+ const gotoCheckoutView = html`<div
688
+ class="pos-goto-checkout"
689
+ onclick="${gvc.event(() => {
690
+ vm.type = 'payment';
691
+ gvc.glitter.closeDrawer();
692
+ })}"
693
+ >
694
+ 前往結帳
695
+ </div>`;
696
+
697
+ const drawerView = html` <div
698
+ class="pos-drawer"
699
+ style="${isPhone ? 'padding: 10px 12px;' : 'padding: 36px 24px;'};"
700
+ >
701
+ ${checkView} ${orderView} ${gotoCheckoutView}
702
+ </div>`;
703
+
704
+ return html`
705
+ <div
706
+ class="left-panel"
707
+ style="overflow: hidden; ${isPhone ? 'width: calc(100%); padding-top: 0' : 'width: calc(100% - 352px);'}"
708
+ >
709
+ <div
710
+ class="d-flex ${isPhone ? 'flex-column gap-2' : ''}"
711
+ style="${isPhone ? 'padding: 16px 8px;' : 'padding: 24px;'}"
325
712
  >
326
- ${gvc.bindView(() => {
327
- return {
328
- bind: checkId,
329
- view: () => {
330
- if (checking) {
331
- return html` <div class="w-100 ">
332
- <div
333
- class="d-flex align-items-center justify-content-center mb-4 p-2 fw-500 rounded-3"
334
- style="background: #ffb400;color:#393939;gap:10px;"
335
- >
336
- <div class="spinner-border" style="width:20px;height: 20px;"></div>
337
- 庫存檢查中...
338
- </div>
339
- </div>`;
340
- } else {
341
- return html` <div style="color:#393939;font-size: 32px;font-weight: 700;letter-spacing: 3px;">
342
- 購物清單
343
- </div>`;
344
- }
345
- },
346
- divCreate: {
347
- class: `d-flex flex-column`,
348
- style: `height:50px; margin-bottom:24px;margin-top:${gvc.glitter.share.top_inset}px;`,
349
- },
350
- };
351
- })}
352
- ${gvc.bindView({
353
- bind: 'order',
354
- dataList: [{ obj: vm, key: 'order' }],
355
- view: () => {
356
- orderDetail.subtotal = 0;
357
- orderDetail.lineItems.forEach(item => {
358
- orderDetail.subtotal += item.sale_price * item.count;
359
- });
360
- return html`
361
- <div style="display: flex;flex-direction: column;gap: 18px;">
362
- ${orderDetail.lineItems
363
- .map((item, index) => {
364
- return html`
365
- ${index > 0 ? `<div style="background-color: #DDD;height:1px;width: 100%;"></div>` : ''}
366
- <div class="d-flex align-items-center" style="min-height: 87px;">
367
- <div
368
- class="rounded-3"
369
- style="background: 50%/cover url('${item.preview_image ||
370
- 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg'}');height: 67px;width: 66px;margin-right: 12px; min-height: 67px;min-width: 66px;"
371
- ></div>
372
- <div class="d-flex flex-column flex-fill">
373
- <div>${item.title}</div>
374
- <div class="d-flex" style="gap:4px;">
375
- ${item.spec.length > 0
376
- ? item.spec
377
- .map(spec => {
378
- return html` <div
379
- style="color: #949494;font-size: 16px;font-style: normal;font-weight: 500;"
380
- >
381
- ${spec}
382
- </div>`;
383
- })
384
- .join('')
385
- : '單一規格'}
386
- </div>
387
- <div class="d-flex align-items-center" style="margin-top:6px;">
388
- <div
389
- style="display: flex;width: 30px;height: 30px;padding: 8px;justify-content: center;align-items: center;border-radius: 10px;background: #393939;"
390
- onclick="${gvc.event(() => {
391
- item.count = item.count < 2 ? item.count : item.count - 1;
392
- checkStockInterVal();
393
- gvc.notifyDataChange('order');
394
- })}"
395
- >
396
- <svg
397
- xmlns="http://www.w3.org/2000/svg"
398
- width="10"
399
- height="10"
400
- viewBox="0 0 10 10"
401
- fill="none"
402
- >
403
- <path
404
- d="M9.64314 5C9.64314 5.3457 9.32394 5.625 8.92885 5.625H1.07171C0.676618 5.625 0.357422 5.3457 0.357422 5C0.357422 4.6543 0.676618 4.375 1.07171 4.375H8.92885C9.32394 4.375 9.64314 4.6543 9.64314 5Z"
405
- fill="white"
406
- />
407
- </svg>
408
- </div>
409
- <input
410
- class="border-0"
411
- style="width: 50px;height: 25px;color: #393939;font-size: 18px;font-weight: 500;text-align: center"
412
- value="${item.count}"
413
- onchange="${gvc.event(e => {
414
- const category = orderDetail.lineItems[index].product_category;
415
- const n = category === 'weighing' ? parseFloat(e.value) : parseInt(e.value);
416
- item.count = isNaN(n) ? 0 : n;
417
- checkStockInterVal();
418
- gvc.notifyDataChange('order');
419
- })}"
420
- />
421
- <div
422
- style="display: flex;width: 30px;height: 30px;padding: 8px;justify-content: center;align-items: center;border-radius: 10px;background: #393939;"
423
- onclick="${gvc.event(() => {
424
- item.count++;
425
- checkStockInterVal();
426
- gvc.notifyDataChange('order');
427
- })}"
428
- >
429
- <svg
430
- xmlns="http://www.w3.org/2000/svg"
431
- width="10"
432
- height="10"
433
- viewBox="0 0 10 10"
434
- fill="none"
435
- >
436
- <path
437
- d="M5.76923 0.769231C5.76923 0.34375 5.42548 0 5 0C4.57452 0 4.23077 0.34375 4.23077 0.769231V4.23077H0.769231C0.34375 4.23077 0 4.57452 0 5C0 5.42548 0.34375 5.76923 0.769231 5.76923H4.23077V9.23077C4.23077 9.65625 4.57452 10 5 10C5.42548 10 5.76923 9.65625 5.76923 9.23077V5.76923H9.23077C9.65625 5.76923 10 5.42548 10 5C10 4.57452 9.65625 4.23077 9.23077 4.23077H5.76923V0.769231Z"
438
- fill="white"
439
- />
440
- </svg>
441
- </div>
442
- </div>
443
- </div>
444
- <div class="h-100 d-flex flex-column align-items-end justify-content-between">
445
- <div
446
- class=""
447
- onclick="${gvc.event(() => {
448
- const rmProd = orderDetail.lineItems[index];
449
- PaymentPage.rmProductHistory(rmProd.id);
450
- orderDetail.lineItems.splice(index, 1);
451
- if (document.querySelector('.js-cart-count')) {
452
- (document.querySelector('.js-cart-count') as any).recreateView();
453
- }
454
- gvc.notifyDataChange('order');
455
- })}"
456
- >
457
- <svg
458
- xmlns="http://www.w3.org/2000/svg"
459
- width="14"
460
- height="14"
461
- viewBox="0 0 14 14"
462
- fill="none"
463
- >
464
- <path d="M1 1L13 13" stroke="#949494" stroke-width="2" stroke-linecap="round" />
465
- <path d="M13 1L1 13" stroke="#949494" stroke-width="2" stroke-linecap="round" />
466
- </svg>
467
- </div>
468
-
469
- <div
470
- style="color:#393939;font-size: 18px;font-style: normal;font-weight: 500;letter-spacing: 0.72px;"
471
- >
472
- $${(item.sale_price * item.count).toLocaleString()}
473
- </div>
474
- </div>
475
- </div>
476
- `;
477
- })
478
- .join('')}
479
- </div>
480
- <div
481
- class="w-100"
482
- style="margin-top: 24px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;display: flex;padding: 24px;flex-direction: column;justify-content: center;"
483
- >
484
- <div class="w-100 d-flex flex-column" style="gap: 6px;">
485
- ${(() => {
486
- let tempData = [
487
- {
488
- left: `小計總額`,
489
- right: parseInt((orderDetail.subtotal ?? 0) as any, 10).toLocaleString(),
490
- },
491
- // {
492
- // left: `活動折扣`,
493
- // right: parseInt((orderDetail.discount ?? 0) as any, 10).toLocaleString()
494
- // }
495
- ];
496
- return tempData
497
- .map(data => {
498
- return html`
499
- <div class="w-100 d-flex">
500
- <div style="font-size: 18px;font-style: normal;font-weight: 700;">${data.left}</div>
501
- <div class="ms-auto" style="font-size: 16px;font-weight: 700;">$ ${data.right}</div>
502
- </div>
503
- `;
504
- })
505
- .join(``);
506
- })()}
507
- </div>
508
- </div>
509
- `;
510
- },
511
- onCreate: () => {
512
- const dialog = new ShareDialog(gvc.glitter);
513
- obj.gvc.glitter.share.scan_back = (text: string) => {
514
- dialog.dataLoading({ visible: true });
515
- ApiShop.getProduct({
516
- page: 0,
517
- limit: 50000,
518
- accurate_search_text: true,
519
- search: text,
520
- status: 'inRange',
521
- channel: POSSetting.config.where_store.includes('store_') ? 'pos' : 'exhibition',
522
- whereStore: POSSetting.config.where_store,
523
- orderBy: 'created_time_desc',
524
- }).then(res => {
525
- dialog.dataLoading({ visible: false });
526
- if (res.response.data[0]) {
527
- const data = res.response.data[0];
528
- const selectVariant = res.response.data[0].content.variants.find((d1: any) => d1.barcode === text);
529
- if (
530
- !orderDetail.lineItems.find(dd => {
531
- return dd.id + dd.spec.join('-') === data.id + selectVariant.spec.join('-');
532
- })
533
- ) {
534
- orderDetail.lineItems.push({
535
- id: data.id,
536
- title: data.content.title,
537
- preview_image:
538
- selectVariant.preview_image.length > 1
539
- ? selectVariant.preview_image
540
- : data.content.preview_image[0],
541
- spec: selectVariant.spec,
542
- count: 0,
543
- sale_price: selectVariant.sale_price,
544
- sku: selectVariant.sku,
545
- });
546
- }
547
- orderDetail.lineItems.find(dd => {
548
- return dd.id + dd.spec.join('-') === data.id + selectVariant.spec.join('-');
549
- })!.count++;
550
- gvc.notifyDataChange('order');
551
- } else {
552
- swal.toast({ icon: 'error', title: '無此商品' });
553
- }
713
+ ${selectOptionView} ${categoryView}
714
+ </div>
715
+ ${productShowView}
716
+ </div>
717
+ ${(() => {
718
+ if (!isPhone) return drawerView;
554
719
 
555
- gvc.notifyDataChange(`order`);
556
- });
557
- };
558
- },
559
- })}
560
-
561
- <div
562
- style="margin-top: 32px;display: flex;padding: 12px 24px;justify-content: center;align-items: center;border-radius: 10px;background: #393939;font-size: 20px;font-style: normal;font-weight: 500;color: #FFF;"
563
- onclick="${gvc.event(() => {
564
- vm.type = 'payment';
565
- gvc.glitter.closeDrawer();
566
- })}"
567
- >
568
- 前往結帳
569
- </div>
570
- </div>`;
571
- if (document.body.offsetWidth < 800) {
572
- gvc.glitter.setDrawer(view, () => {});
573
- return '';
574
- } else {
575
- return view;
576
- }
720
+ gvc.glitter.setDrawer(drawerView, () => {});
721
+ return '';
577
722
  })()}
578
723
  `;
579
724
  }
725
+
726
+ static noImage = 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg';
727
+
728
+ static xmarkSVG = html`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
729
+ <path d="M1 1L13 13" stroke="#949494" stroke-width="2" stroke-linecap="round" />
730
+ <path d="M13 1L1 13" stroke="#949494" stroke-width="2" stroke-linecap="round" />
731
+ </svg>`;
732
+
733
+ static minusSVG = html`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" fill="none">
734
+ <path
735
+ d="M9.64314 5C9.64314 5.3457 9.32394 5.625 8.92885 5.625H1.07171C0.676618 5.625 0.357422 5.3457 0.357422 5C0.357422 4.6543 0.676618 4.375 1.07171 4.375H8.92885C9.32394 4.375 9.64314 4.6543 9.64314 5Z"
736
+ fill="white"
737
+ />
738
+ </svg>`;
739
+
740
+ static plusSVG = html`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" fill="none">
741
+ <path
742
+ d="M5.76923 0.769231C5.76923 0.34375 5.42548 0 5 0C4.57452 0 4.23077 0.34375 4.23077 0.769231V4.23077H0.769231C0.34375 4.23077 0 4.57452 0 5C0 5.42548 0.34375 5.76923 0.769231 5.76923H4.23077V9.23077C4.23077 9.65625 4.57452 10 5 10C5.42548 10 5.76923 9.65625 5.76923 9.23077V5.76923H9.23077C9.65625 5.76923 10 5.42548 10 5C10 4.57452 9.65625 4.23077 9.23077 4.23077H5.76923V0.769231Z"
743
+ fill="white"
744
+ />
745
+ </svg>`;
580
746
  }