@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.80

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 (159) hide show
  1. package/dist/{Analytic-CJap-Cat.js → Analytic-LOK5TzX0.js} +31 -32
  2. package/dist/{App-CLTtX1QT.js → App-Bk5Z5u5_.js} +617 -607
  3. package/dist/AuditLogs-Rezf9EeA.js +1991 -0
  4. package/dist/{Bin-C2xMLxoE.js → Bin-B8yzS5bD.js} +10 -10
  5. package/dist/Broadcast-CZ0QCvua.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-iJQS2Ck9.js} +6 -6
  7. package/dist/{Card-BPrCNLQy.js → Card-BQOv5yB9.js} +145 -140
  8. package/dist/Collections-qenPlCd2.js +540 -0
  9. package/dist/Credit-BJLskbVu.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  12. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKWCWOU_.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dw1qQfnG.js +351 -0
  15. package/dist/Experience-BjfEiGT8.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-C013Tr1o.js} +1 -1
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-Gw_tFjen.js +330 -0
  20. package/dist/Grab-Bdv7SaB9.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-Ba4L39GL.js} +49 -48
  22. package/dist/{Index-DMdNgISh.js → Index-C67U3YDJ.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-pQ8sF5KW.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-o-eN3J4i.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DPjqCyJ5.js} +1 -1
  26. package/dist/Marketing-DtEooXof.js +166 -0
  27. package/dist/MarketingMaterialEdit-Balw055Y.js +1065 -0
  28. package/dist/{Member-CnSXGQi_.js → Member-QA7TQnyw.js} +38 -37
  29. package/dist/{MemberList-DcpEKV1D.js → MemberList-CSJQFYlh.js} +486 -491
  30. package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-D-46vda_.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-6a7_lw74.js} +13443 -10607
  32. package/dist/Mission-DJVxFbX5.js +334 -0
  33. package/dist/{Overview-elpi-jpI.js → Overview-Btkh3oiI.js} +24 -25
  34. package/dist/Point-CVdF9GtN.js +262 -0
  35. package/dist/Promotion-BtmlvUd3.js +396 -0
  36. package/dist/{Queue-GvBhNEFe.js → Queue-BfiCMsLC.js} +23 -24
  37. package/dist/{Record-CbSxgo8i.js → Record-B07QGPli.js} +10 -10
  38. package/dist/Review-BeZ90jW9.js +621 -0
  39. package/dist/ReviewFacebookCallback-CwAcKaib.js +243 -0
  40. package/dist/ReviewGoogleCallback-CVK6Yc5E.js +213 -0
  41. package/dist/{Reward-QCGlrq89.js → Reward-CyXqNpAa.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-BICsdgSh.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js +1912 -0
  44. package/dist/{Segment-5PndnEUa.js → Segment-B9g57O7g.js} +273 -274
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-BwDOXE87.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js +226 -0
  48. package/dist/Setting-BHteqZv6.js +2039 -0
  49. package/dist/SettingAdvertisements-CubrbuSL.js +264 -0
  50. package/dist/Store-u6LYUnmp.js +1996 -0
  51. package/dist/StoreRewards-D9h0YnEx.js +535 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js +1129 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-WgNstmNx.js +7007 -0
  54. package/dist/{Tier-BKKxG29r.js → Tier-CBdi4sPT.js} +561 -480
  55. package/dist/{Title-CReZgw8V.js → Title-BegmN7hs.js} +151 -149
  56. package/dist/{Transaction-HWCmSVaJ.js → Transaction-C6XMd9_r.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BBf4BP4m.js} +7 -7
  58. package/dist/Voucher-D6hSas_z.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-ZOlAZ_q5.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bs8TNiCY.js} +2 -2
  61. package/dist/app-Duwed9mD.js +59309 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-Bc-EMd2p.js → business-6oZ8Rgui.js} +11 -8
  64. package/dist/campaign-CzenWLhs.js +219 -0
  65. package/dist/campaign-PYce7g0o.js +253 -0
  66. package/dist/campaign.enum-KHniCp5a.js +26 -0
  67. package/dist/campaign.fn-dOSgHJcU.js +776 -0
  68. package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-BZA1DKIB.js} +1 -1
  69. package/dist/{collection.fn-AjDNdFe1.js → collection.fn-CyfrdKBf.js} +2 -2
  70. package/dist/dto-DYmM2ud_.js +222 -0
  71. package/dist/duplicateCampaign-BXaDK8Q6.js +51 -0
  72. package/dist/effect-DBI_JHbP.js +89 -0
  73. package/dist/{email-addresses-B0SzUCQM.js → email-addresses-BNs-WN79.js} +2 -2
  74. package/dist/{export-Bgz6WcNZ.js → export-DTCCKE2m.js} +4 -4
  75. package/dist/{helper-B1vFwohM.js → helper-CeYr7Anh.js} +22 -7
  76. package/dist/index-38u-cCwD.js +3431 -0
  77. package/dist/{index-Cm2sBagk.js → index-BdjY7GRO.js} +1 -1
  78. package/dist/index-CGMiuxyf.js +85 -0
  79. package/dist/index-CQZbm9P5.js +8912 -0
  80. package/dist/index-Cal60fAm.js +48 -0
  81. package/dist/{index-DT2viYsL.js → index-CnRLkzpg.js} +617 -191
  82. package/dist/index-CuvNtC_M.js +61 -0
  83. package/dist/{index-CSQY21Zb.js → index-D-kPBF9C.js} +3 -3
  84. package/dist/{index-DVQnrex_.js → index-DcFYm1fy.js} +3 -3
  85. package/dist/index-DjONNxbl.js +30289 -0
  86. package/dist/{index-26SopNpv.js → index-ItaoypTr.js} +1 -1
  87. package/dist/index-_jxXI4_v.js +28899 -0
  88. package/dist/{index-DwT9RLst.js → index-nXfjG8UQ.js} +23 -12
  89. package/dist/{index-BIRmS75g.js → index-pHQfP2e7.js} +1 -1
  90. package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-CokFPnqn.js} +185 -185
  91. package/dist/{loading-C6Ouh0mG.js → loading-fZQi5zP8.js} +1 -1
  92. package/dist/{lodash-B5I3zXaY.js → lodash-R-DIRmbj.js} +1 -1
  93. package/dist/{membership-DU0BwIj8.js → membership-CApN5ZJ1.js} +3 -3
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-Bg7GuE5s.js → money-C6I6vVy2.js} +1 -1
  96. package/dist/{number-Ddmqo5D_.js → number-Dq4d381U.js} +1 -1
  97. package/dist/objectid-Kv5GREBk.js +145 -0
  98. package/dist/{campaign-BeF8kTyg.js → plugins-9_UvAdJ2.js} +784 -777
  99. package/dist/remy-NLAa-9Qg.js +46 -0
  100. package/dist/{reward-CN4gvn4c.js → reward-DXHGeGYY.js} +1 -1
  101. package/dist/{rule-CpiqqR0c.js → rule-B_XgRDr-.js} +505 -487
  102. package/dist/rule-builder-BMXyzu8k.js +102 -0
  103. package/dist/style.css +11 -2
  104. package/dist/template-CnyTUzQU.js +188 -0
  105. package/dist/timezone-Izs3ibB-.js +1156 -0
  106. package/dist/trigger-Dda3NmaE.js +213 -0
  107. package/dist/usePagination-Byxk4XVn.js +220 -0
  108. package/dist/user-BZxO8qdh.js +55 -0
  109. package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DDbkmbSf.js} +433 -433
  110. package/dist/{xlsx-qJHsnW7k.js → xlsx-D8yNl8dN.js} +1 -1
  111. package/dist/{zod-Bg2FbC-D.js → zod-Xp7TePRP.js} +32 -31
  112. package/package.json +14 -6
  113. package/dist/AuditLogs-DW4rwNOn.js +0 -1887
  114. package/dist/Broadcast-Dhc0j16O.js +0 -227
  115. package/dist/Collections-CsUJEmqz.js +0 -465
  116. package/dist/Credit-Mqa-0XJd.js +0 -222
  117. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  118. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js +0 -2185
  119. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
  120. package/dist/Experience-BD5C3old.js +0 -223
  121. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  122. package/dist/Game-D4xsi8Ym.js +0 -278
  123. package/dist/Marketing-axcQYl8k.js +0 -20073
  124. package/dist/Mission-BHZiL-GH.js +0 -296
  125. package/dist/Point-gKvdggAl.js +0 -226
  126. package/dist/Promotion-7x2F_sFX.js +0 -289
  127. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
  128. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
  129. package/dist/Setting-Cab47wfH.js +0 -1936
  130. package/dist/Store-BFL3T9B5.js +0 -1842
  131. package/dist/StoreRewards-C43dCJtM.js +0 -423
  132. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
  133. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
  134. package/dist/Voucher-BhUAcPZg.js +0 -384
  135. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
  136. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  137. package/dist/app-BGaUIdCr.js +0 -7086
  138. package/dist/app-DccKBdW_.js +0 -33357
  139. package/dist/campaign-DbJZEU7P.js +0 -96
  140. package/dist/campaign.enum-PBKYGUQY.js +0 -20
  141. package/dist/campaign.fn-Cq-4LfQj.js +0 -758
  142. package/dist/dto-8NvMMYAb.js +0 -214
  143. package/dist/effect-DZhcEQ5g.js +0 -78
  144. package/dist/index-CQQedv0M.js +0 -32260
  145. package/dist/index-CTgQRqQR.js +0 -30038
  146. package/dist/index-CsaQJMAR.js +0 -66
  147. package/dist/index-DGaywhpY.js +0 -76
  148. package/dist/index-DOfLDlI8.js +0 -8861
  149. package/dist/index-DVpAocyR.js +0 -3120
  150. package/dist/index-DlJGd8RC.js +0 -121
  151. package/dist/index-Dm65CTdy.js +0 -38
  152. package/dist/objectid-MCaJXAgq.js +0 -145
  153. package/dist/plugins-C-CRzeyC.js +0 -208
  154. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  155. package/dist/rule-builder-DmkJng-x.js +0 -89
  156. package/dist/template-DTZgnkl5.js +0 -190
  157. package/dist/trigger-CPjJ73Rc.js +0 -144
  158. package/dist/usePagination-BeF5K3M7.js +0 -223
  159. package/dist/user-8VIt8A1x.js +0 -54
@@ -0,0 +1,621 @@
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-DDbkmbSf.js";
3
+ import { _ as G } from "./DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js";
4
+ import { u as X } from "./business-6oZ8Rgui.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-Cal60fAm.js";
8
+ import { u as te } from "./loading-fZQi5zP8.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
+ };