@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.
- package/dist/{App-EPNXLOQz.js → App-BWBeJksP.js} +7 -7
- package/dist/{AuditLogs-CadZXkap.js → AuditLogs-CWVUX5o0.js} +9 -9
- package/dist/{Bin-CEWFX1MK.js → Bin-jXmZpGfg.js} +8 -8
- package/dist/{Broadcast-DC8W46mc.js → Broadcast-C76pTADb.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -5
- package/dist/{Card-BLFHOVL5.js → Card-qXn83BYu.js} +18 -18
- package/dist/{Collections-CVQV9gAI.js → Collections-DGXUQSbz.js} +7 -7
- package/dist/{Credit-Bvd1uiUU.js → Credit-CpmrPZx9.js} +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
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
- package/dist/{Experience-bKhm3DP2.js → Experience-CuOq7hd3.js} +9 -9
- package/dist/{FileSaver.min-CgnAdnBE.js → FileSaver.min-Cjv6SzrG.js} +1 -1
- package/dist/{Game-BTZ5Ftp5.js → Game-D0KfLD-b.js} +10 -10
- package/dist/{Grab-DMuSoVGl.js → Grab-L1h7bHD7.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
- package/dist/{Index-BNh-_EZa.js → Index-DxwMHEV3.js} +10 -10
- 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
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
- package/dist/{LoyaltyDashboard-Do06Mjzo.js → LoyaltyDashboard-B5wg1EUC.js} +4 -4
- package/dist/{MainLayout-C_Zu8e2b.js → MainLayout-Cgi3Z3EM.js} +1 -1
- package/dist/{Marketing-DHTow_lX.js → Marketing-Cl5OSBI1.js} +4 -4
- package/dist/{MarketingMaterialEdit-BZqVEaXl.js → MarketingMaterialEdit-CzYTbdJd.js} +6 -6
- package/dist/{Member-DNQICbO9.js → Member-D29x5Cic.js} +11 -11
- package/dist/{MemberList-B5f-zT_3.js → MemberList-DDPe6Ymr.js} +25 -25
- package/dist/{MemberTransactions-BmmgHC1I.js → MemberTransactions-3mboVWAx.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +9 -9
- package/dist/{Mission-CyUldhj4.js → Mission-CMPc4NLe.js} +10 -10
- package/dist/{Overview-If_YcRY8.js → Overview-sJ2kuP4U.js} +18 -18
- package/dist/{Point-DXgR4D2b.js → Point-BBP4UEhf.js} +9 -9
- package/dist/{Promotion-8KrS5PGT.js → Promotion-Bt0RLGsd.js} +10 -10
- package/dist/{Queue-ypegp0sQ.js → Queue-CzVsoIDM.js} +10 -10
- package/dist/{Record-C1eVdBIL.js → Record-CAoGgaxo.js} +9 -9
- package/dist/Review-CVBJlwGK.js +959 -0
- package/dist/{ReviewFacebookCallback-zNKnoxr_.js → ReviewFacebookCallback-RGWdxXYf.js} +4 -4
- package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
- package/dist/{Reward-B_k-VLJn.js → Reward-CrpFlr0a.js} +16 -16
- 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
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js → RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js} +13 -13
- package/dist/{Segment-PJLbJ6YE.js → Segment-Cy-QwYQQ.js} +23 -23
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
- 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
- package/dist/{Setting-DItVUJHA.js → Setting-DEQIJ4fY.js} +14 -14
- package/dist/{SettingAdvertisements-Bfvr60OW.js → SettingAdvertisements-NuwjCPLN.js} +12 -12
- package/dist/{Store-hyTJyNWv.js → Store-Cw2J_ecA.js} +21 -21
- package/dist/{StoreRewards-B7c20AF5.js → StoreRewards-BK5rDAaK.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js} +21 -21
- 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
- package/dist/{Tier-CuulnY8J.js → Tier-CwZ40RYc.js} +22 -22
- package/dist/{Title-Bf9ZiFGW.js → Title-DU7KmsK2.js} +19 -19
- package/dist/{Transaction-reVAaf86.js → Transaction-Uh5Ozt93.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
- package/dist/{Voucher-E8R2cCl-.js → Voucher-BF6ARaRe.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
- package/dist/{app-BdRRCAGj.js → app-DlECkPwT.js} +252 -232
- package/dist/app.js +1 -1
- package/dist/{business-caUtvXxX.js → business-BSe9C-xG.js} +1 -1
- package/dist/{campaign-CPtzFxiR.js → campaign-BNS2RxKc.js} +10 -10
- package/dist/{campaign-CDFEhdIH.js → campaign-CXw3jpdr.js} +1 -1
- package/dist/{campaign.enum-p1buII_I.js → campaign.enum-CnMa2Tia.js} +1 -1
- package/dist/{campaign.fn-DerIK7yj.js → campaign.fn-CNOinW8t.js} +198 -198
- package/dist/{collectible.enum-CJ30_XmW.js → collectible.enum-BIvEz79q.js} +1 -1
- package/dist/{duplicateCampaign-DLfhHm07.js → duplicateCampaign-Co2TdbrL.js} +2 -2
- package/dist/{effect-BJC34M9S.js → effect-Bt8PE3-M.js} +1 -1
- package/dist/{email-addresses-D1aYCi0p.js → email-addresses-Dh95ALqP.js} +2 -2
- package/dist/{export-ChFEuUc5.js → export-DIIgAwP7.js} +3 -3
- package/dist/{helper-BNWd3eM2.js → helper-8zEdQ9jm.js} +1 -1
- package/dist/{index-Dp3CLZSg.js → index-0BNEvaYc.js} +2 -2
- package/dist/{index-CeSEAz_T.js → index-BAlFstx4.js} +1 -1
- package/dist/{index-6ZSFSZ-H.js → index-BP5qSDQw.js} +159 -122
- package/dist/{index-BWQK3rqq.js → index-Bqxe3Gbq.js} +3 -3
- package/dist/{index-DNsYSxpY.js → index-CWypTyOP.js} +335 -323
- package/dist/{index-BoeHTTcl.js → index-CfxDirFl.js} +1 -1
- package/dist/{index-Br17eSOV.js → index-DDp0nMys.js} +1 -1
- package/dist/{index-B4dazSVT.js → index-DW4-mTTG.js} +12 -8
- package/dist/{index-0SZADZbB.js → index-DdCPfF8x.js} +2 -2
- package/dist/{index-Dcn4qaYt.js → index-IPOrNVQw.js} +1 -1
- package/dist/{index-Do2cnzep.js → index-SsUBL4IR.js} +1 -1
- package/dist/{index-CIin0Pv0.js → index-VS1hWlhk.js} +1 -1
- package/dist/{index-B9xvXnEM.js → index-ZKJoXi1-.js} +3 -3
- package/dist/{index-CAVSuo6k.js → index-rwlkBKrS.js} +3 -3
- package/dist/{index.esm2017-CYGo-PcK.js → index.esm2017-CgR02aQB.js} +37 -37
- package/dist/{loading-DtPQnEA5.js → loading-CxY9qhzD.js} +1 -1
- package/dist/{lodash-BvTKz5Pn.js → lodash-CELsN1M_.js} +1 -1
- package/dist/{membership-Csnvqeql.js → membership-BoQMuerb.js} +3 -3
- package/dist/{money-CwRxILG1.js → money-CH913hGN.js} +1 -1
- package/dist/{number-qcECHCpu.js → number-CO-WbLdr.js} +1 -1
- package/dist/{objectid-BKWyHH4F.js → objectid-BM2Ygj-U.js} +8 -8
- package/dist/{plugins-BBpKk0ld.js → plugins-YK45gSb1.js} +3 -3
- package/dist/{reward-CX1axU5-.js → reward-3aFPahH6.js} +1 -1
- package/dist/{rule-pKsATz8r.js → rule-DC9my0Vg.js} +3 -3
- package/dist/{template-BSuapoPb.js → template-tDq12e1p.js} +6 -6
- package/dist/{trigger-DnMktlx-.js → trigger-DoPHRgKt.js} +5 -5
- package/dist/{useMarketingMaterialActions-Bu0-ny3z.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
- package/dist/{usePagination-CzfJhepV.js → usePagination-C8FUj5q_.js} +1 -1
- package/dist/{user-BLDWqYm_.js → user-Dhlhrnf8.js} +1 -1
- package/dist/{vue-i18n-bssxjuw_.js → vue-i18n-B-92uhPn.js} +325 -325
- package/dist/{xlsx-xNwsJDub.js → xlsx-Dmxne1eM.js} +1 -1
- package/dist/{zod-Cu18aMVT.js → zod-Dcdy9Dm3.js} +1 -1
- package/package.json +1 -1
- package/dist/Review-fsYAsdHU.js +0 -871
- package/dist/ReviewGoogleCallback-CpCT0ZYL.js +0 -213
package/dist/Review-fsYAsdHU.js
DELETED
|
@@ -1,871 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, ref as C, computed as k, resolveComponent as H, openBlock as o, createBlock as x, unref as e, withCtx as j, createVNode as g, normalizeClass as B, createElementVNode as n, toDisplayString as v, createElementBlock as a, Fragment as F, renderList as U, useModel as L, onMounted as D, isRef as R, createCommentVNode as I, Teleport as K, withModifiers as W, onUnmounted as J, normalizeStyle as N, watch as Y, useSlots as Q, renderSlot as X, createStaticVNode as ee, KeepAlive as te } from "vue";
|
|
2
|
-
import { u as z } from "./vue-i18n-bssxjuw_.js";
|
|
3
|
-
import { _ as oe } from "./DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js";
|
|
4
|
-
import { _ as G } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
5
|
-
import { u as le } from "./business-caUtvXxX.js";
|
|
6
|
-
import { components as b, useSnackbar as ne } from "@feedmepos/ui-library";
|
|
7
|
-
import { h as P } from "./moment-D7p2TMB-.js";
|
|
8
|
-
import { r as T } from "./index-B4dazSVT.js";
|
|
9
|
-
import { u as se } from "./loading-DtPQnEA5.js";
|
|
10
|
-
const ae = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, re = /* @__PURE__ */ M({
|
|
11
|
-
__name: "SortChip",
|
|
12
|
-
props: {
|
|
13
|
-
modelValue: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: !0
|
|
16
|
-
},
|
|
17
|
-
items: {
|
|
18
|
-
type: Array,
|
|
19
|
-
required: !0
|
|
20
|
-
},
|
|
21
|
-
label: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "Sort by: "
|
|
24
|
-
},
|
|
25
|
-
placement: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "bottom-end"
|
|
28
|
-
},
|
|
29
|
-
class: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["update:model-value"],
|
|
35
|
-
setup(t, { emit: l }) {
|
|
36
|
-
const c = t, s = l, r = C(!1), u = k(
|
|
37
|
-
() => {
|
|
38
|
-
var i;
|
|
39
|
-
return ((i = c.items.find((y) => y.value === c.modelValue)) == null ? void 0 : i.label) ?? "";
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
function d(i) {
|
|
43
|
-
s("update:model-value", i), r.value = !1;
|
|
44
|
-
}
|
|
45
|
-
return (i, y) => {
|
|
46
|
-
const p = H("FmIcon"), V = H("FmChip"), S = H("FmMenuItem"), $ = H("FmMenu");
|
|
47
|
-
return o(), x($, {
|
|
48
|
-
placement: t.placement,
|
|
49
|
-
"model-value": e(r),
|
|
50
|
-
"close-on-click": !0,
|
|
51
|
-
onMenuChanged: y[0] || (y[0] = (w) => r.value = w)
|
|
52
|
-
}, {
|
|
53
|
-
"menu-button": j(() => [
|
|
54
|
-
g(V, {
|
|
55
|
-
label: `${t.label}${e(u)}`,
|
|
56
|
-
class: B(c.class)
|
|
57
|
-
}, {
|
|
58
|
-
default: j(() => [
|
|
59
|
-
n("div", ae, v(t.label) + v(e(u)), 1),
|
|
60
|
-
g(p, {
|
|
61
|
-
name: e(r) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
62
|
-
class: B(c.class),
|
|
63
|
-
outline: "",
|
|
64
|
-
size: "sm"
|
|
65
|
-
}, null, 8, ["name", "class"])
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["label", "class"])
|
|
69
|
-
]),
|
|
70
|
-
default: j(() => [
|
|
71
|
-
(o(!0), a(F, null, U(t.items, (w) => (o(), x(S, {
|
|
72
|
-
key: w.value,
|
|
73
|
-
value: w.value,
|
|
74
|
-
label: w.label,
|
|
75
|
-
onClick: (m) => d(w.value)
|
|
76
|
-
}, null, 8, ["value", "label", "onClick"]))), 128))
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
}, 8, ["placement", "model-value"]);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}), ce = { class: "flex justify-between gap-8" }, ie = { class: "flex flex-wrap gap-8" }, ue = /* @__PURE__ */ M({
|
|
83
|
-
__name: "ReviewListingController",
|
|
84
|
-
props: {
|
|
85
|
-
source: {
|
|
86
|
-
required: !0
|
|
87
|
-
},
|
|
88
|
-
sourceModifiers: {},
|
|
89
|
-
dateFrom: { required: !0 },
|
|
90
|
-
dateFromModifiers: {},
|
|
91
|
-
dateTo: { required: !0 },
|
|
92
|
-
dateToModifiers: {},
|
|
93
|
-
locationId: { required: !0 },
|
|
94
|
-
locationIdModifiers: {},
|
|
95
|
-
sort: { required: !0 },
|
|
96
|
-
sortModifiers: {}
|
|
97
|
-
},
|
|
98
|
-
emits: ["update:source", "update:dateFrom", "update:dateTo", "update:locationId", "update:sort"],
|
|
99
|
-
setup(t) {
|
|
100
|
-
const { t: l } = z(), c = L(t, "source"), s = L(t, "dateFrom"), r = L(t, "dateTo"), u = L(t, "locationId"), d = L(t, "sort"), i = le(), y = k(() => [
|
|
101
|
-
{ label: "Google", value: "google" },
|
|
102
|
-
{ label: "Facebook", value: "facebook" }
|
|
103
|
-
]), p = k(() => [
|
|
104
|
-
...i.locationOptions.map((f) => ({
|
|
105
|
-
label: f.label,
|
|
106
|
-
value: f.value
|
|
107
|
-
}))
|
|
108
|
-
]), V = k(() => [
|
|
109
|
-
{
|
|
110
|
-
label: l("connect.review.filter.sort.createTime_desc"),
|
|
111
|
-
value: "createTime_desc"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
label: l("connect.review.filter.sort.createTime_asc"),
|
|
115
|
-
value: "createTime_asc"
|
|
116
|
-
},
|
|
117
|
-
{ label: l("connect.review.filter.sort.rating_asc"), value: "rating_asc" },
|
|
118
|
-
{ label: l("connect.review.filter.sort.rating_desc"), value: "rating_desc" }
|
|
119
|
-
]), S = k({
|
|
120
|
-
get: () => c.value ? [c.value] : [],
|
|
121
|
-
set: (f) => {
|
|
122
|
-
c.value = f.length === 1 && f[0] ? f[0] : null;
|
|
123
|
-
}
|
|
124
|
-
}), $ = k({
|
|
125
|
-
get: () => u.value ? [u.value] : [],
|
|
126
|
-
set: (f) => {
|
|
127
|
-
u.value = f.length === 1 && f[0] ? f[0] : "";
|
|
128
|
-
}
|
|
129
|
-
}), w = k({
|
|
130
|
-
get: () => ({
|
|
131
|
-
startDate: s.value ?? void 0,
|
|
132
|
-
endDate: r.value ?? void 0
|
|
133
|
-
}),
|
|
134
|
-
set: (f) => {
|
|
135
|
-
s.value = f.startDate ?? null, r.value = f.endDate ?? null;
|
|
136
|
-
}
|
|
137
|
-
}), m = k(() => i.locations.length > 0);
|
|
138
|
-
return D(() => i.readLocations()), (f, h) => (o(), a("div", ce, [
|
|
139
|
-
n("div", ie, [
|
|
140
|
-
g(G, {
|
|
141
|
-
modelValue: e(S),
|
|
142
|
-
"onUpdate:modelValue": h[0] || (h[0] = (_) => R(S) ? S.value = _ : null),
|
|
143
|
-
label: `${e(l)("connect.review.filter.source")}: `,
|
|
144
|
-
"show-item-label": !0,
|
|
145
|
-
items: e(y),
|
|
146
|
-
searchable: !1,
|
|
147
|
-
placement: "bottom-start"
|
|
148
|
-
}, null, 8, ["modelValue", "label", "items"]),
|
|
149
|
-
e(m) ? (o(), x(G, {
|
|
150
|
-
key: 0,
|
|
151
|
-
modelValue: e($),
|
|
152
|
-
"onUpdate:modelValue": h[1] || (h[1] = (_) => R($) ? $.value = _ : null),
|
|
153
|
-
label: `${e(l)("connect.review.filter.location")}: `,
|
|
154
|
-
"show-item-label": !0,
|
|
155
|
-
items: e(p),
|
|
156
|
-
placement: "bottom-start"
|
|
157
|
-
}, null, 8, ["modelValue", "label", "items"])) : I("", !0),
|
|
158
|
-
g(oe, {
|
|
159
|
-
modelValue: e(w),
|
|
160
|
-
"onUpdate:modelValue": h[2] || (h[2] = (_) => R(w) ? w.value = _ : null)
|
|
161
|
-
}, null, 8, ["modelValue"])
|
|
162
|
-
]),
|
|
163
|
-
g(re, {
|
|
164
|
-
modelValue: d.value,
|
|
165
|
-
"onUpdate:modelValue": h[3] || (h[3] = (_) => d.value = _),
|
|
166
|
-
label: `${e(l)("connect.review.filter.sort.label")}: `,
|
|
167
|
-
items: e(V),
|
|
168
|
-
placement: "bottom-start"
|
|
169
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
170
|
-
]));
|
|
171
|
-
}
|
|
172
|
-
}), O = "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", de = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16 flex flex-col gap-8" }, me = { class: "flex items-center gap-8" }, ve = ["src"], fe = { class: "flex flex-col flex-1 min-w-0" }, ge = { class: "fm-typo-en-body-md-600 truncate" }, ye = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, we = { class: "flex items-center gap-4 shrink-0" }, pe = ["src"], he = {
|
|
173
|
-
key: 0,
|
|
174
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
175
|
-
}, be = {
|
|
176
|
-
key: 0,
|
|
177
|
-
class: "flex items-center gap-4"
|
|
178
|
-
}, xe = {
|
|
179
|
-
key: 1,
|
|
180
|
-
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-700 line-clamp-3"
|
|
181
|
-
}, _e = {
|
|
182
|
-
key: 2,
|
|
183
|
-
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 italic"
|
|
184
|
-
}, ke = /* @__PURE__ */ M({
|
|
185
|
-
__name: "FacebookReviewCard",
|
|
186
|
-
props: {
|
|
187
|
-
review: {}
|
|
188
|
-
},
|
|
189
|
-
setup(t) {
|
|
190
|
-
const { t: l } = z();
|
|
191
|
-
return (c, s) => {
|
|
192
|
-
var r, u, d;
|
|
193
|
-
return o(), a("div", de, [
|
|
194
|
-
n("div", me, [
|
|
195
|
-
(r = t.review.reviewer) != null && r.pictureUrl ? (o(), a("img", {
|
|
196
|
-
key: 0,
|
|
197
|
-
src: (u = t.review.reviewer) == null ? void 0 : u.pictureUrl,
|
|
198
|
-
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
199
|
-
}, null, 8, ve)) : (o(), x(e(b).FmIcon, {
|
|
200
|
-
key: 1,
|
|
201
|
-
name: "person",
|
|
202
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
203
|
-
})),
|
|
204
|
-
n("div", fe, [
|
|
205
|
-
n("span", ge, v(((d = t.review.reviewer) == null ? void 0 : d.name) ?? e(l)("connect.review.overview.anonymous")), 1),
|
|
206
|
-
n("span", ye, v(e(P)(t.review.createTime).format("D MMM YYYY, hh:mmA")), 1)
|
|
207
|
-
]),
|
|
208
|
-
n("div", we, [
|
|
209
|
-
n("img", {
|
|
210
|
-
src: e(O),
|
|
211
|
-
class: "w-16 h-16"
|
|
212
|
-
}, null, 8, pe),
|
|
213
|
-
t.review.pageName ? (o(), a("span", he, v(t.review.pageName), 1)) : I("", !0)
|
|
214
|
-
])
|
|
215
|
-
]),
|
|
216
|
-
t.review.isPositive != null ? (o(), a("div", be, [
|
|
217
|
-
g(e(b).FmIcon, {
|
|
218
|
-
name: t.review.isPositive ? "thumb_up" : "thumb_down",
|
|
219
|
-
size: "sm",
|
|
220
|
-
class: B(
|
|
221
|
-
t.review.isPositive ? "text-fm-color-typo-success" : "text-fm-color-system-error-500"
|
|
222
|
-
)
|
|
223
|
-
}, null, 8, ["name", "class"]),
|
|
224
|
-
n("span", {
|
|
225
|
-
class: B([
|
|
226
|
-
"fm-typo-en-body-sm-400",
|
|
227
|
-
t.review.isPositive ? "text-fm-color-typo-success" : "text-fm-color-system-error-500"
|
|
228
|
-
])
|
|
229
|
-
}, v(t.review.isPositive ? e(l)("connect.review.overview.positive") : e(l)("connect.review.overview.negative")), 3)
|
|
230
|
-
])) : I("", !0),
|
|
231
|
-
t.review.comment ? (o(), a("p", xe, v(t.review.comment), 1)) : (o(), a("p", _e, v(e(l)("connect.review.overview.noComment")), 1))
|
|
232
|
-
]);
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
}), $e = "data:image/svg+xml,%3csvg%20width='388'%20height='388'%20viewBox='0%200%20388%20388'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M239.449%200H148.553C66.5106%200%200.00195312%2066.5086%200.00195312%20148.551V239.447C0.00195312%20321.489%2066.5106%20387.998%20148.553%20387.998H239.449C321.491%20387.998%20388%20321.489%20388%20239.447V148.551C388%2066.5086%20321.491%200%20239.449%200Z'%20fill='url(%23paint0_linear_feedme_logo)'%20/%3e%3cmask%20id='mask0_feedme_logo'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='388'%20height='388'%3e%3cpath%20d='M239.447%200H148.551C66.5086%200%200%2066.5086%200%20148.551V239.447C0%20321.489%2066.5086%20387.998%20148.551%20387.998H239.447C321.49%20387.998%20387.998%20321.489%20387.998%20239.447V148.551C387.998%2066.5086%20321.49%200%20239.447%200Z'%20fill='white'%20/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_feedme_logo)'%3e%3cpath%20d='M82.587%20258.589V258.76C83.2747%20264.893%2084.1917%20271.598%2085.3953%20278.648L101.271%20392.296H127.462V253.946C127.462%20241.395%20137.033%20231.194%20148.839%20231.194H150.329C162.135%20231.194%20171.706%20241.395%20171.706%20253.946V392.296H216.352V253.946C216.352%20241.395%20225.923%20231.194%20237.729%20231.194H239.219C251.025%20231.194%20260.596%20241.395%20260.596%20253.946V392.296H286.959L302.835%20277.788C303.981%20271.025%20304.841%20264.549%20305.471%20258.589V258.187C307.649%20238.759%20307.649%20225.061%20307.649%20225.061C307.649%20182.938%20290.054%20148.264%20252.286%20119.78C241.97%20112.043%20233.029%20100.466%20232.17%2075.7079C232.17%2075.7079%20229.705%2012.9519%20253.719%20-33.7568H134.339C158.353%2012.9519%20155.888%2075.7079%20155.888%2075.7079C155.029%20100.409%20146.088%20111.986%20135.772%20119.78C97.9465%20148.321%2080.4092%20182.938%2080.4092%20225.061C80.4092%20225.061%2080.4092%20238.873%2082.587%20258.474V258.589Z'%20fill='white'%20/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_feedme_logo'%20x1='43.5013'%20y1='344.556'%20x2='344.501'%20y2='43.5567'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF5D53'%20/%3e%3cstop%20offset='1'%20stop-color='%23FCA23E'%20/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", Ce = {
|
|
236
|
-
key: 0,
|
|
237
|
-
class: "flex flex-wrap gap-8"
|
|
238
|
-
}, Fe = ["onClick"], Ie = ["src", "alt"], Me = {
|
|
239
|
-
key: 0,
|
|
240
|
-
class: "absolute inset-0 flex items-center justify-center bg-black/30"
|
|
241
|
-
}, Ue = ["src"], Se = ["src", "alt"], Ve = /* @__PURE__ */ M({
|
|
242
|
-
__name: "FeedmeReviewCardMedia",
|
|
243
|
-
props: {
|
|
244
|
-
mediaItems: {}
|
|
245
|
-
},
|
|
246
|
-
setup(t) {
|
|
247
|
-
const l = C(null);
|
|
248
|
-
return (c, s) => t.mediaItems && t.mediaItems.length > 0 ? (o(), a("div", Ce, [
|
|
249
|
-
(o(!0), a(F, null, U(t.mediaItems, (r, u) => (o(), a("div", {
|
|
250
|
-
key: u,
|
|
251
|
-
class: "relative w-72 h-72 rounded-lg overflow-hidden border border-fm-color-neutral-gray-200 shrink-0 cursor-pointer hover:opacity-90 transition-opacity",
|
|
252
|
-
onClick: (d) => l.value = r
|
|
253
|
-
}, [
|
|
254
|
-
n("img", {
|
|
255
|
-
src: r.thumbnailUrl,
|
|
256
|
-
alt: r.thumbnailLabel,
|
|
257
|
-
class: "w-full h-full object-cover"
|
|
258
|
-
}, null, 8, Ie),
|
|
259
|
-
r.videoUrl ? (o(), a("div", Me, [
|
|
260
|
-
g(e(b).FmIcon, {
|
|
261
|
-
name: "play_arrow",
|
|
262
|
-
class: "text-white"
|
|
263
|
-
})
|
|
264
|
-
])) : I("", !0)
|
|
265
|
-
], 8, Fe))), 128)),
|
|
266
|
-
(o(), x(K, { to: "body" }, [
|
|
267
|
-
l.value ? (o(), a("div", {
|
|
268
|
-
key: 0,
|
|
269
|
-
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",
|
|
270
|
-
onClick: s[2] || (s[2] = (r) => l.value = null)
|
|
271
|
-
}, [
|
|
272
|
-
n("button", {
|
|
273
|
-
class: "absolute top-16 right-16 z-50 p-8 text-white hover:text-fm-color-neutral-gray-300 transition-colors",
|
|
274
|
-
onClick: s[0] || (s[0] = (r) => l.value = null)
|
|
275
|
-
}, [
|
|
276
|
-
g(e(b).FmIcon, {
|
|
277
|
-
name: "close",
|
|
278
|
-
size: "lg"
|
|
279
|
-
})
|
|
280
|
-
]),
|
|
281
|
-
n("div", {
|
|
282
|
-
class: "relative max-w-[90vw] max-h-[90vh] flex items-center justify-center",
|
|
283
|
-
onClick: s[1] || (s[1] = W(() => {
|
|
284
|
-
}, ["stop"]))
|
|
285
|
-
}, [
|
|
286
|
-
l.value.videoUrl ? (o(), a("video", {
|
|
287
|
-
key: 0,
|
|
288
|
-
src: l.value.videoUrl,
|
|
289
|
-
controls: "",
|
|
290
|
-
autoplay: "",
|
|
291
|
-
class: "max-w-full max-h-[90vh] rounded-lg shadow-lg"
|
|
292
|
-
}, null, 8, Ue)) : (o(), a("img", {
|
|
293
|
-
key: 1,
|
|
294
|
-
src: l.value.thumbnailUrl,
|
|
295
|
-
alt: l.value.thumbnailLabel,
|
|
296
|
-
class: "max-w-full max-h-[90vh] rounded-lg shadow-lg object-contain"
|
|
297
|
-
}, null, 8, Se))
|
|
298
|
-
])
|
|
299
|
-
])) : I("", !0)
|
|
300
|
-
]))
|
|
301
|
-
])) : I("", !0);
|
|
302
|
-
}
|
|
303
|
-
}), Re = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16 flex flex-col gap-8" }, ze = { class: "flex items-center gap-8" }, Te = ["src"], Be = { class: "flex flex-col flex-1 min-w-0" }, He = { class: "fm-typo-en-body-md-600 truncate" }, Le = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, je = { class: "flex items-center gap-4 shrink-0" }, Ae = ["src"], De = {
|
|
304
|
-
key: 0,
|
|
305
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
306
|
-
}, Ee = { class: "flex items-center gap-4" }, Pe = {
|
|
307
|
-
key: 0,
|
|
308
|
-
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-700 line-clamp-3"
|
|
309
|
-
}, Ne = {
|
|
310
|
-
key: 1,
|
|
311
|
-
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 italic"
|
|
312
|
-
}, Ye = /* @__PURE__ */ M({
|
|
313
|
-
__name: "FeedmeReviewCard",
|
|
314
|
-
props: {
|
|
315
|
-
review: {}
|
|
316
|
-
},
|
|
317
|
-
setup(t) {
|
|
318
|
-
const { t: l } = z();
|
|
319
|
-
return (c, s) => (o(), a("div", Re, [
|
|
320
|
-
n("div", ze, [
|
|
321
|
-
t.review.reviewer.photoUrl ? (o(), a("img", {
|
|
322
|
-
key: 0,
|
|
323
|
-
src: t.review.reviewer.photoUrl,
|
|
324
|
-
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
325
|
-
}, null, 8, Te)) : (o(), x(e(b).FmIcon, {
|
|
326
|
-
key: 1,
|
|
327
|
-
name: "person",
|
|
328
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
329
|
-
})),
|
|
330
|
-
n("div", Be, [
|
|
331
|
-
n("span", He, v(t.review.reviewer.name ?? e(l)("connect.review.overview.anonymous")), 1),
|
|
332
|
-
n("span", Le, v(e(P)(t.review.createTime).format("D MMM YYYY, hh:mmA")), 1)
|
|
333
|
-
]),
|
|
334
|
-
n("div", je, [
|
|
335
|
-
n("img", {
|
|
336
|
-
src: e($e),
|
|
337
|
-
class: "w-16 h-16",
|
|
338
|
-
alt: "FeedMe"
|
|
339
|
-
}, null, 8, Ae),
|
|
340
|
-
t.review.location ? (o(), a("span", De, v(t.review.location.name), 1)) : I("", !0)
|
|
341
|
-
])
|
|
342
|
-
]),
|
|
343
|
-
n("div", Ee, [
|
|
344
|
-
(o(), a(F, null, U(5, (r) => g(e(b).FmIcon, {
|
|
345
|
-
key: r,
|
|
346
|
-
name: "star",
|
|
347
|
-
size: "sm",
|
|
348
|
-
class: B(
|
|
349
|
-
r <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
|
|
350
|
-
)
|
|
351
|
-
}, null, 8, ["class"])), 64))
|
|
352
|
-
]),
|
|
353
|
-
t.review.comment ? (o(), a("p", Pe, v(t.review.comment), 1)) : (o(), a("p", Ne, v(e(l)("connect.review.overview.noComment")), 1)),
|
|
354
|
-
g(Ve, {
|
|
355
|
-
"media-items": t.review.mediaItems
|
|
356
|
-
}, null, 8, ["media-items"])
|
|
357
|
-
]));
|
|
358
|
-
}
|
|
359
|
-
}), Z = "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", Ge = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16 flex flex-col gap-8" }, qe = { class: "flex items-center gap-8" }, Oe = ["src"], Ze = { class: "flex flex-col flex-1 min-w-0" }, Ke = { class: "fm-typo-en-body-md-600 truncate" }, We = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, Je = { class: "flex items-center gap-4 shrink-0" }, Qe = ["src"], Xe = {
|
|
360
|
-
key: 0,
|
|
361
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
362
|
-
}, et = { class: "flex items-center gap-4" }, tt = {
|
|
363
|
-
key: 0,
|
|
364
|
-
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-700 line-clamp-3"
|
|
365
|
-
}, ot = {
|
|
366
|
-
key: 1,
|
|
367
|
-
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 italic"
|
|
368
|
-
}, lt = /* @__PURE__ */ M({
|
|
369
|
-
__name: "GoogleReviewCard",
|
|
370
|
-
props: {
|
|
371
|
-
review: {}
|
|
372
|
-
},
|
|
373
|
-
setup(t) {
|
|
374
|
-
const { t: l } = z();
|
|
375
|
-
return (c, s) => {
|
|
376
|
-
var r, u, d;
|
|
377
|
-
return o(), a("div", Ge, [
|
|
378
|
-
n("div", qe, [
|
|
379
|
-
(r = t.review.reviewer) != null && r.pictureUrl ? (o(), a("img", {
|
|
380
|
-
key: 0,
|
|
381
|
-
src: (u = t.review.reviewer) == null ? void 0 : u.pictureUrl,
|
|
382
|
-
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
383
|
-
}, null, 8, Oe)) : (o(), x(e(b).FmIcon, {
|
|
384
|
-
key: 1,
|
|
385
|
-
name: "person",
|
|
386
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
387
|
-
})),
|
|
388
|
-
n("div", Ze, [
|
|
389
|
-
n("span", Ke, v(((d = t.review.reviewer) == null ? void 0 : d.name) ?? e(l)("connect.review.overview.anonymous")), 1),
|
|
390
|
-
n("span", We, v(e(P)(t.review.createTime).format("D MMM YYYY, hh:mmA")), 1)
|
|
391
|
-
]),
|
|
392
|
-
n("div", Je, [
|
|
393
|
-
n("img", {
|
|
394
|
-
src: e(Z),
|
|
395
|
-
class: "w-16 h-16"
|
|
396
|
-
}, null, 8, Qe),
|
|
397
|
-
t.review.locationDisplayName ? (o(), a("span", Xe, v(t.review.locationDisplayName), 1)) : I("", !0)
|
|
398
|
-
])
|
|
399
|
-
]),
|
|
400
|
-
n("div", et, [
|
|
401
|
-
(o(), a(F, null, U(5, (i) => g(e(b).FmIcon, {
|
|
402
|
-
key: i,
|
|
403
|
-
name: "star",
|
|
404
|
-
size: "sm",
|
|
405
|
-
class: B(
|
|
406
|
-
i <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
|
|
407
|
-
)
|
|
408
|
-
}, null, 8, ["class"])), 64))
|
|
409
|
-
]),
|
|
410
|
-
t.review.comment ? (o(), a("p", tt, v(t.review.comment), 1)) : (o(), a("p", ot, v(e(l)("connect.review.overview.noComment")), 1))
|
|
411
|
-
]);
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
}), nt = /* @__PURE__ */ M({
|
|
415
|
-
__name: "ReviewCard",
|
|
416
|
-
props: {
|
|
417
|
-
review: {}
|
|
418
|
-
},
|
|
419
|
-
setup(t) {
|
|
420
|
-
const l = t, c = k(
|
|
421
|
-
() => l.review.source === "google" ? l.review : null
|
|
422
|
-
), s = k(
|
|
423
|
-
() => l.review.source === "facebook" ? l.review : null
|
|
424
|
-
), r = k(
|
|
425
|
-
() => l.review.source === "feedme" ? l.review : null
|
|
426
|
-
);
|
|
427
|
-
return (u, d) => c.value ? (o(), x(lt, {
|
|
428
|
-
key: 0,
|
|
429
|
-
review: c.value
|
|
430
|
-
}, null, 8, ["review"])) : s.value ? (o(), x(ke, {
|
|
431
|
-
key: 1,
|
|
432
|
-
review: s.value
|
|
433
|
-
}, null, 8, ["review"])) : r.value ? (o(), x(Ye, {
|
|
434
|
-
key: 2,
|
|
435
|
-
review: r.value
|
|
436
|
-
}, null, 8, ["review"])) : I("", !0);
|
|
437
|
-
}
|
|
438
|
-
}), st = {
|
|
439
|
-
key: 0,
|
|
440
|
-
class: "flex justify-center py-32"
|
|
441
|
-
}, at = {
|
|
442
|
-
key: 1,
|
|
443
|
-
class: "flex flex-col items-center justify-center py-48 gap-8"
|
|
444
|
-
}, rt = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ct = {
|
|
445
|
-
key: 3,
|
|
446
|
-
class: "flex justify-center py-16"
|
|
447
|
-
}, it = /* @__PURE__ */ M({
|
|
448
|
-
__name: "ReviewFeed",
|
|
449
|
-
props: {
|
|
450
|
-
reviews: {},
|
|
451
|
-
loading: { type: Boolean },
|
|
452
|
-
hasMore: { type: Boolean }
|
|
453
|
-
},
|
|
454
|
-
emits: ["loadMore"],
|
|
455
|
-
setup(t, { emit: l }) {
|
|
456
|
-
const { t: c } = z(), s = t, r = l, u = C(null);
|
|
457
|
-
return D(() => {
|
|
458
|
-
const d = new IntersectionObserver(
|
|
459
|
-
(i) => {
|
|
460
|
-
i[0].isIntersecting && s.hasMore && !s.loading && r("loadMore");
|
|
461
|
-
},
|
|
462
|
-
{ threshold: 0.5 }
|
|
463
|
-
);
|
|
464
|
-
u.value && d.observe(u.value), J(() => d.disconnect());
|
|
465
|
-
}), (d, i) => (o(), a(F, null, [
|
|
466
|
-
t.loading && t.reviews.length === 0 ? (o(), a("div", st, [
|
|
467
|
-
g(e(b).FmIcon, {
|
|
468
|
-
name: "sync",
|
|
469
|
-
size: "xl",
|
|
470
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
471
|
-
})
|
|
472
|
-
])) : t.reviews.length === 0 ? (o(), a("div", at, [
|
|
473
|
-
g(e(b).FmIcon, {
|
|
474
|
-
name: "rate_review",
|
|
475
|
-
size: "xl",
|
|
476
|
-
class: "text-fm-color-neutral-gray-300"
|
|
477
|
-
}),
|
|
478
|
-
n("p", rt, v(e(c)("connect.review.overview.empty")), 1)
|
|
479
|
-
])) : (o(!0), a(F, { key: 2 }, U(t.reviews, (y) => (o(), x(nt, {
|
|
480
|
-
key: y._id,
|
|
481
|
-
review: y
|
|
482
|
-
}, null, 8, ["review"]))), 128)),
|
|
483
|
-
n("div", {
|
|
484
|
-
ref_key: "sentinel",
|
|
485
|
-
ref: u,
|
|
486
|
-
class: "h-1"
|
|
487
|
-
}, null, 512),
|
|
488
|
-
t.loading && t.reviews.length > 0 ? (o(), a("div", ct, [
|
|
489
|
-
g(e(b).FmIcon, {
|
|
490
|
-
name: "sync",
|
|
491
|
-
size: "md",
|
|
492
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
493
|
-
})
|
|
494
|
-
])) : I("", !0)
|
|
495
|
-
], 64));
|
|
496
|
-
}
|
|
497
|
-
}), ut = { class: "w-1/2 rounded-lg border border-fm-color-neutral-gray-200 bg-white p-5" }, dt = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, mt = { class: "mt-16 grid grid-cols-[minmax(0,1fr)_minmax(140px,0.5fr)] gap-5" }, vt = { class: "mt-12 flex flex-col gap-8" }, ft = { class: "w-16 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-500" }, gt = { class: "h-8 flex-1 overflow-hidden rounded-full bg-fm-color-neutral-gray-100" }, yt = { class: "w-24 text-right fm-typo-en-body-sm-400 text-fm-color-neutral-gray-500" }, wt = { class: "mt-8 flex flex-col items-center" }, pt = { class: "fm-typo-en-display-lg-800 text-fm-color-typo-primary" }, ht = {
|
|
498
|
-
class: "mt-8 flex items-center gap-1",
|
|
499
|
-
"aria-label": "Average rating"
|
|
500
|
-
}, bt = { class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, xt = /* @__PURE__ */ M({
|
|
501
|
-
__name: "ReviewSummary",
|
|
502
|
-
props: {
|
|
503
|
-
reviews: {}
|
|
504
|
-
},
|
|
505
|
-
setup(t) {
|
|
506
|
-
const l = t, c = k(
|
|
507
|
-
() => l.reviews.filter(
|
|
508
|
-
(i) => "starRating" in i
|
|
509
|
-
)
|
|
510
|
-
), s = k(() => c.value.length ? (c.value.reduce(
|
|
511
|
-
(y, p) => y + p.starRating,
|
|
512
|
-
0
|
|
513
|
-
) / c.value.length).toFixed(1) : "0.0"), r = k(() => Number(s.value)), u = k(
|
|
514
|
-
() => [5, 4, 3, 2, 1].map((i) => ({
|
|
515
|
-
star: i,
|
|
516
|
-
count: c.value.filter((y) => y.starRating === i).length
|
|
517
|
-
}))
|
|
518
|
-
);
|
|
519
|
-
function d(i) {
|
|
520
|
-
return `${Math.min(Math.max(r.value - i + 1, 0), 1) * 100}%`;
|
|
521
|
-
}
|
|
522
|
-
return (i, y) => (o(), a("div", ut, [
|
|
523
|
-
n("h2", dt, v(i.$t("connect.review.overview.summary")), 1),
|
|
524
|
-
n("div", mt, [
|
|
525
|
-
n("div", vt, [
|
|
526
|
-
(o(!0), a(F, null, U(e(u), (p) => (o(), a("div", {
|
|
527
|
-
key: p.star,
|
|
528
|
-
class: "flex items-center gap-8"
|
|
529
|
-
}, [
|
|
530
|
-
n("span", ft, v(p.star), 1),
|
|
531
|
-
g(e(b).FmIcon, {
|
|
532
|
-
name: "star",
|
|
533
|
-
size: "sm",
|
|
534
|
-
class: "text-amber-400"
|
|
535
|
-
}),
|
|
536
|
-
n("div", gt, [
|
|
537
|
-
n("div", {
|
|
538
|
-
class: "h-full rounded-full bg-amber-400 transition-[width]",
|
|
539
|
-
style: N({
|
|
540
|
-
width: `${e(c).length ? p.count / e(c).length * 100 : 0}%`
|
|
541
|
-
})
|
|
542
|
-
}, null, 4)
|
|
543
|
-
]),
|
|
544
|
-
n("span", yt, v(p.count), 1)
|
|
545
|
-
]))), 128))
|
|
546
|
-
]),
|
|
547
|
-
n("div", wt, [
|
|
548
|
-
n("span", pt, v(e(s)), 1),
|
|
549
|
-
n("div", ht, [
|
|
550
|
-
(o(), a(F, null, U(5, (p) => n("span", {
|
|
551
|
-
key: p,
|
|
552
|
-
class: "relative"
|
|
553
|
-
}, [
|
|
554
|
-
g(e(b).FmIcon, {
|
|
555
|
-
name: "star",
|
|
556
|
-
size: "md",
|
|
557
|
-
class: "text-fm-color-neutral-gray-200"
|
|
558
|
-
}),
|
|
559
|
-
n("span", {
|
|
560
|
-
class: "absolute inset-y-0 left-0 overflow-hidden",
|
|
561
|
-
style: N({ width: d(p) })
|
|
562
|
-
}, [
|
|
563
|
-
g(e(b).FmIcon, {
|
|
564
|
-
name: "star",
|
|
565
|
-
size: "md",
|
|
566
|
-
class: "text-amber-400"
|
|
567
|
-
})
|
|
568
|
-
], 4)
|
|
569
|
-
])), 64))
|
|
570
|
-
]),
|
|
571
|
-
n("span", bt, " (" + v(e(c).length) + ") ", 1)
|
|
572
|
-
])
|
|
573
|
-
])
|
|
574
|
-
]));
|
|
575
|
-
}
|
|
576
|
-
}), _t = { class: "p-24 flex flex-col gap-12" }, E = 20, kt = /* @__PURE__ */ M({
|
|
577
|
-
__name: "ReviewOverview",
|
|
578
|
-
setup(t) {
|
|
579
|
-
const l = C([]), c = C(!1), s = C(!0), r = C(null), u = C(null), d = C(null), i = C(""), y = C("createTime_desc");
|
|
580
|
-
Y(r, () => {
|
|
581
|
-
i.value = "";
|
|
582
|
-
});
|
|
583
|
-
function p($) {
|
|
584
|
-
return {
|
|
585
|
-
source: r.value || void 0,
|
|
586
|
-
dateFrom: u.value || void 0,
|
|
587
|
-
dateTo: d.value || void 0,
|
|
588
|
-
locationId: i.value || void 0,
|
|
589
|
-
sort: y.value,
|
|
590
|
-
limit: E,
|
|
591
|
-
skip: $
|
|
592
|
-
};
|
|
593
|
-
}
|
|
594
|
-
async function V() {
|
|
595
|
-
c.value = !0, s.value = !0;
|
|
596
|
-
try {
|
|
597
|
-
const $ = await T.listReviews(p(0));
|
|
598
|
-
l.value = $, s.value = $.length === E;
|
|
599
|
-
} finally {
|
|
600
|
-
c.value = !1;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
async function S() {
|
|
604
|
-
if (!(c.value || !s.value)) {
|
|
605
|
-
c.value = !0;
|
|
606
|
-
try {
|
|
607
|
-
const $ = await T.listReviews(p(l.value.length));
|
|
608
|
-
l.value = [...l.value, ...$], s.value = $.length === E;
|
|
609
|
-
} finally {
|
|
610
|
-
c.value = !1;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return Y(
|
|
615
|
-
[r, u, d, i, y],
|
|
616
|
-
V
|
|
617
|
-
), D(V), ($, w) => (o(), a("div", _t, [
|
|
618
|
-
g(xt, { reviews: e(l) }, null, 8, ["reviews"]),
|
|
619
|
-
g(ue, {
|
|
620
|
-
source: e(r),
|
|
621
|
-
"onUpdate:source": w[0] || (w[0] = (m) => R(r) ? r.value = m : null),
|
|
622
|
-
"date-from": e(u),
|
|
623
|
-
"onUpdate:dateFrom": w[1] || (w[1] = (m) => R(u) ? u.value = m : null),
|
|
624
|
-
"date-to": e(d),
|
|
625
|
-
"onUpdate:dateTo": w[2] || (w[2] = (m) => R(d) ? d.value = m : null),
|
|
626
|
-
"location-id": e(i),
|
|
627
|
-
"onUpdate:locationId": w[3] || (w[3] = (m) => R(i) ? i.value = m : null),
|
|
628
|
-
sort: e(y),
|
|
629
|
-
"onUpdate:sort": w[4] || (w[4] = (m) => R(y) ? y.value = m : null)
|
|
630
|
-
}, null, 8, ["source", "date-from", "date-to", "location-id", "sort"]),
|
|
631
|
-
g(it, {
|
|
632
|
-
reviews: e(l),
|
|
633
|
-
loading: e(c),
|
|
634
|
-
"has-more": e(s),
|
|
635
|
-
onLoadMore: S
|
|
636
|
-
}, null, 8, ["reviews", "loading", "has-more"])
|
|
637
|
-
]));
|
|
638
|
-
}
|
|
639
|
-
}), $t = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, Ct = ["src"], Ft = { class: "flex flex-col flex-1 min-w-0" }, It = { class: "fm-typo-en-body-md-600 capitalize" }, Mt = {
|
|
640
|
-
key: 0,
|
|
641
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
|
|
642
|
-
}, q = /* @__PURE__ */ M({
|
|
643
|
-
__name: "ReviewSource",
|
|
644
|
-
props: {
|
|
645
|
-
icon: {},
|
|
646
|
-
name: {},
|
|
647
|
-
connected: { type: Boolean },
|
|
648
|
-
subtitle: {},
|
|
649
|
-
syncing: { type: Boolean },
|
|
650
|
-
tokenExpired: { type: Boolean }
|
|
651
|
-
},
|
|
652
|
-
emits: ["connect", "sync"],
|
|
653
|
-
setup(t, { emit: l }) {
|
|
654
|
-
const c = l, { t: s } = z(), r = Q();
|
|
655
|
-
return (u, d) => (o(), a("div", $t, [
|
|
656
|
-
n("div", {
|
|
657
|
-
class: B(["flex items-center gap-12 p-16", e(r).default ? "border-b border-fm-color-neutral-gray-100" : ""])
|
|
658
|
-
}, [
|
|
659
|
-
n("img", {
|
|
660
|
-
src: t.icon,
|
|
661
|
-
class: "w-10 h-10 shrink-0"
|
|
662
|
-
}, null, 8, Ct),
|
|
663
|
-
n("div", Ft, [
|
|
664
|
-
n("span", It, v(t.name), 1),
|
|
665
|
-
t.subtitle ? (o(), a("span", Mt, v(t.subtitle), 1)) : I("", !0)
|
|
666
|
-
]),
|
|
667
|
-
t.connected ? (o(), a(F, { key: 0 }, [
|
|
668
|
-
t.tokenExpired ? (o(), x(e(b).FmChip, {
|
|
669
|
-
key: 0,
|
|
670
|
-
label: e(s)("connect.review.expired"),
|
|
671
|
-
variant: "critical"
|
|
672
|
-
}, null, 8, ["label"])) : I("", !0),
|
|
673
|
-
g(e(b).FmButton, {
|
|
674
|
-
variant: "secondary",
|
|
675
|
-
"prepend-icon": "refresh",
|
|
676
|
-
label: e(s)("connect.review.reconnect"),
|
|
677
|
-
onClick: d[0] || (d[0] = (i) => c("connect"))
|
|
678
|
-
}, null, 8, ["label"]),
|
|
679
|
-
t.tokenExpired ? I("", !0) : (o(), x(e(b).FmButton, {
|
|
680
|
-
key: 1,
|
|
681
|
-
variant: "primary",
|
|
682
|
-
"prepend-icon": "sync",
|
|
683
|
-
label: e(s)("connect.review.sync"),
|
|
684
|
-
loading: t.syncing,
|
|
685
|
-
onClick: d[1] || (d[1] = (i) => c("sync"))
|
|
686
|
-
}, null, 8, ["label", "loading"]))
|
|
687
|
-
], 64)) : (o(), x(e(b).FmButton, {
|
|
688
|
-
key: 1,
|
|
689
|
-
"prepend-icon": "add",
|
|
690
|
-
label: e(s)("connect.review.connect"),
|
|
691
|
-
onClick: d[2] || (d[2] = (i) => c("connect"))
|
|
692
|
-
}, null, 8, ["label"]))
|
|
693
|
-
], 2),
|
|
694
|
-
X(u.$slots, "default")
|
|
695
|
-
]));
|
|
696
|
-
}
|
|
697
|
-
}), Ut = { class: "p-24 flex flex-col gap-8" }, St = { class: "flex flex-col flex-1 min-w-0" }, Vt = { class: "fm-typo-en-body-lg-600 truncate" }, Rt = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, zt = ["src"], Tt = { class: "flex flex-col flex-1 min-w-0" }, Bt = { class: "fm-typo-en-body-lg-600 truncate" }, Ht = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, Lt = /* @__PURE__ */ M({
|
|
698
|
-
__name: "ReviewSettings",
|
|
699
|
-
setup(t) {
|
|
700
|
-
const { t: l } = z(), c = ne(), s = C(null), r = C(!1), u = C(!1), d = k(
|
|
701
|
-
() => {
|
|
702
|
-
var m;
|
|
703
|
-
return s.value ? ((m = s.value.google) == null ? void 0 : m.token) === null : !1;
|
|
704
|
-
}
|
|
705
|
-
), i = k(
|
|
706
|
-
() => {
|
|
707
|
-
var m;
|
|
708
|
-
return s.value ? ((m = s.value.facebook) == null ? void 0 : m.token) === null : !1;
|
|
709
|
-
}
|
|
710
|
-
);
|
|
711
|
-
function y(m) {
|
|
712
|
-
const f = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
|
|
713
|
-
return `${window.location.origin}${f}${m}`;
|
|
714
|
-
}
|
|
715
|
-
async function p() {
|
|
716
|
-
await se.minor(async () => {
|
|
717
|
-
s.value = await T.getSource();
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
async function V() {
|
|
721
|
-
var m, f;
|
|
722
|
-
r.value = !0;
|
|
723
|
-
try {
|
|
724
|
-
await T.syncGoogleReviews();
|
|
725
|
-
} catch (h) {
|
|
726
|
-
if (await p(), ((f = (m = s.value) == null ? void 0 : m.google) == null ? void 0 : f.token) === null) {
|
|
727
|
-
c.open({
|
|
728
|
-
message: l("connect.review.tokenExpired"),
|
|
729
|
-
type: "error"
|
|
730
|
-
});
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
throw h;
|
|
734
|
-
} finally {
|
|
735
|
-
r.value = !1;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
async function S() {
|
|
739
|
-
var m, f;
|
|
740
|
-
u.value = !0;
|
|
741
|
-
try {
|
|
742
|
-
await T.syncFacebookReviews();
|
|
743
|
-
} catch (h) {
|
|
744
|
-
if (await p(), ((f = (m = s.value) == null ? void 0 : m.facebook) == null ? void 0 : f.token) === null) {
|
|
745
|
-
c.open({
|
|
746
|
-
message: l("connect.review.tokenExpired"),
|
|
747
|
-
type: "error"
|
|
748
|
-
});
|
|
749
|
-
return;
|
|
750
|
-
}
|
|
751
|
-
throw h;
|
|
752
|
-
} finally {
|
|
753
|
-
u.value = !1;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
async function $() {
|
|
757
|
-
const m = y("/review/google/callback"), { callbackUrl: f } = await T.getOauthUrl("google", m);
|
|
758
|
-
window.location.href = f;
|
|
759
|
-
}
|
|
760
|
-
async function w() {
|
|
761
|
-
const m = y("/review/facebook/callback"), { callbackUrl: f } = await T.getOauthUrl("facebook", m);
|
|
762
|
-
window.location.href = f;
|
|
763
|
-
}
|
|
764
|
-
return D(p), (m, f) => (o(), a("div", Ut, [
|
|
765
|
-
e(s) ? (o(), a(F, { key: 0 }, [
|
|
766
|
-
g(q, {
|
|
767
|
-
icon: e(Z),
|
|
768
|
-
name: "google",
|
|
769
|
-
connected: !!e(s).google,
|
|
770
|
-
syncing: e(r),
|
|
771
|
-
"token-expired": e(d),
|
|
772
|
-
onConnect: $,
|
|
773
|
-
onSync: V
|
|
774
|
-
}, {
|
|
775
|
-
default: j(() => {
|
|
776
|
-
var h;
|
|
777
|
-
return [
|
|
778
|
-
(o(!0), a(F, null, U((h = e(s).google) == null ? void 0 : h.locations, (_) => {
|
|
779
|
-
var A;
|
|
780
|
-
return o(), a("div", {
|
|
781
|
-
key: _.googleLocationName,
|
|
782
|
-
class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
783
|
-
}, [
|
|
784
|
-
g(e(b).FmIcon, {
|
|
785
|
-
name: "location_on",
|
|
786
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
787
|
-
}),
|
|
788
|
-
n("div", St, [
|
|
789
|
-
n("span", Vt, v(_.displayName), 1),
|
|
790
|
-
n("span", Rt, v(((A = _.location) == null ? void 0 : A.name) ?? e(l)("connect.review.google.noLocations")), 1)
|
|
791
|
-
])
|
|
792
|
-
]);
|
|
793
|
-
}), 128))
|
|
794
|
-
];
|
|
795
|
-
}),
|
|
796
|
-
_: 1
|
|
797
|
-
}, 8, ["icon", "connected", "syncing", "token-expired"]),
|
|
798
|
-
g(q, {
|
|
799
|
-
icon: e(O),
|
|
800
|
-
name: "facebook",
|
|
801
|
-
connected: !!e(s).facebook,
|
|
802
|
-
syncing: e(u),
|
|
803
|
-
"token-expired": e(i),
|
|
804
|
-
onConnect: w,
|
|
805
|
-
onSync: S
|
|
806
|
-
}, {
|
|
807
|
-
default: j(() => {
|
|
808
|
-
var h;
|
|
809
|
-
return [
|
|
810
|
-
(o(!0), a(F, null, U((h = e(s).facebook) == null ? void 0 : h.pages, (_) => (o(), a("div", {
|
|
811
|
-
key: _.facebookPageId,
|
|
812
|
-
class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
813
|
-
}, [
|
|
814
|
-
_.pageProfileImageUrl ? (o(), a("img", {
|
|
815
|
-
key: 0,
|
|
816
|
-
src: _.pageProfileImageUrl,
|
|
817
|
-
class: "w-10 h-10 rounded-full shrink-0 object-cover"
|
|
818
|
-
}, null, 8, zt)) : (o(), x(e(b).FmIcon, {
|
|
819
|
-
key: 1,
|
|
820
|
-
name: "person",
|
|
821
|
-
class: "text-fm-color-neutral-gray-300 shrink-0"
|
|
822
|
-
})),
|
|
823
|
-
n("div", Tt, [
|
|
824
|
-
n("span", Bt, v(_.pageName), 1),
|
|
825
|
-
n("span", Ht, v(_.locations.map((A) => A.name).join(", ")), 1)
|
|
826
|
-
])
|
|
827
|
-
]))), 128))
|
|
828
|
-
];
|
|
829
|
-
}),
|
|
830
|
-
_: 1
|
|
831
|
-
}, 8, ["icon", "connected", "syncing", "token-expired"])
|
|
832
|
-
], 64)) : (o(), a(F, { key: 1 }, U(["google", "facebook"], (h) => n("div", {
|
|
833
|
-
key: h,
|
|
834
|
-
class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
|
|
835
|
-
}, [...f[0] || (f[0] = [
|
|
836
|
-
ee('<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)
|
|
837
|
-
])])), 64))
|
|
838
|
-
]));
|
|
839
|
-
}
|
|
840
|
-
}), jt = { class: "flex flex-col" }, At = { class: "px-24" }, Kt = /* @__PURE__ */ M({
|
|
841
|
-
__name: "Review",
|
|
842
|
-
setup(t) {
|
|
843
|
-
const { t: l } = z(), c = [
|
|
844
|
-
{ label: l("connect.review.tabs.overview"), value: "overview" },
|
|
845
|
-
{ label: l("connect.review.tabs.settings"), value: "settings" }
|
|
846
|
-
], s = C(c[0]);
|
|
847
|
-
return (r, u) => {
|
|
848
|
-
const d = H("FmPageHead"), i = H("FmTabs");
|
|
849
|
-
return o(), a(F, null, [
|
|
850
|
-
g(d, {
|
|
851
|
-
title: e(l)("connect.navigation.review")
|
|
852
|
-
}, null, 8, ["title"]),
|
|
853
|
-
n("div", jt, [
|
|
854
|
-
n("div", At, [
|
|
855
|
-
g(i, {
|
|
856
|
-
"model-value": e(s).value,
|
|
857
|
-
items: c,
|
|
858
|
-
"onUpdate:modelValue": u[0] || (u[0] = (y) => s.value = c.find((p) => p.value === y))
|
|
859
|
-
}, null, 8, ["model-value"])
|
|
860
|
-
]),
|
|
861
|
-
(o(), x(te, null, [
|
|
862
|
-
e(s).value === "overview" ? (o(), x(kt, { key: 0 })) : e(s).value === "settings" ? (o(), x(Lt, { key: 1 })) : I("", !0)
|
|
863
|
-
], 1024))
|
|
864
|
-
])
|
|
865
|
-
], 64);
|
|
866
|
-
};
|
|
867
|
-
}
|
|
868
|
-
});
|
|
869
|
-
export {
|
|
870
|
-
Kt as default
|
|
871
|
-
};
|