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

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-B-Onur9k.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
  4. package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
  5. package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
  7. package/dist/Card-dD52oor7.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
  9. package/dist/Credit-qZdlqXqR.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-fhrbFb_5.js +356 -0
  17. package/dist/GiftCardSetup-CTwmNKim.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
  23. package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
  24. package/dist/MainLayout-Bf42AcB1.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
  27. package/dist/Member-C9VTQqIm.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
  29. package/dist/MemberImportHistory-DZVwya9v.js +187 -0
  30. package/dist/MemberList-KusIfy1u.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
  34. package/dist/Mission-CUUxpBUF.js +360 -0
  35. package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
  36. package/dist/Overview-CYKoF8Hp.js +1316 -0
  37. package/dist/Point-CPpQ07yp.js +288 -0
  38. package/dist/Promotion-CJ95m9Qb.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
  41. package/dist/Review-DoWu2XNT.js +45 -0
  42. package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
  43. package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
  52. package/dist/Settings-Cw85-xzq.js +230 -0
  53. package/dist/Store-BSqW1gwf.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
  59. package/dist/Transaction-dOCzlidD.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BmUK8hMh.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
  68. package/dist/campaign-DlR3KF9m.js +368 -0
  69. package/dist/campaign-tAmQNoq7.js +100 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
  73. package/dist/collection.fn-CDhfM3Eq.js +26 -0
  74. package/dist/currency-10nX5QnT.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
  80. package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
  81. package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
  82. package/dist/index-BQk6zTgf.js +32437 -0
  83. package/dist/index-Bd4clHfr.js +901 -0
  84. package/dist/index-BeVWchv7.js +14550 -0
  85. package/dist/index-Bht1Z11w.js +72 -0
  86. package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
  87. package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
  88. package/dist/index-Bz6oSli7.js +151 -0
  89. package/dist/index-C5IfNJUl.js +53 -0
  90. package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
  91. package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
  92. package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
  93. package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
  94. package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
  95. package/dist/index-DXiJa8Cw.js +137 -0
  96. package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
  97. package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
  101. package/dist/member-import-DX-jn2uk.js +187 -0
  102. package/dist/membership-CltAa-gH.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
  105. package/dist/objectid-BdNv-dZX.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
  112. package/dist/timezone-D2b-V5XD.js +20 -0
  113. package/dist/transaction.fn-B5mLY7bz.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
  118. package/dist/vue-i18n-wJReAVJw.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.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,34 +1,35 @@
1
- import { defineComponent as L, ref as p, computed as C, onMounted as P, resolveComponent as i, openBlock as $, createBlock as D, unref as e, isRef as H, withCtx as S, createElementVNode as v, createVNode as c, toDisplayString as w } from "vue";
2
- import { u as O } from "./loading-DTKDhqew.js";
3
- import { p as Z } from "./plugins-D25PaNJk.js";
1
+ import { defineComponent as L, ref as p, computed as C, onMounted as P, resolveComponent as i, openBlock as $, createBlock as D, unref as e, isRef as H, withCtx as S, createElementVNode as b, createVNode as c, toDisplayString as w } from "vue";
2
+ import { u as O } from "./loading-Dx4SCvZY.js";
3
+ import { p as Z } from "./plugins-BFKVM3uC.js";
4
4
  import { u as q } from "./app-wDQR6dpb.js";
5
- import { m as z } from "./index-jVfDVEtz.js";
6
- import "./index-BrboOmPq.js";
7
- import { b as G } from "./index-DgzNGQgE.js";
8
- import "./index-CB7ytKOE.js";
9
- import "./index-Cl8t41Sk.js";
10
- import "./index-vI-ndGu_.js";
11
- import { Z as d } from "./zod-C1j2GLZP.js";
12
- import { z as Y } from "./app-i3r-6ZVm.js";
13
- import { u as j } from "./vue-i18n-CgMK-TaC.js";
14
- import { c as J } from "./campaign-CbMlARNI.js";
15
- const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-400" }, W = { class: "flex items-center gap-8" }, fe = /* @__PURE__ */ L({
5
+ import { m as z } from "./index-DXiJa8Cw.js";
6
+ import "./index-DJdTDF9C.js";
7
+ import { c as G } from "./index-B9ZMIUMa.js";
8
+ import "./index-BBsK7TUw.js";
9
+ import "./index-BxU--5J5.js";
10
+ import "./index-Bd4clHfr.js";
11
+ import "./index-DhtKt4OL.js";
12
+ import { Z as d } from "./zod-CVpVUgBZ.js";
13
+ import { z as Y } from "./app-BxTElIm-.js";
14
+ import { u as j } from "./vue-i18n-wJReAVJw.js";
15
+ import { c as J } from "./index-Bz6oSli7.js";
16
+ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-400" }, W = { class: "flex items-center gap-8" }, he = /* @__PURE__ */ L({
16
17
  __name: "SendCollectionSheet",
17
18
  emits: ["success"],
18
19
  setup(X, { expose: V, emit: I }) {
19
- const { t: l } = j(), { minor: k } = O, A = I, n = p({
20
+ const { t: m } = j(), { minor: k } = O, A = I, n = p({
20
21
  memberId: [],
21
22
  amount: 1,
22
23
  ref: ""
23
- }), h = p(null), f = p(), b = p([]), r = p(!1), _ = p(), T = G.extend({
24
+ }), h = p(null), f = p(), v = p([]), r = p(!1), _ = p(), T = G.extend({
24
25
  ref: Y.string().max(50, "Reference must be at most 50 characters").optional()
25
26
  }), F = C(() => {
26
27
  var a;
27
28
  switch ((a = h.value) == null ? void 0 : a.type) {
28
29
  case "MISSION":
29
- return l("connect.sendCollectionSheet.stamp");
30
+ return m("connect.sendCollectionSheet.stamp");
30
31
  case "GAME":
31
- return l("connect.sendCollectionSheet.game_token");
32
+ return m("connect.sendCollectionSheet.game_token");
32
33
  default:
33
34
  return "Unknown";
34
35
  }
@@ -54,28 +55,28 @@ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-
54
55
  search: a,
55
56
  descending: !1
56
57
  });
57
- b.value = t.resources.map((s) => ({
58
+ v.value = t.resources.map((s) => ({
58
59
  label: `${s.name} (${s.phoneNumber})`,
59
60
  value: s._id
60
61
  }));
61
- const m = 100;
62
- await new Promise((s) => setTimeout(s, m));
62
+ const l = 100;
63
+ await new Promise((s) => setTimeout(s, l));
63
64
  }
64
65
  async function U() {
65
66
  var t;
66
67
  await Z.confirm(
67
- l("connect.sendCollectionSheet.confirmation_message", {
68
+ m("connect.sendCollectionSheet.confirmation_message", {
68
69
  amount: n.value.amount,
69
70
  type: F.value,
70
- memberName: f.value ? (t = b.value.find((m) => m.value === f.value)) == null ? void 0 : t.label : "Unknown Member"
71
+ memberName: f.value ? (t = v.value.find((l) => l.value === f.value)) == null ? void 0 : t.label : "Unknown Member"
71
72
  }),
72
- l("connect.common.confirm"),
73
- l("connect.common.confirm"),
74
- l("connect.common.cancel")
73
+ m("connect.common.confirm"),
74
+ m("connect.common.confirm"),
75
+ m("connect.common.cancel")
75
76
  ) && await k(
76
77
  async () => {
77
- var m;
78
- await J.sendStamp((m = h.value) == null ? void 0 : m._id.toString(), {
78
+ var l;
79
+ await J.sendStamp((l = h.value) == null ? void 0 : l._id.toString(), {
79
80
  memberId: n.value.memberId,
80
81
  amount: n.value.amount,
81
82
  ref: n.value.ref
@@ -93,11 +94,11 @@ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-
93
94
  }), P(async () => {
94
95
  await y("");
95
96
  }), (a, t) => {
96
- const m = i("FmCard"), s = i("FmSelect"), B = i("FmStepperField"), N = i("FmTextField"), E = i("FmForm"), x = i("FmButton"), R = i("FmSideSheet");
97
+ const l = i("FmCard"), s = i("FmSelect"), B = i("FmStepperField"), N = i("FmTextField"), E = i("FmForm"), x = i("FmButton"), R = i("FmSideSheet");
97
98
  return $(), D(R, {
98
99
  "max-width": 560,
99
100
  "dismiss-away": !0,
100
- header: e(l)("connect.sendCollectionSheet.title", {
101
+ header: e(m)("connect.sendCollectionSheet.title", {
101
102
  type: e(F)
102
103
  }),
103
104
  modelValue: e(r),
@@ -107,7 +108,7 @@ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-
107
108
  ]
108
109
  }, {
109
110
  "side-sheet-footer": S(() => [
110
- v("div", W, [
111
+ b("div", W, [
111
112
  c(x, {
112
113
  label: "Send",
113
114
  loading: e(q)().isLoading,
@@ -133,15 +134,15 @@ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-
133
134
  blameFormChildOnValidationFailed: ""
134
135
  }, {
135
136
  default: S(() => [
136
- c(m, {
137
+ c(l, {
137
138
  variant: "outlined",
138
139
  class: "p-16"
139
140
  }, {
140
141
  default: S(() => {
141
142
  var o;
142
143
  return [
143
- v("div", K, w(e(l)("connect.campaign.common.campaign")), 1),
144
- v("div", Q, w((o = e(h)) == null ? void 0 : o.name), 1)
144
+ b("div", K, w(e(m)("connect.campaign.common.campaign")), 1),
145
+ b("div", Q, w((o = e(h)) == null ? void 0 : o.name), 1)
145
146
  ];
146
147
  }),
147
148
  _: 1
@@ -153,7 +154,7 @@ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-
153
154
  }),
154
155
  label: "Select member",
155
156
  searchable: "",
156
- items: e(b),
157
+ items: e(v),
157
158
  onSearch: y,
158
159
  rules: [(o) => !!o || "Member is required"],
159
160
  "helper-text": "Type to search member",
@@ -184,5 +185,5 @@ const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-
184
185
  }
185
186
  });
186
187
  export {
187
- fe as _
188
+ he as _
188
189
  };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as O, ref as p, computed as g, watch as T, onMounted as q, resolveComponent as x, openBlock as I, createBlock as G, unref as t, isRef as k, withCtx as z, createElementVNode as n, createVNode as s, toDisplayString as f, createElementBlock as H, createCommentVNode as K } from "vue";
2
2
  import { J as Q } from "./JsonViewer-v8_C7l5N.js";
3
3
  import { _ as F } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
4
- import { u as W } from "./loading-DTKDhqew.js";
4
+ import { u as W } from "./loading-Dx4SCvZY.js";
5
5
  import { u as X } from "./app-wDQR6dpb.js";
6
- import { l as Y } from "./lodash-CCPBsqhe.js";
7
- import { m as Z } from "./index-jVfDVEtz.js";
8
- import { c as ee } from "./campaign-CbMlARNI.js";
6
+ import { l as Y } from "./lodash-Dq8OKCKK.js";
7
+ import { m as Z } from "./index-DXiJa8Cw.js";
8
+ import { c as ee } from "./index-Bz6oSli7.js";
9
9
  const ae = { class: "space-y-16" }, te = { class: "fm-typo-en-body-md-600" }, oe = { class: "flex items-center justify-end" }, le = {
10
10
  key: 0,
11
11
  class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
@@ -1,23 +1,23 @@
1
1
  import { defineComponent as Le, ref as $, computed as j, onMounted as Ze, resolveComponent as N, openBlock as U, createBlock as te, withCtx as H, createElementVNode as p, createVNode as P, unref as c, isRef as Me, watch as At, createElementBlock as x, toDisplayString as B, Fragment as Z, renderList as Se, createTextVNode as X, createCommentVNode as we } from "vue";
2
2
  import { h as Bt } from "./moment-D7p2TMB-.js";
3
- import { Z as qe } from "./zod-C1j2GLZP.js";
3
+ import { Z as qe } from "./zod-CVpVUgBZ.js";
4
4
  import { useDialog as et } from "@feedmepos/ui-library";
5
- import { u as Pt } from "./loading-DTKDhqew.js";
5
+ import { u as Pt } from "./loading-Dx4SCvZY.js";
6
6
  import { u as Mt } from "./app-wDQR6dpb.js";
7
- import { u as Ie, l as tt } from "./business-i0Gxk7gG.js";
8
- import { u as nt } from "./membership-rifuatxU.js";
9
- import { P as be } from "./index-Cl8t41Sk.js";
10
- import { M as St, l as It } from "./index-DgzNGQgE.js";
11
- import { _ as Tt } from "./ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js";
12
- import { c as ot, p as Nt, f as re } from "./plugins-D25PaNJk.js";
13
- import { p as Ut, r as Ft, _ as Lt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js";
14
- import { u as st } from "./vue-i18n-CgMK-TaC.js";
15
- import { M as Rt, _ as kt } from "./MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js";
7
+ import { u as Ie, l as tt } from "./business-DjAiT8tR.js";
8
+ import { u as nt } from "./membership-CltAa-gH.js";
9
+ import { P as be } from "./index-BxU--5J5.js";
10
+ import { m as St, b as It } from "./index-Bd4clHfr.js";
11
+ import { _ as Tt } from "./ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js";
12
+ import { c as ot, p as Nt, f as re } from "./plugins-BFKVM3uC.js";
13
+ import { p as Ut, r as Ft, _ as Lt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js";
14
+ import { u as st } from "./vue-i18n-wJReAVJw.js";
15
+ import { M as Rt, a as kt } from "./MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js";
16
16
  import { useCoreStore as Dt } from "@feedmepos/mf-common";
17
17
  import { useRouter as Vt } from "vue-router";
18
- import { R as xt } from "./app-i3r-6ZVm.js";
19
- import { m as ve } from "./index-CxdLExX0.js";
20
- import { S as Ge } from "./index-CWiaP-aV.js";
18
+ import { R as xt } from "./app-BxTElIm-.js";
19
+ import { m as ve } from "./index-DeQKLilv.js";
20
+ import { S as Ge } from "./index-BQk6zTgf.js";
21
21
  import { o as $t } from "./objectId-dwaoBfJX.js";
22
22
  import { a as zt } from "./object-BYyQ0PZp.js";
23
23
  var oe = {}, Ht = function() {
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as J, ref as y, computed as z, onMounted as K, resolveComponent as A, openBlock as u, createElementBlock as b, createElementVNode as s, createVNode as d, createTextVNode as W, toDisplayString as v, unref as e, withCtx as k, createBlock as B, Fragment as Y, renderList as Z, createCommentVNode as N, isRef as ee } from "vue";
2
- import { u as te } from "./loading-DTKDhqew.js";
2
+ import { u as te } from "./loading-Dx4SCvZY.js";
3
3
  import { u as ne } from "./app-wDQR6dpb.js";
4
- import { u as se } from "./business-i0Gxk7gG.js";
5
- import { u as oe } from "./membership-rifuatxU.js";
6
- import "./index-Cl8t41Sk.js";
7
- import { l as ae } from "./index-DgzNGQgE.js";
8
- import "./index-D6qeYVNz.js";
9
- import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js";
10
- import { f as D, p as ie } from "./plugins-D25PaNJk.js";
11
- import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js";
12
- import { u as ce } from "./vue-i18n-CgMK-TaC.js";
4
+ import { u as se } from "./business-DjAiT8tR.js";
5
+ import { u as oe } from "./membership-CltAa-gH.js";
6
+ import "./index-BxU--5J5.js";
7
+ import { b as ae } from "./index-Bd4clHfr.js";
8
+ import "./index-D8rGhchh.js";
9
+ import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js";
10
+ import { f as D, p as ie } from "./plugins-BFKVM3uC.js";
11
+ import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js";
12
+ import { u as ce } from "./vue-i18n-wJReAVJw.js";
13
13
  import { useRouter as de } from "vue-router";
14
- import { m as me } from "./index-CxdLExX0.js";
15
- import { R as ue } from "./app-i3r-6ZVm.js";
14
+ import { m as me } from "./index-DeQKLilv.js";
15
+ import { R as ue } from "./app-BxTElIm-.js";
16
16
  import { a as ve } from "./object-BYyQ0PZp.js";
17
17
  const pe = { class: "min-h-screen bg-fm-color-neutral-gray-50" }, fe = { class: "bg-white border-b border-fm-color-neutral-gray-100 sticky top-0 z-10" }, ge = { class: "px-24 py-16 flex items-center justify-between" }, _e = { class: "flex items-center gap-16" }, he = { class: "fm-typo-en-title-md-800 flex items-center gap-8" }, ye = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, be = {
18
18
  key: 0,
@@ -0,0 +1,230 @@
1
+ import { defineComponent as A, useSlots as L, ref as E, watch as M, computed as g, openBlock as t, createElementBlock as s, createElementVNode as c, normalizeClass as $, unref as e, toDisplayString as m, Fragment as x, createBlock as V, createCommentVNode as w, createVNode as B, renderSlot as U, onMounted as Y, withCtx as D, renderList as F, createStaticVNode as G } from "vue";
2
+ import { u as O } from "./loading-Dx4SCvZY.js";
3
+ import { u as z } from "./business-DjAiT8tR.js";
4
+ import { components as k, useSnackbar as W } from "@feedmepos/ui-library";
5
+ import { u as H } from "./vue-i18n-wJReAVJw.js";
6
+ import { h as I } from "./moment-D7p2TMB-.js";
7
+ import { g as j } from "./google-C3S8u0mT.js";
8
+ import { R as P } from "./app-BxTElIm-.js";
9
+ import { useRouter as q } from "vue-router";
10
+ import { r as T } from "./index-Bht1Z11w.js";
11
+ const J = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, K = ["src"], Q = { class: "flex flex-col flex-1 gap-4 min-w-0" }, X = { class: "fm-typo-en-body-md-600 capitalize" }, Z = { class: "truncate" }, ee = { class: "truncate" }, ne = {
12
+ key: 1,
13
+ class: "truncate"
14
+ }, te = {
15
+ key: 2,
16
+ class: "truncate"
17
+ }, oe = {
18
+ key: 1,
19
+ class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
20
+ }, ce = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, se = /* @__PURE__ */ A({
21
+ __name: "ReviewSource",
22
+ props: {
23
+ icon: {},
24
+ name: {},
25
+ connected: { type: Boolean },
26
+ subtitle: {},
27
+ syncing: { type: Boolean },
28
+ tokenExpired: { type: Boolean },
29
+ lastSyncTime: {}
30
+ },
31
+ emits: ["connect", "sync"],
32
+ setup(a, { emit: h }) {
33
+ const y = a, p = h, { t: r } = H(), o = L(), f = E(null);
34
+ M(
35
+ () => y.syncing,
36
+ (i) => {
37
+ i && (f.value = /* @__PURE__ */ new Date());
38
+ },
39
+ { immediate: !0 }
40
+ );
41
+ const b = g(
42
+ () => y.lastSyncTime ? I(y.lastSyncTime) : null
43
+ ), C = g(() => {
44
+ var i;
45
+ return ((i = b.value) == null ? void 0 : i.fromNow()) ?? "";
46
+ }), S = g(
47
+ () => {
48
+ var i;
49
+ return ((i = b.value) == null ? void 0 : i.format("D MMM YYYY, HH:mm")) ?? "";
50
+ }
51
+ ), N = g(
52
+ () => I(f.value ?? void 0).format("HH:mm")
53
+ ), d = g(() => y.syncing ? "syncing" : b.value ? "synced" : "never");
54
+ return (i, u) => (t(), s("div", J, [
55
+ c("div", {
56
+ class: $(["flex items-center gap-12 p-16", e(o).default ? "border-b border-fm-color-neutral-gray-100" : ""])
57
+ }, [
58
+ c("img", {
59
+ src: a.icon,
60
+ class: "w-10 h-10 shrink-0"
61
+ }, null, 8, K),
62
+ c("div", Q, [
63
+ c("span", X, m(a.name), 1),
64
+ a.connected ? (t(), s("div", {
65
+ key: 0,
66
+ class: $(["flex items-center gap-8 fm-typo-en-body-sm-400 truncate", {
67
+ "text-fm-color-typo-secondary": d.value !== "syncing",
68
+ "text-fm-color-typo-warning": d.value === "syncing"
69
+ }])
70
+ }, [
71
+ c("span", {
72
+ class: $(["w-8 h-8 rounded-full shrink-0", {
73
+ "bg-fm-color-system-success-400": d.value === "synced",
74
+ "bg-fm-color-primary": d.value === "syncing",
75
+ "bg-fm-color-neutral-gray-300": d.value === "never"
76
+ }])
77
+ }, null, 2),
78
+ d.value === "synced" ? (t(), s(x, { key: 0 }, [
79
+ c("span", Z, m(e(r)("connect.review.lastSynced", { relative: C.value })), 1),
80
+ u[3] || (u[3] = c("span", { class: "text-fm-color-neutral-gray-300" }, "·", -1)),
81
+ c("span", ee, m(S.value), 1)
82
+ ], 64)) : d.value === "syncing" ? (t(), s("span", ne, m(e(r)("connect.review.syncingNow", { time: N.value })), 1)) : (t(), s("span", te, m(e(r)("connect.review.neverSynced")), 1))
83
+ ], 2)) : (t(), s("span", oe, m(a.subtitle || e(r)("connect.review.notConnected")), 1))
84
+ ]),
85
+ a.connected ? (t(), s(x, { key: 0 }, [
86
+ a.tokenExpired ? (t(), V(e(k).FmChip, {
87
+ key: 0,
88
+ label: e(r)("connect.review.expired"),
89
+ variant: "critical"
90
+ }, null, 8, ["label"])) : w("", !0),
91
+ B(e(k).FmButton, {
92
+ variant: "secondary",
93
+ "prepend-icon": "refresh",
94
+ label: e(r)("connect.review.reconnect"),
95
+ onClick: u[0] || (u[0] = (n) => p("connect"))
96
+ }, null, 8, ["label"]),
97
+ a.tokenExpired ? w("", !0) : (t(), V(e(k).FmButton, {
98
+ key: 1,
99
+ variant: "primary",
100
+ "prepend-icon": "sync",
101
+ label: e(r)("connect.review.sync"),
102
+ loading: a.syncing,
103
+ onClick: u[1] || (u[1] = (n) => p("sync"))
104
+ }, null, 8, ["label", "loading"]))
105
+ ], 64)) : w("", !0)
106
+ ], 2),
107
+ a.connected ? w("", !0) : (t(), s("div", {
108
+ key: 0,
109
+ class: $(["flex items-center justify-between gap-12 p-16", e(o).default ? "border-b border-fm-color-neutral-gray-100" : ""])
110
+ }, [
111
+ c("span", ce, m(e(r)("connect.review.connectHint", { name: a.name })), 1),
112
+ B(e(k).FmButton, {
113
+ "prepend-icon": "add",
114
+ label: e(r)("connect.review.connect"),
115
+ onClick: u[2] || (u[2] = (n) => p("connect"))
116
+ }, null, 8, ["label"])
117
+ ], 2)),
118
+ U(i.$slots, "default")
119
+ ]));
120
+ }
121
+ }), ae = { class: "p-24 flex flex-col gap-8" }, re = { class: "flex flex-col flex-1 min-w-0" }, le = { class: "fm-typo-en-body-lg-600 truncate" }, ie = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, ke = /* @__PURE__ */ A({
122
+ __name: "Settings",
123
+ setup(a) {
124
+ const { t: h } = H(), y = W(), p = q(), r = z(), o = E(null), f = E(!1);
125
+ E(!1);
126
+ const b = g(
127
+ () => {
128
+ var n;
129
+ return o.value ? ((n = o.value.google) == null ? void 0 : n.accessToken) === null : !1;
130
+ }
131
+ );
132
+ g(
133
+ () => {
134
+ var n;
135
+ return o.value ? ((n = o.value.facebook) == null ? void 0 : n.token) === null : !1;
136
+ }
137
+ );
138
+ function C(n) {
139
+ const l = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
140
+ return `${window.location.origin}${l}${n}`;
141
+ }
142
+ async function S() {
143
+ await O.minor(async () => {
144
+ o.value = await T.getSource();
145
+ });
146
+ }
147
+ function N(n) {
148
+ var l;
149
+ return (l = r.locations.find(
150
+ (v) => v._id.toString() === n
151
+ )) == null ? void 0 : l.name;
152
+ }
153
+ function d() {
154
+ y.open({
155
+ message: h("connect.review.syncSuccess"),
156
+ type: "success"
157
+ }), p.push({ name: P["$connect-REVIEW_OVERVIEW"] });
158
+ }
159
+ async function i() {
160
+ var n, l;
161
+ f.value = !0;
162
+ try {
163
+ await T.syncGoogleReviews(), d();
164
+ } catch (v) {
165
+ if (await S(), ((l = (n = o.value) == null ? void 0 : n.google) == null ? void 0 : l.accessToken) === null) {
166
+ y.open({
167
+ message: h("connect.review.tokenExpired"),
168
+ type: "error"
169
+ });
170
+ return;
171
+ }
172
+ throw v;
173
+ } finally {
174
+ f.value = !1;
175
+ }
176
+ }
177
+ async function u() {
178
+ const n = C("/review/google/callback"), { callbackUrl: l } = await T.getOauthUrl("google", n);
179
+ window.location.href = l;
180
+ }
181
+ return Y(() => {
182
+ S(), r.readLocations();
183
+ }), (n, l) => {
184
+ var v;
185
+ return t(), s("div", ae, [
186
+ e(o) ? (t(), s(x, { key: 0 }, [
187
+ B(se, {
188
+ icon: e(j),
189
+ name: "google",
190
+ connected: !!e(o).google,
191
+ syncing: e(f),
192
+ "token-expired": e(b),
193
+ "last-sync-time": (v = e(o).google) == null ? void 0 : v.lastSyncTime,
194
+ onConnect: u,
195
+ onSync: i
196
+ }, {
197
+ default: D(() => {
198
+ var _;
199
+ return [
200
+ (t(!0), s(x, null, F((_ = e(o).google) == null ? void 0 : _.locations, (R) => (t(), s("div", {
201
+ key: R.googleLocationName,
202
+ class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
203
+ }, [
204
+ B(e(k).FmIcon, {
205
+ name: "location_on",
206
+ class: "text-fm-color-neutral-gray-300 shrink-0"
207
+ }),
208
+ c("div", re, [
209
+ c("span", le, m(R.displayName), 1),
210
+ c("span", ie, m(N(R.locationId)), 1)
211
+ ])
212
+ ]))), 128))
213
+ ];
214
+ }),
215
+ _: 1
216
+ }, 8, ["icon", "connected", "syncing", "token-expired", "last-sync-time"]),
217
+ w("", !0)
218
+ ], 64)) : (t(), s(x, { key: 1 }, F(["google", "facebook"], (_) => c("div", {
219
+ key: _,
220
+ class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
221
+ }, [...l[0] || (l[0] = [
222
+ G('<div class="animate-pulse flex items-center gap-12"><div class="w-10 h-10 rounded-full bg-fm-color-neutral-gray-100 shrink-0"></div><div class="flex-1 min-w-0 space-y-8"><div class="h-16 w-20 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full max-w-[160px] rounded bg-fm-color-neutral-gray-100"></div></div><div class="h-32 w-24 rounded bg-fm-color-neutral-gray-100 shrink-0"></div></div>', 1)
223
+ ])])), 64))
224
+ ]);
225
+ };
226
+ }
227
+ });
228
+ export {
229
+ ke as default
230
+ };