@feedmepos/mf-connect 0.1.98-beta.10 → 0.1.98-beta.12

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.
Files changed (103) hide show
  1. package/dist/{App-CuoqxGQ_.js → App-D6itaLJw.js} +794 -654
  2. package/dist/{AuditLogs-3VOqNuiy.js → AuditLogs-CQ0stjyy.js} +9 -9
  3. package/dist/{Bin-DJAVHuWd.js → Bin-CJDe9-rE.js} +8 -8
  4. package/dist/{Broadcast-u9MAxxwk.js → Broadcast-z-DB523F.js} +9 -9
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-h5E8WsFD.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DLb3CkoH.js} +5 -5
  6. package/dist/{Card-DxH_641i.js → Card-s98kesqz.js} +18 -18
  7. package/dist/{Collections-C9La6TzV.js → Collections-CqXLzsl_.js} +7 -7
  8. package/dist/{Credit-DmRE1f4J.js → Credit-DQQTkcIs.js} +9 -9
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DpOkDd5R.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BVYLFX8W.js} +30 -30
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CS34jatD.js → EffectSheet.vue_vue_type_style_index_0_lang-BuyX7O0S.js} +6 -6
  11. package/dist/{Experience-C0FyDsmi.js → Experience-Dgfkur9H.js} +9 -9
  12. package/dist/{FileSaver.min-Be-90ifa.js → FileSaver.min-CQUlapCd.js} +1 -1
  13. package/dist/{Game-DYi-DQBb.js → Game-B8MqrMr5.js} +10 -10
  14. package/dist/{Grab-BpIj6ILT.js → Grab-C8CQfv0e.js} +8 -8
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-yfl42RYQ.js → ImageInput.vue_vue_type_script_setup_true_lang-X6WPAflA.js} +1 -1
  16. package/dist/{Index-BUTAUbSs.js → Index-D_voDg8S.js} +10 -10
  17. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Xt8jbqnN.js → LocationPicker.vue_vue_type_script_setup_true_lang-UMsLQmTo.js} +1 -1
  18. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Cofvjj26.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CUYv3gXV.js} +1 -1
  19. package/dist/{LoyaltyDashboard-D-uRlQr4.js → LoyaltyDashboard-BIlcHZH1.js} +4 -4
  20. package/dist/{MainLayout-Bix1-Ejy.js → MainLayout-axC3ZL1X.js} +1 -1
  21. package/dist/{Marketing-BK84KRoM.js → Marketing-CBrZOlT0.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-Njw8eFdM.js → MarketingMaterialEdit-3-7ke5cX.js} +6 -6
  23. package/dist/{Member-BglFXn-U.js → Member-CJAQrrBg.js} +11 -11
  24. package/dist/{MemberList-BUaDqh-4.js → MemberList-BsenVaU-.js} +25 -25
  25. package/dist/{MemberTransactions-cdNWr7OQ.js → MemberTransactions-DhHduUCA.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-By18HGU7.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx26y5Ww.js} +9 -9
  27. package/dist/{Mission-DkacZ5on.js → Mission-CYxydBII.js} +10 -10
  28. package/dist/{Overview-D6QiG05G.js → Overview-BED1URv5.js} +18 -18
  29. package/dist/{Point-B7Dnvqds.js → Point-DwFQlUW_.js} +9 -9
  30. package/dist/{Promotion-OSAQAs7v.js → Promotion-DkmApv1g.js} +10 -10
  31. package/dist/{Queue-VLWvCP3n.js → Queue-B-1zuJxM.js} +10 -10
  32. package/dist/{Record-DcvHadqJ.js → Record-B184P64p.js} +9 -9
  33. package/dist/{Review-B5P5fBoG.js → Review-DKhSVRiA.js} +4 -4
  34. package/dist/ReviewFacebookCallback-DYoNugpg.js +248 -0
  35. package/dist/ReviewGoogleCallback-dWLz16_8.js +213 -0
  36. package/dist/{Reward-B5UnJceg.js → Reward-Ck54ulWv.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CFN_ag0M.js → RewardGroup.vue_vue_type_script_setup_true_lang-CdP2AitR.js} +11 -11
  38. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CaZ-rcMt.js → RuleGroup.vue_vue_type_script_setup_true_lang-DEz1E2Ng.js} +13 -13
  39. package/dist/{Segment-BuZW_Z-L.js → Segment-D0FRULRN.js} +23 -23
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-d3q61-tE.js → SelectItems.vue_vue_type_script_setup_true_lang-B7PtCb6w.js} +2 -2
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D9jf_1QH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-uBG9AonP.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CHo3hDkD.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyFsgiGV.js} +4 -4
  43. package/dist/{Setting-CKvCYEZ1.js → Setting-BYW4w7kn.js} +14 -14
  44. package/dist/{SettingAdvertisements-DMDLvJuR.js → SettingAdvertisements-A4DL6Q-4.js} +12 -12
  45. package/dist/{Store-YCCrdeiS.js → Store-ChG1K5Kn.js} +21 -21
  46. package/dist/{StoreRewards-DrUeDPKk.js → StoreRewards-DKuaLRA0.js} +15 -15
  47. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DxQ-kH_8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Ca9iWfJc.js} +21 -21
  48. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BzcC6nYi.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BEzeRQv2.js} +2 -2
  49. package/dist/{Tier-cX6lgE5V.js → Tier-DMr_I6g3.js} +22 -22
  50. package/dist/{Title-BO7yS6FQ.js → Title-Dq-o2CZi.js} +19 -19
  51. package/dist/{Transaction-dwbikp5f.js → Transaction-CAzG6-t1.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C8QHAIeV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CwrWZxk7.js} +6 -6
  53. package/dist/{Voucher-D5RtI53O.js → Voucher-6nQNS0Jw.js} +13 -13
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Dw5trcej.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CKHgcBu5.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Db1Yid5T.js → ZodTextField.vue_vue_type_script_setup_true_lang-BNl6yMKg.js} +2 -2
  56. package/dist/{app-veCyMzJU.js → app-CgspuYbj.js} +171 -54
  57. package/dist/app.js +1 -1
  58. package/dist/{business-BvtZwaVt.js → business-BEHG0xwq.js} +1 -1
  59. package/dist/{campaign-CyVE2I7v.js → campaign-B91enHl9.js} +10 -10
  60. package/dist/{campaign-BbaSbea1.js → campaign-wCeJT4Go.js} +1 -1
  61. package/dist/{campaign.enum-B4old-6y.js → campaign.enum-BZ8kG7OY.js} +1 -1
  62. package/dist/{campaign.fn-DuG421Su.js → campaign.fn-DaJ7DjV1.js} +104 -104
  63. package/dist/{collectible.enum-C4_aVSzr.js → collectible.enum-B8AT4OnI.js} +1 -1
  64. package/dist/{duplicateCampaign-BsXuQigf.js → duplicateCampaign-PBh9HO6A.js} +2 -2
  65. package/dist/{effect-CCpybKfz.js → effect-B-xPzZdY.js} +1 -1
  66. package/dist/{email-addresses-DDX4Mi6S.js → email-addresses-CsNLr3Mu.js} +2 -2
  67. package/dist/{export-BkbeKb2b.js → export-DnplodbX.js} +3 -3
  68. package/dist/{helper-DAxddTyP.js → helper-D0sBffDY.js} +1 -1
  69. package/dist/{index-BI2mt6Pz.js → index-BDadgm7Y.js} +3 -3
  70. package/dist/{index-ClwNTy-6.js → index-BbmVivCa.js} +3 -3
  71. package/dist/{index-B87M_APu.js → index-Bru3XmWB.js} +5 -5
  72. package/dist/{index-NyBcZeNK.js → index-C5v_DbGz.js} +4 -4
  73. package/dist/{index-mGQbobml.js → index-C72oc0Xv.js} +6 -6
  74. package/dist/{index-EAtgJDuz.js → index-CJh0Zkfc.js} +3 -3
  75. package/dist/{index-BkdCXelA.js → index-CmMI0-_q.js} +1 -1
  76. package/dist/{index-C8dM9zHa.js → index-DHsovF6L.js} +1 -1
  77. package/dist/{index-CO9CGqzQ.js → index-DP8m8rzG.js} +1 -1
  78. package/dist/{index-M7aip9Cz.js → index-JoFYzdRp.js} +1 -1
  79. package/dist/{index-CYwrTv3T.js → index-Qe0gnFLE.js} +2 -2
  80. package/dist/{index-CKWDVDJG.js → index-g5gyg0wL.js} +2 -2
  81. package/dist/{index-CeUevans.js → index-l6FXImMh.js} +1 -1
  82. package/dist/{index-CoX84Njy.js → index-msTMxVP0.js} +1 -1
  83. package/dist/{index.esm2017-CJ1DBw4k.js → index.esm2017-Be5qqnN6.js} +1 -1
  84. package/dist/{loading-Bpwlx9Qf.js → loading-AClqtOVi.js} +1 -1
  85. package/dist/{lodash-DuvaOX4r.js → lodash-BT95FQYI.js} +1 -1
  86. package/dist/{membership-BpmZ1RRg.js → membership-CoVjI5Vj.js} +3 -3
  87. package/dist/{money-BIv7vBs6.js → money-CZ_x3JRz.js} +1 -1
  88. package/dist/{number-BBWkXSgJ.js → number-D1koBRU3.js} +1 -1
  89. package/dist/{objectid-CTrVbFLZ.js → objectid-v7ELMiH1.js} +2 -2
  90. package/dist/{plugins-BgZow8Qr.js → plugins-Bf7utN6V.js} +3 -3
  91. package/dist/{reward-mI3VO63r.js → reward-DkGkOUVT.js} +1 -1
  92. package/dist/{rule-DHb2dJky.js → rule-Bi65on8k.js} +3 -3
  93. package/dist/{template-CFQFUU6d.js → template-DLCPQvHV.js} +6 -6
  94. package/dist/{trigger-B5HKpszv.js → trigger-fi5pNEMx.js} +5 -5
  95. package/dist/{useMarketingMaterialActions-DeZG3azC.js → useMarketingMaterialActions-DrDjejGD.js} +3 -3
  96. package/dist/{usePagination-C19TYQjJ.js → usePagination-Bd-Rob5a.js} +1 -1
  97. package/dist/{user-CR2Dbom0.js → user-DfzKY2yk.js} +1 -1
  98. package/dist/{vue-i18n-tHTzSWDK.js → vue-i18n-D0_znkIz.js} +2 -2
  99. package/dist/{xlsx-BLlEAp7n.js → xlsx-yw3GKPTS.js} +1 -1
  100. package/dist/{zod-ZxC0hnix.js → zod-TK3xWITf.js} +1 -1
  101. package/package.json +1 -1
  102. package/dist/ReviewFacebookCallback-DK423k4B.js +0 -243
  103. package/dist/ReviewGoogleCallback-BkWwQXpL.js +0 -208
@@ -1,208 +0,0 @@
1
- import { defineComponent as S, onMounted as B, ref as h, computed as T, openBlock as d, createElementBlock as v, Fragment as F, renderList as z, normalizeClass as G, unref as e, createElementVNode as m, createVNode as u, toDisplayString as y, createCommentVNode as $, createBlock as P, resolveComponent as R, isRef as U } from "vue";
2
- import { u as V } from "./vue-i18n-tHTzSWDK.js";
3
- import { components as _ } from "@feedmepos/ui-library";
4
- import { r as C } from "./index-mGQbobml.js";
5
- import { u as A } from "./business-BvtZwaVt.js";
6
- import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-Xt8jbqnN.js";
7
- import { useRouter as D } from "vue-router";
8
- const q = { class: "flex flex-col gap-8" }, J = ["onClick"], K = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, O = {
9
- key: 0,
10
- class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
11
- }, Q = /* @__PURE__ */ S({
12
- __name: "GoogleLocationMapping",
13
- props: {
14
- locations: {}
15
- },
16
- emits: ["update:locations"],
17
- setup(N, { emit: a }) {
18
- const x = N, i = a, w = A();
19
- B(() => w.readLocations());
20
- const g = h(null), b = T(() => {
21
- const s = /* @__PURE__ */ new Set();
22
- for (const r of x.locations)
23
- r.locationId && s.add(r.locationId);
24
- return s;
25
- });
26
- function f(s) {
27
- return w.locations.filter((r) => {
28
- const t = r._id.toString();
29
- return !b.value.has(t) || s.locationId === t;
30
- });
31
- }
32
- function k(s, r) {
33
- const t = r._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 : r.name
40
- };
41
- });
42
- i("update:locations", n);
43
- }
44
- function L(s) {
45
- g.value = g.value === s ? null : s;
46
- }
47
- return (s, r) => (d(), v("div", q, [
48
- (d(!0), v(F, null, z(N.locations, (t) => (d(), v("div", {
49
- key: t.googleLocationName,
50
- class: G([
51
- "rounded-lg border overflow-hidden transition-colors",
52
- e(g) === t.googleLocationName ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
53
- ])
54
- }, [
55
- m("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) => L(t.googleLocationName)
58
- }, [
59
- u(e(_).FmIcon, {
60
- name: "storefront",
61
- class: "text-fm-color-neutral-gray-400 shrink-0"
62
- }),
63
- m("span", K, y(t.displayName || t.googleLocationName), 1),
64
- t.locationName ? (d(), v("span", O, y(t.locationName), 1)) : $("", !0),
65
- u(e(_).FmIcon, {
66
- name: e(g) === t.googleLocationName ? "expand_less" : "expand_more",
67
- class: "text-fm-color-neutral-gray-400 shrink-0"
68
- }, null, 8, ["name"])
69
- ], 8, J),
70
- e(g) === t.googleLocationName ? (d(), P(H, {
71
- key: 0,
72
- locations: f(t),
73
- "selected-ids": t.locationId ? [t.locationId] : [],
74
- onToggle: (n) => k(t.googleLocationName, n)
75
- }, null, 8, ["locations", "selected-ids", "onToggle"])) : $("", !0)
76
- ], 2))), 128))
77
- ]));
78
- }
79
- }), W = { class: "flex flex-col min-h-full gap-16 p-24" }, X = {
80
- key: 0,
81
- class: "flex flex-col items-center justify-center flex-1 gap-16"
82
- }, Y = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Z = {
83
- key: 1,
84
- class: "flex flex-col items-center justify-center flex-1 gap-16"
85
- }, ee = { class: "fm-typo-en-body-lg-600" }, oe = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, te = {
86
- key: 2,
87
- class: "flex flex-col items-center justify-center flex-1 gap-16"
88
- }, ne = { class: "fm-typo-en-body-lg-600" }, ae = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, le = { class: "fm-typo-en-body-lg-600" }, se = { class: "flex gap-8 justify-end mt-auto pt-8" }, fe = /* @__PURE__ */ S({
89
- __name: "ReviewGoogleCallback",
90
- setup(N) {
91
- const { t: a } = V(), x = D(), i = h([]), w = h(!1), g = h(!1), b = h(!1), f = h(null), k = T(
92
- () => i.value.some((n) => n.locationId !== null)
93
- );
94
- function L(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 r() {
112
- var l;
113
- const n = new URLSearchParams(window.location.search), o = n.get("code"), p = n.get("state");
114
- if (!o || !p) {
115
- f.value = a("connect.review.noToken");
116
- return;
117
- }
118
- w.value = !0;
119
- try {
120
- const c = await C.getSource(), E = ((l = c == null ? void 0 : c.google) == null ? void 0 : l.locations) ?? [], M = window.location.pathname.replace(/\/review(?:\/.*)?$/, ""), j = `${window.location.origin}${M}/review/google/callback`, I = await C.connectGoogle(o, j, p);
121
- i.value = s((I == null ? void 0 : I.locations) ?? [], E), i.value.length === 0 && (f.value = a("connect.review.google.noLocations"));
122
- } catch (c) {
123
- f.value = L(c, a("connect.review.google.failed"));
124
- } finally {
125
- w.value = !1;
126
- }
127
- }
128
- async function t() {
129
- const n = i.value.map((o) => ({
130
- googleLocationName: o.googleLocationName,
131
- displayName: o.displayName,
132
- locationId: o.locationId
133
- }));
134
- if (n.length === 0) {
135
- f.value = a("connect.review.noMappings");
136
- return;
137
- }
138
- g.value = !0;
139
- try {
140
- await C.updateGoogleLocations(n), b.value = !0, setTimeout(() => x.replace("/review"), 2e3);
141
- } catch (o) {
142
- f.value = L(o, a("connect.review.google.failed"));
143
- } finally {
144
- g.value = !1;
145
- }
146
- }
147
- return B(r), (n, o) => {
148
- const p = R("FmPageHead");
149
- return d(), v(F, null, [
150
- u(p, {
151
- title: e(a)("connect.navigation.review")
152
- }, null, 8, ["title"]),
153
- m("div", W, [
154
- e(w) ? (d(), v("div", X, [
155
- u(e(_).FmIcon, {
156
- name: "sync",
157
- size: "xl",
158
- class: "animate-spin text-fm-color-neutral-gray-400"
159
- }),
160
- m("p", Y, y(e(a)("connect.review.google.fetching")), 1)
161
- ])) : e(b) ? (d(), v("div", Z, [
162
- u(e(_).FmIcon, {
163
- name: "check_circle",
164
- size: "xl",
165
- class: "text-fm-color-typo-success"
166
- }),
167
- m("p", ee, y(e(a)("connect.review.google.success")), 1),
168
- m("p", oe, y(e(a)("connect.review.redirecting")), 1)
169
- ])) : e(f) ? (d(), v("div", te, [
170
- u(e(_).FmIcon, {
171
- name: "error",
172
- size: "xl",
173
- class: "text-fm-color-system-error-500"
174
- }),
175
- m("p", ne, y(e(a)("connect.review.errorTitle")), 1),
176
- m("p", ae, y(e(f)), 1),
177
- u(e(_).FmButton, {
178
- label: e(a)("connect.review.goBack"),
179
- onClick: o[0] || (o[0] = (l) => e(x).replace("/review"))
180
- }, null, 8, ["label"])
181
- ])) : e(i).length > 0 ? (d(), v(F, { key: 3 }, [
182
- m("p", le, y(e(a)("connect.review.google.selectLocation")), 1),
183
- u(Q, {
184
- locations: e(i),
185
- "onUpdate:locations": o[1] || (o[1] = (l) => U(i) ? i.value = l : null)
186
- }, null, 8, ["locations"]),
187
- m("div", se, [
188
- u(e(_).FmButton, {
189
- variant: "outlined",
190
- label: e(a)("connect.review.cancel"),
191
- onClick: o[2] || (o[2] = (l) => e(x).replace("/review"))
192
- }, null, 8, ["label"]),
193
- u(e(_).FmButton, {
194
- label: e(a)("connect.review.connect"),
195
- disabled: !e(k),
196
- loading: e(g),
197
- onClick: t
198
- }, null, 8, ["label", "disabled", "loading"])
199
- ])
200
- ], 64)) : $("", !0)
201
- ])
202
- ], 64);
203
- };
204
- }
205
- });
206
- export {
207
- fe as default
208
- };