ts-glitter 21.0.9 → 21.1.2
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/cms-plugin/POS-setting.js +10 -6
- package/lowcode/cms-plugin/POS-setting.ts +11 -5
- package/lowcode/cms-plugin/data-analyze-orders.js +1 -0
- package/lowcode/cms-plugin/data-analyze-orders.ts +1 -1
- package/lowcode/cms-plugin/data-analyze.js +21 -1
- package/lowcode/cms-plugin/data-analyze.ts +24 -25
- package/lowcode/cms-plugin/pos-basic-setting.ts +1 -0
- package/lowcode/cms-plugin/pos-config-setting.js +56 -8
- package/lowcode/cms-plugin/pos-config-setting.ts +81 -28
- package/lowcode/cms-plugin/pos-pages/products-page.js +13 -2
- package/lowcode/cms-plugin/pos-pages/products-page.ts +14 -2
- package/lowcode/editor-components/font-select.js +1 -0
- package/lowcode/editor-components/font-select.ts +64 -0
- package/lowcode/official_view_component/official/component.js +10 -5
- package/lowcode/official_view_component/official/component.ts +22 -13
- package/lowcode/setting/fonts-config.js +119 -59
- package/lowcode/setting/fonts-config.ts +7075 -6999
- package/package.json +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/index.ts +1 -0
- package/src/api-public/services/checkout-event.js +1 -3
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/data-analyze.d.ts +4 -4
- package/src/api-public/services/data-analyze.js +213 -283
- package/src/api-public/services/data-analyze.js.map +1 -1
- package/src/api-public/services/data-analyze.ts +222 -332
- package/src/api-public/services/public-table-check.js +13 -0
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/public-table-check.ts +13 -0
- package/src/api-public/services/schedule.d.ts +1 -0
- package/src/api-public/services/schedule.js +87 -54
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +101 -57
- package/src/api-public/services/shopping.js +2 -3
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +2 -3
- package/src/api-public/utils/ut-permission.d.ts +0 -1
- package/src/run.js +2 -3
- package/src/run.js.map +1 -1
- package/src/run.ts +1 -1
- /package/{vp00rqhw1r.json → ye8r333y6g.json} +0 -0
|
@@ -26,20 +26,20 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
26
26
|
widget[dd].data.refer_app = widget.data.refer_app;
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
const app_editor =
|
|
31
|
+
['index-app'].includes(gvc.glitter.getUrlParameter('page')) || ApplicationConfig.is_application;
|
|
30
32
|
initialReferData(widget);
|
|
31
33
|
let viewConfig: any = undefined;
|
|
32
34
|
const html = String.raw;
|
|
33
|
-
const view_container_id = widget.id;
|
|
34
35
|
return {
|
|
35
36
|
view: () => {
|
|
36
|
-
if(app_editor){
|
|
37
|
-
widget.mobile_editable=[]
|
|
37
|
+
if (app_editor) {
|
|
38
|
+
widget.mobile_editable = [];
|
|
38
39
|
}
|
|
39
40
|
let data: any = undefined;
|
|
40
41
|
let tag = widget.data.tag;
|
|
41
42
|
let carryData = widget.data.carryData;
|
|
42
|
-
|
|
43
43
|
async function getData(document: any) {
|
|
44
44
|
return new Promise(async (resolve, reject) => {
|
|
45
45
|
try {
|
|
@@ -116,11 +116,18 @@ const app_editor=(['index-app'].includes(gvc.glitter.getUrlParameter('page')) ||
|
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
function getFormData(ref: any) {
|
|
119
|
+
|
|
120
|
+
|
|
119
121
|
//判斷是否有上次的更新資料
|
|
120
|
-
ref =
|
|
121
|
-
(window
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
ref = (()=>{
|
|
123
|
+
if((window as any).glitter.getUrlParameter('select_widget') === 'true'){
|
|
124
|
+
return ref;
|
|
125
|
+
}else{
|
|
126
|
+
return (window.parent as any).glitter.share.updated_form_data[
|
|
127
|
+
`${page_request_config.appName}_${tag}`
|
|
128
|
+
] || ref
|
|
129
|
+
}
|
|
130
|
+
})();
|
|
124
131
|
let formData = JSON.parse(JSON.stringify(ref || {}));
|
|
125
132
|
if (widget.data.refer_app) {
|
|
126
133
|
GlobalWidget.initialShowCaseData({
|
|
@@ -1314,8 +1321,8 @@ const app_editor=(['index-app'].includes(gvc.glitter.getUrlParameter('page')) ||
|
|
|
1314
1321
|
</div>`,
|
|
1315
1322
|
` <div class="mx-n3" style="background: #DDD;height: 1px;"></div>`,
|
|
1316
1323
|
].join(`<div style="height:18px;"></div>`);
|
|
1317
|
-
if(app_editor){
|
|
1318
|
-
global_setting_view
|
|
1324
|
+
if (app_editor) {
|
|
1325
|
+
global_setting_view = ``;
|
|
1319
1326
|
}
|
|
1320
1327
|
if (vm.page === 'editor') {
|
|
1321
1328
|
const array_items: any = await filterFormat(dd => {
|
|
@@ -1682,12 +1689,14 @@ font-weight: 700;"
|
|
|
1682
1689
|
view: () => {
|
|
1683
1690
|
return new Promise((resolve, reject) => {
|
|
1684
1691
|
gvc.glitter.getModule(
|
|
1685
|
-
new URL(
|
|
1692
|
+
new URL(
|
|
1693
|
+
gvc.glitter.root_path + `public-components/headers/header-mobile.js`
|
|
1694
|
+
).href,
|
|
1686
1695
|
res => {
|
|
1687
1696
|
resolve(
|
|
1688
1697
|
res.editor({
|
|
1689
1698
|
gvc: gvc,
|
|
1690
|
-
widget:widget
|
|
1699
|
+
widget: widget,
|
|
1691
1700
|
})
|
|
1692
1701
|
);
|
|
1693
1702
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
2
|
-
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
3
2
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
4
3
|
export class FontsConfig {
|
|
5
4
|
static fontsSettingView(gvc, globalValue, detail) {
|
|
@@ -17,79 +16,140 @@ export class FontsConfig {
|
|
|
17
16
|
bind: vm_c.id,
|
|
18
17
|
view: () => {
|
|
19
18
|
if (vm_c.loading) {
|
|
20
|
-
return html
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
return html ` <div class="w-100 d-flex align-items-center justify-content-center p-3">
|
|
20
|
+
<div class="spinner-border"></div>
|
|
21
|
+
</div>`;
|
|
23
22
|
}
|
|
24
23
|
const array = [
|
|
25
24
|
html ` <div
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
class="hoverF2 d-flex align-items-center p-3 ${detail ? `d-none` : ``}"
|
|
26
|
+
onclick="${gvc.event(() => {
|
|
28
27
|
vm_c.toggle = !vm_c.toggle;
|
|
29
28
|
gvc.notifyDataChange(vm_c.id);
|
|
30
29
|
})}"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
>
|
|
31
|
+
<span
|
|
32
|
+
class="fw-500"
|
|
33
|
+
style="max-width: calc(100% - 50px);text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"
|
|
34
|
+
>字型樣式</span
|
|
35
|
+
>
|
|
36
|
+
<div class="flex-fill"></div>
|
|
37
|
+
${vm_c.toggle
|
|
38
|
+
? ` <i class="fa-solid fa-chevron-down"></i>`
|
|
39
|
+
: ` <i class="fa-solid fa-chevron-right"></i>`}
|
|
40
|
+
</div>`,
|
|
36
41
|
];
|
|
37
42
|
if (vm_c.toggle) {
|
|
38
|
-
array.push(html ` <div
|
|
39
|
-
|
|
43
|
+
array.push(html ` <div
|
|
44
|
+
class="row ${globalValue.font_theme.length === 0 ? `d-none` : ``} px-0 pt-2 pb-0 m-0"
|
|
45
|
+
style="margin: 18px 18px 0px;"
|
|
46
|
+
>
|
|
47
|
+
${globalValue.font_theme
|
|
40
48
|
.map((dd, index) => {
|
|
41
|
-
return
|
|
42
|
-
|
|
49
|
+
return gvc.bindView(() => {
|
|
50
|
+
const id = gvc.glitter.getUUID();
|
|
51
|
+
function refresh() {
|
|
52
|
+
gvc.notifyDataChange(id);
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
bind: id,
|
|
56
|
+
view: () => {
|
|
57
|
+
return ` <div class="rounded border p-2 d-flex w-100 flex-column" style="gap:10px;">
|
|
43
58
|
${BgWidget.title(index === 0 ? `預設字型` : dd.value || `字型樣式 ${index}`, 'font-size: 16px;')}
|
|
44
59
|
<div class="d-flex align-items-center" style="gap:10px;">
|
|
45
|
-
${
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
<div class="form-control" style="cursor:pointer;" onclick="${gvc.event(() => {
|
|
61
|
+
BgWidget.settingDialog({
|
|
62
|
+
gvc: gvc,
|
|
63
|
+
title: '選擇字型',
|
|
64
|
+
innerHTML: (gvc) => {
|
|
65
|
+
const input_id = gvc.glitter.getUUID();
|
|
66
|
+
const container_id = gvc.glitter.getUUID();
|
|
67
|
+
let search = '';
|
|
68
|
+
return `<div class="w-100">
|
|
69
|
+
${[
|
|
70
|
+
BgWidget.editeInput({
|
|
71
|
+
gvc: gvc,
|
|
72
|
+
default: search,
|
|
73
|
+
title: `<div class="d-flex align-items-center" style="gap:5px;">快速搜尋${BgWidget.greenNote(`<div onclick="${gvc.event(() => {
|
|
74
|
+
gvc.glitter.openNewTab('https://fonts.google.com/');
|
|
75
|
+
})}" style="cursor:pointer;">採用Google Fonts 標準字型</div>`)}</div>`,
|
|
76
|
+
placeHolder: '快速搜尋',
|
|
77
|
+
oninput: (text) => {
|
|
78
|
+
search = text;
|
|
79
|
+
gvc.notifyDataChange(container_id);
|
|
80
|
+
},
|
|
81
|
+
callback: text => { },
|
|
82
|
+
}),
|
|
83
|
+
gvc.bindView(() => {
|
|
84
|
+
return {
|
|
85
|
+
bind: container_id,
|
|
86
|
+
view: () => {
|
|
87
|
+
return vm_c.fonts
|
|
88
|
+
.map((dd, index) => {
|
|
89
|
+
return dd.title;
|
|
90
|
+
})
|
|
91
|
+
.filter((dd) => {
|
|
92
|
+
return dd.toLowerCase().includes(search.toLowerCase());
|
|
93
|
+
})
|
|
94
|
+
.map((d1, index) => {
|
|
95
|
+
return html ` <div class="d-flex">
|
|
96
|
+
${BgWidget.title(`${index + 1}. ${d1}`)}
|
|
97
|
+
<div class="flex-fill"></div>
|
|
98
|
+
${BgWidget.save(gvc.event(() => {
|
|
99
|
+
dd.value = d1;
|
|
100
|
+
refresh();
|
|
101
|
+
gvc.closeDialog();
|
|
102
|
+
}), '選擇')}
|
|
103
|
+
</div>`;
|
|
104
|
+
}).join('<div class="w-100 my-2 border-top"></div>');
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}),
|
|
108
|
+
].join(BgWidget.horizontalLine())}
|
|
109
|
+
</div>`;
|
|
110
|
+
},
|
|
111
|
+
footer_html: (gvc) => {
|
|
112
|
+
return [].join('');
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
})}">
|
|
116
|
+
${dd.value || '尚未設定'}
|
|
117
|
+
</div>
|
|
64
118
|
${index !== 0
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
119
|
+
? BgWidget.cancel(gvc.event(() => {
|
|
120
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
121
|
+
dialog.checkYesOrNot({
|
|
122
|
+
text: '是否確認刪除此字型?',
|
|
123
|
+
callback: response => {
|
|
124
|
+
if (response) {
|
|
125
|
+
globalValue.font_theme.splice(index, 1);
|
|
126
|
+
gvc.notifyDataChange(vm_c.id);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}), '<i class="fa-solid fa-trash-can"></i>')
|
|
131
|
+
: ``}
|
|
78
132
|
</div>
|
|
79
133
|
</div>
|
|
80
134
|
<div class="d-flex p-2 align-items-center" style="gap:10px;">
|
|
81
135
|
<div class="fs-6">預覽字體:</div>
|
|
82
136
|
<div class="fs-6 bgf6 p-2" style="font-family: '${dd.value}' !important;">字型</div>
|
|
83
137
|
<div class="fs-6 bgf6 p-2" style="font-family: '${dd.value}' !important;">fonts</div>
|
|
84
|
-
</div
|
|
85
|
-
|
|
138
|
+
</div>`;
|
|
139
|
+
},
|
|
140
|
+
divCreate: {
|
|
141
|
+
class: `col-12 mb-3`,
|
|
142
|
+
style: `cursor: pointer;`,
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
});
|
|
86
146
|
})
|
|
87
147
|
.join('')}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
148
|
+
</div>
|
|
149
|
+
<div class="px-2 mb-2" style="${globalValue.font_theme.length === 0 ? `` : ``}">
|
|
150
|
+
<div
|
|
151
|
+
class="bt_border_editor"
|
|
152
|
+
onclick="${gvc.event((e, event) => {
|
|
93
153
|
event.preventDefault();
|
|
94
154
|
event.stopPropagation();
|
|
95
155
|
globalValue.font_theme.push({
|
|
@@ -99,10 +159,10 @@ export class FontsConfig {
|
|
|
99
159
|
FontsConfig.reInitialFontTheme(globalValue, gvc);
|
|
100
160
|
gvc.notifyDataChange(vm_c.id);
|
|
101
161
|
})}"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
162
|
+
>
|
|
163
|
+
新增字型
|
|
164
|
+
</div>
|
|
165
|
+
</div>`);
|
|
106
166
|
}
|
|
107
167
|
return array.join('');
|
|
108
168
|
},
|
|
@@ -124,7 +184,7 @@ export class FontsConfig {
|
|
|
124
184
|
}
|
|
125
185
|
});
|
|
126
186
|
const element = window.glitter.elementCallback;
|
|
127
|
-
Object.keys(element).map(
|
|
187
|
+
Object.keys(element).map(dd => {
|
|
128
188
|
try {
|
|
129
189
|
element[dd].updateAttribute();
|
|
130
190
|
}
|