@feedmepos/mf-connect 0.1.128-dev → 0.1.128-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-CPSC0ccq.js → App-DFXou0ZK.js} +215 -223
- package/dist/{Bin-Cn7sCPql.js → Bin-ril4yEp7.js} +8 -8
- package/dist/{Broadcast-bR7HAyV2.js → Broadcast-CcseZmao.js} +21 -22
- package/dist/{CampaignAnalytic-Dnpw_Jwo.js → CampaignAnalytic-DaJ5a6G1.js} +6 -6
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-HaWMLA4s.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CsmgbhtH.js} +10 -9
- package/dist/{Card-BE3Y0KHF.js → Card-D7sTDXgf.js} +23 -23
- package/dist/{Collections-CLSp9Uah.js → Collections-C6d4vkox.js} +185 -197
- package/dist/{Credit-DgMyKROt.js → Credit-B9JCYQYi.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D8eCQE4D.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CwD5dRnJ.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cteezb57.js +3638 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CXw7yS8N.js → EffectSheet.vue_vue_type_style_index_0_lang-BMxA26t5.js} +33 -33
- package/dist/{Experience-CCeRbvIe.js → Experience-pBNjY5aC.js} +31 -32
- package/dist/{FileSaver.min-D8Rw2VVN.js → FileSaver.min-BdA7jj3J.js} +1 -1
- package/dist/{Game-CYGg8vWQ.js → Game-Ba1LqaLj.js} +18 -19
- package/dist/{GiftCardSetup-rzea90xr.js → GiftCardSetup-DteySO0t.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BFUBfL-S.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DxFGFA_U.js} +128 -140
- package/dist/{Goals-BnZfK7a3.js → Goals-D4rLwe3y.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Cw2imjlQ.js → ImageInput.vue_vue_type_script_setup_true_lang-C-1uplPm.js} +1 -1
- package/dist/{Index-DjZi_lVg.js → Index-DZ9bEViq.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B1q4NtuM.js → LocationPicker.vue_vue_type_script_setup_true_lang-DS3y4uib.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CUjzbMcb.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BTHmofSe.js} +1 -1
- package/dist/{LoyaltyDashboard-C3TZSSQz.js → LoyaltyDashboard-CBMyLX7W.js} +14 -14
- package/dist/{MainLayout-uNGpBpJi.js → MainLayout-B3-DumYs.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-0PcswtGl.js → MainLayout.vue_vue_type_script_setup_true_lang-BWOWZMYx.js} +3 -3
- package/dist/{Marketing-SXmxcw3-.js → Marketing-CJiu6eP4.js} +4 -4
- package/dist/{MarketingMaterialEdit-DK0tjHpF.js → MarketingMaterialEdit-BuHpXGwZ.js} +211 -214
- package/dist/{Member-BFSwupq6.js → Member-AOxxLQ-x.js} +7 -7
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-cGglvqwB.js +1308 -0
- package/dist/{MemberImportHistory-z12l_IAQ.js → MemberImportHistory-o-ruPMEe.js} +7 -7
- package/dist/{MemberList-DfN7ur0J.js → MemberList-BkX_jgos.js} +105 -103
- package/dist/{MemberTransactions-Bntt4bRR.js → MemberTransactions-Bnc3BWr5.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-ComtYItw.js → MessageInput.vue_vue_type_script_setup_true_lang-DoUw4U88.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-_Imnj16x.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BHprSEKu.js} +1 -1
- package/dist/{Mission-CvpeYVjB.js → Mission-D80DxR7z.js} +21 -22
- package/dist/{Overview-BtTkltlY.js → Overview-9gdETQLU.js} +144 -145
- package/dist/{Overview-BkaFC5La.js → Overview-jb3HWI09.js} +21 -21
- package/dist/{Point-CpNAFABM.js → Point-Pf_s2Ggb.js} +21 -22
- package/dist/{Promotion-B_vD_9UF.js → Promotion-BjjugEKH.js} +131 -137
- package/dist/{Queue-D5jDhI0f.js → Queue-CVWdBEvK.js} +46 -46
- package/dist/{Record-EsNXzy4D.js → Record-BS9lp0Cs.js} +9 -9
- package/dist/{Review-ByMrkymf.js → Review-1MRQGLAX.js} +2 -2
- package/dist/ReviewFacebookCallback-DuuQxEIK.js +238 -0
- package/dist/{ReviewGoogleCallback-BzU-hUy5.js → ReviewGoogleCallback-8kzG-TMh.js} +5 -5
- package/dist/{Reward-kxAuVGDE.js → Reward-UPonEShz.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-i9B1R3XP.js → RewardGroup.vue_vue_type_script_setup_true_lang-CW-EEgDZ.js} +14 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BmTEULNC.js +1884 -0
- package/dist/{Segment-C5SJs7al.js → Segment-BsNstBo-.js} +307 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-RIerABcb.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-3uc5TjrH.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8jS4gee.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKc0Q7pK.js} +4 -4
- package/dist/{Setting-zmlu3QcR.js → Setting-BD-fl3v8.js} +17 -17
- package/dist/{SettingAdvertisements-DewXGZoE.js → SettingAdvertisements-DG1btpAQ.js} +12 -12
- package/dist/Settings-LPdO0Djy.js +179 -0
- package/dist/{Store-CiTwDcgr.js → Store-CQe1YA-D.js} +29 -29
- package/dist/{StoreRewards-DaOJxsVm.js → StoreRewards-C7z5eJc4.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BTqxeKR4.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CvX_M1KW.js} +25 -25
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DmeOGncB.js +142 -0
- package/dist/{Tier-lNI7GWMP.js → Tier-BBb_E8_V.js} +688 -2583
- package/dist/{Title-CDxDztnl.js → Title-CjJaca4P.js} +95 -96
- package/dist/{Transaction-CcsUvIns.js → Transaction-Dn-EPCom.js} +2 -2
- package/dist/{Upselling-BDirPkWX.js → Upselling-DB8HU6B_.js} +3 -3
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hqzfBpop.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BG2o3Nip.js} +26 -26
- package/dist/{Voucher-CJDo5U_P.js → Voucher-Cwg3WelV.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-WjsLHh_E.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CRz0wdSO.js} +12 -12
- package/dist/{WhatsappAccount-CQBti7RJ.js → WhatsappAccount--SMCex1D.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DVNZ774z.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BpZ0_NtK.js} +1 -1
- package/dist/{WhatsappBot-91lIlikm.js → WhatsappBot-2BTZU0cI.js} +7 -7
- package/dist/{WhatsappBotLogs-PQTwT8e5.js → WhatsappBotLogs-nGIYzZCU.js} +5 -5
- package/dist/{WhatsappBotSettings-CUES9UL-.js → WhatsappBotSettings-DBx7ezqA.js} +5 -5
- package/dist/{WhatsappLayout-pZGYJj0J.js → WhatsappLayout-DK2idBeB.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DAoonwsO.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-B-pAId0k.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-HEIeZYCP.js → ZodTextField.vue_vue_type_script_setup_true_lang-DYpCPJDx.js} +2 -2
- package/dist/{app--pRyBODF.js → app-DjtVpjOD.js} +3522 -4286
- package/dist/app.js +3 -4
- package/dist/{base.export-CSdCmt-6.js → base.export-Dc9I7xbt.js} +2 -2
- package/dist/business-C0Ej4JRP.js +82 -0
- package/dist/{campaign-CwQjWU63.js → campaign-BNgMmhg6.js} +94 -121
- package/dist/{campaign-t9ubUkjB.js → campaign-U8KBANd_.js} +25 -31
- package/dist/{campaign.enum-Damu7hgo.js → campaign.enum-mYG3oWwU.js} +2 -3
- package/dist/campaign.fn-BaBPV7He.js +776 -0
- package/dist/{collectible.enum-C8LbgIQ7.js → collectible.enum-BtBBkbIB.js} +1 -1
- package/dist/{collection.fn-BV7pDqa5.js → collection.fn-lFr9HoHC.js} +2 -2
- package/dist/{currency-pS0xeJA6.js → currency-B6GBpIWb.js} +1 -1
- package/dist/{effect-B532leFF.js → effect-DmzU8TpX.js} +1 -1
- package/dist/{email-addresses-CKkT_5O5.js → email-addresses-s_oiQY8W.js} +2 -2
- package/dist/{feature-flag-25oDCLLB.js → feature-flag-CRbNgxfa.js} +84 -84
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-DxOj04aq.js → helper-0o3cPptM.js} +1 -1
- package/dist/{index-BViMt33t.js → index-B6BmfoiZ.js} +1 -1
- package/dist/{index-BLRv_4gJ.js → index-BECZ4ORu.js} +1 -1
- package/dist/{index-uCkkfjE3.js → index-BMG5fllq.js} +4 -4
- package/dist/{index-ClD2-18P.js → index-BXi5bQbd.js} +6 -19
- package/dist/{index-DqQ1q8sX.js → index-Bql1JMH9.js} +19 -26
- package/dist/{index-DBT1f1M3.js → index-BvoYHJ0i.js} +2 -2
- package/dist/{index-CBYY3VEG.js → index-C9MKLJzw.js} +2614 -2700
- package/dist/{index-C_qmnOKQ.js → index-CPByCjHI.js} +9 -9
- package/dist/{index-DSAEs8u0.js → index-CZWCtODZ.js} +1 -1
- package/dist/{index-BCgTcZ7c.js → index-CigqpRCP.js} +252 -609
- package/dist/{index-BFJ2FmB4.js → index-Cnl3vaVR.js} +2 -2
- package/dist/{index-DVlo0TO9.js → index-CxxWGkQz.js} +23 -23
- package/dist/{index-BX6lcJDB.js → index-DLcl6mHQ.js} +1 -1
- package/dist/{index-DEENB4la.js → index-DMgSW1aH.js} +664 -664
- package/dist/{index-DBzCfWxW.js → index-DNx-iJd1.js} +2 -2
- package/dist/{index-ip2EqUEW.js → index-DQLDjCeb.js} +1 -1
- package/dist/{index-B3sR1LMa.js → index-DXV_Kdhp.js} +7 -7
- package/dist/{index-DiYuhtNS.js → index-Df5CnMjC.js} +4 -4
- package/dist/{index-Diw9710S.js → index-DphGTJkl.js} +4 -4
- package/dist/{index-BHnMLtU2.js → index-NOeUp1Wc.js} +235 -381
- package/dist/{index-C6pr4oIv.js → index-NhHbOATm.js} +1243 -1315
- package/dist/{index-C7wVaeC1.js → index-iEzy3892.js} +1 -1
- package/dist/{index.esm2017-DRrIFPLo.js → index.esm2017-DpKkF6uX.js} +57 -57
- package/dist/{loading--SZI7Tpo.js → loading-nQaPRntd.js} +1 -1
- package/dist/{lodash-BZqvXM_P.js → lodash-B6558zRv.js} +1 -1
- package/dist/{member-import-Bmt1OdRW.js → member-import-DWDpO4uU.js} +2 -2
- package/dist/{membership-BTFpH7Mg.js → membership-BY1-idAv.js} +3 -3
- package/dist/{money-BVtlYyxo.js → money-DE62jPYV.js} +1 -1
- package/dist/{number-DrOdGSrF.js → number-C9mUt-Ac.js} +1 -1
- package/dist/objectid-DyUyXFvt.js +145 -0
- package/dist/{onboarding-BjcSBC8v.js → onboarding-OTAVtlNj.js} +25 -25
- package/dist/{onboardingSetup-Dcv8i8qd.js → onboardingSetup-DhwhJk-r.js} +2 -2
- package/dist/{plugins-Iw52rJ1s.js → plugins-CpxP-Bn_.js} +3 -3
- package/dist/{reward-DF9tE7iA.js → reward-yx-Ttob3.js} +1 -1
- package/dist/{rule-rCPhlgAq.js → rule-C_T37PuL.js} +492 -572
- package/dist/rule-builder-WoEQdgK2.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-AnoXsK9Y.js +275 -0
- package/dist/{transaction.fn-Cp3ylqFD.js → transaction.fn-4IcKHgri.js} +2 -2
- package/dist/{trigger-O6JvCms4.js → trigger-8zSNA5H1.js} +9 -9
- package/dist/{useMarketingMaterialActions-Cnadk3AO.js → useMarketingMaterialActions-CXjA7dhm.js} +4 -4
- package/dist/{usePagination-C5lSxdqt.js → usePagination-BECgW_Yq.js} +1 -1
- package/dist/{user-B7iv0TRE.js → user-Czn9R1f-.js} +1 -1
- package/dist/vue-i18n-BJWf_QrH.js +2365 -0
- package/dist/{xlsx-DTJ6bUKL.js → xlsx-3kbv63FT.js} +440 -440
- package/dist/{zod-cIIx_Ng9.js → zod-DMdtnaR4.js} +1 -1
- package/package.json +3 -7
- package/dist/AuditLogs-CgrYStwa.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BB2gszsG.js +0 -4584
- package/dist/Grab-BRbn6ffm.js +0 -301
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dvcasf5O.js +0 -1322
- package/dist/ReviewFacebookCallback-BDl6NBkw.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D3MZsh4A.js +0 -1923
- package/dist/Settings-5HU_uY6B.js +0 -286
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DlFCI1BT.js +0 -7007
- package/dist/business-BtEfH8Mt.js +0 -83
- package/dist/campaign.fn-D3_OzyyQ.js +0 -776
- package/dist/duplicateCampaign-19CDT2kM.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-DdJFC6TI.js +0 -145
- package/dist/template-v1F1rvUU.js +0 -227
- package/dist/vue-i18n-CYFvlTTS.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--SZI7Tpo.js";
|
|
3
|
-
import { u as Q } from "./business-BtEfH8Mt.js";
|
|
4
|
-
import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as O } from "./vue-i18n-CYFvlTTS.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--pRyBODF.js";
|
|
9
|
-
import { useRouter as oe } from "vue-router";
|
|
10
|
-
import { r as $ } from "./index-C_qmnOKQ.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
|
-
};
|