@feedmepos/mf-connect 0.1.115-prod → 0.1.117-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 (153) hide show
  1. package/README.md +64 -1
  2. package/dist/{App-CvtSY8ZO.js → App-BpcsgH7K.js} +444 -427
  3. package/dist/AuditLogs-BNnUiVnD.js +2016 -0
  4. package/dist/{Bin-B3gS9QVZ.js → Bin-Cm0wjQeR.js} +8 -8
  5. package/dist/{Broadcast-DAeb-HaN.js → Broadcast-BoJaHqnO.js} +22 -21
  6. package/dist/{CampaignAnalytic-BfTaHVem.js → CampaignAnalytic-Eg4xZW0B.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js} +9 -9
  8. package/dist/{Card-JFeVIwFs.js → Card-BfkMcFaG.js} +25 -24
  9. package/dist/{Collections-xcDpEhIm.js → Collections-RXmxQbII.js} +197 -185
  10. package/dist/{Credit-C9HJZjDS.js → Credit-CsRPM1jv.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js → EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js} +32 -32
  14. package/dist/{Experience-DszS8gto.js → Experience-BC8Pj-v9.js} +32 -31
  15. package/dist/{FileSaver.min-CFVQKaC-.js → FileSaver.min-DzmoQFA0.js} +1 -1
  16. package/dist/{Game-DhgeN7E2.js → Game-DJXNHFBs.js} +19 -18
  17. package/dist/{GiftCardSetup-CWm6IhrS.js → GiftCardSetup-_0n8lU-t.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js} +7 -7
  19. package/dist/{Goals-DtRVierH.js → Goals-DSZwKpds.js} +4 -4
  20. package/dist/Grab-DDc7e-AC.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js → ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js} +1 -1
  22. package/dist/{Index-DFRcu_qE.js → Index-Cbi0bquE.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js → LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js} +1 -1
  25. package/dist/{LoyaltyDashboard-BWHKDPzk.js → LoyaltyDashboard-fK90c27A.js} +15 -15
  26. package/dist/MainLayout-Bf-l9yL4.js +4 -0
  27. package/dist/{MainLayout-BmpNNAiE.js → MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js} +5 -4
  28. package/dist/Marketing-B7cZGsO-.js +269 -0
  29. package/dist/MarketingMaterialEdit-5IcV2ct6.js +1037 -0
  30. package/dist/{Member-xEzrBW_p.js → Member-BGTrRVdq.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js} +43 -50
  32. package/dist/{MemberImportHistory-CEQpBBF8.js → MemberImportHistory--FxkTJmu.js} +7 -7
  33. package/dist/{MemberList-CCvzkHv8.js → MemberList-EjY5dgwt.js} +103 -105
  34. package/dist/{MemberTransactions-Bmh39J2W.js → MemberTransactions-Oia7LIFK.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js → MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js} +14 -14
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js} +1 -1
  37. package/dist/{Mission-CpUo2Bgw.js → Mission-BFHYb4aT.js} +22 -21
  38. package/dist/{Overview-DcDZmDXA.js → Overview-BVNyQxFL.js} +23 -22
  39. package/dist/{Overview-CwQqQ1Tn.js → Overview-d5U37aot.js} +145 -144
  40. package/dist/{Point-CUNQsQIx.js → Point-CXkqH02Z.js} +22 -21
  41. package/dist/{Promotion-Cqdim7aW.js → Promotion-DdxNvlOO.js} +137 -131
  42. package/dist/{Queue-CNBVh1UG.js → Queue-C96oNKyP.js} +46 -45
  43. package/dist/{Record-BYwz4l4o.js → Record-Bj2e2Y4i.js} +9 -9
  44. package/dist/{Review-CqLcZFj8.js → Review-CJK5S1oI.js} +2 -2
  45. package/dist/ReviewFacebookCallback-ChG7TRy5.js +225 -0
  46. package/dist/{ReviewGoogleCallback-Dg8R7QlO.js → ReviewGoogleCallback-Dmk4VyGA.js} +5 -5
  47. package/dist/{Reward-M8GZ8eHq.js → Reward-Dh2YI0Xb.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js → RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +1923 -0
  50. package/dist/{Segment-CrMi6xrp.js → Segment-FYvtCkqH.js} +304 -305
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js} +4 -4
  53. package/dist/Setting-CUAWjCqa.js +574 -0
  54. package/dist/{SettingAdvertisements-Dh7v4c1D.js → SettingAdvertisements-COIQwUD6.js} +12 -12
  55. package/dist/Settings-D2gFPvmW.js +286 -0
  56. package/dist/{Store-CV-BmK5b.js → Store-BAXwiyvx.js} +31 -30
  57. package/dist/{StoreRewards-DPhSLvSZ.js → StoreRewards-2mUavtUg.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +7007 -0
  60. package/dist/{Tier-ChvYps23.js → Tier-BmAOzRHL.js} +2576 -687
  61. package/dist/{Title-v-Ivswr1.js → Title-DMxiUg30.js} +94 -92
  62. package/dist/{Transaction-CRqE1Ix0.js → Transaction-CF6hXEpN.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js} +26 -26
  64. package/dist/{Voucher-Bg8FOuzD.js → Voucher-DrtITxq-.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js} +16 -16
  66. package/dist/WhatsappAccount-Bb0Y7ikk.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js +39 -0
  68. package/dist/WhatsappBot-DNvvaPey.js +876 -0
  69. package/dist/WhatsappBotLogs-C8M-1pvv.js +372 -0
  70. package/dist/WhatsappBotSettings-D6egqUyU.js +705 -0
  71. package/dist/WhatsappLayout-DeQTPuF6.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +253 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js → ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js} +2 -2
  74. package/dist/{app-DdNKsn2Q.js → app-BjdLqYQq.js} +8879 -7107
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-R97FrSQL.js → base.export-B68z5BF6.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-Ce8vq3wQ.js → business-D9fgkHxb.js} +1 -1
  79. package/dist/{campaign-C19If7bW.js → campaign-Dw_ujovr.js} +121 -94
  80. package/dist/{campaign-BTllt2LH.js → campaign-eMaPX8r6.js} +31 -25
  81. package/dist/{campaign.enum-9CCbalR4.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  82. package/dist/{campaign.fn-B4g03h0A.js → campaign.fn-DFjGNvmN.js} +78 -78
  83. package/dist/{collectible.enum-MvqF7mSg.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-CR0bD33S.js → collection.fn-CCOWtB-c.js} +2 -2
  85. package/dist/{currency-DmlguGIM.js → currency-CTLKReFC.js} +1 -1
  86. package/dist/duplicateCampaign-BcpBfUGL.js +51 -0
  87. package/dist/{effect-Dx3zfl28.js → effect-CTI1ZH57.js} +1 -1
  88. package/dist/{email-addresses-De5PGOY4.js → email-addresses-B74e3bnB.js} +2 -2
  89. package/dist/{feature-flag-CD9V1V0h.js → feature-flag-DVdEaChJ.js} +182 -166
  90. package/dist/google-BQK68wbe.js +5 -0
  91. package/dist/{helper-CEiv7SaO.js → helper-as9K-piK.js} +1 -1
  92. package/dist/{index-CBJy9bxB.js → index-3LjKJhQa.js} +1 -1
  93. package/dist/{index-BW6eb3n6.js → index-8mBfDn3M.js} +611 -252
  94. package/dist/{index-D4d3l0gw.js → index-B0h0iYWP.js} +8 -7
  95. package/dist/{index-BAXKd9Gg.js → index-BEKMTiFb.js} +198 -198
  96. package/dist/{index-B8yWVB8P.js → index-BW7FoVEA.js} +4 -3
  97. package/dist/{index-BVdYxi3l.js → index-B_wRpO02.js} +29 -15
  98. package/dist/{index-B8meeQoD.js → index-Ba719MYq.js} +1 -1
  99. package/dist/{index-BDPnyro2.js → index-BbVbqe4Y.js} +19 -6
  100. package/dist/{index-CqOCJTeR.js → index-BhTrG89b.js} +390 -232
  101. package/dist/index-C-iwb2Ln.js +109 -0
  102. package/dist/{index-CPODug8b.js → index-C5V6u2Qd.js} +2700 -2613
  103. package/dist/{index-CWUrODxL.js → index-CHU3UePP.js} +1 -1
  104. package/dist/{index-IZRfmmde.js → index-CQxkDpX0.js} +683 -581
  105. package/dist/{index-DT3S00_Y.js → index-CWLOcQ6j.js} +11 -10
  106. package/dist/index-C_H8jFYf.js +2743 -0
  107. package/dist/{index-__UT3_Ey.js → index-Ckz6u3ac.js} +2 -2
  108. package/dist/{index-BYI9ttxy.js → index-Czg-2Ni0.js} +8028 -10767
  109. package/dist/{index-xct3mnu8.js → index-DKI8401o.js} +7 -7
  110. package/dist/{index-649OZ_e1.js → index-DcZiikOH.js} +2 -2
  111. package/dist/{index-BquSqx6K.js → index-QHqcSN2q.js} +4 -4
  112. package/dist/{index-BR9h5DTI.js → index-TAoQpeLQ.js} +1 -1
  113. package/dist/index-wsCCqwdr.js +74 -0
  114. package/dist/{index.esm2017-AVbZ9btd.js → index.esm2017-DL6rTGDW.js} +177 -177
  115. package/dist/{loading-BvHm1m3K.js → loading-x6IScY4K.js} +1 -1
  116. package/dist/{lodash-Dvrceo7x.js → lodash-nwnDizYo.js} +1 -1
  117. package/dist/{member-import-c9avpiSS.js → member-import-C-b01Tyd.js} +6 -5
  118. package/dist/{membership-D-pZS634.js → membership-DfarOMtO.js} +3 -3
  119. package/dist/{money-D4skwMkD.js → money-CFn-jR4W.js} +1 -1
  120. package/dist/{number-DJ6ncfT6.js → number-CSlyDL2x.js} +1 -1
  121. package/dist/objectid-zcT6ESET.js +145 -0
  122. package/dist/{onboarding-t7R1d3h-.js → onboarding-DyaFaaF2.js} +25 -25
  123. package/dist/{onboardingSetup-lTaJc0oT.js → onboardingSetup-DQt91O9f.js} +2 -2
  124. package/dist/{plugins-DQNOWwRC.js → plugins-DEHr0UOe.js} +3 -3
  125. package/dist/{MarketingMaterialEdit-x3c_N7Gs.js → remy-icon-BhUGu2NI.js} +2 -1031
  126. package/dist/{reward-BK150pjm.js → reward-Du_Pv-4p.js} +1 -1
  127. package/dist/{rule-COcdAnUu.js → rule-DfqmQTVK.js} +572 -492
  128. package/dist/style.css +1 -1
  129. package/dist/template-CcbNF4PF.js +188 -0
  130. package/dist/{timezone-BP6UC4KL.js → timezone-_4tabIaK.js} +1 -1
  131. package/dist/{transaction.fn-BY0hzon0.js → transaction.fn-C46PHwCV.js} +2 -2
  132. package/dist/{trigger-DVBjVPbN.js → trigger-Dipr6btC.js} +8 -8
  133. package/dist/useMarketingMaterialActions-BAw2ZjeF.js +125 -0
  134. package/dist/{usePagination-QT552XyF.js → usePagination-D6RZ18zS.js} +1 -1
  135. package/dist/{user-CmAxNc7T.js → user-BCexQj3Q.js} +1 -1
  136. package/dist/vue-i18n-DXvyTCZf.js +2365 -0
  137. package/dist/{xlsx-DAczoc8y.js → xlsx-BTxt_Jg6.js} +224 -224
  138. package/dist/{zod-Aj-GuVQL.js → zod-T4wMYjWT.js} +1 -1
  139. package/package.json +6 -2
  140. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +0 -3494
  141. package/dist/Marketing-BKK45Eve.js +0 -236
  142. package/dist/ReviewFacebookCallback-DbSCILNN.js +0 -238
  143. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +0 -1883
  144. package/dist/Setting-BnFRI0Se.js +0 -2037
  145. package/dist/Settings-BvT8_tkQ.js +0 -179
  146. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +0 -1264
  147. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +0 -142
  148. package/dist/google-C3S8u0mT.js +0 -4
  149. package/dist/objectid-DEMM_jdR.js +0 -145
  150. package/dist/rule-builder-Deufb6h_.js +0 -102
  151. package/dist/template-DeebIqJ_.js +0 -236
  152. package/dist/useMarketingMaterialActions-DpQCQHFI.js +0 -96
  153. package/dist/vue-i18n-Cze706-f.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-Cze706-f.js";
4
- import { u as G, m as q } from "./useMarketingMaterialActions-DpQCQHFI.js";
5
- import { u as O } from "./remy-Qz_pNsUS.js";
6
- import { useRouter as z } from "vue-router";
7
- import "./index-B8meeQoD.js";
8
- import { R as K } from "./app-DdNKsn2Q.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-Cze706-f.js";
3
- import { components as I } from "@feedmepos/ui-library";
4
- import { r as L } from "./index-DT3S00_Y.js";
5
- import { u as A } from "./business-Ce8vq3wQ.js";
6
- import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js";
7
- import { R as D } from "./app-DdNKsn2Q.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
- };