@feedmepos/mf-connect 0.1.98-beta.6 → 0.1.98-beta.60

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 (147) hide show
  1. package/dist/{App-CvJ0ASlp.js → App-BUwQLdzG.js} +812 -666
  2. package/dist/{AuditLogs-Bt9S2LKL.js → AuditLogs-laNQB1ef.js} +14 -13
  3. package/dist/{Bin-ZSCDSioa.js → Bin-Bfboeea_.js} +8 -8
  4. package/dist/{Broadcast-BT0R11RB.js → Broadcast-CDz-_eDz.js} +40 -37
  5. package/dist/CampaignAnalytic-BiA-5XG3.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-LweQ57aG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VrTN-c_a.js} +6 -5
  7. package/dist/Card-CKHaW8N7.js +1084 -0
  8. package/dist/{Collections-H7zhe9zN.js → Collections-DRocQb1D.js} +14 -13
  9. package/dist/Credit-DWaoVhSP.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-B7ZdULCu.js +53 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B2sZFWUF.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-3ERieT1j.js} +54 -52
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-qNmiKaJc.js → EffectSheet.vue_vue_type_style_index_0_lang-yDUjXV2O.js} +35 -35
  13. package/dist/{Experience-CH5tg-tm.js → Experience-C1_LpneJ.js} +112 -86
  14. package/dist/{FileSaver.min-DNFqiyZb.js → FileSaver.min-CWJ-6CFP.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-DtTYcSZk.js +356 -0
  17. package/dist/GiftCardSetup-B770Rl1Q.js +662 -0
  18. package/dist/{Grab-3s_sLewD.js → Grab-CN0gmIxT.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fbmoN1e9.js → ImageInput.vue_vue_type_script_setup_true_lang-BaAhKWhX.js} +1 -1
  20. package/dist/{Index-zTWZCiEo.js → Index-0F6aq3f9.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BOxYPkf5.js → LocationPicker.vue_vue_type_script_setup_true_lang-BrKj8W2H.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-wjJ_cwft.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DOuHSVdR.js} +1 -1
  23. package/dist/LoyaltyDashboard-CtXyDFqa.js +2865 -0
  24. package/dist/MainLayout-BSWLr3gE.js +143 -0
  25. package/dist/{Marketing-Bto1OvK1.js → Marketing-Ci2haxRd.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-D7rIqF5U.js → MarketingMaterialEdit-Cw6R0bNM.js} +15 -14
  27. package/dist/Member-DEzSTAQy.js +649 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-BrhSxbrI.js +1287 -0
  29. package/dist/MemberImportHistory-BGfNLzma.js +187 -0
  30. package/dist/MemberList-Cq5Gsv3G.js +336 -0
  31. package/dist/{MemberTransactions-CjTtGB2y.js → MemberTransactions-BrUVZRtt.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DvKL7BL5.js → MessageInput.vue_vue_type_script_setup_true_lang-DCQ6Fse-.js} +5434 -5279
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CETwYfZD.js +40 -0
  34. package/dist/Mission-Do4IonLo.js +360 -0
  35. package/dist/{Overview-mxGLyFvE.js → Overview-DA90l9Kb.js} +21 -20
  36. package/dist/Overview-DN-nJxw9.js +1316 -0
  37. package/dist/Point-DQ4w857n.js +288 -0
  38. package/dist/Promotion-Rgt9LcYi.js +423 -0
  39. package/dist/{Queue-DgaFyyyH.js → Queue-SzypUxgD.js} +14 -13
  40. package/dist/{Record-BRol__6_.js → Record-DYvPPhIW.js} +9 -9
  41. package/dist/Review-B0TERyHM.js +45 -0
  42. package/dist/ReviewFacebookCallback-BJ5jQ3Dv.js +238 -0
  43. package/dist/ReviewGoogleCallback-BKQD39dv.js +213 -0
  44. package/dist/{Reward-DQI0PvmR.js → Reward-BexlVT_C.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B6bvQNsU.js → RewardGroup.vue_vue_type_script_setup_true_lang-C-ygqNur.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DgAU7jGo.js → RuleGroup.vue_vue_type_script_setup_true_lang-DjxIJcdv.js} +103 -109
  47. package/dist/{Segment-DFaLx0QZ.js → Segment-CYa4GjtQ.js} +30 -29
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cpb2i9iV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b-K-VDJC.js} +31 -30
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-MvoepHn9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-t2mlDDtn.js} +4 -4
  50. package/dist/{Setting-D2NjFJvq.js → Setting-Dmm5BKdF.js} +14 -14
  51. package/dist/{SettingAdvertisements-CPWgSMaA.js → SettingAdvertisements-cy4cRBop.js} +12 -12
  52. package/dist/Settings-DMQuLDM4.js +230 -0
  53. package/dist/Store-B7KflfSk.js +2612 -0
  54. package/dist/{StoreRewards-Ccj12pyq.js → StoreRewards-BKae8uZn.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-sbIR-k1R.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CfWTn0Xd.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DRT3N9SD.js} +2 -2
  57. package/dist/{Tier-vaJoohiM.js → Tier-BeTz6LHH.js} +2296 -750
  58. package/dist/{Title-BqHC7-v9.js → Title-OEVVw5I-.js} +39 -37
  59. package/dist/Transaction-D-MZjntW.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Dporb9KE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-xIEOUOdo.js} +26 -26
  61. package/dist/{Voucher-DeN6C6DQ.js → Voucher-BJCf3pSa.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-De16fuC4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BFQ_CYub.js} +115 -121
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DAC-j0Ln.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGDw3Too.js} +2 -2
  64. package/dist/{app-n4Y2jMee.js → app-J8VIC7-H.js} +29852 -25997
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-HYFFI4OS.js +75 -0
  67. package/dist/{business-jn-_l48y.js → business-BonuheMK.js} +5 -5
  68. package/dist/{campaign-rgDnocfT.js → campaign-7CI7gfS5.js} +74 -96
  69. package/dist/campaign-Ct7jhugP.js +100 -0
  70. package/dist/{campaign.enum-C9HvoKuq.js → campaign.enum-OzJ9IbAW.js} +1 -1
  71. package/dist/{campaign.fn-D21ettpH.js → campaign.fn-CDjxE9B2.js} +99 -99
  72. package/dist/{collectible.enum-_HVU4lWn.js → collectible.enum-Dw_tlI9E.js} +1 -1
  73. package/dist/collection.fn-CER0_NEn.js +26 -0
  74. package/dist/currency-CTUS4vS8.js +7 -0
  75. package/dist/{duplicateCampaign-gzVwrnWb.js → duplicateCampaign-CMQ-RMH-.js} +11 -11
  76. package/dist/{effect-DhpIv1L3.js → effect-DBeGoMNE.js} +1 -1
  77. package/dist/{email-addresses-DPxYLSoa.js → email-addresses-BH3mQzan.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-WYHUnHVy.js → helper-DJe_JbKJ.js} +1 -1
  80. package/dist/{index-BdnHQSDd.js → index-B14H1rLW.js} +5 -4
  81. package/dist/{index-7HizF3GI.js → index-BOVnM3gL.js} +1588 -1522
  82. package/dist/{index-Cvfavr2M.js → index-BRCB6yJ6.js} +232 -200
  83. package/dist/{index-BPsofsGt.js → index-BZKKS7jO.js} +1933 -2560
  84. package/dist/{index-BuLfxJyC.js → index-BlwAgY_z.js} +105 -123
  85. package/dist/index-BmN_Qcw7.js +151 -0
  86. package/dist/index-Bnk3vdb-.js +72 -0
  87. package/dist/index-BzVTqlVH.js +137 -0
  88. package/dist/{index--fNMSXUf.js → index-CEDhjZzd.js} +1 -1
  89. package/dist/{index-BdqRrCt8.js → index-CM9GTQIo.js} +5 -5
  90. package/dist/index-CN8VyVEB.js +53 -0
  91. package/dist/{index-Cte6dHHy.js → index-COuceEFz.js} +14 -14
  92. package/dist/{index-BN-FP9kx.js → index-CWR2s6Nt.js} +1 -1
  93. package/dist/index-CrMBqkKk.js +897 -0
  94. package/dist/{index-xao4ggML.js → index-D9f3AIaO.js} +5 -5
  95. package/dist/index-Do36kJeb.js +51 -0
  96. package/dist/{index-C-5YgmkC.js → index-bGByr1XM.js} +7 -5
  97. package/dist/{index-DUTFNEn9.js → index-bJX4zgh0.js} +4 -4
  98. package/dist/{index.esm2017-CjzFPUCa.js → index.esm2017-BpCPgTjc.js} +128 -128
  99. package/dist/{loading-CojnK00V.js → loading-D_rPJ-Yc.js} +1 -1
  100. package/dist/{lodash-CLkg5jTT.js → lodash-BM976Z2I.js} +1 -1
  101. package/dist/member-import-C5rhD3f8.js +187 -0
  102. package/dist/membership-CIQCEKiL.js +274 -0
  103. package/dist/{money-CyaLaEKo.js → money-BrMT193t.js} +1 -1
  104. package/dist/{number-DEtI4bEX.js → number-DOcD1tqL.js} +1 -1
  105. package/dist/objectid-CAdRRoFu.js +145 -0
  106. package/dist/{plugins-MnP1vCcg.js → plugins-696Z9K6A.js} +3 -3
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-Dk3D26xC.js → reward-lSVIBiE9.js} +1 -1
  109. package/dist/{rule-B1Agad1n.js → rule-BUGAimk8.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-DpqLCq1p.js → template-01_h2Gac.js} +6 -6
  112. package/dist/timezone-okTdM2YU.js +20 -0
  113. package/dist/transaction.fn-Nz0T33ex.js +64 -0
  114. package/dist/{trigger-cwPN-4Ia.js → trigger-CKj1X6zs.js} +17 -17
  115. package/dist/useMarketingMaterialActions-yKqKaPpe.js +96 -0
  116. package/dist/{usePagination-D8zBMxdJ.js → usePagination-D6cYlfni.js} +1 -1
  117. package/dist/{user-EUGwaL2f.js → user-DX5qCQfz.js} +1 -1
  118. package/dist/{vue-i18n-BBj45p9N.js → vue-i18n-DowpocqN.js} +204 -204
  119. package/dist/{xlsx-DiMIlKmu.js → xlsx-Dv4SuJbw.js} +1 -1
  120. package/dist/{zod-B1cU167C.js → zod-DVw24Ejy.js} +1 -1
  121. package/package.json +6 -5
  122. package/dist/Card-Wdh8lyUv.js +0 -910
  123. package/dist/Credit-BuKLrFtM.js +0 -260
  124. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  125. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  126. package/dist/Game-C9s4qZz4.js +0 -330
  127. package/dist/LoyaltyDashboard-tOOk6zvV.js +0 -1082
  128. package/dist/MainLayout-iWi1DzXS.js +0 -41
  129. package/dist/Member-BdgdT-sa.js +0 -280
  130. package/dist/MemberList-DBIE-RWC.js +0 -1601
  131. package/dist/Mission-CWR6FBvN.js +0 -334
  132. package/dist/Point-BIt82fJk.js +0 -262
  133. package/dist/Promotion-Cl1vPi0B.js +0 -397
  134. package/dist/Review-DmV2YnFd.js +0 -1076
  135. package/dist/ReviewFacebookCallback-B5XgAWXo.js +0 -243
  136. package/dist/ReviewGoogleCallback-CYR03Wfd.js +0 -208
  137. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CAImd3yc.js +0 -181
  138. package/dist/Store-DjUe8ady.js +0 -1996
  139. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B7w69A3j.js +0 -1130
  140. package/dist/Transaction-BOmDOGnD.js +0 -39
  141. package/dist/campaign-BnI7-ceP.js +0 -219
  142. package/dist/export-CWAxYj7W.js +0 -97
  143. package/dist/index-B6EBgIUx.js +0 -85
  144. package/dist/index-CxR1baaG.js +0 -52
  145. package/dist/membership-CeX8E_I9.js +0 -255
  146. package/dist/objectid-CMau7CW-.js +0 -145
  147. package/dist/useMarketingMaterialActions-CGzfJ68e.js +0 -107
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as V, openBlock as r, createBlock as C, resolveDynamicComponent as B, unref as e, ref as E, computed as j, onMounted as P, resolveComponent as d, withCtx as u, createElementVNode as l, createElementBlock as w, createVNode as a, normalizeClass as k, createTextVNode as S, toDisplayString as f, Fragment as L, renderList as N, createCommentVNode as q } from "vue";
2
- import { u as J } from "./campaign-BnI7-ceP.js";
2
+ import { u as J } from "./campaign-Ct7jhugP.js";
3
3
  import { useDialog as M } from "@feedmepos/ui-library";
4
- import { F as A } from "./index-Cvfavr2M.js";
5
- import { _ as G } from "./lodash-CLkg5jTT.js";
6
- import { C as H } from "./campaign-rgDnocfT.js";
4
+ import { F as A } from "./index-BRCB6yJ6.js";
5
+ import { _ as G } from "./lodash-BM976Z2I.js";
6
+ import { C as H } from "./campaign-7CI7gfS5.js";
7
7
  import { J as K } from "./JsonViewer-v8_C7l5N.js";
8
- import { u as Q } from "./vue-i18n-BBj45p9N.js";
9
- import { u as R } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-B2sZFWUF.js";
8
+ import { u as Q } from "./vue-i18n-DowpocqN.js";
9
+ import { u as R } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-3ERieT1j.js";
10
10
  const U = /* @__PURE__ */ V({
11
11
  __name: "CampaignChip",
12
12
  props: {
@@ -0,0 +1,20 @@
1
+ import { e as a } from "./index-B14H1rLW.js";
2
+ const n = {
3
+ [a.F_COUNTRY.enum.MY]: "Asia/Kuala_Lumpur",
4
+ [a.F_COUNTRY.enum.SG]: "Asia/Singapore",
5
+ JP: "Asia/Tokyo",
6
+ AE: "Asia/Dubai",
7
+ AU: "Australia/Sydney",
8
+ [a.F_COUNTRY.enum.TH]: "Asia/Bangkok",
9
+ [a.F_COUNTRY.enum.ID]: "Asia/Jakarta",
10
+ [a.F_COUNTRY.enum.BN]: "Asia/Brunei",
11
+ [a.F_COUNTRY.enum.MO]: "Asia/Macau",
12
+ [a.F_COUNTRY.enum.MV]: "Indian/Maldives",
13
+ [a.F_COUNTRY.enum.PK]: "Asia/Karachi",
14
+ [a.F_COUNTRY.enum.VN]: "Asia/Ho_Chi_Minh",
15
+ GB: "Europe/London",
16
+ MA: "Africa/Casablanca"
17
+ };
18
+ export {
19
+ n as C
20
+ };
@@ -0,0 +1,64 @@
1
+ import { s as p } from "./index-bJX4zgh0.js";
2
+ function u(e) {
3
+ let l = "";
4
+ switch (e) {
5
+ case "PORTAL":
6
+ l = "ADMIN";
7
+ break;
8
+ case "BENEFIT":
9
+ l = "MEMBERSHIP";
10
+ break;
11
+ case "ORDER":
12
+ l = "ORDER";
13
+ break;
14
+ case "BILL":
15
+ l = "SPENDING";
16
+ break;
17
+ case "CASHBACK":
18
+ l = "CASHBACK";
19
+ break;
20
+ case "CYCLE":
21
+ l = "EXPIRED";
22
+ break;
23
+ case "COUNTER_CONSUME":
24
+ l = "COUNTER REDEEM";
25
+ break;
26
+ default:
27
+ l = e;
28
+ break;
29
+ }
30
+ return l;
31
+ }
32
+ function b(e) {
33
+ var l, c, r, E, t, f;
34
+ switch ((l = e == null ? void 0 : e.pf_collectible) == null ? void 0 : l.type) {
35
+ case "VOUCHER":
36
+ return `${(c = e.pf_collectible) == null ? void 0 : c.type} (${(r = e.pf_collectible) == null ? void 0 : r.name})`;
37
+ case "TITLE":
38
+ return `${(E = e.pf_collectible) == null ? void 0 : E.type} (${(t = e.pf_collectible) == null ? void 0 : t.name})`;
39
+ case "POINT":
40
+ return "Experience";
41
+ case "COIN":
42
+ return "Point";
43
+ default:
44
+ return p((f = e == null ? void 0 : e.pf_collectible) == null ? void 0 : f.type);
45
+ }
46
+ }
47
+ function C(e) {
48
+ switch (e) {
49
+ case "ONLINE":
50
+ return "Online";
51
+ case "COIN":
52
+ return "Point";
53
+ default:
54
+ return e;
55
+ }
56
+ }
57
+ const O = {
58
+ getReason: u,
59
+ formattedType: b,
60
+ formattedPaymentType: C
61
+ };
62
+ export {
63
+ O as T
64
+ };
@@ -1,10 +1,10 @@
1
- import { defineComponent as c, openBlock as u, createBlock as p, unref as r } from "vue";
2
- import "./index-7HizF3GI.js";
3
- import { R as i } from "./index-Cvfavr2M.js";
4
- import { _ as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DgAU7jGo.js";
5
- import { m as e, K as d } from "./index-BPsofsGt.js";
6
- import { i as n } from "./plugins-MnP1vCcg.js";
7
- const L = /* @__PURE__ */ c({
1
+ import { defineComponent as m, openBlock as u, createBlock as p, unref as r } from "vue";
2
+ import "./index-BOVnM3gL.js";
3
+ import { R as i } from "./index-BRCB6yJ6.js";
4
+ import { a as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DjxIJcdv.js";
5
+ import { c as e, C as d } from "./index-CrMBqkKk.js";
6
+ import { i as n } from "./plugins-696Z9K6A.js";
7
+ const L = /* @__PURE__ */ m({
8
8
  __name: "BillRuleGroup",
9
9
  props: {
10
10
  modelValue: {
@@ -22,18 +22,18 @@ const L = /* @__PURE__ */ c({
22
22
  "include-only": "bill",
23
23
  "trigger-type": "BILL_COMPLETED",
24
24
  "model-value": ((g = t.modelValue) == null ? void 0 : g.rules.g_bill) ?? r(i).scaffoldGroup("g_bill"),
25
- "onUpdate:modelValue": l[0] || (l[0] = (m) => a(
25
+ "onUpdate:modelValue": l[0] || (l[0] = (c) => a(
26
26
  "update:model-value",
27
27
  r(i).setRuleToGroup(
28
28
  t.modelValue ?? r(i).scaffoldGroup(),
29
- m,
29
+ c,
30
30
  "&&"
31
31
  )
32
32
  ))
33
33
  }, null, 8, ["model-value"]);
34
34
  };
35
35
  }
36
- }), O = /* @__PURE__ */ c({
36
+ }), O = /* @__PURE__ */ m({
37
37
  __name: "FeedbackRuleGroup",
38
38
  props: {
39
39
  modelValue: {
@@ -51,18 +51,18 @@ const L = /* @__PURE__ */ c({
51
51
  "include-only": "feedback",
52
52
  "trigger-type": "FEEDBACK",
53
53
  "model-value": ((g = t.modelValue) == null ? void 0 : g.rules.g_feedback) ?? r(i).scaffoldGroup("g_feedback"),
54
- "onUpdate:modelValue": l[0] || (l[0] = (m) => a(
54
+ "onUpdate:modelValue": l[0] || (l[0] = (c) => a(
55
55
  "update:model-value",
56
56
  r(i).setRuleToGroup(
57
57
  t.modelValue ?? r(i).scaffoldGroup(),
58
- m,
58
+ c,
59
59
  "&&"
60
60
  )
61
61
  ))
62
62
  }, null, 8, ["model-value"]);
63
63
  };
64
64
  }
65
- }), _ = {
65
+ }), R = {
66
66
  [e.enum.BILL_COMPLETED]: {
67
67
  get name() {
68
68
  return n.global.t(
@@ -185,7 +185,7 @@ const L = /* @__PURE__ */ c({
185
185
  value: e.enum.ISSUE_REWARD,
186
186
  hidden: !0
187
187
  }
188
- }, b = Object.fromEntries(
188
+ }, C = Object.fromEntries(
189
189
  [
190
190
  "VOUCHER",
191
191
  "PROMOTION",
@@ -201,13 +201,13 @@ const L = /* @__PURE__ */ c({
201
201
  const o = d[t];
202
202
  return [
203
203
  t,
204
- (o == null ? void 0 : o.map((a) => _[a]).filter((a) => !a.hidden)) ?? []
204
+ (o == null ? void 0 : o.map((a) => R[a]).filter((a) => !a.hidden)) ?? []
205
205
  ];
206
206
  })
207
207
  );
208
208
  export {
209
- b as T,
209
+ C as T,
210
210
  L as _,
211
- _ as a,
211
+ R as a,
212
212
  O as b
213
213
  };
@@ -0,0 +1,96 @@
1
+ import { S as o, g as c, b } from "./index-B14H1rLW.js";
2
+ import { u as w } from "./vue-i18n-DowpocqN.js";
3
+ import { useSnackbar as h } from "@feedmepos/ui-library";
4
+ import { c as k } from "./plugins-696Z9K6A.js";
5
+ const l = (e) => b(`businesses/${e}/marketing-materials`), D = {
6
+ async createMarketingMaterial(e) {
7
+ const a = o.getBusinessId();
8
+ if (!a) throw new Error("Invalid business ID");
9
+ return c(
10
+ await l(a).post("", e)
11
+ );
12
+ },
13
+ async getMarketingMaterial(e) {
14
+ const a = o.getBusinessId();
15
+ if (!a) throw new Error("Invalid business ID");
16
+ return c(
17
+ await l(a).get(`/${e}`)
18
+ );
19
+ },
20
+ async listMarketingMaterials(e = null, a = 20) {
21
+ const s = o.getBusinessId();
22
+ if (!s) throw new Error("Invalid business ID");
23
+ return c(
24
+ await l(s).get("", {
25
+ params: { ...e ? { cursor: e } : {}, limit: a }
26
+ })
27
+ );
28
+ },
29
+ async updateMarketingMaterial(e, a) {
30
+ const s = o.getBusinessId();
31
+ if (!s) throw new Error("Invalid business ID");
32
+ return c(
33
+ await l(s).patch(`/${e}`, a)
34
+ );
35
+ }
36
+ };
37
+ function E() {
38
+ const { t: e } = w(), a = h();
39
+ async function s(n) {
40
+ if (!(n != null && n.imageUrl)) return;
41
+ const { headline: i, caption: g, imageUrl: r } = n;
42
+ if (!navigator.share) {
43
+ a.open({
44
+ message: e("connect.marketing.actions.webShareNotSupported"),
45
+ type: "error"
46
+ });
47
+ return;
48
+ }
49
+ try {
50
+ const t = {
51
+ title: i ?? void 0,
52
+ text: g ?? void 0
53
+ };
54
+ if (navigator.canShare)
55
+ try {
56
+ const d = await (await fetch(r, { mode: "cors", cache: "no-store" })).blob(), f = [new File([d], "marketing-material.jpg", {
57
+ type: d.type || "image/jpeg"
58
+ })];
59
+ navigator.canShare({ files: f }) ? t.files = f : t.url = r;
60
+ } catch (u) {
61
+ console.error("Failed to fetch image for sharing:", u), t.url = r;
62
+ }
63
+ else
64
+ t.url = r;
65
+ await navigator.share(t);
66
+ } catch (t) {
67
+ t.name !== "AbortError" && a.open({
68
+ message: e("connect.marketing.actions.failedToShare", { message: t.message }),
69
+ type: "error"
70
+ });
71
+ }
72
+ }
73
+ async function p(n) {
74
+ if (n)
75
+ try {
76
+ const g = await (await fetch(n, { mode: "cors", cache: "no-store" })).blob(), r = URL.createObjectURL(g), t = document.createElement("a");
77
+ t.href = r, t.download = "marketing-material", t.click(), URL.revokeObjectURL(r);
78
+ } catch (i) {
79
+ console.error("Failed to download image:", i), window.open(n, "_blank");
80
+ }
81
+ }
82
+ async function m(n) {
83
+ n && await k(n, {
84
+ successMessage: e("connect.marketing.actions.imageLinkCopied")
85
+ });
86
+ }
87
+ return {
88
+ shareMaterial: s,
89
+ downloadMaterialImage: p,
90
+ copyMaterialLink: m
91
+ };
92
+ }
93
+ export {
94
+ D as m,
95
+ E as u
96
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as P, computed as v, ref as w, onMounted as $, watch as M, resolveComponent as D, openBlock as u, createElementBlock as p, createVNode as r, unref as n, createElementVNode as s, createCommentVNode as N, toDisplayString as b } from "vue";
2
2
  import { _ as S } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
3
- import { l as E } from "./lodash-CLkg5jTT.js";
3
+ import { l as E } from "./lodash-BM976Z2I.js";
4
4
  const R = { class: "" }, A = {
5
5
  key: 0,
6
6
  class: "w-full flex flex-col gap-16 items-center py-16"
@@ -1,5 +1,5 @@
1
1
  import { components as p } from "@feedmepos/ui-library";
2
- import { c as f } from "./plugins-MnP1vCcg.js";
2
+ import { c as f } from "./plugins-696Z9K6A.js";
3
3
  import { h as c } from "vue";
4
4
  function g(o, t = !1) {
5
5
  var a;