@feedmepos/mf-connect 0.1.125-dev → 0.1.125-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-lOnYYWzx.js → App-VvS6HIoz.js} +216 -224
- package/dist/{Bin-Dk0rAESN.js → Bin-dVF9Q1iu.js} +8 -8
- package/dist/{Broadcast-BBNpuceo.js → Broadcast-BIZbCshz.js} +21 -22
- package/dist/{CampaignAnalytic-BgROt0Yu.js → CampaignAnalytic-Ci8Ryoig.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CrgCuB45.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CMgvX7Qs.js} +9 -8
- package/dist/{Card-fSEJaQmL.js → Card-CZkmyXaw.js} +22 -22
- package/dist/{Collections-DVM1dOOo.js → Collections-Inv8osLz.js} +185 -197
- package/dist/{Credit-CNDYRDiK.js → Credit-C0sAkt2c.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-Cup-EvR6.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BiJ_wHig.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B28ds81U.js +3493 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-JQmGeS__.js → EffectSheet.vue_vue_type_style_index_0_lang-BU1c2K1g.js} +33 -33
- package/dist/{Experience-Bqfx1Gjq.js → Experience-BNEfKjkq.js} +31 -32
- package/dist/{FileSaver.min-B4Jv2-PR.js → FileSaver.min-C5THVA6m.js} +1 -1
- package/dist/{Game-DmbJYYaC.js → Game-S9z8ZBF3.js} +18 -19
- package/dist/{GiftCardSetup-DHxDI5hU.js → GiftCardSetup-nVMJLp50.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BfrjE7gE.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DC2QB9kR.js} +7 -7
- package/dist/{Goals-B-3PoUlx.js → Goals-Do6Z0FfW.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-TUlgTblc.js → ImageInput.vue_vue_type_script_setup_true_lang-CFb4EUQ5.js} +1 -1
- package/dist/{Index-vfYiu7G1.js → Index-CLVDmWRo.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BKdq7bw2.js → LocationPicker.vue_vue_type_script_setup_true_lang-CZwKWjn6.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DUAKzHgZ.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CGPZUYnY.js} +1 -1
- package/dist/{LoyaltyDashboard-CHEIpAHw.js → LoyaltyDashboard-B_HpEQdz.js} +15 -15
- package/dist/{MainLayout-Cf1lEoHL.js → MainLayout-uQfsgnnu.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DwNxuVHy.js → MainLayout.vue_vue_type_script_setup_true_lang-DNPmnCA8.js} +3 -3
- package/dist/{Marketing-BBF8mHSo.js → Marketing-DPWybdMq.js} +4 -4
- package/dist/{MarketingMaterialEdit-COTHaH08.js → MarketingMaterialEdit-BfBgdPyz.js} +211 -214
- package/dist/{Member-BEyxcsNI.js → Member-Bkt3UPXA.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DLSsOeLt.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-EIc8nFZ0.js} +47 -39
- package/dist/{MemberImportHistory-zs8VJsoI.js → MemberImportHistory-DbzrfaI6.js} +7 -7
- package/dist/{MemberList-2-qKmm5p.js → MemberList-CAxUgRRp.js} +105 -103
- package/dist/{MemberTransactions-DOsMBs30.js → MemberTransactions-DDGkVcHw.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DBl4cf8X.js → MessageInput.vue_vue_type_script_setup_true_lang-C2D5J4Ja.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CtqBL-Ky.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-2f1SFptj.js} +1 -1
- package/dist/{Mission-Bo7tuR13.js → Mission-CTa5syv8.js} +21 -22
- package/dist/{Overview-BrGVMqE1.js → Overview-CD6Q9DJm.js} +20 -20
- package/dist/{Overview-CnoidK6U.js → Overview-DLXj9lo5.js} +144 -145
- package/dist/{Point-DJ2-HEmx.js → Point-ktWnL8q5.js} +21 -22
- package/dist/{Promotion-D7Q3EY3d.js → Promotion-hqaOxx8q.js} +131 -137
- package/dist/{Queue-CLXhXQeU.js → Queue-BE-fU8IM.js} +45 -45
- package/dist/{Record-CCF7K-pJ.js → Record-BEFt0lae.js} +9 -9
- package/dist/{Review-BZH_tGDe.js → Review-DcLFxegb.js} +2 -2
- package/dist/ReviewFacebookCallback-6BapqO6b.js +238 -0
- package/dist/{ReviewGoogleCallback-eHLJko2f.js → ReviewGoogleCallback-CQ1awmJH.js} +5 -5
- package/dist/{Reward-ea05o2qi.js → Reward-eZLQ_qzv.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Csa8UPMS.js → RewardGroup.vue_vue_type_script_setup_true_lang-DT4cU2lr.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CdWm80id.js +1884 -0
- package/dist/{Segment-z3BAGTqr.js → Segment-C1Xbqlcv.js} +306 -303
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D4H86p3o.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C_1xj3Cl.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-x8dMt8PF.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DwejRzlR.js} +4 -4
- package/dist/{Setting-D0nKTgej.js → Setting-Cg21mqEc.js} +17 -17
- package/dist/{SettingAdvertisements-BUGsMAdi.js → SettingAdvertisements-CA6x_w-6.js} +12 -12
- package/dist/Settings-CbrC5bN2.js +179 -0
- package/dist/{Store-CbhAyr1j.js → Store-CFDsun8N.js} +28 -28
- package/dist/{StoreRewards-DHt64JEN.js → StoreRewards-BhURDAsS.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CQ7I8Zli.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JkpE5XsA.js} +24 -24
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DzMfetDA.js +142 -0
- package/dist/{Tier-CH5DwMYW.js → Tier-B4iofOYH.js} +687 -2582
- package/dist/{Title-DNLw_rOp.js → Title-3YNx77l4.js} +94 -95
- package/dist/{Transaction-DCuU6B7G.js → Transaction-CX9SxMEG.js} +2 -2
- package/dist/{Upselling-DBsfEEvV.js → Upselling-CznVPMJC.js} +3 -3
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-f-j87AZA.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BZVdb3An.js} +26 -26
- package/dist/{Voucher-BVztDyI0.js → Voucher-7Hl1LPrh.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CrYrxFVi.js → VoucherEditor.vue_vue_type_script_setup_true_lang-dFJXQsFv.js} +12 -12
- package/dist/{WhatsappAccount-CobyTNkp.js → WhatsappAccount-DQbkWBel.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C-pbY0Zv.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CvqJzTXs.js} +1 -1
- package/dist/{WhatsappBot-xc4QD061.js → WhatsappBot-B0nZTeT7.js} +6 -6
- package/dist/{WhatsappBotLogs-eiDWJkN7.js → WhatsappBotLogs-DujpGQWa.js} +6 -6
- package/dist/{WhatsappBotSettings-D4cMFn3z.js → WhatsappBotSettings-CfhMycMW.js} +4 -4
- package/dist/{WhatsappLayout-C8DejCWo.js → WhatsappLayout-b1gwbBm0.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CZNpggfQ.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DiQnP4cp.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C6TJ4hxh.js → ZodTextField.vue_vue_type_script_setup_true_lang-Cidk_OlM.js} +2 -2
- package/dist/{app-Bik4hlr7.js → app-C5LDuXmt.js} +3517 -4271
- package/dist/app.js +3 -4
- package/dist/{base.export-BRw8QzdM.js → base.export-BBrPA7Jg.js} +2 -2
- package/dist/{business-Dv2S3X12.js → business-ClZ-GkSj.js} +1 -1
- package/dist/{campaign-witQNfmZ.js → campaign-B-h5N3HR.js} +94 -121
- package/dist/{campaign-CNDBsfeQ.js → campaign-DefEj7jV.js} +25 -31
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-C5ZXEU8C.js +776 -0
- package/dist/{collection.fn-C0Dx5_1j.js → collection.fn-DZ0ViZdo.js} +2 -2
- package/dist/{currency-lP50Csky.js → currency-C0Qn4nj3.js} +1 -1
- package/dist/{effect-6bi20cxS.js → effect-CJHdpc35.js} +1 -1
- package/dist/{email-addresses-BmujKG-l.js → email-addresses-CipYiyL4.js} +2 -2
- package/dist/{feature-flag-DdxBiP1p.js → feature-flag-BBsHJnnj.js} +84 -84
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-DSmzzBjW.js → helper-Cn8vgyK3.js} +1 -1
- package/dist/{index-2JiR1s6M.js → index-0Ub4nEKy.js} +1 -1
- package/dist/{index-CRd8uD-d.js → index-B2r_X6DR.js} +1 -1
- package/dist/{index-DGctCMca.js → index-BAvmo8cc.js} +23 -23
- package/dist/{index-CFhazRum.js → index-BREObqqd.js} +1242 -1314
- package/dist/{index-Cei8qPkg.js → index-BcjArc8W.js} +234 -380
- package/dist/{index-83SeIfhc.js → index-BcwGxZje.js} +251 -608
- package/dist/{index-BYlnybS9.js → index-BkXjF7ZI.js} +2 -2
- package/dist/{index-BNdhRCyN.js → index-BzLz01zb.js} +4 -4
- package/dist/{index-CEscBR6G.js → index-C5o2Pc_f.js} +2613 -2699
- package/dist/{index-DMT5xoCz.js → index-CWs0a5Bx.js} +3 -3
- package/dist/{index-D-Ln1G1Y.js → index-CZ3CQEXM.js} +1 -1
- package/dist/{index-DGz2Y25B.js → index-CazcZ2A4.js} +2 -2
- package/dist/{index-CCVnmv0l.js → index-DBqf8mMi.js} +6 -19
- package/dist/{index-CdQGmMRo.js → index-DKg5PbUy.js} +2 -2
- package/dist/{index-CH1MpmvS.js → index-DLKFoHdk.js} +8 -8
- package/dist/{index-B0Ddw1na.js → index-DYMRcL11.js} +197 -197
- package/dist/{index-373LDTQ7.js → index-Wm89O5a0.js} +1 -1
- package/dist/{index-BTud0ICl.js → index-auS6xhgf.js} +1 -1
- package/dist/{index-DjlmY7Od.js → index-sntP2S4R.js} +7 -7
- package/dist/{index-BD3HIAoL.js → index-xn_PXhGL.js} +1 -1
- package/dist/{index.esm2017-BcULj0z4.js → index.esm2017-ePnKsRWd.js} +57 -57
- package/dist/{loading-DmCJ1FiL.js → loading-DyfvdnK3.js} +1 -1
- package/dist/{lodash-FEhiisF1.js → lodash-OSOEHuHV.js} +1 -1
- package/dist/{member-import-BLxPVKon.js → member-import-DyKhgdl1.js} +1 -1
- package/dist/{membership-Dq3LSd35.js → membership-E97L9c1m.js} +2 -2
- package/dist/{money-D2RIG9zm.js → money-BizInVDg.js} +1 -1
- package/dist/{number-D87ngEVu.js → number-BLjNuAXB.js} +1 -1
- package/dist/objectid-CfbfYlrU.js +145 -0
- package/dist/{onboarding-YlSAcar0.js → onboarding-BVOkoMd2.js} +25 -25
- package/dist/{onboardingSetup-qgS6ktSi.js → onboardingSetup-WWZ5x3uC.js} +2 -2
- package/dist/{plugins-B3B_2EiB.js → plugins-BFwgESNo.js} +3 -3
- package/dist/{reward-BtEe_1ZU.js → reward-BOldgYfT.js} +1 -1
- package/dist/{rule-PmdBF8Cb.js → rule-CffnxtCw.js} +492 -572
- package/dist/rule-builder-dOQCz1XZ.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-CbHOOFuo.js +275 -0
- package/dist/{timezone-DPnmvzUK.js → timezone-CDbzzKWe.js} +1 -1
- package/dist/{transaction.fn-BavSYDYI.js → transaction.fn-CM89jnhJ.js} +2 -2
- package/dist/{trigger-CsIScoNI.js → trigger-BUKAiVxy.js} +9 -9
- package/dist/{useMarketingMaterialActions-CHBfA7iR.js → useMarketingMaterialActions-D-AWVN4e.js} +4 -4
- package/dist/{usePagination-DXPBbII4.js → usePagination-3kKtIKVu.js} +1 -1
- package/dist/{user-B8js0aIx.js → user-CHb8XZ5i.js} +1 -1
- package/dist/vue-i18n-CqhxVhhE.js +2365 -0
- package/dist/{xlsx-CYugHPG9.js → xlsx-BR-cAoRJ.js} +1 -1
- package/dist/{zod-BEFViLGC.js → zod-dX5GDNHW.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-C5aMzrhF.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CJ90EwzB.js +0 -4439
- package/dist/Grab-BRfVvqAr.js +0 -301
- package/dist/ReviewFacebookCallback-Bs-oiDMC.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DW3NDgHq.js +0 -1923
- package/dist/Settings-C2loJXla.js +0 -286
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-ylUyqix_.js +0 -7007
- package/dist/campaign.fn-Dr4w5BrO.js +0 -776
- package/dist/duplicateCampaign-BfLxdQWg.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-CuPXVpKE.js +0 -145
- package/dist/template-D6wO9_aV.js +0 -227
- package/dist/vue-i18n-R6DAeTzc.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-DmCJ1FiL.js";
|
|
3
|
-
import { u as Q } from "./business-Dv2S3X12.js";
|
|
4
|
-
import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as O } from "./vue-i18n-R6DAeTzc.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-Bik4hlr7.js";
|
|
9
|
-
import { useRouter as oe } from "vue-router";
|
|
10
|
-
import { r as $ } from "./index-CH1MpmvS.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
|
-
};
|