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

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-BWBeJksP.js} +7 -7
  2. package/dist/{AuditLogs-CadZXkap.js → AuditLogs-CWVUX5o0.js} +9 -9
  3. package/dist/{Bin-CEWFX1MK.js → Bin-jXmZpGfg.js} +8 -8
  4. package/dist/{Broadcast-DC8W46mc.js → Broadcast-C76pTADb.js} +9 -9
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -5
  6. package/dist/{Card-BLFHOVL5.js → Card-qXn83BYu.js} +18 -18
  7. package/dist/{Collections-CVQV9gAI.js → Collections-DGXUQSbz.js} +7 -7
  8. package/dist/{Credit-Bvd1uiUU.js → Credit-CpmrPZx9.js} +9 -9
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DMHQ36PW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js} +30 -30
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
  11. package/dist/{Experience-bKhm3DP2.js → Experience-CuOq7hd3.js} +9 -9
  12. package/dist/{FileSaver.min-CgnAdnBE.js → FileSaver.min-Cjv6SzrG.js} +1 -1
  13. package/dist/{Game-BTZ5Ftp5.js → Game-D0KfLD-b.js} +10 -10
  14. package/dist/{Grab-DMuSoVGl.js → Grab-L1h7bHD7.js} +8 -8
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
  16. package/dist/{Index-BNh-_EZa.js → Index-DxwMHEV3.js} +10 -10
  17. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js → LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js} +1 -1
  18. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
  19. package/dist/{LoyaltyDashboard-Do06Mjzo.js → LoyaltyDashboard-B5wg1EUC.js} +4 -4
  20. package/dist/{MainLayout-C_Zu8e2b.js → MainLayout-Cgi3Z3EM.js} +1 -1
  21. package/dist/{Marketing-DHTow_lX.js → Marketing-Cl5OSBI1.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-BZqVEaXl.js → MarketingMaterialEdit-CzYTbdJd.js} +6 -6
  23. package/dist/{Member-DNQICbO9.js → Member-D29x5Cic.js} +11 -11
  24. package/dist/{MemberList-B5f-zT_3.js → MemberList-DDPe6Ymr.js} +25 -25
  25. package/dist/{MemberTransactions-BmmgHC1I.js → MemberTransactions-3mboVWAx.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +9 -9
  27. package/dist/{Mission-CyUldhj4.js → Mission-CMPc4NLe.js} +10 -10
  28. package/dist/{Overview-If_YcRY8.js → Overview-sJ2kuP4U.js} +18 -18
  29. package/dist/{Point-DXgR4D2b.js → Point-BBP4UEhf.js} +9 -9
  30. package/dist/{Promotion-8KrS5PGT.js → Promotion-Bt0RLGsd.js} +10 -10
  31. package/dist/{Queue-ypegp0sQ.js → Queue-CzVsoIDM.js} +10 -10
  32. package/dist/{Record-C1eVdBIL.js → Record-CAoGgaxo.js} +9 -9
  33. package/dist/Review-CVBJlwGK.js +959 -0
  34. package/dist/{ReviewFacebookCallback-zNKnoxr_.js → ReviewFacebookCallback-RGWdxXYf.js} +4 -4
  35. package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
  36. package/dist/{Reward-B_k-VLJn.js → Reward-CrpFlr0a.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BUl5B7lH.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +11 -11
  38. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js → RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js} +13 -13
  39. package/dist/{Segment-PJLbJ6YE.js → Segment-Cy-QwYQQ.js} +23 -23
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +2 -2
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DOXfYdxf.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
  43. package/dist/{Setting-DItVUJHA.js → Setting-DEQIJ4fY.js} +14 -14
  44. package/dist/{SettingAdvertisements-Bfvr60OW.js → SettingAdvertisements-NuwjCPLN.js} +12 -12
  45. package/dist/{Store-hyTJyNWv.js → Store-Cw2J_ecA.js} +21 -21
  46. package/dist/{StoreRewards-B7c20AF5.js → StoreRewards-BK5rDAaK.js} +15 -15
  47. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js} +21 -21
  48. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DBb3Zfuz.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js} +2 -2
  49. package/dist/{Tier-CuulnY8J.js → Tier-CwZ40RYc.js} +22 -22
  50. package/dist/{Title-Bf9ZiFGW.js → Title-DU7KmsK2.js} +19 -19
  51. package/dist/{Transaction-reVAaf86.js → Transaction-Uh5Ozt93.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
  53. package/dist/{Voucher-E8R2cCl-.js → Voucher-BF6ARaRe.js} +13 -13
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
  56. package/dist/{app-BdRRCAGj.js → app-DlECkPwT.js} +252 -232
  57. package/dist/app.js +1 -1
  58. package/dist/{business-caUtvXxX.js → business-BSe9C-xG.js} +1 -1
  59. package/dist/{campaign-CPtzFxiR.js → campaign-BNS2RxKc.js} +10 -10
  60. package/dist/{campaign-CDFEhdIH.js → campaign-CXw3jpdr.js} +1 -1
  61. package/dist/{campaign.enum-p1buII_I.js → campaign.enum-CnMa2Tia.js} +1 -1
  62. package/dist/{campaign.fn-DerIK7yj.js → campaign.fn-CNOinW8t.js} +198 -198
  63. package/dist/{collectible.enum-CJ30_XmW.js → collectible.enum-BIvEz79q.js} +1 -1
  64. package/dist/{duplicateCampaign-DLfhHm07.js → duplicateCampaign-Co2TdbrL.js} +2 -2
  65. package/dist/{effect-BJC34M9S.js → effect-Bt8PE3-M.js} +1 -1
  66. package/dist/{email-addresses-D1aYCi0p.js → email-addresses-Dh95ALqP.js} +2 -2
  67. package/dist/{export-ChFEuUc5.js → export-DIIgAwP7.js} +3 -3
  68. package/dist/{helper-BNWd3eM2.js → helper-8zEdQ9jm.js} +1 -1
  69. package/dist/{index-Dp3CLZSg.js → index-0BNEvaYc.js} +2 -2
  70. package/dist/{index-CeSEAz_T.js → index-BAlFstx4.js} +1 -1
  71. package/dist/{index-6ZSFSZ-H.js → index-BP5qSDQw.js} +159 -122
  72. package/dist/{index-BWQK3rqq.js → index-Bqxe3Gbq.js} +3 -3
  73. package/dist/{index-DNsYSxpY.js → index-CWypTyOP.js} +335 -323
  74. package/dist/{index-BoeHTTcl.js → index-CfxDirFl.js} +1 -1
  75. package/dist/{index-Br17eSOV.js → index-DDp0nMys.js} +1 -1
  76. package/dist/{index-B4dazSVT.js → index-DW4-mTTG.js} +12 -8
  77. package/dist/{index-0SZADZbB.js → index-DdCPfF8x.js} +2 -2
  78. package/dist/{index-Dcn4qaYt.js → index-IPOrNVQw.js} +1 -1
  79. package/dist/{index-Do2cnzep.js → index-SsUBL4IR.js} +1 -1
  80. package/dist/{index-CIin0Pv0.js → index-VS1hWlhk.js} +1 -1
  81. package/dist/{index-B9xvXnEM.js → index-ZKJoXi1-.js} +3 -3
  82. package/dist/{index-CAVSuo6k.js → index-rwlkBKrS.js} +3 -3
  83. package/dist/{index.esm2017-CYGo-PcK.js → index.esm2017-CgR02aQB.js} +37 -37
  84. package/dist/{loading-DtPQnEA5.js → loading-CxY9qhzD.js} +1 -1
  85. package/dist/{lodash-BvTKz5Pn.js → lodash-CELsN1M_.js} +1 -1
  86. package/dist/{membership-Csnvqeql.js → membership-BoQMuerb.js} +3 -3
  87. package/dist/{money-CwRxILG1.js → money-CH913hGN.js} +1 -1
  88. package/dist/{number-qcECHCpu.js → number-CO-WbLdr.js} +1 -1
  89. package/dist/{objectid-BKWyHH4F.js → objectid-BM2Ygj-U.js} +8 -8
  90. package/dist/{plugins-BBpKk0ld.js → plugins-YK45gSb1.js} +3 -3
  91. package/dist/{reward-CX1axU5-.js → reward-3aFPahH6.js} +1 -1
  92. package/dist/{rule-pKsATz8r.js → rule-DC9my0Vg.js} +3 -3
  93. package/dist/{template-BSuapoPb.js → template-tDq12e1p.js} +6 -6
  94. package/dist/{trigger-DnMktlx-.js → trigger-DoPHRgKt.js} +5 -5
  95. package/dist/{useMarketingMaterialActions-Bu0-ny3z.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
  96. package/dist/{usePagination-CzfJhepV.js → usePagination-C8FUj5q_.js} +1 -1
  97. package/dist/{user-BLDWqYm_.js → user-Dhlhrnf8.js} +1 -1
  98. package/dist/{vue-i18n-bssxjuw_.js → vue-i18n-B-92uhPn.js} +325 -325
  99. package/dist/{xlsx-xNwsJDub.js → xlsx-Dmxne1eM.js} +1 -1
  100. package/dist/{zod-Cu18aMVT.js → zod-Dcdy9Dm3.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
- };