@feedmepos/mf-connect 0.1.111-prod → 0.1.113-beta.3

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 (162) hide show
  1. package/README.md +66 -1
  2. package/dist/{App-D3pYl3WL.js → App-YfpYV7C0.js} +738 -689
  3. package/dist/AuditLogs-kD0_HO_p.js +2016 -0
  4. package/dist/{Bin-DOZqpbYH.js → Bin-Dr-Xp3pn.js} +8 -8
  5. package/dist/Broadcast-CEbHu2xA.js +306 -0
  6. package/dist/{CampaignAnalytic-cFKvCgxX.js → CampaignAnalytic-DDiGxPwp.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B0eVEubS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js} +49 -32
  8. package/dist/Card-BUnwg0eM.js +1086 -0
  9. package/dist/{Collections-9QK5hbLo.js → Collections-CKyBkKq2.js} +197 -185
  10. package/dist/{Credit-8Ouy4O9a.js → Credit-CJOXWLV1.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CJA-yunY.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Dv0q3B8m.js → EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js} +32 -32
  14. package/dist/{Experience-DMh4hR1S.js → Experience-C_Am5CTY.js} +32 -31
  15. package/dist/{FileSaver.min-Bx9mdUgJ.js → FileSaver.min-CueAGbjq.js} +1 -1
  16. package/dist/{Game-CL0TZvg1.js → Game-B6GO_LVU.js} +19 -18
  17. package/dist/GiftCardSetup-CVLDDpI2.js +748 -0
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Bz5kIfoM.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js} +7 -7
  19. package/dist/{Goals-Dz5Vp-lj.js → Goals-BX-sMV2V.js} +4 -4
  20. package/dist/Grab-Bh335Srh.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CaPDI3vY.js → ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js} +1 -1
  22. package/dist/{Index-kH8aAegB.js → Index-CyXRbwcm.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CFrgC3Ka.js → LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DPIFLdBc.js → LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js} +1 -1
  25. package/dist/{LoyaltyDashboard-BBxEoWol.js → LoyaltyDashboard-DrTq8oiu.js} +15 -15
  26. package/dist/MainLayout-KbKkpX5n.js +4 -0
  27. package/dist/{MainLayout-2BLwDyHQ.js → MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js} +5 -4
  28. package/dist/{Marketing-C4OnSV-c.js → Marketing-DQT1MWQg.js} +4 -4
  29. package/dist/MarketingMaterialEdit-fSqr53-M.js +1037 -0
  30. package/dist/{Member-CT9WwxP0.js → Member-DwDUCzlv.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C7yznkUn.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js} +43 -49
  32. package/dist/{MemberImportHistory-B__BFID7.js → MemberImportHistory-D4ezvJGZ.js} +7 -7
  33. package/dist/{MemberList-DgLI4wty.js → MemberList-DFieV7Qk.js} +103 -105
  34. package/dist/{MemberTransactions-UFx_DZYe.js → MemberTransactions-BPOXyAuC.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BFjZA8Y6.js → MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js} +4821 -4690
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Df9bxbUl.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js} +1 -1
  37. package/dist/{Mission-CawzGzDu.js → Mission-nErb05Es.js} +22 -21
  38. package/dist/{Overview-D19oSo24.js → Overview-7G31a7B-.js} +58 -56
  39. package/dist/{Overview-CAtTlEVa.js → Overview-DuJr_hAg.js} +145 -144
  40. package/dist/{Point-BPAGmKAj.js → Point-PWDLemD4.js} +22 -21
  41. package/dist/{Promotion-B0Uf9vjL.js → Promotion-N80Tj8M6.js} +137 -131
  42. package/dist/{Queue-CJEAFss_.js → Queue-M7ZpgiMT.js} +49 -47
  43. package/dist/{Record-s6hSQG2P.js → Record-NhxrdvWv.js} +9 -9
  44. package/dist/{Review-DhNCbAOm.js → Review-DiAaAzIG.js} +2 -2
  45. package/dist/ReviewFacebookCallback-JdyxFbNl.js +225 -0
  46. package/dist/{ReviewGoogleCallback-D8ENWii2.js → ReviewGoogleCallback-BXbI3Bsh.js} +5 -5
  47. package/dist/{Reward-BT00QsXL.js → Reward-yTaOqOT8.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DaZDGhbm.js → RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js} +26 -24
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js +1923 -0
  50. package/dist/{Segment-BuGhX9zg.js → Segment-DE9Bcd6R.js} +287 -287
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DB718_4P.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js} +37 -35
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CkgXxy0C.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js} +4 -4
  53. package/dist/Setting-C0JAxIRT.js +574 -0
  54. package/dist/{SettingAdvertisements-aqFErKAr.js → SettingAdvertisements-DxueyKU8.js} +12 -12
  55. package/dist/Settings-Cs46AcxZ.js +286 -0
  56. package/dist/Store-DqQae9nE.js +2629 -0
  57. package/dist/{StoreRewards-D2pTL2oA.js → StoreRewards-JxSUsOzJ.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js +7007 -0
  60. package/dist/{Tier-OyE8oH2r.js → Tier-DWhgWush.js} +2576 -686
  61. package/dist/{Title-DAl7CKL_.js → Title-DUNeMdz8.js} +104 -101
  62. package/dist/Transaction-DAv-LVhC.js +45 -0
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C0yHxQVr.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js} +26 -26
  64. package/dist/{Voucher-D2QGWSxs.js → Voucher-uLTq9RSK.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bt2YB745.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js} +16 -16
  66. package/dist/WhatsappAccount-BpXQ4q0P.js +158 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js +39 -0
  68. package/dist/WhatsappBot-DB4NRZMd.js +589 -0
  69. package/dist/WhatsappBotLogs-DDN4H_bv.js +372 -0
  70. package/dist/WhatsappBotSettings-Bkv1VNwF.js +387 -0
  71. package/dist/WhatsappBotTickets-DAKgnE6T.js +162 -0
  72. package/dist/WhatsappLayout-DSnq84Uo.js +21 -0
  73. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +195 -0
  74. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzCL64Jo.js → ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js} +2 -2
  75. package/dist/{app-QxosLNkH.js → app-Devzv4gO.js} +12854 -9732
  76. package/dist/app.js +4 -3
  77. package/dist/base.export-CCSMkvAm.js +75 -0
  78. package/dist/browser-BSAOEeIM.js +1478 -0
  79. package/dist/{business-CbqG6NXr.js → business-BjAmUqNA.js} +1 -1
  80. package/dist/campaign-C5c47GqT.js +400 -0
  81. package/dist/{campaign-Rj7oDBnN.js → campaign-CTe-T5Gd.js} +31 -25
  82. package/dist/{campaign.enum-B7vdNYKd.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  83. package/dist/campaign.fn-DxAO8A5b.js +776 -0
  84. package/dist/{collectible.enum-BsQseg7-.js → collectible.enum-Liy2wH3s.js} +1 -1
  85. package/dist/{collection.fn-EbUIyB1X.js → collection.fn-C9l-OtNt.js} +2 -2
  86. package/dist/currency-mwm4AWXK.js +7 -0
  87. package/dist/duplicateCampaign-BbC4AwQ1.js +51 -0
  88. package/dist/{effect-B_91OlcX.js → effect-D8ba9z0K.js} +1 -1
  89. package/dist/{email-addresses-DXnYZG-e.js → email-addresses-BR5J6_Jz.js} +2 -2
  90. package/dist/feature-flag-C-5NdFW8.js +868 -0
  91. package/dist/feature-flag-CNcU4_3r.js +50 -0
  92. package/dist/google-BQK68wbe.js +5 -0
  93. package/dist/{helper-_uhiXya1.js → helper-D9cEaMIv.js} +1 -1
  94. package/dist/index-0H82-X0n.js +80 -0
  95. package/dist/{index-Cp7oHMm3.js → index-B1jP-_Z_.js} +691 -229
  96. package/dist/{index-BZ2b0Pk6.js → index-B7HH6vKF.js} +8 -7
  97. package/dist/{index-tbo0pMIu.js → index-BFaZp6Et.js} +29 -15
  98. package/dist/index-B_gzo75q.js +53 -0
  99. package/dist/{index-DlQJZNwD.js → index-BfoDdVQS.js} +22 -6
  100. package/dist/{index-CDm0BWa3.js → index-BvY2hQac.js} +1 -1
  101. package/dist/index-Byg4ztr-.js +902 -0
  102. package/dist/{index-BWgc2-Qz.js → index-CZfqqrVu.js} +4 -3
  103. package/dist/index-C_H8jFYf.js +2743 -0
  104. package/dist/{index-xuFTeVrb.js → index-CmzjBrHR.js} +11 -9
  105. package/dist/{index-BBihP1s2.js → index-Ct6YjTIW.js} +2 -2
  106. package/dist/{index-Df4l6y-S.js → index-D34iYRdc.js} +1900 -2121
  107. package/dist/{index-DuhRCI0L.js → index-D4k1G2oE.js} +4 -4
  108. package/dist/{index-uuNGb1nv.js → index-DnepoNWn.js} +8028 -10766
  109. package/dist/index-Drmh0FT-.js +14571 -0
  110. package/dist/{index-DlGnYR5y.js → index-DtcUCknS.js} +2700 -2613
  111. package/dist/{index-C_1iqF1Q.js → index-DwTBiVts.js} +1 -1
  112. package/dist/{index-CWUmrVo_.js → index-OvnHt5x5.js} +800 -793
  113. package/dist/index-RwNlbTO8.js +115 -0
  114. package/dist/{index-CzYxnDWP.js → index-VqAbYyHH.js} +11 -6
  115. package/dist/{index-DzBzClHP.js → index-yGSko6Eq.js} +1 -1
  116. package/dist/{index.esm2017-B72iWwk_.js → index.esm2017-DLb2VyCT.js} +156 -156
  117. package/dist/{loading-rIhCiB_S.js → loading-CUNk5u1d.js} +1 -1
  118. package/dist/{lodash-B6fOjfjd.js → lodash-BJXravls.js} +1 -1
  119. package/dist/{member-import-CbHn7zss.js → member-import-DjYoddBi.js} +6 -5
  120. package/dist/{membership-DkJN7jyQ.js → membership-ByJUFP8f.js} +3 -3
  121. package/dist/{money-ChbDx6Nq.js → money-Bf2IEMJJ.js} +1 -1
  122. package/dist/{number-9TEd27Ku.js → number-CRBHrRUL.js} +1 -1
  123. package/dist/objectid-58gyOvdR.js +145 -0
  124. package/dist/{onboarding-BN3MKVRs.js → onboarding-CQ3lw7eY.js} +25 -25
  125. package/dist/{onboardingSetup-D9xhdgS3.js → onboardingSetup-CsdZKGFk.js} +2 -2
  126. package/dist/{plugins-CCibSJZa.js → plugins-iTZLbJGy.js} +3 -3
  127. package/dist/{MarketingMaterialEdit-DFhpsI2-.js → remy-icon-BhUGu2NI.js} +2 -1031
  128. package/dist/{reward-DjasF-NL.js → reward-DTN6JpEd.js} +1 -1
  129. package/dist/{rule-DqeChj0e.js → rule-BYACNQOL.js} +572 -492
  130. package/dist/style.css +1 -1
  131. package/dist/template--Vr0PCjB.js +188 -0
  132. package/dist/{timezone-D0nC1LDx.js → timezone-DwzjOED-.js} +1 -1
  133. package/dist/{transaction.fn-BkF4Ad2z.js → transaction.fn-DapYe3n7.js} +2 -2
  134. package/dist/{trigger-CxpXoQJO.js → trigger-D8r76yb0.js} +18 -18
  135. package/dist/{useMarketingMaterialActions-p0-fyMkm.js → useMarketingMaterialActions-CdMmibPE.js} +3 -3
  136. package/dist/{usePagination-CrC-1v4L.js → usePagination-BRcQJkO1.js} +1 -1
  137. package/dist/useWhatsappAccount-BOJ8fz84.js +62 -0
  138. package/dist/{user-CrylHgF1.js → user-vBZFKqXQ.js} +1 -1
  139. package/dist/vue-i18n-Cw6fF11e.js +2365 -0
  140. package/dist/{xlsx-CJNYF7-l.js → xlsx-Muy_Rjhk.js} +440 -440
  141. package/dist/{zod-Dzn9S95S.js → zod-CCPTOeUz.js} +1 -1
  142. package/package.json +12 -3
  143. package/dist/Broadcast-DZ4SP99P.js +0 -271
  144. package/dist/Card-B5ni027Q.js +0 -911
  145. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYxswo-Z.js +0 -2430
  146. package/dist/ReviewFacebookCallback-DeZqcpJo.js +0 -238
  147. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BvxbKSkB.js +0 -1882
  148. package/dist/Setting-BOWPp05N.js +0 -2036
  149. package/dist/Settings-DekXvE-R.js +0 -179
  150. package/dist/Store-DpVlMuau.js +0 -1998
  151. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNDv6eiZ.js +0 -1009
  152. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C-C3RSeW.js +0 -142
  153. package/dist/Transaction-mvKzTgLx.js +0 -39
  154. package/dist/campaign-Co4Lq-Wz.js +0 -228
  155. package/dist/campaign.fn-DolD3lYJ.js +0 -776
  156. package/dist/export-D0hWZSfH.js +0 -97
  157. package/dist/google-C3S8u0mT.js +0 -4
  158. package/dist/index-aCuOvuEC.js +0 -45
  159. package/dist/objectid-CGol1NeA.js +0 -145
  160. package/dist/rule-builder-DT854ycI.js +0 -102
  161. package/dist/template-BeCVA0-N.js +0 -236
  162. package/dist/vue-i18n-BjtkXdmG.js +0 -2365
@@ -1,4 +1,4 @@
1
- import { i as Z } from "./plugins-CCibSJZa.js";
1
+ import { i as Z } from "./plugins-iTZLbJGy.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.111-prod",
3
+ "version": "0.1.113-beta.3",
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-CCibSJZa.js";
5
- import { u as ee } from "./loading-rIhCiB_S.js";
6
- import { u as te } from "./business-CbqG6NXr.js";
7
- import { u as ae } from "./campaign-Rj7oDBnN.js";
8
- import { a as L, b as O, g as oe } from "./campaign-Co4Lq-Wz.js";
9
- import { u as ne, c as se, p as ce } from "./template-BeCVA0-N.js";
10
- import { u as ie } from "./vue-i18n-BjtkXdmG.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-BFjZA8Y6.js";
13
- import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYxswo-Z.js";
14
- import { u as de } from "./onboardingSetup-D9xhdgS3.js";
15
- import { c as f } from "./index-CzYxnDWP.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
- };