@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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/README.md +1 -66
- package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
- package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
- package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
- package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
- package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
- package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
- package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
- package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
- package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
- package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
- package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
- package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
- package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
- package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
- package/dist/Marketing-BKK45Eve.js +236 -0
- package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
- package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
- package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
- package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
- package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
- package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
- package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
- package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
- package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
- package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
- package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
- package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
- package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
- package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
- package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
- package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
- package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
- package/dist/Setting-BnFRI0Se.js +2037 -0
- package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
- package/dist/Settings-BvT8_tkQ.js +179 -0
- package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
- package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
- package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
- package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
- package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
- package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
- package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
- package/dist/app.js +3 -4
- package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
- package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
- package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
- package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
- package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
- package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
- package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
- package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
- package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
- package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
- package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
- package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
- package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
- package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
- package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
- package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
- package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
- package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
- package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
- package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
- package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
- package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
- package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
- package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
- package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
- package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
- package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
- package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
- package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
- package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
- package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
- package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
- package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
- package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
- package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
- package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
- package/dist/objectid-DEMM_jdR.js +145 -0
- package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
- package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
- package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
- package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
- package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
- package/dist/rule-builder-Deufb6h_.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DeebIqJ_.js +236 -0
- package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
- package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
- package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
- package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
- package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
- package/dist/vue-i18n-Cze706-f.js +2365 -0
- package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
- package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BPpdm96t.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
- package/dist/Grab-BWzdN_cd.js +0 -301
- package/dist/MainLayout-DwnjGXh6.js +0 -4
- package/dist/Marketing-DCco__2F.js +0 -273
- package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
- package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
- package/dist/Setting-CDM4RhLW.js +0 -574
- package/dist/Settings-D-0tvZRr.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
- package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
- package/dist/WhatsappBot-Cl64wG_F.js +0 -876
- package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
- package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
- package/dist/WhatsappLayout-C639d2HP.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
- package/dist/browser-BSAOEeIM.js +0 -1478
- package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
- package/dist/feature-flag-Bo-k5sIG.js +0 -50
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/index-C-iwb2Ln.js +0 -109
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-DQ8JJhxs.js +0 -74
- package/dist/objectid-C-wocWKI.js +0 -145
- package/dist/template-BZyFhr73.js +0 -188
- package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
- package/dist/vue-i18n-DWGiC_vs.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-Brid2wnu.js";
|
|
3
|
-
import { u as Q } from "./business-Bu5TqSA0.js";
|
|
4
|
-
import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as O } from "./vue-i18n-DWGiC_vs.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-CgimGODl.js";
|
|
9
|
-
import { useRouter as oe } from "vue-router";
|
|
10
|
-
import { r as $ } from "./index-Bhl5IRXy.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
|
-
};
|