@feedmepos/mf-connect 0.1.88-prod → 0.1.90-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 (101) hide show
  1. package/dist/{Analytic-DH7MUeMg.js → Analytic-BMwxfYv_.js} +11 -11
  2. package/dist/{App-BvOPZUJF.js → App-D_SZawqp.js} +7 -7
  3. package/dist/{Bin-CWAeC7oL.js → Bin-Dd1a25j_.js} +8 -8
  4. package/dist/{Broadcast-Vpm-osZ1.js → Broadcast-UAp6rjTh.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-v9vJnYoW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFe8C9fR.js} +7 -7
  6. package/dist/{Card--1s6c8KY.js → Card-CQuGfckK.js} +19 -19
  7. package/dist/{Collections-CEP5FIKv.js → Collections-oWvNX_oo.js} +8 -8
  8. package/dist/{Credit-B6jG7J-g.js → Credit-tGCTd7QC.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CQebWG2S.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7h5K6lN.js} +33 -33
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-I7kWbSCC.js → EffectSheet.vue_vue_type_style_index_0_lang-BvIk7GMj.js} +6 -6
  11. package/dist/{Experience-CbDjWVOA.js → Experience-D6w2OyuS.js} +8 -8
  12. package/dist/{FileSaver.min-BYIWYkDq.js → FileSaver.min-9I0Uce_o.js} +1 -1
  13. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  14. package/dist/{Game-IHq538Bo.js → Game-Bj8mS5qz.js} +9 -9
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BcDVLOQ_.js → ImageInput.vue_vue_type_script_setup_true_lang-D3B7IMDV.js} +1 -1
  16. package/dist/{Index-D9n_K2ME.js → Index-Dsexv-ef.js} +10 -10
  17. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-qsD4oq17.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CmB12mvX.js} +1 -1
  18. package/dist/{MainLayout-Bc70mjxN.js → MainLayout-o1wQv9lH.js} +1 -1
  19. package/dist/{Marketing-CpKGEo3O.js → Marketing-Dz0sk_DR.js} +6 -6
  20. package/dist/{Member-hrhNxwha.js → Member-rFVgJTbb.js} +12 -12
  21. package/dist/{MemberList-n8QLDF4q.js → MemberList-BpnL4Fbw.js} +436 -441
  22. package/dist/{MemberTransactions-j9hVfdXy.js → MemberTransactions-ouq288EU.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BqZzvVzE.js → MessageInput.vue_vue_type_script_setup_true_lang-wSeJMwF7.js} +9 -9
  24. package/dist/{Mission-C8RMYHS3.js → Mission-D1KR53bD.js} +9 -9
  25. package/dist/{Overview-BCV9GgGm.js → Overview-B5bzlo0A.js} +19 -19
  26. package/dist/{Point-D0FZORv-.js → Point-DTifJVdo.js} +8 -8
  27. package/dist/{Promotion-BTGNqPNj.js → Promotion-DAtAw5kG.js} +9 -9
  28. package/dist/{Queue-C7GqeBJW.js → Queue-DBnvPuuW.js} +11 -11
  29. package/dist/{Record-BeBFQIEI.js → Record-DI-q_FuN.js} +9 -9
  30. package/dist/{Reward-Kg5NPKOW.js → Reward-C9CxDqz_.js} +16 -16
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CM10gZbi.js → RewardGroup.vue_vue_type_script_setup_true_lang-BBE5Ymqj.js} +12 -12
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-I6R4IoFi.js → RuleGroup.vue_vue_type_script_setup_true_lang-DNM6f0iG.js} +15 -15
  33. package/dist/{Segment-CedyZCDq.js → Segment-B0Oy6ajr.js} +25 -25
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DClugt2g.js → SelectItems.vue_vue_type_script_setup_true_lang-Be6Ykmkc.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CYLrSMH0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-MARrd7Nr.js} +13 -13
  36. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-w9sbHf1G.js +226 -0
  37. package/dist/Setting-BUfHh3b6.js +2028 -0
  38. package/dist/{SettingAdvertisements-QtQravAS.js → SettingAdvertisements-D2qWdId7.js} +12 -12
  39. package/dist/{Store-Dg_Yt9y4.js → Store-mNM5AzFJ.js} +22 -22
  40. package/dist/{StoreRewards-D2Yjoezr.js → StoreRewards-D4-c0EPM.js} +15 -15
  41. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-tk42owGe.js +1118 -0
  42. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DoAu3ED_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C65gN2Gd.js} +5 -3
  43. package/dist/{Tier-I0cBxFGl.js → Tier-swAmEa8-.js} +22 -22
  44. package/dist/{Title-DkOrhFzS.js → Title-BQQBoFOx.js} +21 -21
  45. package/dist/{Transaction-DpkU2Z6k.js → Transaction-BCjSkDrw.js} +2 -2
  46. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DhriFqY7.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-IDqjTwZt.js} +6 -6
  47. package/dist/{Voucher-D3IusL1Y.js → Voucher-BAGLTdGv.js} +12 -12
  48. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjbJ9RtI.js → VoucherEditor.vue_vue_type_script_setup_true_lang-7CKmTEVm.js} +12 -12
  49. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfDMVHu8.js → ZodTextField.vue_vue_type_script_setup_true_lang-B_0BhFd7.js} +2 -2
  50. package/dist/{app-B4ceipxD.js → app-Dij-Gw3J.js} +49 -45
  51. package/dist/app.js +1 -1
  52. package/dist/{business--9g8v1Jk.js → business-BPttWtAG.js} +1 -1
  53. package/dist/{campaign-DDyRrYaq.js → campaign-DVQC46G6.js} +8 -8
  54. package/dist/{campaign-CHNmre5g.js → campaign-PkE8sv2w.js} +1 -1
  55. package/dist/{campaign.enum-B60QwrsD.js → campaign.enum-D6sGv-i6.js} +1 -1
  56. package/dist/{campaign.fn-DkT_XzKV.js → campaign.fn-CKpORxQM.js} +169 -169
  57. package/dist/{collectible.enum-CXihiAPI.js → collectible.enum-MjUCS47s.js} +1 -1
  58. package/dist/{collection.fn-135DMEWY.js → collection.fn-BgLy48_a.js} +2 -2
  59. package/dist/{dto-CFddY1Mk.js → dto-Cr1_4S0y.js} +4 -4
  60. package/dist/{effect-CAbTi9gd.js → effect-CZOUmaXH.js} +1 -1
  61. package/dist/{email-addresses-DabtIvSg.js → email-addresses-DgPF09-i.js} +2 -2
  62. package/dist/{export-Cnb1qaSr.js → export-BGwLWDbw.js} +3 -3
  63. package/dist/{helper-TmvjXMkn.js → helper-BpGjM57Y.js} +1 -1
  64. package/dist/{index-H-ZlVzI4.js → index-8Mt35h00.js} +3 -3
  65. package/dist/{index-DvfZn-AO.js → index-AGdd55s3.js} +3 -3
  66. package/dist/{index-DRSol6ON.js → index-BzNxgycz.js} +1 -1
  67. package/dist/{index-BOZq4xp0.js → index-C2b2PGqB.js} +3 -3
  68. package/dist/{index-DYfvKVuf.js → index-CZbs1ScI.js} +1 -1
  69. package/dist/index-CsjJKy32.js +85 -0
  70. package/dist/{index-DhzPWYCm.js → index-D3jQoHcb.js} +23 -12
  71. package/dist/{index-C71oKRli.js → index-DG88MQyX.js} +1 -1
  72. package/dist/{index-CLvNN2TN.js → index-DVtnOY4x.js} +6 -6
  73. package/dist/{index-DE6QO1GD.js → index-DjEcMAQl.js} +1 -1
  74. package/dist/{index-CR6n1KJO.js → index-Dx04wWQ2.js} +4 -4
  75. package/dist/{index-CGZ7y8Nw.js → index-dSK3QWJX.js} +1 -1
  76. package/dist/{index-BB3m_Vvq.js → index-qGQhKrNH.js} +5 -3
  77. package/dist/{index.esm2017-DFzo1fgU.js → index.esm2017-BnCWqavv.js} +1 -1
  78. package/dist/{loading-Bxz_czvo.js → loading-kCbpDTvS.js} +1 -1
  79. package/dist/{lodash-BxKnmCIx.js → lodash-C4AZ3S-J.js} +1 -1
  80. package/dist/{membership-8JAQtDJg.js → membership-D2-ldXWY.js} +3 -3
  81. package/dist/{money-Diy9s426.js → money-BueaFHxA.js} +1 -1
  82. package/dist/{number-X7dL-fLQ.js → number-DQbzn_l_.js} +1 -1
  83. package/dist/{objectid-YtPYacEi.js → objectid-B_jNHjAd.js} +5 -5
  84. package/dist/{plugins-BZVsan_J.js → plugins-D5Na7PGX.js} +3 -3
  85. package/dist/{reward-DBMDUfD_.js → reward-DJqNxI9u.js} +1 -1
  86. package/dist/{rule-D7c4bEcg.js → rule-CHRKj3Qt.js} +3 -3
  87. package/dist/{rule-builder-CsB4hJee.js → rule-builder-CEZ2VxtL.js} +1 -1
  88. package/dist/{template-B1BsXMbV.js → template-BFhV6iql.js} +7 -7
  89. package/dist/{timezone-3lPXoGaK.js → timezone-BQhT-oxQ.js} +5 -3
  90. package/dist/{trigger-CCc-xwrQ.js → trigger-nhg31Cm2.js} +5 -5
  91. package/dist/usePagination-z6Io9pE3.js +220 -0
  92. package/dist/{user-DPbEx8dH.js → user-uP7Z7WUa.js} +1 -1
  93. package/dist/{vue-i18n-DpB0kfM3.js → vue-i18n-DYzNH5z4.js} +258 -258
  94. package/dist/{xlsx-CmTsMcSJ.js → xlsx-DTeYpknU.js} +1 -1
  95. package/dist/{zod-DvaskSX-.js → zod-YWGh4sc1.js} +1 -1
  96. package/package.json +1 -1
  97. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-D6zlvgMa.js +0 -148
  98. package/dist/Setting-CkieobUB.js +0 -1989
  99. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CLaGyjd9.js +0 -1016
  100. package/dist/index-D83ZCuxk.js +0 -76
  101. package/dist/usePagination-RN_u8hW4.js +0 -223
@@ -0,0 +1,226 @@
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
+ import { J as Q } from "./JsonViewer-v8_C7l5N.js";
3
+ import { _ as F } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
4
+ import { u as W } from "./loading-kCbpDTvS.js";
5
+ import { u as X } from "./app-wDQR6dpb.js";
6
+ import { l as Y } from "./lodash-C4AZ3S-J.js";
7
+ import { m as Z } from "./index-CsjJKy32.js";
8
+ import { c as ee } from "./campaign-PkE8sv2w.js";
9
+ const ae = { class: "space-y-16" }, te = { class: "fm-typo-en-body-md-600" }, oe = { class: "flex items-center justify-end" }, le = {
10
+ key: 0,
11
+ class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
12
+ }, ne = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, se = { class: "flex gap-8 items-center" }, ie = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, re = { class: "flex gap-8 items-center" }, ue = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, de = { class: "flex gap-8" }, ce = { class: "flex items-center gap-8" }, Se = /* @__PURE__ */ O({
13
+ __name: "SendVoucherSheet",
14
+ emits: ["success"],
15
+ setup(me, { expose: M, emit: R }) {
16
+ const { minor: j } = W, h = p(""), r = p({}), N = R, m = p(!1), i = p([]);
17
+ function P(o) {
18
+ m.value = !0, h.value = o.campaignId, i.value = [];
19
+ }
20
+ function S() {
21
+ m.value = !1;
22
+ }
23
+ const B = [
24
+ {
25
+ header: "Name",
26
+ accessorFn: (o) => o.name || "No Profile"
27
+ },
28
+ {
29
+ header: "Phone",
30
+ accessorFn: (o) => o.phoneNumber || "-"
31
+ }
32
+ ], e = p({
33
+ searchValue: "",
34
+ pageSize: 10,
35
+ pageCount: 0,
36
+ pageIndex: 0,
37
+ totalRows: 0,
38
+ isLoading: !1
39
+ }), u = p([]), L = g(() => e.value.pageIndex + 1), _ = g(
40
+ () => e.value.pageIndex * e.value.pageSize
41
+ ), U = g(
42
+ () => Math.min(
43
+ _.value + e.value.pageSize,
44
+ e.value.totalRows
45
+ )
46
+ ), w = g(() => e.value.pageIndex > 0), C = g(
47
+ () => e.value.pageIndex < e.value.pageCount - 1
48
+ ), b = async (o) => {
49
+ e.value.pageSize = o.pageSize, e.value.pageIndex = o.pageIndex, e.value.isLoading = !0, u.value = [];
50
+ try {
51
+ const a = await Z.read({
52
+ limit: o.pageSize,
53
+ skip: o.pageIndex,
54
+ sortBy: "_id",
55
+ search: e.value.searchValue,
56
+ descending: !1
57
+ });
58
+ u.value = a.resources, e.value.totalRows = a.meta.totalResources ?? 0, e.value.pageCount = a.meta.totalPages ?? 0, r.value = {}, i.value.forEach((d) => {
59
+ const y = u.value.findIndex((c) => c._id == d);
60
+ y > -1 && (r.value[y] = !0);
61
+ });
62
+ } finally {
63
+ e.value.isLoading = !1;
64
+ }
65
+ }, $ = Y.debounce(async () => {
66
+ await b({ pageSize: e.value.pageSize, pageIndex: 0 });
67
+ }, 500), v = async (o) => {
68
+ await b({ pageSize: e.value.pageSize, pageIndex: o });
69
+ }, A = async (o) => {
70
+ await b({ pageSize: o, pageIndex: 0 });
71
+ };
72
+ function E() {
73
+ u.value.length > 0 && (i.value = i.value.filter(
74
+ (o) => !u.value.some((a) => a._id === o) || // Keep if not in current page
75
+ Object.entries(r.value).some(
76
+ ([a, d]) => d && u.value[a]._id === o
77
+ // Keep if selected in current page
78
+ )
79
+ ));
80
+ for (const [o, a] of Object.entries(r.value))
81
+ if (a) {
82
+ const d = u.value[o]._id;
83
+ i.value.includes(d) || i.value.push(d);
84
+ }
85
+ }
86
+ async function D(o) {
87
+ i.value.length < 1 || await j(
88
+ async () => {
89
+ await ee.sendCollection(h.value, {
90
+ memberId: i.value
91
+ }), await N("success"), S();
92
+ },
93
+ {
94
+ message: "Sending claim(s)",
95
+ successMessage: "Claim(s) created"
96
+ }
97
+ );
98
+ }
99
+ return T(r, E, { deep: !0 }), M({
100
+ showSheet: P,
101
+ hideSheet: S
102
+ }), q(async () => {
103
+ await b(e.value);
104
+ }), (o, a) => {
105
+ const d = x("FmSearch"), y = x("FmTable"), c = x("FmButton"), J = x("FmSideSheet");
106
+ return I(), G(J, {
107
+ "max-width": 560,
108
+ "dismiss-away": !0,
109
+ header: "Send voucher to",
110
+ modelValue: t(m),
111
+ "onUpdate:modelValue": [
112
+ a[8] || (a[8] = (l) => k(m) ? m.value = l : null),
113
+ a[9] || (a[9] = (l) => m.value = l)
114
+ ]
115
+ }, {
116
+ "side-sheet-footer": z(() => [
117
+ n("div", ce, [
118
+ s(c, {
119
+ label: "Send",
120
+ loading: t(X)().isLoading,
121
+ onClick: D
122
+ }, null, 8, ["loading"]),
123
+ s(c, {
124
+ label: "Cancel",
125
+ type: "button",
126
+ variant: "tertiary",
127
+ onClick: a[7] || (a[7] = (l) => m.value = !1)
128
+ })
129
+ ])
130
+ ]),
131
+ default: z(() => [
132
+ s(Q, { json: t(i) }, null, 8, ["json"]),
133
+ n("div", ae, [
134
+ n("div", te, f(t(i).length) + " members selected ", 1),
135
+ n("div", oe, [
136
+ s(d, {
137
+ class: "mt-4",
138
+ modelValue: t(e).searchValue,
139
+ "onUpdate:modelValue": [
140
+ a[0] || (a[0] = (l) => t(e).searchValue = l),
141
+ t($)
142
+ ],
143
+ placeholder: "Search Member",
144
+ collapsible: ""
145
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
146
+ ]),
147
+ s(y, {
148
+ modelValue: t(r),
149
+ "onUpdate:modelValue": a[1] || (a[1] = (l) => k(r) ? r.value = l : null),
150
+ selection: "multiple",
151
+ loading: t(e).isLoading,
152
+ "row-data": t(u),
153
+ "column-defs": B,
154
+ "page-size": t(e).pageSize,
155
+ "page-count": t(e).pageCount,
156
+ "fetch-fn": void 0,
157
+ "hide-footer": ""
158
+ }, null, 8, ["modelValue", "loading", "row-data", "page-size", "page-count"]),
159
+ t(e).totalRows > t(e).pageSize ? (I(), H("div", le, [
160
+ n("div", ne, [
161
+ n("div", se, [
162
+ a[10] || (a[10] = n("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
163
+ s(F, {
164
+ items: [
165
+ { label: "10", value: 10 },
166
+ { label: "20", value: 20 },
167
+ { label: "50", value: 50 }
168
+ ],
169
+ value: t(e).pageSize,
170
+ "onUpdate:modelValue": A
171
+ }, null, 8, ["value"])
172
+ ]),
173
+ n("span", ie, f(t(_) + 1) + " - " + f(t(U)) + " of " + f(t(e).totalRows) + " items ", 1)
174
+ ]),
175
+ n("div", re, [
176
+ s(F, {
177
+ items: Array.from(Array(t(e).pageCount), (l, V) => ({
178
+ label: (V + 1).toString(),
179
+ value: V + 1
180
+ })),
181
+ value: t(L),
182
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => v(l - 1))
183
+ }, null, 8, ["items", "value"]),
184
+ n("span", ue, " of " + f(t(e).pageCount) + " pages ", 1),
185
+ n("div", de, [
186
+ s(c, {
187
+ disabled: !t(w),
188
+ icon: "first_page",
189
+ "icon-color": "neutral-black",
190
+ variant: "tertiary",
191
+ onClick: a[3] || (a[3] = (l) => v(0))
192
+ }, null, 8, ["disabled"]),
193
+ s(c, {
194
+ disabled: !t(w),
195
+ icon: "chevron_left",
196
+ "icon-color": "neutral-black",
197
+ variant: "tertiary",
198
+ onClick: a[4] || (a[4] = (l) => v(t(e).pageIndex - 1))
199
+ }, null, 8, ["disabled"]),
200
+ s(c, {
201
+ disabled: !t(C),
202
+ icon: "chevron_right",
203
+ "icon-color": "neutral-black",
204
+ variant: "tertiary",
205
+ onClick: a[5] || (a[5] = (l) => v(t(e).pageIndex + 1))
206
+ }, null, 8, ["disabled"]),
207
+ s(c, {
208
+ disabled: !t(C),
209
+ icon: "last_page",
210
+ "icon-color": "neutral-black",
211
+ variant: "tertiary",
212
+ onClick: a[6] || (a[6] = (l) => v(t(e).pageCount - 1))
213
+ }, null, 8, ["disabled"])
214
+ ])
215
+ ])
216
+ ])) : K("", !0)
217
+ ])
218
+ ]),
219
+ _: 1
220
+ }, 8, ["modelValue"]);
221
+ };
222
+ }
223
+ });
224
+ export {
225
+ Se as _
226
+ };