ts-glitter 22.4.6 → 22.4.9
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/lib/glitterBundle/Glitter.css +74 -62
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-product.js +49 -32
- package/lowcode/backend-manager/bg-product.ts +57 -39
- package/lowcode/backend-manager/bg-widget.js +17 -0
- package/lowcode/backend-manager/bg-widget.ts +18 -0
- package/lowcode/cms-plugin/information/information-module.js +5 -5
- package/lowcode/cms-plugin/information/information-module.ts +9 -5
- package/lowcode/cms-plugin/menus-setting.js +69 -55
- package/lowcode/cms-plugin/menus-setting.ts +77 -61
- package/lowcode/cms-plugin/module/form-module.js +109 -89
- package/lowcode/cms-plugin/module/form-module.ts +680 -650
- package/lowcode/cms-plugin/module/product-excel.js +1 -0
- package/lowcode/cms-plugin/module/product-excel.ts +2 -0
- package/lowcode/cms-plugin/pos-pages/payment-page.js +28 -10
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +29 -10
- package/lowcode/cms-plugin/shopping-allowance-manager.js +0 -1
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +0 -1
- package/lowcode/cms-plugin/shopping-collections.js +367 -193
- package/lowcode/cms-plugin/shopping-collections.ts +664 -243
- package/lowcode/cms-plugin/shopping-information.js +392 -38
- package/lowcode/cms-plugin/shopping-information.ts +479 -87
- package/lowcode/cms-plugin/shopping-product-setting.js +2 -2
- package/lowcode/cms-plugin/shopping-product-setting.ts +2 -2
- package/lowcode/cms-plugin/shopping-setting-advance.js +906 -766
- package/lowcode/cms-plugin/shopping-setting-advance.ts +977 -841
- package/lowcode/cms-plugin/shopping-setting-basic.js +1547 -1285
- package/lowcode/cms-plugin/shopping-setting-basic.ts +1742 -1466
- package/lowcode/cms-plugin/stock-stores.js +1 -0
- package/lowcode/cms-plugin/stock-stores.ts +1 -0
- package/lowcode/cms-plugin/user-list.js +47 -12
- package/lowcode/cms-plugin/user-list.ts +52 -14
- package/lowcode/css/editor.css +6 -0
- package/lowcode/glitterBundle/Glitter.css +74 -62
- package/lowcode/jslib/nestable/index.html +317 -0
- package/lowcode/jslib/nestable/jquery.nestable.js +484 -0
- package/lowcode/official_view_component/form-widget/input-custom.js +98 -6
- package/lowcode/official_view_component/form-widget/input-custom.ts +121 -16
- package/lowcode/public-components/headers/header-class.js +63 -0
- package/lowcode/public-components/headers/header-class.ts +65 -0
- package/lowcode/public-components/headers/sy-02.js +386 -400
- package/lowcode/public-components/headers/sy-02.ts +482 -492
- package/lowcode/public-components/headers/sy-03.js +42 -43
- package/lowcode/public-components/headers/sy-03.ts +46 -43
- package/lowcode/public-components/headers/sy-04.js +43 -41
- package/lowcode/public-components/headers/sy-04.ts +48 -41
- package/lowcode/public-components/headers/sy-05.js +30 -27
- package/lowcode/public-components/headers/sy-05.ts +33 -27
- package/lowcode/public-components/product/product-list.js +160 -148
- package/lowcode/public-components/product/product-list.ts +186 -165
- package/lowcode/public-models/product.ts +26 -1
- package/lowcode/src/glitterBundle/Glitter.css +74 -62
- package/package.json +1 -1
- package/rxmnt81tnk.json +1 -0
- package/src/api-public/controllers/shop.js +10 -4
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +14 -9
- package/src/api-public/services/ezpay/tool.d.ts +1 -0
- package/src/api-public/services/mail.js +1 -1
- package/src/api-public/services/mail.js.map +1 -1
- package/src/api-public/services/mail.ts +1 -1
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/monitor.ts +2 -0
- package/src/api-public/services/schedule.d.ts +0 -1
- package/src/api-public/services/schedule.js +12 -35
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +15 -39
- package/src/api-public/services/shopee.js +7 -17
- package/src/api-public/services/shopping.d.ts +27 -6
- package/src/api-public/services/shopping.js +364 -85
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +510 -101
- package/src/api-public/services/updated-table-checked.js +58 -1
- package/src/api-public/services/updated-table-checked.js.map +1 -1
- package/src/api-public/services/updated-table-checked.ts +62 -1
- package/src/api-public/services/user-update.js +14 -0
- package/src/api-public/services/user-update.js.map +1 -1
- package/src/api-public/services/user-update.ts +15 -0
- package/src/api-public/services/user.js +1 -1
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/index.js +7 -4
- package/src/index.js.map +1 -1
- package/src/index.ts +45 -36
- package/src/modules/firebase.js +1 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +1 -0
- package/src/seo-config.d.ts +2 -1
- package/src/seo-config.js +28 -22
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +33 -26
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/ses.js +4 -3
- package/src/services/ses.js.map +1 -1
- package/src/services/system-schedule.js.map +1 -1
- package/src/services/system-schedule.ts +1 -0
|
@@ -1,82 +1,94 @@
|
|
|
1
1
|
/*Read only*/
|
|
2
2
|
/*Please dont change*/
|
|
3
3
|
@media screen {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
.hy-drawer-scrim {
|
|
5
|
+
display: block;
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
opacity: 0;
|
|
12
|
+
z-index: 2;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
background: rgba(0, 0, 0, 0.5);
|
|
15
|
+
transform: translateX(0);
|
|
16
|
+
-webkit-tap-highlight-color: transparent;
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
.hy-drawer-content {
|
|
20
|
+
position: fixed;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
z-index: 3;
|
|
24
|
+
overflow-x: hidden;
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
contain: strict;
|
|
27
|
+
width: 300px;
|
|
28
|
+
background: #fff;
|
|
29
|
+
box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
|
|
30
|
+
transform: translateX(0);
|
|
31
|
+
-webkit-overflow-scrolling: touch;
|
|
32
|
+
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
.hy-drawer-content.hy-drawer-left {
|
|
35
|
+
left: -300px;
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
.hy-drawer-content.hy-drawer-right {
|
|
39
|
+
right: -300px;
|
|
40
|
+
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
.hy-drawer-content.hy-drawer-left.hy-drawer-opened {
|
|
43
|
+
left: 0 !important;
|
|
44
|
+
transform: translateX(0) !important;
|
|
45
|
+
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
.hy-drawer-content.hy-drawer-right.hy-drawer-opened {
|
|
48
|
+
right: 0 !important;
|
|
49
|
+
transform: translateX(0) !important;
|
|
50
|
+
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@media print {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
.hy-drawer-scrim {
|
|
55
|
+
display: none !important;
|
|
56
|
+
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
.hy-drawer-content {
|
|
59
|
+
transform: none !important;
|
|
60
|
+
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.translation{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
.translation {
|
|
64
|
+
animation: TestMove 0.5s; /*IE*/
|
|
65
|
+
-moz-animation: TestMove 0.5s; /*FireFox*/
|
|
66
|
+
-webkit-animation: TestMove 0.5s; /*Chrome, Safari*/
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
@keyframes TestMove{
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
@keyframes TestMove {
|
|
70
|
+
from {
|
|
71
|
+
left: 100%;
|
|
72
|
+
}
|
|
73
|
+
to {
|
|
74
|
+
left: 0%;
|
|
75
|
+
}
|
|
72
76
|
}
|
|
73
77
|
|
|
74
|
-
@-moz-keyframes TestMove{
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
@-moz-keyframes TestMove {
|
|
79
|
+
from {
|
|
80
|
+
left: 100%;
|
|
81
|
+
}
|
|
82
|
+
to {
|
|
83
|
+
left: 0%;
|
|
84
|
+
}
|
|
77
85
|
}
|
|
78
86
|
|
|
79
|
-
@-webkit-keyframes TestMove{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
87
|
+
@-webkit-keyframes TestMove {
|
|
88
|
+
from {
|
|
89
|
+
left: 100%;
|
|
90
|
+
}
|
|
91
|
+
to {
|
|
92
|
+
left: 0%;
|
|
93
|
+
}
|
|
94
|
+
}
|
package/lowcode/Entry.js
CHANGED
|
@@ -154,7 +154,7 @@ export class Entry {
|
|
|
154
154
|
}
|
|
155
155
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
156
156
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
157
|
-
glitter.share.editerVersion = 'V_22.4.
|
|
157
|
+
glitter.share.editerVersion = 'V_22.4.9';
|
|
158
158
|
glitter.share.start = new Date();
|
|
159
159
|
const vm = { appConfig: [] };
|
|
160
160
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -159,7 +159,7 @@ export class Entry {
|
|
|
159
159
|
}
|
|
160
160
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
161
161
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
162
|
-
glitter.share.editerVersion = 'V_22.4.
|
|
162
|
+
glitter.share.editerVersion = 'V_22.4.9';
|
|
163
163
|
glitter.share.start = new Date();
|
|
164
164
|
const vm = { appConfig: [] };
|
|
165
165
|
(window as any).saasConfig = {
|
|
@@ -395,6 +395,14 @@ export class BgProduct {
|
|
|
395
395
|
container: { style: 'margin: 3rem 0;' },
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
+
function formatOptionId(path) {
|
|
399
|
+
const key = path
|
|
400
|
+
.toString()
|
|
401
|
+
.split('/')
|
|
402
|
+
.map(segment => segment.trim())
|
|
403
|
+
.join('_');
|
|
404
|
+
return `_collections_opt_${key}`;
|
|
405
|
+
}
|
|
398
406
|
return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
|
|
399
407
|
<div class="w-100 d-flex align-items-center p-3 border-bottom">
|
|
400
408
|
<div class="tx_700">${(_a = obj.title) !== null && _a !== void 0 ? _a : '商品分類'}</div>
|
|
@@ -410,47 +418,56 @@ export class BgProduct {
|
|
|
410
418
|
<div class="c_dialog">
|
|
411
419
|
<div class="c_dialog_body">
|
|
412
420
|
<div class="c_dialog_main" style="gap: 18px; max-height: 500px;">
|
|
413
|
-
<div class="position-sticky px-1" style="top: 0; background-color: #fff;">
|
|
414
|
-
${BgWidget.searchFilter(gvc.event((e, event) => {
|
|
415
|
-
vm.query = e.value;
|
|
416
|
-
vm.loading = true;
|
|
417
|
-
obj.gvc.notifyDataChange(vm.id);
|
|
418
|
-
}), vm.query || '', '搜尋')}
|
|
419
|
-
</div>
|
|
420
421
|
${obj.gvc.map(vm.options.map((opt) => {
|
|
422
|
+
const id = formatOptionId(opt.key);
|
|
421
423
|
function call() {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
+
const cloneDefault = obj.default.slice();
|
|
425
|
+
if (obj.single) {
|
|
426
|
+
obj.default = [opt.key];
|
|
424
427
|
}
|
|
425
428
|
else {
|
|
426
|
-
obj.default.
|
|
429
|
+
if (obj.default.includes(opt.key)) {
|
|
430
|
+
obj.default = obj.default.filter(item => item !== opt.key);
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
obj.default.push(opt.key);
|
|
434
|
+
}
|
|
427
435
|
}
|
|
428
|
-
|
|
436
|
+
gvc.notifyDataChange([...cloneDefault.map(key => formatOptionId(key)), id]);
|
|
429
437
|
}
|
|
430
|
-
return
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
438
|
+
return gvc.bindView({
|
|
439
|
+
bind: id,
|
|
440
|
+
view: () => {
|
|
441
|
+
return html `<input
|
|
442
|
+
class="form-check-input mt-0 ${vm.checkClass}"
|
|
443
|
+
type="checkbox"
|
|
444
|
+
id="${opt.key}"
|
|
445
|
+
name="radio_${vm.id}"
|
|
446
|
+
onclick="${obj.gvc.event(() => call())}"
|
|
447
|
+
${obj.default.includes(opt.key) ? 'checked' : ''}
|
|
448
|
+
/>
|
|
449
|
+
<div
|
|
450
|
+
class="d-flex align-items-center form-check-label c_updown_label cursor_pointer gap-3"
|
|
451
|
+
onclick="${obj.gvc.event(() => call())}"
|
|
452
|
+
>
|
|
453
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
|
|
454
|
+
${opt.note ? html ` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
455
|
+
</div>`;
|
|
456
|
+
},
|
|
457
|
+
divCreate: {
|
|
458
|
+
class: 'd-flex align-items-center',
|
|
459
|
+
style: 'gap: 24px',
|
|
460
|
+
},
|
|
461
|
+
});
|
|
447
462
|
}))}
|
|
448
463
|
</div>
|
|
449
464
|
<div class="c_dialog_bar">
|
|
450
|
-
${
|
|
451
|
-
|
|
452
|
-
gvc.
|
|
453
|
-
|
|
465
|
+
${obj.single
|
|
466
|
+
? ''
|
|
467
|
+
: BgWidget.cancel(obj.gvc.event(() => {
|
|
468
|
+
obj.callback([]);
|
|
469
|
+
gvc.closeDialog();
|
|
470
|
+
}), '清除全部')}
|
|
454
471
|
${BgWidget.cancel(obj.gvc.event(() => {
|
|
455
472
|
obj.callback(vm.def);
|
|
456
473
|
gvc.closeDialog();
|
|
@@ -488,6 +488,7 @@ export class BgProduct {
|
|
|
488
488
|
title?: string;
|
|
489
489
|
default: (number | string)[];
|
|
490
490
|
callback: (value: any) => void;
|
|
491
|
+
single?: boolean;
|
|
491
492
|
}) {
|
|
492
493
|
return obj.gvc.glitter.innerDialog((gvc: GVC) => {
|
|
493
494
|
const vm = {
|
|
@@ -514,6 +515,16 @@ export class BgProduct {
|
|
|
514
515
|
container: { style: 'margin: 3rem 0;' },
|
|
515
516
|
});
|
|
516
517
|
}
|
|
518
|
+
|
|
519
|
+
function formatOptionId(path: string | number) {
|
|
520
|
+
const key = path
|
|
521
|
+
.toString()
|
|
522
|
+
.split('/') // 拆分所有層級
|
|
523
|
+
.map(segment => segment.trim()) // 去除空白
|
|
524
|
+
.join('_'); // 統一格式為「底線」
|
|
525
|
+
return `_collections_opt_${key}`;
|
|
526
|
+
}
|
|
527
|
+
|
|
517
528
|
return html` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
|
|
518
529
|
<div class="w-100 d-flex align-items-center p-3 border-bottom">
|
|
519
530
|
<div class="tx_700">${obj.title ?? '商品分類'}</div>
|
|
@@ -529,56 +540,63 @@ export class BgProduct {
|
|
|
529
540
|
<div class="c_dialog">
|
|
530
541
|
<div class="c_dialog_body">
|
|
531
542
|
<div class="c_dialog_main" style="gap: 18px; max-height: 500px;">
|
|
532
|
-
<div class="position-sticky px-1" style="top: 0; background-color: #fff;">
|
|
533
|
-
${BgWidget.searchFilter(
|
|
534
|
-
gvc.event((e, event) => {
|
|
535
|
-
vm.query = e.value;
|
|
536
|
-
vm.loading = true;
|
|
537
|
-
obj.gvc.notifyDataChange(vm.id);
|
|
538
|
-
}),
|
|
539
|
-
vm.query || '',
|
|
540
|
-
'搜尋'
|
|
541
|
-
)}
|
|
542
|
-
</div>
|
|
543
543
|
${obj.gvc.map(
|
|
544
544
|
vm.options.map((opt: OptionsItem) => {
|
|
545
|
+
const id = formatOptionId(opt.key);
|
|
546
|
+
|
|
545
547
|
function call() {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
+
const cloneDefault = obj.default.slice();
|
|
549
|
+
|
|
550
|
+
if (obj.single) {
|
|
551
|
+
obj.default = [opt.key];
|
|
548
552
|
} else {
|
|
549
|
-
obj.default.
|
|
553
|
+
if (obj.default.includes(opt.key)) {
|
|
554
|
+
obj.default = obj.default.filter(item => item !== opt.key);
|
|
555
|
+
} else {
|
|
556
|
+
obj.default.push(opt.key);
|
|
557
|
+
}
|
|
550
558
|
}
|
|
551
|
-
|
|
559
|
+
|
|
560
|
+
gvc.notifyDataChange([...cloneDefault.map(key => formatOptionId(key)), id]);
|
|
552
561
|
}
|
|
553
562
|
|
|
554
|
-
return
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
563
|
+
return gvc.bindView({
|
|
564
|
+
bind: id,
|
|
565
|
+
view: () => {
|
|
566
|
+
return html`<input
|
|
567
|
+
class="form-check-input mt-0 ${vm.checkClass}"
|
|
568
|
+
type="checkbox"
|
|
569
|
+
id="${opt.key}"
|
|
570
|
+
name="radio_${vm.id}"
|
|
571
|
+
onclick="${obj.gvc.event(() => call())}"
|
|
572
|
+
${obj.default.includes(opt.key) ? 'checked' : ''}
|
|
573
|
+
/>
|
|
574
|
+
<div
|
|
575
|
+
class="d-flex align-items-center form-check-label c_updown_label cursor_pointer gap-3"
|
|
576
|
+
onclick="${obj.gvc.event(() => call())}"
|
|
577
|
+
>
|
|
578
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
|
|
579
|
+
${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
580
|
+
</div>`;
|
|
581
|
+
},
|
|
582
|
+
divCreate: {
|
|
583
|
+
class: 'd-flex align-items-center',
|
|
584
|
+
style: 'gap: 24px',
|
|
585
|
+
},
|
|
586
|
+
});
|
|
571
587
|
})
|
|
572
588
|
)}
|
|
573
589
|
</div>
|
|
574
590
|
<div class="c_dialog_bar">
|
|
575
|
-
${
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
591
|
+
${obj.single
|
|
592
|
+
? ''
|
|
593
|
+
: BgWidget.cancel(
|
|
594
|
+
obj.gvc.event(() => {
|
|
595
|
+
obj.callback([]);
|
|
596
|
+
gvc.closeDialog();
|
|
597
|
+
}),
|
|
598
|
+
'清除全部'
|
|
599
|
+
)}
|
|
582
600
|
${BgWidget.cancel(
|
|
583
601
|
obj.gvc.event(() => {
|
|
584
602
|
obj.callback(vm.def);
|
|
@@ -281,6 +281,23 @@ export class BgWidget {
|
|
|
281
281
|
/>
|
|
282
282
|
</div>`;
|
|
283
283
|
}
|
|
284
|
+
static checkInput(gvc, def, callback) {
|
|
285
|
+
const id = gvc.glitter.getUUID();
|
|
286
|
+
const trueImg = html `<i class="fa-solid fa-square-check" style="width: 16px;height: 16px;" onclick="${gvc.event(e => {
|
|
287
|
+
callback(def);
|
|
288
|
+
gvc.notifyDataChange(id);
|
|
289
|
+
})}"></i>`;
|
|
290
|
+
const falseImg = html `<div style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;" onclick="${gvc.event(e => {
|
|
291
|
+
callback(def);
|
|
292
|
+
gvc.notifyDataChange(id);
|
|
293
|
+
})}"></div>`;
|
|
294
|
+
return gvc.bindView({
|
|
295
|
+
bind: id,
|
|
296
|
+
view: () => {
|
|
297
|
+
return (def) ? trueImg : falseImg;
|
|
298
|
+
}, divCreate: {}
|
|
299
|
+
});
|
|
300
|
+
}
|
|
284
301
|
static switchTextButton(gvc, def, text, callback) {
|
|
285
302
|
var _b, _c;
|
|
286
303
|
return html ` <div style="display: flex; align-items: center;">
|
|
@@ -396,6 +396,24 @@ export class BgWidget {
|
|
|
396
396
|
</div>`;
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
+
static checkInput(gvc: GVC, def: boolean, callback: (value: boolean) => void) {
|
|
400
|
+
const id = gvc.glitter.getUUID()
|
|
401
|
+
const trueImg = html`<i class="fa-solid fa-square-check" style="width: 16px;height: 16px;" onclick="${gvc.event(e => {
|
|
402
|
+
callback(def);
|
|
403
|
+
gvc.notifyDataChange(id)
|
|
404
|
+
})}"></i>`;
|
|
405
|
+
const falseImg = html`<div style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;" onclick="${gvc.event(e => {
|
|
406
|
+
callback(def);
|
|
407
|
+
gvc.notifyDataChange(id)
|
|
408
|
+
})}"></div>`;
|
|
409
|
+
return gvc.bindView({
|
|
410
|
+
bind:id,
|
|
411
|
+
view:()=>{
|
|
412
|
+
return (def)?trueImg:falseImg
|
|
413
|
+
},divCreate:{}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
|
|
399
417
|
static switchTextButton(
|
|
400
418
|
gvc: GVC,
|
|
401
419
|
def: boolean,
|
|
@@ -60,7 +60,7 @@ export class InformationModule {
|
|
|
60
60
|
text: '是否確認重置號碼?',
|
|
61
61
|
callback: response => {
|
|
62
62
|
if (response) {
|
|
63
|
-
vm.data.pickup_now = vm.data.pickup_start ||
|
|
63
|
+
vm.data.pickup_now = vm.data.pickup_start || 0;
|
|
64
64
|
gvc.recreateView();
|
|
65
65
|
}
|
|
66
66
|
},
|
|
@@ -76,9 +76,9 @@ export class InformationModule {
|
|
|
76
76
|
BgWidget.editeInput({
|
|
77
77
|
gvc: gvc,
|
|
78
78
|
title: '初始號碼',
|
|
79
|
-
default: vm.data.pickup_start ||
|
|
79
|
+
default: `${vm.data.pickup_start || 0}`,
|
|
80
80
|
callback: text => {
|
|
81
|
-
vm.data.pickup_start = text;
|
|
81
|
+
vm.data.pickup_start = Number(text);
|
|
82
82
|
},
|
|
83
83
|
placeHolder: '請輸入初始號碼',
|
|
84
84
|
type: 'number',
|
|
@@ -88,9 +88,9 @@ export class InformationModule {
|
|
|
88
88
|
title: html `<div class="d-flex flex-column">
|
|
89
89
|
${['結束號碼', BgWidget.grayNote('輸入零則無上限')].join('')}
|
|
90
90
|
</div>`,
|
|
91
|
-
default: vm.data.pickup_end ||
|
|
91
|
+
default: `${vm.data.pickup_end || 0}`,
|
|
92
92
|
callback: text => {
|
|
93
|
-
vm.data.pickup_end = text;
|
|
93
|
+
vm.data.pickup_end = Number(text);
|
|
94
94
|
},
|
|
95
95
|
placeHolder: '請輸入結束號碼',
|
|
96
96
|
type: 'number',
|
|
@@ -5,10 +5,14 @@ import { FilterOptions } from '../filter-options.js';
|
|
|
5
5
|
|
|
6
6
|
type PageType = 'basic' | 'function' | 'global';
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
export type ViewModel = {
|
|
9
10
|
id: string;
|
|
10
11
|
tableId: string;
|
|
11
12
|
filterId: string;
|
|
13
|
+
webTypeId: string;
|
|
14
|
+
reverseId: string;
|
|
15
|
+
reverseEditId:string;
|
|
12
16
|
type: PageType;
|
|
13
17
|
data: any;
|
|
14
18
|
SEOData: any;
|
|
@@ -78,7 +82,7 @@ export class InformationModule {
|
|
|
78
82
|
text: '是否確認重置號碼?',
|
|
79
83
|
callback: response => {
|
|
80
84
|
if (response) {
|
|
81
|
-
vm.data.pickup_now = vm.data.pickup_start ||
|
|
85
|
+
vm.data.pickup_now = vm.data.pickup_start || 0;
|
|
82
86
|
gvc.recreateView();
|
|
83
87
|
}
|
|
84
88
|
},
|
|
@@ -94,9 +98,9 @@ export class InformationModule {
|
|
|
94
98
|
BgWidget.editeInput({
|
|
95
99
|
gvc: gvc,
|
|
96
100
|
title: '初始號碼',
|
|
97
|
-
default: vm.data.pickup_start
|
|
101
|
+
default: `${vm.data.pickup_start||0}`,
|
|
98
102
|
callback: text => {
|
|
99
|
-
vm.data.pickup_start = text;
|
|
103
|
+
vm.data.pickup_start = Number(text) ;
|
|
100
104
|
},
|
|
101
105
|
placeHolder: '請輸入初始號碼',
|
|
102
106
|
type: 'number',
|
|
@@ -106,9 +110,9 @@ export class InformationModule {
|
|
|
106
110
|
title: html`<div class="d-flex flex-column">
|
|
107
111
|
${['結束號碼', BgWidget.grayNote('輸入零則無上限')].join('')}
|
|
108
112
|
</div>`,
|
|
109
|
-
default
|
|
113
|
+
default:`${vm.data.pickup_end||0}`,
|
|
110
114
|
callback: text => {
|
|
111
|
-
vm.data.pickup_end = text;
|
|
115
|
+
vm.data.pickup_end = Number(text);
|
|
112
116
|
},
|
|
113
117
|
placeHolder: '請輸入結束號碼',
|
|
114
118
|
type: 'number',
|