@feedmepos/mf-connect 0.1.98-beta.9 → 0.1.99-prod

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 (121) hide show
  1. package/dist/Analytic-CmlJa1WX.js +426 -0
  2. package/dist/{App-CwMrP0Q-.js → App-D0thRELq.js} +807 -673
  3. package/dist/{Bin-sSw4Gatd.js → Bin-DnkPcZdC.js} +8 -8
  4. package/dist/{Broadcast-DH2Fpb-O.js → Broadcast-o6nSQOsx.js} +17 -18
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cd47Mrej.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BPGzh4u8.js} +6 -5
  6. package/dist/{Card-D4YJZ_I8.js → Card-zjezSaRB.js} +19 -19
  7. package/dist/{Collections--8QcjuAp.js → Collections-48W_jFFS.js} +185 -197
  8. package/dist/{Credit-DgF3qd52.js → Credit-CYaCjNVK.js} +53 -54
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D3SnYlQ0.js +2223 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BgHApZqm.js → EffectSheet.vue_vue_type_style_index_0_lang-CbpKQj-r.js} +6 -6
  11. package/dist/{Experience-DxtkVeS9.js → Experience-HmfLlywu.js} +34 -35
  12. package/dist/{FileSaver.min-BtPuPAIo.js → FileSaver.min-cDraiw9g.js} +1 -1
  13. package/dist/{Game-CbcrkUBh.js → Game-DHLdDQRi.js} +15 -16
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CqoO7N7r.js → ImageInput.vue_vue_type_script_setup_true_lang-DZrmFruC.js} +1 -1
  15. package/dist/{Index-BzPX7mr1.js → Index-CMm5L1Ph.js} +10 -10
  16. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-mI-5po-a.js → LocationPicker.vue_vue_type_script_setup_true_lang-B6tGeGGC.js} +1 -1
  17. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DyP3ipwX.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CV4V9qlc.js} +1 -1
  18. package/dist/{MainLayout-gxkaZeZ-.js → MainLayout-iru8naVF.js} +1 -1
  19. package/dist/{Marketing-BlMjT0cP.js → Marketing-AP8z-pA0.js} +4 -4
  20. package/dist/{MarketingMaterialEdit-v0vGn3Lz.js → MarketingMaterialEdit-HYTdiTvs.js} +211 -214
  21. package/dist/{Member-BBUlAPqZ.js → Member-N_ks2GiW.js} +20 -20
  22. package/dist/{MemberList-DZJhULFD.js → MemberList-Cj8EfN0q.js} +51 -50
  23. package/dist/{MemberTransactions-CTBoDEg4.js → MemberTransactions-DUj4Fq6M.js} +1 -1
  24. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-nlYOP9gZ.js → MessageInput.vue_vue_type_script_setup_true_lang-ZD6_8BzX.js} +11 -11
  25. package/dist/{Mission-D_xjOnWO.js → Mission-DfZ0brqC.js} +34 -35
  26. package/dist/{Overview-C5-uSEJH.js → Overview-BnFPQbSg.js} +19 -19
  27. package/dist/Overview-kB_HApIc.js +969 -0
  28. package/dist/{Point-BmVyG_i-.js → Point-PsWJEEsn.js} +29 -30
  29. package/dist/{Promotion-BWmTkHyw.js → Promotion-BsNT1kOG.js} +105 -111
  30. package/dist/{Queue-Do2XlY5H.js → Queue-Cgw3PgEi.js} +43 -43
  31. package/dist/{Record-BIzUOikr.js → Record-DwzoIz3R.js} +10 -10
  32. package/dist/Review-kF2wLu5o.js +46 -0
  33. package/dist/ReviewFacebookCallback-B6RjqR5T.js +238 -0
  34. package/dist/ReviewGoogleCallback-DjLK1b4-.js +213 -0
  35. package/dist/{Reward-gCpIJIq9.js → Reward-C8O5U2NU.js} +17 -17
  36. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dkyz-W9m.js → RewardGroup.vue_vue_type_script_setup_true_lang-BqKABBF1.js} +12 -12
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DvNyurCW.js +1888 -0
  38. package/dist/{Segment-CZrzY2st.js → Segment-BtmeNQnL.js} +78 -77
  39. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-B1qAMtkn.js → SelectItems.vue_vue_type_script_setup_true_lang-P4wy1bqG.js} +3 -3
  40. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc36wzB0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQ93AOeI.js} +12 -12
  41. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtnF-BPt.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B3P7Ob40.js} +4 -4
  42. package/dist/{Setting-JrI4ttI1.js → Setting-D1SQ6TKF.js} +248 -259
  43. package/dist/{SettingAdvertisements-iOOpEUlI.js → SettingAdvertisements-pUTX9uu3.js} +13 -13
  44. package/dist/Settings-Bbd3cMNH.js +228 -0
  45. package/dist/{Store-DbXKThJn.js → Store-Dgc-J8Q7.js} +24 -24
  46. package/dist/{StoreRewards-CfkwVw7d.js → StoreRewards-CJ090vEj.js} +16 -16
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B35vDFFq.js +1067 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-5Aazsvfa.js +142 -0
  49. package/dist/{Tier-BVrAqpWt.js → Tier-CKGyFDiY.js} +469 -544
  50. package/dist/{Title-DhumBh-S.js → Title-DXRex7t9.js} +92 -93
  51. package/dist/{Transaction-BQLge28p.js → Transaction-B1eC-Gln.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CSPaj2uN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B2GABNUx.js} +6 -6
  53. package/dist/{Voucher-DeB4YhvL.js → Voucher-Omh_kYVH.js} +27 -28
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjUFEIlS.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DD2WD_Vt.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzrPUcC9.js → ZodTextField.vue_vue_type_script_setup_true_lang-CAtzo8zL.js} +2 -2
  56. package/dist/{app-BHIG18wW.js → app-D8i8XAyR.js} +1439 -1406
  57. package/dist/app.js +3 -4
  58. package/dist/{business-CCmy2VBj.js → business-6gZtKQ8L.js} +1 -1
  59. package/dist/{campaign-DiFdvcPE.js → campaign-DIgbywUy.js} +64 -114
  60. package/dist/{campaign-jofcGLi8.js → campaign-MPUFwgli.js} +7 -13
  61. package/dist/{campaign.enum-CBp5IeWz.js → campaign.enum-CSlbGhc-.js} +2 -3
  62. package/dist/{campaign.fn-BZ0Ivuwi.js → campaign.fn-BvxZt-0r.js} +65 -65
  63. package/dist/{collectible.enum-frp5wluZ.js → collectible.enum-20LKRFir.js} +1 -1
  64. package/dist/collection.fn-03oGQuF_.js +26 -0
  65. package/dist/dto-C5_Te4gk.js +216 -0
  66. package/dist/{effect-BegkMXTr.js → effect-CkurpNMu.js} +1 -1
  67. package/dist/{email-addresses-B0t3BKV6.js → email-addresses-CR8pgurp.js} +2 -2
  68. package/dist/{export-CGrchnsA.js → export-CfDeISbW.js} +3 -3
  69. package/dist/google-BQK68wbe.js +5 -0
  70. package/dist/{helper-CIYSBZvt.js → helper-BQYvN6FL.js} +1 -1
  71. package/dist/{index-Dg_OJTxE.js → index-6FvsyekG.js} +1 -1
  72. package/dist/index-ARC-NYFZ.js +55 -0
  73. package/dist/{index-Cv0pq7A_.js → index-C9j6OhgK.js} +302 -634
  74. package/dist/{index-BPh_k5rA.js → index-CH_QL_76.js} +3 -3
  75. package/dist/{index-DdAl4SK2.js → index-CJUzQG6t.js} +26 -17
  76. package/dist/{index-PmoP3mXP.js → index-Cv-DbZdw.js} +7 -7
  77. package/dist/{index-D4_JDL9j.js → index-D6wOnTAl.js} +3 -3
  78. package/dist/{index-CixwNfnv.js → index-D8vmbFE5.js} +1 -1
  79. package/dist/{index-DcE-11T-.js → index-DW7H-3z4.js} +1275 -1506
  80. package/dist/{index-C_6y8OES.js → index-Dcxjgr6s.js} +1 -1
  81. package/dist/{index-CF1RNy12.js → index-Dz130JVH.js} +1 -1
  82. package/dist/{index-BBgVfqVf.js → index-ERqXuFvQ.js} +1 -1
  83. package/dist/{index-C-2YkeBp.js → index-hTgJrZR8.js} +1968 -1996
  84. package/dist/{index.esm2017-QGfAIiCc.js → index.esm2017-DY9Lrb0O.js} +184 -184
  85. package/dist/{loading-Cql_LElt.js → loading-EnU7K0k3.js} +1 -1
  86. package/dist/{lodash-PMdIVUsY.js → lodash-Cr7KdLib.js} +1 -1
  87. package/dist/{membership-BHD1GQ45.js → membership-B1eIzQDB.js} +3 -3
  88. package/dist/{money-CASVly6f.js → money-DpUzzEJj.js} +1 -1
  89. package/dist/{number-dMI2x0jy.js → number-DAz9zOKI.js} +1 -1
  90. package/dist/object-qECH92oz.js +26 -0
  91. package/dist/objectid-LXOkMCkM.js +145 -0
  92. package/dist/{plugins-CnEVta3V.js → plugins-DJ13vaqz.js} +95 -94
  93. package/dist/{reward-vdrNMYrF.js → reward-Cmx_swM1.js} +1 -1
  94. package/dist/{rule-BLXUDFEw.js → rule-BCzySyr6.js} +487 -505
  95. package/dist/rule-builder-CDkWYBLG.js +102 -0
  96. package/dist/style.css +1 -1
  97. package/dist/template-DfnYZzoa.js +236 -0
  98. package/dist/{index-DzQCyuGA.js → timezone-Beb0XkZC.js} +20 -21
  99. package/dist/{trigger-Ccrh378a.js → trigger-BfQprjI-.js} +5 -5
  100. package/dist/{useMarketingMaterialActions-BQLBRa3G.js → useMarketingMaterialActions-CagN58AP.js} +3 -3
  101. package/dist/{usePagination-BjsffqjT.js → usePagination-XyeJR5ws.js} +1 -1
  102. package/dist/{user-B5jS1GLb.js → user-l2YG1VjD.js} +1 -1
  103. package/dist/{vue-i18n-CCjHlB6z.js → vue-i18n-DJXhpQga.js} +391 -391
  104. package/dist/{xlsx-DmBOvA2N.js → xlsx-DypdT1NW.js} +1 -1
  105. package/dist/{zod-DrYZ6KS4.js → zod-BM5P7Bti.js} +1 -1
  106. package/package.json +4 -8
  107. package/dist/AuditLogs-CAtlilma.js +0 -2013
  108. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bpr9KuHW.js +0 -3377
  109. package/dist/Grab-CDhmMNsL.js +0 -300
  110. package/dist/LoyaltyDashboard-BFjI3IWT.js +0 -1082
  111. package/dist/Review-D9cFDrhN.js +0 -1192
  112. package/dist/ReviewFacebookCallback-DbE8_6D3.js +0 -243
  113. package/dist/ReviewGoogleCallback-LMZgyopt.js +0 -208
  114. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BEqgU70M.js +0 -1911
  115. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNC_jNgW.js +0 -1130
  116. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BBlCR4pN.js +0 -7007
  117. package/dist/duplicateCampaign-CxuNftok.js +0 -51
  118. package/dist/index-Dc-I4Jr-.js +0 -67
  119. package/dist/object-BYyQ0PZp.js +0 -18
  120. package/dist/objectid-Db_4Ays3.js +0 -145
  121. package/dist/template-CRjkIq3e.js +0 -188
@@ -1,23 +1,23 @@
1
1
  import { defineComponent as h, h as n, ref as A, watch as B, onBeforeMount as U, resolveComponent as V, openBlock as z, createElementBlock as O, Fragment as q, createVNode as m, unref as o, createElementVNode as g } from "vue";
2
- import { u as G, _ as L } from "./usePagination-BjsffqjT.js";
2
+ import { u as L, _ as K } from "./usePagination-XyeJR5ws.js";
3
3
  import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
4
4
  import { c as u } from "./string-Gcy5IM_H.js";
5
- import { c as Y } from "./plugins-CnEVta3V.js";
6
- import { useDialog as j, components as y } from "@feedmepos/ui-library";
7
- import "./index-Cv0pq7A_.js";
8
- import { M as c, c as d } from "./index-DcE-11T-.js";
9
- import "./index-C-2YkeBp.js";
10
- import "./index-BPh_k5rA.js";
11
- import "./index-D4_JDL9j.js";
12
- import { h as b } from "./moment-D7p2TMB-.js";
13
- import { u as W } from "./vue-i18n-CCjHlB6z.js";
14
- import { u as H, v as K, w as Q } from "./index.esm2017-QGfAIiCc.js";
15
- import { useRoute as $ } from "vue-router";
16
- import { g as J, S as Z, u as X } from "./index-PmoP3mXP.js";
5
+ import { c as Y } from "./plugins-DJ13vaqz.js";
6
+ import { useDialog as G, components as b } from "@feedmepos/ui-library";
7
+ import { K as c, c as d } from "./index-DW7H-3z4.js";
8
+ import "./index-hTgJrZR8.js";
9
+ import "./index-CH_QL_76.js";
10
+ import "./index-C9j6OhgK.js";
11
+ import "./index-D6wOnTAl.js";
12
+ import { h as y } from "./moment-D7p2TMB-.js";
13
+ import { u as j } from "./vue-i18n-DJXhpQga.js";
14
+ import { u as H, v as W, w as $ } from "./index.esm2017-DY9Lrb0O.js";
15
+ import { useRoute as Q } from "vue-router";
16
+ import { g as J, S as X, u as Z } from "./index-Cv-DbZdw.js";
17
17
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
18
  const te = () => {
19
- if (!Z.getBusinessId()) throw new Error("Invalid business ID");
20
- return X("queues");
19
+ if (!X.getBusinessId()) throw new Error("Invalid business ID");
20
+ return Z("queues");
21
21
  }, oe = {
22
22
  async readImportMember(p, w) {
23
23
  return J(
@@ -27,11 +27,11 @@ const te = () => {
27
27
  );
28
28
  }
29
29
  };
30
- var ae = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
31
- const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, xe = /* @__PURE__ */ h({
30
+ var ae = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476" };
31
+ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, Ee = /* @__PURE__ */ h({
32
32
  __name: "Queue",
33
33
  setup(p) {
34
- const v = $().query.type, { t: x } = W(), E = j(), C = [
34
+ const x = Q().query.type, { t: E } = j(), v = G(), D = [
35
35
  {
36
36
  header: "ID",
37
37
  accessorKey: "_id",
@@ -40,7 +40,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
40
40
  },
41
41
  cell(t) {
42
42
  return n("div", { class: "flex items-center" }, [
43
- n(y.FmIcon, {
43
+ n(b.FmIcon, {
44
44
  name: "content_copy",
45
45
  outline: !0,
46
46
  size: "sm",
@@ -71,10 +71,10 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
71
71
  },
72
72
  cell(t) {
73
73
  const e = t.row.original.status;
74
- return n(y.FmChip, {
74
+ return n(b.FmChip, {
75
75
  label: e ? u.title(e) : "-",
76
76
  compact: !0,
77
- class: D(e)
77
+ class: F(e)
78
78
  });
79
79
  },
80
80
  enableSorting: !1
@@ -86,7 +86,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
86
86
  },
87
87
  {
88
88
  header: "Created at",
89
- accessorFn: (t) => b(ee(t._id.toString())).format("D MMM YYYY, hh:mmA"),
89
+ accessorFn: (t) => y(ee(t._id.toString())).format("D MMM YYYY, hh:mmA"),
90
90
  enableSorting: !0
91
91
  },
92
92
  {
@@ -111,18 +111,18 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
111
111
  {
112
112
  header: "Failed reason",
113
113
  cell(t) {
114
- return n(y.FmButton, {
114
+ return n(b.FmButton, {
115
115
  icon: "visibility",
116
116
  variant: "tertiary",
117
117
  disabled: !t.row.original.failedReason,
118
118
  onClick: (e) => {
119
- e.preventDefault(), e.stopPropagation(), M(t.row.original.failedReason);
119
+ e.preventDefault(), e.stopPropagation(), R(t.row.original.failedReason);
120
120
  }
121
121
  });
122
122
  },
123
123
  enableSorting: !1
124
124
  }
125
- ], D = (t) => {
125
+ ], F = (t) => {
126
126
  switch (t) {
127
127
  case c.enum.ACTIVE:
128
128
  return "text-fm-color-typo-info bg-fm-color-system-info-100";
@@ -135,7 +135,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
135
135
  default:
136
136
  return "text-fm-color-typo-primary bg-fm-color-system-primary-100";
137
137
  }
138
- }, F = h({
138
+ }, C = h({
139
139
  name: "FailedReasonDialog",
140
140
  props: {
141
141
  data: {
@@ -147,27 +147,27 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
147
147
  return () => n("div", { class: "whitespace-pre-line" }, t.data);
148
148
  }
149
149
  });
150
- async function M(t) {
151
- E.open({
150
+ async function R(t) {
151
+ v.open({
152
152
  title: "Failed Reason",
153
153
  closeButton: !0,
154
154
  dismissAway: !0,
155
- contentComponent: F,
155
+ contentComponent: C,
156
156
  contentComponentProps: {
157
157
  data: t
158
158
  }
159
159
  });
160
160
  }
161
161
  const T = async (t) => {
162
- const e = H(void 0, ae.importFilesBucketUrl), r = K(e, t);
163
- return await Q(r);
164
- }, R = c.options.map((t) => ({ label: u.title(t), value: t })), s = A({
165
- type: v ?? [
162
+ const e = H(void 0, ae.importFilesBucketUrl), r = W(e, t);
163
+ return await $(r);
164
+ }, M = c.options.map((t) => ({ label: u.title(t), value: t })), s = A({
165
+ type: x ?? [
166
166
  d.enum.MEMBER_IMPORTED,
167
167
  d.enum.SEGMENTATION_IMPORTED
168
168
  ],
169
169
  status: []
170
- }), { tableMeta: i, rowData: P, onSort: k, debouncedFetchData: f } = G(
170
+ }), { tableMeta: i, rowData: N, onSort: k, debouncedFetchData: f } = L(
171
171
  async (t) => {
172
172
  const e = {
173
173
  ...s.value
@@ -176,11 +176,11 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
176
176
  r.resources.map(async (a) => {
177
177
  var _, I;
178
178
  const l = (I = (_ = a.context) == null ? void 0 : _.context) == null ? void 0 : I.file;
179
- if (b(a.context.emittedAt).diff(b(), "days") < 7 && l)
179
+ if (y(a.context.emittedAt).diff(y(), "days") < 7 && l)
180
180
  try {
181
181
  l.downloadUrl = await T(l == null ? void 0 : l.fbFilePath);
182
- } catch (N) {
183
- console.log(N);
182
+ } catch (P) {
183
+ console.log(P);
184
184
  }
185
185
  })
186
186
  ), {
@@ -201,7 +201,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
201
201
  const r = V("FmPageHead");
202
202
  return z(), O(q, null, [
203
203
  m(r, {
204
- title: o(x)("connect.queue.title")
204
+ title: o(E)("connect.queue.title")
205
205
  }, null, 8, ["title"]),
206
206
  g("div", re, [
207
207
  g("div", ne, [
@@ -231,15 +231,15 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
231
231
  "onUpdate:modelValue": e[1] || (e[1] = (a) => o(s).status = a),
232
232
  label: "Status: ",
233
233
  "show-item-label": !0,
234
- items: o(R)
234
+ items: o(M)
235
235
  }, null, 8, ["modelValue", "items"])
236
236
  ])
237
237
  ]),
238
- m(L, {
238
+ m(K, {
239
239
  loading: o(i).isLoading,
240
- "row-data": o(P),
240
+ "row-data": o(N),
241
241
  "row-count": o(i).totalRows,
242
- "column-defs": C,
242
+ "column-defs": D,
243
243
  "page-count": o(i).pageCount,
244
244
  "page-index": o(i).pageIndex,
245
245
  "page-size": o(i).pageSize,
@@ -256,5 +256,5 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
256
256
  }
257
257
  });
258
258
  export {
259
- xe as default
259
+ Ee as default
260
260
  };
@@ -2,19 +2,19 @@ var q = Object.defineProperty;
2
2
  var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
3
3
  var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
4
4
  import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
5
- import { u as oe, _ as ae } from "./usePagination-BjsffqjT.js";
6
- import { g as A } from "./user-B5jS1GLb.js";
5
+ import { u as oe, _ as ae } from "./usePagination-XyeJR5ws.js";
6
+ import { g as A } from "./user-l2YG1VjD.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-BPh_k5rA.js";
9
- import { u as j } from "./vue-i18n-CCjHlB6z.js";
10
- import { u as L } from "./loading-Cql_LElt.js";
8
+ import "./index-CH_QL_76.js";
9
+ import { u as j } from "./vue-i18n-DJXhpQga.js";
10
+ import { u as L } from "./loading-EnU7K0k3.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-C_6y8OES.js";
13
- import { c as ie, a as ne } from "./object-BYyQ0PZp.js";
14
- import { u as ce } from "./membership-BHD1GQ45.js";
12
+ import { r as v } from "./index-Dcxjgr6s.js";
13
+ import { c as ie, a as ne } from "./object-qECH92oz.js";
14
+ import { u as ce } from "./membership-B1eIzQDB.js";
15
15
  import { c as le } from "./string-Gcy5IM_H.js";
16
- import { c as de } from "./plugins-CnEVta3V.js";
17
- import { u as V, w as me } from "./xlsx-DmBOvA2N.js";
16
+ import { c as de } from "./plugins-DJ13vaqz.js";
17
+ import { u as V, w as me } from "./xlsx-DypdT1NW.js";
18
18
  import { e as f } from "./index-vh86FiIQ.js";
19
19
  import { h as ue } from "./moment-D7p2TMB-.js";
20
20
  import { o as pe } from "./objectId-dwaoBfJX.js";
@@ -0,0 +1,46 @@
1
+ import { defineComponent as p, computed as d, resolveComponent as o, openBlock as v, createElementBlock as f, Fragment as R, createVNode as n, unref as l, createElementVNode as s } from "vue";
2
+ import { u as E } from "./vue-i18n-DJXhpQga.js";
3
+ import { R as V } from "./app-D8i8XAyR.js";
4
+ import { useRouter as b } from "vue-router";
5
+ const w = { class: "flex flex-col" }, x = { class: "px-24" }, k = /* @__PURE__ */ p({
6
+ __name: "Review",
7
+ setup(F) {
8
+ const { t: a } = E(), c = b(), t = [
9
+ {
10
+ label: a("connect.review.tabs.overview"),
11
+ value: V["$connect-REVIEW_OVERVIEW"]
12
+ }
13
+ // Hidden until the external review source rollout is ready.
14
+ // {
15
+ // label: t('connect.review.tabs.settings'),
16
+ // value: ROUTE_NAME['$connect-REVIEW_SETTINGS'],
17
+ // },
18
+ ], r = d(
19
+ () => t.find((e) => e.value === c.currentRoute.value.name) ?? t[0]
20
+ );
21
+ async function m(e) {
22
+ await c.push({ name: e });
23
+ }
24
+ return (e, T) => {
25
+ const u = o("FmPageHead"), i = o("FmTabs"), _ = o("RouterView");
26
+ return v(), f(R, null, [
27
+ n(u, {
28
+ title: l(a)("connect.navigation.review")
29
+ }, null, 8, ["title"]),
30
+ s("div", w, [
31
+ s("div", x, [
32
+ n(i, {
33
+ "model-value": l(r).value,
34
+ items: t,
35
+ "onUpdate:modelValue": m
36
+ }, null, 8, ["model-value"])
37
+ ]),
38
+ n(_)
39
+ ])
40
+ ], 64);
41
+ };
42
+ }
43
+ });
44
+ export {
45
+ k as default
46
+ };
@@ -0,0 +1,238 @@
1
+ import { defineComponent as C, computed as M, openBlock as l, createElementBlock as g, normalizeClass as j, createElementVNode as u, createBlock as T, unref as e, toDisplayString as h, createCommentVNode as S, createVNode as y, onMounted as B, ref as P, Fragment as $, renderList as U, resolveComponent as z, isRef as V } from "vue";
2
+ import { u as R } from "./vue-i18n-DJXhpQga.js";
3
+ import { components as I } from "@feedmepos/ui-library";
4
+ import { r as L } from "./index-CJUzQG6t.js";
5
+ import { u as A } from "./business-6gZtKQ8L.js";
6
+ import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-B6tGeGGC.js";
7
+ import { R as D } from "./app-D8i8XAyR.js";
8
+ import { useRouter as G } from "vue-router";
9
+ const O = ["src"], W = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, q = {
10
+ key: 2,
11
+ class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
12
+ }, J = /* @__PURE__ */ C({
13
+ __name: "FacebookPageConfig",
14
+ props: {
15
+ page: {},
16
+ expanded: { type: Boolean },
17
+ availableLocations: {}
18
+ },
19
+ emits: ["toggleExpand", "toggleLocation"],
20
+ setup(s, { emit: n }) {
21
+ const _ = s, f = n, { t: i } = R(), m = M(() => _.page.locationIds);
22
+ return (w, p) => (l(), g("div", {
23
+ class: j([
24
+ "rounded-lg border overflow-hidden transition-colors",
25
+ s.expanded ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
26
+ ])
27
+ }, [
28
+ u("button", {
29
+ class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
30
+ onClick: p[0] || (p[0] = (c) => f("toggleExpand"))
31
+ }, [
32
+ s.page.pageProfileImageUrl ? (l(), g("img", {
33
+ key: 0,
34
+ src: s.page.pageProfileImageUrl,
35
+ class: "w-32 h-32 rounded-full shrink-0 object-cover"
36
+ }, null, 8, O)) : (l(), T(e(I).FmIcon, {
37
+ key: 1,
38
+ name: "thumb_up",
39
+ class: "text-fm-color-neutral-gray-400 shrink-0"
40
+ })),
41
+ u("span", W, h(s.page.pageName), 1),
42
+ s.page.locationIds.length > 0 ? (l(), g("span", q, h(e(i)("connect.review.locationsSelected", s.page.locationIds.length)), 1)) : S("", !0),
43
+ y(e(I).FmIcon, {
44
+ name: s.expanded ? "expand_less" : "expand_more",
45
+ class: "text-fm-color-neutral-gray-400 shrink-0"
46
+ }, null, 8, ["name"])
47
+ ]),
48
+ s.expanded ? (l(), T(H, {
49
+ key: 0,
50
+ locations: s.availableLocations,
51
+ "selected-ids": e(m),
52
+ onToggle: p[1] || (p[1] = (c) => f("toggleLocation", c))
53
+ }, null, 8, ["locations", "selected-ids"])) : S("", !0)
54
+ ], 2));
55
+ }
56
+ }), K = { class: "flex flex-col gap-8" }, Q = /* @__PURE__ */ C({
57
+ __name: "FacebookPageLocationMapping",
58
+ props: {
59
+ pages: {}
60
+ },
61
+ emits: ["update:pages"],
62
+ setup(s, { emit: n }) {
63
+ const _ = s, f = A();
64
+ B(() => f.readLocations());
65
+ const i = n, m = P(null), w = M(() => {
66
+ const r = /* @__PURE__ */ new Set();
67
+ for (const v of _.pages)
68
+ v.locationIds.forEach((a) => r.add(a));
69
+ return r;
70
+ });
71
+ function p(r) {
72
+ const v = new Set(r.locationIds);
73
+ return f.locations.filter((a) => {
74
+ const b = a._id.toString();
75
+ return !w.value.has(b) || v.has(b);
76
+ });
77
+ }
78
+ function c(r, v) {
79
+ const a = v._id.toString(), b = _.pages.map((o) => {
80
+ if (o.facebookPageId !== r) return o;
81
+ const t = o.locationIds.includes(a);
82
+ return {
83
+ ...o,
84
+ locationIds: t ? o.locationIds.filter((k) => k !== a) : [...o.locationIds, a]
85
+ };
86
+ });
87
+ i("update:pages", b);
88
+ }
89
+ function F(r) {
90
+ m.value = m.value === r ? null : r;
91
+ }
92
+ return (r, v) => (l(), g("div", K, [
93
+ (l(!0), g($, null, U(s.pages, (a) => (l(), T(J, {
94
+ key: a.facebookPageId,
95
+ page: a,
96
+ expanded: e(m) === a.facebookPageId,
97
+ "available-locations": p(a),
98
+ onToggleExpand: (b) => F(a.facebookPageId),
99
+ onToggleLocation: (b) => c(a.facebookPageId, b)
100
+ }, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
101
+ ]));
102
+ }
103
+ }), X = { class: "flex flex-col min-h-full gap-16 p-24" }, Y = {
104
+ key: 0,
105
+ class: "flex flex-col items-center justify-center flex-1 gap-16"
106
+ }, Z = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ee = {
107
+ key: 1,
108
+ class: "flex flex-col items-center justify-center flex-1 gap-16"
109
+ }, oe = { class: "fm-typo-en-body-lg-600" }, te = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ne = {
110
+ key: 2,
111
+ class: "flex flex-col items-center justify-center flex-1 gap-16"
112
+ }, ae = { class: "fm-typo-en-body-lg-600" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ce = { class: "fm-typo-en-body-lg-600" }, le = { class: "flex gap-8 justify-end mt-auto pt-8" }, ve = /* @__PURE__ */ C({
113
+ __name: "ReviewFacebookCallback",
114
+ setup(s) {
115
+ const { t: n } = R(), _ = G();
116
+ function f() {
117
+ return _.replace({ name: D["$connect-REVIEW_SETTINGS"] });
118
+ }
119
+ const i = P([]), m = P(!1), w = P(!1), p = P(!1), c = P(null), F = M(
120
+ () => i.value.some((o) => o.locationIds.length > 0)
121
+ );
122
+ function r(o, t) {
123
+ const k = new Map(
124
+ t.map((d) => [d.facebookPageId, d])
125
+ );
126
+ return o.map((d) => {
127
+ var x;
128
+ return {
129
+ ...d,
130
+ locationIds: ((x = k.get(d.facebookPageId)) == null ? void 0 : x.locationIds) ?? []
131
+ };
132
+ });
133
+ }
134
+ function v(o, t) {
135
+ return o instanceof Error ? o.message : t;
136
+ }
137
+ async function a() {
138
+ var d;
139
+ const o = window.location.hash;
140
+ if (!o) {
141
+ c.value = n("connect.review.noToken");
142
+ return;
143
+ }
144
+ const k = new URLSearchParams(o.slice(1)).get("access_token");
145
+ if (!k) {
146
+ c.value = n("connect.review.noToken");
147
+ return;
148
+ }
149
+ m.value = !0;
150
+ try {
151
+ const x = await L.getSource(), N = ((d = x == null ? void 0 : x.facebook) == null ? void 0 : d.pages) ?? [], E = await L.connectFacebook(k);
152
+ i.value = r((E == null ? void 0 : E.pages) ?? [], N), i.value.length === 0 && (c.value = n("connect.review.facebook.noPages"));
153
+ } catch (x) {
154
+ c.value = v(x, n("connect.review.facebook.failed"));
155
+ } finally {
156
+ m.value = !1;
157
+ }
158
+ }
159
+ async function b() {
160
+ const o = i.value.filter((t) => t.locationIds.length > 0).map((t) => ({
161
+ facebookPageId: t.facebookPageId,
162
+ locationIds: t.locationIds
163
+ }));
164
+ if (o.length === 0) {
165
+ c.value = n("connect.review.noMappings");
166
+ return;
167
+ }
168
+ w.value = !0;
169
+ try {
170
+ await L.updateFacebookPages(o), p.value = !0, setTimeout(f, 2e3);
171
+ } catch (t) {
172
+ c.value = v(t, n("connect.review.facebook.failed"));
173
+ } finally {
174
+ w.value = !1;
175
+ }
176
+ }
177
+ return B(a), (o, t) => {
178
+ const k = z("FmPageHead");
179
+ return l(), g($, null, [
180
+ y(k, {
181
+ title: e(n)("connect.navigation.review")
182
+ }, null, 8, ["title"]),
183
+ u("div", X, [
184
+ e(m) ? (l(), g("div", Y, [
185
+ y(e(I).FmIcon, {
186
+ name: "sync",
187
+ size: "xl",
188
+ class: "animate-spin text-fm-color-neutral-gray-400"
189
+ }),
190
+ u("p", Z, h(e(n)("connect.review.facebook.fetching")), 1)
191
+ ])) : e(p) ? (l(), g("div", ee, [
192
+ y(e(I).FmIcon, {
193
+ name: "check_circle",
194
+ size: "xl",
195
+ class: "text-fm-color-typo-success"
196
+ }),
197
+ u("p", oe, h(e(n)("connect.review.facebook.success")), 1),
198
+ u("p", te, h(e(n)("connect.review.redirecting")), 1)
199
+ ])) : e(c) ? (l(), g("div", ne, [
200
+ y(e(I).FmIcon, {
201
+ name: "error",
202
+ size: "xl",
203
+ class: "text-fm-color-system-error-500"
204
+ }),
205
+ u("p", ae, h(e(n)("connect.review.errorTitle")), 1),
206
+ u("p", se, h(e(c)), 1),
207
+ y(e(I).FmButton, {
208
+ label: e(n)("connect.review.goBack"),
209
+ onClick: t[0] || (t[0] = (d) => f())
210
+ }, null, 8, ["label"])
211
+ ])) : e(i).length > 0 ? (l(), g($, { key: 3 }, [
212
+ u("p", ce, h(e(n)("connect.review.facebook.selectPage")), 1),
213
+ y(Q, {
214
+ pages: e(i),
215
+ "onUpdate:pages": t[1] || (t[1] = (d) => V(i) ? i.value = d : null)
216
+ }, null, 8, ["pages"]),
217
+ u("div", le, [
218
+ y(e(I).FmButton, {
219
+ variant: "outlined",
220
+ label: e(n)("connect.review.cancel"),
221
+ onClick: t[2] || (t[2] = (d) => f())
222
+ }, null, 8, ["label"]),
223
+ y(e(I).FmButton, {
224
+ label: e(n)("connect.review.connect"),
225
+ disabled: !e(F),
226
+ loading: e(w),
227
+ onClick: b
228
+ }, null, 8, ["label", "disabled", "loading"])
229
+ ])
230
+ ], 64)) : S("", !0)
231
+ ])
232
+ ], 64);
233
+ };
234
+ }
235
+ });
236
+ export {
237
+ ve as default
238
+ };