@feedmepos/mf-connect 0.1.119-dev → 0.1.119-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-z-u6skb5.js → App-BN2LKM3u.js} +135 -147
- package/dist/{Bin-Dh9RAgYi.js → Bin-DpQ1atb7.js} +8 -8
- package/dist/{Broadcast-Dg6azPS8.js → Broadcast-c1ZyYClI.js} +21 -22
- package/dist/{CampaignAnalytic-CVB4dstO.js → CampaignAnalytic-w1hIlc2r.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DYgBeT23.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7U6evm1.js} +9 -8
- package/dist/{Card-CY736Ul0.js → Card-De53Xgbe.js} +22 -22
- package/dist/{Collections-CdTKWkZZ.js → Collections-BL2RD3FU.js} +185 -197
- package/dist/{Credit-CUhEKlMI.js → Credit-2KvFFcwR.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CBwgeTXh.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CKSs2nYE.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXb7v7wc.js +3493 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D5-EKqG9.js → EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js} +30 -30
- package/dist/{Experience-CMp09U-6.js → Experience-Cb0jHtVo.js} +31 -32
- package/dist/{FileSaver.min-Bq5McdmK.js → FileSaver.min-UDgZF_Cv.js} +1 -1
- package/dist/{Game-Dv5NvG-q.js → Game-BnysxSMs.js} +18 -19
- package/dist/{GiftCardSetup-SO2Tk5In.js → GiftCardSetup-s1OR6xQq.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CgG5vHCp.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-D108r20x.js} +7 -7
- package/dist/{Goals-BEwQP4cY.js → Goals-BAieLPzR.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BDGEqsWE.js → ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js} +1 -1
- package/dist/{Index-8F2LOWng.js → Index-DnX16GAE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BwAjki7Y.js → LocationPicker.vue_vue_type_script_setup_true_lang-DeM-WG6m.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DK4C0Y9j.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BAN69FOS.js} +1 -1
- package/dist/{LoyaltyDashboard-rWm0b8cm.js → LoyaltyDashboard-D8g6OSbC.js} +15 -15
- package/dist/{MainLayout-ezbgp2IQ.js → MainLayout-DWABjpQn.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-1QY5-U5y.js → MainLayout.vue_vue_type_script_setup_true_lang-COp7iulq.js} +3 -3
- package/dist/{Marketing-DcWF4xVc.js → Marketing-Dagatr0y.js} +4 -4
- package/dist/{MarketingMaterialEdit-C1bXj_hU.js → MarketingMaterialEdit-DYVzNDpM.js} +211 -214
- package/dist/{Member-CgDZqGsV.js → Member-DAxdEF_Z.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dh1_j06F.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-nBg7Hckj.js} +47 -39
- package/dist/{MemberImportHistory-DT3QJ5se.js → MemberImportHistory-2gx6FnLh.js} +7 -7
- package/dist/{MemberList-Bm05jnbk.js → MemberList-By_gGl-J.js} +105 -103
- package/dist/{MemberTransactions-D90tTpdC.js → MemberTransactions-BEF-4ZNp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jvgjOXXA.js → MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CxL-Nh6i.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DN3mWfKj.js} +1 -1
- package/dist/{Mission-D_l2eJI3.js → Mission-jg15lBxo.js} +21 -22
- package/dist/{Overview-BOZBnorP.js → Overview-BFKLTAk1.js} +144 -145
- package/dist/{Overview-1AYfTeMD.js → Overview-C7WfdzfV.js} +20 -20
- package/dist/{Point-Cqy4XzeG.js → Point-dv9WgWTQ.js} +21 -22
- package/dist/{Promotion-9RDNbCgB.js → Promotion-mFPF_8jO.js} +131 -137
- package/dist/{Queue-D2Eie_np.js → Queue-BQoR_M5H.js} +45 -45
- package/dist/{Record-e4B--FD8.js → Record-1JZ1N5iX.js} +9 -9
- package/dist/{Review-DcUpSvc-.js → Review-B52AxCeT.js} +2 -2
- package/dist/ReviewFacebookCallback-ihTdiI8V.js +238 -0
- package/dist/{ReviewGoogleCallback-JPkamgo2.js → ReviewGoogleCallback-DO6SVFIC.js} +5 -5
- package/dist/{Reward-BQJw-R8V.js → Reward-Cp4jPAB0.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D_DSQ8q2.js → RewardGroup.vue_vue_type_script_setup_true_lang-DLD6X13Z.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js +1884 -0
- package/dist/{Segment-Cjdqsqqg.js → Segment-DaKw0YXF.js} +306 -303
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-g-CJUZBF.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bj3OQ_JJ.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-lbH0b170.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1Otak97.js} +4 -4
- package/dist/{Setting-B3HK4mtx.js → Setting-DveUrt8J.js} +148 -159
- package/dist/{SettingAdvertisements-BQFJpdIm.js → SettingAdvertisements-QRXOMNnM.js} +12 -12
- package/dist/Settings-D9D-mkBa.js +179 -0
- package/dist/{Store-mp1LyXwr.js → Store-DjdXRw3V.js} +28 -28
- package/dist/{StoreRewards-DiSB6d7_.js → StoreRewards-CjlGrc9E.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DnwMpqzf.js +1265 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js +142 -0
- package/dist/{Tier-CxaXh96q.js → Tier-D74Oh2np.js} +687 -2575
- package/dist/{Title-Byz0TGpi.js → Title-CeeviOW8.js} +94 -95
- package/dist/{Transaction-CNXulI3o.js → Transaction-CWdw0ITl.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C0bfVZf8.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js} +26 -26
- package/dist/{Voucher-CVw3E8Y4.js → Voucher-C0nNXMtv.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C0d3ktXA.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js} +12 -12
- package/dist/{WhatsappAccount-5vLzjaIV.js → WhatsappAccount-CoLSjCQ2.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CwGBRX-Q.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DkHPlGgT.js} +1 -1
- package/dist/{WhatsappBot-BWJbD7Gk.js → WhatsappBot-kLb3kUav.js} +6 -6
- package/dist/{WhatsappBotLogs-C8gpmZyC.js → WhatsappBotLogs-jcYaHs0t.js} +6 -6
- package/dist/{WhatsappBotSettings-BvPnKHz-.js → WhatsappBotSettings-B6jJD61h.js} +4 -4
- package/dist/{WhatsappLayout-DJXhXeXf.js → WhatsappLayout-C24bIjI2.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BxUYjrWQ.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-9a_grP76.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CkjzVKif.js → ZodTextField.vue_vue_type_script_setup_true_lang-i8Wc2mCr.js} +2 -2
- package/dist/{app-BF1vds2J.js → app-C06bAZj3.js} +10806 -11561
- package/dist/app.js +3 -4
- package/dist/{base.export-B7FU8J4P.js → base.export-CgNRhKu8.js} +2 -2
- package/dist/{business-DkUMhys1.js → business-D23Dt1x4.js} +1 -1
- package/dist/{campaign-C9cVkGMF.js → campaign-DfEvGigm.js} +94 -121
- package/dist/{campaign-0AgQP43B.js → campaign-FVcbXtrP.js} +28 -34
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-0MNUj1fZ.js +776 -0
- package/dist/{collection.fn-B_QnW0e3.js → collection.fn-DC1AMI9o.js} +2 -2
- package/dist/{currency-XQmondpC.js → currency-Bra2RJK4.js} +1 -1
- package/dist/{effect-Mwn1x6qN.js → effect-EL4V3pAu.js} +1 -1
- package/dist/{email-addresses-DQQAi6-l.js → email-addresses-Ddtf1x_y.js} +2 -2
- package/dist/{feature-flag-B1VMMZMd.js → feature-flag-umACX47C.js} +70 -70
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-D1R8vyjc.js → helper-DqDOnLCf.js} +1 -1
- package/dist/{index-Rs75lw-x.js → index-B2lqC_hH.js} +1 -1
- package/dist/{index-C9Nbb7wc.js → index-B3U3KZl0.js} +2 -2
- package/dist/{index-CRAuAyO3.js → index-BTjhdlN_.js} +1 -1
- package/dist/{index-Bm43wR8L.js → index-B_BmgKrh.js} +2613 -2699
- package/dist/{index-DMfCzjiA.js → index-BkKu2G2c.js} +2 -2
- package/dist/{index-ug7pxPAX.js → index-BroF2fC8.js} +251 -608
- package/dist/{index-P8DDRVa3.js → index-Bvk61_w_.js} +1 -1
- package/dist/{index-DQnCdGWe.js → index-ByVPdKdB.js} +581 -682
- package/dist/{index-Bym-ZIcv.js → index-BzwwXWpZ.js} +1 -1
- package/dist/{index-DaUhJ6xV.js → index-C3hAzzS2.js} +15 -29
- package/dist/{index-CzE9ZPDV.js → index-C3lk4GHF.js} +4 -4
- package/dist/{index-CLlGMbnP.js → index-C6p9Lsvf.js} +1 -1
- package/dist/{index-eR9mqPPV.js → index-CEh6ryp2.js} +6 -19
- package/dist/{index-mOGrVzUV.js → index-DK9zxpDu.js} +3 -3
- package/dist/{index-ytSMcSMt.js → index-DuCJtx1m.js} +1 -1
- package/dist/{index-ZYrey0SM.js → index-LjoAs_nX.js} +10 -10
- package/dist/{index-BU6CU5MP.js → index-TDCPGtW3.js} +232 -389
- package/dist/{index-CPB7j8Wn.js → index-iVbjwKxc.js} +10 -10
- package/dist/{index-Cg8Z5eYT.js → index-pfmx-Gor.js} +2 -2
- package/dist/{index-D5BwAYuA.js → index-rcfcslIC.js} +197 -197
- package/dist/{index.esm2017-Gkctw9Mb.js → index.esm2017-DCuQPCX2.js} +111 -111
- package/dist/{loading-kUQqT44G.js → loading-CQm1DKWE.js} +1 -1
- package/dist/{lodash-B4AjV7YZ.js → lodash-C2wVbAap.js} +1 -1
- package/dist/{member-import-CwDUG5mj.js → member-import-BLEmTRso.js} +1 -1
- package/dist/{membership-BI6U8-eM.js → membership-XycnxPEW.js} +2 -2
- package/dist/{money-Bum-AbB7.js → money-DY_QGzd1.js} +1 -1
- package/dist/{number-uAoNqG-N.js → number-BHthf4qF.js} +1 -1
- package/dist/objectid-CPCAqIiC.js +145 -0
- package/dist/{onboarding-wtYzQipv.js → onboarding-BOJw54Fn.js} +36 -36
- package/dist/{onboardingSetup-DlYM-oqd.js → onboardingSetup-Cf2u1tXu.js} +2 -2
- package/dist/{plugins-BGyTPNfc.js → plugins-DKQeoL_e.js} +3 -3
- package/dist/{reward-D0xtG-bp.js → reward-D4RIYSpl.js} +1 -1
- package/dist/{rule-BAA5-vRj.js → rule-Ba-s0L_w.js} +492 -572
- package/dist/rule-builder-D0B0DPao.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-B40I16Yg.js +236 -0
- package/dist/{timezone-Bbw2OeEP.js → timezone-CAc8xi1h.js} +1 -1
- package/dist/{transaction.fn-DZdNjP_E.js → transaction.fn-Cp2hnhyU.js} +2 -2
- package/dist/{trigger-BpotFb7G.js → trigger-3ebhNBX7.js} +9 -9
- package/dist/{useMarketingMaterialActions-CQ1M0N9c.js → useMarketingMaterialActions-6URv8neP.js} +4 -4
- package/dist/{usePagination-qALFI_Td.js → usePagination-C-fyMmiy.js} +1 -1
- package/dist/{user-X_94TRIK.js → user-T-iXTrYV.js} +1 -1
- package/dist/vue-i18n-DzsxJorb.js +2365 -0
- package/dist/{xlsx-DW48eXDT.js → xlsx-B8OqaJfb.js} +224 -224
- package/dist/{zod-BAP9II5C.js → zod-DZkNj425.js} +1 -1
- package/package.json +3 -8
- package/dist/AuditLogs-J0UJ3HJW.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BC4jTtVY.js +0 -4439
- package/dist/Grab-npbL7p7S.js +0 -301
- package/dist/ReviewFacebookCallback-BhHdYb4X.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DfWjXTx3.js +0 -1923
- package/dist/Settings-DKWkiRuA.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAYKqf-Y.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-be7ksTJw.js +0 -7007
- package/dist/Upselling-Dto64bmE.js +0 -1013
- package/dist/campaign.fn-N6rJeDUx.js +0 -776
- package/dist/duplicateCampaign-CvQRWP-Z.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-CPTCMH2h.js +0 -145
- package/dist/template-DKgW9ul3.js +0 -188
- package/dist/vue-i18n-CRFpVnMa.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-kUQqT44G.js";
|
|
3
|
-
import { u as Q } from "./business-DkUMhys1.js";
|
|
4
|
-
import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as O } from "./vue-i18n-CRFpVnMa.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-BF1vds2J.js";
|
|
9
|
-
import { useRouter as oe } from "vue-router";
|
|
10
|
-
import { r as $ } from "./index-ZYrey0SM.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
|
-
};
|