ts-glitter 20.6.8 → 20.6.9
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-blog.js +617 -621
- package/lowcode/backend-manager/bg-blog.ts +2323 -2325
- package/lowcode/backend-manager/bg-line.js +5 -4
- package/lowcode/backend-manager/bg-line.ts +5 -4
- package/lowcode/backend-manager/bg-list-component.js +9 -0
- package/lowcode/backend-manager/bg-list-component.ts +15 -1
- package/lowcode/backend-manager/bg-notify.js +6 -4
- package/lowcode/backend-manager/bg-notify.ts +6 -4
- package/lowcode/backend-manager/bg-product.js +145 -0
- package/lowcode/backend-manager/bg-product.ts +153 -0
- package/lowcode/backend-manager/bg-sns.js +5 -3
- package/lowcode/backend-manager/bg-sns.ts +5 -3
- package/lowcode/backend-manager/bg-widget.js +92 -4
- package/lowcode/backend-manager/bg-widget.ts +122 -6
- package/lowcode/backend-manager/splitPage.js +0 -39
- package/lowcode/backend-manager/splitPage.ts +0 -40
- package/lowcode/cms-plugin/auto-fcm-advertise.js +17 -5
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +19 -6
- package/lowcode/cms-plugin/auto-fcm-history.js +2732 -0
- package/lowcode/cms-plugin/auto-fcm-history.ts +2995 -0
- package/lowcode/cms-plugin/cms-router.js +5 -0
- package/lowcode/cms-plugin/cms-router.ts +6 -0
- package/lowcode/cms-plugin/filter-options.js +80 -27
- package/lowcode/cms-plugin/filter-options.ts +83 -27
- package/lowcode/cms-plugin/language-backend.js +50 -39
- package/lowcode/cms-plugin/language-backend.ts +109 -95
- package/lowcode/cms-plugin/menus-setting.js +175 -151
- package/lowcode/cms-plugin/menus-setting.ts +620 -591
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/data.js +7 -7
- package/lowcode/cms-plugin/module/data.ts +262 -233
- package/lowcode/cms-plugin/module/delivery-html.js +18 -10
- package/lowcode/cms-plugin/module/delivery-html.ts +26 -10
- package/lowcode/cms-plugin/module/order-setting.js +458 -328
- package/lowcode/cms-plugin/module/order-setting.ts +622 -351
- package/lowcode/cms-plugin/module/product-excel.js +1 -1
- package/lowcode/cms-plugin/module/product-excel.ts +2 -1
- package/lowcode/cms-plugin/order/order-module.js +90 -1
- package/lowcode/cms-plugin/order/order-module.ts +106 -1
- package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -8
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +28 -15
- package/lowcode/cms-plugin/pos-pages/products-page.js +0 -39
- package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -40
- package/lowcode/cms-plugin/shopping-collections.ts +1 -3
- package/lowcode/cms-plugin/shopping-finance-setting.js +19 -80
- package/lowcode/cms-plugin/shopping-finance-setting.ts +19 -87
- package/lowcode/cms-plugin/shopping-order-manager.js +122 -38
- package/lowcode/cms-plugin/shopping-order-manager.ts +160 -58
- package/lowcode/cms-plugin/shopping-product-setting.js +364 -376
- package/lowcode/cms-plugin/shopping-product-setting.ts +406 -415
- package/lowcode/cms-plugin/shopping-setting-advance.js +57 -16
- package/lowcode/cms-plugin/shopping-setting-advance.ts +69 -18
- package/lowcode/cms-plugin/user/user-module.js +2 -43
- package/lowcode/cms-plugin/user/user-module.ts +2 -46
- package/lowcode/cms-plugin/user-list.js +4 -6
- package/lowcode/cms-plugin/user-list.ts +35 -38
- package/lowcode/css/editor.css +42 -3
- package/lowcode/glitter-base/global/language.js +6 -1
- package/lowcode/glitter-base/global/language.ts +10 -4
- package/lowcode/glitter-base/global/payment-config.js +19 -16
- package/lowcode/glitter-base/global/payment-config.ts +22 -16
- package/lowcode/glitter-base/global/shipment-config.js +6 -5
- package/lowcode/glitter-base/global/shipment-config.ts +12 -10
- package/lowcode/glitter-base/route/fcm.js +21 -1
- package/lowcode/glitter-base/route/fcm.ts +22 -2
- package/lowcode/glitter-base/route/shopping.js +8 -32
- package/lowcode/glitter-base/route/shopping.ts +10 -33
- package/lowcode/glitter-base/route/user.js +11 -2
- package/lowcode/glitter-base/route/user.ts +23 -12
- package/lowcode/jspage/function-page/setting_editor.js +9 -0
- package/lowcode/jspage/function-page/setting_editor.ts +9 -0
- package/lowcode/public-components/blogs/list.js +223 -195
- package/lowcode/public-components/blogs/list.ts +383 -352
- package/lowcode/public-components/product/product-list.js +8 -4
- package/lowcode/public-components/product/product-list.ts +9 -4
- package/lowcode/public-components/terms-related/index.js +1 -1
- package/lowcode/public-components/terms-related/index.ts +1 -1
- package/lowcode/public-components/user-manager/um-login.js +1 -1
- package/lowcode/public-components/user-manager/um-login.ts +2 -2
- package/lowcode/public-components/user-manager/um-order.js +41 -5
- package/lowcode/public-components/user-manager/um-order.ts +58 -20
- package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
- package/nhi4veq3gk.json +1 -0
- package/package.json +1 -1
- package/src/Language.d.ts +2 -0
- package/src/Language.js +66 -65
- package/src/Language.js.map +1 -1
- package/src/Language.ts +719 -715
- package/src/api-public/config/shipment-config.js +3 -2
- package/src/api-public/config/shipment-config.js.map +1 -1
- package/src/api-public/config/shipment-config.ts +3 -2
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-chat.ts +1 -2
- package/src/api-public/controllers/fcm.js +23 -58
- package/src/api-public/controllers/fcm.js.map +1 -1
- package/src/api-public/controllers/fcm.ts +28 -56
- package/src/api-public/controllers/shop.js +7 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +17 -10
- package/src/api-public/controllers/user.js +1 -0
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -0
- package/src/api-public/services/auto-send-email.js +247 -187
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/auto-send-email.ts +568 -505
- package/src/api-public/services/delivery.js +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/delivery.ts +6 -5
- package/src/api-public/services/financial-service.js +1 -2
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +4 -6
- package/src/api-public/services/manager.d.ts +4 -3
- package/src/api-public/services/manager.js +8 -12
- package/src/api-public/services/manager.js.map +1 -1
- package/src/api-public/services/manager.ts +57 -59
- package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
- package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
- package/src/api-public/services/schedule.d.ts +1 -0
- package/src/api-public/services/schedule.js +27 -0
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +30 -0
- package/src/api-public/services/shopping.d.ts +22 -2
- package/src/api-public/services/shopping.js +362 -90
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +481 -134
- package/src/api-public/services/user.d.ts +1 -0
- package/src/api-public/services/user.js +32 -12
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +38 -19
- package/src/api-public/services/workers.js +3 -3
- package/src/api-public/services/workers.js.map +1 -1
- package/src/api-public/services/workers.ts +103 -103
- package/src/app-project/serverless/src/modules/database.js +1 -1
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.ts +171 -171
- package/src/controllers/template.d.ts +1 -1
- package/src/controllers/template.js +16 -16
- package/src/controllers/template.js.map +1 -1
- package/src/controllers/template.ts +98 -84
- package/src/modules/database.js +3 -1
- package/src/modules/database.js.map +1 -1
- package/src/modules/database.ts +185 -181
- package/src/modules/firebase.d.ts +17 -0
- package/src/modules/firebase.js +126 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +169 -0
- package/src/public-config-initial/auto-fcm.js +8 -2
- package/src/public-config-initial/auto-fcm.js.map +1 -1
- package/src/public-config-initial/auto-fcm.ts +15 -6
- package/src/services/app.d.ts +2 -1
- package/src/services/app.js.map +1 -1
- package/src/services/app.ts +2 -1
- package/src/services/template.d.ts +3 -2
- package/src/services/template.js +2 -1
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +13 -20
|
@@ -851,6 +851,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
851
851
|
: html ` <i class="fa-solid fa-chevron-right"></i>`}`;
|
|
852
852
|
});
|
|
853
853
|
return html ` <div
|
|
854
|
+
class="h-100"
|
|
854
855
|
style="display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; font-weight: 500; gap: 6px; line-height: 140%;cursor: default;"
|
|
855
856
|
>
|
|
856
857
|
<div style="width: 28px;height: 28px;display: flex; align-items: center; justify-content:center;">
|
|
@@ -1309,6 +1310,47 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1309
1310
|
: `<option class="d-none" selected>${obj.place_holder || `請選擇項目`}</option>`}
|
|
1310
1311
|
</select>`;
|
|
1311
1312
|
}
|
|
1313
|
+
static printOption(gvc, vmt, opt) {
|
|
1314
|
+
const id = `print-option-${opt.key}`;
|
|
1315
|
+
opt.key = `${opt.key}`;
|
|
1316
|
+
function call() {
|
|
1317
|
+
if (vmt.postData.includes(opt.key)) {
|
|
1318
|
+
vmt.postData = vmt.postData.filter(item => item !== opt.key);
|
|
1319
|
+
}
|
|
1320
|
+
else {
|
|
1321
|
+
vmt.postData.push(opt.key);
|
|
1322
|
+
}
|
|
1323
|
+
gvc.notifyDataChange(vmt.id);
|
|
1324
|
+
}
|
|
1325
|
+
return html `<div class="d-flex align-items-center gap-3 mb-3">
|
|
1326
|
+
${gvc.bindView({
|
|
1327
|
+
bind: id,
|
|
1328
|
+
view: () => {
|
|
1329
|
+
return html `<input
|
|
1330
|
+
class="form-check-input mt-0 ${BgWidget.getCheckedClass(gvc)}"
|
|
1331
|
+
type="checkbox"
|
|
1332
|
+
id="${opt.key}"
|
|
1333
|
+
name="radio_${opt.key}"
|
|
1334
|
+
onclick="${gvc.event(() => call())}"
|
|
1335
|
+
${vmt.postData.includes(opt.key) ? 'checked' : ''}
|
|
1336
|
+
/>`;
|
|
1337
|
+
},
|
|
1338
|
+
divCreate: {
|
|
1339
|
+
class: 'd-flex align-items-center justify-content-center',
|
|
1340
|
+
},
|
|
1341
|
+
})}
|
|
1342
|
+
<div class="form-check-label c_updown_label cursor_pointer" onclick="${gvc.event(() => call())}">
|
|
1343
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
|
|
1344
|
+
${opt.note ? html ` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
1345
|
+
</div>
|
|
1346
|
+
</div>`;
|
|
1347
|
+
}
|
|
1348
|
+
static renderOptions(gvc, vmt) {
|
|
1349
|
+
if (vmt.dataList.length === 0) {
|
|
1350
|
+
return html `<div class="d-flex justify-content-center fs-5">查無標籤</div>`;
|
|
1351
|
+
}
|
|
1352
|
+
return vmt.dataList.map((item) => this.printOption(gvc, vmt, { key: item, value: `#${item}` })).join('');
|
|
1353
|
+
}
|
|
1312
1354
|
static maintenance() {
|
|
1313
1355
|
return html ` <div class="d-flex flex-column align-items-center justify-content-center vh-100 vw-100">
|
|
1314
1356
|
<iframe
|
|
@@ -2006,7 +2048,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
2006
2048
|
static container(htmlString, obj) {
|
|
2007
2049
|
var _a;
|
|
2008
2050
|
return html ` <div
|
|
2009
|
-
class="mb-0 ${document.body.clientWidth > 768 ? 'mx-auto mt-
|
|
2051
|
+
class="mb-0 ${document.body.clientWidth > 768 ? 'mx-auto mt-3' : 'w-100 mx-0'}"
|
|
2010
2052
|
style="max-width: 100%; width: ${this.getContainerWidth()}px; ${(_a = obj === null || obj === void 0 ? void 0 : obj.style) !== null && _a !== void 0 ? _a : ''}"
|
|
2011
2053
|
>
|
|
2012
2054
|
${htmlString}
|
|
@@ -2014,7 +2056,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
2014
2056
|
}
|
|
2015
2057
|
static container1x2(cont1, cont2) {
|
|
2016
2058
|
return html ` <div
|
|
2017
|
-
class="d-flex mt-
|
|
2059
|
+
class="d-flex mt-2 mb-0 ${document.body.clientWidth > 768 ? 'mx-auto' : 'w-100 mx-0 flex-column'} "
|
|
2018
2060
|
style="gap: 24px;"
|
|
2019
2061
|
>
|
|
2020
2062
|
<div style="width: ${document.body.clientWidth > 768 ? cont1.ratio : 100}%">${cont1.html}</div>
|
|
@@ -2108,7 +2150,50 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
2108
2150
|
},
|
|
2109
2151
|
});
|
|
2110
2152
|
}
|
|
2153
|
+
static searchSelectContainer(gvc, button_title, data, def, callback) {
|
|
2154
|
+
const id = gvc.glitter.getUUID();
|
|
2155
|
+
let loading = true;
|
|
2156
|
+
let search = '';
|
|
2157
|
+
return gvc.bindView({
|
|
2158
|
+
bind: id,
|
|
2159
|
+
view: () => {
|
|
2160
|
+
try {
|
|
2161
|
+
def = Array.isArray(def) ? def : [];
|
|
2162
|
+
return [
|
|
2163
|
+
this.grayButton(loading ? button_title : '確認', gvc.event(() => {
|
|
2164
|
+
loading = !loading;
|
|
2165
|
+
gvc.notifyDataChange(id);
|
|
2166
|
+
}), {
|
|
2167
|
+
class: 'w-100',
|
|
2168
|
+
}),
|
|
2169
|
+
loading
|
|
2170
|
+
? html `<div class="d-flex flex-wrap gap-2">
|
|
2171
|
+
${def.map(item => this.normalInsignia(`#${item}`)).join('')}
|
|
2172
|
+
</div>`
|
|
2173
|
+
: this.mainCard([
|
|
2174
|
+
this.searchPlace(gvc.event(e => {
|
|
2175
|
+
search = e.value;
|
|
2176
|
+
gvc.notifyDataChange(id);
|
|
2177
|
+
}), search || '', '搜尋', '0', '0'),
|
|
2178
|
+
this.multiCheckboxContainer(gvc, data.filter(item => item.name.includes(search)), def, stringArray => {
|
|
2179
|
+
def = stringArray;
|
|
2180
|
+
callback(stringArray);
|
|
2181
|
+
}, {
|
|
2182
|
+
single: false,
|
|
2183
|
+
containerStyle: 'overflow: auto; max-height: 310px;',
|
|
2184
|
+
}),
|
|
2185
|
+
].join(this.mbContainer(12))),
|
|
2186
|
+
].join(this.mbContainer(12));
|
|
2187
|
+
}
|
|
2188
|
+
catch (error) {
|
|
2189
|
+
console.error(error);
|
|
2190
|
+
return '';
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2111
2195
|
static multiCheckboxContainer(gvc, data, def, callback, obj) {
|
|
2196
|
+
var _a;
|
|
2112
2197
|
const id = gvc.glitter.getUUID();
|
|
2113
2198
|
const inputColor = obj && obj.readonly ? '#808080' : undefined;
|
|
2114
2199
|
const randomString = obj && obj.single ? this.getWhiteDotClass(gvc, inputColor) : this.getCheckedClass(gvc, inputColor);
|
|
@@ -2169,6 +2254,9 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
2169
2254
|
});
|
|
2170
2255
|
return html ` <div style="width: 100%; display: flex; flex-direction: column; gap: 6px;">${checkboxHTML}</div> `;
|
|
2171
2256
|
},
|
|
2257
|
+
divCreate: {
|
|
2258
|
+
style: (_a = obj === null || obj === void 0 ? void 0 : obj.containerStyle) !== null && _a !== void 0 ? _a : '',
|
|
2259
|
+
},
|
|
2172
2260
|
});
|
|
2173
2261
|
}
|
|
2174
2262
|
static tripletCheckboxContainer(gvc, name, def, callback, obj) {
|
|
@@ -2326,8 +2414,8 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
2326
2414
|
}
|
|
2327
2415
|
static tab(data, gvc, select, callback, style) {
|
|
2328
2416
|
return html ` <div
|
|
2329
|
-
class="mx-sm-0 mx-2"
|
|
2330
|
-
style="justify-content: flex-start; align-items: flex-start; gap: 22px; display: inline-flex;cursor: pointer;
|
|
2417
|
+
class="mx-sm-0 my-sm-4 mx-2 my-3"
|
|
2418
|
+
style="justify-content: flex-start; align-items: flex-start; gap: 22px; display: inline-flex;cursor: pointer;font-size: 18px; ${style !== null && style !== void 0 ? style : ''};"
|
|
2331
2419
|
>
|
|
2332
2420
|
${data
|
|
2333
2421
|
.map(dd => {
|
|
@@ -9,7 +9,7 @@ import { ApiStock } from '../glitter-base/route/stock.js';
|
|
|
9
9
|
import { FormModule } from '../cms-plugin/module/form-module.js';
|
|
10
10
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
11
11
|
import { FormCheck } from '../cms-plugin/module/form-check.js';
|
|
12
|
-
import { Language } from '../glitter-base/global/language.js';
|
|
12
|
+
import { Language, LanguageLocation } from '../glitter-base/global/language.js';
|
|
13
13
|
import { ProductAi } from '../cms-plugin/ai-generator/product-ai.js';
|
|
14
14
|
import { imageLibrary } from '../modules/image-library.js';
|
|
15
15
|
import { Animation } from '../glitterBundle/module/Animation.js';
|
|
@@ -543,7 +543,7 @@ export class BgWidget {
|
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
static languageInsignia(language:
|
|
546
|
+
static languageInsignia(language: LanguageLocation, style?: string) {
|
|
547
547
|
switch (language) {
|
|
548
548
|
case 'zh-TW':
|
|
549
549
|
return html` <div class="insignia insignia-sm" style="background: #ffe9b2; ${style || ''};">
|
|
@@ -1062,6 +1062,7 @@ ${obj.default ?? ''}</textarea
|
|
|
1062
1062
|
: html` <i class="fa-solid fa-chevron-right"></i>`}`;
|
|
1063
1063
|
});
|
|
1064
1064
|
return html` <div
|
|
1065
|
+
class="h-100"
|
|
1065
1066
|
style="display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; font-weight: 500; gap: 6px; line-height: 140%;cursor: default;"
|
|
1066
1067
|
>
|
|
1067
1068
|
<div style="width: 28px;height: 28px;display: flex; align-items: center; justify-content:center;">
|
|
@@ -1553,6 +1554,50 @@ ${obj.default ?? ''}</textarea
|
|
|
1553
1554
|
</select>`;
|
|
1554
1555
|
}
|
|
1555
1556
|
|
|
1557
|
+
static printOption(gvc: GVC, vmt: { id: string; postData: string[] }, opt: OptionsItem) {
|
|
1558
|
+
const id = `print-option-${opt.key}`;
|
|
1559
|
+
opt.key = `${opt.key}`;
|
|
1560
|
+
|
|
1561
|
+
function call() {
|
|
1562
|
+
if (vmt.postData.includes(opt.key)) {
|
|
1563
|
+
vmt.postData = vmt.postData.filter(item => item !== opt.key);
|
|
1564
|
+
} else {
|
|
1565
|
+
vmt.postData.push(opt.key);
|
|
1566
|
+
}
|
|
1567
|
+
gvc.notifyDataChange(vmt.id);
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
return html`<div class="d-flex align-items-center gap-3 mb-3">
|
|
1571
|
+
${gvc.bindView({
|
|
1572
|
+
bind: id,
|
|
1573
|
+
view: () => {
|
|
1574
|
+
return html`<input
|
|
1575
|
+
class="form-check-input mt-0 ${BgWidget.getCheckedClass(gvc)}"
|
|
1576
|
+
type="checkbox"
|
|
1577
|
+
id="${opt.key}"
|
|
1578
|
+
name="radio_${opt.key}"
|
|
1579
|
+
onclick="${gvc.event(() => call())}"
|
|
1580
|
+
${vmt.postData.includes(opt.key) ? 'checked' : ''}
|
|
1581
|
+
/>`;
|
|
1582
|
+
},
|
|
1583
|
+
divCreate: {
|
|
1584
|
+
class: 'd-flex align-items-center justify-content-center',
|
|
1585
|
+
},
|
|
1586
|
+
})}
|
|
1587
|
+
<div class="form-check-label c_updown_label cursor_pointer" onclick="${gvc.event(() => call())}">
|
|
1588
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
|
|
1589
|
+
${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
1590
|
+
</div>
|
|
1591
|
+
</div>`;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
static renderOptions(gvc: GVC, vmt: { id: string; postData: string[]; dataList: any }) {
|
|
1595
|
+
if (vmt.dataList.length === 0) {
|
|
1596
|
+
return html`<div class="d-flex justify-content-center fs-5">查無標籤</div>`;
|
|
1597
|
+
}
|
|
1598
|
+
return vmt.dataList.map((item: any) => this.printOption(gvc, vmt, { key: item, value: `#${item}` })).join('');
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1556
1601
|
// 頁面
|
|
1557
1602
|
static dotlottieJS = 'https://unpkg.com/@dotlottie/player-component@latest/dist/dotlottie-player.mjs';
|
|
1558
1603
|
|
|
@@ -2398,7 +2443,7 @@ ${obj.default ?? ''}</textarea
|
|
|
2398
2443
|
}
|
|
2399
2444
|
) {
|
|
2400
2445
|
return html` <div
|
|
2401
|
-
class="mb-0 ${document.body.clientWidth > 768 ? 'mx-auto mt-
|
|
2446
|
+
class="mb-0 ${document.body.clientWidth > 768 ? 'mx-auto mt-3' : 'w-100 mx-0'}"
|
|
2402
2447
|
style="max-width: 100%; width: ${this.getContainerWidth()}px; ${obj?.style ?? ''}"
|
|
2403
2448
|
>
|
|
2404
2449
|
${htmlString}
|
|
@@ -2416,7 +2461,7 @@ ${obj.default ?? ''}</textarea
|
|
|
2416
2461
|
}
|
|
2417
2462
|
) {
|
|
2418
2463
|
return html` <div
|
|
2419
|
-
class="d-flex mt-
|
|
2464
|
+
class="d-flex mt-2 mb-0 ${document.body.clientWidth > 768 ? 'mx-auto' : 'w-100 mx-0 flex-column'} "
|
|
2420
2465
|
style="gap: 24px;"
|
|
2421
2466
|
>
|
|
2422
2467
|
<div style="width: ${document.body.clientWidth > 768 ? cont1.ratio : 100}%">${cont1.html}</div>
|
|
@@ -2528,6 +2573,73 @@ ${obj.default ?? ''}</textarea
|
|
|
2528
2573
|
});
|
|
2529
2574
|
}
|
|
2530
2575
|
|
|
2576
|
+
static searchSelectContainer(
|
|
2577
|
+
gvc: GVC,
|
|
2578
|
+
button_title: string,
|
|
2579
|
+
data: { key: string; name: string; type: string; placeHolder: string; unit?: string }[],
|
|
2580
|
+
def: string[],
|
|
2581
|
+
callback: (value: string[]) => void
|
|
2582
|
+
) {
|
|
2583
|
+
const id = gvc.glitter.getUUID();
|
|
2584
|
+
let loading = true;
|
|
2585
|
+
let search = '';
|
|
2586
|
+
|
|
2587
|
+
return gvc.bindView({
|
|
2588
|
+
bind: id,
|
|
2589
|
+
view: () => {
|
|
2590
|
+
try {
|
|
2591
|
+
def = Array.isArray(def) ? def : [];
|
|
2592
|
+
return [
|
|
2593
|
+
this.grayButton(
|
|
2594
|
+
loading ? button_title : '確認',
|
|
2595
|
+
gvc.event(() => {
|
|
2596
|
+
loading = !loading;
|
|
2597
|
+
gvc.notifyDataChange(id);
|
|
2598
|
+
}),
|
|
2599
|
+
{
|
|
2600
|
+
class: 'w-100',
|
|
2601
|
+
}
|
|
2602
|
+
),
|
|
2603
|
+
loading
|
|
2604
|
+
? html`<div class="d-flex flex-wrap gap-2">
|
|
2605
|
+
${def.map(item => this.normalInsignia(`#${item}`)).join('')}
|
|
2606
|
+
</div>`
|
|
2607
|
+
: this.mainCard(
|
|
2608
|
+
[
|
|
2609
|
+
this.searchPlace(
|
|
2610
|
+
gvc.event(e => {
|
|
2611
|
+
search = e.value;
|
|
2612
|
+
gvc.notifyDataChange(id);
|
|
2613
|
+
}),
|
|
2614
|
+
search || '',
|
|
2615
|
+
'搜尋',
|
|
2616
|
+
'0',
|
|
2617
|
+
'0'
|
|
2618
|
+
),
|
|
2619
|
+
this.multiCheckboxContainer(
|
|
2620
|
+
gvc,
|
|
2621
|
+
data.filter(item => item.name.includes(search)),
|
|
2622
|
+
def,
|
|
2623
|
+
stringArray => {
|
|
2624
|
+
def = stringArray;
|
|
2625
|
+
callback(stringArray);
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
single: false,
|
|
2629
|
+
containerStyle: 'overflow: auto; max-height: 310px;',
|
|
2630
|
+
}
|
|
2631
|
+
),
|
|
2632
|
+
].join(this.mbContainer(12))
|
|
2633
|
+
),
|
|
2634
|
+
].join(this.mbContainer(12));
|
|
2635
|
+
} catch (error) {
|
|
2636
|
+
console.error(error);
|
|
2637
|
+
return '';
|
|
2638
|
+
}
|
|
2639
|
+
},
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2531
2643
|
static multiCheckboxContainer(
|
|
2532
2644
|
gvc: GVC,
|
|
2533
2645
|
data: {
|
|
@@ -2543,6 +2655,7 @@ ${obj.default ?? ''}</textarea
|
|
|
2543
2655
|
readonly?: boolean;
|
|
2544
2656
|
single?: boolean;
|
|
2545
2657
|
zeroOption?: boolean;
|
|
2658
|
+
containerStyle?: string;
|
|
2546
2659
|
}
|
|
2547
2660
|
) {
|
|
2548
2661
|
const id = gvc.glitter.getUUID();
|
|
@@ -2605,6 +2718,9 @@ ${obj.default ?? ''}</textarea
|
|
|
2605
2718
|
|
|
2606
2719
|
return html` <div style="width: 100%; display: flex; flex-direction: column; gap: 6px;">${checkboxHTML}</div> `;
|
|
2607
2720
|
},
|
|
2721
|
+
divCreate: {
|
|
2722
|
+
style: obj?.containerStyle ?? '',
|
|
2723
|
+
},
|
|
2608
2724
|
});
|
|
2609
2725
|
}
|
|
2610
2726
|
|
|
@@ -2795,8 +2911,8 @@ ${obj.default ?? ''}</textarea
|
|
|
2795
2911
|
style?: string
|
|
2796
2912
|
) {
|
|
2797
2913
|
return html` <div
|
|
2798
|
-
class="mx-sm-0 mx-2"
|
|
2799
|
-
style="justify-content: flex-start; align-items: flex-start; gap: 22px; display: inline-flex;cursor: pointer;
|
|
2914
|
+
class="mx-sm-0 my-sm-4 mx-2 my-3"
|
|
2915
|
+
style="justify-content: flex-start; align-items: flex-start; gap: 22px; display: inline-flex;cursor: pointer;font-size: 18px; ${style ??
|
|
2800
2916
|
''};"
|
|
2801
2917
|
>
|
|
2802
2918
|
${data
|
|
@@ -159,45 +159,6 @@ export class PageSplit {
|
|
|
159
159
|
loading: false,
|
|
160
160
|
dataList: [],
|
|
161
161
|
};
|
|
162
|
-
gvc.addStyle(`
|
|
163
|
-
.page-link-v2 {
|
|
164
|
-
display: inline-flex;
|
|
165
|
-
height: 32px;
|
|
166
|
-
padding: 10px;
|
|
167
|
-
flex-direction: column;
|
|
168
|
-
justify-content: center;
|
|
169
|
-
align-items: center;
|
|
170
|
-
gap: 10px;
|
|
171
|
-
cursor: pointer;
|
|
172
|
-
background: #fff;
|
|
173
|
-
border: 1px solid #393939;
|
|
174
|
-
color: #393939;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.page-link-prev {
|
|
178
|
-
border-radius: 7px 0px 0px 7px;
|
|
179
|
-
border: 1px solid #d8d8d8;
|
|
180
|
-
background: #fff;
|
|
181
|
-
color: #393939;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.page-link-next {
|
|
185
|
-
border-radius: 0px 7px 7px 0px;
|
|
186
|
-
border: 1px solid #d8d8d8;
|
|
187
|
-
background: #fff;
|
|
188
|
-
color: #393939;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.page-link-active {
|
|
192
|
-
background: #393939;
|
|
193
|
-
color: #fff;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.angle-style {
|
|
197
|
-
font-size: 12px;
|
|
198
|
-
color: #d8d8d8;
|
|
199
|
-
}
|
|
200
|
-
`);
|
|
201
162
|
return gvc.bindView({
|
|
202
163
|
bind: vm.id,
|
|
203
164
|
view: () => {
|
|
@@ -162,46 +162,6 @@ export class PageSplit {
|
|
|
162
162
|
dataList: <any>[],
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
gvc.addStyle(`
|
|
166
|
-
.page-link-v2 {
|
|
167
|
-
display: inline-flex;
|
|
168
|
-
height: 32px;
|
|
169
|
-
padding: 10px;
|
|
170
|
-
flex-direction: column;
|
|
171
|
-
justify-content: center;
|
|
172
|
-
align-items: center;
|
|
173
|
-
gap: 10px;
|
|
174
|
-
cursor: pointer;
|
|
175
|
-
background: #fff;
|
|
176
|
-
border: 1px solid #393939;
|
|
177
|
-
color: #393939;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.page-link-prev {
|
|
181
|
-
border-radius: 7px 0px 0px 7px;
|
|
182
|
-
border: 1px solid #d8d8d8;
|
|
183
|
-
background: #fff;
|
|
184
|
-
color: #393939;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.page-link-next {
|
|
188
|
-
border-radius: 0px 7px 7px 0px;
|
|
189
|
-
border: 1px solid #d8d8d8;
|
|
190
|
-
background: #fff;
|
|
191
|
-
color: #393939;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.page-link-active {
|
|
195
|
-
background: #393939;
|
|
196
|
-
color: #fff;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.angle-style {
|
|
200
|
-
font-size: 12px;
|
|
201
|
-
color: #d8d8d8;
|
|
202
|
-
}
|
|
203
|
-
`);
|
|
204
|
-
|
|
205
165
|
return gvc.bindView({
|
|
206
166
|
bind: vm.id,
|
|
207
167
|
view: () => {
|
|
@@ -31,13 +31,14 @@ export class AutoFcmAdvertise {
|
|
|
31
31
|
dataList: [],
|
|
32
32
|
};
|
|
33
33
|
const postData = {
|
|
34
|
-
type: 'notify-
|
|
34
|
+
type: 'notify-fcm-config',
|
|
35
35
|
tag: '',
|
|
36
36
|
tagList: [],
|
|
37
37
|
userList: [],
|
|
38
38
|
boolean: 'or',
|
|
39
39
|
name: '',
|
|
40
40
|
title: '',
|
|
41
|
+
link: '',
|
|
41
42
|
content: '',
|
|
42
43
|
sendTime: { date: startDate, time: startTime },
|
|
43
44
|
sendGroup: [],
|
|
@@ -168,6 +169,7 @@ export class AutoFcmAdvertise {
|
|
|
168
169
|
ApiUser.getUserList({
|
|
169
170
|
page: 0,
|
|
170
171
|
limit: 99999,
|
|
172
|
+
only_id: true
|
|
171
173
|
}).then(dd => {
|
|
172
174
|
dd.response.data.map((user) => {
|
|
173
175
|
postData.userList.push({
|
|
@@ -464,9 +466,10 @@ export class AutoFcmAdvertise {
|
|
|
464
466
|
case 'all':
|
|
465
467
|
dialog.dataLoading({ visible: true, text: '取得所有會員資料中...' });
|
|
466
468
|
new Promise(resolve => {
|
|
467
|
-
ApiUser.
|
|
469
|
+
ApiUser.getUserList({
|
|
468
470
|
page: 0,
|
|
469
471
|
limit: 99999,
|
|
472
|
+
only_id: true
|
|
470
473
|
}).then(dd => {
|
|
471
474
|
if (dd.response.data) {
|
|
472
475
|
const ids = [];
|
|
@@ -514,11 +517,11 @@ export class AutoFcmAdvertise {
|
|
|
514
517
|
default: getDefault([]),
|
|
515
518
|
api: (data) => {
|
|
516
519
|
return new Promise(resolve => {
|
|
517
|
-
ApiUser.
|
|
520
|
+
ApiUser.getUserList({
|
|
518
521
|
page: 0,
|
|
519
522
|
limit: 99999,
|
|
520
|
-
|
|
521
|
-
|
|
523
|
+
only_id: true,
|
|
524
|
+
search: data.query
|
|
522
525
|
}).then(dd => {
|
|
523
526
|
if (dd.response.data) {
|
|
524
527
|
vm.dataList = dd.response.data
|
|
@@ -618,6 +621,15 @@ export class AutoFcmAdvertise {
|
|
|
618
621
|
},
|
|
619
622
|
global_language: true,
|
|
620
623
|
}),
|
|
624
|
+
BgWidget.linkList({
|
|
625
|
+
gvc: gvc,
|
|
626
|
+
title: '跳轉頁面',
|
|
627
|
+
default: postData.link || '',
|
|
628
|
+
placeHolder: '為空則為首頁',
|
|
629
|
+
callback: text => {
|
|
630
|
+
postData.link = text;
|
|
631
|
+
},
|
|
632
|
+
})
|
|
621
633
|
].join('');
|
|
622
634
|
},
|
|
623
635
|
divCreate: {
|
|
@@ -16,7 +16,7 @@ interface EmailObject {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
type PostData = {
|
|
19
|
-
type: 'notify-
|
|
19
|
+
type: 'notify-fcm-config';
|
|
20
20
|
tag: string;
|
|
21
21
|
tagList: { tag: string; filter: any; valueString: string }[];
|
|
22
22
|
userList: EmailObject[];
|
|
@@ -24,6 +24,7 @@ type PostData = {
|
|
|
24
24
|
boolean: 'and' | 'or';
|
|
25
25
|
title: string;
|
|
26
26
|
content: string;
|
|
27
|
+
link:string;
|
|
27
28
|
sendTime: { date: string; time: string } | undefined;
|
|
28
29
|
sendGroup: string[];
|
|
29
30
|
email?: string[];
|
|
@@ -47,13 +48,14 @@ export class AutoFcmAdvertise {
|
|
|
47
48
|
dataList: [] as { key: string; value: string }[],
|
|
48
49
|
};
|
|
49
50
|
const postData: PostData = {
|
|
50
|
-
type: 'notify-
|
|
51
|
+
type: 'notify-fcm-config',
|
|
51
52
|
tag: '',
|
|
52
53
|
tagList: [],
|
|
53
54
|
userList: [],
|
|
54
55
|
boolean: 'or',
|
|
55
56
|
name: '',
|
|
56
57
|
title: '',
|
|
58
|
+
link:'',
|
|
57
59
|
content: '',
|
|
58
60
|
sendTime: { date: startDate, time: startTime },
|
|
59
61
|
sendGroup: [],
|
|
@@ -185,6 +187,7 @@ export class AutoFcmAdvertise {
|
|
|
185
187
|
ApiUser.getUserList({
|
|
186
188
|
page: 0,
|
|
187
189
|
limit: 99999,
|
|
190
|
+
only_id:true
|
|
188
191
|
}).then(dd => {
|
|
189
192
|
dd.response.data.map((user: any) => {
|
|
190
193
|
postData.userList.push({
|
|
@@ -497,9 +500,10 @@ export class AutoFcmAdvertise {
|
|
|
497
500
|
case 'all':
|
|
498
501
|
dialog.dataLoading({ visible: true, text: '取得所有會員資料中...' });
|
|
499
502
|
new Promise(resolve => {
|
|
500
|
-
ApiUser.
|
|
503
|
+
ApiUser.getUserList({
|
|
501
504
|
page: 0,
|
|
502
505
|
limit: 99999,
|
|
506
|
+
only_id:true
|
|
503
507
|
}).then(dd => {
|
|
504
508
|
if (dd.response.data) {
|
|
505
509
|
const ids: number[] = [];
|
|
@@ -548,11 +552,11 @@ export class AutoFcmAdvertise {
|
|
|
548
552
|
default: getDefault([]),
|
|
549
553
|
api: (data: { query: string; orderString: string }) => {
|
|
550
554
|
return new Promise(resolve => {
|
|
551
|
-
ApiUser.
|
|
555
|
+
ApiUser.getUserList({
|
|
552
556
|
page: 0,
|
|
553
557
|
limit: 99999,
|
|
554
|
-
|
|
555
|
-
|
|
558
|
+
only_id:true,
|
|
559
|
+
search: data.query
|
|
556
560
|
}).then(dd => {
|
|
557
561
|
if (dd.response.data) {
|
|
558
562
|
vm.dataList = dd.response.data
|
|
@@ -660,6 +664,15 @@ export class AutoFcmAdvertise {
|
|
|
660
664
|
},
|
|
661
665
|
global_language: true,
|
|
662
666
|
}),
|
|
667
|
+
BgWidget.linkList({
|
|
668
|
+
gvc: gvc,
|
|
669
|
+
title: '跳轉頁面',
|
|
670
|
+
default: postData.link || '',
|
|
671
|
+
placeHolder: '為空則為首頁',
|
|
672
|
+
callback: text => {
|
|
673
|
+
postData.link = text;
|
|
674
|
+
},
|
|
675
|
+
})
|
|
663
676
|
].join('');
|
|
664
677
|
},
|
|
665
678
|
divCreate: {
|