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
|
@@ -119,11 +119,11 @@ white-space: normal;`;
|
|
|
119
119
|
}
|
|
120
120
|
})()}" value="${value}"
|
|
121
121
|
placeholder="${place_holder}"
|
|
122
|
-
type="${type==='date'?'text':type}"
|
|
122
|
+
type="${type === 'date' ? 'text' : type}"
|
|
123
123
|
id="${input_id}" onchange="${gvc.event((e, event) => {
|
|
124
124
|
widget.bundle.form_data[widget.bundle.form_key] = e.value;
|
|
125
125
|
widget.bundle.refresh && widget.bundle.refresh();
|
|
126
|
-
})}"
|
|
126
|
+
})}"> </input>`;
|
|
127
127
|
},
|
|
128
128
|
divCreate: {},
|
|
129
129
|
onCreate: () => {
|
|
@@ -137,7 +137,7 @@ white-space: normal;`;
|
|
|
137
137
|
() => {
|
|
138
138
|
const cf: any = {
|
|
139
139
|
locale: 'zh', // locale for this instance only,
|
|
140
|
-
disableMobile:
|
|
140
|
+
disableMobile: 'true',
|
|
141
141
|
};
|
|
142
142
|
if (min) {
|
|
143
143
|
cf.minDate = new Date(`${min} 00:00:00`);
|
|
@@ -147,25 +147,24 @@ white-space: normal;`;
|
|
|
147
147
|
}
|
|
148
148
|
//@ts-ignore
|
|
149
149
|
let fp = flatpickr('#' + input_id, cf);
|
|
150
|
-
if(min){
|
|
151
|
-
if(value &&
|
|
150
|
+
if (min) {
|
|
151
|
+
if (value && new Date(value).getTime() < new Date(min).getTime()) {
|
|
152
152
|
widget.bundle.form_data[widget.bundle.form_key] = '';
|
|
153
|
-
value=''
|
|
154
|
-
gvc.notifyDataChange(id)
|
|
153
|
+
value = '';
|
|
154
|
+
gvc.notifyDataChange(id);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
if(max){
|
|
158
|
-
if(value &&
|
|
157
|
+
if (max) {
|
|
158
|
+
if (value && new Date(value).getTime() > new Date(`${max} 23:59:59`).getTime()) {
|
|
159
159
|
widget.bundle.form_data[widget.bundle.form_key] = '';
|
|
160
|
-
value=''
|
|
161
|
-
gvc.notifyDataChange(id)
|
|
160
|
+
value = '';
|
|
161
|
+
gvc.notifyDataChange(id);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
|
|
165
164
|
},
|
|
166
165
|
() => {}
|
|
167
166
|
);
|
|
168
|
-
}else if(type === 'time'){
|
|
167
|
+
} else if (type === 'time') {
|
|
169
168
|
gvc.glitter.addStyleLink(['https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css']);
|
|
170
169
|
gvc.glitter.addMtScript(
|
|
171
170
|
[
|
|
@@ -175,15 +174,121 @@ white-space: normal;`;
|
|
|
175
174
|
() => {
|
|
176
175
|
const cf: any = {
|
|
177
176
|
locale: 'zh', // locale for this instance only,
|
|
178
|
-
disableMobile:
|
|
177
|
+
disableMobile: 'true',
|
|
179
178
|
noCalendar: true,
|
|
180
179
|
enableTime: true,
|
|
181
|
-
dateFormat: 'H:i'
|
|
180
|
+
dateFormat: 'H:i',
|
|
182
181
|
};
|
|
183
182
|
//@ts-ignore
|
|
184
183
|
let fp = flatpickr('#' + input_id, cf);
|
|
184
|
+
},
|
|
185
|
+
() => {}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
}
|
|
185
192
|
|
|
193
|
+
public static globalUse(obj: { gvc: GVC; title: string; title_class?: string; title_style?: string,input_class?:string ,input_style?:string,
|
|
194
|
+
place_holder:string,
|
|
195
|
+
type:string,
|
|
196
|
+
value:string ,
|
|
197
|
+
min?:string,
|
|
198
|
+
max?:string,
|
|
199
|
+
callback:(text:string)=>void}) {
|
|
200
|
+
const html = String.raw;
|
|
201
|
+
const glitter = obj.gvc.glitter;
|
|
186
202
|
|
|
203
|
+
const gvc = obj.gvc;
|
|
204
|
+
return gvc.bindView(() => {
|
|
205
|
+
const id = gvc.glitter.getUUID();
|
|
206
|
+
const input_id = gvc.glitter.getUUID();
|
|
207
|
+
return {
|
|
208
|
+
bind: id,
|
|
209
|
+
view: () => {
|
|
210
|
+
return html`
|
|
211
|
+
<div
|
|
212
|
+
class="${obj.title_class}"
|
|
213
|
+
style="${(() => {
|
|
214
|
+
try {
|
|
215
|
+
return (
|
|
216
|
+
obj.title_style ||
|
|
217
|
+
`color: black;
|
|
218
|
+
margin-bottom: 5px;
|
|
219
|
+
white-space: normal;`
|
|
220
|
+
);
|
|
221
|
+
} catch {
|
|
222
|
+
return `color: black;
|
|
223
|
+
margin-bottom: 5px;
|
|
224
|
+
white-space: normal;`;
|
|
225
|
+
}
|
|
226
|
+
})()}"
|
|
227
|
+
>
|
|
228
|
+
${obj.title}
|
|
229
|
+
</div>
|
|
230
|
+
<input class="${obj.input_class}" style="${obj.input_style ?? ''}" value="${obj.value}"
|
|
231
|
+
placeholder="${obj.place_holder}"
|
|
232
|
+
type="${obj.type === 'date' ? 'text' : obj.type}"
|
|
233
|
+
id="${input_id}" onchange="${gvc.event((e, event) => {
|
|
234
|
+
obj.value = e.value;
|
|
235
|
+
obj.callback(e.value);
|
|
236
|
+
})}"> </input>`;
|
|
237
|
+
},
|
|
238
|
+
divCreate: {},
|
|
239
|
+
onCreate: () => {
|
|
240
|
+
if (obj.type === 'date') {
|
|
241
|
+
gvc.glitter.addStyleLink(['https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css']);
|
|
242
|
+
gvc.glitter.addMtScript(
|
|
243
|
+
[
|
|
244
|
+
'https://cdn.jsdelivr.net/npm/flatpickr',
|
|
245
|
+
new URL('./jslib/picker-zh-tw.js', gvc.glitter.root_path).href,
|
|
246
|
+
],
|
|
247
|
+
() => {
|
|
248
|
+
const cf: any = {
|
|
249
|
+
locale: 'zh', // locale for this instance only,
|
|
250
|
+
disableMobile: 'true',
|
|
251
|
+
};
|
|
252
|
+
if (obj.min) {
|
|
253
|
+
cf.minDate = new Date(`${obj.min} 00:00:00`);
|
|
254
|
+
}
|
|
255
|
+
if (obj.max) {
|
|
256
|
+
cf.maxDate = new Date(`${obj.max} 23:59:59`);
|
|
257
|
+
}
|
|
258
|
+
//@ts-ignore
|
|
259
|
+
let fp = flatpickr('#' + input_id, cf);
|
|
260
|
+
if (obj.min) {
|
|
261
|
+
if (obj.value && new Date(obj.value).getTime() < new Date(obj.min).getTime()) {
|
|
262
|
+
obj.value = '';
|
|
263
|
+
gvc.notifyDataChange(id);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (obj.max) {
|
|
267
|
+
if (obj.value && new Date(obj.value).getTime() > new Date(`${obj.max} 23:59:59`).getTime()) {
|
|
268
|
+
obj.value = '';
|
|
269
|
+
gvc.notifyDataChange(id);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
() => {}
|
|
274
|
+
);
|
|
275
|
+
} else if (obj.type === 'time') {
|
|
276
|
+
gvc.glitter.addStyleLink(['https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css']);
|
|
277
|
+
gvc.glitter.addMtScript(
|
|
278
|
+
[
|
|
279
|
+
'https://cdn.jsdelivr.net/npm/flatpickr',
|
|
280
|
+
new URL('./jslib/picker-zh-tw.js', gvc.glitter.root_path).href,
|
|
281
|
+
],
|
|
282
|
+
() => {
|
|
283
|
+
const cf: any = {
|
|
284
|
+
locale: 'zh', // locale for this instance only,
|
|
285
|
+
disableMobile: 'true',
|
|
286
|
+
noCalendar: true,
|
|
287
|
+
enableTime: true,
|
|
288
|
+
dateFormat: 'H:i',
|
|
289
|
+
};
|
|
290
|
+
//@ts-ignore
|
|
291
|
+
let fp = flatpickr('#' + input_id, cf);
|
|
187
292
|
},
|
|
188
293
|
() => {}
|
|
189
294
|
);
|
|
@@ -193,5 +298,5 @@ white-space: normal;`;
|
|
|
193
298
|
});
|
|
194
299
|
}
|
|
195
300
|
}
|
|
196
|
-
|
|
301
|
+
export default InputCustom;
|
|
197
302
|
(window as any).glitter.setModule(import.meta.url, InputCustom);
|
|
@@ -14,6 +14,7 @@ import { Currency } from '../../glitter-base/global/currency.js';
|
|
|
14
14
|
import { PdClass } from '../product/pd-class.js';
|
|
15
15
|
import { CartModule } from '../modules/cart-module.js';
|
|
16
16
|
const html = String.raw;
|
|
17
|
+
const css = String.raw;
|
|
17
18
|
export class HeaderClass {
|
|
18
19
|
static hideShopperBtn() {
|
|
19
20
|
return !window.store_info.web_type.find((dd) => {
|
|
@@ -391,4 +392,66 @@ export class HeaderClass {
|
|
|
391
392
|
}
|
|
392
393
|
});
|
|
393
394
|
}
|
|
395
|
+
static getChangePagePath(gvc) {
|
|
396
|
+
return new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href;
|
|
397
|
+
}
|
|
398
|
+
static addStyle(gvc) {
|
|
399
|
+
gvc.addStyle(css `
|
|
400
|
+
.h-logo-image {
|
|
401
|
+
width: 150px;
|
|
402
|
+
background-position: center;
|
|
403
|
+
background-size: cover;
|
|
404
|
+
background-repeat: no-repeat;
|
|
405
|
+
border-radius: 10px;
|
|
406
|
+
margin-bottom: 20px;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.h-logo-text-1 {
|
|
410
|
+
width: 150px;
|
|
411
|
+
margin-bottom: 20px;
|
|
412
|
+
font-size: 36px;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.h-logo-text-2 {
|
|
416
|
+
margin-bottom: 20px;
|
|
417
|
+
font-size: 20px;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.h-glass-div {
|
|
421
|
+
position: absolute;
|
|
422
|
+
right: 10px;
|
|
423
|
+
top: 50%;
|
|
424
|
+
transform: translateY(-50%);
|
|
425
|
+
color: rgb(107, 114, 128);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.h-20px-pointer {
|
|
429
|
+
cursor: pointer;
|
|
430
|
+
font-size: 20px;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.h-checkout-count-icon {
|
|
434
|
+
width: 18px;
|
|
435
|
+
height: 18px;
|
|
436
|
+
color: white !important;
|
|
437
|
+
background: #fe5541;
|
|
438
|
+
align-items: center;
|
|
439
|
+
justify-content: center;
|
|
440
|
+
color: #fff;
|
|
441
|
+
display: flex;
|
|
442
|
+
font-weight: 500;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.h-member-button {
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
display: flex;
|
|
448
|
+
width: 100px;
|
|
449
|
+
padding: 7px;
|
|
450
|
+
justify-content: center;
|
|
451
|
+
align-items: center;
|
|
452
|
+
gap: 10px;
|
|
453
|
+
border-radius: 5px;
|
|
454
|
+
}
|
|
455
|
+
`);
|
|
456
|
+
}
|
|
394
457
|
}
|
|
@@ -7,6 +7,7 @@ import { PdClass } from '../product/pd-class.js';
|
|
|
7
7
|
import { CartModule } from '../modules/cart-module.js';
|
|
8
8
|
|
|
9
9
|
const html = String.raw;
|
|
10
|
+
const css = String.raw;
|
|
10
11
|
|
|
11
12
|
export class HeaderClass {
|
|
12
13
|
static hideShopperBtn() {
|
|
@@ -428,4 +429,68 @@ export class HeaderClass {
|
|
|
428
429
|
}
|
|
429
430
|
);
|
|
430
431
|
}
|
|
432
|
+
|
|
433
|
+
static getChangePagePath(gvc: GVC) {
|
|
434
|
+
return new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
static addStyle(gvc: GVC) {
|
|
438
|
+
gvc.addStyle(css`
|
|
439
|
+
.h-logo-image {
|
|
440
|
+
width: 150px;
|
|
441
|
+
background-position: center;
|
|
442
|
+
background-size: cover;
|
|
443
|
+
background-repeat: no-repeat;
|
|
444
|
+
border-radius: 10px;
|
|
445
|
+
margin-bottom: 20px;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.h-logo-text-1 {
|
|
449
|
+
width: 150px;
|
|
450
|
+
margin-bottom: 20px;
|
|
451
|
+
font-size: 36px;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.h-logo-text-2 {
|
|
455
|
+
margin-bottom: 20px;
|
|
456
|
+
font-size: 20px;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.h-glass-div {
|
|
460
|
+
position: absolute;
|
|
461
|
+
right: 10px;
|
|
462
|
+
top: 50%;
|
|
463
|
+
transform: translateY(-50%);
|
|
464
|
+
color: rgb(107, 114, 128);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.h-20px-pointer {
|
|
468
|
+
cursor: pointer;
|
|
469
|
+
font-size: 20px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.h-checkout-count-icon {
|
|
473
|
+
width: 18px;
|
|
474
|
+
height: 18px;
|
|
475
|
+
color: white !important;
|
|
476
|
+
background: #fe5541;
|
|
477
|
+
align-items: center;
|
|
478
|
+
justify-content: center;
|
|
479
|
+
color: #fff;
|
|
480
|
+
display: flex;
|
|
481
|
+
font-weight: 500;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.h-member-button {
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
display: flex;
|
|
487
|
+
width: 100px;
|
|
488
|
+
padding: 7px;
|
|
489
|
+
justify-content: center;
|
|
490
|
+
align-items: center;
|
|
491
|
+
gap: 10px;
|
|
492
|
+
border-radius: 5px;
|
|
493
|
+
}
|
|
494
|
+
`);
|
|
495
|
+
}
|
|
431
496
|
}
|