@feedmepos/mf-connect 0.1.38-beta.96 → 0.1.38-beta.98

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 (106) hide show
  1. package/dist/{Analytic-Cl6MRZ5Y.js → Analytic-Cmmsj4GL.js} +13 -13
  2. package/dist/{App-D6xNQhUA.js → App-X8JUheTB.js} +7 -7
  3. package/dist/{AuditLogs-Ymb_HHtq.js → AuditLogs-Am7feSao.js} +9 -9
  4. package/dist/{Bin-BkpkM6ds.js → Bin-CkQNnA-g.js} +8 -8
  5. package/dist/{Broadcast-CDVNwfvW.js → Broadcast-ZO3ztKsj.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BcmEV0Qj.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B6_I4twl.js} +6 -6
  7. package/dist/{Card-Com7aqIL.js → Card-BCPHRAJr.js} +18 -18
  8. package/dist/{Collections-C4Vp9gey.js → Collections-DWuTstxd.js} +7 -7
  9. package/dist/{Credit-D1dvIX_a.js → Credit-C1997yt1.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang---FQZgB2.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-_6MxlAxf.js} +33 -33
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BbkFC48t.js → EffectSheet.vue_vue_type_style_index_0_lang-Bdw9FRi5.js} +6 -6
  12. package/dist/{Experience-B9YZ6hGI.js → Experience-DWi1PbhY.js} +9 -9
  13. package/dist/{FileSaver.min-li5SvE8x.js → FileSaver.min-DDxdY8PO.js} +1 -1
  14. package/dist/{Game-DwISe-aL.js → Game-BfSqEFif.js} +10 -10
  15. package/dist/{Grab-B5gvcLPP.js → Grab-CfEpIuRy.js} +8 -8
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Dxiv-yo0.js → ImageInput.vue_vue_type_script_setup_true_lang-B0YvP43y.js} +1 -1
  17. package/dist/{Index-ak_lCZcK.js → Index-Bsr_7Lf6.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Dp-b99-m.js → LocationPicker.vue_vue_type_script_setup_true_lang-DywlTAP4.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CF7Xpixl.js → LottieAnimation.vue_vue_type_script_setup_true_lang-XY-LoAga.js} +1 -1
  20. package/dist/{MainLayout-3xAykCh5.js → MainLayout-DhLqseD3.js} +1 -1
  21. package/dist/{Marketing-D7LWPCfj.js → Marketing-JLdmgwHa.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-Lk-kAYh1.js → MarketingMaterialEdit-R8iU_vwo.js} +6 -6
  23. package/dist/{Member-Y82TPJ3u.js → Member-CjcsTmx9.js} +11 -11
  24. package/dist/{MemberList-_UigIkgM.js → MemberList-47UJBrBC.js} +26 -26
  25. package/dist/{MemberTransactions-CFa4oc1E.js → MemberTransactions-ojm2_POc.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-3a4hCFiG.js → MessageInput.vue_vue_type_script_setup_true_lang-CwL3CuhK.js} +9 -9
  27. package/dist/{Mission-DsohRaqf.js → Mission-EKIaaBgF.js} +10 -10
  28. package/dist/{Overview-CAbGhHgk.js → Overview-GTvI7se0.js} +18 -18
  29. package/dist/{Point-DnfudGK3.js → Point-C_LiPWtG.js} +9 -9
  30. package/dist/{Promotion-C_v4P8Wy.js → Promotion-CUUineSb.js} +10 -10
  31. package/dist/{Queue-CFSdepKM.js → Queue-DJc2n8_h.js} +10 -10
  32. package/dist/{Record-kD24ZBO3.js → Record-bzSkHUZY.js} +9 -9
  33. package/dist/Review-DGrND2U0.js +692 -0
  34. package/dist/{ReviewFacebookCallback-DM8oc8ex.js → ReviewFacebookCallback-Cl2Iv6Yt.js} +39 -39
  35. package/dist/{ReviewGoogleCallback-BGRI0sGj.js → ReviewGoogleCallback-B1ScyrkD.js} +4 -4
  36. package/dist/{Reward-Crxk5lfq.js → Reward-BqTHw8PX.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C847CpoZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-q3ZO18r6.js} +11 -11
  38. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CZkiW0Ge.js → RuleGroup.vue_vue_type_script_setup_true_lang-o9AVUR98.js} +14 -14
  39. package/dist/{Segment-CK7XhcK0.js → Segment-CxjPyWVc.js} +24 -24
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BOB11YVT.js → SelectItems.vue_vue_type_script_setup_true_lang-DV7zm7-m.js} +2 -2
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B0r4-pZE.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C5g_vl23.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DDq8hgos.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BXcN2LX8.js} +4 -4
  43. package/dist/{Setting-DsH-2duN.js → Setting-CnbTydur.js} +81 -81
  44. package/dist/{SettingAdvertisements-C7vHq0PB.js → SettingAdvertisements-0KxvOuNS.js} +12 -12
  45. package/dist/{Store-BVGl1725.js → Store-DCYi9tBd.js} +21 -21
  46. package/dist/{StoreRewards-DIe7iX8x.js → StoreRewards-DtupzWtO.js} +203 -200
  47. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-D9zAtQbf.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bj2YGF8r.js} +21 -21
  48. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CMcI_iJz.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CWuZ64Ej.js} +2 -2
  49. package/dist/{Tier-BS4NiJp1.js → Tier-mXDWVyOh.js} +23 -23
  50. package/dist/{Title-DXrARWGW.js → Title-8mH7yu0A.js} +20 -20
  51. package/dist/{Transaction-Dgh3T8cb.js → Transaction-B8yVmt2I.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DZdPLnB9.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DEihnT0t.js} +6 -6
  53. package/dist/{Voucher-D3l4ZTrh.js → Voucher-DRcHLG1a.js} +13 -13
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-563EURuF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7Sxj_Z5.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-FpRWchov.js → ZodTextField.vue_vue_type_script_setup_true_lang-DJSNeUwi.js} +2 -2
  56. package/dist/{app-C0tPGrWs.js → app-BoN-DjbO.js} +51 -51
  57. package/dist/app.js +1 -1
  58. package/dist/{business-CLWXU6f0.js → business-CLr23aV0.js} +1 -1
  59. package/dist/{campaign-i8P3kLCP.js → campaign-BfiTO1X2.js} +1 -1
  60. package/dist/{campaign-DKgeRKw7.js → campaign-Db2CDtUO.js} +8 -8
  61. package/dist/{campaign.enum-DVLPlZG_.js → campaign.enum-DXFktsU-.js} +1 -1
  62. package/dist/{campaign.fn-Db-gV0ZF.js → campaign.fn-Cd6etiJk.js} +30 -30
  63. package/dist/{collectible.enum-D0MHFeO0.js → collectible.enum-BvR6Act_.js} +1 -1
  64. package/dist/{collection.fn-DIqyf2rF.js → collection.fn-BYrE69Mx.js} +2 -2
  65. package/dist/{dto-BxMBmLeL.js → dto-09bFA2ak.js} +4 -4
  66. package/dist/{duplicateCampaign-BZAjHZ7v.js → duplicateCampaign-y3eI3xL8.js} +2 -2
  67. package/dist/{effect-B5Ubds7b.js → effect-fFbq8rS2.js} +1 -1
  68. package/dist/{email-addresses-D2htab8s.js → email-addresses-BaO2JIrl.js} +2 -2
  69. package/dist/{export-CzUa2SAK.js → export-BSmegpBx.js} +3 -3
  70. package/dist/{helper-Ck2PaaCy.js → helper-CTwktYqy.js} +1 -1
  71. package/dist/{index-ClQoygUj.js → index-44YnPS-2.js} +1 -1
  72. package/dist/{index-oS9ZmKdF.js → index-C39blIPy.js} +3 -5
  73. package/dist/{index-VxK_HA7O.js → index-CxKomdCz.js} +4 -4
  74. package/dist/{index-DupSw3-s.js → index-DI0uj4vF.js} +1 -1
  75. package/dist/{index-3MDs-2Hs.js → index-DRhIpyOT.js} +1 -1
  76. package/dist/{index-CmfLjBdM.js → index-DeCJGK1Q.js} +1 -1
  77. package/dist/{index-C53E2Vf9.js → index-DhYKVUSb.js} +2 -2
  78. package/dist/{index-DI-wKZW-.js → index-DmPId6MB.js} +3 -3
  79. package/dist/{index-CARYxl4y.js → index-Dp9WPErb.js} +1 -1
  80. package/dist/{index-BqRRzdVz.js → index-DpaRTpHD.js} +3 -3
  81. package/dist/index-Dr1YvZ4P.js +48 -0
  82. package/dist/{index-BVktkUxe.js → index-Dwu6WniS.js} +145 -147
  83. package/dist/{index-9Mpu-FQJ.js → index-d22vtyVf.js} +3 -3
  84. package/dist/{index.esm2017-Dyk_bx2r.js → index.esm2017-Z2kwppPX.js} +1 -1
  85. package/dist/{loading-ds3TASHT.js → loading-CO7pFgcU.js} +1 -1
  86. package/dist/{lodash-DTORdAAU.js → lodash-CKkm7yoC.js} +1 -1
  87. package/dist/{membership-jQlk53aS.js → membership-EYuMqKtt.js} +3 -3
  88. package/dist/{money-IOz-942z.js → money-CxWj48Wm.js} +1 -1
  89. package/dist/{number-CWOqc967.js → number-DZHCx5Go.js} +1 -1
  90. package/dist/{objectid-CZkezEFg.js → objectid-mZMF8pti.js} +2 -2
  91. package/dist/{plugins-jbR-lWYo.js → plugins-_dpHP1gj.js} +3 -3
  92. package/dist/{reward-DVHTU03b.js → reward-D1-Jp6t6.js} +1 -1
  93. package/dist/{rule-9BGK8kms.js → rule-CKxKnTFS.js} +3 -3
  94. package/dist/{rule-builder-CjeKzJC7.js → rule-builder-DhnS-k1_.js} +1 -1
  95. package/dist/{template-DGwpx6Lh.js → template-C2L0Elsh.js} +6 -6
  96. package/dist/{timezone-Dxm8TTon.js → timezone-CQUmqwM9.js} +2 -2
  97. package/dist/{trigger-xVvU9McN.js → trigger-CIPa0S6u.js} +5 -5
  98. package/dist/{useMarketingMaterialActions-BNzzZLfT.js → useMarketingMaterialActions-Bq-Uy836.js} +3 -3
  99. package/dist/{usePagination-AmQfKdEF.js → usePagination-BqmoP8ab.js} +1 -1
  100. package/dist/{user-D_fPAb5I.js → user-CkAxgDHp.js} +1 -1
  101. package/dist/{vue-i18n-DDcr-miL.js → vue-i18n-5y9oDx95.js} +329 -329
  102. package/dist/{xlsx-BzbVIp2x.js → xlsx-Dy95Mli3.js} +1 -1
  103. package/dist/{zod-BRHadijq.js → zod-CF1kthTf.js} +1 -1
  104. package/package.json +1 -1
  105. package/dist/Review-DmSc7jiO.js +0 -621
  106. package/dist/index-LyXxYzdC.js +0 -48
@@ -1,621 +0,0 @@
1
- import { defineComponent as I, useModel as B, computed as U, onMounted as Y, resolveComponent as A, openBlock as o, createElementBlock as s, createElementVNode as a, createVNode as y, unref as e, createBlock as b, createCommentVNode as _, toDisplayString as w, normalizeClass as P, Fragment as F, renderList as S, ref as x, onUnmounted as K, watch as j, isRef as z, useSlots as Z, renderSlot as J, withCtx as D, createStaticVNode as Q, KeepAlive as W } from "vue";
2
- import { u as C } from "./vue-i18n-DDcr-miL.js";
3
- import { _ as G } from "./DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js";
4
- import { u as X } from "./business-CLWXU6f0.js";
5
- import { components as p, useSnackbar as ee } from "@feedmepos/ui-library";
6
- import { h as L } from "./moment-D7p2TMB-.js";
7
- import { r as R } from "./index-LyXxYzdC.js";
8
- import { u as te } from "./loading-ds3TASHT.js";
9
- const oe = { class: "flex justify-between gap-8" }, ne = { class: "flex flex-wrap gap-8" }, le = /* @__PURE__ */ I({
10
- __name: "ReviewListingController",
11
- props: {
12
- source: { required: !0 },
13
- sourceModifiers: {},
14
- dateFrom: { required: !0 },
15
- dateFromModifiers: {},
16
- dateTo: { required: !0 },
17
- dateToModifiers: {},
18
- locationId: { required: !0 },
19
- locationIdModifiers: {},
20
- sort: { required: !0 },
21
- sortModifiers: {}
22
- },
23
- emits: ["update:source", "update:dateFrom", "update:dateTo", "update:locationId", "update:sort"],
24
- setup(t) {
25
- const { t: n } = C(), u = B(t, "source"), l = B(t, "dateFrom"), c = B(t, "dateTo"), d = B(t, "locationId"), i = B(t, "sort"), v = X(), g = U(() => [
26
- { label: n("connect.review.filter.allSources"), value: "" },
27
- { label: "Google", value: "google" },
28
- { label: "Facebook", value: "facebook" }
29
- ]), $ = U(() => [
30
- { label: n("connect.review.filter.allLocations"), value: "" },
31
- ...v.locationOptions.map((h) => ({ label: h.label, value: h.value }))
32
- ]), T = U(() => [
33
- { label: n("connect.review.filter.sort.createTime_desc"), value: "createTime_desc" },
34
- { label: n("connect.review.filter.sort.createTime_asc"), value: "createTime_asc" },
35
- { label: n("connect.review.filter.sort.rating_asc"), value: "rating_asc" },
36
- { label: n("connect.review.filter.sort.rating_desc"), value: "rating_desc" }
37
- ]), V = U(
38
- () => v.locations.length > 0
39
- );
40
- return Y(() => v.readLocations()), (h, f) => {
41
- const r = A("FmSelect");
42
- return o(), s("div", oe, [
43
- a("div", ne, [
44
- y(r, {
45
- modelValue: u.value,
46
- "onUpdate:modelValue": f[0] || (f[0] = (m) => u.value = m),
47
- label: e(n)("connect.review.filter.source"),
48
- items: e(g)
49
- }, null, 8, ["modelValue", "label", "items"]),
50
- e(V) ? (o(), b(r, {
51
- key: 0,
52
- modelValue: d.value,
53
- "onUpdate:modelValue": f[1] || (f[1] = (m) => d.value = m),
54
- label: e(n)("connect.review.filter.location"),
55
- items: e($)
56
- }, null, 8, ["modelValue", "label", "items"])) : _("", !0),
57
- y(G, {
58
- label: e(n)("connect.review.filter.dateFrom"),
59
- "model-value": l.value,
60
- "onUpdate:modelValue": f[2] || (f[2] = (m) => l.value = m)
61
- }, null, 8, ["label", "model-value"]),
62
- y(G, {
63
- label: e(n)("connect.review.filter.dateTo"),
64
- "model-value": c.value,
65
- "onUpdate:modelValue": f[3] || (f[3] = (m) => c.value = m)
66
- }, null, 8, ["label", "model-value"])
67
- ]),
68
- y(r, {
69
- modelValue: i.value,
70
- "onUpdate:modelValue": f[4] || (f[4] = (m) => i.value = m),
71
- label: e(n)("connect.review.filter.sort.label"),
72
- items: e(T)
73
- }, null, 8, ["modelValue", "label", "items"])
74
- ]);
75
- };
76
- }
77
- }), q = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%231877F2'%3e%3cpath%20d='M24%2012.073c0-6.627-5.373-12-12-12s-12%205.373-12%2012c0%205.99%204.388%2010.954%2010.125%2011.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007%201.792-4.669%204.533-4.669%201.312%200%202.686.235%202.686.235v2.953H15.83c-1.491%200-1.956.925-1.956%201.874v2.25h3.328l-.532%203.47h-2.796v8.385C19.612%2023.027%2024%2018.062%2024%2012.073z'/%3e%3c/svg%3e", se = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16 flex flex-col gap-8" }, ae = { class: "flex items-center gap-8" }, re = ["src"], ce = { class: "flex flex-col flex-1 min-w-0" }, ie = { class: "fm-typo-en-body-md-600 truncate" }, ue = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, de = { class: "flex items-center gap-4 shrink-0" }, me = ["src"], ve = {
78
- key: 0,
79
- class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
80
- }, fe = {
81
- key: 0,
82
- class: "flex items-center gap-4"
83
- }, we = {
84
- key: 1,
85
- class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-700 line-clamp-3"
86
- }, ye = {
87
- key: 2,
88
- class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 italic"
89
- }, ge = /* @__PURE__ */ I({
90
- __name: "FacebookReviewCard",
91
- props: {
92
- review: {}
93
- },
94
- setup(t) {
95
- const { t: n } = C();
96
- return (u, l) => {
97
- var c, d, i;
98
- return o(), s("div", se, [
99
- a("div", ae, [
100
- (c = t.review.reviewer) != null && c.pictureUrl ? (o(), s("img", {
101
- key: 0,
102
- src: (d = t.review.reviewer) == null ? void 0 : d.pictureUrl,
103
- class: "w-32 h-32 rounded-full shrink-0 object-cover"
104
- }, null, 8, re)) : (o(), b(e(p).FmIcon, {
105
- key: 1,
106
- name: "person",
107
- class: "text-fm-color-neutral-gray-300 shrink-0"
108
- })),
109
- a("div", ce, [
110
- a("span", ie, w(((i = t.review.reviewer) == null ? void 0 : i.name) ?? e(n)("connect.review.overview.anonymous")), 1),
111
- a("span", ue, w(e(L)(t.review.createTime).format("D MMM YYYY, hh:mmA")), 1)
112
- ]),
113
- a("div", de, [
114
- a("img", {
115
- src: e(q),
116
- class: "w-16 h-16"
117
- }, null, 8, me),
118
- t.review.pageName ? (o(), s("span", ve, w(t.review.pageName), 1)) : _("", !0)
119
- ])
120
- ]),
121
- t.review.isPositive != null ? (o(), s("div", fe, [
122
- y(e(p).FmIcon, {
123
- name: t.review.isPositive ? "thumb_up" : "thumb_down",
124
- size: "sm",
125
- class: P(
126
- t.review.isPositive ? "text-fm-color-typo-success" : "text-fm-color-system-error-500"
127
- )
128
- }, null, 8, ["name", "class"]),
129
- a("span", {
130
- class: P([
131
- "fm-typo-en-body-sm-400",
132
- t.review.isPositive ? "text-fm-color-typo-success" : "text-fm-color-system-error-500"
133
- ])
134
- }, w(t.review.isPositive ? e(n)("connect.review.overview.positive") : e(n)("connect.review.overview.negative")), 3)
135
- ])) : _("", !0),
136
- t.review.comment ? (o(), s("p", we, w(t.review.comment), 1)) : (o(), s("p", ye, w(e(n)("connect.review.overview.noComment")), 1))
137
- ]);
138
- };
139
- }
140
- }), pe = "/feedme.ico", be = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16 flex flex-col gap-8" }, he = { class: "flex items-center gap-8" }, xe = ["src"], ke = { class: "flex flex-col flex-1 min-w-0" }, _e = { class: "fm-typo-en-body-md-600 truncate" }, $e = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, Fe = { class: "flex items-center gap-4 shrink-0" }, Ie = {
141
- key: 0,
142
- class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
143
- }, Me = { class: "flex items-center gap-4" }, Ue = {
144
- key: 0,
145
- class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-700 line-clamp-3"
146
- }, Ce = {
147
- key: 1,
148
- class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 italic"
149
- }, Re = /* @__PURE__ */ I({
150
- __name: "FeedmeReviewCard",
151
- props: {
152
- review: {}
153
- },
154
- setup(t) {
155
- const { t: n } = C();
156
- return (u, l) => (o(), s("div", be, [
157
- a("div", he, [
158
- t.review.reviewer.photoUrl ? (o(), s("img", {
159
- key: 0,
160
- src: t.review.reviewer.photoUrl,
161
- class: "w-32 h-32 rounded-full shrink-0 object-cover"
162
- }, null, 8, xe)) : (o(), b(e(p).FmIcon, {
163
- key: 1,
164
- name: "person",
165
- class: "text-fm-color-neutral-gray-300 shrink-0"
166
- })),
167
- a("div", ke, [
168
- a("span", _e, w(t.review.reviewer.name ?? e(n)("connect.review.overview.anonymous")), 1),
169
- a("span", $e, w(e(L)(t.review.createTime).format("D MMM YYYY, hh:mmA")), 1)
170
- ]),
171
- a("div", Fe, [
172
- l[0] || (l[0] = a("img", {
173
- src: pe,
174
- class: "w-16 h-16"
175
- }, null, -1)),
176
- t.review.location ? (o(), s("span", Ie, w(t.review.location.name), 1)) : _("", !0)
177
- ])
178
- ]),
179
- a("div", Me, [
180
- (o(), s(F, null, S(5, (c) => y(e(p).FmIcon, {
181
- key: c,
182
- name: "star",
183
- size: "sm",
184
- class: P(
185
- c <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
186
- )
187
- }, null, 8, ["class"])), 64))
188
- ]),
189
- t.review.comment ? (o(), s("p", Ue, w(t.review.comment), 1)) : (o(), s("p", Ce, w(e(n)("connect.review.overview.noComment")), 1))
190
- ]));
191
- }
192
- }), O = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cpath%20fill='%23EA4335'%20d='M24%209.5c3.14%200%205.95%201.08%208.17%202.86l6.08-6.08C34.46%203.1%2029.5%201%2024%201%2014.82%201%206.96%206.48%203.22%2014.44l7.08%205.5C12.08%2013.66%2017.58%209.5%2024%209.5z'/%3e%3cpath%20fill='%234285F4'%20d='M46.52%2024.5c0-1.64-.15-3.22-.42-4.74H24v8.98h12.7c-.55%202.96-2.2%205.46-4.68%207.14l7.18%205.58C43.18%2037.36%2046.52%2031.38%2046.52%2024.5z'/%3e%3cpath%20fill='%23FBBC05'%20d='M10.3%2028.56A14.56%2014.56%200%200%201%209.5%2024c0-1.58.27-3.1.76-4.52l-7.08-5.5A23.94%2023.94%200%200%200%200%2024c0%203.86.92%207.5%202.56%2010.72l7.74-6.16z'/%3e%3cpath%20fill='%2334A853'%20d='M24%2047c5.5%200%2010.12-1.82%2013.48-4.94l-7.18-5.58c-1.82%201.22-4.14%201.94-6.3%201.94-6.42%200-11.92-4.16-13.7-9.86l-7.74%206.16C6.96%2041.52%2014.82%2047%2024%2047z'/%3e%3cpath%20fill='none'%20d='M0%200h48v48H0z'/%3e%3c/svg%3e", Te = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16 flex flex-col gap-8" }, Se = { class: "flex items-center gap-8" }, Ve = ["src"], Be = { class: "flex flex-col flex-1 min-w-0" }, ze = { class: "fm-typo-en-body-md-600 truncate" }, Pe = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, Ee = { class: "flex items-center gap-4 shrink-0" }, Ye = ["src"], Ne = {
193
- key: 0,
194
- class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
195
- }, Ae = { class: "flex items-center gap-4" }, Le = {
196
- key: 0,
197
- class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-700 line-clamp-3"
198
- }, je = {
199
- key: 1,
200
- class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 italic"
201
- }, De = /* @__PURE__ */ I({
202
- __name: "GoogleReviewCard",
203
- props: {
204
- review: {}
205
- },
206
- setup(t) {
207
- const { t: n } = C();
208
- return (u, l) => {
209
- var c, d, i;
210
- return o(), s("div", Te, [
211
- a("div", Se, [
212
- (c = t.review.reviewer) != null && c.pictureUrl ? (o(), s("img", {
213
- key: 0,
214
- src: (d = t.review.reviewer) == null ? void 0 : d.pictureUrl,
215
- class: "w-32 h-32 rounded-full shrink-0 object-cover"
216
- }, null, 8, Ve)) : (o(), b(e(p).FmIcon, {
217
- key: 1,
218
- name: "person",
219
- class: "text-fm-color-neutral-gray-300 shrink-0"
220
- })),
221
- a("div", Be, [
222
- a("span", ze, w(((i = t.review.reviewer) == null ? void 0 : i.name) ?? e(n)("connect.review.overview.anonymous")), 1),
223
- a("span", Pe, w(e(L)(t.review.createTime).format("D MMM YYYY, hh:mmA")), 1)
224
- ]),
225
- a("div", Ee, [
226
- a("img", {
227
- src: e(O),
228
- class: "w-16 h-16"
229
- }, null, 8, Ye),
230
- t.review.locationDisplayName ? (o(), s("span", Ne, w(t.review.locationDisplayName), 1)) : _("", !0)
231
- ])
232
- ]),
233
- a("div", Ae, [
234
- (o(), s(F, null, S(5, (v) => y(e(p).FmIcon, {
235
- key: v,
236
- name: "star",
237
- size: "sm",
238
- class: P(
239
- v <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
240
- )
241
- }, null, 8, ["class"])), 64))
242
- ]),
243
- t.review.comment ? (o(), s("p", Le, w(t.review.comment), 1)) : (o(), s("p", je, w(e(n)("connect.review.overview.noComment")), 1))
244
- ]);
245
- };
246
- }
247
- }), Ge = /* @__PURE__ */ I({
248
- __name: "ReviewCard",
249
- props: {
250
- review: {}
251
- },
252
- setup(t) {
253
- const n = t, u = U(
254
- () => n.review.source === "google" ? n.review : null
255
- ), l = U(
256
- () => n.review.source === "facebook" ? n.review : null
257
- ), c = U(
258
- () => n.review.source === "feedme" ? n.review : null
259
- );
260
- return console.log(n.review), (d, i) => u.value ? (o(), b(De, {
261
- key: 0,
262
- review: u.value
263
- }, null, 8, ["review"])) : l.value ? (o(), b(ge, {
264
- key: 1,
265
- review: l.value
266
- }, null, 8, ["review"])) : c.value ? (o(), b(Re, {
267
- key: 2,
268
- review: c.value
269
- }, null, 8, ["review"])) : _("", !0);
270
- }
271
- }), He = {
272
- key: 0,
273
- class: "flex justify-center py-32"
274
- }, qe = {
275
- key: 1,
276
- class: "flex flex-col items-center justify-center py-48 gap-8"
277
- }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Ke = {
278
- key: 3,
279
- class: "flex justify-center py-16"
280
- }, Ze = /* @__PURE__ */ I({
281
- __name: "ReviewFeed",
282
- props: {
283
- reviews: {},
284
- loading: { type: Boolean },
285
- hasMore: { type: Boolean }
286
- },
287
- emits: ["loadMore"],
288
- setup(t, { emit: n }) {
289
- const { t: u } = C(), l = t, c = n, d = x(null);
290
- return Y(() => {
291
- const i = new IntersectionObserver(
292
- (v) => {
293
- v[0].isIntersecting && l.hasMore && !l.loading && c("loadMore");
294
- },
295
- { threshold: 0.5 }
296
- );
297
- d.value && i.observe(d.value), K(() => i.disconnect());
298
- }), (i, v) => (o(), s(F, null, [
299
- t.loading && t.reviews.length === 0 ? (o(), s("div", He, [
300
- y(e(p).FmIcon, {
301
- name: "sync",
302
- size: "xl",
303
- class: "animate-spin text-fm-color-neutral-gray-400"
304
- })
305
- ])) : t.reviews.length === 0 ? (o(), s("div", qe, [
306
- y(e(p).FmIcon, {
307
- name: "rate_review",
308
- size: "xl",
309
- class: "text-fm-color-neutral-gray-300"
310
- }),
311
- a("p", Oe, w(e(u)("connect.review.overview.empty")), 1)
312
- ])) : (o(!0), s(F, { key: 2 }, S(t.reviews, (g) => (o(), b(Ge, {
313
- key: g._id,
314
- review: g
315
- }, null, 8, ["review"]))), 128)),
316
- a("div", {
317
- ref_key: "sentinel",
318
- ref: d,
319
- class: "h-1"
320
- }, null, 512),
321
- t.loading && t.reviews.length > 0 ? (o(), s("div", Ke, [
322
- y(e(p).FmIcon, {
323
- name: "sync",
324
- size: "md",
325
- class: "animate-spin text-fm-color-neutral-gray-400"
326
- })
327
- ])) : _("", !0)
328
- ], 64));
329
- }
330
- }), Je = { class: "p-24 flex flex-col gap-12" }, N = 20, Qe = /* @__PURE__ */ I({
331
- __name: "ReviewOverview",
332
- setup(t) {
333
- const n = x([]), u = x(!1), l = x(!0), c = x(null), d = x(null), i = x(null), v = x(""), g = x("createTime_desc");
334
- j(c, () => {
335
- v.value = "";
336
- });
337
- function $(h) {
338
- return {
339
- source: c.value || void 0,
340
- dateFrom: d.value || void 0,
341
- dateTo: i.value || void 0,
342
- locationId: v.value || void 0,
343
- sort: g.value,
344
- limit: N,
345
- skip: h
346
- };
347
- }
348
- async function T() {
349
- u.value = !0, l.value = !0;
350
- try {
351
- const h = await R.listReviews($(0));
352
- n.value = h, l.value = h.length === N;
353
- } finally {
354
- u.value = !1;
355
- }
356
- }
357
- async function V() {
358
- if (!(u.value || !l.value)) {
359
- u.value = !0;
360
- try {
361
- const h = await R.listReviews($(n.value.length));
362
- n.value = [...n.value, ...h], l.value = h.length === N;
363
- } finally {
364
- u.value = !1;
365
- }
366
- }
367
- }
368
- return j([c, d, i, v, g], T), Y(T), (h, f) => (o(), s("div", Je, [
369
- y(le, {
370
- source: e(c),
371
- "onUpdate:source": f[0] || (f[0] = (r) => z(c) ? c.value = r : null),
372
- "date-from": e(d),
373
- "onUpdate:dateFrom": f[1] || (f[1] = (r) => z(d) ? d.value = r : null),
374
- "date-to": e(i),
375
- "onUpdate:dateTo": f[2] || (f[2] = (r) => z(i) ? i.value = r : null),
376
- "location-id": e(v),
377
- "onUpdate:locationId": f[3] || (f[3] = (r) => z(v) ? v.value = r : null),
378
- sort: e(g),
379
- "onUpdate:sort": f[4] || (f[4] = (r) => z(g) ? g.value = r : null)
380
- }, null, 8, ["source", "date-from", "date-to", "location-id", "sort"]),
381
- y(Ze, {
382
- reviews: e(n),
383
- loading: e(u),
384
- "has-more": e(l),
385
- onLoadMore: V
386
- }, null, 8, ["reviews", "loading", "has-more"])
387
- ]));
388
- }
389
- }), We = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, Xe = ["src"], et = { class: "flex flex-col flex-1 min-w-0" }, tt = { class: "fm-typo-en-body-md-600 capitalize" }, ot = {
390
- key: 0,
391
- class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
392
- }, H = /* @__PURE__ */ I({
393
- __name: "ReviewSource",
394
- props: {
395
- icon: {},
396
- name: {},
397
- connected: { type: Boolean },
398
- subtitle: {},
399
- syncing: { type: Boolean },
400
- tokenExpired: { type: Boolean }
401
- },
402
- emits: ["connect", "sync"],
403
- setup(t, { emit: n }) {
404
- const u = n, { t: l } = C(), c = Z();
405
- return (d, i) => (o(), s("div", We, [
406
- a("div", {
407
- class: P(["flex items-center gap-12 p-16", e(c).default ? "border-b border-fm-color-neutral-gray-100" : ""])
408
- }, [
409
- a("img", {
410
- src: t.icon,
411
- class: "w-10 h-10 shrink-0"
412
- }, null, 8, Xe),
413
- a("div", et, [
414
- a("span", tt, w(t.name), 1),
415
- t.subtitle ? (o(), s("span", ot, w(t.subtitle), 1)) : _("", !0)
416
- ]),
417
- t.connected ? (o(), s(F, { key: 0 }, [
418
- t.tokenExpired ? (o(), b(e(p).FmChip, {
419
- key: 0,
420
- label: e(l)("connect.review.expired"),
421
- variant: "critical"
422
- }, null, 8, ["label"])) : _("", !0),
423
- y(e(p).FmButton, {
424
- variant: "secondary",
425
- "prepend-icon": "refresh",
426
- label: e(l)("connect.review.reconnect"),
427
- onClick: i[0] || (i[0] = (v) => u("connect"))
428
- }, null, 8, ["label"]),
429
- t.tokenExpired ? _("", !0) : (o(), b(e(p).FmButton, {
430
- key: 1,
431
- variant: "primary",
432
- "prepend-icon": "sync",
433
- label: e(l)("connect.review.sync"),
434
- loading: t.syncing,
435
- onClick: i[1] || (i[1] = (v) => u("sync"))
436
- }, null, 8, ["label", "loading"]))
437
- ], 64)) : (o(), b(e(p).FmButton, {
438
- key: 1,
439
- "prepend-icon": "add",
440
- label: e(l)("connect.review.connect"),
441
- onClick: i[2] || (i[2] = (v) => u("connect"))
442
- }, null, 8, ["label"]))
443
- ], 2),
444
- J(d.$slots, "default")
445
- ]));
446
- }
447
- }), nt = { class: "p-24 flex flex-col gap-8" }, lt = { class: "flex flex-col flex-1 min-w-0" }, st = { class: "fm-typo-en-body-lg-600 truncate" }, at = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, rt = ["src"], ct = { class: "flex flex-col flex-1 min-w-0" }, it = { class: "fm-typo-en-body-lg-600 truncate" }, ut = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, dt = /* @__PURE__ */ I({
448
- __name: "ReviewSettings",
449
- setup(t) {
450
- const { t: n } = C(), u = ee(), l = x(null), c = x(!1), d = x(!1), i = U(
451
- () => {
452
- var r;
453
- return l.value ? ((r = l.value.google) == null ? void 0 : r.token) === null : !1;
454
- }
455
- ), v = U(
456
- () => {
457
- var r;
458
- return l.value ? ((r = l.value.facebook) == null ? void 0 : r.token) === null : !1;
459
- }
460
- );
461
- function g(r) {
462
- const m = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
463
- return `${window.location.origin}${m}${r}`;
464
- }
465
- async function $() {
466
- await te.minor(async () => {
467
- l.value = await R.getSource();
468
- });
469
- }
470
- async function T() {
471
- var r, m;
472
- c.value = !0;
473
- try {
474
- await R.syncGoogleReviews();
475
- } catch (k) {
476
- if (await $(), ((m = (r = l.value) == null ? void 0 : r.google) == null ? void 0 : m.token) === null) {
477
- u.open({
478
- message: n("connect.review.tokenExpired"),
479
- type: "error"
480
- });
481
- return;
482
- }
483
- throw k;
484
- } finally {
485
- c.value = !1;
486
- }
487
- }
488
- async function V() {
489
- var r, m;
490
- d.value = !0;
491
- try {
492
- await R.syncFacebookReviews();
493
- } catch (k) {
494
- if (await $(), ((m = (r = l.value) == null ? void 0 : r.facebook) == null ? void 0 : m.token) === null) {
495
- u.open({
496
- message: n("connect.review.tokenExpired"),
497
- type: "error"
498
- });
499
- return;
500
- }
501
- throw k;
502
- } finally {
503
- d.value = !1;
504
- }
505
- }
506
- async function h() {
507
- const r = g("/review/google/callback"), { callbackUrl: m } = await R.getOauthUrl("google", r);
508
- window.location.href = m;
509
- }
510
- async function f() {
511
- const r = g("/review/facebook/callback"), { callbackUrl: m } = await R.getOauthUrl("facebook", r);
512
- window.location.href = m;
513
- }
514
- return Y($), (r, m) => (o(), s("div", nt, [
515
- e(l) ? (o(), s(F, { key: 0 }, [
516
- y(H, {
517
- icon: e(O),
518
- name: "google",
519
- connected: !!e(l).google,
520
- syncing: e(c),
521
- "token-expired": e(i),
522
- onConnect: h,
523
- onSync: T
524
- }, {
525
- default: D(() => {
526
- var k;
527
- return [
528
- (o(!0), s(F, null, S((k = e(l).google) == null ? void 0 : k.locations, (M) => {
529
- var E;
530
- return o(), s("div", {
531
- key: M.googleLocationName,
532
- class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
533
- }, [
534
- y(e(p).FmIcon, {
535
- name: "location_on",
536
- class: "text-fm-color-neutral-gray-300 shrink-0"
537
- }),
538
- a("div", lt, [
539
- a("span", st, w(M.displayName), 1),
540
- a("span", at, w(((E = M.location) == null ? void 0 : E.name) ?? e(n)("connect.review.google.noLocations")), 1)
541
- ])
542
- ]);
543
- }), 128))
544
- ];
545
- }),
546
- _: 1
547
- }, 8, ["icon", "connected", "syncing", "token-expired"]),
548
- y(H, {
549
- icon: e(q),
550
- name: "facebook",
551
- connected: !!e(l).facebook,
552
- syncing: e(d),
553
- "token-expired": e(v),
554
- onConnect: f,
555
- onSync: V
556
- }, {
557
- default: D(() => {
558
- var k;
559
- return [
560
- (o(!0), s(F, null, S((k = e(l).facebook) == null ? void 0 : k.pages, (M) => (o(), s("div", {
561
- key: M.facebookPageId,
562
- class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
563
- }, [
564
- M.pageProfileImageUrl ? (o(), s("img", {
565
- key: 0,
566
- src: M.pageProfileImageUrl,
567
- class: "w-10 h-10 rounded-full shrink-0 object-cover"
568
- }, null, 8, rt)) : (o(), b(e(p).FmIcon, {
569
- key: 1,
570
- name: "person",
571
- class: "text-fm-color-neutral-gray-300 shrink-0"
572
- })),
573
- a("div", ct, [
574
- a("span", it, w(M.pageName), 1),
575
- a("span", ut, w(M.locations.map((E) => E.name).join(", ")), 1)
576
- ])
577
- ]))), 128))
578
- ];
579
- }),
580
- _: 1
581
- }, 8, ["icon", "connected", "syncing", "token-expired"])
582
- ], 64)) : (o(), s(F, { key: 1 }, S(["google", "facebook"], (k) => a("div", {
583
- key: k,
584
- class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
585
- }, [...m[0] || (m[0] = [
586
- Q('<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)
587
- ])])), 64))
588
- ]));
589
- }
590
- }), mt = { class: "flex flex-col" }, vt = { class: "px-24" }, kt = /* @__PURE__ */ I({
591
- __name: "Review",
592
- setup(t) {
593
- const { t: n } = C(), u = [
594
- { label: n("connect.review.tabs.overview"), value: "overview" },
595
- { label: n("connect.review.tabs.settings"), value: "settings" }
596
- ], l = x(u[0]);
597
- return (c, d) => {
598
- const i = A("FmPageHead"), v = A("FmTabs");
599
- return o(), s(F, null, [
600
- y(i, {
601
- title: e(n)("connect.navigation.review")
602
- }, null, 8, ["title"]),
603
- a("div", mt, [
604
- a("div", vt, [
605
- y(v, {
606
- "model-value": e(l).value,
607
- items: u,
608
- "onUpdate:modelValue": d[0] || (d[0] = (g) => l.value = u.find(($) => $.value === g))
609
- }, null, 8, ["model-value"])
610
- ]),
611
- (o(), b(W, null, [
612
- e(l).value === "overview" ? (o(), b(Qe, { key: 0 })) : e(l).value === "settings" ? (o(), b(dt, { key: 1 })) : _("", !0)
613
- ], 1024))
614
- ])
615
- ], 64);
616
- };
617
- }
618
- });
619
- export {
620
- kt as default
621
- };
@@ -1,48 +0,0 @@
1
- import { g as o, S as a, a as n } from "./index-C53E2Vf9.js";
2
- const r = (e = "") => {
3
- const s = a.getBusinessId();
4
- if (!s) throw new Error("Invalid business ID");
5
- return n(`marketing-v2/${s}/${e}`);
6
- }, i = {
7
- async listReviews(e) {
8
- const s = await r("reviews").get("", { params: e });
9
- return o(s);
10
- },
11
- async getSource() {
12
- const e = await r("review-sources").get("");
13
- return o(e);
14
- },
15
- async connectGoogle(e) {
16
- const s = await r("review-sources/google").post("", { token: e });
17
- return o(s);
18
- },
19
- async updateGoogleLocations(e) {
20
- const s = await r("review-sources/google/locations").put("", { locations: e });
21
- return o(s);
22
- },
23
- async syncGoogleReviews() {
24
- const e = await r("review-sources/google/sync").post("", {});
25
- return o(e);
26
- },
27
- async connectFacebook(e) {
28
- const s = await r("review-sources/facebook").post("", { token: e });
29
- return o(s);
30
- },
31
- async updateFacebookPages(e) {
32
- const s = await r("review-sources/facebook/pages").put("", { pages: e });
33
- return o(s);
34
- },
35
- async syncFacebookReviews() {
36
- const e = await r("review-sources/facebook/sync").post("", {});
37
- return o(e);
38
- },
39
- async getOauthUrl(e, s) {
40
- const t = await r(`review-sources/${e}/oauth`).get("", {
41
- params: { redirectUri: s }
42
- });
43
- return o(t);
44
- }
45
- };
46
- export {
47
- i as r
48
- };