@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.72

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 (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-DpYceiwG.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-CG98b2qE.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-vdipv2fF.js} +8 -8
  4. package/dist/Broadcast-ChwVqheE.js +303 -0
  5. package/dist/CampaignAnalytic-4PHO849x.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DmnN4pjm.js} +6 -5
  7. package/dist/Card-B6ol3PQw.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-DodNIUr1.js} +14 -13
  9. package/dist/Credit-CJQyAZYw.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang--FqHJ7Ez.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.js +4277 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-iLAKddx_.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-w_ExQ0py.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-DWdUbsAg.js +356 -0
  17. package/dist/GiftCardSetup-DnQ5vwxu.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-CFLRHs5w.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-CUy4z2tS.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-hKJ41Fe_.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BDmtqTVC.js} +1 -1
  23. package/dist/LoyaltyDashboard-C5o7KriA.js +2865 -0
  24. package/dist/MainLayout-Dt0ywph3.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-BHwxzBZ0.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-B6k4ceGx.js} +15 -14
  27. package/dist/Member-DcPZfTj6.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-CiiBrlHY.js +1279 -0
  29. package/dist/MemberImportHistory-DmPMuu1g.js +187 -0
  30. package/dist/MemberList-f9JejfNW.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-D1YSXeX-.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-m7ytg0ok.js +40 -0
  34. package/dist/Mission-BaaEl5BV.js +360 -0
  35. package/dist/Overview-CviY55Gs.js +1316 -0
  36. package/dist/{Overview-nsyJGSCq.js → Overview-fx-0E3b8.js} +21 -20
  37. package/dist/Point-BfqtflbC.js +288 -0
  38. package/dist/Promotion-Be2ogRYt.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CLSUL-Cx.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-CpTMQT7B.js} +9 -9
  41. package/dist/Review-DzSDx7dY.js +45 -0
  42. package/dist/ReviewFacebookCallback-CvbPJADM.js +238 -0
  43. package/dist/ReviewGoogleCallback-DJlqMbh3.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-DJOmd6Z5.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-DY9fYxwc.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-G6xmeEaq.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3O0biLZ.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWP5sGT7.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-CKp441AW.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-C4Uf-DgK.js} +12 -12
  52. package/dist/Settings-CTvMVwp6.js +230 -0
  53. package/dist/Store-Bzei6Xev.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-DMQNIpF5.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-mm1jbcvo.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-BN32RwYr.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-BIhgfRUI.js} +39 -37
  59. package/dist/Transaction-CPjA7IN9.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-CGJtn9bC.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-Ce9xPwqA.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-DAtx6aZ4.js} +45039 -37428
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BtRC4aWM.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-BZUIs8Ub.js} +5 -5
  68. package/dist/campaign-B6I6PuY4.js +100 -0
  69. package/dist/campaign-DKjBjV2k.js +398 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BQy3e845.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn--qVJ3jeH.js} +77 -77
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-vcvRFGl0.js} +1 -1
  73. package/dist/collection.fn-C3bMPBkC.js +26 -0
  74. package/dist/currency--R6VPInw.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-aIsX9cCi.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-CbjmtRph.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-DZKMnoKf.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BGqw2-RO.js} +1 -1
  80. package/dist/index-7TKoSEJ2.js +14550 -0
  81. package/dist/index-B9DM5Vuv.js +32437 -0
  82. package/dist/index-BWlfW4Kr.js +137 -0
  83. package/dist/{index-Cl8t41Sk.js → index-Bb4TieR_.js} +5 -5
  84. package/dist/{index-D6qeYVNz.js → index-BbpqZrkB.js} +1 -1
  85. package/dist/{index-4EtrCy_K.js → index-C22GPEM-.js} +4 -4
  86. package/dist/{index-FD50UHqf.js → index-CVYbfRGO.js} +105 -123
  87. package/dist/index-CVvSd60O.js +53 -0
  88. package/dist/{index-vI-ndGu_.js → index-CXL5WAH0.js} +5 -5
  89. package/dist/{index-B6xi1soU.js → index-ClP7Xy6Q.js} +1 -1
  90. package/dist/{index-BWsj6lCJ.js → index-D-P90w8K.js} +14 -14
  91. package/dist/{index-CxdLExX0.js → index-D_o9LsHU.js} +24 -9
  92. package/dist/{index-BrboOmPq.js → index-DcA0B-Y5.js} +347 -216
  93. package/dist/index-FnsjvtSo.js +901 -0
  94. package/dist/{index-DgzNGQgE.js → index-LlFZ5kxi.js} +2083 -2559
  95. package/dist/{index-CB7ytKOE.js → index-LnCoUCnx.js} +1588 -1522
  96. package/dist/index-kkhrPH6s.js +151 -0
  97. package/dist/index-v8Zv-2ko.js +72 -0
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-DO7bbE7J.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-CzWOx4tE.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-B_gr6Ayu.js} +1 -1
  101. package/dist/member-import-BxCrd9tq.js +187 -0
  102. package/dist/membership-ILB4aB4h.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-CpIK1N_r.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-leVwmDCm.js} +1 -1
  105. package/dist/objectid-8hKuNcMN.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-DLIgnFIF.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward-DqT0zF01.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-DBtMGLxD.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-CYKGCWY4.js} +6 -6
  112. package/dist/timezone-Brs5nrTL.js +20 -0
  113. package/dist/transaction.fn-0ZZcVp-j.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-LhNre1L9.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DbDRMmhM.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DmZX0V64.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-CBPsvnx9.js} +1 -1
  118. package/dist/vue-i18n-BPeSHE3c.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Cm3vGmLN.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-GTEcy37q.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -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-CbMlARNI.js";
2
+ import { u as J } from "./campaign-B6I6PuY4.js";
3
3
  import { useDialog as M } from "@feedmepos/ui-library";
4
- import { F as A } from "./index-BrboOmPq.js";
5
- import { _ as G } from "./lodash-CCPBsqhe.js";
6
- import { C as H } from "./campaign-f7FT91GR.js";
4
+ import { F as A } from "./index-DcA0B-Y5.js";
5
+ import { _ as G } from "./lodash-B_gr6Ayu.js";
6
+ import { C as H } from "./campaign-DKjBjV2k.js";
7
7
  import { J as K } from "./JsonViewer-v8_C7l5N.js";
8
- import { u as Q } from "./vue-i18n-CgMK-TaC.js";
9
- import { u as R } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js";
8
+ import { u as Q } from "./vue-i18n-BPeSHE3c.js";
9
+ import { u as R } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.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-B9DM5Vuv.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,71 @@
1
+ import "./index-LlFZ5kxi.js";
2
+ import { s as u } from "./index-C22GPEM-.js";
3
+ function i(l) {
4
+ var c, f;
5
+ const e = (c = l.metadata) == null ? void 0 : c.operator, t = typeof e == "string" ? e : [e == null ? void 0 : e.name, e == null ? void 0 : e.phoneNumber, e == null ? void 0 : e.email].filter(Boolean).join(" / ") || (e == null ? void 0 : e.uid);
6
+ return [(f = l.metadata) == null ? void 0 : f.remark, t && `Operator: ${t}`].filter(Boolean).join(" | ");
7
+ }
8
+ function m(l) {
9
+ let e = "";
10
+ switch (l) {
11
+ case "PORTAL":
12
+ e = "ADMIN";
13
+ break;
14
+ case "BENEFIT":
15
+ e = "MEMBERSHIP";
16
+ break;
17
+ case "ORDER":
18
+ e = "ORDER";
19
+ break;
20
+ case "BILL":
21
+ e = "SPENDING";
22
+ break;
23
+ case "CASHBACK":
24
+ e = "CASHBACK";
25
+ break;
26
+ case "CYCLE":
27
+ e = "EXPIRED";
28
+ break;
29
+ case "COUNTER_CONSUME":
30
+ e = "COUNTER REDEEM";
31
+ break;
32
+ default:
33
+ e = l;
34
+ break;
35
+ }
36
+ return e;
37
+ }
38
+ function b(l) {
39
+ var e, t, c, f, r, E;
40
+ switch ((e = l == null ? void 0 : l.pf_collectible) == null ? void 0 : e.type) {
41
+ case "VOUCHER":
42
+ return `${(t = l.pf_collectible) == null ? void 0 : t.type} (${(c = l.pf_collectible) == null ? void 0 : c.name})`;
43
+ case "TITLE":
44
+ return `${(f = l.pf_collectible) == null ? void 0 : f.type} (${(r = l.pf_collectible) == null ? void 0 : r.name})`;
45
+ case "POINT":
46
+ return "Experience";
47
+ case "COIN":
48
+ return "Point";
49
+ default:
50
+ return u((E = l == null ? void 0 : l.pf_collectible) == null ? void 0 : E.type);
51
+ }
52
+ }
53
+ function a(l) {
54
+ switch (l) {
55
+ case "ONLINE":
56
+ return "Online";
57
+ case "COIN":
58
+ return "Point";
59
+ default:
60
+ return l;
61
+ }
62
+ }
63
+ const s = {
64
+ getReason: m,
65
+ formattedType: b,
66
+ formattedPaymentType: a,
67
+ formattedRemark: i
68
+ };
69
+ export {
70
+ s as T
71
+ };
@@ -1,10 +1,10 @@
1
- import { defineComponent as c, openBlock as u, createBlock as p, unref as r } from "vue";
2
- import "./index-CB7ytKOE.js";
3
- import { R as i } from "./index-BrboOmPq.js";
4
- import { _ as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js";
5
- import { m as e, K as d } from "./index-DgzNGQgE.js";
6
- import { i as n } from "./plugins-D25PaNJk.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-LnCoUCnx.js";
3
+ import { R as i } from "./index-DcA0B-Y5.js";
4
+ import { a as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js";
5
+ import { c as e, C as d } from "./index-FnsjvtSo.js";
6
+ import { i as n } from "./plugins-DLIgnFIF.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-B9DM5Vuv.js";
2
+ import { u as w } from "./vue-i18n-BPeSHE3c.js";
3
+ import { useSnackbar as h } from "@feedmepos/ui-library";
4
+ import { c as k } from "./plugins-DLIgnFIF.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-CCPBsqhe.js";
3
+ import { l as E } from "./lodash-B_gr6Ayu.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-D25PaNJk.js";
2
+ import { c as f } from "./plugins-DLIgnFIF.js";
3
3
  import { h as c } from "vue";
4
4
  function g(o, t = !1) {
5
5
  var a;