ts-glitter 22.4.7 → 22.5.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.
- 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/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 -5
- package/src/index.js.map +1 -1
- package/src/index.ts +45 -38
- 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 +1 -1
- package/src/seo-config.js +1 -2
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -2
- 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
|
@@ -522,6 +522,7 @@ export class StockStores {
|
|
|
522
522
|
static getPublicData() {
|
|
523
523
|
return new Promise((resolve, reject) => {
|
|
524
524
|
ApiUser.getPublicConfig('store_manager', 'manager').then((dd) => {
|
|
525
|
+
console.log("dd -- ", dd);
|
|
525
526
|
if (dd.result && dd.response.value) {
|
|
526
527
|
resolve(dd.response.value);
|
|
527
528
|
}
|
|
@@ -607,6 +607,7 @@ export class StockStores {
|
|
|
607
607
|
static getPublicData() {
|
|
608
608
|
return new Promise<any>((resolve, reject) => {
|
|
609
609
|
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
610
|
+
console.log("dd -- " , dd);
|
|
610
611
|
if (dd.result && dd.response.value) {
|
|
611
612
|
resolve(dd.response.value);
|
|
612
613
|
} else {
|
|
@@ -27,6 +27,7 @@ import { GlobalUser } from '../glitter-base/global/global-user.js';
|
|
|
27
27
|
import { ListHeaderOption } from './list-header-option.js';
|
|
28
28
|
import { UserModule } from './user/user-module.js';
|
|
29
29
|
import { TableStorage } from './module/table-storage.js';
|
|
30
|
+
import { InputCustom } from '../official_view_component/form-widget/input-custom.js';
|
|
30
31
|
const html = String.raw;
|
|
31
32
|
export class UserList {
|
|
32
33
|
static main(gvc, obj) {
|
|
@@ -1038,24 +1039,42 @@ export class UserList {
|
|
|
1038
1039
|
item.group = '';
|
|
1039
1040
|
}
|
|
1040
1041
|
const formRenderMap = {
|
|
1041
|
-
input: () =>
|
|
1042
|
+
input: () => {
|
|
1043
|
+
if (item.form_config.type === 'date' && (vmi.mode === 'edit')) {
|
|
1044
|
+
return InputCustom.globalUse({
|
|
1045
|
+
gvc: gvc,
|
|
1046
|
+
title: item.title,
|
|
1047
|
+
title_class: `tx_normal`,
|
|
1048
|
+
input_class: `form-control`,
|
|
1049
|
+
input_style: `background:white !important;`,
|
|
1050
|
+
value: referObj[item.key] || '',
|
|
1051
|
+
callback: (text) => {
|
|
1052
|
+
referObj[item.key] = text;
|
|
1053
|
+
gvc.notifyDataChange(id);
|
|
1054
|
+
},
|
|
1055
|
+
place_holder: `請輸入${item.title}`,
|
|
1056
|
+
type: 'date'
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
return html `
|
|
1042
1060
|
<div>
|
|
1043
1061
|
<div class="tx_normal">${item.title}</div>
|
|
1044
1062
|
<div>
|
|
1045
1063
|
${BgWidget.editeInput({
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1064
|
+
gvc,
|
|
1065
|
+
title: '',
|
|
1066
|
+
default: `${referObj[item.key] || ''}`,
|
|
1067
|
+
placeHolder: `請輸入${item.title}`,
|
|
1068
|
+
callback: text => {
|
|
1069
|
+
referObj[item.key] = text;
|
|
1070
|
+
gvc.notifyDataChange(id);
|
|
1071
|
+
},
|
|
1072
|
+
readonly: vmi.mode !== 'edit',
|
|
1073
|
+
})}
|
|
1056
1074
|
</div>
|
|
1057
1075
|
</div>
|
|
1058
|
-
|
|
1076
|
+
`;
|
|
1077
|
+
},
|
|
1059
1078
|
multiple_line_text: () => html `
|
|
1060
1079
|
<div>
|
|
1061
1080
|
<div class="tx_normal">${item.title}</div>
|
|
@@ -1073,6 +1092,7 @@ export class UserList {
|
|
|
1073
1092
|
</div>
|
|
1074
1093
|
`,
|
|
1075
1094
|
};
|
|
1095
|
+
console.log(`itemitemitem==>`, item);
|
|
1076
1096
|
return formRenderMap[item.page]
|
|
1077
1097
|
? formRenderMap[item.page]()
|
|
1078
1098
|
: FormWidget.editorView({
|
|
@@ -1762,6 +1782,21 @@ export class UserList {
|
|
|
1762
1782
|
html ` <div class="update-bar-container">
|
|
1763
1783
|
${BgWidget.cancel(gvc.event(() => cf.callback()))}
|
|
1764
1784
|
${BgWidget.save(gvc.event(() => {
|
|
1785
|
+
function isValidDateFormat(dateStr) {
|
|
1786
|
+
const regex = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
1787
|
+
if (!regex.test(dateStr)) {
|
|
1788
|
+
return false;
|
|
1789
|
+
}
|
|
1790
|
+
const [year, month, day] = dateStr.split('-').map(Number);
|
|
1791
|
+
const date = new Date(year, month - 1, day);
|
|
1792
|
+
return date.getFullYear() === year &&
|
|
1793
|
+
date.getMonth() === month - 1 &&
|
|
1794
|
+
date.getDate() === day;
|
|
1795
|
+
}
|
|
1796
|
+
if (vm.data.userData.birth && !isValidDateFormat(vm.data.userData.birth)) {
|
|
1797
|
+
dialog.errorMessage({ text: '生日格式錯誤' });
|
|
1798
|
+
return;
|
|
1799
|
+
}
|
|
1765
1800
|
ApiUser.getPublicConfig('user_general_tags', 'manager').then(dd => {
|
|
1766
1801
|
var _a, _b;
|
|
1767
1802
|
if (dd.result && ((_b = (_a = dd.response) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.list)) {
|
|
@@ -19,6 +19,7 @@ import { GlobalUser } from '../glitter-base/global/global-user.js';
|
|
|
19
19
|
import { ListHeaderOption } from './list-header-option.js';
|
|
20
20
|
import { UserModule } from './user/user-module.js';
|
|
21
21
|
import { TableStorage } from './module/table-storage.js';
|
|
22
|
+
import { InputCustom } from '../official_view_component/form-widget/input-custom.js';
|
|
22
23
|
|
|
23
24
|
const html = String.raw;
|
|
24
25
|
|
|
@@ -1191,24 +1192,42 @@ export class UserList {
|
|
|
1191
1192
|
}
|
|
1192
1193
|
|
|
1193
1194
|
const formRenderMap: Record<string, () => string> = {
|
|
1194
|
-
input: () =>
|
|
1195
|
+
input: () => {
|
|
1196
|
+
if(item.form_config.type === 'date' && (vmi.mode === 'edit')){
|
|
1197
|
+
return InputCustom.globalUse({
|
|
1198
|
+
gvc:gvc,
|
|
1199
|
+
title:item.title,
|
|
1200
|
+
title_class:`tx_normal`,
|
|
1201
|
+
input_class:`form-control`,
|
|
1202
|
+
input_style:`background:white !important;`,
|
|
1203
|
+
value:referObj[item.key] || '',
|
|
1204
|
+
callback:(text)=>{
|
|
1205
|
+
referObj[item.key] = text;
|
|
1206
|
+
gvc.notifyDataChange(id);
|
|
1207
|
+
},
|
|
1208
|
+
place_holder:`請輸入${item.title}`,
|
|
1209
|
+
type:'date'
|
|
1210
|
+
})
|
|
1211
|
+
}
|
|
1212
|
+
return html`
|
|
1195
1213
|
<div>
|
|
1196
1214
|
<div class="tx_normal">${item.title}</div>
|
|
1197
1215
|
<div>
|
|
1198
1216
|
${BgWidget.editeInput({
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1217
|
+
gvc,
|
|
1218
|
+
title: '',
|
|
1219
|
+
default: `${referObj[item.key] || ''}`,
|
|
1220
|
+
placeHolder: `請輸入${item.title}`,
|
|
1221
|
+
callback: text => {
|
|
1222
|
+
referObj[item.key] = text;
|
|
1223
|
+
gvc.notifyDataChange(id);
|
|
1224
|
+
},
|
|
1225
|
+
readonly: vmi.mode !== 'edit',
|
|
1226
|
+
})}
|
|
1209
1227
|
</div>
|
|
1210
1228
|
</div>
|
|
1211
|
-
|
|
1229
|
+
`
|
|
1230
|
+
},
|
|
1212
1231
|
multiple_line_text: () => html`
|
|
1213
1232
|
<div>
|
|
1214
1233
|
<div class="tx_normal">${item.title}</div>
|
|
@@ -1226,7 +1245,7 @@ export class UserList {
|
|
|
1226
1245
|
</div>
|
|
1227
1246
|
`,
|
|
1228
1247
|
};
|
|
1229
|
-
|
|
1248
|
+
console.log(`itemitemitem==>`,item)
|
|
1230
1249
|
return formRenderMap[item.page]
|
|
1231
1250
|
? formRenderMap[item.page]()
|
|
1232
1251
|
: FormWidget.editorView({
|
|
@@ -2024,6 +2043,26 @@ export class UserList {
|
|
|
2024
2043
|
${BgWidget.cancel(gvc.event(() => cf.callback()))}
|
|
2025
2044
|
${BgWidget.save(
|
|
2026
2045
|
gvc.event(() => {
|
|
2046
|
+
function isValidDateFormat(dateStr:string) {
|
|
2047
|
+
// 匹配 yyyy-MM-dd 格式
|
|
2048
|
+
const regex = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
2049
|
+
|
|
2050
|
+
if (!regex.test(dateStr)) {
|
|
2051
|
+
return false;
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
// 进一步验证日期是否有效
|
|
2055
|
+
const [year, month, day] = dateStr.split('-').map(Number);
|
|
2056
|
+
const date = new Date(year, month - 1, day);
|
|
2057
|
+
|
|
2058
|
+
return date.getFullYear() === year &&
|
|
2059
|
+
date.getMonth() === month - 1 &&
|
|
2060
|
+
date.getDate() === day;
|
|
2061
|
+
}
|
|
2062
|
+
if(vm.data.userData.birth && !isValidDateFormat(vm.data.userData.birth)){
|
|
2063
|
+
dialog.errorMessage({text:'生日格式錯誤'})
|
|
2064
|
+
return
|
|
2065
|
+
}
|
|
2027
2066
|
ApiUser.getPublicConfig('user_general_tags', 'manager').then(dd => {
|
|
2028
2067
|
if (dd.result && dd.response?.value?.list) {
|
|
2029
2068
|
UserModule.setUserTags(gvc, [...dd.response.value.list, ...vm.data.userData.tags]);
|
|
@@ -2221,7 +2260,6 @@ export class UserList {
|
|
|
2221
2260
|
dialog.infoMessage({ text: BgWidget.taiwanPhoneAlert() });
|
|
2222
2261
|
return;
|
|
2223
2262
|
}
|
|
2224
|
-
|
|
2225
2263
|
if (!CheckInput.isBirthString(userData.birth)) {
|
|
2226
2264
|
dialog.infoMessage({
|
|
2227
2265
|
text: html`
|
package/lowcode/css/editor.css
CHANGED
|
@@ -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
|
+
}
|