@feedmepos/mf-connect 0.1.98-beta.1 → 0.1.98-beta.3

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-EPNXLOQz.js → App-DEtGn29M.js} +7 -7
  2. package/dist/{AuditLogs-CadZXkap.js → AuditLogs-Mrm0iq9P.js} +9 -9
  3. package/dist/{Bin-CEWFX1MK.js → Bin-D9Pu0L6h.js} +8 -8
  4. package/dist/{Broadcast-DC8W46mc.js → Broadcast-BZDQtN8x.js} +9 -9
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js} +5 -5
  6. package/dist/{Card-BLFHOVL5.js → Card-BdMSuxr4.js} +18 -18
  7. package/dist/{Collections-CVQV9gAI.js → Collections-D2IOFKrJ.js} +7 -7
  8. package/dist/{Credit-Bvd1uiUU.js → Credit-BWyLeJpj.js} +9 -9
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DMHQ36PW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js} +30 -30
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js → EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js} +6 -6
  11. package/dist/{Experience-bKhm3DP2.js → Experience-Dm5TDsKH.js} +9 -9
  12. package/dist/{FileSaver.min-CgnAdnBE.js → FileSaver.min-G6JMp965.js} +1 -1
  13. package/dist/{Game-BTZ5Ftp5.js → Game-BB81nS7Y.js} +10 -10
  14. package/dist/{Grab-DMuSoVGl.js → Grab-BXfBhrCM.js} +8 -8
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js → ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js} +1 -1
  16. package/dist/{Index-BNh-_EZa.js → Index-DfPPobH8.js} +10 -10
  17. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js} +1 -1
  18. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js} +1 -1
  19. package/dist/{LoyaltyDashboard-Do06Mjzo.js → LoyaltyDashboard-BWC3rDDk.js} +4 -4
  20. package/dist/{MainLayout-C_Zu8e2b.js → MainLayout-DxAYEJg1.js} +1 -1
  21. package/dist/{Marketing-DHTow_lX.js → Marketing-CPQQG8Y9.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-BZqVEaXl.js → MarketingMaterialEdit-ssilnzNw.js} +6 -6
  23. package/dist/{Member-DNQICbO9.js → Member-DmoUk3Dx.js} +11 -11
  24. package/dist/{MemberList-B5f-zT_3.js → MemberList-Cm2BWPrW.js} +25 -25
  25. package/dist/{MemberTransactions-BmmgHC1I.js → MemberTransactions-Cxr87RMl.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js → MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js} +9 -9
  27. package/dist/{Mission-CyUldhj4.js → Mission-ChWPNxbI.js} +10 -10
  28. package/dist/{Overview-If_YcRY8.js → Overview-CfigslHq.js} +18 -18
  29. package/dist/{Point-DXgR4D2b.js → Point-Ko81Ny1q.js} +9 -9
  30. package/dist/{Promotion-8KrS5PGT.js → Promotion-CfyscRNN.js} +10 -10
  31. package/dist/{Queue-ypegp0sQ.js → Queue-B7kxDPZV.js} +10 -10
  32. package/dist/{Record-C1eVdBIL.js → Record-BGULqygn.js} +9 -9
  33. package/dist/Review-C7Nx6a5t.js +959 -0
  34. package/dist/{ReviewFacebookCallback-zNKnoxr_.js → ReviewFacebookCallback-DKmL0TYZ.js} +4 -4
  35. package/dist/ReviewGoogleCallback-C6iFFEfS.js +208 -0
  36. package/dist/{Reward-B_k-VLJn.js → Reward-C0w5c1Th.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BUl5B7lH.js → RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js} +11 -11
  38. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js → RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js} +13 -13
  39. package/dist/{Segment-PJLbJ6YE.js → Segment-I_p06AoA.js} +23 -23
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js → SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js} +2 -2
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DOXfYdxf.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js} +4 -4
  43. package/dist/{Setting-DItVUJHA.js → Setting-DOMSAMUz.js} +14 -14
  44. package/dist/{SettingAdvertisements-Bfvr60OW.js → SettingAdvertisements-IeGC6PHz.js} +12 -12
  45. package/dist/{Store-hyTJyNWv.js → Store-DLzj0qGi.js} +21 -21
  46. package/dist/{StoreRewards-B7c20AF5.js → StoreRewards-BPhAkGNl.js} +15 -15
  47. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js} +21 -21
  48. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DBb3Zfuz.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js} +2 -2
  49. package/dist/{Tier-CuulnY8J.js → Tier-7MveQA4f.js} +22 -22
  50. package/dist/{Title-Bf9ZiFGW.js → Title-kyAzLGqm.js} +19 -19
  51. package/dist/{Transaction-reVAaf86.js → Transaction-Chl3d3Ai.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js} +6 -6
  53. package/dist/{Voucher-E8R2cCl-.js → Voucher-CxIPPul5.js} +13 -13
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js → ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js} +2 -2
  56. package/dist/{app-BdRRCAGj.js → app-5YllsPJi.js} +76 -56
  57. package/dist/app.js +1 -1
  58. package/dist/{business-caUtvXxX.js → business-C0zArPJj.js} +1 -1
  59. package/dist/{campaign-CPtzFxiR.js → campaign-BHl5a5Z1.js} +10 -10
  60. package/dist/{campaign-CDFEhdIH.js → campaign-C_49MeEc.js} +1 -1
  61. package/dist/{campaign.enum-p1buII_I.js → campaign.enum-CHWTkc9k.js} +1 -1
  62. package/dist/{campaign.fn-DerIK7yj.js → campaign.fn-BtwnAETQ.js} +198 -198
  63. package/dist/{collectible.enum-CJ30_XmW.js → collectible.enum-BvoISTK3.js} +1 -1
  64. package/dist/{duplicateCampaign-DLfhHm07.js → duplicateCampaign-C27ikU2f.js} +2 -2
  65. package/dist/{effect-BJC34M9S.js → effect-CARgKjhU.js} +1 -1
  66. package/dist/{email-addresses-D1aYCi0p.js → email-addresses-CnTsfZHe.js} +2 -2
  67. package/dist/{export-ChFEuUc5.js → export-CO8-3Ob9.js} +3 -3
  68. package/dist/{helper-BNWd3eM2.js → helper-C617AZcV.js} +1 -1
  69. package/dist/{index-6ZSFSZ-H.js → index-9AxeGyVh.js} +159 -122
  70. package/dist/{index-CIin0Pv0.js → index-B0BE7PIS.js} +1 -1
  71. package/dist/{index-BoeHTTcl.js → index-B2ZvboNZ.js} +1 -1
  72. package/dist/{index-B4dazSVT.js → index-CEJgFylS.js} +12 -8
  73. package/dist/{index-B9xvXnEM.js → index-CFO8nwbC.js} +3 -3
  74. package/dist/{index-0SZADZbB.js → index-CMfyVF2h.js} +2 -2
  75. package/dist/{index-Br17eSOV.js → index-CtXx42Yb.js} +1 -1
  76. package/dist/{index-CeSEAz_T.js → index-DIcwj1r2.js} +1 -1
  77. package/dist/{index-DNsYSxpY.js → index-DMvP3cOz.js} +335 -323
  78. package/dist/{index-Dp3CLZSg.js → index-DNf6qgpV.js} +2 -2
  79. package/dist/{index-Do2cnzep.js → index-Da8trM3D.js} +1 -1
  80. package/dist/{index-BWQK3rqq.js → index-gPrU9b68.js} +3 -3
  81. package/dist/{index-Dcn4qaYt.js → index-hKv7PcTR.js} +1 -1
  82. package/dist/{index-CAVSuo6k.js → index-wL9aIsub.js} +3 -3
  83. package/dist/{index.esm2017-CYGo-PcK.js → index.esm2017-BFgbXDc8.js} +37 -37
  84. package/dist/{loading-DtPQnEA5.js → loading-BxpiUNaf.js} +1 -1
  85. package/dist/{lodash-BvTKz5Pn.js → lodash-rPOvq9te.js} +1 -1
  86. package/dist/{membership-Csnvqeql.js → membership-lfX5TNVQ.js} +3 -3
  87. package/dist/{money-CwRxILG1.js → money-CuUoYzPn.js} +1 -1
  88. package/dist/{number-qcECHCpu.js → number-DMk8hvKt.js} +1 -1
  89. package/dist/{objectid-BKWyHH4F.js → objectid-VPzb0Etb.js} +6 -6
  90. package/dist/{plugins-BBpKk0ld.js → plugins-CyYjHO_X.js} +3 -3
  91. package/dist/{reward-CX1axU5-.js → reward-BxwaSc-X.js} +1 -1
  92. package/dist/{rule-pKsATz8r.js → rule-76SluGaP.js} +3 -3
  93. package/dist/{template-BSuapoPb.js → template-ByceGw-A.js} +6 -6
  94. package/dist/{trigger-DnMktlx-.js → trigger-CxM5x3Sj.js} +5 -5
  95. package/dist/{useMarketingMaterialActions-Bu0-ny3z.js → useMarketingMaterialActions-CHXVZ61f.js} +3 -3
  96. package/dist/{usePagination-CzfJhepV.js → usePagination-BKfoMHBB.js} +1 -1
  97. package/dist/{user-BLDWqYm_.js → user-Cqjv0IpD.js} +1 -1
  98. package/dist/{vue-i18n-bssxjuw_.js → vue-i18n-Q-nKu_E3.js} +325 -325
  99. package/dist/{xlsx-xNwsJDub.js → xlsx-D1LobU8O.js} +1 -1
  100. package/dist/{zod-Cu18aMVT.js → zod-B5vUvKbD.js} +1 -1
  101. package/package.json +1 -1
  102. package/dist/Review-fsYAsdHU.js +0 -871
  103. package/dist/ReviewGoogleCallback-CpCT0ZYL.js +0 -213
@@ -1,213 +0,0 @@
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
- };