@feedmepos/mf-connect 0.1.114-prod → 0.1.116-dev

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 (157) hide show
  1. package/README.md +66 -1
  2. package/dist/{App-DMYXrCc7.js → App-DWDgsBqW.js} +700 -654
  3. package/dist/AuditLogs-BqEtvKFs.js +2016 -0
  4. package/dist/{Bin-CHZolo56.js → Bin-Cz6fmewG.js} +8 -8
  5. package/dist/Broadcast-CQ0pfKpx.js +306 -0
  6. package/dist/{CampaignAnalytic-DgZvsUoF.js → CampaignAnalytic-CiRCB3kh.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C42uL_JO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js} +9 -9
  8. package/dist/{Card-wRFTJwJ9.js → Card-Kw2PFL2m.js} +25 -24
  9. package/dist/{Collections-9G-_9Etz.js → Collections-D8Vx_EEH.js} +197 -185
  10. package/dist/{Credit-Bl7IDMCU.js → Credit-B1jsQ5zg.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BVLJeofG.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Q1f6EQW3.js → EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js} +32 -32
  14. package/dist/{Experience-Cs2iViLv.js → Experience-B0JIA3sL.js} +32 -31
  15. package/dist/{FileSaver.min-B3Levdbu.js → FileSaver.min-M-9kTN8q.js} +1 -1
  16. package/dist/{Game-oXURgzan.js → Game-CNJyqnK3.js} +19 -18
  17. package/dist/{GiftCardSetup-C2Wu-dRl.js → GiftCardSetup-DSQIC7fD.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Da2e89Um.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js} +7 -7
  19. package/dist/{Goals-B_xEM7gf.js → Goals-DBPzGIRK.js} +4 -4
  20. package/dist/Grab-CGWinKBS.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BRJR1heE.js → ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js} +1 -1
  22. package/dist/{Index-kuT6W6R_.js → Index-CiWyZXnK.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-7JqHfSk-.js → LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CI_4S7tW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js} +1 -1
  25. package/dist/{LoyaltyDashboard-CqxHdZcm.js → LoyaltyDashboard-C4ZlK9Hv.js} +15 -15
  26. package/dist/MainLayout-D22Q2_jN.js +4 -0
  27. package/dist/{MainLayout-CAERFIms.js → MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js} +5 -4
  28. package/dist/Marketing-CmVnvEN6.js +269 -0
  29. package/dist/MarketingMaterialEdit-CQ55zG-W.js +1037 -0
  30. package/dist/{Member-B8VZEn9t.js → Member-B-l5P9jk.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B31lVLKh.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js} +43 -50
  32. package/dist/{MemberImportHistory-D9tgHnTS.js → MemberImportHistory-BJcu-ahG.js} +7 -7
  33. package/dist/{MemberList-Hw_xQY1i.js → MemberList-DVsWNWIc.js} +103 -105
  34. package/dist/{MemberTransactions-DiBO4plw.js → MemberTransactions-C2VPySEO.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CbFt5X89.js → MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js} +4228 -4176
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BE_-Ed4z.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js} +1 -1
  37. package/dist/{Mission-DpYei3aF.js → Mission-DWO-IF0f.js} +22 -21
  38. package/dist/{Overview-BFQMmyT6.js → Overview-DPcWm2S0.js} +23 -22
  39. package/dist/{Overview-CARquJCS.js → Overview-Dbp4Sv-H.js} +145 -144
  40. package/dist/{Point-Dd2ykwNv.js → Point-PnWrzVOY.js} +22 -21
  41. package/dist/{Promotion-DXl-W7np.js → Promotion-Bwpi60dN.js} +137 -131
  42. package/dist/{Queue-Cd3N-4iB.js → Queue-BvEcKyVJ.js} +47 -46
  43. package/dist/{Record-C3HdDsh5.js → Record-DzNvU2fM.js} +9 -9
  44. package/dist/{Review-Bif3Ub9Z.js → Review-HDYwnMd6.js} +2 -2
  45. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +225 -0
  46. package/dist/{ReviewGoogleCallback-i-RNLlLm.js → ReviewGoogleCallback-6V9JNKsl.js} +5 -5
  47. package/dist/{Reward-DHxzrR_7.js → Reward-DI6IyG-d.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DcrFlcSo.js → RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +1923 -0
  50. package/dist/{Segment-Cjpxordk.js → Segment-DrV6pQyx.js} +290 -291
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-6u21xBu6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BOXVzfer.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js} +4 -4
  53. package/dist/Setting-aLQCUCP9.js +574 -0
  54. package/dist/{SettingAdvertisements-aog5fz32.js → SettingAdvertisements-BtqKt4Ca.js} +12 -12
  55. package/dist/Settings-BkYtKb4l.js +286 -0
  56. package/dist/{Store-Bq3kw1l2.js → Store-HZs9GG03.js} +31 -30
  57. package/dist/{StoreRewards-ZGXKEM09.js → StoreRewards-BSTXL4FR.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +7007 -0
  60. package/dist/{Tier-CfgpEHY7.js → Tier-Ka0rbjC_.js} +2576 -687
  61. package/dist/{Title-B2itYWeD.js → Title-7jvrf34J.js} +94 -92
  62. package/dist/{Transaction-hJ5ygIcf.js → Transaction-D-M3udf5.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-8BgGlpTh.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js} +26 -26
  64. package/dist/{Voucher-TG47pGR3.js → Voucher-BZCLPyDk.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjuXCTxg.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js} +16 -16
  66. package/dist/WhatsappAccount-BG0dIroG.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +39 -0
  68. package/dist/WhatsappBot-O5h5UKXz.js +876 -0
  69. package/dist/WhatsappBotLogs-BOPTuu6o.js +372 -0
  70. package/dist/WhatsappBotSettings-BSiIvpGO.js +705 -0
  71. package/dist/WhatsappLayout-DLVIfkzJ.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +253 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BRs-gbP0.js → ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js} +2 -2
  74. package/dist/{app-tPHYkJcQ.js → app-CEe3kSZM.js} +10615 -8223
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-BHDVnGj2.js → base.export-BjSdr85q.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-HLyWfrXY.js → business-CJjiItSo.js} +1 -1
  79. package/dist/campaign-D4MWLs1D.js +400 -0
  80. package/dist/{campaign-5zFgUNLw.js → campaign-DEXq52fE.js} +31 -25
  81. package/dist/{campaign.enum-BOkDnP2g.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  82. package/dist/{campaign.fn-BIAoVtJj.js → campaign.fn-DiadKjES.js} +85 -85
  83. package/dist/{collectible.enum-BbZSAfys.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-DPSgBHnz.js → collection.fn-CfqIdnSS.js} +2 -2
  85. package/dist/{currency-BVrMqU6-.js → currency-CPB6E_s-.js} +1 -1
  86. package/dist/duplicateCampaign-BzWvsZwc.js +51 -0
  87. package/dist/{effect-BBifVx76.js → effect-DFodA5mh.js} +1 -1
  88. package/dist/{email-addresses-9C7xHTNv.js → email-addresses-C0CwgNs_.js} +2 -2
  89. package/dist/feature-flag--GbS6Qn_.js +50 -0
  90. package/dist/feature-flag-Bap2oi_S.js +868 -0
  91. package/dist/google-BQK68wbe.js +5 -0
  92. package/dist/{helper-C08jyQNK.js → helper-DKKsSb2o.js} +1 -1
  93. package/dist/{index-Dk-jg0wN.js → index-4LQanFJi.js} +2 -2
  94. package/dist/{index-hSRM1smQ.js → index-BJCirs9i.js} +8028 -10767
  95. package/dist/index-BS6725ZB.js +14571 -0
  96. package/dist/{index-B_334Y_i.js → index-BWsGYTzB.js} +29 -15
  97. package/dist/{index-DZ-q5O-V.js → index-BdGo-qgB.js} +4 -4
  98. package/dist/index-C-iwb2Ln.js +109 -0
  99. package/dist/index-C1C21iKU.js +74 -0
  100. package/dist/{index-96ZiAKj_.js → index-CEFEuMOF.js} +1 -1
  101. package/dist/{index-C_WoO58V.js → index-CFZMwKR6.js} +8 -7
  102. package/dist/{index-kCbkOivd.js → index-CJGb1iJi.js} +1 -1
  103. package/dist/{index-CUle4c2B.js → index-CXqPYmyv.js} +4 -3
  104. package/dist/{index-DnRMNmUA.js → index-C_4eW8Sr.js} +396 -232
  105. package/dist/index-C_H8jFYf.js +2743 -0
  106. package/dist/{index-Yo0tP8KJ.js → index-CfqmNZUH.js} +683 -581
  107. package/dist/{index-ihw-WFCa.js → index-CtwPthW5.js} +2 -2
  108. package/dist/{index-Dhyqf1s8.js → index-D5veZ8LP.js} +2700 -2613
  109. package/dist/{index-NJSI4wX4.js → index-DDmpyI6z.js} +693 -231
  110. package/dist/{index-D24Q28cH.js → index-DFV2ydYE.js} +1 -1
  111. package/dist/{index-CEe1kJ0T.js → index-DRnUcSVN.js} +1 -1
  112. package/dist/{index-BgwZGunW.js → index-DxmlvoHV.js} +19 -6
  113. package/dist/{index-hIUtD2eY.js → index-RUdMURTx.js} +11 -10
  114. package/dist/{index-Ciw2TZxV.js → index-qAQiQd-s.js} +8 -7
  115. package/dist/{index.esm2017-hN99SQTb.js → index.esm2017-i1myv90H.js} +209 -209
  116. package/dist/{loading-CVuY4vQ4.js → loading-BAFiJnEb.js} +1 -1
  117. package/dist/{lodash-GFl9_FMH.js → lodash-De2KDgqX.js} +1 -1
  118. package/dist/{member-import-CshTzabx.js → member-import-BP4RZGbA.js} +6 -5
  119. package/dist/{membership-S0KES3Ex.js → membership-CQWw-rTa.js} +3 -3
  120. package/dist/{money-JxdX8ru4.js → money-rwjWYzdi.js} +1 -1
  121. package/dist/{number-BRLwa-mB.js → number-DwSvkBpS.js} +1 -1
  122. package/dist/objectid-DtEPzPd_.js +145 -0
  123. package/dist/{onboarding-BSKYeyP7.js → onboarding-u7cpl6k3.js} +25 -25
  124. package/dist/{onboardingSetup-BqT52VRm.js → onboardingSetup-DoxDlcVN.js} +2 -2
  125. package/dist/{plugins-BR_wmMFJ.js → plugins-CKaeoHSK.js} +3 -3
  126. package/dist/{MarketingMaterialEdit-BvIthCHG.js → remy-icon-BhUGu2NI.js} +2 -1031
  127. package/dist/{reward-CpCGg_W2.js → reward-BasbGRWt.js} +1 -1
  128. package/dist/{rule-Dbg9e8MO.js → rule-IN41b-qE.js} +572 -492
  129. package/dist/style.css +1 -1
  130. package/dist/template-3Nu_MAMG.js +188 -0
  131. package/dist/{timezone-CDVa-xPr.js → timezone-C68y8HiI.js} +1 -1
  132. package/dist/{transaction.fn-DrTBoF9T.js → transaction.fn-Ckxm2gof.js} +2 -2
  133. package/dist/{trigger-wqGwQfB2.js → trigger-xA8j3s9B.js} +8 -8
  134. package/dist/useMarketingMaterialActions-ClYoBaFw.js +125 -0
  135. package/dist/{usePagination-fODgpZZ8.js → usePagination-CIRxyVr8.js} +1 -1
  136. package/dist/{user-DaLUK1dk.js → user-PTTQTMyQ.js} +1 -1
  137. package/dist/vue-i18n-DYnrLWFT.js +2365 -0
  138. package/dist/{xlsx-Bl4_Dtrq.js → xlsx-l0AsOrP1.js} +786 -786
  139. package/dist/{zod-CAzWyVqj.js → zod-Bm1pKYLC.js} +1 -1
  140. package/package.json +12 -3
  141. package/dist/Broadcast-ByWvxVhW.js +0 -271
  142. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DGpQfV5T.js +0 -2431
  143. package/dist/Marketing-KgcwGErU.js +0 -236
  144. package/dist/ReviewFacebookCallback-mJF54-9l.js +0 -238
  145. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-39f3I4BB.js +0 -1883
  146. package/dist/Setting-Dl9MelHz.js +0 -2036
  147. package/dist/Settings-DvCCClIP.js +0 -179
  148. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DscLAF0p.js +0 -1264
  149. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-l_v4FHO0.js +0 -142
  150. package/dist/campaign-awCRccgX.js +0 -228
  151. package/dist/google-C3S8u0mT.js +0 -4
  152. package/dist/index-CoNJdOx7.js +0 -51
  153. package/dist/objectid-CEHN25HN.js +0 -145
  154. package/dist/rule-builder-BEIjxsE0.js +0 -102
  155. package/dist/template-CS-lExgI.js +0 -236
  156. package/dist/useMarketingMaterialActions-DC0gIyIZ.js +0 -96
  157. package/dist/vue-i18n-Dx-KXojZ.js +0 -2365
@@ -1,236 +0,0 @@
1
- import { defineComponent as b, resolveComponent as v, openBlock as s, createBlock as N, unref as c, ref as f, watch as R, createElementBlock as d, createVNode as i, withCtx as S, createElementVNode as n, toDisplayString as w, withModifiers as T, createStaticVNode as U, computed as L, onMounted as P, nextTick as H, onUnmounted as V, Fragment as I, renderList as B, createCommentVNode as j } from "vue";
2
- import { _ as D } from "./campaign-CpzFl8Vr.js";
3
- import { u as M } from "./vue-i18n-Dx-KXojZ.js";
4
- import { u as G, m as q } from "./useMarketingMaterialActions-DC0gIyIZ.js";
5
- import { u as O } from "./remy-Qz_pNsUS.js";
6
- import { useRouter as z } from "vue-router";
7
- import "./index-96ZiAKj_.js";
8
- import { R as K } from "./app-tPHYkJcQ.js";
9
- const Z = /* @__PURE__ */ b({
10
- __name: "GenerateMaterialButton",
11
- setup(l) {
12
- const { t: r } = M(), u = O();
13
- function a() {
14
- u.activate({
15
- command: "generateMarketingMaterial",
16
- fullscreen: !0,
17
- forceNewConversation: !0
18
- });
19
- }
20
- return (t, e) => {
21
- const m = v("FmButton");
22
- return s(), N(m, {
23
- label: c(r)("connect.marketing.emptyState.action"),
24
- "prepend-icon": "wand_stars",
25
- onClick: a
26
- }, null, 8, ["label"]);
27
- };
28
- }
29
- }), J = /* @__PURE__ */ b({
30
- __name: "MarketingMaterialItemActionButton",
31
- props: {
32
- material: {}
33
- },
34
- emits: ["update:menuOpened"],
35
- setup(l, { emit: r }) {
36
- const u = l, a = r, { t } = M(), e = f(!1);
37
- R(e, (x) => {
38
- a("update:menuOpened", x);
39
- });
40
- const { shareMaterial: m, downloadMaterialImage: _, copyMaterialLink: p } = G();
41
- async function C() {
42
- e.value = !1, await m(u.material);
43
- }
44
- async function A() {
45
- e.value = !1, await _(u.material.imageUrl);
46
- }
47
- async function h() {
48
- e.value = !1, await p(u.material.imageUrl);
49
- }
50
- return (x, o) => {
51
- const k = v("FmButton"), y = v("FmMenuItem"), F = v("FmMenu");
52
- return s(), d("div", null, [
53
- i(F, {
54
- placement: "right-start",
55
- shift: !0,
56
- "model-value": e.value,
57
- onMenuChanged: o[0] || (o[0] = (g) => e.value = g)
58
- }, {
59
- "menu-button": S(() => [
60
- i(k, {
61
- icon: "more_vert",
62
- variant: "tertiary",
63
- size: "md"
64
- })
65
- ]),
66
- default: S(() => [
67
- i(y, {
68
- icon: "share",
69
- label: c(t)("connect.marketing.actions.share"),
70
- onClick: C
71
- }, null, 8, ["label"]),
72
- i(y, {
73
- icon: "download",
74
- label: c(t)("connect.marketing.actions.download"),
75
- onClick: A
76
- }, null, 8, ["label"]),
77
- i(y, {
78
- icon: "content_copy",
79
- label: c(t)("connect.marketing.actions.copyLink"),
80
- onClick: h
81
- }, null, 8, ["label"])
82
- ]),
83
- _: 1
84
- }, 8, ["model-value"])
85
- ]);
86
- };
87
- }
88
- }), Q = { class: "h-[205.5px] w-full overflow-hidden bg-fm-color-neutral-gray-100" }, W = ["src", "alt"], X = { class: "p-3" }, Y = { class: "flex items-start justify-between gap-2" }, ee = { class: "space-y-1 overflow-hidden" }, te = { class: "font-semibold text-sm text-gray-900 truncate" }, ne = { class: "text-xs text-gray-500 line-clamp-2" }, ae = {
89
- key: 1,
90
- class: "rounded-lg overflow-hidden border border-transparent fm-shadow-light-100 animate-pulse bg-white"
91
- }, $ = /* @__PURE__ */ b({
92
- __name: "MarketingMaterialItem",
93
- props: {
94
- material: {}
95
- },
96
- setup(l) {
97
- const { t: r } = M(), u = z(), a = f(!1);
98
- return (t, e) => l.material ? (s(), d("div", {
99
- key: 0,
100
- class: "group rounded-lg overflow-hidden cursor-pointer border border-transparent hover:border-blue-500 hover:bg-blue-50 transition-[border-color,background-color] fm-shadow-light-100 hover:fm-shadow-light-300",
101
- onClick: e[2] || (e[2] = () => {
102
- a.value || c(u).push({
103
- name: c(K)["$connect-MARKETING_MATERIAL_EDIT"],
104
- query: { id: l.material._id }
105
- });
106
- })
107
- }, [
108
- n("div", Q, [
109
- n("img", {
110
- src: l.material.imageUrl,
111
- alt: c(r)("connect.marketing.title"),
112
- class: "w-full h-full object-cover"
113
- }, null, 8, W)
114
- ]),
115
- n("div", X, [
116
- n("div", Y, [
117
- n("div", ee, [
118
- n("p", te, w(l.material.headline), 1),
119
- n("p", ne, w(l.material.caption), 1)
120
- ]),
121
- i(J, {
122
- material: l.material,
123
- "onUpdate:menuOpened": e[0] || (e[0] = (m) => a.value = m),
124
- onClick: e[1] || (e[1] = T(() => {
125
- }, ["stop"]))
126
- }, null, 8, ["material"])
127
- ])
128
- ])
129
- ])) : (s(), d("div", ae, [...e[3] || (e[3] = [
130
- U('<div class="h-[205.5px] w-full bg-fm-color-neutral-gray-100"></div><div class="p-3 space-y-2"><div class="h-[16px] w-3/4 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-2/3 rounded bg-fm-color-neutral-gray-100"></div></div>', 2)
131
- ])]));
132
- }
133
- }), oe = {
134
- key: 0,
135
- class: "px-24 xs:px-12 flex flex-col gap-y-16 py-24 xs:py-16"
136
- }, le = { class: "fm-typo-en-title-sm-800 text-center" }, re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 xs:w-full text-center" }, se = {
137
- key: 1,
138
- class: "px-24 xs:px-12 flex flex-col gap-y-24 xs:gap-y-16 pt-24 xs:pt-16"
139
- }, ie = { class: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-16" }, E = 20, _e = /* @__PURE__ */ b({
140
- __name: "Marketing",
141
- setup(l) {
142
- const { t: r } = M(), u = O(), a = f([]), t = f(!0), e = f(!0), m = f(null), _ = f(null);
143
- let p = null;
144
- const C = L(() => ({
145
- label: r("connect.marketing.emptyState.action"),
146
- value: "generate",
147
- isPrimary: !0,
148
- prependIcon: "wand_stars"
149
- }));
150
- function A(o) {
151
- o === "generate" && u.activate({
152
- command: "generateMarketingMaterial",
153
- fullscreen: !0,
154
- forceNewConversation: !0
155
- });
156
- }
157
- async function h() {
158
- const o = await q.listMarketingMaterials(
159
- m.value,
160
- E
161
- );
162
- a.value.push(...o.resources), m.value = o.meta.nextCursor, e.value = !!o.meta.nextCursor;
163
- }
164
- function x() {
165
- p = new IntersectionObserver(
166
- async ([o]) => {
167
- if (!(!o.isIntersecting || !e.value || t.value)) {
168
- t.value = !0;
169
- try {
170
- await h();
171
- } catch {
172
- } finally {
173
- t.value = !1;
174
- }
175
- }
176
- },
177
- { rootMargin: "200px" }
178
- ), _.value && p.observe(_.value);
179
- }
180
- return P(async () => {
181
- try {
182
- await h();
183
- } catch {
184
- } finally {
185
- t.value = !1, await H(), x();
186
- }
187
- }), V(() => {
188
- p == null || p.disconnect();
189
- }), (o, k) => {
190
- const y = v("FmPageHead"), F = v("FmCard");
191
- return s(), d(I, null, [
192
- i(y, {
193
- title: c(r)("connect.marketing.title"),
194
- actions: a.value.length > 0 ? [C.value] : [],
195
- "onClick:action": A
196
- }, null, 8, ["title", "actions"]),
197
- !t.value && a.value.length === 0 ? (s(), d("div", oe, [
198
- i(F, {
199
- variant: "outlined",
200
- class: "w-full justify-center items-center flex flex-col p-[24px] xs:p-16 gap-[24px] xs:gap-16"
201
- }, {
202
- default: S(() => [
203
- k[0] || (k[0] = n("img", {
204
- src: D,
205
- class: "w-[150px]"
206
- }, null, -1)),
207
- n("p", le, w(c(r)("connect.marketing.emptyState.title")), 1),
208
- n("p", re, w(c(r)("connect.marketing.emptyState.description")), 1),
209
- i(Z)
210
- ]),
211
- _: 1
212
- })
213
- ])) : (s(), d("div", se, [
214
- n("div", ie, [
215
- (s(!0), d(I, null, B(a.value, (g) => (s(), N($, {
216
- key: g._id,
217
- material: g
218
- }, null, 8, ["material"]))), 128)),
219
- t.value ? (s(), d(I, { key: 0 }, B(E, (g) => i($, {
220
- key: `skeleton-${g}`,
221
- material: null
222
- })), 64)) : j("", !0)
223
- ]),
224
- n("div", {
225
- ref_key: "sentinel",
226
- ref: _,
227
- class: "h-1"
228
- }, null, 512)
229
- ]))
230
- ], 64);
231
- };
232
- }
233
- });
234
- export {
235
- _e as default
236
- };
@@ -1,238 +0,0 @@
1
- import { defineComponent as C, computed as M, openBlock as l, createElementBlock as g, normalizeClass as j, createElementVNode as u, createBlock as T, unref as e, toDisplayString as h, createCommentVNode as S, createVNode as y, onMounted as B, ref as P, Fragment as $, renderList as U, resolveComponent as z, isRef as V } from "vue";
2
- import { u as R } from "./vue-i18n-Dx-KXojZ.js";
3
- import { components as I } from "@feedmepos/ui-library";
4
- import { r as L } from "./index-hIUtD2eY.js";
5
- import { u as A } from "./business-HLyWfrXY.js";
6
- import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-7JqHfSk-.js";
7
- import { R as D } from "./app-tPHYkJcQ.js";
8
- import { useRouter as G } from "vue-router";
9
- const O = ["src"], W = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, q = {
10
- key: 2,
11
- class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
12
- }, J = /* @__PURE__ */ C({
13
- __name: "FacebookPageConfig",
14
- props: {
15
- page: {},
16
- expanded: { type: Boolean },
17
- availableLocations: {}
18
- },
19
- emits: ["toggleExpand", "toggleLocation"],
20
- setup(s, { emit: n }) {
21
- const _ = s, f = n, { t: i } = R(), m = M(() => _.page.locationIds);
22
- return (w, p) => (l(), g("div", {
23
- class: j([
24
- "rounded-lg border overflow-hidden transition-colors",
25
- s.expanded ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
26
- ])
27
- }, [
28
- u("button", {
29
- class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
30
- onClick: p[0] || (p[0] = (c) => f("toggleExpand"))
31
- }, [
32
- s.page.pageProfileImageUrl ? (l(), g("img", {
33
- key: 0,
34
- src: s.page.pageProfileImageUrl,
35
- class: "w-32 h-32 rounded-full shrink-0 object-cover"
36
- }, null, 8, O)) : (l(), T(e(I).FmIcon, {
37
- key: 1,
38
- name: "thumb_up",
39
- class: "text-fm-color-neutral-gray-400 shrink-0"
40
- })),
41
- u("span", W, h(s.page.pageName), 1),
42
- s.page.locationIds.length > 0 ? (l(), g("span", q, h(e(i)("connect.review.locationsSelected", s.page.locationIds.length)), 1)) : S("", !0),
43
- y(e(I).FmIcon, {
44
- name: s.expanded ? "expand_less" : "expand_more",
45
- class: "text-fm-color-neutral-gray-400 shrink-0"
46
- }, null, 8, ["name"])
47
- ]),
48
- s.expanded ? (l(), T(H, {
49
- key: 0,
50
- locations: s.availableLocations,
51
- "selected-ids": e(m),
52
- onToggle: p[1] || (p[1] = (c) => f("toggleLocation", c))
53
- }, null, 8, ["locations", "selected-ids"])) : S("", !0)
54
- ], 2));
55
- }
56
- }), K = { class: "flex flex-col gap-8" }, Q = /* @__PURE__ */ C({
57
- __name: "FacebookPageLocationMapping",
58
- props: {
59
- pages: {}
60
- },
61
- emits: ["update:pages"],
62
- setup(s, { emit: n }) {
63
- const _ = s, f = A();
64
- B(() => f.readLocations());
65
- const i = n, m = P(null), w = M(() => {
66
- const r = /* @__PURE__ */ new Set();
67
- for (const v of _.pages)
68
- v.locationIds.forEach((a) => r.add(a));
69
- return r;
70
- });
71
- function p(r) {
72
- const v = new Set(r.locationIds);
73
- return f.locations.filter((a) => {
74
- const b = a._id.toString();
75
- return !w.value.has(b) || v.has(b);
76
- });
77
- }
78
- function c(r, v) {
79
- const a = v._id.toString(), b = _.pages.map((o) => {
80
- if (o.facebookPageId !== r) return o;
81
- const t = o.locationIds.includes(a);
82
- return {
83
- ...o,
84
- locationIds: t ? o.locationIds.filter((k) => k !== a) : [...o.locationIds, a]
85
- };
86
- });
87
- i("update:pages", b);
88
- }
89
- function F(r) {
90
- m.value = m.value === r ? null : r;
91
- }
92
- return (r, v) => (l(), g("div", K, [
93
- (l(!0), g($, null, U(s.pages, (a) => (l(), T(J, {
94
- key: a.facebookPageId,
95
- page: a,
96
- expanded: e(m) === a.facebookPageId,
97
- "available-locations": p(a),
98
- onToggleExpand: (b) => F(a.facebookPageId),
99
- onToggleLocation: (b) => c(a.facebookPageId, b)
100
- }, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
101
- ]));
102
- }
103
- }), X = { class: "flex flex-col min-h-full gap-16 p-24" }, Y = {
104
- key: 0,
105
- class: "flex flex-col items-center justify-center flex-1 gap-16"
106
- }, Z = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ee = {
107
- key: 1,
108
- class: "flex flex-col items-center justify-center flex-1 gap-16"
109
- }, oe = { class: "fm-typo-en-body-lg-600" }, te = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ne = {
110
- key: 2,
111
- class: "flex flex-col items-center justify-center flex-1 gap-16"
112
- }, ae = { class: "fm-typo-en-body-lg-600" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ce = { class: "fm-typo-en-body-lg-600" }, le = { class: "flex gap-8 justify-end mt-auto pt-8" }, ve = /* @__PURE__ */ C({
113
- __name: "ReviewFacebookCallback",
114
- setup(s) {
115
- const { t: n } = R(), _ = G();
116
- function f() {
117
- return _.replace({ name: D["$connect-REVIEW_SETTINGS"] });
118
- }
119
- const i = P([]), m = P(!1), w = P(!1), p = P(!1), c = P(null), F = M(
120
- () => i.value.some((o) => o.locationIds.length > 0)
121
- );
122
- function r(o, t) {
123
- const k = new Map(
124
- t.map((d) => [d.facebookPageId, d])
125
- );
126
- return o.map((d) => {
127
- var x;
128
- return {
129
- ...d,
130
- locationIds: ((x = k.get(d.facebookPageId)) == null ? void 0 : x.locationIds) ?? []
131
- };
132
- });
133
- }
134
- function v(o, t) {
135
- return o instanceof Error ? o.message : t;
136
- }
137
- async function a() {
138
- var d;
139
- const o = window.location.hash;
140
- if (!o) {
141
- c.value = n("connect.review.noToken");
142
- return;
143
- }
144
- const k = new URLSearchParams(o.slice(1)).get("access_token");
145
- if (!k) {
146
- c.value = n("connect.review.noToken");
147
- return;
148
- }
149
- m.value = !0;
150
- try {
151
- const x = await L.getSource(), N = ((d = x == null ? void 0 : x.facebook) == null ? void 0 : d.pages) ?? [], E = await L.connectFacebook(k);
152
- i.value = r((E == null ? void 0 : E.pages) ?? [], N), i.value.length === 0 && (c.value = n("connect.review.facebook.noPages"));
153
- } catch (x) {
154
- c.value = v(x, n("connect.review.facebook.failed"));
155
- } finally {
156
- m.value = !1;
157
- }
158
- }
159
- async function b() {
160
- const o = i.value.filter((t) => t.locationIds.length > 0).map((t) => ({
161
- facebookPageId: t.facebookPageId,
162
- locationIds: t.locationIds
163
- }));
164
- if (o.length === 0) {
165
- c.value = n("connect.review.noMappings");
166
- return;
167
- }
168
- w.value = !0;
169
- try {
170
- await L.updateFacebookPages(o), p.value = !0, setTimeout(f, 2e3);
171
- } catch (t) {
172
- c.value = v(t, n("connect.review.facebook.failed"));
173
- } finally {
174
- w.value = !1;
175
- }
176
- }
177
- return B(a), (o, t) => {
178
- const k = z("FmPageHead");
179
- return l(), g($, null, [
180
- y(k, {
181
- title: e(n)("connect.navigation.review")
182
- }, null, 8, ["title"]),
183
- u("div", X, [
184
- e(m) ? (l(), g("div", Y, [
185
- y(e(I).FmIcon, {
186
- name: "sync",
187
- size: "xl",
188
- class: "animate-spin text-fm-color-neutral-gray-400"
189
- }),
190
- u("p", Z, h(e(n)("connect.review.facebook.fetching")), 1)
191
- ])) : e(p) ? (l(), g("div", ee, [
192
- y(e(I).FmIcon, {
193
- name: "check_circle",
194
- size: "xl",
195
- class: "text-fm-color-typo-success"
196
- }),
197
- u("p", oe, h(e(n)("connect.review.facebook.success")), 1),
198
- u("p", te, h(e(n)("connect.review.redirecting")), 1)
199
- ])) : e(c) ? (l(), g("div", ne, [
200
- y(e(I).FmIcon, {
201
- name: "error",
202
- size: "xl",
203
- class: "text-fm-color-system-error-500"
204
- }),
205
- u("p", ae, h(e(n)("connect.review.errorTitle")), 1),
206
- u("p", se, h(e(c)), 1),
207
- y(e(I).FmButton, {
208
- label: e(n)("connect.review.goBack"),
209
- onClick: t[0] || (t[0] = (d) => f())
210
- }, null, 8, ["label"])
211
- ])) : e(i).length > 0 ? (l(), g($, { key: 3 }, [
212
- u("p", ce, h(e(n)("connect.review.facebook.selectPage")), 1),
213
- y(Q, {
214
- pages: e(i),
215
- "onUpdate:pages": t[1] || (t[1] = (d) => V(i) ? i.value = d : null)
216
- }, null, 8, ["pages"]),
217
- u("div", le, [
218
- y(e(I).FmButton, {
219
- variant: "outlined",
220
- label: e(n)("connect.review.cancel"),
221
- onClick: t[2] || (t[2] = (d) => f())
222
- }, null, 8, ["label"]),
223
- y(e(I).FmButton, {
224
- label: e(n)("connect.review.connect"),
225
- disabled: !e(F),
226
- loading: e(w),
227
- onClick: b
228
- }, null, 8, ["label", "disabled", "loading"])
229
- ])
230
- ], 64)) : S("", !0)
231
- ])
232
- ], 64);
233
- };
234
- }
235
- });
236
- export {
237
- ve as default
238
- };