@feedmepos/mf-connect 0.1.114-prod → 0.1.115-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-43mZfFAr.js} +700 -654
  3. package/dist/AuditLogs-BPpdm96t.js +2016 -0
  4. package/dist/{Bin-CHZolo56.js → Bin-CA7v180Y.js} +8 -8
  5. package/dist/Broadcast-qmdifF2Y.js +306 -0
  6. package/dist/{CampaignAnalytic-DgZvsUoF.js → CampaignAnalytic-xnrDxqaH.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-zjk-QdtX.js} +9 -9
  8. package/dist/{Card-wRFTJwJ9.js → Card-D8icsk7L.js} +25 -24
  9. package/dist/{Collections-9G-_9Etz.js → Collections--THcD-E_.js} +197 -185
  10. package/dist/{Credit-Bl7IDMCU.js → Credit-JrbtVMBp.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BVLJeofG.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Q1f6EQW3.js → EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js} +32 -32
  14. package/dist/{Experience-Cs2iViLv.js → Experience-CFeRqBoj.js} +32 -31
  15. package/dist/{FileSaver.min-B3Levdbu.js → FileSaver.min-CCXIBm58.js} +1 -1
  16. package/dist/{Game-oXURgzan.js → Game-CPxq6Ex3.js} +19 -18
  17. package/dist/{GiftCardSetup-C2Wu-dRl.js → GiftCardSetup-D0esVZDp.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Da2e89Um.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js} +7 -7
  19. package/dist/{Goals-B_xEM7gf.js → Goals-DaKI6uXt.js} +4 -4
  20. package/dist/Grab-BWzdN_cd.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BRJR1heE.js → ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js} +1 -1
  22. package/dist/{Index-kuT6W6R_.js → Index-2kENoaZm.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-7JqHfSk-.js → LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.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-CX_Sspu5.js} +1 -1
  25. package/dist/{LoyaltyDashboard-CqxHdZcm.js → LoyaltyDashboard-CB93Fz8u.js} +15 -15
  26. package/dist/MainLayout-DwnjGXh6.js +4 -0
  27. package/dist/{MainLayout-CAERFIms.js → MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js} +5 -4
  28. package/dist/Marketing-DCco__2F.js +273 -0
  29. package/dist/MarketingMaterialEdit-BbgFtrYP.js +1037 -0
  30. package/dist/{Member-B8VZEn9t.js → Member-B--nYyr0.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B31lVLKh.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js} +43 -50
  32. package/dist/{MemberImportHistory-D9tgHnTS.js → MemberImportHistory-D52Y4RTC.js} +7 -7
  33. package/dist/{MemberList-Hw_xQY1i.js → MemberList-13Owa1fj.js} +103 -105
  34. package/dist/{MemberTransactions-DiBO4plw.js → MemberTransactions-CpXEWNbq.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CbFt5X89.js → MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.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-C_y0rM8c.js} +1 -1
  37. package/dist/{Mission-DpYei3aF.js → Mission-Ci-UzXSu.js} +22 -21
  38. package/dist/{Overview-CARquJCS.js → Overview-CKxSfAGF.js} +145 -144
  39. package/dist/{Overview-BFQMmyT6.js → Overview-CXen9Ram.js} +23 -22
  40. package/dist/{Point-Dd2ykwNv.js → Point-CR3YOaag.js} +22 -21
  41. package/dist/{Promotion-DXl-W7np.js → Promotion-tw3J4ul-.js} +137 -131
  42. package/dist/{Queue-Cd3N-4iB.js → Queue-BZGA5ZXt.js} +47 -46
  43. package/dist/{Record-C3HdDsh5.js → Record-BTevVXnT.js} +9 -9
  44. package/dist/{Review-Bif3Ub9Z.js → Review-BU7c8ZF0.js} +2 -2
  45. package/dist/ReviewFacebookCallback-BnMF6Arh.js +225 -0
  46. package/dist/{ReviewGoogleCallback-i-RNLlLm.js → ReviewGoogleCallback-xpdPHSdg.js} +5 -5
  47. package/dist/{Reward-DHxzrR_7.js → Reward-jlA_7cxz.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DcrFlcSo.js → RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +1923 -0
  50. package/dist/{Segment-Cjpxordk.js → Segment-C1Bwm--Q.js} +290 -291
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-6u21xBu6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BOXVzfer.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js} +4 -4
  53. package/dist/Setting-CDM4RhLW.js +574 -0
  54. package/dist/{SettingAdvertisements-aog5fz32.js → SettingAdvertisements-4XEAJzlL.js} +12 -12
  55. package/dist/Settings-D-0tvZRr.js +286 -0
  56. package/dist/{Store-Bq3kw1l2.js → Store-C56dXtc4.js} +31 -30
  57. package/dist/{StoreRewards-ZGXKEM09.js → StoreRewards-DQ1Q6WS6.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +7007 -0
  60. package/dist/{Tier-CfgpEHY7.js → Tier-D4CPZqw7.js} +2576 -687
  61. package/dist/{Title-B2itYWeD.js → Title-DCbwhUic.js} +94 -92
  62. package/dist/{Transaction-hJ5ygIcf.js → Transaction-C5LrasXr.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-8BgGlpTh.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js} +26 -26
  64. package/dist/{Voucher-TG47pGR3.js → Voucher-rrVbNZKR.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjuXCTxg.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js} +16 -16
  66. package/dist/WhatsappAccount-oJDo5zTr.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +39 -0
  68. package/dist/WhatsappBot-Cl64wG_F.js +876 -0
  69. package/dist/WhatsappBotLogs-D3uT4EiB.js +372 -0
  70. package/dist/WhatsappBotSettings-Cs1lLxh-.js +705 -0
  71. package/dist/WhatsappLayout-C639d2HP.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.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-C39_95SZ.js} +2 -2
  74. package/dist/{app-tPHYkJcQ.js → app-CgimGODl.js} +10610 -8223
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-BHDVnGj2.js → base.export-D2P6HFvo.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-HLyWfrXY.js → business-Bu5TqSA0.js} +1 -1
  79. package/dist/campaign-BFIXSgdJ.js +400 -0
  80. package/dist/{campaign-5zFgUNLw.js → campaign-zJxttSIk.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-gvjlcEfe.js} +78 -78
  83. package/dist/{collectible.enum-BbZSAfys.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-DPSgBHnz.js → collection.fn-DOm0HsSh.js} +2 -2
  85. package/dist/{currency-BVrMqU6-.js → currency-BpbQvbm8.js} +1 -1
  86. package/dist/duplicateCampaign-CvsvjRE9.js +51 -0
  87. package/dist/{effect-BBifVx76.js → effect-D-GtNB3n.js} +1 -1
  88. package/dist/{email-addresses-9C7xHTNv.js → email-addresses-BKMoAtMi.js} +2 -2
  89. package/dist/feature-flag-BJ_eyKsq.js +868 -0
  90. package/dist/feature-flag-Bo-k5sIG.js +50 -0
  91. package/dist/google-BQK68wbe.js +5 -0
  92. package/dist/{helper-C08jyQNK.js → helper-CkfjBgMM.js} +1 -1
  93. package/dist/{index-Dhyqf1s8.js → index-B6kU3PkV.js} +2700 -2613
  94. package/dist/{index-BgwZGunW.js → index-BAtUrtqM.js} +19 -6
  95. package/dist/index-BKsxIwbi.js +14571 -0
  96. package/dist/{index-DZ-q5O-V.js → index-BdEXUNoG.js} +4 -4
  97. package/dist/{index-hIUtD2eY.js → index-Bhl5IRXy.js} +11 -10
  98. package/dist/{index-kCbkOivd.js → index-BpTIulTX.js} +1 -1
  99. package/dist/index-C-iwb2Ln.js +109 -0
  100. package/dist/{index-Ciw2TZxV.js → index-CCEXSPxk.js} +8 -7
  101. package/dist/{index-CUle4c2B.js → index-CIej31pF.js} +4 -3
  102. package/dist/{index-ihw-WFCa.js → index-CQ8XFbBk.js} +2 -2
  103. package/dist/index-C_H8jFYf.js +2743 -0
  104. package/dist/{index-CEe1kJ0T.js → index-CfQuYqXn.js} +1 -1
  105. package/dist/{index-C_WoO58V.js → index-CuREApMc.js} +8 -7
  106. package/dist/{index-NJSI4wX4.js → index-D0JK99Ko.js} +693 -231
  107. package/dist/{index-DnRMNmUA.js → index-DKxN1mMS.js} +396 -232
  108. package/dist/index-DQ8JJhxs.js +74 -0
  109. package/dist/{index-D24Q28cH.js → index-DUAZOMVJ.js} +1 -1
  110. package/dist/{index-Yo0tP8KJ.js → index-DqGs6RJG.js} +683 -581
  111. package/dist/{index-B_334Y_i.js → index-DwU3fsLW.js} +29 -15
  112. package/dist/{index-hSRM1smQ.js → index-LygS9WsG.js} +8028 -10767
  113. package/dist/{index-96ZiAKj_.js → index-feCrYhi6.js} +1 -1
  114. package/dist/{index-Dk-jg0wN.js → index-zTvr2GR4.js} +2 -2
  115. package/dist/{index.esm2017-hN99SQTb.js → index.esm2017-DZi9IQPS.js} +209 -209
  116. package/dist/{loading-CVuY4vQ4.js → loading-Brid2wnu.js} +1 -1
  117. package/dist/{lodash-GFl9_FMH.js → lodash-C1epw3Kv.js} +1 -1
  118. package/dist/{member-import-CshTzabx.js → member-import-DAIxTIiu.js} +6 -5
  119. package/dist/{membership-S0KES3Ex.js → membership-BZmljFhF.js} +3 -3
  120. package/dist/{money-JxdX8ru4.js → money-cLcyGcSZ.js} +1 -1
  121. package/dist/{number-BRLwa-mB.js → number-C2jPLJr2.js} +1 -1
  122. package/dist/objectid-C-wocWKI.js +145 -0
  123. package/dist/{onboarding-BSKYeyP7.js → onboarding-oRfy_g05.js} +25 -25
  124. package/dist/{onboardingSetup-BqT52VRm.js → onboardingSetup-BLD6m8HY.js} +2 -2
  125. package/dist/{plugins-BR_wmMFJ.js → plugins-CUsr9vB0.js} +3 -3
  126. package/dist/{MarketingMaterialEdit-BvIthCHG.js → remy-icon-BhUGu2NI.js} +2 -1031
  127. package/dist/{reward-CpCGg_W2.js → reward-UOT03odb.js} +1 -1
  128. package/dist/{rule-Dbg9e8MO.js → rule-BgJnPjkI.js} +572 -492
  129. package/dist/style.css +1 -1
  130. package/dist/template-BZyFhr73.js +188 -0
  131. package/dist/{timezone-CDVa-xPr.js → timezone-BXA4wq7Y.js} +1 -1
  132. package/dist/{transaction.fn-DrTBoF9T.js → transaction.fn-CQ4fpRt3.js} +2 -2
  133. package/dist/{trigger-wqGwQfB2.js → trigger-DXJCGT0q.js} +8 -8
  134. package/dist/useMarketingMaterialActions-B-Wib5ga.js +125 -0
  135. package/dist/{usePagination-fODgpZZ8.js → usePagination-Pp4okWr8.js} +1 -1
  136. package/dist/{user-DaLUK1dk.js → user-B3gXcAIy.js} +1 -1
  137. package/dist/vue-i18n-DWGiC_vs.js +2365 -0
  138. package/dist/{xlsx-Bl4_Dtrq.js → xlsx-CCaDUTgW.js} +651 -651
  139. package/dist/{zod-CAzWyVqj.js → zod-CPwjOxvW.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,4 +1,4 @@
1
- import { i as Z } from "./plugins-BR_wmMFJ.js";
1
+ import { i as Z } from "./plugins-CUsr9vB0.js";
2
2
  import { h as f } from "vue";
3
3
  function u(e, o) {
4
4
  return e.path.join(".") === o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-connect",
3
- "version": "0.1.114-prod",
3
+ "version": "0.1.115-dev",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -17,25 +17,32 @@
17
17
  "dependencies": {
18
18
  "@ckeditor/ckeditor5-build-classic": "^44.3.0",
19
19
  "@ckeditor/ckeditor5-vue": "^7.3.0",
20
- "@feedmepos/core": "2.15.47",
20
+ "@feedmepos/custom-attributes": "0.0.1-rc.4",
21
+ "@feedmepos/feature-flag": "^0.0.15",
21
22
  "@feedmepos/hrm-permission": "1.0.14",
23
+ "@feedmepos/menu": "1.0.34",
24
+ "@feedmepos/core": "2.15.47",
22
25
  "@feedmepos/mf-common": "1.29.31",
23
26
  "@feedmepos/mf-core-ui": "1.0.30",
24
27
  "@feedmepos/ui-library": "1.10.13",
25
28
  "@feedmepos/mf-remy-panel": "0.15.0",
29
+ "@feedmepos/remy-vue-client": "0.2.0-beta.14",
26
30
  "@tailwindcss/typography": "^0.5.16",
27
31
  "@types/qrcode": "^1.5.5",
32
+ "@vueuse/core": "^14.1.0",
28
33
  "axios": "^1.7.2",
29
34
  "bson-objectid": "^2.0.4",
30
35
  "change-case": "^5.4.4",
31
36
  "ckeditor5": "^44.3.0",
32
37
  "cross-env": "^7.0.3",
38
+ "css-tree": "3.2.1",
33
39
  "dayjs": "^1.11.12",
34
40
  "dotenv": "^16.4.5",
35
41
  "email-addresses": "^5.0.0",
36
- "fabric": "^6.4.2",
42
+ "fabric": "^5.5.1",
37
43
  "file-saver": "^2.0.5",
38
44
  "firebase": "^10.12.4",
45
+ "htmlparser2": "10.1.0",
39
46
  "i18next": "24.2.1",
40
47
  "lodash": "^4.17.21",
41
48
  "moment": "^2.30.1",
@@ -43,6 +50,8 @@
43
50
  "pinia": "^2.1.7",
44
51
  "qrcode": "^1.5.3",
45
52
  "rrule": "^2.8.1",
53
+ "ua-parser-js": "^2.0.3",
54
+ "sanitize-html": "2.17.4",
46
55
  "unplugin-auto-import": "^0.17.8",
47
56
  "uuid": "^10.0.0",
48
57
  "vite-plugin-vue-devtools": "^7.6.4",
@@ -1,271 +0,0 @@
1
- import { defineComponent as q, ref as C, computed as z, onMounted as G, resolveComponent as m, openBlock as d, createElementBlock as w, Fragment as v, createVNode as i, unref as a, createElementVNode as n, withCtx as S, renderList as J, createBlock as x, resolveDynamicComponent as Q, toDisplayString as u, createCommentVNode as W, h as k } from "vue";
2
- import { _ as X } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as Y, components as R } from "@feedmepos/ui-library";
4
- import { p as Z } from "./plugins-BR_wmMFJ.js";
5
- import { u as ee } from "./loading-CVuY4vQ4.js";
6
- import { u as te } from "./business-HLyWfrXY.js";
7
- import { u as ae } from "./campaign-5zFgUNLw.js";
8
- import { a as L, b as O, g as oe } from "./campaign-awCRccgX.js";
9
- import { u as ne, c as se, p as ce } from "./template-CS-lExgI.js";
10
- import { u as ie } from "./vue-i18n-Dx-KXojZ.js";
11
- import { _ as re } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
12
- import { _ as le } from "./MessageInput.vue_vue_type_script_setup_true_lang-CbFt5X89.js";
13
- import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DGpQfV5T.js";
14
- import { u as de } from "./onboardingSetup-BqT52VRm.js";
15
- import { c as f } from "./index-Dk-jg0wN.js";
16
- const pe = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, fe = { class: "flex gap-8 overflow-x-auto" }, ge = { class: "space-y-8" }, ye = { class: "flex w-full gap-4 items-center" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "space-y-4" }, we = { class: "fm-typo-en-body-lg-600" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ce = { class: "flex items-center gap-8" }, ve = { key: 0 }, Se = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, xe = { class: "flex flex-col gap-16 text-center" }, ke = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = /* @__PURE__ */ q({
17
- __name: "Broadcast",
18
- setup(Be) {
19
- const { t: s } = ie(), V = {
20
- label: s("connect.campaign.common.createCampaign"),
21
- value: "create",
22
- isPrimary: !0,
23
- prependIcon: "add"
24
- }, T = ne("BROADCAST", Y()), I = te(), p = ae(), { global: K, minor: A } = ee, B = C((/* @__PURE__ */ new Date()).toISOString()), r = C({
25
- searchKey: "",
26
- location: []
27
- });
28
- function P(e) {
29
- const t = r.value.location;
30
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
31
- var c;
32
- return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
33
- }) : e.targetLocation.includes(t);
34
- }
35
- const g = z(
36
- () => p.campaigns.broadcast.filter((e) => P(e))
37
- ), $ = [
38
- {
39
- header: "Broadcast title",
40
- accessorFn: (e) => e.name
41
- },
42
- {
43
- header: "Status",
44
- accessorFn: (e) => oe(e),
45
- cell(e) {
46
- return L(e.row.original);
47
- }
48
- },
49
- {
50
- header: "Summary",
51
- accessorFn: (e) => O(e)
52
- },
53
- {
54
- header: "Message sent",
55
- accessorFn: (e) => e.currentReceive ?? "N/A"
56
- },
57
- {
58
- header: "Actions",
59
- cell(e) {
60
- return k("div", { class: "flex items-center gap-8 justify-end" }, [
61
- k(R.FmButton, {
62
- variant: "tertiary",
63
- icon: "content_copy",
64
- iconColor: "neutral-gray-400",
65
- onClick: async (t) => {
66
- t.stopPropagation(), await D(e.row.original);
67
- }
68
- }),
69
- k(R.FmButton, {
70
- variant: "tertiary",
71
- icon: "delete",
72
- iconColor: "neutral-gray-400",
73
- onClick: (t) => {
74
- t.stopPropagation(), F(e.row.original);
75
- }
76
- })
77
- ]);
78
- }
79
- }
80
- ], y = C();
81
- async function F(e) {
82
- await Z.remove(
83
- s("connect.campaign.common.remove.confirm", { name: e.name })
84
- ) && await A(
85
- async () => {
86
- await f.delete(e._id), await p.read("BROADCAST");
87
- },
88
- {
89
- message: s("connect.campaign.common.remove.removing", { name: e.name }),
90
- successMessage: s("connect.campaign.common.remove.removed", {
91
- name: e.name
92
- })
93
- }
94
- );
95
- }
96
- async function _(e) {
97
- B.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await t() : T.open(async (l) => {
98
- await t(l);
99
- });
100
- async function t(l) {
101
- var c;
102
- (c = y.value) == null || c.showSheet(
103
- !0,
104
- "BROADCAST",
105
- e ? await f.readById(e._id) : void 0,
106
- l
107
- );
108
- }
109
- }
110
- async function D(e) {
111
- var c;
112
- if (!await se(e.name))
113
- return;
114
- B.value = (/* @__PURE__ */ new Date()).toISOString();
115
- const t = await f.readById(e._id), l = ce(t);
116
- (c = y.value) == null || c.showSheet(
117
- !0,
118
- "BROADCAST",
119
- l,
120
- t.template
121
- );
122
- }
123
- async function j(e) {
124
- await A(
125
- async () => {
126
- e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("BROADCAST");
127
- },
128
- {
129
- message: s(
130
- `connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
131
- ),
132
- successMessage: s("connect.campaign.broadcast.update.success", {
133
- action: e.campaign._id ? "updated" : "created"
134
- })
135
- }
136
- );
137
- }
138
- const M = de();
139
- return G(async () => {
140
- var e;
141
- await K(async () => {
142
- await p.read("BROADCAST");
143
- }), await M.consume() === "BROADCAST" && ((e = y.value) == null || e.showSheet(!0, "BROADCAST"));
144
- }), (e, t) => {
145
- const l = m("FmPageHead"), c = m("FmSearch"), N = m("FmTable"), b = m("FmButton"), U = m("FmListItem"), E = m("FmList"), H = m("FmCard");
146
- return d(), w(v, null, [
147
- i(l, {
148
- title: a(s)("connect.campaign.broadcast.title"),
149
- actions: a(g).length > 0 ? [V] : [],
150
- "onClick:action": t[0] || (t[0] = () => _())
151
- }, null, 8, ["title", "actions"]),
152
- n("div", pe, [
153
- i(le),
154
- i(c, {
155
- modelValue: a(r).searchKey,
156
- "onUpdate:modelValue": t[1] || (t[1] = (o) => a(r).searchKey = o),
157
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
158
- placeholder: a(s)("connect.campaign.common.search"),
159
- collapsible: ""
160
- }, null, 8, ["modelValue", "placeholder"]),
161
- a(p).campaigns.broadcast && a(p).campaigns.broadcast.length > 0 ? (d(), w(v, { key: 0 }, [
162
- n("div", ue, [
163
- n("div", fe, [
164
- i(re, {
165
- label: `${a(s)("connect.campaign.common.location")}: `,
166
- "right-icon": "keyboard_arrow_down",
167
- modelValue: a(r).location,
168
- "onUpdate:modelValue": t[2] || (t[2] = (o) => a(r).location = o),
169
- icon: "storefront",
170
- "show-item-label": !0,
171
- items: a(I).locationOptions
172
- }, null, 8, ["label", "modelValue", "items"])
173
- ]),
174
- i(c, {
175
- modelValue: a(r).searchKey,
176
- "onUpdate:modelValue": t[3] || (t[3] = (o) => a(r).searchKey = o),
177
- class: "xs:hidden sm:hidden",
178
- placeholder: "search",
179
- collapsible: ""
180
- }, null, 8, ["modelValue"])
181
- ]),
182
- i(N, {
183
- class: "xs:hidden sm:hidden",
184
- "row-data": a(g),
185
- "column-defs": $,
186
- "search-value": a(r).searchKey,
187
- "column-filter": [],
188
- onRowClick: t[4] || (t[4] = (o) => _(o.original)),
189
- "hide-footer": !0
190
- }, null, 8, ["row-data", "search-value"]),
191
- i(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
192
- default: S(() => [
193
- (d(!0), w(v, null, J(a(g).filter(
194
- (o) => o.name.toLowerCase().includes(a(r).searchKey.toLowerCase())
195
- ), (o) => (d(), x(U, {
196
- key: o._id.toString(),
197
- onClick: (h) => _(o),
198
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
199
- }, {
200
- default: S(() => [
201
- n("div", ge, [
202
- n("div", ye, [
203
- (d(), x(Q(a(L)(o)))),
204
- n("div", _e, u(o.currentReceive ?? 0) + " sent ", 1)
205
- ]),
206
- n("div", he, [
207
- n("div", we, u(o.name), 1),
208
- n("div", be, u(a(O)(o)), 1)
209
- ])
210
- ]),
211
- n("div", Ce, [
212
- i(b, {
213
- icon: "content_copy",
214
- "icon-color": "neutral-gray-400",
215
- variant: "tertiary",
216
- onClick: async (h) => {
217
- h.stopPropagation(), await D(o);
218
- }
219
- }, null, 8, ["onClick"]),
220
- i(b, {
221
- icon: "delete",
222
- "icon-color": "neutral-gray-400",
223
- variant: "tertiary",
224
- onClick: (h) => (h.stopPropagation(), F(o))
225
- }, null, 8, ["onClick"])
226
- ])
227
- ]),
228
- _: 2
229
- }, 1032, ["onClick"]))), 128))
230
- ]),
231
- _: 1
232
- }),
233
- a(g).length == 0 ? (d(), w("div", ve, [
234
- n("div", Se, u(a(s)("connect.campaign.common.noResults")), 1)
235
- ])) : W("", !0)
236
- ], 64)) : (d(), x(H, {
237
- key: 1,
238
- variant: "outlined",
239
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
240
- }, {
241
- default: S(() => [
242
- t[6] || (t[6] = n("img", {
243
- src: X,
244
- class: "aspect-square w-[150px]"
245
- }, null, -1)),
246
- n("div", xe, [
247
- n("div", ke, u(a(s)("connect.campaign.broadcast.create.title")), 1),
248
- n("div", Ae, u(a(s)("connect.campaign.broadcast.create.description")), 1)
249
- ]),
250
- i(b, {
251
- variant: "primary",
252
- label: a(s)("connect.campaign.broadcast.create.button"),
253
- icon: "add",
254
- onClick: t[5] || (t[5] = (o) => _())
255
- }, null, 8, ["label"])
256
- ]),
257
- _: 1
258
- })),
259
- i(me, {
260
- ref_key: "sheetRef",
261
- ref: y,
262
- "onSubmit:modelValue": j
263
- }, null, 512)
264
- ])
265
- ], 64);
266
- };
267
- }
268
- });
269
- export {
270
- Ee as default
271
- };