@feedmepos/mf-connect 0.1.122-dev → 0.1.122-prod
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/dist/{App-Otfhp3H1.js → App-BKnL7b6M.js} +493 -502
- package/dist/{Bin-B5aee7-4.js → Bin-BqqQF1h_.js} +8 -8
- package/dist/{Broadcast-BAQl4nEs.js → Broadcast-U5rJmhdd.js} +21 -22
- package/dist/{CampaignAnalytic-mc0rWnt4.js → CampaignAnalytic-ClwXxxzE.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C06IzthB.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DyeoWFcd.js} +9 -8
- package/dist/{Card-CoeclAye.js → Card-DKikDYES.js} +22 -22
- package/dist/{Collections-DIamDQDK.js → Collections-CD0xjFqI.js} +185 -197
- package/dist/{Credit-CoIPdhRy.js → Credit-BWcvFlb2.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-nI2oXZiR.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B2RizWP8.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D38JB0FV.js +3493 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BZ42IxXy.js → EffectSheet.vue_vue_type_style_index_0_lang-Hr10pgqD.js} +16 -16
- package/dist/{Experience-bJSkl9Xm.js → Experience-dqXYj1Fv.js} +31 -32
- package/dist/{FileSaver.min-CFKCOdNt.js → FileSaver.min-DdJMn696.js} +1 -1
- package/dist/{Game-DMoyicRl.js → Game-BGQXqzck.js} +18 -19
- package/dist/{GiftCardSetup-B28jebxX.js → GiftCardSetup-C3MR25fp.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-il1_TmfZ.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-9dL1kVPG.js} +7 -7
- package/dist/{Goals-B9XRX-to.js → Goals-DA2jHEZa.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZH5In2V.js → ImageInput.vue_vue_type_script_setup_true_lang-_rlsNocb.js} +1 -1
- package/dist/{Index-BgGZBhf8.js → Index-WOvryalE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-M6eRk_nC.js → LocationPicker.vue_vue_type_script_setup_true_lang-Bu1DjV9M.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DQCpH8dV.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DiLtSIXt.js} +1 -1
- package/dist/{LoyaltyDashboard-B-vMpAdx.js → LoyaltyDashboard-BKN2vBqc.js} +15 -15
- package/dist/{MainLayout-rv2xd7Yc.js → MainLayout-DizL-dxl.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-BMwNt98l.js → MainLayout.vue_vue_type_script_setup_true_lang-El0YeLnE.js} +3 -3
- package/dist/{Marketing-Wu2M2xPV.js → Marketing-B77EoiCf.js} +4 -4
- package/dist/{MarketingMaterialEdit-C5s0grZF.js → MarketingMaterialEdit-C_qFEur7.js} +211 -214
- package/dist/{Member-D02_98Yo.js → Member-TYDrU3Tk.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DGVDww0P.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BuzMeXR9.js} +47 -39
- package/dist/{MemberImportHistory-ZqjppSHQ.js → MemberImportHistory-l7dVJdEH.js} +7 -7
- package/dist/{MemberList-DpWX6mT9.js → MemberList-DiuyeJx_.js} +105 -103
- package/dist/{MemberTransactions-BiE7FtKT.js → MemberTransactions-BJ27Gd5P.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DUtNRTNB.js → MessageInput.vue_vue_type_script_setup_true_lang-so7LWtlv.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DD5GkLoA.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DgE7HPsT.js} +1 -1
- package/dist/{Mission-D3uyaxrt.js → Mission-C63hh8Ra.js} +21 -22
- package/dist/{Overview-C80up9Cz.js → Overview-CVdvQK6q.js} +20 -20
- package/dist/{Overview-Dzs2l9dt.js → Overview-DP-4Kpuj.js} +144 -145
- package/dist/{Point-CtyqLefg.js → Point-DXH4kJNQ.js} +21 -22
- package/dist/{Promotion-C1pB_Mup.js → Promotion-Cn-wAx6m.js} +131 -137
- package/dist/{Queue-DkmBLRMM.js → Queue-CEEUE-UT.js} +45 -45
- package/dist/{Record-B5onEmZr.js → Record-BFIjLKJD.js} +9 -9
- package/dist/{Review-fkpAgnWl.js → Review-BMRfKri0.js} +2 -2
- package/dist/ReviewFacebookCallback-CPYIC3RS.js +238 -0
- package/dist/{ReviewGoogleCallback-Cj9zmCme.js → ReviewGoogleCallback-Cflqv5Z5.js} +5 -5
- package/dist/{Reward-BNt4rJXG.js → Reward-C-qGtzpu.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJbD7izQ.js → RewardGroup.vue_vue_type_script_setup_true_lang-kxJ5i8xe.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BlRmshrE.js +1884 -0
- package/dist/{Segment-9weq5m6d.js → Segment-Bx1pfw4Q.js} +306 -303
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-j_DlD4Uz.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-vuH9xdOi.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bq1XKmWl.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CZHpyimI.js} +4 -4
- package/dist/Setting-CEcpuE_O.js +578 -0
- package/dist/{SettingAdvertisements-BdXfSnNM.js → SettingAdvertisements-CZlIQ5m_.js} +12 -12
- package/dist/Settings-CPLibjQy.js +179 -0
- package/dist/{Store-D3cAsGJ6.js → Store-BhZulzuc.js} +28 -28
- package/dist/{StoreRewards-C2y1M4Ps.js → StoreRewards-CvYgJVFU.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dqj5zIgi.js +1297 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang--Ii9ejFG.js +142 -0
- package/dist/{Tier-Dci8VbpH.js → Tier-BPPSaEe0.js} +687 -2575
- package/dist/{Title-D4BpqJPQ.js → Title-CccRUVZV.js} +94 -95
- package/dist/{Transaction-1biUZvIt.js → Transaction-ULzAt-u7.js} +2 -2
- package/dist/Upselling-D2tSUTkE.js +200 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D7W1cxlp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CoqrSuWu.js} +26 -26
- package/dist/{Voucher-DSygKr_u.js → Voucher-Cz7IMRNl.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-JL1V_LbU.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BaxHZN76.js} +12 -12
- package/dist/{WhatsappAccount-CZ-js350.js → WhatsappAccount-BsxVHiZZ.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DBiqtHgs.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DJnkGMF1.js} +1 -1
- package/dist/{WhatsappBot-Bygdlech.js → WhatsappBot-sd6erVZk.js} +6 -6
- package/dist/{WhatsappBotLogs-BFLRYeQf.js → WhatsappBotLogs-DNbGWyOY.js} +6 -6
- package/dist/{WhatsappBotSettings-COZEGQxT.js → WhatsappBotSettings-DXa_e7-a.js} +4 -4
- package/dist/{WhatsappLayout-DEzbS1SP.js → WhatsappLayout-DvBPIB5f.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DUX8zJnw.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CRDouGvj.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BJFYIRZl.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6BvSACt.js} +2 -2
- package/dist/{app-gGao9t7Z.js → app-4x06ItoL.js} +15017 -14861
- package/dist/app.js +3 -4
- package/dist/{base.export-cVWgL6vy.js → base.export-DS0xThWi.js} +2 -2
- package/dist/{business-DbDh-BxN.js → business-D0I7G-5H.js} +1 -1
- package/dist/{campaign-B9tq1vZv.js → campaign-BuJCjEH-.js} +94 -121
- package/dist/{campaign-D8jV7hA8.js → campaign-CC9U7rkr.js} +28 -34
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-CLUOgMgc.js +776 -0
- package/dist/{collection.fn-DBfMa_P2.js → collection.fn-CUifllLR.js} +2 -2
- package/dist/{currency-SZSbDgAr.js → currency-BPhBDOpt.js} +1 -1
- package/dist/{effect-CVTuOMbk.js → effect-DKHOR-B3.js} +1 -1
- package/dist/{email-addresses-DpVS_e0D.js → email-addresses-B-VEReRV.js} +25 -25
- package/dist/{feature-flag-orm4I4-0.js → feature-flag-Cjl6gaO5.js} +185 -171
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-Ct1_-IEp.js → helper-CBLh1PWR.js} +1 -1
- package/dist/{index-Clg5CVmr.js → index-BBsqcXfJ.js} +1 -1
- package/dist/{index-NN_GXe7Q.js → index-B_iKSOXp.js} +1 -1
- package/dist/{index-BeGbQvrb.js → index-BwgjSrwa.js} +2 -2
- package/dist/{index-DW5cDL7l.js → index-BzKKNuLc.js} +2 -2
- package/dist/{index-Bz2GhZNd.js → index-C1QA2M4I.js} +10 -10
- package/dist/{index-uIOAK7Yt.js → index-CGcWs8B5.js} +462 -533
- package/dist/{index-CrluLS6Q.js → index-CWJi_hw-.js} +2 -2
- package/dist/{index-BUDFQtMG.js → index-D3B392A3.js} +3 -3
- package/dist/{index-CONIxgEK.js → index-DL_UYO4J.js} +234 -380
- package/dist/{index-B6hbCvzb.js → index-DenQ8DV4.js} +1 -1
- package/dist/{index-BOoNJIJh.js → index-Djf4TpYV.js} +23 -23
- package/dist/{index-DBpHsVZR.js → index-EpqQFMu2.js} +2614 -2699
- package/dist/{index-MlhU8ucu.js → index-Ob5I-Sex.js} +1 -1
- package/dist/{index-BXXLVdgj.js → index-RMsQnHez.js} +1 -1
- package/dist/{index-COAgKj0v.js → index-ZTC5k9Jb.js} +6 -19
- package/dist/{index-B2GJ653R.js → index-bc7bIIVP.js} +197 -197
- package/dist/{index-DFePTLAw.js → index-kClA31M9.js} +10 -10
- package/dist/{index-vfdh50L9.js → index-nnmfOPuw.js} +4 -4
- package/dist/{index-DCuUA8EI.js → index-umYXnOWc.js} +251 -608
- package/dist/{index-DwofBI5n.js → index-vqUiCeKb.js} +1 -1
- package/dist/{index.esm2017-ZSQn8C-d.js → index.esm2017-DMKkHR06.js} +111 -111
- package/dist/{loading-B-xDCOdo.js → loading-Cb4RgEo7.js} +1 -1
- package/dist/{lodash-DFW9UbwC.js → lodash-CMazTe9d.js} +1 -1
- package/dist/{member-import-J0fm9uzH.js → member-import-Df1y7FvX.js} +1 -1
- package/dist/{membership-B8KWhxBD.js → membership-yvDb2HS8.js} +2 -2
- package/dist/{money-CSIA5h2F.js → money-rs9shyUy.js} +1 -1
- package/dist/{number-mHKvdu_x.js → number-Ecq6MjRx.js} +1 -1
- package/dist/objectid-BVri-Vim.js +145 -0
- package/dist/{onboarding-CbvpduVK.js → onboarding-DugmLfNG.js} +36 -36
- package/dist/{onboardingSetup-pQHr4ATi.js → onboardingSetup-DMzNxJC4.js} +2 -2
- package/dist/{plugins-D_LhWxFb.js → plugins-CvhBJQEK.js} +3 -3
- package/dist/{reward-CFEIG_Fc.js → reward-BGUOUKZn.js} +1 -1
- package/dist/{rule-Dqxm0TiU.js → rule-C87YbT3F.js} +492 -572
- package/dist/rule-builder-lzMi7irV.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-BfFSbH04.js +275 -0
- package/dist/{timezone-CijbubTV.js → timezone-uP_heouv.js} +1 -1
- package/dist/{transaction.fn-Bg5w0js6.js → transaction.fn-CiGhIgzP.js} +2 -2
- package/dist/{trigger-Z2ynsa7k.js → trigger-dOOSh-Yp.js} +9 -9
- package/dist/{useMarketingMaterialActions-Dgm-u9Nu.js → useMarketingMaterialActions-BRenBblP.js} +4 -4
- package/dist/{usePagination-Dlw4BUF1.js → usePagination-DNOc8GFS.js} +1 -1
- package/dist/{user-BRNDlg4h.js → user-DTAGYy-F.js} +1 -1
- package/dist/vue-i18n-D8wuxuA4.js +2365 -0
- package/dist/{xlsx-CnlrcvXS.js → xlsx-BU0bDwTF.js} +1 -1
- package/dist/{zod-DPWT8J03.js → zod-mPFqdty8.js} +1 -1
- package/package.json +3 -7
- package/dist/AuditLogs-C4DQ624f.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CXNf6M-7.js +0 -4439
- package/dist/Grab-CNXLDEKx.js +0 -301
- package/dist/ReviewFacebookCallback-CLeQP52t.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-ie0okvmi.js +0 -1923
- package/dist/Setting-DadiBCUq.js +0 -574
- package/dist/Settings-SF-Ai88W.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DX8nrBZd.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CjBucvpJ.js +0 -7007
- package/dist/Upselling-BTqqiZlc.js +0 -1032
- package/dist/campaign.fn-DiQIanat.js +0 -776
- package/dist/duplicateCampaign-3K1VYqMD.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-BVNgDFLu.js +0 -145
- package/dist/template-BKPcMDwU.js +0 -227
- package/dist/vue-i18n-h2H0nxj-.js +0 -2365
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, useSlots as G, ref as F, watch as z, computed as b, openBlock as t, createElementBlock as s, createElementVNode as a, normalizeClass as N, unref as e, toDisplayString as d, Fragment as w, createBlock as U, createCommentVNode as C, createVNode as E, renderSlot as W, onMounted as q, withCtx as L, renderList as R, createStaticVNode as J } from "vue";
|
|
2
|
-
import { u as K } from "./loading-B-xDCOdo.js";
|
|
3
|
-
import { u as Q } from "./business-DbDh-BxN.js";
|
|
4
|
-
import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as O } from "./vue-i18n-h2H0nxj-.js";
|
|
6
|
-
import { h as A } from "./moment-D7p2TMB-.js";
|
|
7
|
-
import { g as Z, f as ee } from "./google-BQK68wbe.js";
|
|
8
|
-
import { R as ne } from "./app-gGao9t7Z.js";
|
|
9
|
-
import { useRouter as oe } from "vue-router";
|
|
10
|
-
import { r as $ } from "./index-DFePTLAw.js";
|
|
11
|
-
const te = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, ce = ["src"], ae = { class: "flex flex-col flex-1 gap-4 min-w-0" }, se = { class: "fm-typo-en-body-md-600 capitalize" }, re = { class: "truncate" }, le = { class: "truncate" }, ie = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "truncate"
|
|
14
|
-
}, ue = {
|
|
15
|
-
key: 2,
|
|
16
|
-
class: "truncate"
|
|
17
|
-
}, de = {
|
|
18
|
-
key: 1,
|
|
19
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
|
|
20
|
-
}, me = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, H = /* @__PURE__ */ M({
|
|
21
|
-
__name: "ReviewSource",
|
|
22
|
-
props: {
|
|
23
|
-
icon: {},
|
|
24
|
-
name: {},
|
|
25
|
-
connected: { type: Boolean },
|
|
26
|
-
subtitle: {},
|
|
27
|
-
syncing: { type: Boolean },
|
|
28
|
-
tokenExpired: { type: Boolean },
|
|
29
|
-
lastSyncTime: {}
|
|
30
|
-
},
|
|
31
|
-
emits: ["connect", "sync"],
|
|
32
|
-
setup(r, { emit: h }) {
|
|
33
|
-
const f = r, S = h, { t: l } = O(), c = G(), k = F(null);
|
|
34
|
-
z(
|
|
35
|
-
() => f.syncing,
|
|
36
|
-
(i) => {
|
|
37
|
-
i && (k.value = /* @__PURE__ */ new Date());
|
|
38
|
-
},
|
|
39
|
-
{ immediate: !0 }
|
|
40
|
-
);
|
|
41
|
-
const p = b(
|
|
42
|
-
() => f.lastSyncTime ? A(f.lastSyncTime) : null
|
|
43
|
-
), T = b(() => {
|
|
44
|
-
var i;
|
|
45
|
-
return ((i = p.value) == null ? void 0 : i.fromNow()) ?? "";
|
|
46
|
-
}), B = b(
|
|
47
|
-
() => {
|
|
48
|
-
var i;
|
|
49
|
-
return ((i = p.value) == null ? void 0 : i.format("D MMM YYYY, HH:mm")) ?? "";
|
|
50
|
-
}
|
|
51
|
-
), I = b(
|
|
52
|
-
() => A(k.value ?? void 0).format("HH:mm")
|
|
53
|
-
), u = b(() => f.syncing ? "syncing" : p.value ? "synced" : "never");
|
|
54
|
-
return (i, m) => (t(), s("div", te, [
|
|
55
|
-
a("div", {
|
|
56
|
-
class: N(["flex items-center gap-12 p-16", e(c).default ? "border-b border-fm-color-neutral-gray-100" : ""])
|
|
57
|
-
}, [
|
|
58
|
-
a("img", {
|
|
59
|
-
src: r.icon,
|
|
60
|
-
class: "w-10 h-10 shrink-0"
|
|
61
|
-
}, null, 8, ce),
|
|
62
|
-
a("div", ae, [
|
|
63
|
-
a("span", se, d(r.name), 1),
|
|
64
|
-
r.connected ? (t(), s("div", {
|
|
65
|
-
key: 0,
|
|
66
|
-
class: N(["flex items-center gap-8 fm-typo-en-body-sm-400 truncate", {
|
|
67
|
-
"text-fm-color-typo-secondary": u.value !== "syncing",
|
|
68
|
-
"text-fm-color-typo-warning": u.value === "syncing"
|
|
69
|
-
}])
|
|
70
|
-
}, [
|
|
71
|
-
a("span", {
|
|
72
|
-
class: N(["w-8 h-8 rounded-full shrink-0", {
|
|
73
|
-
"bg-fm-color-system-success-400": u.value === "synced",
|
|
74
|
-
"bg-fm-color-primary": u.value === "syncing",
|
|
75
|
-
"bg-fm-color-neutral-gray-300": u.value === "never"
|
|
76
|
-
}])
|
|
77
|
-
}, null, 2),
|
|
78
|
-
u.value === "synced" ? (t(), s(w, { key: 0 }, [
|
|
79
|
-
a("span", re, d(e(l)("connect.review.lastSynced", { relative: T.value })), 1),
|
|
80
|
-
m[3] || (m[3] = a("span", { class: "text-fm-color-neutral-gray-300" }, "·", -1)),
|
|
81
|
-
a("span", le, d(B.value), 1)
|
|
82
|
-
], 64)) : u.value === "syncing" ? (t(), s("span", ie, d(e(l)("connect.review.syncingNow", { time: I.value })), 1)) : (t(), s("span", ue, d(e(l)("connect.review.neverSynced")), 1))
|
|
83
|
-
], 2)) : (t(), s("span", de, d(r.subtitle || e(l)("connect.review.notConnected")), 1))
|
|
84
|
-
]),
|
|
85
|
-
r.connected ? (t(), s(w, { key: 0 }, [
|
|
86
|
-
r.tokenExpired ? (t(), U(e(x).FmChip, {
|
|
87
|
-
key: 0,
|
|
88
|
-
label: e(l)("connect.review.expired"),
|
|
89
|
-
variant: "critical"
|
|
90
|
-
}, null, 8, ["label"])) : C("", !0),
|
|
91
|
-
E(e(x).FmButton, {
|
|
92
|
-
variant: "secondary",
|
|
93
|
-
"prepend-icon": "refresh",
|
|
94
|
-
label: e(l)("connect.review.reconnect"),
|
|
95
|
-
onClick: m[0] || (m[0] = (_) => S("connect"))
|
|
96
|
-
}, null, 8, ["label"]),
|
|
97
|
-
r.tokenExpired ? C("", !0) : (t(), U(e(x).FmButton, {
|
|
98
|
-
key: 1,
|
|
99
|
-
variant: "primary",
|
|
100
|
-
"prepend-icon": "sync",
|
|
101
|
-
label: e(l)("connect.review.sync"),
|
|
102
|
-
loading: r.syncing,
|
|
103
|
-
onClick: m[1] || (m[1] = (_) => S("sync"))
|
|
104
|
-
}, null, 8, ["label", "loading"]))
|
|
105
|
-
], 64)) : C("", !0)
|
|
106
|
-
], 2),
|
|
107
|
-
r.connected ? C("", !0) : (t(), s("div", {
|
|
108
|
-
key: 0,
|
|
109
|
-
class: N(["flex items-center justify-between gap-12 p-16", e(c).default ? "border-b border-fm-color-neutral-gray-100" : ""])
|
|
110
|
-
}, [
|
|
111
|
-
a("span", me, d(e(l)("connect.review.connectHint", { name: r.name })), 1),
|
|
112
|
-
E(e(x).FmButton, {
|
|
113
|
-
"prepend-icon": "add",
|
|
114
|
-
label: e(l)("connect.review.connect"),
|
|
115
|
-
onClick: m[2] || (m[2] = (_) => S("connect"))
|
|
116
|
-
}, null, 8, ["label"])
|
|
117
|
-
], 2)),
|
|
118
|
-
W(i.$slots, "default")
|
|
119
|
-
]));
|
|
120
|
-
}
|
|
121
|
-
}), ye = { class: "p-24 flex flex-col gap-8" }, fe = { class: "flex flex-col flex-1 min-w-0" }, ge = { class: "fm-typo-en-body-lg-600 truncate" }, pe = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, ve = ["src"], be = { class: "flex flex-col flex-1 min-w-0" }, ke = { class: "fm-typo-en-body-lg-600 truncate" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, Te = /* @__PURE__ */ M({
|
|
122
|
-
__name: "Settings",
|
|
123
|
-
setup(r) {
|
|
124
|
-
const { t: h } = O(), f = X(), S = oe(), l = Q(), c = F(null), k = F(!1), p = F(!1), T = b(
|
|
125
|
-
() => {
|
|
126
|
-
var n;
|
|
127
|
-
return c.value ? ((n = c.value.google) == null ? void 0 : n.accessToken) === null : !1;
|
|
128
|
-
}
|
|
129
|
-
), B = b(
|
|
130
|
-
() => {
|
|
131
|
-
var n;
|
|
132
|
-
return c.value ? ((n = c.value.facebook) == null ? void 0 : n.token) === null : !1;
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
function I(n) {
|
|
136
|
-
const o = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
|
|
137
|
-
return `${window.location.origin}${o}${n}`;
|
|
138
|
-
}
|
|
139
|
-
async function u() {
|
|
140
|
-
await K.minor(async () => {
|
|
141
|
-
c.value = await $.getSource();
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
function i(n) {
|
|
145
|
-
var o;
|
|
146
|
-
return (o = l.locations.find(
|
|
147
|
-
(g) => g._id.toString() === n
|
|
148
|
-
)) == null ? void 0 : o.name;
|
|
149
|
-
}
|
|
150
|
-
function m(n) {
|
|
151
|
-
return n.map((o) => i(o)).filter((o) => o !== void 0).join(", ");
|
|
152
|
-
}
|
|
153
|
-
function _() {
|
|
154
|
-
f.open({
|
|
155
|
-
message: h("connect.review.syncSuccess"),
|
|
156
|
-
type: "success"
|
|
157
|
-
}), S.push({ name: ne["$connect-REVIEW_OVERVIEW"] });
|
|
158
|
-
}
|
|
159
|
-
async function P() {
|
|
160
|
-
var n, o;
|
|
161
|
-
k.value = !0;
|
|
162
|
-
try {
|
|
163
|
-
await $.syncGoogleReviews(), _();
|
|
164
|
-
} catch (g) {
|
|
165
|
-
if (await u(), ((o = (n = c.value) == null ? void 0 : n.google) == null ? void 0 : o.accessToken) === null) {
|
|
166
|
-
f.open({
|
|
167
|
-
message: h("connect.review.tokenExpired"),
|
|
168
|
-
type: "error"
|
|
169
|
-
});
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
throw g;
|
|
173
|
-
} finally {
|
|
174
|
-
k.value = !1;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
async function Y() {
|
|
178
|
-
var n, o;
|
|
179
|
-
p.value = !0;
|
|
180
|
-
try {
|
|
181
|
-
await $.syncFacebookReviews(), _();
|
|
182
|
-
} catch (g) {
|
|
183
|
-
if (await u(), ((o = (n = c.value) == null ? void 0 : n.facebook) == null ? void 0 : o.token) === null) {
|
|
184
|
-
f.open({
|
|
185
|
-
message: h("connect.review.tokenExpired"),
|
|
186
|
-
type: "error"
|
|
187
|
-
});
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
throw g;
|
|
191
|
-
} finally {
|
|
192
|
-
p.value = !1;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
async function j() {
|
|
196
|
-
const n = I("/review/google/callback"), { callbackUrl: o } = await $.getOauthUrl("google", n);
|
|
197
|
-
window.location.href = o;
|
|
198
|
-
}
|
|
199
|
-
async function D() {
|
|
200
|
-
const n = I("/review/facebook/callback"), { callbackUrl: o } = await $.getOauthUrl("facebook", n);
|
|
201
|
-
window.location.href = o;
|
|
202
|
-
}
|
|
203
|
-
return q(() => {
|
|
204
|
-
u(), l.readLocations();
|
|
205
|
-
}), (n, o) => {
|
|
206
|
-
var g, V;
|
|
207
|
-
return t(), s("div", ye, [
|
|
208
|
-
e(c) ? (t(), s(w, { key: 0 }, [
|
|
209
|
-
E(H, {
|
|
210
|
-
icon: e(Z),
|
|
211
|
-
name: "google",
|
|
212
|
-
connected: !!e(c).google,
|
|
213
|
-
syncing: e(k),
|
|
214
|
-
"token-expired": e(T),
|
|
215
|
-
"last-sync-time": (g = e(c).google) == null ? void 0 : g.lastSyncTime,
|
|
216
|
-
onConnect: j,
|
|
217
|
-
onSync: P
|
|
218
|
-
}, {
|
|
219
|
-
default: L(() => {
|
|
220
|
-
var v;
|
|
221
|
-
return [
|
|
222
|
-
(t(!0), s(w, null, R((v = e(c).google) == null ? void 0 : v.locations, (y) => (t(), s("div", {
|
|
223
|
-
key: y.googleLocationName,
|
|
224
|
-
class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
225
|
-
}, [
|
|
226
|
-
E(e(x).FmIcon, {
|
|
227
|
-
name: "location_on",
|
|
228
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
229
|
-
}),
|
|
230
|
-
a("div", fe, [
|
|
231
|
-
a("span", ge, d(y.displayName), 1),
|
|
232
|
-
a("span", pe, d(i(y.locationId)), 1)
|
|
233
|
-
])
|
|
234
|
-
]))), 128))
|
|
235
|
-
];
|
|
236
|
-
}),
|
|
237
|
-
_: 1
|
|
238
|
-
}, 8, ["icon", "connected", "syncing", "token-expired", "last-sync-time"]),
|
|
239
|
-
E(H, {
|
|
240
|
-
icon: e(ee),
|
|
241
|
-
name: "facebook",
|
|
242
|
-
connected: !!e(c).facebook,
|
|
243
|
-
syncing: e(p),
|
|
244
|
-
"token-expired": e(B),
|
|
245
|
-
"last-sync-time": (V = e(c).facebook) == null ? void 0 : V.lastSyncTime,
|
|
246
|
-
onConnect: D,
|
|
247
|
-
onSync: Y
|
|
248
|
-
}, {
|
|
249
|
-
default: L(() => {
|
|
250
|
-
var v;
|
|
251
|
-
return [
|
|
252
|
-
(t(!0), s(w, null, R((v = e(c).facebook) == null ? void 0 : v.pages, (y) => (t(), s("div", {
|
|
253
|
-
key: y.facebookPageId,
|
|
254
|
-
class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
255
|
-
}, [
|
|
256
|
-
y.pageProfileImageUrl ? (t(), s("img", {
|
|
257
|
-
key: 0,
|
|
258
|
-
src: y.pageProfileImageUrl,
|
|
259
|
-
class: "w-10 h-10 rounded-full shrink-0 object-cover"
|
|
260
|
-
}, null, 8, ve)) : (t(), U(e(x).FmIcon, {
|
|
261
|
-
key: 1,
|
|
262
|
-
name: "person",
|
|
263
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
264
|
-
})),
|
|
265
|
-
a("div", be, [
|
|
266
|
-
a("span", ke, d(y.pageName), 1),
|
|
267
|
-
a("span", we, d(m(y.locationIds)), 1)
|
|
268
|
-
])
|
|
269
|
-
]))), 128))
|
|
270
|
-
];
|
|
271
|
-
}),
|
|
272
|
-
_: 1
|
|
273
|
-
}, 8, ["icon", "connected", "syncing", "token-expired", "last-sync-time"])
|
|
274
|
-
], 64)) : (t(), s(w, { key: 1 }, R(["google", "facebook"], (v) => a("div", {
|
|
275
|
-
key: v,
|
|
276
|
-
class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
|
|
277
|
-
}, [...o[0] || (o[0] = [
|
|
278
|
-
J('<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)
|
|
279
|
-
])])), 64))
|
|
280
|
-
]);
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
export {
|
|
285
|
-
Te as default
|
|
286
|
-
};
|