@feedmepos/mf-connect 0.1.121-dev → 0.1.121-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-DwtaLO6F.js → App-C4T5UWGw.js} +493 -502
- package/dist/{Bin-BBaVggZI.js → Bin-ude598pY.js} +8 -8
- package/dist/{Broadcast-CqAQ3EmE.js → Broadcast-BtJbmDzX.js} +21 -22
- package/dist/{CampaignAnalytic-34bfP8iY.js → CampaignAnalytic-DxC_sgPy.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BvAAxE3a.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CBy6cXYx.js} +9 -8
- package/dist/{Card-8hlnKnhk.js → Card-B6Qt_KqI.js} +22 -22
- package/dist/{Collections-BJ0-UjKf.js → Collections-BCsbhQJM.js} +185 -197
- package/dist/{Credit-DJNc__yp.js → Credit-CCl-UjVj.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BvilcyyB.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DE_JYKS8.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CReXb9gY.js +3493 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DFzVuuEy.js → EffectSheet.vue_vue_type_style_index_0_lang-D_wHxBmj.js} +16 -16
- package/dist/{Experience-D-cUhjWc.js → Experience-BZfx679t.js} +31 -32
- package/dist/{FileSaver.min-DKYYse6A.js → FileSaver.min-aAU7_riE.js} +1 -1
- package/dist/{Game-DdFV90Kp.js → Game-L-RmEmNY.js} +18 -19
- package/dist/{GiftCardSetup-Dz0AN159.js → GiftCardSetup-BA_I83wm.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-GCp3IFaC.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CtiPxBgn.js} +7 -7
- package/dist/{Goals-Dg_kAezl.js → Goals-Dur5LKYk.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B_H1Bgy1.js → ImageInput.vue_vue_type_script_setup_true_lang-ALdW6e1t.js} +1 -1
- package/dist/{Index-ZSup3I7J.js → Index-_sUu1gDp.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DisF-jcd.js → LocationPicker.vue_vue_type_script_setup_true_lang-BgweoLh2.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BHhjZOYi.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjvB1fab.js} +1 -1
- package/dist/{LoyaltyDashboard-D8BhHsaw.js → LoyaltyDashboard-DgLAdZiP.js} +15 -15
- package/dist/{MainLayout-BBnhRxyR.js → MainLayout-DOXx217V.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DFrPlj5u.js → MainLayout.vue_vue_type_script_setup_true_lang-BwT0vGID.js} +3 -3
- package/dist/{Marketing-5F9LLn91.js → Marketing-CoBYtHdr.js} +4 -4
- package/dist/{MarketingMaterialEdit-C7dD4Bzw.js → MarketingMaterialEdit-R2jgDJKr.js} +211 -214
- package/dist/{Member-Dk4JeGru.js → Member-CQicHGEK.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-ISolD_Qg.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BY57N2OM.js} +47 -39
- package/dist/{MemberImportHistory-C0Ep8L2q.js → MemberImportHistory-C_xDFYQh.js} +7 -7
- package/dist/{MemberList-BsuPfBgk.js → MemberList-DaOsohKg.js} +105 -103
- package/dist/{MemberTransactions-mZ3fHw5O.js → MemberTransactions-DOCrHQ2s.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1weyRM8c.js → MessageInput.vue_vue_type_script_setup_true_lang-ep7Yqi5n.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-caED3JRW.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CTorzIeM.js} +1 -1
- package/dist/{Mission-C7DqUOJz.js → Mission-BeNYiQ9K.js} +21 -22
- package/dist/{Overview-U201nBVO.js → Overview-8QoQ_gHU.js} +20 -20
- package/dist/{Overview-VABLg36G.js → Overview-BMXpAv-n.js} +144 -145
- package/dist/{Point-DU6Ndv35.js → Point-Dyq5SXT2.js} +21 -22
- package/dist/{Promotion-9UhZXNPb.js → Promotion-BLAsz0mu.js} +131 -137
- package/dist/{Queue-CUxMedbd.js → Queue-qmf3ymVp.js} +45 -45
- package/dist/{Record-BIftCQzV.js → Record-DMqhKlIc.js} +9 -9
- package/dist/{Review-lyVgTfsP.js → Review-DDGtAXxX.js} +2 -2
- package/dist/ReviewFacebookCallback-jCP7vNJ3.js +238 -0
- package/dist/{ReviewGoogleCallback-B41PXfsj.js → ReviewGoogleCallback-kIu4wO-x.js} +5 -5
- package/dist/{Reward-BMun_Rs4.js → Reward-B9eyzyk7.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-3TONrUQu.js → RewardGroup.vue_vue_type_script_setup_true_lang-B5oNDez7.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cyo98lN8.js +1884 -0
- package/dist/{Segment-1VS7ycXi.js → Segment-CSenE8-8.js} +306 -303
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C5iJSlxi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-gUmEIxLj.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CXY9Wyk9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-5m7qY393.js} +4 -4
- package/dist/{Setting-BdtzvKjt.js → Setting-CshEhFJ0.js} +148 -159
- package/dist/{SettingAdvertisements-BO2l3HBT.js → SettingAdvertisements-B7NU1mTE.js} +12 -12
- package/dist/Settings-CSeRLtGl.js +179 -0
- package/dist/{Store-DWQz-MgY.js → Store-BouP_m9K.js} +28 -28
- package/dist/{StoreRewards-Bfwuqxf-.js → StoreRewards-NX24LqS_.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2zDGFAw.js +1265 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-IGh7Kiot.js +142 -0
- package/dist/{Tier-CKn-l-wY.js → Tier-Cg5KAErk.js} +687 -2575
- package/dist/{Title-BXDk69uL.js → Title-BcziCAh4.js} +94 -95
- package/dist/{Transaction-D4HQO4i9.js → Transaction-DK0Splad.js} +2 -2
- package/dist/Upselling-1RSD_l_k.js +200 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-um124o4t.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C-mg8LqR.js} +26 -26
- package/dist/{Voucher-BGIyw4jq.js → Voucher-DX6-GX17.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BKyZj5SP.js → VoucherEditor.vue_vue_type_script_setup_true_lang-7KZNW6gS.js} +12 -12
- package/dist/{WhatsappAccount-Cd82g_xj.js → WhatsappAccount-qbnBp7mv.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DWy8kS66.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BAw8wUAu.js} +1 -1
- package/dist/{WhatsappBot-auQhO8zk.js → WhatsappBot-Dkx24HI7.js} +6 -6
- package/dist/{WhatsappBotLogs-CWuJzK9W.js → WhatsappBotLogs-CR9RPc-1.js} +6 -6
- package/dist/{WhatsappBotSettings-B8KXMpIF.js → WhatsappBotSettings-DF97RSSV.js} +4 -4
- package/dist/{WhatsappLayout-DxooAkkL.js → WhatsappLayout-JAye9JZI.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CYHmgQ2v.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-toCNd_Ip.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DilxQM_z.js → ZodTextField.vue_vue_type_script_setup_true_lang-DvMdQKET.js} +2 -2
- package/dist/{app-BG-zK89d.js → app-O2-Xtjxu.js} +15017 -14861
- package/dist/app.js +3 -4
- package/dist/{base.export-BcMuREGH.js → base.export-0NAAWE2x.js} +2 -2
- package/dist/{business-9_NOI2V9.js → business-DO-6gAei.js} +1 -1
- package/dist/{campaign-DjBTRZyA.js → campaign-CKpTYx8r.js} +94 -121
- package/dist/{campaign-8y_9SvKP.js → campaign-CjtbytTA.js} +28 -34
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-DNva0Lzi.js +776 -0
- package/dist/{collection.fn-yXurU9iv.js → collection.fn-DgVYvv2u.js} +2 -2
- package/dist/{currency-YzyBFtDU.js → currency-RCSoljIc.js} +1 -1
- package/dist/{effect-bMGarJZ6.js → effect-Cic-yJ5a.js} +1 -1
- package/dist/{email-addresses-Ciu83j_3.js → email-addresses-Cz7nxyM7.js} +25 -25
- package/dist/{feature-flag-H5D1Cob5.js → feature-flag-BHFUKA3S.js} +70 -70
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-BH9HMikb.js → helper-H_gC1vRi.js} +1 -1
- package/dist/{index-CH-KHkm5.js → index-B-RKMcrS.js} +1 -1
- package/dist/{index-DkMy7WpU.js → index-BEFoWcsk.js} +2 -2
- package/dist/{index-DbxiG50D.js → index-BFxCHHSQ.js} +2 -2
- package/dist/{index-Cyf05z_2.js → index-BU-CbflW.js} +2 -2
- package/dist/{index-CIOidYvo.js → index-C-vDa3pL.js} +1 -1
- package/dist/{index-MWNnMT2T.js → index-CSNMZuv4.js} +4 -4
- package/dist/{index-RvJ5cq__.js → index-CTDzF7d_.js} +3 -3
- package/dist/{index-BaTnDV-T.js → index-D5_gAcWw.js} +2613 -2699
- package/dist/{index-BHO82_Ix.js → index-DRuHmNoi.js} +1 -1
- package/dist/{index-DYu7ZdQt.js → index-DVIKJ8Fi.js} +1 -1
- package/dist/{index-_giqGuYM.js → index-DVt628Qh.js} +1 -1
- package/dist/{index-pnM5q4c_.js → index-DZBbFrO4.js} +232 -389
- package/dist/{index-BxwJfT08.js → index-DlRDCDW-.js} +197 -197
- package/dist/{index-BvKJM3M2.js → index-Dw5ikwFR.js} +15 -29
- package/dist/{index-CooParq-.js → index-G8S_j3nj.js} +581 -682
- package/dist/{index-taPHgOqE.js → index-GJRqAxuJ.js} +251 -608
- package/dist/{index-Ye3qFt34.js → index-bMAgU-Xo.js} +10 -10
- package/dist/{index-DpkoCl4z.js → index-ka7lQ9t1.js} +10 -10
- package/dist/{index-B7-Uvnfn.js → index-rQ30JRKa.js} +6 -19
- package/dist/{index-CJAFz9Nn.js → index-zsTY_sDR.js} +1 -1
- package/dist/{index.esm2017-CLxZor1Y.js → index.esm2017-Cf5e9e4I.js} +104 -104
- package/dist/{loading-CsOSUWBd.js → loading-Q15eugE9.js} +1 -1
- package/dist/{lodash-CshibTzh.js → lodash-B9y2Z6FT.js} +1 -1
- package/dist/{member-import-BdaGAjjt.js → member-import-B7-pNlAu.js} +1 -1
- package/dist/{membership-C5JWO1FM.js → membership-FjTQN8-W.js} +2 -2
- package/dist/{money-Blt5EM43.js → money-DpnjYb20.js} +1 -1
- package/dist/{number-COm3MiH8.js → number-DQpgkGJp.js} +1 -1
- package/dist/objectid-DDT17fUp.js +145 -0
- package/dist/{onboarding-BbQDJOOS.js → onboarding-j-EtZDu5.js} +36 -36
- package/dist/{onboardingSetup-BLISY52M.js → onboardingSetup-B4yc4Acp.js} +2 -2
- package/dist/{plugins-De_chCYU.js → plugins-TZdigPwR.js} +3 -3
- package/dist/{reward-Dl8Zoxe_.js → reward-BpRIHbOy.js} +1 -1
- package/dist/{rule-D6_iss3O.js → rule-PjQfvtJP.js} +492 -572
- package/dist/rule-builder-Vloq9R4R.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-CeZkljlm.js +275 -0
- package/dist/{timezone-CA5FwOyy.js → timezone-BmgCN50d.js} +1 -1
- package/dist/{transaction.fn-DI_NeGQb.js → transaction.fn-C9wUfIRo.js} +2 -2
- package/dist/{trigger-CuymoMM-.js → trigger-D9XVMrkP.js} +9 -9
- package/dist/{useMarketingMaterialActions-Bz0Kgvgd.js → useMarketingMaterialActions-2_HeLxeK.js} +4 -4
- package/dist/{usePagination-yb1rupwa.js → usePagination-Do3Rw4mx.js} +1 -1
- package/dist/{user-QSKyFaMI.js → user-CJpvF5mn.js} +1 -1
- package/dist/vue-i18n-CJsKXxJX.js +2365 -0
- package/dist/{xlsx--RjkGa9A.js → xlsx-CaTmMdcM.js} +440 -440
- package/dist/{zod-CmPMd-h0.js → zod-BcPs1As4.js} +1 -1
- package/package.json +3 -7
- package/dist/AuditLogs-s572aHLw.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSjOHBhA.js +0 -4439
- package/dist/Grab-BSQt4deB.js +0 -301
- package/dist/ReviewFacebookCallback-Da5G19bE.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHzFgr4h.js +0 -1923
- package/dist/Settings-CvYawDU5.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CBwmDKAw.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CHzFjo24.js +0 -7007
- package/dist/Upselling-CikWzKq7.js +0 -1032
- package/dist/campaign.fn-COkPH1QE.js +0 -776
- package/dist/duplicateCampaign-dRWioann.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-DQTx3-ee.js +0 -145
- package/dist/template-Cw6j1cLX.js +0 -224
- package/dist/vue-i18n-B_qtODCw.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-CsOSUWBd.js";
|
|
3
|
-
import { u as Q } from "./business-9_NOI2V9.js";
|
|
4
|
-
import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as O } from "./vue-i18n-B_qtODCw.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-BG-zK89d.js";
|
|
9
|
-
import { useRouter as oe } from "vue-router";
|
|
10
|
-
import { r as $ } from "./index-DpkoCl4z.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
|
-
};
|