ts-glitter 21.4.3 → 21.4.5
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 +2 -2
- package/lowcode/Entry.ts +2 -2
- package/lowcode/backend-manager/bg-product.js +8 -6
- package/lowcode/backend-manager/bg-product.ts +17 -15
- package/lowcode/backend-manager/bg-recommend.js +16 -5
- package/lowcode/backend-manager/bg-recommend.ts +15 -5
- package/lowcode/backend-manager/bg-widget.js +160 -160
- package/lowcode/backend-manager/bg-widget.ts +169 -166
- package/lowcode/cms-plugin/POS-setting.js +75 -23
- package/lowcode/cms-plugin/POS-setting.ts +87 -30
- package/lowcode/cms-plugin/menus-setting.js +165 -37
- package/lowcode/cms-plugin/menus-setting.ts +144 -21
- package/lowcode/cms-plugin/module/order-excel.js +8 -8
- package/lowcode/cms-plugin/module/order-excel.ts +10 -10
- package/lowcode/cms-plugin/module/stock-excel.js +184 -0
- package/lowcode/cms-plugin/module/stock-excel.ts +205 -0
- package/lowcode/cms-plugin/module/vendor-excel.js +375 -0
- package/lowcode/cms-plugin/module/vendor-excel.ts +450 -0
- package/lowcode/cms-plugin/order/order-module.js +6 -4
- package/lowcode/cms-plugin/order/order-module.ts +16 -14
- package/lowcode/cms-plugin/pos-pages/models.ts +6 -2
- package/lowcode/cms-plugin/pos-pages/products-page.js +589 -469
- package/lowcode/cms-plugin/pos-pages/products-page.ts +657 -491
- package/lowcode/cms-plugin/shopping-product-setting.js +7 -10
- package/lowcode/cms-plugin/shopping-product-setting.ts +12 -10
- package/lowcode/cms-plugin/shopping-setting-basic.js +2 -5
- package/lowcode/cms-plugin/shopping-setting-basic.ts +2 -5
- package/lowcode/cms-plugin/stock-history.js +39 -26
- package/lowcode/cms-plugin/stock-history.ts +58 -49
- package/lowcode/cms-plugin/stock-vendors.js +18 -13
- package/lowcode/cms-plugin/stock-vendors.ts +31 -16
- package/lowcode/public-components/layout-plugin/social-links-01.js +8 -0
- package/lowcode/public-components/layout-plugin/social-links-01.ts +15 -0
- package/package.json +1 -1
- package/src/api-public/services/schedule.js +6 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +4 -1
package/lowcode/Entry.js
CHANGED
|
@@ -127,7 +127,7 @@ export class Entry {
|
|
|
127
127
|
if (glitter.getUrlParameter('page') !== 'backend_manager') {
|
|
128
128
|
Entry.checkRedirectPage(glitter);
|
|
129
129
|
}
|
|
130
|
-
if (['
|
|
130
|
+
if (['hidden/', 'shop/'].find((dd) => {
|
|
131
131
|
return (glitter.getUrlParameter('page') || '').startsWith(dd) || ((glitter.getUrlParameter('page_refer') || '').startsWith(dd));
|
|
132
132
|
})) {
|
|
133
133
|
const og_path = glitter.getUrlParameter('page_refer') || glitter.getUrlParameter('page');
|
|
@@ -163,7 +163,7 @@ export class Entry {
|
|
|
163
163
|
}
|
|
164
164
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
165
165
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
166
|
-
glitter.share.editerVersion = 'V_21.4.
|
|
166
|
+
glitter.share.editerVersion = 'V_21.4.5';
|
|
167
167
|
glitter.share.start = new Date();
|
|
168
168
|
const vm = { appConfig: [] };
|
|
169
169
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -133,7 +133,7 @@ export class Entry {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
//紀錄初始載入頁面,後續會帶入query當中用與替換Header避免跳頁
|
|
136
|
-
if(['
|
|
136
|
+
if(['hidden/','shop/'].find((dd)=>{
|
|
137
137
|
return (glitter.getUrlParameter('page') || '').startsWith(dd) || ((glitter.getUrlParameter('page_refer') || '').startsWith(dd))
|
|
138
138
|
})){
|
|
139
139
|
const og_path=glitter.getUrlParameter('page_refer') || glitter.getUrlParameter('page');
|
|
@@ -168,7 +168,7 @@ export class Entry {
|
|
|
168
168
|
}
|
|
169
169
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
170
170
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
171
|
-
glitter.share.editerVersion = 'V_21.4.
|
|
171
|
+
glitter.share.editerVersion = 'V_21.4.5';
|
|
172
172
|
glitter.share.start = new Date();
|
|
173
173
|
const vm = { appConfig: [] };
|
|
174
174
|
(window as any).saasConfig = {
|
|
@@ -411,8 +411,8 @@ export class BgProduct {
|
|
|
411
411
|
</div>
|
|
412
412
|
<div class="c_dialog">
|
|
413
413
|
<div class="c_dialog_body">
|
|
414
|
-
<div class="c_dialog_main" style="gap:
|
|
415
|
-
<div class="
|
|
414
|
+
<div class="c_dialog_main" style="gap: 18px; max-height: 500px;">
|
|
415
|
+
<div class="position-sticky px-1" style="top: 0; background-color: #fff;">
|
|
416
416
|
${BgWidget.searchFilter(gvc.event((e, event) => {
|
|
417
417
|
vm.query = e.value;
|
|
418
418
|
vm.loading = true;
|
|
@@ -771,11 +771,13 @@ export class BgProduct {
|
|
|
771
771
|
}
|
|
772
772
|
else {
|
|
773
773
|
return [
|
|
774
|
-
|
|
774
|
+
html `<div class="position-sticky px-1" style="top: 0; background-color: #fff;">
|
|
775
|
+
${BgWidget.searchPlace(gvc2.event(e => {
|
|
775
776
|
vmt.search = e.value;
|
|
776
777
|
vmt.loading = true;
|
|
777
778
|
gvc2.notifyDataChange(vmt.id);
|
|
778
|
-
}), vmt.search, '搜尋標籤', '0', '0')
|
|
779
|
+
}), vmt.search, '搜尋標籤', '0', '0')}
|
|
780
|
+
</div>`,
|
|
779
781
|
BgWidget.renderOptions(gvc2, vmt),
|
|
780
782
|
].join(BgWidget.mbContainer(18));
|
|
781
783
|
}
|
|
@@ -838,7 +840,7 @@ export class BgProduct {
|
|
|
838
840
|
});
|
|
839
841
|
}
|
|
840
842
|
return result
|
|
841
|
-
.filter(item => item.lang === defaultLanguage)
|
|
843
|
+
.filter(item => item.tag && item.lang === defaultLanguage)
|
|
842
844
|
.map(item => {
|
|
843
845
|
return {
|
|
844
846
|
key: item.tag,
|
|
@@ -855,7 +857,7 @@ export class BgProduct {
|
|
|
855
857
|
return yield ApiUser.getPublicConfig('product_manager_tags', 'manager').then((dd) => {
|
|
856
858
|
var _a, _b;
|
|
857
859
|
if (dd.result && ((_b = (_a = dd.response) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.list)) {
|
|
858
|
-
return dd.response.value.list.map((item) => {
|
|
860
|
+
return dd.response.value.list.filter(Boolean).map((item) => {
|
|
859
861
|
return {
|
|
860
862
|
key: item,
|
|
861
863
|
name: `#${item}`,
|
|
@@ -531,8 +531,8 @@ export class BgProduct {
|
|
|
531
531
|
</div>
|
|
532
532
|
<div class="c_dialog">
|
|
533
533
|
<div class="c_dialog_body">
|
|
534
|
-
<div class="c_dialog_main" style="gap:
|
|
535
|
-
<div class="
|
|
534
|
+
<div class="c_dialog_main" style="gap: 18px; max-height: 500px;">
|
|
535
|
+
<div class="position-sticky px-1" style="top: 0; background-color: #fff;">
|
|
536
536
|
${BgWidget.searchFilter(
|
|
537
537
|
gvc.event((e, event) => {
|
|
538
538
|
vm.query = e.value;
|
|
@@ -996,17 +996,19 @@ export class BgProduct {
|
|
|
996
996
|
return BgWidget.spinner();
|
|
997
997
|
} else {
|
|
998
998
|
return [
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
999
|
+
html`<div class="position-sticky px-1" style="top: 0; background-color: #fff;">
|
|
1000
|
+
${BgWidget.searchPlace(
|
|
1001
|
+
gvc2.event(e => {
|
|
1002
|
+
vmt.search = e.value;
|
|
1003
|
+
vmt.loading = true;
|
|
1004
|
+
gvc2.notifyDataChange(vmt.id);
|
|
1005
|
+
}),
|
|
1006
|
+
vmt.search,
|
|
1007
|
+
'搜尋標籤',
|
|
1008
|
+
'0',
|
|
1009
|
+
'0'
|
|
1010
|
+
)}
|
|
1011
|
+
</div>`,
|
|
1010
1012
|
BgWidget.renderOptions(gvc2, vmt),
|
|
1011
1013
|
].join(BgWidget.mbContainer(18));
|
|
1012
1014
|
}
|
|
@@ -1074,7 +1076,7 @@ export class BgProduct {
|
|
|
1074
1076
|
}
|
|
1075
1077
|
|
|
1076
1078
|
return result
|
|
1077
|
-
.filter(item => item.lang === defaultLanguage)
|
|
1079
|
+
.filter(item => item.tag && item.lang === defaultLanguage)
|
|
1078
1080
|
.map(item => {
|
|
1079
1081
|
return {
|
|
1080
1082
|
key: item.tag,
|
|
@@ -1089,7 +1091,7 @@ export class BgProduct {
|
|
|
1089
1091
|
static async getProductManagerTag() {
|
|
1090
1092
|
return await ApiUser.getPublicConfig('product_manager_tags', 'manager').then((dd: any) => {
|
|
1091
1093
|
if (dd.result && dd.response?.value?.list) {
|
|
1092
|
-
return dd.response.value.list.map((item: string) => {
|
|
1094
|
+
return dd.response.value.list.filter(Boolean).map((item: string) => {
|
|
1093
1095
|
return {
|
|
1094
1096
|
key: item,
|
|
1095
1097
|
name: `#${item}`,
|
|
@@ -754,7 +754,6 @@ export class BgRecommend {
|
|
|
754
754
|
BgWidget.title('分潤商品', 'font-size: 16px;'),
|
|
755
755
|
html ` <div class="my-2"></div>`,
|
|
756
756
|
gvc.bindView(() => {
|
|
757
|
-
var _a;
|
|
758
757
|
const subVM = {
|
|
759
758
|
id: gvc.glitter.getUUID(),
|
|
760
759
|
loading: true,
|
|
@@ -770,14 +769,15 @@ export class BgRecommend {
|
|
|
770
769
|
return products_data;
|
|
771
770
|
});
|
|
772
771
|
}
|
|
773
|
-
(_a = newOrder.productCheck) !== null && _a !== void 0 ? _a : (newOrder.productCheck = []);
|
|
774
|
-
const relativeCloneData = structuredClone(newOrder.productCheck);
|
|
775
772
|
return {
|
|
776
773
|
bind: subVM.id,
|
|
777
774
|
view: () => {
|
|
775
|
+
var _a;
|
|
778
776
|
if (subVM.loading) {
|
|
779
777
|
return BgWidget.spinner();
|
|
780
778
|
}
|
|
779
|
+
(_a = newOrder.productCheck) !== null && _a !== void 0 ? _a : (newOrder.productCheck = []);
|
|
780
|
+
const relativeCloneData = structuredClone(newOrder.productCheck);
|
|
781
781
|
return html `
|
|
782
782
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
783
783
|
<div
|
|
@@ -792,8 +792,19 @@ export class BgRecommend {
|
|
|
792
792
|
gvc: gvc,
|
|
793
793
|
default: relativeCloneData.map((dd) => dd.id),
|
|
794
794
|
callback: product_array => {
|
|
795
|
-
|
|
796
|
-
|
|
795
|
+
dialog.dataLoading({ visible: true });
|
|
796
|
+
new Promise(resolve => {
|
|
797
|
+
if (product_array.length === 0) {
|
|
798
|
+
resolve([]);
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
getSelectProducts(product_array).then(resp => {
|
|
802
|
+
resolve(resp);
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
}).then(productArray => {
|
|
806
|
+
dialog.dataLoading({ visible: false });
|
|
807
|
+
newOrder.productCheck = productArray;
|
|
797
808
|
subVM.loading = true;
|
|
798
809
|
gvc.notifyDataChange(subVM.id);
|
|
799
810
|
});
|
|
@@ -896,9 +896,6 @@ export class BgRecommend {
|
|
|
896
896
|
return products_data;
|
|
897
897
|
}
|
|
898
898
|
|
|
899
|
-
newOrder.productCheck ??= [];
|
|
900
|
-
const relativeCloneData = structuredClone(newOrder.productCheck);
|
|
901
|
-
|
|
902
899
|
return {
|
|
903
900
|
bind: subVM.id,
|
|
904
901
|
view: () => {
|
|
@@ -906,6 +903,9 @@ export class BgRecommend {
|
|
|
906
903
|
return BgWidget.spinner();
|
|
907
904
|
}
|
|
908
905
|
|
|
906
|
+
newOrder.productCheck ??= [];
|
|
907
|
+
const relativeCloneData = structuredClone(newOrder.productCheck);
|
|
908
|
+
|
|
909
909
|
return html`
|
|
910
910
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
911
911
|
<div
|
|
@@ -922,8 +922,18 @@ export class BgRecommend {
|
|
|
922
922
|
gvc: gvc,
|
|
923
923
|
default: relativeCloneData.map((dd: any) => dd.id),
|
|
924
924
|
callback: product_array => {
|
|
925
|
-
|
|
926
|
-
|
|
925
|
+
dialog.dataLoading({ visible: true });
|
|
926
|
+
new Promise<[]>(resolve => {
|
|
927
|
+
if (product_array.length === 0) {
|
|
928
|
+
resolve([]);
|
|
929
|
+
} else {
|
|
930
|
+
getSelectProducts(product_array).then(resp => {
|
|
931
|
+
resolve(resp);
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
}).then(productArray => {
|
|
935
|
+
dialog.dataLoading({ visible: false });
|
|
936
|
+
newOrder.productCheck = productArray;
|
|
927
937
|
subVM.loading = true;
|
|
928
938
|
gvc.notifyDataChange(subVM.id);
|
|
929
939
|
});
|
|
@@ -2705,58 +2705,58 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
|
|
|
2705
2705
|
const height = (_b = obj.height) !== null && _b !== void 0 ? _b : 500;
|
|
2706
2706
|
const closeHeight = 56;
|
|
2707
2707
|
obj.gvc.addStyle(`
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2708
|
+
.box-container-${text} {
|
|
2709
|
+
position: relative;
|
|
2710
|
+
height: ${closeHeight}px;
|
|
2711
|
+
border: 1px solid #ddd;
|
|
2712
|
+
border-radius: 10px;
|
|
2713
|
+
overflow-y: hidden;
|
|
2714
|
+
transition: height 0.3s ease-out;
|
|
2715
|
+
}
|
|
2716
|
+
.box-container-${text}.open-box {
|
|
2717
|
+
max-height: ${height}px;
|
|
2718
|
+
height: ${height}px;
|
|
2719
|
+
overflow-y: auto;
|
|
2720
|
+
}
|
|
2721
|
+
.box-navbar-${text} {
|
|
2722
|
+
position: sticky;
|
|
2723
|
+
top: 0;
|
|
2724
|
+
min-height: 20px;
|
|
2725
|
+
background-color: #fff;
|
|
2726
|
+
z-index: 10;
|
|
2727
|
+
display: flex;
|
|
2728
|
+
padding: 15px 20px;
|
|
2729
|
+
align-items: flex-start;
|
|
2730
|
+
justify-content: space-between;
|
|
2731
|
+
cursor: pointer;
|
|
2732
|
+
}
|
|
2733
|
+
.arrow-icon-${text} {
|
|
2734
|
+
color: #393939 !important;
|
|
2735
|
+
box-shadow: none !important;
|
|
2736
|
+
background-color: #fff !important;
|
|
2737
|
+
background-image: url(${BgWidget.arrowDownDataImage('#000')}) !important;
|
|
2738
|
+
background-repeat: no-repeat;
|
|
2739
|
+
cursor: pointer;
|
|
2740
|
+
height: 1rem;
|
|
2741
|
+
border: 0;
|
|
2742
|
+
margin-top: 0.35rem;
|
|
2743
|
+
transition: transform 0.3s;
|
|
2744
|
+
}
|
|
2745
|
+
.arrow-icon-${text}.open-box {
|
|
2746
|
+
margin-top: 0.15rem;
|
|
2747
|
+
transform: rotate(180deg);
|
|
2748
|
+
}
|
|
2749
|
+
.box-inside-${text} {
|
|
2750
|
+
padding: 0 1.5rem 1.5rem;
|
|
2751
|
+
overflow-y: auto;
|
|
2752
|
+
}
|
|
2753
2753
|
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2754
|
+
@media (max-width: 768px) {
|
|
2755
|
+
.box-inside-${text} {
|
|
2756
|
+
padding: 1rem;
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
`);
|
|
2760
2760
|
return obj.gvc.bindView({
|
|
2761
2761
|
bind: bvid,
|
|
2762
2762
|
view: () => {
|
|
@@ -2942,74 +2942,28 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
|
|
|
2942
2942
|
let tagList = [];
|
|
2943
2943
|
let search = '';
|
|
2944
2944
|
let selectTags = def || [];
|
|
2945
|
+
gvc.addStyle(`
|
|
2946
|
+
.select-tag-dialog {
|
|
2947
|
+
margin-top: 1px;
|
|
2948
|
+
border: 8px solid #fff;
|
|
2949
|
+
outline: 1px solid #aeaeae;
|
|
2950
|
+
height: 300px;
|
|
2951
|
+
width: 100%;
|
|
2952
|
+
border-radius: 5px;
|
|
2953
|
+
position: absolute;
|
|
2954
|
+
top: 0;
|
|
2955
|
+
background-color: #fff;
|
|
2956
|
+
border-radius: 5px;
|
|
2957
|
+
overflow: auto;
|
|
2958
|
+
}
|
|
2959
|
+
`);
|
|
2945
2960
|
return gvc.bindView({
|
|
2946
2961
|
bind: id,
|
|
2947
2962
|
view: () => {
|
|
2948
2963
|
if (loading) {
|
|
2949
2964
|
return '';
|
|
2950
2965
|
}
|
|
2951
|
-
if (show) {
|
|
2952
|
-
return html `<div
|
|
2953
|
-
style="margin-top: 1px;border: 8px solid #fff; outline: 1px solid #aeaeae; height: 300px; width: 100%; border-radius: 5px; position: absolute; top: 0; background-color: #fff; border-radius: 5px; overflow: auto;"
|
|
2954
|
-
>
|
|
2955
|
-
<div class="position-relative">
|
|
2956
|
-
<div
|
|
2957
|
-
class="w-100 d-flex align-items-center gap-1 position-sticky mb-1"
|
|
2958
|
-
style="top: 0; background-color: #fff;"
|
|
2959
|
-
>
|
|
2960
|
-
<div class="w-100">
|
|
2961
|
-
<i
|
|
2962
|
-
class="fa-regular fa-magnifying-glass"
|
|
2963
|
-
style="font-size: 18px; color: #A0A0A0; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);"
|
|
2964
|
-
aria-hidden="true"
|
|
2965
|
-
></i>
|
|
2966
|
-
<input
|
|
2967
|
-
class="form-control h-100"
|
|
2968
|
-
style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px; height: 100%;"
|
|
2969
|
-
placeholder="${placeholder}"
|
|
2970
|
-
onchange="${gvc.event(e => {
|
|
2971
|
-
search = `${e.value}`.trim();
|
|
2972
|
-
gvc.notifyDataChange(id);
|
|
2973
|
-
})}"
|
|
2974
|
-
value="${search}"
|
|
2975
|
-
/>
|
|
2976
|
-
</div>
|
|
2977
|
-
${this.customButton({
|
|
2978
|
-
button: {
|
|
2979
|
-
color: 'black',
|
|
2980
|
-
size: 'md',
|
|
2981
|
-
},
|
|
2982
|
-
text: {
|
|
2983
|
-
name: '確認',
|
|
2984
|
-
style: 'font-size: 14px;',
|
|
2985
|
-
},
|
|
2986
|
-
event: gvc.event(() => {
|
|
2987
|
-
show = false;
|
|
2988
|
-
gvc.notifyDataChange(id);
|
|
2989
|
-
callback(selectTags);
|
|
2990
|
-
}),
|
|
2991
|
-
})}
|
|
2992
|
-
</div>
|
|
2993
|
-
<div class="p-2">
|
|
2994
|
-
${this.multiCheckboxContainer(gvc, tagList.filter(tag => tag.name.toLowerCase().includes(search.toLowerCase())), selectTags, text => {
|
|
2995
|
-
if (search) {
|
|
2996
|
-
selectTags = [
|
|
2997
|
-
...new Set(selectTags
|
|
2998
|
-
.filter(tag => {
|
|
2999
|
-
return !tag.toLowerCase().includes(search.toLowerCase());
|
|
3000
|
-
})
|
|
3001
|
-
.concat(text)),
|
|
3002
|
-
];
|
|
3003
|
-
}
|
|
3004
|
-
else {
|
|
3005
|
-
selectTags = text;
|
|
3006
|
-
}
|
|
3007
|
-
}, { single: false })}
|
|
3008
|
-
</div>
|
|
3009
|
-
</div>
|
|
3010
|
-
</div>`;
|
|
3011
|
-
}
|
|
3012
|
-
else {
|
|
2966
|
+
if (!show) {
|
|
3013
2967
|
return html `<div
|
|
3014
2968
|
class="h-100"
|
|
3015
2969
|
onclick="${gvc.event(() => {
|
|
@@ -3024,20 +2978,69 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
|
|
|
3024
2978
|
></i>
|
|
3025
2979
|
<div
|
|
3026
2980
|
class="form-control h-100"
|
|
3027
|
-
style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px; height: 100%; color: #aeaeae;
|
|
3028
|
-
0 && false
|
|
3029
|
-
? 'padding: 0.3rem 3rem;'
|
|
3030
|
-
: ''}"
|
|
2981
|
+
style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px; height: 100%; color: #aeaeae;"
|
|
3031
2982
|
>
|
|
3032
2983
|
${placeholder}
|
|
3033
|
-
<!-- ${selectTags.length > 0
|
|
3034
|
-
? html `<div class="d-flex flex-wrap gap-2">
|
|
3035
|
-
${selectTags.map(item => this.normalInsignia(`#${item}`)).join('')}
|
|
3036
|
-
</div>`
|
|
3037
|
-
: placeholder} -->
|
|
3038
2984
|
</div>
|
|
3039
2985
|
</div>`;
|
|
3040
2986
|
}
|
|
2987
|
+
return html `<div class="select-tag-dialog">
|
|
2988
|
+
<div class="position-relative">
|
|
2989
|
+
<div
|
|
2990
|
+
class="w-100 d-flex align-items-center gap-1 position-sticky mb-1 top-0"
|
|
2991
|
+
style="background-color: #fff;"
|
|
2992
|
+
>
|
|
2993
|
+
<div class="w-100">
|
|
2994
|
+
<i
|
|
2995
|
+
class="fa-regular fa-magnifying-glass"
|
|
2996
|
+
style="font-size: 18px; color: #A0A0A0; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);"
|
|
2997
|
+
aria-hidden="true"
|
|
2998
|
+
></i>
|
|
2999
|
+
<input
|
|
3000
|
+
class="form-control h-100"
|
|
3001
|
+
style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px; height: 100%;"
|
|
3002
|
+
placeholder="${placeholder}"
|
|
3003
|
+
onchange="${gvc.event(e => {
|
|
3004
|
+
search = `${e.value}`.trim();
|
|
3005
|
+
gvc.notifyDataChange(id);
|
|
3006
|
+
})}"
|
|
3007
|
+
value="${search}"
|
|
3008
|
+
/>
|
|
3009
|
+
</div>
|
|
3010
|
+
${this.customButton({
|
|
3011
|
+
button: {
|
|
3012
|
+
color: 'black',
|
|
3013
|
+
size: 'md',
|
|
3014
|
+
},
|
|
3015
|
+
text: {
|
|
3016
|
+
name: '確認',
|
|
3017
|
+
style: 'font-size: 14px;',
|
|
3018
|
+
},
|
|
3019
|
+
event: gvc.event(() => {
|
|
3020
|
+
show = false;
|
|
3021
|
+
gvc.notifyDataChange(id);
|
|
3022
|
+
callback(selectTags);
|
|
3023
|
+
}),
|
|
3024
|
+
})}
|
|
3025
|
+
</div>
|
|
3026
|
+
<div class="p-2">
|
|
3027
|
+
${this.multiCheckboxContainer(gvc, tagList.filter(tag => tag.name.toLowerCase().includes(search.toLowerCase())), selectTags, text => {
|
|
3028
|
+
if (search) {
|
|
3029
|
+
selectTags = [
|
|
3030
|
+
...new Set(selectTags
|
|
3031
|
+
.filter(tag => {
|
|
3032
|
+
return !tag.toLowerCase().includes(search.toLowerCase());
|
|
3033
|
+
})
|
|
3034
|
+
.concat(text)),
|
|
3035
|
+
];
|
|
3036
|
+
}
|
|
3037
|
+
else {
|
|
3038
|
+
selectTags = text;
|
|
3039
|
+
}
|
|
3040
|
+
}, { single: false })}
|
|
3041
|
+
</div>
|
|
3042
|
+
</div>
|
|
3043
|
+
</div>`;
|
|
3041
3044
|
},
|
|
3042
3045
|
divCreate: {
|
|
3043
3046
|
class: 'w-100 position-relative search-tags-filter',
|
|
@@ -3049,10 +3052,7 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
|
|
|
3049
3052
|
var _b, _c;
|
|
3050
3053
|
if (dd.result && ((_c = (_b = dd.response) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.list)) {
|
|
3051
3054
|
return dd.response.value.list.map((item) => {
|
|
3052
|
-
return {
|
|
3053
|
-
key: item,
|
|
3054
|
-
name: `#${item}`,
|
|
3055
|
-
};
|
|
3055
|
+
return { key: item, name: `#${item}` };
|
|
3056
3056
|
});
|
|
3057
3057
|
}
|
|
3058
3058
|
return [];
|
|
@@ -3315,16 +3315,16 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
|
|
|
3315
3315
|
def: JSON.parse(JSON.stringify(obj.default)),
|
|
3316
3316
|
};
|
|
3317
3317
|
obj.gvc.addStyle(`
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3318
|
+
.${vm.random}-opt {
|
|
3319
|
+
background-color: white;
|
|
3320
|
+
gap: 24px;
|
|
3321
|
+
padding: 6px;
|
|
3322
|
+
}
|
|
3323
|
+
.${vm.random}-opt:hover {
|
|
3324
|
+
border-radius: 5px;
|
|
3325
|
+
background-color: #e8e8e8;
|
|
3326
|
+
}
|
|
3327
|
+
`);
|
|
3328
3328
|
return obj.gvc.bindView({
|
|
3329
3329
|
bind: vm.id,
|
|
3330
3330
|
view: () => {
|
|
@@ -4284,31 +4284,31 @@ ${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}</textarea
|
|
|
4284
4284
|
})();
|
|
4285
4285
|
const transX = obj.align === 'center' ? '-50%' : '0';
|
|
4286
4286
|
obj.gvc.addStyle(`
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4287
|
+
.bounce-effect-${className} {
|
|
4288
|
+
animation: bounce 0.5s alternate;
|
|
4289
|
+
animation-iteration-count: 2;
|
|
4290
|
+
position: fixed;
|
|
4291
|
+
${fixedStyle}
|
|
4292
|
+
background-color: #393939;
|
|
4293
|
+
opacity: 0.85;
|
|
4294
|
+
color: white;
|
|
4295
|
+
padding: 10px;
|
|
4296
|
+
border-radius: 8px;
|
|
4297
|
+
width: ${(_b = obj.width) !== null && _b !== void 0 ? _b : 120}px;
|
|
4298
|
+
text-align: center;
|
|
4299
|
+
z-index: 11;
|
|
4300
|
+
transform: translateX(${transX});
|
|
4301
|
+
}
|
|
4302
4302
|
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4303
|
+
@keyframes bounce {
|
|
4304
|
+
0% {
|
|
4305
|
+
transform: translate(${transX}, 0);
|
|
4306
|
+
}
|
|
4307
|
+
100% {
|
|
4308
|
+
transform: translate(${transX}, -6px);
|
|
4309
|
+
}
|
|
4310
|
+
}
|
|
4311
|
+
`);
|
|
4312
4312
|
const htmlString = html ` <div class="bounce-effect-${className}">${obj.text}</div>`;
|
|
4313
4313
|
obj.gvc.glitter.document.body.insertAdjacentHTML('beforeend', htmlString);
|
|
4314
4314
|
setTimeout(() => {
|