@feedmepos/mf-connect 0.1.96-prod → 0.1.98-beta.1
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-NtFnJR3D.js → App-EPNXLOQz.js} +118 -106
- package/dist/AuditLogs-CadZXkap.js +2013 -0
- package/dist/{Bin-DvJgE8J0.js → Bin-CEWFX1MK.js} +8 -8
- package/dist/{Broadcast-BygITJjC.js → Broadcast-DC8W46mc.js} +18 -17
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVuhePfe.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js} +5 -6
- package/dist/{Card-BY8qbjNS.js → Card-BLFHOVL5.js} +19 -19
- package/dist/{Collections-CXZxfQmy.js → Collections-CVQV9gAI.js} +197 -185
- package/dist/{Credit-Dj4gJd18.js → Credit-Bvd1uiUU.js} +18 -17
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DMHQ36PW.js +3377 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-IH5P2GQ4.js → EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js} +105 -101
- package/dist/{Experience-CKLT-XKN.js → Experience-bKhm3DP2.js} +35 -34
- package/dist/{FileSaver.min-CqZKU_4D.js → FileSaver.min-CgnAdnBE.js} +1 -1
- package/dist/{Game-CMXXSxs7.js → Game-BTZ5Ftp5.js} +16 -15
- package/dist/Grab-DMuSoVGl.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B4u8lwM_.js → ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js} +1 -1
- package/dist/{Index-CFGAKZTu.js → Index-BNh-_EZa.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-UfQtiVK3.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js} +1 -1
- package/dist/LoyaltyDashboard-Do06Mjzo.js +1082 -0
- package/dist/{MainLayout-UCAW-wwn.js → MainLayout-C_Zu8e2b.js} +1 -1
- package/dist/{Marketing-HU2MkAbE.js → Marketing-DHTow_lX.js} +4 -4
- package/dist/{MarketingMaterialEdit-CS7hzmeA.js → MarketingMaterialEdit-BZqVEaXl.js} +214 -211
- package/dist/{Member-BG1gvC8G.js → Member-DNQICbO9.js} +20 -20
- package/dist/{MemberList-C7l5YNJF.js → MemberList-B5f-zT_3.js} +50 -51
- package/dist/{MemberTransactions-RQD9xfSN.js → MemberTransactions-BmmgHC1I.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CcTrvGEk.js → MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js} +11 -11
- package/dist/{Mission-B2ynmUaz.js → Mission-CyUldhj4.js} +35 -34
- package/dist/{Overview-DI1MMGCM.js → Overview-If_YcRY8.js} +19 -19
- package/dist/{Point-DkLfnk6D.js → Point-DXgR4D2b.js} +30 -29
- package/dist/{Promotion-BDsMtw76.js → Promotion-8KrS5PGT.js} +111 -105
- package/dist/{Queue-Bu5PffRS.js → Queue-ypegp0sQ.js} +43 -43
- package/dist/{Record-C9zk5pr8.js → Record-C1eVdBIL.js} +10 -10
- package/dist/Review-fsYAsdHU.js +871 -0
- package/dist/ReviewFacebookCallback-zNKnoxr_.js +243 -0
- package/dist/ReviewGoogleCallback-CpCT0ZYL.js +213 -0
- package/dist/{Reward-DLyMbKCK.js → Reward-B_k-VLJn.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-XWcV6P7K.js → RewardGroup.vue_vue_type_script_setup_true_lang-BUl5B7lH.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js +1911 -0
- package/dist/{Segment-CkvTGYMI.js → Segment-PJLbJ6YE.js} +77 -78
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CmoGA4QY.js → SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js} +21 -21
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D0fupqWp.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CdPBhSHS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DOXfYdxf.js} +4 -4
- package/dist/{Setting-3aaebMiz.js → Setting-DItVUJHA.js} +259 -248
- package/dist/{SettingAdvertisements-B1rlNyFd.js → SettingAdvertisements-Bfvr60OW.js} +13 -13
- package/dist/{Store-7BnWIZ7G.js → Store-hyTJyNWv.js} +24 -24
- package/dist/{StoreRewards-CjcrPRwJ.js → StoreRewards-B7c20AF5.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBb3Zfuz.js +7007 -0
- package/dist/{Tier-BJpbCCsL.js → Tier-CuulnY8J.js} +544 -469
- package/dist/{Title-CqpbvePy.js → Title-Bf9ZiFGW.js} +93 -92
- package/dist/{Transaction-B8gpL3cS.js → Transaction-reVAaf86.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DDoia_qu.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js} +6 -6
- package/dist/{Voucher-DQ6i1GyQ.js → Voucher-E8R2cCl-.js} +28 -27
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BudfxMvl.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B43ehs2w.js → ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js} +2 -2
- package/dist/{app-Cdi9yyaa.js → app-BdRRCAGj.js} +47089 -32960
- package/dist/app.js +4 -3
- package/dist/{business-BPhMhPp8.js → business-caUtvXxX.js} +1 -1
- package/dist/{campaign-DHqBhgh5.js → campaign-CDFEhdIH.js} +13 -7
- package/dist/{campaign-DLWpOBzd.js → campaign-CPtzFxiR.js} +114 -64
- package/dist/campaign.enum-p1buII_I.js +26 -0
- package/dist/campaign.fn-DerIK7yj.js +776 -0
- package/dist/{collectible.enum-EoZwnXkR.js → collectible.enum-CJ30_XmW.js} +1 -1
- package/dist/duplicateCampaign-DLfhHm07.js +51 -0
- package/dist/effect-BJC34M9S.js +89 -0
- package/dist/{email-addresses-CuhtzvMR.js → email-addresses-D1aYCi0p.js} +2 -2
- package/dist/{export-D2wb3Zzg.js → export-ChFEuUc5.js} +3 -3
- package/dist/{helper-B80tn5O6.js → helper-BNWd3eM2.js} +1 -1
- package/dist/{timezone-BIzl2Gac.js → index-0SZADZbB.js} +21 -20
- package/dist/{index-B85ryzLj.js → index-6ZSFSZ-H.js} +769 -205
- package/dist/index-B4dazSVT.js +48 -0
- package/dist/{index-C7XyuCH8.js → index-B9xvXnEM.js} +3 -3
- package/dist/{index-Dg-VScjz.js → index-BWQK3rqq.js} +3 -3
- package/dist/{index-D1_JoBc_.js → index-BoeHTTcl.js} +1 -1
- package/dist/{index-CCfDzgJb.js → index-Br17eSOV.js} +1 -1
- package/dist/{index-HzTI8A55.js → index-CAVSuo6k.js} +1996 -1968
- package/dist/{index-B0S0BGjb.js → index-CIin0Pv0.js} +1 -1
- package/dist/{index-BVXwb1vw.js → index-CeSEAz_T.js} +1 -1
- package/dist/{index-DDLHaeVd.js → index-DNsYSxpY.js} +1539 -1267
- package/dist/index-Dcn4qaYt.js +67 -0
- package/dist/{index-DA5sHUgD.js → index-Do2cnzep.js} +1 -1
- package/dist/{index-v9zPLkiJ.js → index-Dp3CLZSg.js} +7 -7
- package/dist/{index.esm2017-CfogVJWR.js → index.esm2017-CYGo-PcK.js} +173 -173
- package/dist/{loading-_HLw0JNH.js → loading-DtPQnEA5.js} +1 -1
- package/dist/{lodash-7LLl_N0k.js → lodash-BvTKz5Pn.js} +1 -1
- package/dist/{membership-Dl34LatD.js → membership-Csnvqeql.js} +3 -3
- package/dist/{money-Ca4jlK9c.js → money-CwRxILG1.js} +1 -1
- package/dist/{number-CWjqupZw.js → number-qcECHCpu.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-BKWyHH4F.js +145 -0
- package/dist/{plugins-uNooTC4W.js → plugins-BBpKk0ld.js} +94 -95
- package/dist/{reward-BRIYprM8.js → reward-CX1axU5-.js} +1 -1
- package/dist/{rule-CkUScWS-.js → rule-pKsATz8r.js} +505 -487
- package/dist/style.css +1 -1
- package/dist/template-BSuapoPb.js +188 -0
- package/dist/{trigger-Dd92AYz3.js → trigger-DnMktlx-.js} +5 -5
- package/dist/{useMarketingMaterialActions-DlEYiRxQ.js → useMarketingMaterialActions-Bu0-ny3z.js} +3 -3
- package/dist/{usePagination--trERWY4.js → usePagination-CzfJhepV.js} +1 -1
- package/dist/{user-CI-tPhnX.js → user-BLDWqYm_.js} +1 -1
- package/dist/vue-i18n-bssxjuw_.js +2365 -0
- package/dist/{xlsx-BtsmiXIl.js → xlsx-xNwsJDub.js} +1 -1
- package/dist/{zod-Cq4jls5y.js → zod-Cu18aMVT.js} +1 -1
- package/package.json +8 -4
- package/dist/Analytic-l10g_BkW.js +0 -426
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Djcv8RCR.js +0 -2223
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BW2MrhuC.js +0 -1888
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C3mmS25r.js +0 -1118
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-TVsbx26f.js +0 -142
- package/dist/campaign.enum-C7BourYN.js +0 -20
- package/dist/campaign.fn-PjAM2LtF.js +0 -776
- package/dist/collection.fn-Ds616d3q.js +0 -26
- package/dist/dto-5fg5RWhP.js +0 -216
- package/dist/effect-BJva6Fjl.js +0 -78
- package/dist/index-CmGQazKB.js +0 -55
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-BGNEnJDn.js +0 -145
- package/dist/rule-builder-Ds-h-MuV.js +0 -102
- package/dist/template-0zuNVS82.js +0 -236
- package/dist/vue-i18n-BIM-SckA.js +0 -2365
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { defineComponent as S, computed as T, openBlock as d, createElementBlock as g, normalizeClass as z, createElementVNode as m, createBlock as C, unref as e, toDisplayString as k, createCommentVNode as $, createVNode as v, onMounted as B, ref as P, Fragment as E, renderList as N, resolveComponent as R, isRef as U } from "vue";
|
|
2
|
+
import { u as M } from "./vue-i18n-bssxjuw_.js";
|
|
3
|
+
import { components as x } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as L } from "./index-B4dazSVT.js";
|
|
5
|
+
import { u as V } from "./business-caUtvXxX.js";
|
|
6
|
+
import { _ as A } from "./LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js";
|
|
7
|
+
import { useRouter as H } from "vue-router";
|
|
8
|
+
const D = ["src"], q = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, G = {
|
|
9
|
+
key: 2,
|
|
10
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
11
|
+
}, J = /* @__PURE__ */ S({
|
|
12
|
+
__name: "FacebookPageConfig",
|
|
13
|
+
props: {
|
|
14
|
+
page: {},
|
|
15
|
+
expanded: { type: Boolean },
|
|
16
|
+
availableLocations: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["toggleExpand", "toggleLocation"],
|
|
19
|
+
setup(c, { emit: n }) {
|
|
20
|
+
const b = c, i = n, { t: h } = M(), f = T(
|
|
21
|
+
() => b.page.locations.map((_) => _._id)
|
|
22
|
+
);
|
|
23
|
+
return (_, l) => (d(), g("div", {
|
|
24
|
+
class: z([
|
|
25
|
+
"rounded-lg border overflow-hidden transition-colors",
|
|
26
|
+
c.expanded ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
27
|
+
])
|
|
28
|
+
}, [
|
|
29
|
+
m("button", {
|
|
30
|
+
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
31
|
+
onClick: l[0] || (l[0] = (w) => i("toggleExpand"))
|
|
32
|
+
}, [
|
|
33
|
+
c.page.pageProfileImageUrl ? (d(), g("img", {
|
|
34
|
+
key: 0,
|
|
35
|
+
src: c.page.pageProfileImageUrl,
|
|
36
|
+
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
37
|
+
}, null, 8, D)) : (d(), C(e(x).FmIcon, {
|
|
38
|
+
key: 1,
|
|
39
|
+
name: "thumb_up",
|
|
40
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
41
|
+
})),
|
|
42
|
+
m("span", q, k(c.page.pageName), 1),
|
|
43
|
+
c.page.locations.length > 0 ? (d(), g("span", G, k(e(h)("connect.review.locationsSelected", c.page.locations.length)), 1)) : $("", !0),
|
|
44
|
+
v(e(x).FmIcon, {
|
|
45
|
+
name: c.expanded ? "expand_less" : "expand_more",
|
|
46
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
47
|
+
}, null, 8, ["name"])
|
|
48
|
+
]),
|
|
49
|
+
c.expanded ? (d(), C(A, {
|
|
50
|
+
key: 0,
|
|
51
|
+
locations: c.availableLocations,
|
|
52
|
+
"selected-ids": e(f),
|
|
53
|
+
onToggle: l[1] || (l[1] = (w) => i("toggleLocation", w))
|
|
54
|
+
}, null, 8, ["locations", "selected-ids"])) : $("", !0)
|
|
55
|
+
], 2));
|
|
56
|
+
}
|
|
57
|
+
}), K = { class: "flex flex-col gap-8" }, O = /* @__PURE__ */ S({
|
|
58
|
+
__name: "FacebookPageLocationMapping",
|
|
59
|
+
props: {
|
|
60
|
+
pages: {}
|
|
61
|
+
},
|
|
62
|
+
emits: ["update:pages"],
|
|
63
|
+
setup(c, { emit: n }) {
|
|
64
|
+
const b = c, i = V();
|
|
65
|
+
B(() => i.readLocations());
|
|
66
|
+
const h = n, f = P(null), _ = T(() => {
|
|
67
|
+
const r = /* @__PURE__ */ new Set();
|
|
68
|
+
for (const p of b.pages)
|
|
69
|
+
p.locations.forEach((a) => r.add(a._id));
|
|
70
|
+
return r;
|
|
71
|
+
});
|
|
72
|
+
function l(r) {
|
|
73
|
+
const p = new Set(r.locations.map((a) => a._id));
|
|
74
|
+
return i.locations.filter((a) => {
|
|
75
|
+
const t = a._id.toString();
|
|
76
|
+
return !_.value.has(t) || p.has(t);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function w(r, p) {
|
|
80
|
+
const a = p._id.toString(), t = b.pages.map((o) => {
|
|
81
|
+
if (o.facebookPageId !== r) return o;
|
|
82
|
+
const u = o.locations.some(
|
|
83
|
+
(s) => s._id === a
|
|
84
|
+
);
|
|
85
|
+
return {
|
|
86
|
+
...o,
|
|
87
|
+
locations: u ? o.locations.filter((s) => s._id !== a) : [
|
|
88
|
+
...o.locations,
|
|
89
|
+
{
|
|
90
|
+
_id: a,
|
|
91
|
+
name: p.name
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
h("update:pages", t);
|
|
97
|
+
}
|
|
98
|
+
function I(r) {
|
|
99
|
+
f.value = f.value === r ? null : r;
|
|
100
|
+
}
|
|
101
|
+
return (r, p) => (d(), g("div", K, [
|
|
102
|
+
(d(!0), g(E, null, N(c.pages, (a) => (d(), C(J, {
|
|
103
|
+
key: a.facebookPageId,
|
|
104
|
+
page: a,
|
|
105
|
+
expanded: e(f) === a.facebookPageId,
|
|
106
|
+
"available-locations": l(a),
|
|
107
|
+
onToggleExpand: (t) => I(a.facebookPageId),
|
|
108
|
+
onToggleLocation: (t) => w(a.facebookPageId, t)
|
|
109
|
+
}, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
|
|
110
|
+
]));
|
|
111
|
+
}
|
|
112
|
+
}), Q = { class: "flex flex-col min-h-full gap-16 p-24" }, W = {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
115
|
+
}, X = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Y = {
|
|
116
|
+
key: 1,
|
|
117
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
118
|
+
}, Z = { class: "fm-typo-en-body-lg-600" }, ee = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, oe = {
|
|
119
|
+
key: 2,
|
|
120
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
121
|
+
}, te = { class: "fm-typo-en-body-lg-600" }, ne = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ae = { class: "fm-typo-en-body-lg-600" }, se = { class: "flex gap-8 justify-end mt-auto pt-8" }, ge = /* @__PURE__ */ S({
|
|
122
|
+
__name: "ReviewFacebookCallback",
|
|
123
|
+
setup(c) {
|
|
124
|
+
const { t: n } = M(), b = H(), i = P([]), h = P(!1), f = P(!1), _ = P(!1), l = P(null), w = T(
|
|
125
|
+
() => i.value.some((t) => t.locations.length > 0)
|
|
126
|
+
);
|
|
127
|
+
function I(t, o) {
|
|
128
|
+
const u = new Map(
|
|
129
|
+
o.map((s) => [s.facebookPageId, s])
|
|
130
|
+
);
|
|
131
|
+
return t.map((s) => {
|
|
132
|
+
var y;
|
|
133
|
+
return {
|
|
134
|
+
...s,
|
|
135
|
+
locations: ((y = u.get(s.facebookPageId)) == null ? void 0 : y.locations) ?? []
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function r(t, o) {
|
|
140
|
+
return t instanceof Error ? t.message : o;
|
|
141
|
+
}
|
|
142
|
+
async function p() {
|
|
143
|
+
var s;
|
|
144
|
+
const t = window.location.hash;
|
|
145
|
+
if (!t) {
|
|
146
|
+
l.value = n("connect.review.noToken");
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const u = new URLSearchParams(t.slice(1)).get("access_token");
|
|
150
|
+
if (!u) {
|
|
151
|
+
l.value = n("connect.review.noToken");
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
h.value = !0;
|
|
155
|
+
try {
|
|
156
|
+
const y = await L.getSource(), j = ((s = y == null ? void 0 : y.facebook) == null ? void 0 : s.pages) ?? [], F = await L.connectFacebook(u);
|
|
157
|
+
i.value = I((F == null ? void 0 : F.pages) ?? [], j), i.value.length === 0 && (l.value = n("connect.review.facebook.noPages"));
|
|
158
|
+
} catch (y) {
|
|
159
|
+
l.value = r(y, n("connect.review.facebook.failed"));
|
|
160
|
+
} finally {
|
|
161
|
+
h.value = !1;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
async function a() {
|
|
165
|
+
const t = i.value.filter((o) => o.locations.length > 0).map((o) => ({
|
|
166
|
+
facebookPageId: o.facebookPageId,
|
|
167
|
+
locationIds: o.locations.map((u) => u._id)
|
|
168
|
+
}));
|
|
169
|
+
if (t.length === 0) {
|
|
170
|
+
l.value = n("connect.review.noMappings");
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
f.value = !0;
|
|
174
|
+
try {
|
|
175
|
+
await L.updateFacebookPages(t), _.value = !0, setTimeout(() => b.replace("/review"), 2e3);
|
|
176
|
+
} catch (o) {
|
|
177
|
+
l.value = r(o, n("connect.review.facebook.failed"));
|
|
178
|
+
} finally {
|
|
179
|
+
f.value = !1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return B(p), (t, o) => {
|
|
183
|
+
const u = R("FmPageHead");
|
|
184
|
+
return d(), g(E, null, [
|
|
185
|
+
v(u, {
|
|
186
|
+
title: e(n)("connect.navigation.review")
|
|
187
|
+
}, null, 8, ["title"]),
|
|
188
|
+
m("div", Q, [
|
|
189
|
+
e(h) ? (d(), g("div", W, [
|
|
190
|
+
v(e(x).FmIcon, {
|
|
191
|
+
name: "sync",
|
|
192
|
+
size: "xl",
|
|
193
|
+
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
194
|
+
}),
|
|
195
|
+
m("p", X, k(e(n)("connect.review.facebook.fetching")), 1)
|
|
196
|
+
])) : e(_) ? (d(), g("div", Y, [
|
|
197
|
+
v(e(x).FmIcon, {
|
|
198
|
+
name: "check_circle",
|
|
199
|
+
size: "xl",
|
|
200
|
+
class: "text-fm-color-typo-success"
|
|
201
|
+
}),
|
|
202
|
+
m("p", Z, k(e(n)("connect.review.facebook.success")), 1),
|
|
203
|
+
m("p", ee, k(e(n)("connect.review.redirecting")), 1)
|
|
204
|
+
])) : e(l) ? (d(), g("div", oe, [
|
|
205
|
+
v(e(x).FmIcon, {
|
|
206
|
+
name: "error",
|
|
207
|
+
size: "xl",
|
|
208
|
+
class: "text-fm-color-system-error-500"
|
|
209
|
+
}),
|
|
210
|
+
m("p", te, k(e(n)("connect.review.errorTitle")), 1),
|
|
211
|
+
m("p", ne, k(e(l)), 1),
|
|
212
|
+
v(e(x).FmButton, {
|
|
213
|
+
label: e(n)("connect.review.goBack"),
|
|
214
|
+
onClick: o[0] || (o[0] = (s) => e(b).replace("/review"))
|
|
215
|
+
}, null, 8, ["label"])
|
|
216
|
+
])) : e(i).length > 0 ? (d(), g(E, { key: 3 }, [
|
|
217
|
+
m("p", ae, k(e(n)("connect.review.facebook.selectPage")), 1),
|
|
218
|
+
v(O, {
|
|
219
|
+
pages: e(i),
|
|
220
|
+
"onUpdate:pages": o[1] || (o[1] = (s) => U(i) ? i.value = s : null)
|
|
221
|
+
}, null, 8, ["pages"]),
|
|
222
|
+
m("div", se, [
|
|
223
|
+
v(e(x).FmButton, {
|
|
224
|
+
variant: "outlined",
|
|
225
|
+
label: e(n)("connect.review.cancel"),
|
|
226
|
+
onClick: o[2] || (o[2] = (s) => e(b).replace("/review"))
|
|
227
|
+
}, null, 8, ["label"]),
|
|
228
|
+
v(e(x).FmButton, {
|
|
229
|
+
label: e(n)("connect.review.connect"),
|
|
230
|
+
disabled: !e(w),
|
|
231
|
+
loading: e(f),
|
|
232
|
+
onClick: a
|
|
233
|
+
}, null, 8, ["label", "disabled", "loading"])
|
|
234
|
+
])
|
|
235
|
+
], 64)) : $("", !0)
|
|
236
|
+
])
|
|
237
|
+
], 64);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
export {
|
|
242
|
+
ge as default
|
|
243
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { defineComponent as $, onMounted as B, ref as w, computed as T, openBlock as g, createElementBlock as v, Fragment as F, renderList as M, normalizeClass as j, unref as e, createElementVNode as u, createVNode as d, toDisplayString as y, createCommentVNode as S, createBlock as z, resolveComponent as G, isRef as R } from "vue";
|
|
2
|
+
import { u as P } from "./vue-i18n-bssxjuw_.js";
|
|
3
|
+
import { components as _ } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as C } from "./index-B4dazSVT.js";
|
|
5
|
+
import { u as V } from "./business-caUtvXxX.js";
|
|
6
|
+
import { _ as A } from "./LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js";
|
|
7
|
+
import { useRouter as H } from "vue-router";
|
|
8
|
+
const U = { class: "flex flex-col gap-8" }, D = ["onClick"], q = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, J = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
11
|
+
}, K = /* @__PURE__ */ $({
|
|
12
|
+
__name: "GoogleLocationMapping",
|
|
13
|
+
props: {
|
|
14
|
+
locations: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:locations"],
|
|
17
|
+
setup(L, { emit: a }) {
|
|
18
|
+
const x = L, i = a, h = V();
|
|
19
|
+
B(() => h.readLocations());
|
|
20
|
+
const f = w(null), b = T(() => {
|
|
21
|
+
const s = /* @__PURE__ */ new Set();
|
|
22
|
+
for (const m of x.locations)
|
|
23
|
+
m.locationId && s.add(m.locationId);
|
|
24
|
+
return s;
|
|
25
|
+
});
|
|
26
|
+
function r(s) {
|
|
27
|
+
return h.locations.filter((m) => {
|
|
28
|
+
const t = m._id.toString();
|
|
29
|
+
return !b.value.has(t) || s.locationId === t;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function N(s, m) {
|
|
33
|
+
const t = m._id.toString(), n = x.locations.map((o) => {
|
|
34
|
+
if (o.googleLocationName !== s) return o;
|
|
35
|
+
const p = o.locationId === t;
|
|
36
|
+
return {
|
|
37
|
+
...o,
|
|
38
|
+
locationId: p ? null : t,
|
|
39
|
+
locationName: p ? null : m.name
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
i("update:locations", n);
|
|
43
|
+
}
|
|
44
|
+
function k(s) {
|
|
45
|
+
f.value = f.value === s ? null : s;
|
|
46
|
+
}
|
|
47
|
+
return (s, m) => (g(), v("div", U, [
|
|
48
|
+
(g(!0), v(F, null, M(L.locations, (t) => (g(), v("div", {
|
|
49
|
+
key: t.googleLocationName,
|
|
50
|
+
class: j([
|
|
51
|
+
"rounded-lg border overflow-hidden transition-colors",
|
|
52
|
+
e(f) === t.googleLocationName ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
53
|
+
])
|
|
54
|
+
}, [
|
|
55
|
+
u("button", {
|
|
56
|
+
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
57
|
+
onClick: (n) => k(t.googleLocationName)
|
|
58
|
+
}, [
|
|
59
|
+
d(e(_).FmIcon, {
|
|
60
|
+
name: "storefront",
|
|
61
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
62
|
+
}),
|
|
63
|
+
u("span", q, y(t.displayName || t.googleLocationName), 1),
|
|
64
|
+
t.locationName ? (g(), v("span", J, y(t.locationName), 1)) : S("", !0),
|
|
65
|
+
d(e(_).FmIcon, {
|
|
66
|
+
name: e(f) === t.googleLocationName ? "expand_less" : "expand_more",
|
|
67
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
68
|
+
}, null, 8, ["name"])
|
|
69
|
+
], 8, D),
|
|
70
|
+
e(f) === t.googleLocationName ? (g(), z(A, {
|
|
71
|
+
key: 0,
|
|
72
|
+
locations: r(t),
|
|
73
|
+
"selected-ids": t.locationId ? [t.locationId] : [],
|
|
74
|
+
onToggle: (n) => N(t.googleLocationName, n)
|
|
75
|
+
}, null, 8, ["locations", "selected-ids", "onToggle"])) : S("", !0)
|
|
76
|
+
], 2))), 128))
|
|
77
|
+
]));
|
|
78
|
+
}
|
|
79
|
+
}), O = { class: "flex flex-col min-h-full gap-16 p-24" }, Q = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
82
|
+
}, W = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, X = {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
85
|
+
}, Y = { class: "fm-typo-en-body-lg-600" }, Z = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ee = {
|
|
86
|
+
key: 2,
|
|
87
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
88
|
+
}, oe = { class: "fm-typo-en-body-lg-600" }, te = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ne = { class: "fm-typo-en-body-lg-600" }, ae = { class: "flex gap-8 justify-end mt-auto pt-8" }, de = /* @__PURE__ */ $({
|
|
89
|
+
__name: "ReviewGoogleCallback",
|
|
90
|
+
setup(L) {
|
|
91
|
+
const { t: a } = P(), x = H(), i = w([]), h = w(!1), f = w(!1), b = w(!1), r = w(null), N = T(
|
|
92
|
+
() => i.value.some((n) => n.locationId !== null)
|
|
93
|
+
);
|
|
94
|
+
function k(n, o) {
|
|
95
|
+
return n instanceof Error ? n.message : o;
|
|
96
|
+
}
|
|
97
|
+
function s(n, o) {
|
|
98
|
+
const p = new Map(
|
|
99
|
+
o.map((l) => [l.googleLocationName, l.location])
|
|
100
|
+
);
|
|
101
|
+
return n.map((l) => {
|
|
102
|
+
const c = p.get(l.googleLocationName) ?? null;
|
|
103
|
+
return {
|
|
104
|
+
googleLocationName: l.googleLocationName,
|
|
105
|
+
displayName: l.displayName,
|
|
106
|
+
locationId: (c == null ? void 0 : c._id) ?? null,
|
|
107
|
+
locationName: (c == null ? void 0 : c.name) ?? null
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async function m() {
|
|
112
|
+
var l;
|
|
113
|
+
const n = window.location.hash;
|
|
114
|
+
if (!n) {
|
|
115
|
+
r.value = a("connect.review.noToken");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const p = new URLSearchParams(n.slice(1)).get("access_token");
|
|
119
|
+
if (!p) {
|
|
120
|
+
r.value = a("connect.review.noToken");
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
h.value = !0;
|
|
124
|
+
try {
|
|
125
|
+
const c = await C.getSource(), E = ((l = c == null ? void 0 : c.google) == null ? void 0 : l.locations) ?? [], I = await C.connectGoogle(p);
|
|
126
|
+
i.value = s((I == null ? void 0 : I.locations) ?? [], E), i.value.length === 0 && (r.value = a("connect.review.google.noLocations"));
|
|
127
|
+
} catch (c) {
|
|
128
|
+
r.value = k(c, a("connect.review.google.failed"));
|
|
129
|
+
} finally {
|
|
130
|
+
h.value = !1;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async function t() {
|
|
134
|
+
const n = i.value.map((o) => ({
|
|
135
|
+
googleLocationName: o.googleLocationName,
|
|
136
|
+
displayName: o.displayName,
|
|
137
|
+
locationId: o.locationId
|
|
138
|
+
}));
|
|
139
|
+
if (n.length === 0) {
|
|
140
|
+
r.value = a("connect.review.noMappings");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
f.value = !0;
|
|
144
|
+
try {
|
|
145
|
+
await C.updateGoogleLocations(n), b.value = !0, setTimeout(() => x.replace("/review"), 2e3);
|
|
146
|
+
} catch (o) {
|
|
147
|
+
r.value = k(o, a("connect.review.google.failed"));
|
|
148
|
+
} finally {
|
|
149
|
+
f.value = !1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return B(m), (n, o) => {
|
|
153
|
+
const p = G("FmPageHead");
|
|
154
|
+
return g(), v(F, null, [
|
|
155
|
+
d(p, {
|
|
156
|
+
title: e(a)("connect.navigation.review")
|
|
157
|
+
}, null, 8, ["title"]),
|
|
158
|
+
u("div", O, [
|
|
159
|
+
e(h) ? (g(), v("div", Q, [
|
|
160
|
+
d(e(_).FmIcon, {
|
|
161
|
+
name: "sync",
|
|
162
|
+
size: "xl",
|
|
163
|
+
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
164
|
+
}),
|
|
165
|
+
u("p", W, y(e(a)("connect.review.google.fetching")), 1)
|
|
166
|
+
])) : e(b) ? (g(), v("div", X, [
|
|
167
|
+
d(e(_).FmIcon, {
|
|
168
|
+
name: "check_circle",
|
|
169
|
+
size: "xl",
|
|
170
|
+
class: "text-fm-color-typo-success"
|
|
171
|
+
}),
|
|
172
|
+
u("p", Y, y(e(a)("connect.review.google.success")), 1),
|
|
173
|
+
u("p", Z, y(e(a)("connect.review.redirecting")), 1)
|
|
174
|
+
])) : e(r) ? (g(), v("div", ee, [
|
|
175
|
+
d(e(_).FmIcon, {
|
|
176
|
+
name: "error",
|
|
177
|
+
size: "xl",
|
|
178
|
+
class: "text-fm-color-system-error-500"
|
|
179
|
+
}),
|
|
180
|
+
u("p", oe, y(e(a)("connect.review.errorTitle")), 1),
|
|
181
|
+
u("p", te, y(e(r)), 1),
|
|
182
|
+
d(e(_).FmButton, {
|
|
183
|
+
label: e(a)("connect.review.goBack"),
|
|
184
|
+
onClick: o[0] || (o[0] = (l) => e(x).replace("/review"))
|
|
185
|
+
}, null, 8, ["label"])
|
|
186
|
+
])) : e(i).length > 0 ? (g(), v(F, { key: 3 }, [
|
|
187
|
+
u("p", ne, y(e(a)("connect.review.google.selectLocation")), 1),
|
|
188
|
+
d(K, {
|
|
189
|
+
locations: e(i),
|
|
190
|
+
"onUpdate:locations": o[1] || (o[1] = (l) => R(i) ? i.value = l : null)
|
|
191
|
+
}, null, 8, ["locations"]),
|
|
192
|
+
u("div", ae, [
|
|
193
|
+
d(e(_).FmButton, {
|
|
194
|
+
variant: "outlined",
|
|
195
|
+
label: e(a)("connect.review.cancel"),
|
|
196
|
+
onClick: o[2] || (o[2] = (l) => e(x).replace("/review"))
|
|
197
|
+
}, null, 8, ["label"]),
|
|
198
|
+
d(e(_).FmButton, {
|
|
199
|
+
label: e(a)("connect.review.connect"),
|
|
200
|
+
disabled: !e(N),
|
|
201
|
+
loading: e(f),
|
|
202
|
+
onClick: t
|
|
203
|
+
}, null, 8, ["label", "disabled", "loading"])
|
|
204
|
+
])
|
|
205
|
+
], 64)) : S("", !0)
|
|
206
|
+
])
|
|
207
|
+
], 64);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
export {
|
|
212
|
+
de as default
|
|
213
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as O, onMounted as q, toDisplayString as B } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as Q, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as G } from "./loading-
|
|
5
|
-
import { u as J, C as ee } from "./membership-
|
|
6
|
-
import { f as j, p as te } from "./plugins-
|
|
7
|
-
import { u as oe } from "./vue-i18n-
|
|
8
|
-
import { c as ae } from "./object-
|
|
9
|
-
import { Z as _ } from "./zod-
|
|
10
|
-
import "./index-
|
|
11
|
-
import { F as N } from "./index-
|
|
4
|
+
import { u as G } from "./loading-DtPQnEA5.js";
|
|
5
|
+
import { u as J, C as ee } from "./membership-Csnvqeql.js";
|
|
6
|
+
import { f as j, p as te } from "./plugins-BBpKk0ld.js";
|
|
7
|
+
import { u as oe } from "./vue-i18n-bssxjuw_.js";
|
|
8
|
+
import { c as ae } from "./object-BYyQ0PZp.js";
|
|
9
|
+
import { Z as _ } from "./zod-Cu18aMVT.js";
|
|
10
|
+
import "./index-CAVSuo6k.js";
|
|
11
|
+
import { F as N } from "./index-B9xvXnEM.js";
|
|
12
12
|
import { useCoreStore as le } from "@feedmepos/mf-common";
|
|
13
|
-
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
13
|
+
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js";
|
|
14
|
+
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js";
|
|
15
15
|
import { J as K } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { i as de } from "./helper-
|
|
18
|
-
import { u as pe, r as P } from "./reward-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { C as ce } from "./campaign.fn-
|
|
21
|
-
import { e as me } from "./effect-
|
|
16
|
+
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js";
|
|
17
|
+
import { i as de } from "./helper-BNWd3eM2.js";
|
|
18
|
+
import { u as pe, r as P } from "./reward-CX1axU5-.js";
|
|
19
|
+
import "./index-Br17eSOV.js";
|
|
20
|
+
import { C as ce } from "./campaign.fn-DerIK7yj.js";
|
|
21
|
+
import { e as me } from "./effect-BJC34M9S.js";
|
|
22
22
|
import { useRouter as ue } from "vue-router";
|
|
23
|
-
import { R as ye } from "./app-
|
|
23
|
+
import { R as ye } from "./app-BdRRCAGj.js";
|
|
24
24
|
const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
|
|
25
25
|
__name: "EditRewardSheet",
|
|
26
26
|
emits: ["update"],
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ref as p, defineComponent as T, computed as x, resolveComponent as y, openBlock as U, createBlock as G, unref as e, isRef as $, withCtx as b, createElementVNode as v, createVNode as u, toDisplayString as j } from "vue";
|
|
2
|
-
import { u as B } from "./loading-
|
|
2
|
+
import { u as B } from "./loading-DtPQnEA5.js";
|
|
3
3
|
import { J as P } from "./JsonViewer-v8_C7l5N.js";
|
|
4
|
-
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { Z as L } from "./zod-
|
|
4
|
+
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js";
|
|
5
|
+
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js";
|
|
6
|
+
import { Z as L } from "./zod-Cu18aMVT.js";
|
|
7
7
|
import { u as V } from "./app-wDQR6dpb.js";
|
|
8
8
|
import { defineStore as N } from "pinia";
|
|
9
|
-
import { r as k } from "./index-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import
|
|
14
|
-
import "./index-
|
|
15
|
-
import { u as J } from "./vue-i18n-
|
|
16
|
-
import { c as C } from "./object-
|
|
9
|
+
import { r as k } from "./index-Do2cnzep.js";
|
|
10
|
+
import { d as E } from "./index-6ZSFSZ-H.js";
|
|
11
|
+
import "./index-DNsYSxpY.js";
|
|
12
|
+
import "./index-CAVSuo6k.js";
|
|
13
|
+
import "./index-BWQK3rqq.js";
|
|
14
|
+
import "./index-B9xvXnEM.js";
|
|
15
|
+
import { u as J } from "./vue-i18n-bssxjuw_.js";
|
|
16
|
+
import { c as C } from "./object-BYyQ0PZp.js";
|
|
17
17
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
18
18
|
const A = N("mf-connect-referral", () => {
|
|
19
19
|
const h = p();
|