@feedmepos/mf-connect 0.1.98-beta.39 → 0.1.98-beta.40
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/package.json +1 -1
- package/dist/App-DwjQisFZ.js +0 -4785
- package/dist/AuditLogs-DMGqmriL.js +0 -2014
- package/dist/Bin-4wvIqogM.js +0 -166
- package/dist/Broadcast-DPpuSZ8_.js +0 -269
- package/dist/CampaignAnalytic-CXFDo2X_.js +0 -1826
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-SLoy1-Kd.js +0 -122
- package/dist/Card-C8SA6un0.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-BCpSiM_4.js +0 -541
- package/dist/Credit-C8RTBpP7.js +0 -286
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js +0 -3382
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CJTduNh3.js +0 -351
- package/dist/Experience-Bg3kFQQE.js +0 -285
- package/dist/FileSaver.min-DMUuMi9w.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
- package/dist/Game-D3DbkRUj.js +0 -356
- package/dist/GiftCardSetup-CxlMM4up.js +0 -542
- package/dist/Grab-DvEK8ixP.js +0 -301
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BBK-UrEe.js +0 -145
- package/dist/Index-Do_9DXuY.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BKPGBYiU.js +0 -48
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-D6wJN9Gj.js +0 -18737
- package/dist/LoyaltyDashboard-B4WqycGN.js +0 -1345
- package/dist/MainLayout-DdxLaufS.js +0 -143
- package/dist/Marketing-CcFEMwKB.js +0 -236
- package/dist/MarketingMaterialEdit-DoYFaMf7.js +0 -1036
- package/dist/Member-BussgBln.js +0 -281
- package/dist/MemberList-BXJxSsjo.js +0 -1603
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-O-XY5nz3.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DsxrIO0r.js +0 -60957
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +0 -38
- package/dist/Mission-CPkM-8Ns.js +0 -360
- package/dist/Overview-BJjpYUJN.js +0 -1080
- package/dist/Overview-C5KF_Jxj.js +0 -1316
- package/dist/Point-FDFwR3Hk.js +0 -288
- package/dist/Promotion-qtucKxn0.js +0 -423
- package/dist/Queue-d91tocPX.js +0 -261
- package/dist/Record-CvkK2iLq.js +0 -342
- package/dist/Review-C_zLGtzU.js +0 -45
- package/dist/ReviewFacebookCallback-Bidg3P76.js +0 -238
- package/dist/ReviewGoogleCallback-DL0lxMBL.js +0 -213
- package/dist/Reward-BTsQaI-J.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BjxA4eMX.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D4NIDc-C.js +0 -1913
- package/dist/Segment-BgFyB3BK.js +0 -1017
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CkhjFNvZ.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-HYbRyACe.js +0 -189
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-7dv3cAW3.js +0 -226
- package/dist/Setting-BxHoCSxw.js +0 -2047
- package/dist/SettingAdvertisements-WfvuE4fA.js +0 -264
- package/dist/Settings-B42SAvEx.js +0 -179
- package/dist/Store-BnvWfCy-.js +0 -2413
- package/dist/StoreRewards-BRzAMqR-.js +0 -540
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C3FJr1L5.js +0 -1075
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-UZYzUcif.js +0 -7007
- package/dist/Tier-BrzLNat2.js +0 -972
- package/dist/Title-EnlaNXld.js +0 -569
- package/dist/Transaction-BiXNxUGX.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Db5_DKQ0.js +0 -130
- package/dist/Voucher-C2dyk-jj.js +0 -444
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DPE24a-J.js +0 -421
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CI1HM9HA.js +0 -56
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-Bt8HrAEr.js +0 -60740
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -7
- package/dist/business-BwtQpfUr.js +0 -82
- package/dist/campaign-B6U9lwKi.js +0 -255
- package/dist/campaign-C6Cb9s3C.js +0 -100
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign.enum-Dx-Zo68Q.js +0 -26
- package/dist/campaign.fn-B0x2EGhw.js +0 -776
- package/dist/collectible.enum-Liy2wH3s.js +0 -19
- package/dist/collection.fn-DfoA9sJV.js +0 -26
- package/dist/duplicateCampaign-Cnq5N-V8.js +0 -51
- package/dist/effect-B2REbrv8.js +0 -89
- package/dist/email-addresses-BzmOsxLn.js +0 -705
- package/dist/export-jHpRhPQu.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/helper-DQAHX1kX.js +0 -86
- package/dist/index-4GG-yjdN.js +0 -2963
- package/dist/index-BWgMbKOB.js +0 -85
- package/dist/index-BccUpf0U.js +0 -3
- package/dist/index-BkgkJkVs.js +0 -8919
- package/dist/index-C0PKVTf9.js +0 -32
- package/dist/index-C8cXXcLk.js +0 -45
- package/dist/index-CTTGf4TM.js +0 -151
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DJN4auwx.js +0 -146
- package/dist/index-DMr9ohGV.js +0 -1139
- package/dist/index-DQTo_ytu.js +0 -31
- package/dist/index-DW7-0rf_.js +0 -53
- package/dist/index-Da7J83jM.js +0 -2706
- package/dist/index-Di1Z4vLS.js +0 -27550
- package/dist/index-FoKZGh7Z.js +0 -67
- package/dist/index-N25Px7RQ.js +0 -72
- package/dist/index-PgblELTo.js +0 -897
- package/dist/index-STBMTK1u.js +0 -28900
- package/dist/index-hP3Mgc0u.js +0 -55
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-DV56jzfJ.js +0 -3069
- package/dist/loading-D__sDcq1.js +0 -72
- package/dist/lodash-DgkDIHoV.js +0 -3678
- package/dist/membership-CBjt1MGx.js +0 -255
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-BFUbPKDM.js +0 -15
- package/dist/number-CJb8OUa3.js +0 -12
- package/dist/object-BYyQ0PZp.js +0 -18
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-BMUFNR9T.js +0 -145
- package/dist/plugins-D95ZeD-9.js +0 -1788
- package/dist/remy-Qz_pNsUS.js +0 -13
- package/dist/reward-CSfV_XFK.js +0 -36
- package/dist/rule-DIzVHy2z.js +0 -1969
- package/dist/rule-builder-DF7fCvec.js +0 -126
- package/dist/string-Gcy5IM_H.js +0 -32
- package/dist/style.css +0 -4
- package/dist/template-r3lAQP1B.js +0 -188
- package/dist/tier-BJDhpH6X.js +0 -4
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-D40qRUoz.js +0 -20
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/transaction.fn-DV-cpfOj.js +0 -64
- package/dist/trigger-BEJaSv5R.js +0 -213
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/useMarketingMaterialActions-Bd5BDfE1.js +0 -96
- package/dist/usePagination-DLIo76-X.js +0 -220
- package/dist/user-DtEjuhyM.js +0 -55
- package/dist/vue-i18n-dQ1XCaUv.js +0 -2365
- package/dist/xlsx-BUMZsTov.js +0 -15491
- package/dist/zod-B_pVZhsV.js +0 -91
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { defineComponent as J, ref as y, computed as z, onMounted as K, resolveComponent as A, openBlock as u, createElementBlock as b, createElementVNode as s, createVNode as d, createTextVNode as W, toDisplayString as v, unref as e, withCtx as k, createBlock as B, Fragment as Y, renderList as Z, createCommentVNode as N, isRef as ee } from "vue";
|
|
2
|
-
import { u as te } from "./loading-D__sDcq1.js";
|
|
3
|
-
import { u as ne } from "./app-wDQR6dpb.js";
|
|
4
|
-
import { u as se } from "./business-BwtQpfUr.js";
|
|
5
|
-
import { u as oe } from "./membership-CBjt1MGx.js";
|
|
6
|
-
import "./index-Di1Z4vLS.js";
|
|
7
|
-
import { b as ae } from "./index-PgblELTo.js";
|
|
8
|
-
import "./index-BccUpf0U.js";
|
|
9
|
-
import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-BBK-UrEe.js";
|
|
10
|
-
import { f as D, p as ie } from "./plugins-D95ZeD-9.js";
|
|
11
|
-
import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-UZYzUcif.js";
|
|
12
|
-
import { u as ce } from "./vue-i18n-dQ1XCaUv.js";
|
|
13
|
-
import { useRouter as de } from "vue-router";
|
|
14
|
-
import { m as me } from "./index-CTTGf4TM.js";
|
|
15
|
-
import { R as ue } from "./app-Bt8HrAEr.js";
|
|
16
|
-
import { a as ve } from "./object-BYyQ0PZp.js";
|
|
17
|
-
const pe = { class: "min-h-screen bg-fm-color-neutral-gray-50" }, fe = { class: "bg-white border-b border-fm-color-neutral-gray-100 sticky top-0 z-10" }, ge = { class: "px-24 py-16 flex items-center justify-between" }, _e = { class: "flex items-center gap-16" }, he = { class: "fm-typo-en-title-md-800 flex items-center gap-8" }, ye = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, be = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "px-24 py-24"
|
|
20
|
-
}, we = { class: "flex items-center gap-24 mb-24" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Se = { class: "fm-typo-en-body-lg-600" }, ke = { class: "fm-typo-en-title-sm-800 mb-8" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-16" }, Ce = {
|
|
21
|
-
key: 1,
|
|
22
|
-
class: "grid grid-cols-5 gap-16 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2"
|
|
23
|
-
}, Fe = { class: "absolute top-8 right-8 z-10" }, je = { class: "aspect-[3/4] bg-fm-color-neutral-gray-100" }, Le = ["src"], Me = ["src", "alt"], Ve = {
|
|
24
|
-
key: 2,
|
|
25
|
-
class: "w-full h-full flex items-center justify-center text-fm-color-typo-disabled"
|
|
26
|
-
}, $e = { class: "w-48 h-48 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center mb-8" }, Be = { class: "fm-typo-en-body-md-600 mb-4" }, Ie = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary" }, Pe = { class: "space-y-[40px]" }, Ee = { class: "flex" }, Te = { class: "flex flex-wrap" }, ze = { class: "flex items-center gap-8" }, I = 20, nt = /* @__PURE__ */ J({
|
|
27
|
-
__name: "SettingAdvertisements",
|
|
28
|
-
setup(Ne) {
|
|
29
|
-
const U = de(), C = ne(), M = se(), F = oe(), { global: Q, minor: R } = te, { t: o } = ce(), c = y(), f = y([]), _ = y([]), w = y(!1), g = y(null), j = y(null), L = y(null), V = z(() => {
|
|
30
|
-
var n, t;
|
|
31
|
-
return ((t = (n = c.value) == null ? void 0 : n.advertisements) == null ? void 0 : t.length) ?? 0;
|
|
32
|
-
}), P = z(() => V.value < I);
|
|
33
|
-
function x(n) {
|
|
34
|
-
var a, p;
|
|
35
|
-
const t = (p = (a = c.value) == null ? void 0 : a.advertisements) == null ? void 0 : p[n];
|
|
36
|
-
if (t)
|
|
37
|
-
return typeof t == "string" ? t : t.url;
|
|
38
|
-
}
|
|
39
|
-
function O(n) {
|
|
40
|
-
return n ? [".mp4", ".webm", ".ogg", ".mov"].some((a) => n.toLowerCase().includes(a)) : !1;
|
|
41
|
-
}
|
|
42
|
-
async function $() {
|
|
43
|
-
await R(
|
|
44
|
-
async () => {
|
|
45
|
-
const n = ve(c.value), t = ae.parse(n), a = Date.now(), p = (m) => `${a}-${m}-${Math.random().toString(36).substring(2, 15)}`, S = await Promise.all(
|
|
46
|
-
f.value.map(async (m, h) => {
|
|
47
|
-
var r;
|
|
48
|
-
const i = (r = t.advertisements) == null ? void 0 : r[h];
|
|
49
|
-
let l;
|
|
50
|
-
return m ? l = await D.update(
|
|
51
|
-
D.advertisementPath(h, m),
|
|
52
|
-
m
|
|
53
|
-
) : typeof i == "string" ? l = i : i && typeof i == "object" && (l = i.url), l ? {
|
|
54
|
-
_id: typeof i == "object" && (i == null ? void 0 : i._id) || p(h),
|
|
55
|
-
url: l,
|
|
56
|
-
targetLocation: _.value[h] || null,
|
|
57
|
-
order: h
|
|
58
|
-
} : null;
|
|
59
|
-
})
|
|
60
|
-
);
|
|
61
|
-
t.advertisements = S.filter((m) => m), await me.update(t), await F.readMembership(), c.value = F.membership;
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
message: o("connect.advertisements.saving"),
|
|
65
|
-
successMessage: o("connect.advertisements.savedSuccessfully")
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
function E(n) {
|
|
70
|
-
g.value = n, j.value = f.value[n], L.value = _.value[n], w.value = !0;
|
|
71
|
-
}
|
|
72
|
-
function q() {
|
|
73
|
-
if (!P.value) return;
|
|
74
|
-
const n = f.value.length;
|
|
75
|
-
f.value.push(null), _.value.push(null), E(n);
|
|
76
|
-
}
|
|
77
|
-
async function G() {
|
|
78
|
-
g.value !== null && (f.value[g.value] = j.value, _.value[g.value] = L.value, await $(), w.value = !1);
|
|
79
|
-
}
|
|
80
|
-
async function H(n, t) {
|
|
81
|
-
var a, p;
|
|
82
|
-
n.stopPropagation(), await ie.remove(
|
|
83
|
-
o("connect.setting.advertisement.deleteConfirm"),
|
|
84
|
-
o("connect.setting.advertisement.delete"),
|
|
85
|
-
o("connect.setting.advertisement.delete")
|
|
86
|
-
) && ((p = (a = c.value) == null ? void 0 : a.advertisements) == null || p.splice(t, 1), f.value.splice(t, 1), _.value.splice(t, 1), await $());
|
|
87
|
-
}
|
|
88
|
-
function X() {
|
|
89
|
-
U.push({ name: ue["$connect-SETTING"] });
|
|
90
|
-
}
|
|
91
|
-
return K(async () => {
|
|
92
|
-
await Q(async () => {
|
|
93
|
-
var n, t;
|
|
94
|
-
await M.readPremium(), await M.readLocations(), await F.readMembership(), c.value = F.membership, (t = (n = c.value) == null ? void 0 : n.advertisements) != null && t.length ? (f.value = c.value.advertisements.map(() => null), _.value = c.value.advertisements.map(
|
|
95
|
-
(a) => typeof a == "string" ? null : a.targetLocation || null
|
|
96
|
-
)) : (f.value = [], _.value = []);
|
|
97
|
-
});
|
|
98
|
-
}), (n, t) => {
|
|
99
|
-
var i;
|
|
100
|
-
const a = A("FmButton"), p = A("FmPill"), S = A("FmCard"), m = A("FmIcon"), h = A("FmSideSheet");
|
|
101
|
-
return u(), b("div", pe, [
|
|
102
|
-
s("div", fe, [
|
|
103
|
-
s("div", ge, [
|
|
104
|
-
s("div", _e, [
|
|
105
|
-
d(a, {
|
|
106
|
-
icon: "arrow_back",
|
|
107
|
-
variant: "tertiary",
|
|
108
|
-
onClick: X
|
|
109
|
-
}),
|
|
110
|
-
s("div", null, [
|
|
111
|
-
s("div", he, [
|
|
112
|
-
W(v(e(o)("connect.setting.advertisement.title")) + " ", 1),
|
|
113
|
-
d(p, { variant: "premium" })
|
|
114
|
-
]),
|
|
115
|
-
s("div", ye, v(e(o)("connect.setting.advertisement.subtitle")), 1)
|
|
116
|
-
])
|
|
117
|
-
]),
|
|
118
|
-
d(a, {
|
|
119
|
-
label: e(o)("connect.setting.advertisement.saveChanges"),
|
|
120
|
-
onClick: $,
|
|
121
|
-
disabled: !!e(C).loadingQueue.length,
|
|
122
|
-
loading: !!e(C).loadingQueue.length
|
|
123
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
124
|
-
])
|
|
125
|
-
]),
|
|
126
|
-
e(c) ? (u(), b("div", be, [
|
|
127
|
-
s("div", we, [
|
|
128
|
-
d(S, {
|
|
129
|
-
variant: "outlined",
|
|
130
|
-
class: "px-16 py-12 flex items-center gap-8"
|
|
131
|
-
}, {
|
|
132
|
-
default: k(() => [
|
|
133
|
-
s("span", xe, v(e(o)("connect.setting.advertisement.activeAds")), 1),
|
|
134
|
-
s("span", Se, v(e(V)) + " / " + v(I), 1)
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
]),
|
|
139
|
-
e(M).isPremium ? (u(), b("div", Ce, [
|
|
140
|
-
(u(!0), b(Y, null, Z(((i = e(c).advertisements) == null ? void 0 : i.length) || 0, (l, r) => (u(), B(S, {
|
|
141
|
-
key: r,
|
|
142
|
-
variant: "outlined",
|
|
143
|
-
class: "cursor-pointer hover:shadow-lg transition-shadow overflow-hidden relative",
|
|
144
|
-
onClick: (T) => E(r)
|
|
145
|
-
}, {
|
|
146
|
-
default: k(() => [
|
|
147
|
-
s("div", Fe, [
|
|
148
|
-
d(a, {
|
|
149
|
-
icon: "delete",
|
|
150
|
-
variant: "tertiary",
|
|
151
|
-
size: "sm",
|
|
152
|
-
class: "bg-white/90 hover:bg-white shadow-sm",
|
|
153
|
-
onClick: (T) => H(T, r)
|
|
154
|
-
}, null, 8, ["onClick"])
|
|
155
|
-
]),
|
|
156
|
-
s("div", je, [
|
|
157
|
-
x(r) && O(x(r)) ? (u(), b("video", {
|
|
158
|
-
key: 0,
|
|
159
|
-
src: x(r),
|
|
160
|
-
class: "w-full h-full object-cover",
|
|
161
|
-
muted: "",
|
|
162
|
-
loop: "",
|
|
163
|
-
autoplay: "",
|
|
164
|
-
playsinline: ""
|
|
165
|
-
}, null, 8, Le)) : x(r) ? (u(), b("img", {
|
|
166
|
-
key: 1,
|
|
167
|
-
src: x(r),
|
|
168
|
-
class: "w-full h-full object-cover",
|
|
169
|
-
alt: `Ad ${r + 1}`
|
|
170
|
-
}, null, 8, Me)) : (u(), b("div", Ve, [
|
|
171
|
-
d(m, {
|
|
172
|
-
name: "image",
|
|
173
|
-
size: "48"
|
|
174
|
-
})
|
|
175
|
-
]))
|
|
176
|
-
])
|
|
177
|
-
]),
|
|
178
|
-
_: 2
|
|
179
|
-
}, 1032, ["onClick"]))), 128)),
|
|
180
|
-
e(P) ? (u(), B(S, {
|
|
181
|
-
key: 0,
|
|
182
|
-
variant: "outlined",
|
|
183
|
-
class: "cursor-pointer hover:bg-fm-color-neutral-gray-50 transition-colors border-dashed aspect-[3/4] flex flex-col items-center justify-center",
|
|
184
|
-
onClick: q
|
|
185
|
-
}, {
|
|
186
|
-
default: k(() => [
|
|
187
|
-
s("div", $e, [
|
|
188
|
-
d(m, {
|
|
189
|
-
name: "add",
|
|
190
|
-
size: "24",
|
|
191
|
-
class: "text-fm-color-typo-secondary"
|
|
192
|
-
})
|
|
193
|
-
]),
|
|
194
|
-
s("div", Be, v(e(o)("connect.setting.advertisement.addAd")), 1),
|
|
195
|
-
s("div", Ie, v(I - e(V)) + " " + v(e(o)("connect.setting.advertisement.left")), 1)
|
|
196
|
-
]),
|
|
197
|
-
_: 1
|
|
198
|
-
})) : N("", !0)
|
|
199
|
-
])) : (u(), B(S, {
|
|
200
|
-
key: 0,
|
|
201
|
-
variant: "outlined",
|
|
202
|
-
class: "p-24 text-center mb-24 bg-fm-color-warning-50"
|
|
203
|
-
}, {
|
|
204
|
-
default: k(() => [
|
|
205
|
-
s("div", ke, v(e(o)("connect.setting.advertisement.premiumFeatureTitle")), 1),
|
|
206
|
-
s("div", Ae, v(e(o)("connect.setting.advertisement.premiumFeatureDescription")), 1)
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
}))
|
|
210
|
-
])) : N("", !0),
|
|
211
|
-
d(h, {
|
|
212
|
-
modelValue: e(w),
|
|
213
|
-
"onUpdate:modelValue": [
|
|
214
|
-
t[2] || (t[2] = (l) => ee(w) ? w.value = l : null),
|
|
215
|
-
t[3] || (t[3] = (l) => w.value = l)
|
|
216
|
-
],
|
|
217
|
-
"max-width": 560,
|
|
218
|
-
header: e(g) !== null ? `${e(o)("connect.setting.advertisement.manageAd")} #${e(g) + 1}` : e(o)("connect.setting.advertisement.addAdvertisement")
|
|
219
|
-
}, {
|
|
220
|
-
"side-sheet-footer": k(() => [
|
|
221
|
-
s("div", ze, [
|
|
222
|
-
d(a, {
|
|
223
|
-
label: e(o)("connect.setting.advertisement.save"),
|
|
224
|
-
onClick: G,
|
|
225
|
-
loading: !!e(C).loadingQueue.length,
|
|
226
|
-
disabled: !!e(C).loadingQueue.length
|
|
227
|
-
}, null, 8, ["label", "loading", "disabled"])
|
|
228
|
-
])
|
|
229
|
-
]),
|
|
230
|
-
default: k(() => [
|
|
231
|
-
s("div", Pe, [
|
|
232
|
-
s("div", Ee, [
|
|
233
|
-
s("div", Te, [
|
|
234
|
-
d(le, {
|
|
235
|
-
label: e(o)("connect.setting.advertisement.advertisementImage"),
|
|
236
|
-
"image-fit": "cover",
|
|
237
|
-
"aspect-ratio": "4/5",
|
|
238
|
-
thumbnail: e(g) !== null ? x(e(g)) : void 0,
|
|
239
|
-
accept: ".png, .jpg, .jpeg, .mp4, .gif",
|
|
240
|
-
"recommended-size": "1080px x 1350px (4:5)",
|
|
241
|
-
file: e(j) ?? void 0,
|
|
242
|
-
"onUpdate:file": t[0] || (t[0] = (l) => j.value = l)
|
|
243
|
-
}, null, 8, ["label", "thumbnail", "file"])
|
|
244
|
-
])
|
|
245
|
-
]),
|
|
246
|
-
s("div", null, [
|
|
247
|
-
d(re, {
|
|
248
|
-
label: e(o)("connect.setting.advertisement.targetLocations"),
|
|
249
|
-
"helper-text": e(o)("connect.setting.advertisement.targetLocationsHelper"),
|
|
250
|
-
"model-value": e(L) ?? null,
|
|
251
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => L.value = l)
|
|
252
|
-
}, null, 8, ["label", "helper-text", "model-value"])
|
|
253
|
-
])
|
|
254
|
-
])
|
|
255
|
-
]),
|
|
256
|
-
_: 1
|
|
257
|
-
}, 8, ["modelValue", "header"])
|
|
258
|
-
]);
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
export {
|
|
263
|
-
nt as default
|
|
264
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, useSlots as U, openBlock as r, createElementBlock as l, createElementVNode as s, normalizeClass as $, unref as e, toDisplayString as y, createCommentVNode as m, Fragment as b, createBlock as E, createVNode as w, renderSlot as T, ref as x, computed as B, onMounted as G, withCtx as O, renderList as C, createStaticVNode as z } from "vue";
|
|
2
|
-
import { u as A } from "./loading-D__sDcq1.js";
|
|
3
|
-
import { u as M } from "./business-BwtQpfUr.js";
|
|
4
|
-
import { components as f, useSnackbar as W } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as R } from "./vue-i18n-dQ1XCaUv.js";
|
|
6
|
-
import { g as j } from "./google-C3S8u0mT.js";
|
|
7
|
-
import { R as D } from "./app-Bt8HrAEr.js";
|
|
8
|
-
import { useRouter as H } from "vue-router";
|
|
9
|
-
import { r as h } from "./index-N25Px7RQ.js";
|
|
10
|
-
const P = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, q = ["src"], J = { class: "flex flex-col flex-1 gap-1 min-w-0" }, K = { class: "fm-typo-en-body-md-600 capitalize" }, Q = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
|
|
13
|
-
}, X = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, Y = /* @__PURE__ */ N({
|
|
14
|
-
__name: "ReviewSource",
|
|
15
|
-
props: {
|
|
16
|
-
icon: {},
|
|
17
|
-
name: {},
|
|
18
|
-
connected: { type: Boolean },
|
|
19
|
-
subtitle: {},
|
|
20
|
-
syncing: { type: Boolean },
|
|
21
|
-
tokenExpired: { type: Boolean }
|
|
22
|
-
},
|
|
23
|
-
emits: ["connect", "sync"],
|
|
24
|
-
setup(o, { emit: p }) {
|
|
25
|
-
const u = p, { t: i } = R(), g = U();
|
|
26
|
-
return (c, a) => (r(), l("div", P, [
|
|
27
|
-
s("div", {
|
|
28
|
-
class: $(["flex items-center gap-12 p-16", e(g).default ? "border-b border-fm-color-neutral-gray-100" : ""])
|
|
29
|
-
}, [
|
|
30
|
-
s("img", {
|
|
31
|
-
src: o.icon,
|
|
32
|
-
class: "w-10 h-10 shrink-0"
|
|
33
|
-
}, null, 8, q),
|
|
34
|
-
s("div", J, [
|
|
35
|
-
s("span", K, y(o.name), 1),
|
|
36
|
-
o.subtitle || !o.connected ? (r(), l("span", Q, y(o.connected ? o.subtitle : e(i)("connect.review.notConnected")), 1)) : m("", !0)
|
|
37
|
-
]),
|
|
38
|
-
o.connected ? (r(), l(b, { key: 0 }, [
|
|
39
|
-
o.tokenExpired ? (r(), E(e(f).FmChip, {
|
|
40
|
-
key: 0,
|
|
41
|
-
label: e(i)("connect.review.expired"),
|
|
42
|
-
variant: "critical"
|
|
43
|
-
}, null, 8, ["label"])) : m("", !0),
|
|
44
|
-
w(e(f).FmButton, {
|
|
45
|
-
variant: "secondary",
|
|
46
|
-
"prepend-icon": "refresh",
|
|
47
|
-
label: e(i)("connect.review.reconnect"),
|
|
48
|
-
onClick: a[0] || (a[0] = (v) => u("connect"))
|
|
49
|
-
}, null, 8, ["label"]),
|
|
50
|
-
o.tokenExpired ? m("", !0) : (r(), E(e(f).FmButton, {
|
|
51
|
-
key: 1,
|
|
52
|
-
variant: "primary",
|
|
53
|
-
"prepend-icon": "sync",
|
|
54
|
-
label: e(i)("connect.review.sync"),
|
|
55
|
-
loading: o.syncing,
|
|
56
|
-
onClick: a[1] || (a[1] = (v) => u("sync"))
|
|
57
|
-
}, null, 8, ["label", "loading"]))
|
|
58
|
-
], 64)) : m("", !0)
|
|
59
|
-
], 2),
|
|
60
|
-
o.connected ? m("", !0) : (r(), l("div", {
|
|
61
|
-
key: 0,
|
|
62
|
-
class: $(["flex items-center justify-between gap-12 p-16", e(g).default ? "border-b border-fm-color-neutral-gray-100" : ""])
|
|
63
|
-
}, [
|
|
64
|
-
s("span", X, y(e(i)("connect.review.connectHint", { name: o.name })), 1),
|
|
65
|
-
w(e(f).FmButton, {
|
|
66
|
-
"prepend-icon": "add",
|
|
67
|
-
label: e(i)("connect.review.connect"),
|
|
68
|
-
onClick: a[2] || (a[2] = (v) => u("connect"))
|
|
69
|
-
}, null, 8, ["label"])
|
|
70
|
-
], 2)),
|
|
71
|
-
T(c.$slots, "default")
|
|
72
|
-
]));
|
|
73
|
-
}
|
|
74
|
-
}), Z = { class: "p-24 flex flex-col gap-8" }, ee = { class: "flex flex-col flex-1 min-w-0" }, ne = { class: "fm-typo-en-body-lg-600 truncate" }, oe = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, me = /* @__PURE__ */ N({
|
|
75
|
-
__name: "Settings",
|
|
76
|
-
setup(o) {
|
|
77
|
-
const { t: p } = R(), u = W(), i = H(), g = M(), c = x(null), a = x(!1);
|
|
78
|
-
x(!1);
|
|
79
|
-
const v = B(
|
|
80
|
-
() => {
|
|
81
|
-
var n;
|
|
82
|
-
return c.value ? ((n = c.value.google) == null ? void 0 : n.accessToken) === null : !1;
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
B(
|
|
86
|
-
() => {
|
|
87
|
-
var n;
|
|
88
|
-
return c.value ? ((n = c.value.facebook) == null ? void 0 : n.token) === null : !1;
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
function _(n) {
|
|
92
|
-
const t = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
|
|
93
|
-
return `${window.location.origin}${t}${n}`;
|
|
94
|
-
}
|
|
95
|
-
async function S() {
|
|
96
|
-
await A.minor(async () => {
|
|
97
|
-
c.value = await h.getSource();
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function V(n) {
|
|
101
|
-
var t;
|
|
102
|
-
return (t = g.locations.find(
|
|
103
|
-
(d) => d._id.toString() === n
|
|
104
|
-
)) == null ? void 0 : t.name;
|
|
105
|
-
}
|
|
106
|
-
function F() {
|
|
107
|
-
u.open({
|
|
108
|
-
message: p("connect.review.syncSuccess"),
|
|
109
|
-
type: "success"
|
|
110
|
-
}), i.push({ name: D["$connect-REVIEW_OVERVIEW"] });
|
|
111
|
-
}
|
|
112
|
-
async function I() {
|
|
113
|
-
var n, t;
|
|
114
|
-
a.value = !0;
|
|
115
|
-
try {
|
|
116
|
-
await h.syncGoogleReviews(), F();
|
|
117
|
-
} catch (d) {
|
|
118
|
-
if (await S(), ((t = (n = c.value) == null ? void 0 : n.google) == null ? void 0 : t.accessToken) === null) {
|
|
119
|
-
u.open({
|
|
120
|
-
message: p("connect.review.tokenExpired"),
|
|
121
|
-
type: "error"
|
|
122
|
-
});
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
throw d;
|
|
126
|
-
} finally {
|
|
127
|
-
a.value = !1;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
async function L() {
|
|
131
|
-
const n = _("/review/google/callback"), { callbackUrl: t } = await h.getOauthUrl("google", n);
|
|
132
|
-
window.location.href = t;
|
|
133
|
-
}
|
|
134
|
-
return G(() => {
|
|
135
|
-
S(), g.readLocations();
|
|
136
|
-
}), (n, t) => (r(), l("div", Z, [
|
|
137
|
-
e(c) ? (r(), l(b, { key: 0 }, [
|
|
138
|
-
w(Y, {
|
|
139
|
-
icon: e(j),
|
|
140
|
-
name: "google",
|
|
141
|
-
connected: !!e(c).google,
|
|
142
|
-
syncing: e(a),
|
|
143
|
-
"token-expired": e(v),
|
|
144
|
-
onConnect: L,
|
|
145
|
-
onSync: I
|
|
146
|
-
}, {
|
|
147
|
-
default: O(() => {
|
|
148
|
-
var d;
|
|
149
|
-
return [
|
|
150
|
-
(r(!0), l(b, null, C((d = e(c).google) == null ? void 0 : d.locations, (k) => (r(), l("div", {
|
|
151
|
-
key: k.googleLocationName,
|
|
152
|
-
class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
153
|
-
}, [
|
|
154
|
-
w(e(f).FmIcon, {
|
|
155
|
-
name: "location_on",
|
|
156
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
157
|
-
}),
|
|
158
|
-
s("div", ee, [
|
|
159
|
-
s("span", ne, y(k.displayName), 1),
|
|
160
|
-
s("span", oe, y(V(k.locationId)), 1)
|
|
161
|
-
])
|
|
162
|
-
]))), 128))
|
|
163
|
-
];
|
|
164
|
-
}),
|
|
165
|
-
_: 1
|
|
166
|
-
}, 8, ["icon", "connected", "syncing", "token-expired"]),
|
|
167
|
-
m("", !0)
|
|
168
|
-
], 64)) : (r(), l(b, { key: 1 }, C(["google", "facebook"], (d) => s("div", {
|
|
169
|
-
key: d,
|
|
170
|
-
class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
|
|
171
|
-
}, [...t[0] || (t[0] = [
|
|
172
|
-
z('<div class="animate-pulse flex items-center gap-12"><div class="w-10 h-10 rounded-full bg-fm-color-neutral-gray-100 shrink-0"></div><div class="flex-1 min-w-0 space-y-8"><div class="h-16 w-20 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full max-w-[160px] rounded bg-fm-color-neutral-gray-100"></div></div><div class="h-32 w-24 rounded bg-fm-color-neutral-gray-100 shrink-0"></div></div>', 1)
|
|
173
|
-
])])), 64))
|
|
174
|
-
]));
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
export {
|
|
178
|
-
me as default
|
|
179
|
-
};
|