@feedmepos/mf-connect 0.1.0-beta.9 → 0.1.1-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 (102) hide show
  1. package/dist/Analytic-C2etD-eu.js +620 -0
  2. package/dist/{App-DQUbRsdA.js → App-DlRvkDpN.js} +58 -59
  3. package/dist/Broadcast-DpCGUS6r.js +216 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-BFllvG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cj4IcH5D.js} +20 -20
  5. package/dist/Card-DjGC6jmq.js +823 -0
  6. package/dist/Collections-Q2pYWnJF.js +440 -0
  7. package/dist/Credit-DOIq2VYW.js +214 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D7ML8ePp.js} +1010 -1026
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CyxWG5I7.js +344 -0
  10. package/dist/Experience-DUst4I0H.js +211 -0
  11. package/dist/Game-CXnQR-wV.js +250 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
  13. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
  14. package/dist/Marketing-CZfHsMFC.js +309 -0
  15. package/dist/Member-CX5Ohgeg.js +92 -0
  16. package/dist/MemberList-D8I3SaAs.js +1040 -0
  17. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  18. package/dist/{MemberTransactions-zSxSnUkK.js → MemberTransactions-DfZNbCHD.js} +1 -1
  19. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BxFVEoBX.js +203 -0
  20. package/dist/Mission-S1pwDbqp.js +248 -0
  21. package/dist/Point-BdLUcGZy.js +220 -0
  22. package/dist/Promotion-DWAeQGkU.js +244 -0
  23. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CTKKhH-r.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dux_NMO5.js} +577 -568
  24. package/dist/Segment-CXSE8Bzf.js +560 -0
  25. package/dist/Setting-CLuXuEId.js +1870 -0
  26. package/dist/Store-Be3cui0S.js +1533 -0
  27. package/dist/StoreRewards-zFy_w8p4.js +429 -0
  28. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-2Jqj_rKv.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DxGJKgbc.js} +10 -10
  29. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BkdSj0cX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dreo45H1.js} +1 -1
  30. package/dist/{Tier-Cpl0FV8L.js → Tier-ChzcISYF.js} +453 -481
  31. package/dist/{Title-CbMDd1Et.js → Title-DQSjhBkT.js} +295 -314
  32. package/dist/Transaction-CeWmWpN_.js +36 -0
  33. package/dist/Voucher-BkLIxiZN.js +485 -0
  34. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
  35. package/dist/app-CLNirPsB.js +2974 -0
  36. package/dist/{app-VxaUCtgl.js → app-DuNsy0aC.js} +1 -1
  37. package/dist/app.js +3 -5
  38. package/dist/{business-DR7jpnLz.js → business-COGiTmLD.js} +1 -1
  39. package/dist/{campaign-MqcTb329.js → campaign-BHZMjQi5.js} +3 -5
  40. package/dist/{collection.fn-CvEoe61K.js → collection.fn-sAxtYO_r.js} +2 -2
  41. package/dist/dto-ndeeV_nc.js +1145 -0
  42. package/dist/{effect-BjjQeiQg.js → effect-BQt0rkdT.js} +9 -9
  43. package/dist/email-addresses-B3PazwKs.js +705 -0
  44. package/dist/{export-B8cvWh5n.js → export-D6r-xNji.js} +3 -3
  45. package/dist/{helper-DfgVNY7B.js → helper-CrjQw_Et.js} +1 -1
  46. package/dist/{index-CWR3qYjb.js → index-Btlj28Vg.js} +1 -1
  47. package/dist/{index-C7zMfUgy.js → index-Buy-yvAZ.js} +319 -304
  48. package/dist/{index-0UYoh1-7.js → index-C3AAy__p.js} +1 -1
  49. package/dist/index-CHAaFSD2.js +11 -0
  50. package/dist/{index-Dap5R3vr.js → index-Cg3RFxc9.js} +91 -102
  51. package/dist/{index-2P9w5u3m.js → index-CqpEhMr6.js} +4 -4
  52. package/dist/{index-BsfWRB8R.js → index-CvHj-wYi.js} +1 -1
  53. package/dist/index-DGLmbBnE.js +28997 -0
  54. package/dist/{index-CJ8Uh2Ja.js → index-DXpd07G3.js} +3 -3
  55. package/dist/{index-B5NufbUt.js → index-Daax_BQa.js} +1 -1
  56. package/dist/{index-C2JNcGc-.js → index-DrLEuIe1.js} +281 -299
  57. package/dist/{index-DBy30v8N.js → index-tSEYvA-2.js} +3 -3
  58. package/dist/{index.esm2017-D1X3PgpO.js → index.esm2017-a5BlZ76G.js} +55 -55
  59. package/dist/{loading-CJ3nOovJ.js → loading-B3XGyQ8W.js} +460 -469
  60. package/dist/{membership-B1cmSRyk.js → membership-GIOJ1ptN.js} +3 -3
  61. package/dist/money-z7VwzhZP.js +15 -0
  62. package/dist/number-DHYb2ua_.js +12 -0
  63. package/dist/{rule-builder-CSmOONdb.js → rule-builder-CcsWd5r9.js} +1 -1
  64. package/dist/{rule-ChWyR-0j.js → rule-iIEblTE4.js} +179 -177
  65. package/dist/style.css +1 -1
  66. package/dist/{template-Cug7aRK0.js → template-DMRMDZOW.js} +63 -63
  67. package/dist/{xlsx-CfgPFFvp.js → usePagination-CNFe0T2B.js} +3176 -2955
  68. package/package.json +5 -8
  69. package/dist/Analytic-CMXUjK_F.js +0 -622
  70. package/dist/Broadcast-DowFtHv6.js +0 -223
  71. package/dist/Card-C7rhL0pV.js +0 -825
  72. package/dist/Collections-B-1wlk3r.js +0 -453
  73. package/dist/Credit-DDjozmoF.js +0 -220
  74. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-pwMuIgs5.js +0 -345
  75. package/dist/Experience-BbE-c1Op.js +0 -221
  76. package/dist/Game-DQdRpaN-.js +0 -255
  77. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  78. package/dist/MainLayout-B1aJoR95.js +0 -41
  79. package/dist/Marketing-Dgmxzg4h.js +0 -316
  80. package/dist/Member-w23oRVwN.js +0 -69
  81. package/dist/MemberList-BLIdjznQ.js +0 -1735
  82. package/dist/MemberOverview-wL_ailso.js +0 -58
  83. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dy_lMdZA.js +0 -432
  84. package/dist/Mission-Cjt0E083.js +0 -261
  85. package/dist/Point-CQJL3Ewu.js +0 -222
  86. package/dist/Promotion-BYViH3bu.js +0 -247
  87. package/dist/Segment-B9Jj1ak0.js +0 -437
  88. package/dist/Setting-DXWbgRxs.js +0 -1901
  89. package/dist/Store-Dswk2e_z.js +0 -1511
  90. package/dist/StoreRewards-CNUhG_Ue.js +0 -401
  91. package/dist/Transaction-BB-kk-84.js +0 -39
  92. package/dist/Voucher-b1_Jlm6X.js +0 -490
  93. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-pG-SrXp9.js +0 -56
  94. package/dist/app-DCHKJoql.js +0 -5639
  95. package/dist/dto-jcK3TGB7.js +0 -2770
  96. package/dist/index-Cv7pLAYq.js +0 -3
  97. package/dist/index-LrSSauN2.js +0 -29193
  98. package/dist/money-BEATdGS6.js +0 -15
  99. package/dist/number-CeAYAKCp.js +0 -12
  100. package/dist/usePagination-BeF5K3M7.js +0 -223
  101. package/dist/vue-i18n-BRhKDHdF.js +0 -2365
  102. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -1,490 +0,0 @@
1
- import { defineComponent as X, ref as _, watch as N, onMounted as J, resolveComponent as h, openBlock as y, createBlock as k, unref as t, isRef as j, withCtx as M, createElementVNode as l, createVNode as r, toDisplayString as F, computed as oe, h as C, createElementBlock as $, Fragment as T, renderList as te, resolveDynamicComponent as ae, createCommentVNode as K } from "vue";
2
- import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as se, components as V } from "@feedmepos/ui-library";
4
- import { u as W, p as z, a as le } from "./loading-CJ3nOovJ.js";
5
- import { useCoreStore as ce } from "@feedmepos/mf-common";
6
- import { u as ie } from "./business-DR7jpnLz.js";
7
- import { u as re } from "./campaign-MqcTb329.js";
8
- import { g as D, b as q } from "./dto-jcK3TGB7.js";
9
- import "./index-Cv7pLAYq.js";
10
- import { u as ue } from "./template-Cug7aRK0.js";
11
- import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js";
12
- import { _ as de } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
13
- import { J as pe } from "./JsonViewer-v8_C7l5N.js";
14
- import { u as fe } from "./app-wDQR6dpb.js";
15
- import { l as he } from "./lodash-B5I3zXaY.js";
16
- import { m as ve } from "./index-0UYoh1-7.js";
17
- import { c as L } from "./index-CWR3qYjb.js";
18
- import { u as ge } from "./vue-i18n-BRhKDHdF.js";
19
- import { useRouter as ye } from "vue-router";
20
- import { R as G } from "./app-DCHKJoql.js";
21
- const _e = { class: "space-y-16" }, be = { class: "fm-typo-en-body-md-600" }, Ce = { class: "flex items-center justify-end" }, we = { class: "flex items-center gap-8" }, Se = /* @__PURE__ */ X({
22
- __name: "SendVoucherSheet",
23
- emits: ["success"],
24
- setup(Q, { expose: a, emit: A }) {
25
- const { minor: R } = W, P = _(""), v = _({}), b = A, g = _(!1), u = _([]);
26
- function U(c) {
27
- g.value = !0, P.value = c.campaignId, u.value = [];
28
- }
29
- function m() {
30
- g.value = !1;
31
- }
32
- const S = [
33
- {
34
- header: "Name",
35
- accessorFn: (c) => c.name || "No Profile"
36
- },
37
- {
38
- header: "Phone",
39
- accessorFn: (c) => c.phoneNumber || "-"
40
- }
41
- ], i = _({
42
- searchValue: "",
43
- pageSize: 10,
44
- pageCount: 0,
45
- pageIndex: 0,
46
- totalRows: 0,
47
- isLoading: !1
48
- }), f = _([]), w = async (c) => {
49
- i.value.isLoading = !0, f.value = [];
50
- const e = await ve.read({
51
- limit: c.pageSize,
52
- skip: c.pageIndex,
53
- sortBy: "_id",
54
- search: i.value.searchValue,
55
- descending: !1
56
- });
57
- f.value = e.resources, i.value.totalRows = e.meta.totalResources ?? 0, i.value.pageCount = e.meta.totalPages ?? 0, i.value.isLoading = !1, v.value = {}, u.value.forEach((o) => {
58
- const s = f.value.findIndex((d) => d._id == o);
59
- s > -1 && (console.log(s, "fetch member index"), v.value[s] = !0);
60
- });
61
- };
62
- function E() {
63
- f.value.length > 0 && (u.value = u.value.filter(
64
- (c) => !f.value.some((e) => e._id === c) || // Keep if not in current page
65
- Object.entries(v.value).some(
66
- ([e, o]) => o && f.value[e]._id === c
67
- // Keep if selected in current page
68
- )
69
- ));
70
- for (const [c, e] of Object.entries(v.value))
71
- if (e) {
72
- const o = f.value[c]._id;
73
- u.value.includes(o) || u.value.push(o);
74
- }
75
- }
76
- async function x(c) {
77
- u.value.length < 1 || await R(
78
- async () => {
79
- await L.sendCollection(P.value, {
80
- memberId: u.value
81
- }), await b("success"), m();
82
- },
83
- {
84
- message: "Sending claim(s)",
85
- successMessage: "Claim(s) created"
86
- }
87
- );
88
- }
89
- return N(v, E, { deep: !0 }), N(
90
- () => i.value.searchValue,
91
- he.debounce(async () => {
92
- await w({ pageSize: 10, pageIndex: 0 });
93
- }, 500)
94
- ), a({
95
- showSheet: U,
96
- hideSheet: m
97
- }), J(async () => {
98
- await w(i.value);
99
- }), (c, e) => {
100
- const o = h("FmSearch"), s = h("FmTable"), d = h("FmButton"), B = h("FmSideSheet");
101
- return y(), k(B, {
102
- "max-width": 560,
103
- "dismiss-away": !0,
104
- header: "Send voucher to",
105
- modelValue: t(g),
106
- "onUpdate:modelValue": [
107
- e[3] || (e[3] = (p) => j(g) ? g.value = p : null),
108
- e[4] || (e[4] = (p) => g.value = p)
109
- ]
110
- }, {
111
- "side-sheet-footer": M(() => [
112
- l("div", we, [
113
- r(d, {
114
- label: "Send",
115
- loading: t(fe)().isLoading,
116
- onClick: x
117
- }, null, 8, ["loading"]),
118
- r(d, {
119
- label: "Cancel",
120
- type: "button",
121
- variant: "tertiary",
122
- onClick: e[2] || (e[2] = (p) => g.value = !1)
123
- })
124
- ])
125
- ]),
126
- default: M(() => [
127
- r(pe, { json: t(u) }, null, 8, ["json"]),
128
- l("div", _e, [
129
- l("div", be, F(t(u).length) + " members selected ", 1),
130
- l("div", Ce, [
131
- r(o, {
132
- class: "mt-4",
133
- modelValue: t(i).searchValue,
134
- "onUpdate:modelValue": e[0] || (e[0] = (p) => t(i).searchValue = p),
135
- placeholder: "Search Member",
136
- collapsible: ""
137
- }, null, 8, ["modelValue"])
138
- ]),
139
- r(s, {
140
- modelValue: t(v),
141
- "onUpdate:modelValue": e[1] || (e[1] = (p) => j(v) ? v.value = p : null),
142
- selection: "multiple",
143
- loading: t(i).isLoading,
144
- "row-data": t(f),
145
- "column-defs": S,
146
- "page-size": t(i).pageSize,
147
- "page-count": t(i).pageCount,
148
- "hide-footer": t(i).totalRows <= t(i).pageSize,
149
- "fetch-fn": w
150
- }, null, 8, ["modelValue", "loading", "row-data", "page-size", "page-count", "hide-footer"])
151
- ])
152
- ]),
153
- _: 1
154
- }, 8, ["modelValue"]);
155
- };
156
- }
157
- });
158
- var xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
159
- const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-center justify-between w-full" }, Fe = { class: "flex gap-8 overflow-x-auto" }, Ie = { class: "space-y-8" }, Le = { class: "flex w-full gap-4 items-center" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Pe = { class: "fm-typo-en-body-lg-600" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Ae = { class: "flex flex-col gap-16 text-center" }, Be = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, no = /* @__PURE__ */ X({
160
- __name: "Voucher",
161
- setup(Q) {
162
- const { t: a } = ge(), A = {
163
- label: a("connect.voucher.createCampaign"),
164
- value: "create",
165
- isPrimary: !0,
166
- prependIcon: "add"
167
- }, R = se(), P = ue("VOUCHER", R), v = ie(), b = re(), { global: g, minor: u } = W, U = ye(), m = _({
168
- searchKey: "",
169
- location: null
170
- }), S = oe(
171
- () => b.campaigns.voucher.filter(
172
- (e) => !m.value.location || !e.targetLocation || e.targetLocation.includes(m.value.location)
173
- )
174
- ), i = [
175
- {
176
- header: a("connect.voucher.voucherTitle"),
177
- accessorFn: (e) => e.name
178
- },
179
- {
180
- header: a("connect.voucher.status"),
181
- cell(e) {
182
- return D(e.row.original);
183
- }
184
- },
185
- {
186
- header: a("connect.voucher.summary"),
187
- accessorFn: (e) => q(e)
188
- },
189
- {
190
- header: a("connect.voucher.quota"),
191
- accessorFn: (e) => {
192
- var o;
193
- return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
194
- }
195
- },
196
- {
197
- header: a("connect.voucher.claimed"),
198
- accessorFn: (e) => {
199
- var o;
200
- return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
201
- }
202
- },
203
- {
204
- header: a("connect.voucher.actions"),
205
- cell(e) {
206
- return C("div", { class: "flex items-center justify-end" }, [
207
- C(V.FmButton, {
208
- icon: "visibility",
209
- variant: "tertiary",
210
- iconColor: "neutral-gray-400",
211
- onClick: async (o) => {
212
- o.stopPropagation(), await U.push({
213
- name: G["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
214
- params: { id: e.row.original._id }
215
- });
216
- }
217
- }),
218
- C(
219
- V.FmMenu,
220
- {
221
- placement: "bottom-end",
222
- onClick: (o) => {
223
- o.stopPropagation();
224
- }
225
- },
226
- {
227
- "menu-button": () => C(V.FmButton, {
228
- icon: "more_vert",
229
- iconColor: "neutral-gray-400",
230
- variant: "tertiary"
231
- }),
232
- default: () => {
233
- const o = [
234
- C(
235
- V.FmMenuItem,
236
- {
237
- onClick: async (s) => {
238
- s.stopPropagation(), E(e.row.original);
239
- }
240
- },
241
- {
242
- label: C(
243
- "div",
244
- {
245
- class: "text-fm-color-typo-error fm-typo-en-body-md-400"
246
- },
247
- a("connect.voucher.remove")
248
- )
249
- }
250
- )
251
- ];
252
- return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
253
- C(V.FmMenuItem, {
254
- label: a("connect.voucher.send"),
255
- onClick: async (s) => {
256
- var d;
257
- s.stopPropagation(), (d = w.value) == null || d.showSheet({
258
- campaignId: e.row.original._id
259
- });
260
- }
261
- })
262
- ), o.unshift(
263
- C(V.FmMenuItem, {
264
- label: a("connect.voucher.share"),
265
- onClick: async (s) => {
266
- if (s.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
267
- return await z.confirm(
268
- "Cannot share a voucher that is not a simple claim.",
269
- "Share Voucher",
270
- "OK"
271
- );
272
- await le(
273
- `https://${ce().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
274
- {
275
- successMessage: "Voucher link copied to clipboard"
276
- }
277
- );
278
- }
279
- })
280
- )), o;
281
- }
282
- }
283
- )
284
- ]);
285
- }
286
- }
287
- ], f = _(), w = _();
288
- async function E(e) {
289
- await z.remove(a("voucher.confirmRemove", { name: e.name })) && await u(
290
- async () => {
291
- await L.delete(e._id), await b.read("VOUCHER");
292
- },
293
- {
294
- message: a("voucher.removing", { name: e.name }),
295
- successMessage: a("voucher.removedSuccessfully", { name: e.name })
296
- }
297
- );
298
- }
299
- async function x(e) {
300
- e ? await o() : P.open(async (s) => {
301
- await o(s);
302
- });
303
- async function o(s) {
304
- var d;
305
- (d = f.value) == null || d.showSheet(
306
- !0,
307
- "VOUCHER",
308
- e ? await L.readById(e._id) : void 0,
309
- s
310
- );
311
- }
312
- }
313
- async function c(e) {
314
- e.campaign._id && await new Promise((o) => {
315
- R.open({
316
- title: "Confirmation",
317
- message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
318
- primaryActions: { text: "Update all", close: !0 },
319
- secondaryActions: { text: "Update future only", close: !0 }
320
- }).onPrimary(async () => {
321
- var s;
322
- e.updateCollections = !0, (s = window.top) == null || s.postMessage("updateAllVoucher", "*"), o();
323
- }).onSecondary(async () => {
324
- o();
325
- });
326
- }), await u(
327
- async () => {
328
- e.campaign._id ? await L.update(e.campaign._id, e) : await L.create(e), await b.read("VOUCHER");
329
- },
330
- {
331
- message: a(
332
- e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
333
- ),
334
- successMessage: a(
335
- e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
336
- )
337
- }
338
- );
339
- }
340
- return J(async () => {
341
- await g(async () => {
342
- await b.read("VOUCHER");
343
- });
344
- }), (e, o) => {
345
- const s = h("FmPageHead"), d = h("FmSearch"), B = h("FmTable"), p = h("FmButton"), Z = h("FmListItem"), Y = h("FmList"), ee = h("FmCard");
346
- return y(), $(T, null, [
347
- r(s, {
348
- title: t(a)("connect.voucher.title"),
349
- actions: t(S).length > 0 ? [A] : [],
350
- "onClick:action": o[0] || (o[0] = () => x())
351
- }, null, 8, ["title", "actions"]),
352
- l("div", Ve, [
353
- r(d, {
354
- modelValue: t(m).searchKey,
355
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t(m).searchKey = n),
356
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
357
- placeholder: t(a)("connect.voucher.search"),
358
- collapsible: ""
359
- }, null, 8, ["modelValue", "placeholder"]),
360
- t(b).campaigns.voucher && t(b).campaigns.voucher.length > 0 ? (y(), $(T, { key: 0 }, [
361
- l("div", ke, [
362
- l("div", Fe, [
363
- r(de, {
364
- modelValue: t(m).location,
365
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t(m).location = n),
366
- label: t(a)("connect.voucher.location"),
367
- "show-item-label": !0,
368
- icon: "storefront",
369
- placement: "bottom-start",
370
- items: t(v).locationItems
371
- }, null, 8, ["modelValue", "label", "items"])
372
- ]),
373
- r(d, {
374
- modelValue: t(m).searchKey,
375
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(m).searchKey = n),
376
- class: "xs:hidden",
377
- placeholder: t(a)("connect.voucher.search"),
378
- collapsible: ""
379
- }, null, 8, ["modelValue", "placeholder"])
380
- ]),
381
- r(B, {
382
- class: "xs:hidden",
383
- "row-data": t(S),
384
- "column-defs": i,
385
- "search-value": t(m).searchKey,
386
- "column-filter": [],
387
- onRowClick: o[4] || (o[4] = (n) => x(n.original)),
388
- "hide-footer": t(S).length < 10
389
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
390
- r(Y, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
391
- default: M(() => [
392
- (y(!0), $(T, null, te(t(S).filter(
393
- (n) => n.name.toLowerCase().includes(t(m).searchKey.toLowerCase())
394
- ), (n) => (y(), k(Z, {
395
- key: n._id.toString(),
396
- onClick: (O) => x(n),
397
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
398
- }, {
399
- default: M(() => {
400
- var O;
401
- return [
402
- l("div", Ie, [
403
- l("div", Le, [
404
- (y(), k(ae(t(D)(n)))),
405
- l("div", Me, F(((O = n.pf_collectible) == null ? void 0 : O.currentReceive) ?? 0) + " claimed ", 1)
406
- ]),
407
- l("div", Re, [
408
- l("div", Pe, F(n.name), 1),
409
- l("div", Ue, F(t(q)(n)), 1)
410
- ])
411
- ]),
412
- l("div", Ee, [
413
- n.event.type === "SIMPLE_CLAIM" ? (y(), k(p, {
414
- key: 0,
415
- icon: "visibility",
416
- "icon-color": "neutral-gray-400",
417
- variant: "tertiary",
418
- onClick: async (I) => {
419
- I.stopPropagation(), await t(U).push({
420
- name: t(G)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
421
- params: { id: n._id }
422
- });
423
- }
424
- }, null, 8, ["onClick"])) : K("", !0),
425
- n.event.type === "SIMPLE_CLAIM" ? (y(), k(p, {
426
- key: 1,
427
- icon: "send",
428
- "icon-color": "neutral-gray-400",
429
- variant: "tertiary",
430
- onClick: (I) => {
431
- var H;
432
- I.stopPropagation(), (H = t(w)) == null || H.showSheet({
433
- campaignId: n._id
434
- });
435
- }
436
- }, null, 8, ["onClick"])) : K("", !0),
437
- r(p, {
438
- icon: "delete",
439
- "icon-color": "neutral-gray-400",
440
- variant: "tertiary",
441
- onClick: (I) => (I.stopPropagation(), E(n))
442
- }, null, 8, ["onClick"])
443
- ])
444
- ];
445
- }),
446
- _: 2
447
- }, 1032, ["onClick"]))), 128))
448
- ]),
449
- _: 1
450
- })
451
- ], 64)) : (y(), k(ee, {
452
- key: 1,
453
- variant: "outlined",
454
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
455
- }, {
456
- default: M(() => [
457
- o[6] || (o[6] = l("img", {
458
- src: ne,
459
- class: "aspect-square w-[150px]"
460
- }, null, -1)),
461
- l("div", Ae, [
462
- l("div", Be, F(t(a)("connect.voucher.createVoucherCampaign")), 1),
463
- l("div", Oe, F(t(a)("connect.voucher.description")), 1)
464
- ]),
465
- r(p, {
466
- variant: "primary",
467
- label: t(a)("connect.voucher.createVoucherCampaign"),
468
- icon: "add",
469
- onClick: o[5] || (o[5] = (n) => x())
470
- }, null, 8, ["label"])
471
- ]),
472
- _: 1
473
- })),
474
- r(me, {
475
- ref_key: "sheetRef",
476
- ref: f,
477
- "onSubmit:modelValue": c
478
- }, null, 512),
479
- r(Se, {
480
- ref_key: "sendVoucherSheetRef",
481
- ref: w
482
- }, null, 512)
483
- ])
484
- ], 64);
485
- };
486
- }
487
- });
488
- export {
489
- no as default
490
- };
@@ -1,56 +0,0 @@
1
- import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
- import { Z as d } from "./zod-Bg2FbC-D.js";
3
- import { u as V } from "./vue-i18n-BRhKDHdF.js";
4
- const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
- key: 0,
6
- class: "text-fm-color-typo-tertiary"
7
- }, E = /* @__PURE__ */ f({
8
- __name: "ZodTextField",
9
- props: {
10
- label: {
11
- type: String,
12
- required: !1
13
- },
14
- schema: {
15
- type: Object,
16
- required: !0
17
- },
18
- modelValue: {
19
- type: String
20
- },
21
- disabled: {
22
- type: Boolean,
23
- default: !1
24
- }
25
- },
26
- emits: ["update:model-value", "focus-changed"],
27
- setup(e, { emit: r }) {
28
- const { t: s } = V(), m = r, i = y();
29
- return (c, o) => {
30
- const u = b("FmTextField");
31
- return l(), v(u, x({
32
- "model-value": e.modelValue,
33
- "onUpdate:modelValue": o[0] || (o[0] = (p) => m("update:model-value", p)),
34
- disabled: e.disabled
35
- }, t(i), {
36
- rules: [t(d).toRule(e.schema)]
37
- }), g({ _: 2 }, [
38
- e.label ? {
39
- name: "label",
40
- fn: h(() => [
41
- a("div", B, [
42
- a("div", null, n(e.label), 1),
43
- k(c.$slots, "append-label", {}, () => [
44
- t(d).isRequired(e.schema) ? S("", !0) : (l(), F("div", C, n(t(s)("connect.common.optional")), 1))
45
- ])
46
- ])
47
- ]),
48
- key: "0"
49
- } : void 0
50
- ]), 1040, ["model-value", "disabled", "rules"]);
51
- };
52
- }
53
- });
54
- export {
55
- E as _
56
- };