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

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 (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-DWDgsBqW.js → App-CAo1izHr.js} +618 -652
  3. package/dist/{Bin-Cz6fmewG.js → Bin-DDDfjisJ.js} +8 -8
  4. package/dist/{Broadcast-CQ0pfKpx.js → Broadcast-BsCulZhE.js} +21 -22
  5. package/dist/{CampaignAnalytic-CiRCB3kh.js → CampaignAnalytic-CnVYFSkT.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZTHyZ_0y.js} +9 -9
  7. package/dist/{Card-Kw2PFL2m.js → Card-DPyQH9qZ.js} +24 -25
  8. package/dist/{Collections-D8Vx_EEH.js → Collections-CZCVA969.js} +185 -197
  9. package/dist/{Credit-B1jsQ5zg.js → Credit-BTg364-i.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BJx8K6Ja.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ijya9Cho.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js → EffectSheet.vue_vue_type_style_index_0_lang-CfEnSXzg.js} +32 -32
  13. package/dist/{Experience-B0JIA3sL.js → Experience-Bk_eUcSX.js} +31 -32
  14. package/dist/{FileSaver.min-M-9kTN8q.js → FileSaver.min-CXFiZAp7.js} +1 -1
  15. package/dist/{Game-CNJyqnK3.js → Game-CBnKpFdl.js} +18 -19
  16. package/dist/{GiftCardSetup-DSQIC7fD.js → GiftCardSetup-q75wNV_F.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Cga0Th2O.js} +7 -7
  18. package/dist/{Goals-DBPzGIRK.js → Goals-Bbbgurfd.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js → ImageInput.vue_vue_type_script_setup_true_lang-CZS05h1r.js} +1 -1
  20. package/dist/{Index-CiWyZXnK.js → Index-C8_OWllb.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js → LocationPicker.vue_vue_type_script_setup_true_lang-BlCg-jI7.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CACxChIo.js} +1 -1
  23. package/dist/{LoyaltyDashboard-C4ZlK9Hv.js → LoyaltyDashboard-DJlE0371.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js → MainLayout-Bs2UPvFx.js} +4 -5
  25. package/dist/Marketing-BvRYzFV8.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-o88sdvTM.js} +1031 -2
  27. package/dist/{Member-B-l5P9jk.js → Member-C4yqwsMH.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbumjyC_.js} +50 -43
  29. package/dist/{MemberImportHistory-BJcu-ahG.js → MemberImportHistory-CbuXCdxC.js} +7 -7
  30. package/dist/{MemberList-DVsWNWIc.js → MemberList-CpAepPBe.js} +105 -103
  31. package/dist/{MemberTransactions-C2VPySEO.js → MemberTransactions-BbpXvsSk.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js → MessageInput.vue_vue_type_script_setup_true_lang-BaWgxbad.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CEgMElLo.js} +1 -1
  34. package/dist/{Mission-DWO-IF0f.js → Mission-Bdb9KVeP.js} +21 -22
  35. package/dist/{Overview-DPcWm2S0.js → Overview-CEiyGMcf.js} +22 -23
  36. package/dist/{Overview-Dbp4Sv-H.js → Overview-D_9JwnFU.js} +144 -145
  37. package/dist/{Point-PnWrzVOY.js → Point-Bd5cMXQx.js} +21 -22
  38. package/dist/{Promotion-Bwpi60dN.js → Promotion-D9gZDvgR.js} +131 -137
  39. package/dist/{Queue-BvEcKyVJ.js → Queue-BnAOL_rp.js} +45 -46
  40. package/dist/{Record-DzNvU2fM.js → Record-D6TWFKe0.js} +9 -9
  41. package/dist/{Review-HDYwnMd6.js → Review-DLEgvnc-.js} +2 -2
  42. package/dist/ReviewFacebookCallback-jVlm2O8f.js +238 -0
  43. package/dist/{ReviewGoogleCallback-6V9JNKsl.js → ReviewGoogleCallback-BgAbO3pI.js} +5 -5
  44. package/dist/{Reward-DI6IyG-d.js → Reward-DBheQiFu.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt-EqsiH.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CKL8MEld.js +1883 -0
  47. package/dist/{Segment-DrV6pQyx.js → Segment-B9Se5FFw.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-f7AS5vwv.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-3BKA0UFI.js} +4 -4
  50. package/dist/Setting-B92JT_Y4.js +2037 -0
  51. package/dist/{SettingAdvertisements-BtqKt4Ca.js → SettingAdvertisements-CLw-dqiA.js} +12 -12
  52. package/dist/Settings-BmmM8ZnR.js +179 -0
  53. package/dist/{Store-HZs9GG03.js → Store-B5PPP5zM.js} +30 -31
  54. package/dist/{StoreRewards-BSTXL4FR.js → StoreRewards-DllyaVBY.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3Vvqf6_H.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-7ZZ0e5tQ.js +142 -0
  57. package/dist/{Tier-Ka0rbjC_.js → Tier-M_TApfju.js} +687 -2576
  58. package/dist/{Title-7jvrf34J.js → Title-Cpltm-I2.js} +92 -94
  59. package/dist/{Transaction-D-M3udf5.js → Transaction-BYfAYRpv.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOhfGxVj.js} +26 -26
  61. package/dist/{Voucher-BZCLPyDk.js → Voucher-DHoyg0YZ.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DWHwM6AJ.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6tTjLAZ.js} +2 -2
  64. package/dist/{app-CEe3kSZM.js → app-B_doYklh.js} +7107 -8879
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-BjSdr85q.js → base.export-DmbnT_bp.js} +2 -2
  67. package/dist/{business-CJjiItSo.js → business-DdVGtTvx.js} +1 -1
  68. package/dist/{campaign-DEXq52fE.js → campaign-CVkA08zl.js} +25 -31
  69. package/dist/{campaign-D4MWLs1D.js → campaign-jEhKmpKg.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-DWu6-kOo.js} +2 -3
  71. package/dist/{campaign.fn-DiadKjES.js → campaign.fn-BlgEyeFz.js} +82 -82
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-CVLkXKml.js} +1 -1
  73. package/dist/{collection.fn-CfqIdnSS.js → collection.fn-DLNGTrPf.js} +2 -2
  74. package/dist/{currency-CPB6E_s-.js → currency-DKS1md4e.js} +1 -1
  75. package/dist/{effect-DFodA5mh.js → effect-Bk-zYexf.js} +1 -1
  76. package/dist/{email-addresses-C0CwgNs_.js → email-addresses-I9A5iLzf.js} +2 -2
  77. package/dist/{feature-flag-Bap2oi_S.js → feature-flag-DQti61iR.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-DKKsSb2o.js → helper-9cPlo6ae.js} +1 -1
  80. package/dist/{index-CJGb1iJi.js → index-1Cdj34z1.js} +1 -1
  81. package/dist/{index-CtwPthW5.js → index-3V8E9GaZ.js} +2 -2
  82. package/dist/{index-CfqmNZUH.js → index-728mP6kW.js} +581 -683
  83. package/dist/{index-DDmpyI6z.js → index-BRm0LMTo.js} +252 -611
  84. package/dist/{index-qAQiQd-s.js → index-BxpbI0GH.js} +7 -7
  85. package/dist/{index-DFV2ydYE.js → index-C-OnJpT8.js} +1 -1
  86. package/dist/{index-D5veZ8LP.js → index-CIwdXphn.js} +2613 -2700
  87. package/dist/{index-DxmlvoHV.js → index-CNUXbXvG.js} +6 -19
  88. package/dist/{index-RUdMURTx.js → index-Cj6oxbl0.js} +10 -11
  89. package/dist/{index-CXqPYmyv.js → index-ClYX4COd.js} +3 -4
  90. package/dist/{index-CEFEuMOF.js → index-CuyzSc1l.js} +1 -1
  91. package/dist/{index-BS6725ZB.js → index-DOE2VR99.js} +198 -198
  92. package/dist/{index-C_4eW8Sr.js → index-DWkuIfHy.js} +232 -390
  93. package/dist/{index-BdGo-qgB.js → index-Dj51vqab.js} +4 -4
  94. package/dist/{index-DRnUcSVN.js → index-DuvnRxeo.js} +1 -1
  95. package/dist/{index-BJCirs9i.js → index-cgtAlOl9.js} +10767 -8028
  96. package/dist/{index-BWsGYTzB.js → index-fHiFL1dW.js} +15 -29
  97. package/dist/{index-CFZMwKR6.js → index-oNMFyOGe.js} +7 -8
  98. package/dist/{index-4LQanFJi.js → index-vKvGJ4Ve.js} +2 -2
  99. package/dist/{index.esm2017-i1myv90H.js → index.esm2017-CsF37oA-.js} +177 -177
  100. package/dist/{loading-BAFiJnEb.js → loading-BJJmTFoe.js} +1 -1
  101. package/dist/{lodash-De2KDgqX.js → lodash-BMJ6_hsa.js} +1 -1
  102. package/dist/{member-import-BP4RZGbA.js → member-import-DrGxVJt9.js} +5 -6
  103. package/dist/{membership-CQWw-rTa.js → membership-CAqKihwy.js} +3 -3
  104. package/dist/{money-rwjWYzdi.js → money-Bf9d2ZUH.js} +1 -1
  105. package/dist/{number-DwSvkBpS.js → number-CWXlGZa5.js} +1 -1
  106. package/dist/objectid-2DN5a9sY.js +145 -0
  107. package/dist/{onboarding-u7cpl6k3.js → onboarding-Dn9O7r3a.js} +25 -25
  108. package/dist/{onboardingSetup-DoxDlcVN.js → onboardingSetup-BMkDoGy-.js} +2 -2
  109. package/dist/{plugins-CKaeoHSK.js → plugins-KDgceFWV.js} +3 -3
  110. package/dist/{reward-BasbGRWt.js → reward-eilGRaXi.js} +1 -1
  111. package/dist/{rule-IN41b-qE.js → rule-Dr9Zjg_o.js} +492 -572
  112. package/dist/rule-builder-cz6Dy-no.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DwbazO8p.js +236 -0
  115. package/dist/{timezone-C68y8HiI.js → timezone-C5CIfvHs.js} +1 -1
  116. package/dist/{transaction.fn-Ckxm2gof.js → transaction.fn-Cr-FLjh0.js} +2 -2
  117. package/dist/{trigger-xA8j3s9B.js → trigger-B0Fv6wbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-CNk3LR9M.js +96 -0
  119. package/dist/{usePagination-CIRxyVr8.js → usePagination-BcA-imTr.js} +1 -1
  120. package/dist/{user-PTTQTMyQ.js → user-DRvLwlBE.js} +1 -1
  121. package/dist/vue-i18n-y7bHQpNx.js +2365 -0
  122. package/dist/{xlsx-l0AsOrP1.js → xlsx-CBObn76o.js} +379 -379
  123. package/dist/{zod-Bm1pKYLC.js → zod-DWU5EdQV.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BqEtvKFs.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +0 -4442
  127. package/dist/Grab-CGWinKBS.js +0 -301
  128. package/dist/MainLayout-D22Q2_jN.js +0 -4
  129. package/dist/Marketing-CmVnvEN6.js +0 -269
  130. package/dist/MarketingMaterialEdit-CQ55zG-W.js +0 -1037
  131. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +0 -1923
  133. package/dist/Setting-aLQCUCP9.js +0 -574
  134. package/dist/Settings-BkYtKb4l.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +0 -7007
  137. package/dist/WhatsappAccount-BG0dIroG.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +0 -39
  139. package/dist/WhatsappBot-O5h5UKXz.js +0 -876
  140. package/dist/WhatsappBotLogs-BOPTuu6o.js +0 -372
  141. package/dist/WhatsappBotSettings-BSiIvpGO.js +0 -705
  142. package/dist/WhatsappLayout-DLVIfkzJ.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-BzWvsZwc.js +0 -51
  146. package/dist/feature-flag--GbS6Qn_.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C1C21iKU.js +0 -74
  150. package/dist/index-C_H8jFYf.js +0 -2743
  151. package/dist/objectid-DtEPzPd_.js +0 -145
  152. package/dist/template-3Nu_MAMG.js +0 -188
  153. package/dist/useMarketingMaterialActions-ClYoBaFw.js +0 -125
  154. package/dist/vue-i18n-DYnrLWFT.js +0 -2365
@@ -1,301 +0,0 @@
1
- import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
2
- import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as ee, components as te } from "@feedmepos/ui-library";
4
- import { p as P } from "./plugins-CKaeoHSK.js";
5
- import { u as oe } from "./loading-BAFiJnEb.js";
6
- import { u as ne } from "./business-CJjiItSo.js";
7
- import { u as ae } from "./campaign-DEXq52fE.js";
8
- import { u as re } from "./vue-i18n-DYnrLWFT.js";
9
- import { h as d } from "./moment-D7p2TMB-.js";
10
- import { a as se, b as V } from "./campaign-D4MWLs1D.js";
11
- import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js";
12
- import { u as le } from "./template-3Nu_MAMG.js";
13
- import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
14
- import { c as C } from "./index-4LQanFJi.js";
15
- const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
16
- __name: "Grab",
17
- setup(_e) {
18
- const { t: o } = re(), I = {
19
- label: o("connect.grab.createCampaign"),
20
- value: "create",
21
- isPrimary: !0,
22
- prependIcon: "add"
23
- }, A = le("GRAB", ee()), S = ne(), g = ae(), { global: R, minor: T } = oe, K = [
24
- {
25
- label: "Bill promotion",
26
- value: "BILL"
27
- },
28
- {
29
- label: "Item promotion",
30
- value: "ITEM"
31
- }
32
- ], c = L({
33
- searchKey: "",
34
- location: [],
35
- effectType: []
36
- });
37
- function E(e) {
38
- const t = c.value.location;
39
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
40
- var s;
41
- return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(a);
42
- }) : e.targetLocation.includes(t);
43
- }
44
- function j(e) {
45
- var s, r;
46
- const t = c.value.effectType;
47
- if (!t || t.length === 0) return !0;
48
- const a = (r = (s = e.effect) == null ? void 0 : s.options) == null ? void 0 : r.target;
49
- return t.includes(a);
50
- }
51
- const p = z(
52
- () => g.campaigns.grab.filter(
53
- (e) => E(e) && j(e)
54
- )
55
- ), G = [
56
- {
57
- header: o("connect.grab.promotionTitle"),
58
- accessorFn: (e) => e.name
59
- },
60
- {
61
- header: o("connect.grab.period"),
62
- accessorFn: (e) => {
63
- const t = d(e.timeframeOptions.start).format("DD/MM/YYYY"), a = d(e.timeframeOptions.end).format("DD/MM/YYYY");
64
- return `${t} - ${a}`;
65
- }
66
- },
67
- {
68
- header: o("connect.grab.status"),
69
- accessorFn: (e) => se(e),
70
- cell(e) {
71
- return V(e.row.original);
72
- }
73
- },
74
- {
75
- header: o("connect.grab.summary"),
76
- cell(e) {
77
- const t = ie(e.row.original.discount);
78
- return t ? `${t.type} - ${t.adjustment}` : "-";
79
- }
80
- },
81
- {
82
- header: o("connect.grab.actions"),
83
- cell(e) {
84
- return J(te.FmButton, {
85
- variant: "tertiary",
86
- icon: "delete",
87
- iconColor: "neutral-gray-400",
88
- onClick: (t) => {
89
- t.stopPropagation(), D(e.row.original);
90
- }
91
- });
92
- }
93
- }
94
- ], B = L();
95
- async function D(e) {
96
- await P.remove(o("connect.grab.confirmRemove", { name: e.name })) && await T(
97
- async () => {
98
- await C.delete(e._id), await g.read("PROMOTION");
99
- },
100
- {
101
- message: o("connect.grab.removing", { name: e.name }),
102
- successMessage: o("connect.grab.removedSuccessfully", {
103
- name: e.name
104
- })
105
- }
106
- );
107
- }
108
- async function b(e) {
109
- e ? await t() : A.open(async (a) => {
110
- await t(a);
111
- });
112
- async function t(a) {
113
- var s;
114
- (s = B.value) == null || s.showSheet(
115
- !0,
116
- "GRAB",
117
- e ? await C.readById(e._id) : void 0,
118
- a
119
- );
120
- }
121
- }
122
- async function N(e) {
123
- var a;
124
- const t = await U(e.campaign);
125
- if (t.length > 0) {
126
- const s = t.map(
127
- (r) => `"${r.name}" (${d(r.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(r.timeframeOptions.end).format("DD/MM/YYYY")})`
128
- ).join(`
129
- `);
130
- return await ((a = P.dialog) == null ? void 0 : a.open({
131
- title: o("connect.grab.conflictDetected"),
132
- message: o("connect.grab.conflictMessage", {
133
- conflicts: s
134
- }),
135
- closeButton: !0,
136
- overlay: !0,
137
- primaryActions: {
138
- close: !0,
139
- text: "OK"
140
- }
141
- })), !1;
142
- }
143
- await T(
144
- async () => (e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("PROMOTION"), !0),
145
- {
146
- message: o(
147
- e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
148
- ),
149
- successMessage: o(
150
- e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
151
- )
152
- }
153
- );
154
- }
155
- async function U(e) {
156
- const t = g.campaigns.grab, a = [], s = !!e._id;
157
- for (const r of t) {
158
- if (s && r._id === e._id) continue;
159
- const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(r.timeframeOptions.start), v = d(r.timeframeOptions.end);
160
- if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
161
- const n = e.discount, w = r.discount;
162
- n.scope.type === w.scope.type && a.push(r);
163
- }
164
- }
165
- return a;
166
- }
167
- async function H(e) {
168
- switch (e) {
169
- case "create":
170
- b();
171
- break;
172
- }
173
- }
174
- return Q(async () => {
175
- await R(async () => {
176
- await S.readLocations(), await g.read("PROMOTION");
177
- });
178
- }), (e, t) => {
179
- const a = u("FmPill"), s = u("FmPageHead"), r = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
180
- return f(), k(F, null, [
181
- l(s, {
182
- title: i(o)("connect.grab.title"),
183
- actions: i(p).length > 0 ? [I] : [],
184
- "onClick:action": H
185
- }, {
186
- prepend: x(() => [
187
- l(a, { variant: "beta" }),
188
- l(a, { variant: "premium" })
189
- ]),
190
- _: 1
191
- }, 8, ["title", "actions"]),
192
- m("div", me, [
193
- l(r, {
194
- modelValue: c.value.searchKey,
195
- "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
196
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
197
- placeholder: i(o)("connect.grab.search"),
198
- collapsible: ""
199
- }, null, 8, ["modelValue", "placeholder"]),
200
- i(p) && i(p).length > 0 ? (f(), k(F, { key: 0 }, [
201
- m("div", ue, [
202
- m("div", de, [
203
- l($, {
204
- label: `${i(o)("connect.common.location")}: `,
205
- "right-icon": "keyboard_arrow_down",
206
- modelValue: c.value.location,
207
- "onUpdate:modelValue": t[1] || (t[1] = (n) => c.value.location = n),
208
- icon: "storefront",
209
- "show-item-label": !0,
210
- items: i(S).locationOptions
211
- }, null, 8, ["label", "modelValue", "items"]),
212
- l($, {
213
- label: "Type:",
214
- "right-icon": "keyboard_arrow_down",
215
- modelValue: c.value.effectType,
216
- "onUpdate:modelValue": t[2] || (t[2] = (n) => c.value.effectType = n),
217
- icon: "filter_list",
218
- "show-item-label": !0,
219
- items: K
220
- }, null, 8, ["modelValue"])
221
- ]),
222
- l(r, {
223
- modelValue: c.value.searchKey,
224
- "onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
225
- class: "xs:hidden",
226
- placeholder: "search",
227
- collapsible: ""
228
- }, null, 8, ["modelValue"])
229
- ]),
230
- l(_, {
231
- class: "xs:hidden",
232
- "row-data": i(p),
233
- "column-defs": G,
234
- "search-value": c.value.searchKey,
235
- "column-filter": [],
236
- onRowClick: t[4] || (t[4] = (n) => b(n.original)),
237
- "hide-footer": i(p).length < 10
238
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
239
- l(v, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
240
- default: x(() => [
241
- (f(!0), k(F, null, W(i(p).filter(
242
- (n) => n.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
243
- ), (n) => (f(), O(h, {
244
- key: n._id.toString(),
245
- onClick: (w) => b(n),
246
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
247
- }, {
248
- default: x(() => [
249
- m("div", pe, [
250
- m("div", fe, [
251
- (f(), O(X(i(V)(n))))
252
- ])
253
- ]),
254
- l(y, {
255
- icon: "delete",
256
- "icon-color": "neutral-gray-400",
257
- variant: "tertiary",
258
- onClick: (w) => (w.stopPropagation(), D(n))
259
- }, null, 8, ["onClick"])
260
- ]),
261
- _: 2
262
- }, 1032, ["onClick"]))), 128))
263
- ]),
264
- _: 1
265
- })
266
- ], 64)) : (f(), O(M, {
267
- key: 1,
268
- variant: "outlined",
269
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
270
- }, {
271
- default: x(() => [
272
- t[6] || (t[6] = m("img", {
273
- src: Z,
274
- class: "aspect-square w-[150px]"
275
- }, null, -1)),
276
- m("div", ge, [
277
- m("div", ye, Y(i(o)("connect.grab.createPromotionCampaign")), 1),
278
- m("div", be, Y(i(o)("connect.grab.description")), 1)
279
- ]),
280
- l(y, {
281
- variant: "primary",
282
- label: i(o)("connect.grab.createPromotionCampaign"),
283
- icon: "add",
284
- onClick: t[5] || (t[5] = (n) => b())
285
- }, null, 8, ["label"])
286
- ]),
287
- _: 1
288
- }))
289
- ]),
290
- l(ce, {
291
- ref_key: "sheetRef",
292
- ref: B,
293
- "onSubmit:modelValue": N
294
- }, null, 512)
295
- ], 64);
296
- };
297
- }
298
- });
299
- export {
300
- Pe as default
301
- };
@@ -1,4 +0,0 @@
1
- import { a as f } from "./MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js";
2
- export {
3
- f as default
4
- };
@@ -1,269 +0,0 @@
1
- import { defineComponent as F, resolveComponent as v, openBlock as u, createBlock as E, unref as i, ref as g, watch as L, createElementBlock as _, createVNode as o, withCtx as k, createElementVNode as l, toDisplayString as w, withModifiers as H, createStaticVNode as V, computed as j, onMounted as z, nextTick as G, onUnmounted as q, Fragment as N, renderList as O, createCommentVNode as P } from "vue";
2
- import { _ as K } from "./campaign-CpzFl8Vr.js";
3
- import { u as I } from "./vue-i18n-DYnrLWFT.js";
4
- import { u as Z, m as J } from "./useMarketingMaterialActions-ClYoBaFw.js";
5
- import { u as U } from "./remy-Qz_pNsUS.js";
6
- import { useRouter as Q } from "vue-router";
7
- import "./index-CEFEuMOF.js";
8
- import { R as W } from "./app-CEe3kSZM.js";
9
- const X = /* @__PURE__ */ F({
10
- __name: "GenerateMaterialButton",
11
- setup(d) {
12
- const { t: s } = I(), c = U();
13
- function n() {
14
- c.activate({
15
- command: "generateMarketingMaterial",
16
- fullscreen: !0,
17
- forceNewConversation: !0
18
- });
19
- }
20
- return (a, e) => {
21
- const m = v("FmButton");
22
- return u(), E(m, {
23
- label: i(s)("connect.marketing.emptyState.action"),
24
- "prepend-icon": "wand_stars",
25
- onClick: n
26
- }, null, 8, ["label"]);
27
- };
28
- }
29
- }), Y = { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, ee = /* @__PURE__ */ F({
30
- __name: "MarketingMaterialItemActionButton",
31
- props: {
32
- material: {}
33
- },
34
- emits: ["update:menuOpened", "deleted"],
35
- setup(d, { emit: s }) {
36
- const c = d, n = s, { t: a } = I(), e = g(!1);
37
- L(e, (M) => {
38
- n("update:menuOpened", M);
39
- });
40
- const {
41
- shareMaterial: m,
42
- downloadMaterialImage: t,
43
- copyMaterialLink: p,
44
- deleteMaterial: y
45
- } = Z();
46
- async function A() {
47
- e.value = !1, await m(c.material);
48
- }
49
- async function B() {
50
- e.value = !1, await t(c.material.imageUrl);
51
- }
52
- async function b() {
53
- e.value = !1, await p(c.material.imageUrl);
54
- }
55
- async function x() {
56
- e.value = !1, await y(c.material) && n("deleted", c.material._id);
57
- }
58
- return (M, C) => {
59
- const r = v("FmButton"), f = v("FmMenuItem"), S = v("FmMenuDivider"), $ = v("FmIcon"), D = v("FmMenu");
60
- return u(), _("div", null, [
61
- o(D, {
62
- placement: "right-start",
63
- shift: !0,
64
- "model-value": e.value,
65
- onMenuChanged: C[0] || (C[0] = (h) => e.value = h)
66
- }, {
67
- "menu-button": k(() => [
68
- o(r, {
69
- icon: "more_vert",
70
- variant: "tertiary",
71
- size: "md"
72
- })
73
- ]),
74
- default: k(() => [
75
- o(f, {
76
- icon: "share",
77
- label: i(a)("connect.marketing.actions.share"),
78
- onClick: A
79
- }, null, 8, ["label"]),
80
- o(f, {
81
- icon: "download",
82
- label: i(a)("connect.marketing.actions.download"),
83
- onClick: B
84
- }, null, 8, ["label"]),
85
- o(f, {
86
- icon: "content_copy",
87
- label: i(a)("connect.marketing.actions.copyLink"),
88
- onClick: b
89
- }, null, 8, ["label"]),
90
- o(S),
91
- o(f, { onClick: x }, {
92
- prepend: k(() => [
93
- o($, {
94
- name: "delete",
95
- size: "md",
96
- color: "typo-error",
97
- outline: ""
98
- })
99
- ]),
100
- label: k(() => [
101
- l("div", Y, w(i(a)("connect.common.delete")), 1)
102
- ]),
103
- _: 1
104
- })
105
- ]),
106
- _: 1
107
- }, 8, ["model-value"])
108
- ]);
109
- };
110
- }
111
- }), te = { class: "h-[205.5px] w-full overflow-hidden bg-fm-color-neutral-gray-100" }, ne = ["src", "alt"], ae = { class: "p-3" }, oe = { class: "flex items-start justify-between gap-2" }, le = { class: "space-y-1 overflow-hidden" }, re = { class: "font-semibold text-sm text-gray-900 truncate" }, ie = { class: "text-xs text-gray-500 line-clamp-2" }, se = {
112
- key: 1,
113
- class: "rounded-lg overflow-hidden border border-transparent fm-shadow-light-100 animate-pulse bg-white"
114
- }, R = /* @__PURE__ */ F({
115
- __name: "MarketingMaterialItem",
116
- props: {
117
- material: {}
118
- },
119
- emits: ["deleted"],
120
- setup(d, { emit: s }) {
121
- const c = s, { t: n } = I(), a = Q(), e = g(!1);
122
- return (m, t) => d.material ? (u(), _("div", {
123
- key: 0,
124
- 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",
125
- onClick: t[3] || (t[3] = () => {
126
- e.value || i(a).push({
127
- name: i(W)["$connect-MARKETING_MATERIAL_EDIT"],
128
- query: { id: d.material._id }
129
- });
130
- })
131
- }, [
132
- l("div", te, [
133
- l("img", {
134
- src: d.material.imageUrl,
135
- alt: i(n)("connect.marketing.title"),
136
- class: "w-full h-full object-cover"
137
- }, null, 8, ne)
138
- ]),
139
- l("div", ae, [
140
- l("div", oe, [
141
- l("div", le, [
142
- l("p", re, w(d.material.headline), 1),
143
- l("p", ie, w(d.material.caption), 1)
144
- ]),
145
- o(ee, {
146
- material: d.material,
147
- "onUpdate:menuOpened": t[0] || (t[0] = (p) => e.value = p),
148
- onDeleted: t[1] || (t[1] = (p) => c("deleted", p)),
149
- onClick: t[2] || (t[2] = H(() => {
150
- }, ["stop"]))
151
- }, null, 8, ["material"])
152
- ])
153
- ])
154
- ])) : (u(), _("div", se, [...t[4] || (t[4] = [
155
- V('<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)
156
- ])]));
157
- }
158
- }), ce = {
159
- key: 0,
160
- class: "px-24 xs:px-12 flex flex-col gap-y-16 py-24 xs:py-16"
161
- }, ue = { class: "fm-typo-en-title-sm-800 text-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 xs:w-full text-center" }, me = {
162
- key: 1,
163
- class: "px-24 xs:px-12 flex flex-col gap-y-24 xs:gap-y-16 pt-24 xs:pt-16"
164
- }, pe = { class: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-16" }, T = 20, we = /* @__PURE__ */ F({
165
- __name: "Marketing",
166
- setup(d) {
167
- const { t: s } = I(), c = U(), n = g([]), a = g(!0), e = g(!1), m = g(!0), t = g(null), p = g(null);
168
- let y = null;
169
- const A = j(() => ({
170
- label: s("connect.marketing.emptyState.action"),
171
- value: "generate",
172
- isPrimary: !0,
173
- prependIcon: "wand_stars"
174
- }));
175
- function B(r) {
176
- r === "generate" && c.activate({
177
- command: "generateMarketingMaterial",
178
- fullscreen: !0,
179
- forceNewConversation: !0
180
- });
181
- }
182
- async function b() {
183
- a.value = !0, e.value = !1;
184
- try {
185
- const r = await J.listMarketingMaterials(
186
- t.value,
187
- T
188
- );
189
- n.value.push(...r.resources), t.value = r.meta.nextCursor, m.value = !!r.meta.nextCursor;
190
- } catch {
191
- e.value = !0;
192
- } finally {
193
- a.value = !1;
194
- }
195
- }
196
- async function x() {
197
- !m.value || a.value || await b();
198
- }
199
- async function M(r) {
200
- n.value = n.value.filter((f) => f._id !== r), !(n.value.length > 0 || !m.value || a.value) && await x();
201
- }
202
- function C() {
203
- y = new IntersectionObserver(
204
- ([r]) => {
205
- r.isIntersecting && x();
206
- },
207
- { rootMargin: "200px" }
208
- ), p.value && y.observe(p.value);
209
- }
210
- return z(async () => {
211
- await b(), await G(), C();
212
- }), q(() => {
213
- y == null || y.disconnect();
214
- }), (r, f) => {
215
- const S = v("FmPageHead"), $ = v("FmCard"), D = v("FmButton");
216
- return u(), _(N, null, [
217
- o(S, {
218
- title: i(s)("connect.marketing.title"),
219
- actions: n.value.length > 0 ? [A.value] : [],
220
- "onClick:action": B
221
- }, null, 8, ["title", "actions"]),
222
- !a.value && !m.value && n.value.length === 0 ? (u(), _("div", ce, [
223
- o($, {
224
- variant: "outlined",
225
- class: "w-full justify-center items-center flex flex-col p-[24px] xs:p-16 gap-[24px] xs:gap-16"
226
- }, {
227
- default: k(() => [
228
- f[0] || (f[0] = l("img", {
229
- src: K,
230
- class: "w-[150px]"
231
- }, null, -1)),
232
- l("p", ue, w(i(s)("connect.marketing.emptyState.title")), 1),
233
- l("p", de, w(i(s)("connect.marketing.emptyState.description")), 1),
234
- o(X)
235
- ]),
236
- _: 1
237
- })
238
- ])) : (u(), _("div", me, [
239
- l("div", pe, [
240
- (u(!0), _(N, null, O(n.value, (h) => (u(), E(R, {
241
- key: h._id,
242
- material: h,
243
- onDeleted: M
244
- }, null, 8, ["material"]))), 128)),
245
- a.value ? (u(), _(N, { key: 0 }, O(T, (h) => o(R, {
246
- key: `skeleton-${h}`,
247
- material: null
248
- })), 64)) : P("", !0)
249
- ]),
250
- e.value ? (u(), E(D, {
251
- key: 0,
252
- class: "self-center",
253
- variant: "secondary",
254
- label: i(s)("connect.marketing.retry"),
255
- onClick: x
256
- }, null, 8, ["label"])) : P("", !0),
257
- l("div", {
258
- ref_key: "sentinel",
259
- ref: p,
260
- class: "h-1"
261
- }, null, 512)
262
- ]))
263
- ], 64);
264
- };
265
- }
266
- });
267
- export {
268
- we as default
269
- };