ts-glitter 13.8.55 → 13.8.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-blog.js +65 -109
- package/lowcode/backend-manager/bg-blog.ts +43 -87
- package/lowcode/backend-manager/bg-product.js +5 -5
- package/lowcode/backend-manager/bg-product.ts +6 -6
- package/lowcode/backend-manager/bg-widget.js +173 -164
- package/lowcode/backend-manager/bg-widget.ts +208 -199
- package/lowcode/cms-plugin/ai-message.js +2 -2
- package/lowcode/cms-plugin/ai-message.ts +2 -2
- package/lowcode/cms-plugin/shopping-product-setting.js +1 -1
- package/lowcode/cms-plugin/shopping-product-setting.ts +1 -1
- package/lowcode/cms-plugin/shopping-product-stock.js +70 -48
- package/lowcode/cms-plugin/shopping-product-stock.ts +83 -48
- package/lowcode/css/editor.css +4 -0
- package/lowcode/editor/add-component.js +59 -45
- package/lowcode/editor/add-component.ts +65 -50
- package/lowcode/editor/basic-component.js +9889 -58
- package/lowcode/editor/basic-component.ts +9962 -89
- package/lowcode/glitter-base/route/shopping.js +1 -0
- package/lowcode/glitter-base/route/shopping.ts +2 -0
- package/lowcode/glitterBundle/plugins/add_item_dia.js +1 -1
- package/lowcode/glitterBundle/plugins/add_item_dia.ts +1 -1
- package/lowcode/jspage/function-page/main_editor.js +1 -1
- package/lowcode/jspage/function-page/main_editor.ts +1 -1
- package/lowcode/jspage/function-page/tool-setting.js +1 -1
- package/lowcode/jspage/function-page/tool-setting.ts +1 -1
- package/lowcode/jspage/main.js +2 -2
- package/lowcode/jspage/main.ts +2 -2
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +1 -0
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +1 -0
- package/src/api-public/services/shopping.d.ts +1 -0
- package/src/api-public/services/shopping.js +19 -0
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +20 -0
package/lowcode/Entry.js
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
66
66
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.57';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm = {
|
|
70
70
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
66
66
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.57';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm: {
|
|
70
70
|
appConfig: any;
|
|
@@ -11,7 +11,6 @@ import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
|
11
11
|
import { BgWidget } from './bg-widget.js';
|
|
12
12
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
13
13
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
14
|
-
import { ApiPageConfig } from '../api/pageConfig.js';
|
|
15
14
|
import { Article } from '../glitter-base/route/article.js';
|
|
16
15
|
import { MenusSetting } from '../cms-plugin/menus-setting.js';
|
|
17
16
|
import { BaseApi } from '../glitterBundle/api/base.js';
|
|
@@ -278,115 +277,69 @@ export class BgBlog {
|
|
|
278
277
|
return gvc.bindView(() => {
|
|
279
278
|
let data = undefined;
|
|
280
279
|
const id = gvc.glitter.getUUID();
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
preview_image: null,
|
|
307
|
-
appName: 'shop_template_black_style',
|
|
308
|
-
template_type: 2,
|
|
309
|
-
template_config: {
|
|
310
|
-
tag: ['頁面範例'],
|
|
311
|
-
desc: '',
|
|
312
|
-
name: '空白內容',
|
|
313
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
314
|
-
status: 'wait',
|
|
315
|
-
post_to: 'all',
|
|
316
|
-
version: '1.0',
|
|
317
|
-
created_by: 'liondesign.io',
|
|
318
|
-
preview_img: '',
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
].concat(data.response.result.data);
|
|
322
|
-
gvc.notifyDataChange(id);
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
Article.get({
|
|
327
|
-
page: 0,
|
|
328
|
-
limit: 20,
|
|
329
|
-
search: ``,
|
|
330
|
-
for_index: `false`,
|
|
331
|
-
status: '0,1',
|
|
332
|
-
page_type: page_tab,
|
|
333
|
-
app_name: 't_1726217714800',
|
|
334
|
-
}).then((dd) => {
|
|
335
|
-
data = {
|
|
336
|
-
response: {
|
|
337
|
-
result: {
|
|
338
|
-
data: [
|
|
339
|
-
{
|
|
340
|
-
id: 20739,
|
|
341
|
-
userID: '234285319',
|
|
342
|
-
tag: 'empty',
|
|
280
|
+
Article.get({
|
|
281
|
+
page: 0,
|
|
282
|
+
limit: 20,
|
|
283
|
+
search: ``,
|
|
284
|
+
for_index: `false`,
|
|
285
|
+
status: '0,1',
|
|
286
|
+
page_type: page_tab,
|
|
287
|
+
app_name: 't_1726217714800',
|
|
288
|
+
}).then((dd) => {
|
|
289
|
+
data = {
|
|
290
|
+
response: {
|
|
291
|
+
result: {
|
|
292
|
+
data: [
|
|
293
|
+
{
|
|
294
|
+
id: 20739,
|
|
295
|
+
userID: '234285319',
|
|
296
|
+
tag: 'empty',
|
|
297
|
+
name: '空白內容',
|
|
298
|
+
page_type: 'page',
|
|
299
|
+
preview_image: null,
|
|
300
|
+
appName: 'shop_template_black_style',
|
|
301
|
+
template_type: 2,
|
|
302
|
+
template_config: {
|
|
303
|
+
tag: ['頁面範例'],
|
|
304
|
+
desc: '',
|
|
343
305
|
name: '空白內容',
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
desc: '',
|
|
351
|
-
name: '空白內容',
|
|
352
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
353
|
-
status: 'wait',
|
|
354
|
-
post_to: 'all',
|
|
355
|
-
version: '1.0',
|
|
356
|
-
created_by: 'liondesign.io',
|
|
357
|
-
preview_img: '',
|
|
358
|
-
},
|
|
306
|
+
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
307
|
+
status: 'wait',
|
|
308
|
+
post_to: 'all',
|
|
309
|
+
version: '1.0',
|
|
310
|
+
created_by: 'liondesign.io',
|
|
311
|
+
preview_img: '',
|
|
359
312
|
},
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
313
|
+
},
|
|
314
|
+
].concat(dd.response.data.map((dd) => {
|
|
315
|
+
return {
|
|
316
|
+
id: 20739,
|
|
317
|
+
userID: '234285319',
|
|
318
|
+
tag: dd.content.tag,
|
|
319
|
+
name: dd.content.name,
|
|
320
|
+
page_type: 'page',
|
|
321
|
+
preview_image: null,
|
|
322
|
+
_config: dd.content.config,
|
|
323
|
+
appName: 't_1726217714800',
|
|
324
|
+
template_type: 2,
|
|
325
|
+
template_config: {
|
|
326
|
+
tag: [],
|
|
327
|
+
desc: '',
|
|
365
328
|
name: dd.content.name,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
image: [dd.content.seo.image],
|
|
376
|
-
status: 'wait',
|
|
377
|
-
post_to: 'all',
|
|
378
|
-
version: '1.0',
|
|
379
|
-
created_by: 'liondesign.io',
|
|
380
|
-
preview_img: '',
|
|
381
|
-
},
|
|
382
|
-
};
|
|
383
|
-
})),
|
|
384
|
-
},
|
|
329
|
+
image: [dd.content.seo.image],
|
|
330
|
+
status: 'wait',
|
|
331
|
+
post_to: 'all',
|
|
332
|
+
version: '1.0',
|
|
333
|
+
created_by: 'liondesign.io',
|
|
334
|
+
preview_img: '',
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
})),
|
|
385
338
|
},
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
gvc.notifyDataChange(id);
|
|
342
|
+
});
|
|
390
343
|
return {
|
|
391
344
|
bind: id,
|
|
392
345
|
view: () => {
|
|
@@ -816,15 +769,18 @@ function detail(gvc, cf, vm, cVm, page_tab) {
|
|
|
816
769
|
return [dd.product_id].concat(dd.variant.spec).join('-');
|
|
817
770
|
}),
|
|
818
771
|
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
819
|
-
|
|
772
|
+
var _a;
|
|
773
|
+
vm.data.content.relative_data = (_a = vm.data.content.relative_data) !== null && _a !== void 0 ? _a : [];
|
|
774
|
+
vm.data.content.relative_data = vm.data.content.relative_data.concat(value.map((dd) => {
|
|
820
775
|
return {
|
|
821
|
-
variant: dd.
|
|
776
|
+
variant: dd.variant,
|
|
822
777
|
product_id: dd.product_id,
|
|
823
778
|
};
|
|
824
|
-
});
|
|
779
|
+
}));
|
|
825
780
|
subVM.loading = true;
|
|
826
781
|
gvc.notifyDataChange(subVM.id);
|
|
827
782
|
}),
|
|
783
|
+
show_mode: 'all'
|
|
828
784
|
});
|
|
829
785
|
}), { textStyle: 'font-weight: 400;' })}
|
|
830
786
|
</div>
|
|
@@ -315,85 +315,41 @@ export class BgBlog {
|
|
|
315
315
|
return gvc.bindView(() => {
|
|
316
316
|
let data: any = undefined;
|
|
317
317
|
const id = gvc.glitter.getUUID();
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
preview_image: null,
|
|
344
|
-
appName: 'shop_template_black_style',
|
|
345
|
-
template_type: 2,
|
|
346
|
-
template_config: {
|
|
347
|
-
tag: ['頁面範例'],
|
|
348
|
-
desc: '',
|
|
349
|
-
name: '空白內容',
|
|
350
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
351
|
-
status: 'wait',
|
|
352
|
-
post_to: 'all',
|
|
353
|
-
version: '1.0',
|
|
354
|
-
created_by: 'liondesign.io',
|
|
355
|
-
preview_img: '',
|
|
356
|
-
},
|
|
357
|
-
},
|
|
358
|
-
].concat(data.response.result.data);
|
|
359
|
-
gvc.notifyDataChange(id);
|
|
360
|
-
});
|
|
361
|
-
} else {
|
|
362
|
-
Article.get({
|
|
363
|
-
page: 0,
|
|
364
|
-
limit: 20,
|
|
365
|
-
search: ``,
|
|
366
|
-
for_index: `false`,
|
|
367
|
-
status: '0,1',
|
|
368
|
-
page_type: page_tab,
|
|
369
|
-
app_name: 't_1726217714800',
|
|
370
|
-
}).then((dd) => {
|
|
371
|
-
data = {
|
|
372
|
-
response: {
|
|
373
|
-
result: {
|
|
374
|
-
data: [
|
|
375
|
-
{
|
|
376
|
-
id: 20739,
|
|
377
|
-
userID: '234285319',
|
|
378
|
-
tag: 'empty',
|
|
318
|
+
Article.get({
|
|
319
|
+
page: 0,
|
|
320
|
+
limit: 20,
|
|
321
|
+
search: ``,
|
|
322
|
+
for_index: `false`,
|
|
323
|
+
status: '0,1',
|
|
324
|
+
page_type: page_tab,
|
|
325
|
+
app_name: 't_1726217714800',
|
|
326
|
+
}).then((dd) => {
|
|
327
|
+
data = {
|
|
328
|
+
response: {
|
|
329
|
+
result: {
|
|
330
|
+
data: [
|
|
331
|
+
{
|
|
332
|
+
id: 20739,
|
|
333
|
+
userID: '234285319',
|
|
334
|
+
tag: 'empty',
|
|
335
|
+
name: '空白內容',
|
|
336
|
+
page_type: 'page',
|
|
337
|
+
preview_image: null,
|
|
338
|
+
appName: 'shop_template_black_style',
|
|
339
|
+
template_type: 2,
|
|
340
|
+
template_config: {
|
|
341
|
+
tag: ['頁面範例'],
|
|
342
|
+
desc: '',
|
|
379
343
|
name: '空白內容',
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
desc: '',
|
|
387
|
-
name: '空白內容',
|
|
388
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
389
|
-
status: 'wait',
|
|
390
|
-
post_to: 'all',
|
|
391
|
-
version: '1.0',
|
|
392
|
-
created_by: 'liondesign.io',
|
|
393
|
-
preview_img: '',
|
|
394
|
-
},
|
|
344
|
+
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
345
|
+
status: 'wait',
|
|
346
|
+
post_to: 'all',
|
|
347
|
+
version: '1.0',
|
|
348
|
+
created_by: 'liondesign.io',
|
|
349
|
+
preview_img: '',
|
|
395
350
|
},
|
|
396
|
-
|
|
351
|
+
},
|
|
352
|
+
].concat(
|
|
397
353
|
dd.response.data.map((dd: any) => {
|
|
398
354
|
return {
|
|
399
355
|
id: 20739,
|
|
@@ -418,14 +374,12 @@ export class BgBlog {
|
|
|
418
374
|
},
|
|
419
375
|
};
|
|
420
376
|
})
|
|
421
|
-
|
|
422
|
-
},
|
|
377
|
+
),
|
|
423
378
|
},
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
gvc.notifyDataChange(id);
|
|
382
|
+
});
|
|
429
383
|
|
|
430
384
|
return {
|
|
431
385
|
bind: id,
|
|
@@ -883,15 +837,17 @@ function detail(gvc: GVC, cf: any, vm: any, cVm: any, page_tab: 'page' | 'hidden
|
|
|
883
837
|
return [dd.product_id].concat(dd.variant.spec).join('-');
|
|
884
838
|
}),
|
|
885
839
|
callback: async (value) => {
|
|
886
|
-
vm.data.content.relative_data
|
|
840
|
+
vm.data.content.relative_data= vm.data.content.relative_data ?? []
|
|
841
|
+
vm.data.content.relative_data = vm.data.content.relative_data.concat(value.map((dd: any) => {
|
|
887
842
|
return {
|
|
888
|
-
variant: dd.
|
|
843
|
+
variant: dd.variant,
|
|
889
844
|
product_id: dd.product_id,
|
|
890
845
|
};
|
|
891
|
-
});
|
|
846
|
+
}));
|
|
892
847
|
subVM.loading = true;
|
|
893
848
|
gvc.notifyDataChange(subVM.id);
|
|
894
849
|
},
|
|
850
|
+
show_mode:'all'
|
|
895
851
|
});
|
|
896
852
|
}),
|
|
897
853
|
{ textStyle: 'font-weight: 400;' }
|
|
@@ -6,7 +6,7 @@ const html = String.raw;
|
|
|
6
6
|
export class BgProduct {
|
|
7
7
|
static variantsSelector(obj) {
|
|
8
8
|
let add_items = [];
|
|
9
|
-
return
|
|
9
|
+
return window.parent.glitter.innerDialog((gvc) => {
|
|
10
10
|
return html `
|
|
11
11
|
<div class="bg-white shadow rounded-3 ">
|
|
12
12
|
<div class="px-3" style="max-height: calc(100vh - 100px);overflow-y: auto;">
|
|
@@ -14,14 +14,14 @@ export class BgProduct {
|
|
|
14
14
|
title: '選擇商品',
|
|
15
15
|
select_data: add_items,
|
|
16
16
|
select_mode: true,
|
|
17
|
-
filter_variants: obj.filter_variants
|
|
18
|
-
})}
|
|
17
|
+
filter_variants: obj.filter_variants
|
|
18
|
+
}, 'hidden')}
|
|
19
19
|
</div>
|
|
20
20
|
<div class="c_dialog_bar">
|
|
21
|
-
${BgWidget.cancel(
|
|
21
|
+
${BgWidget.cancel(gvc.event(() => {
|
|
22
22
|
gvc.closeDialog();
|
|
23
23
|
}))}
|
|
24
|
-
${BgWidget.save(
|
|
24
|
+
${BgWidget.save(gvc.event(() => {
|
|
25
25
|
obj.callback(add_items);
|
|
26
26
|
gvc.closeDialog();
|
|
27
27
|
}), '確認')}
|
|
@@ -19,9 +19,9 @@ type CollectionItem = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export class BgProduct {
|
|
22
|
-
static variantsSelector(obj: { gvc: GVC; title?: string; filter_variants: string[]; callback: (value: any) => void }) {
|
|
22
|
+
static variantsSelector(obj: { gvc: GVC; title?: string; filter_variants: string[]; callback: (value: any) => void,show_mode:'hidden'|'all' }) {
|
|
23
23
|
let add_items: any = [];
|
|
24
|
-
return
|
|
24
|
+
return (window.parent as any).glitter.innerDialog((gvc: GVC) => {
|
|
25
25
|
return html`
|
|
26
26
|
<div class="bg-white shadow rounded-3 ">
|
|
27
27
|
<div class="px-3" style="max-height: calc(100vh - 100px);overflow-y: auto;">
|
|
@@ -29,17 +29,17 @@ export class BgProduct {
|
|
|
29
29
|
title: '選擇商品',
|
|
30
30
|
select_data: add_items,
|
|
31
31
|
select_mode: true,
|
|
32
|
-
filter_variants: obj.filter_variants
|
|
33
|
-
})}
|
|
32
|
+
filter_variants: obj.filter_variants
|
|
33
|
+
},'hidden')}
|
|
34
34
|
</div>
|
|
35
35
|
<div class="c_dialog_bar">
|
|
36
36
|
${BgWidget.cancel(
|
|
37
|
-
|
|
37
|
+
gvc.event(() => {
|
|
38
38
|
gvc.closeDialog();
|
|
39
39
|
})
|
|
40
40
|
)}
|
|
41
41
|
${BgWidget.save(
|
|
42
|
-
|
|
42
|
+
gvc.event(() => {
|
|
43
43
|
obj.callback(add_items);
|
|
44
44
|
gvc.closeDialog();
|
|
45
45
|
}),
|