@feedmepos/mf-connect 0.1.38-beta.25 → 0.1.38-beta.27

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 (98) hide show
  1. package/dist/{Analytic-CnNFr3FF.js → Analytic-Dgpp4zkU.js} +13 -13
  2. package/dist/{App-Bs4Lgw2l.js → App-DNRzPvQb.js} +7 -7
  3. package/dist/{AuditLogs-BLoAipFo.js → AuditLogs-BhG5wShL.js} +10 -10
  4. package/dist/{Bin-CGTdlBny.js → Bin-BSmAVdOX.js} +8 -8
  5. package/dist/Broadcast-DZ-qedno.js +233 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B2Rodvvf.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BS5HDnfb.js} +6 -6
  7. package/dist/{Card-CkP5_s5B.js → Card-CLTczC6l.js} +16 -16
  8. package/dist/{Collections-Czp-eFqo.js → Collections-CZIk5DSy.js} +6 -6
  9. package/dist/Credit-DGGU3d68.js +228 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CD_HmVtT.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-FxEXBhTK.js} +110 -109
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CeJtGIq8.js → EffectSheet.vue_vue_type_style_index_0_lang-Bx_7FAYn.js} +6 -6
  12. package/dist/Experience-Dd0Xkp_z.js +229 -0
  13. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  14. package/dist/{Game-BU19eUZe.js → Game-N6iQZPqM.js} +103 -97
  15. package/dist/{Grab-DrgKhQ-n.js → Grab-Dn8pP3Vy.js} +10 -10
  16. package/dist/{Index-j750egzP.js → Index-Do0nSsYj.js} +10 -10
  17. package/dist/{Marketing-DxBCWgGW.js → Marketing-BG8L2AVq.js} +6 -6
  18. package/dist/{Member-BlpnS-gt.js → Member-HQWOfz1g.js} +10 -10
  19. package/dist/{MemberList-XolPpdeh.js → MemberList-jfgCK6k3.js} +25 -25
  20. package/dist/{MemberTransactions-mE7RmB-H.js → MemberTransactions-DYOBM90W.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CnIWWNgD.js → MessageInput.vue_vue_type_script_setup_true_lang-DdaqUEEb.js} +7 -7
  22. package/dist/{Mission-BtavZVDY.js → Mission-CkXM1dNO.js} +112 -106
  23. package/dist/{Overview-AnvTfXXo.js → Overview-BJWncUrN.js} +18 -18
  24. package/dist/Point-CfuVogKH.js +232 -0
  25. package/dist/{Promotion-By1szSrB.js → Promotion-TtgchqMU.js} +11 -11
  26. package/dist/{Queue-CDNcLHGr.js → Queue-xaCqQVUP.js} +11 -11
  27. package/dist/{Record-D7CLYo3F.js → Record-D6z_Pywk.js} +8 -8
  28. package/dist/{Reward-BfCNtJE1.js → Reward-DBzn5tRP.js} +15 -15
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BIsAuAN2.js → RewardGroup.vue_vue_type_script_setup_true_lang-CRv8xHpU.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DFZsY5Wx.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bd8pXLRT.js} +13 -13
  31. package/dist/{Segment-Cx4Y8niG.js → Segment-gxBRnKo7.js} +22 -22
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BZ_J5OFJ.js → SelectItems.vue_vue_type_script_setup_true_lang-DbC6xTWH.js} +2 -2
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BJGAnjDZ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BAraQhKS.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CJ5lkVPN.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CFnFyNya.js} +3 -3
  35. package/dist/{Setting-CZ-ZoCbx.js → Setting-DX7hLnTQ.js} +11 -11
  36. package/dist/{Store-BEolF_8B.js → Store-C3GZXKuC.js} +19 -19
  37. package/dist/{StoreRewards-Dad1Zg2s.js → StoreRewards-CCWDGKLp.js} +13 -13
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BioIIRWp.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DNgDoMR9.js} +21 -21
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DFck5Zap.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DQmZE9_V.js} +1 -1
  40. package/dist/{Tier-DkMdCg4f.js → Tier-DbWQM6De.js} +20 -20
  41. package/dist/{Title-CE4vkjCt.js → Title-a2bTIZi0.js} +19 -19
  42. package/dist/{Transaction-DQOdYA5y.js → Transaction-f8XwfBob.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CLIhaeAY.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DUQ0fU5s.js} +6 -6
  44. package/dist/{Voucher-BNCkPTeD.js → Voucher-C7Dfsqk6.js} +14 -14
  45. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BCG4LuXq.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C5fm0K4i.js} +10 -10
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DZPz72YM.js → ZodTextField.vue_vue_type_script_setup_true_lang-A-h4HUTJ.js} +1 -1
  47. package/dist/{app-CGyViOA2.js → app-BOG1dC8a.js} +32 -32
  48. package/dist/{app-DuuQV4iK.js → app-jGPh064M.js} +1 -1
  49. package/dist/app.js +1 -1
  50. package/dist/{business-CT9f5Mcu.js → business--P6e14wH.js} +11 -8
  51. package/dist/{campaign-DruWV9_z.js → campaign-CR_hUukZ.js} +9 -9
  52. package/dist/{campaign-QNfednQV.js → campaign-C_gQlNNb.js} +2 -2
  53. package/dist/{campaign.enum-BfqWuf2f.js → campaign.enum-Dj5o3Gnx.js} +1 -1
  54. package/dist/{campaign.fn-CdyLr0Xa.js → campaign.fn-DQZ0W-EB.js} +63 -63
  55. package/dist/{collectible.enum-C4SBy9ie.js → collectible.enum-DQgguzyG.js} +1 -1
  56. package/dist/{collection.fn-DGmard-T.js → collection.fn-1jzRWzrr.js} +2 -2
  57. package/dist/{dto-AdHaYlrt.js → dto-C3jWvc1e.js} +4 -4
  58. package/dist/{effect-BxLYXWa0.js → effect-dA2mpaCE.js} +1 -1
  59. package/dist/{email-addresses-BywpJOyH.js → email-addresses-37_SE2AF.js} +1 -1
  60. package/dist/{export-CaCjWJbv.js → export-Cn7Elq59.js} +3 -3
  61. package/dist/{helper-1sDGGcCs.js → helper-1FmJd7OP.js} +1 -1
  62. package/dist/{index-Ce7luA3z.js → index-B4j34swO.js} +1 -1
  63. package/dist/{index-DOeqRIlL.js → index-B9iL1w4-.js} +3 -3
  64. package/dist/{index-xV0yJaxT.js → index-BRALrcjU.js} +1452 -1452
  65. package/dist/{index-_mZAUf_O.js → index-BcEhSpSd.js} +1 -1
  66. package/dist/{index-ILVT0cch.js → index-Bv04ElXo.js} +6 -6
  67. package/dist/{index-DKsWTRyN.js → index-BwBDTG0U.js} +4 -4
  68. package/dist/{index-BWINkCFC.js → index-C0TBodx0.js} +1 -1
  69. package/dist/{index-DWRBSads.js → index-C0uZD6Fb.js} +1 -1
  70. package/dist/{index-J-gYw1zz.js → index-CCzzmRaK.js} +3 -3
  71. package/dist/{index-AYw2MTFM.js → index-Cq9x3KEB.js} +1 -1
  72. package/dist/{index-DJZ-kqpE.js → index-DIup5B2H.js} +1 -1
  73. package/dist/{index-DZ3vwqCm.js → index-Da1osm0C.js} +1 -1
  74. package/dist/{index-BGWAVguX.js → index-Oly5lYMA.js} +1 -1
  75. package/dist/{index-Cur9hyPV.js → index-YhB238q9.js} +2 -2
  76. package/dist/{index.esm2017-Bo-H9Epv.js → index.esm2017-pcImat1a.js} +1 -1
  77. package/dist/{loading-Bqjqslgf.js → loading-BIAeRmZo.js} +1 -1
  78. package/dist/{membership-CqhEppfS.js → membership-D74wSltj.js} +3 -3
  79. package/dist/{money-CooAqk_P.js → money-DQuZChef.js} +1 -1
  80. package/dist/{number-C6cARyqZ.js → number-DORW-adL.js} +1 -1
  81. package/dist/objectid-CPqo6DS_.js +145 -0
  82. package/dist/{plugins-BaVr4Awd.js → plugins-BVLU2dc_.js} +2 -2
  83. package/dist/{reward-43EpLVnK.js → reward-CsZQy2b1.js} +1 -1
  84. package/dist/{rule-CECnGrxI.js → rule-CtYg9lgQ.js} +3 -3
  85. package/dist/{rule-builder-C58mHAaP.js → rule-builder-TwHL3OPZ.js} +1 -1
  86. package/dist/{template-CMZziR_-.js → template-DlLEQKFu.js} +4 -4
  87. package/dist/{timezone-DpcMMfGn.js → timezone-DGJqaz8e.js} +1 -1
  88. package/dist/{trigger-D99PwOLC.js → trigger-B4JMJKDj.js} +4 -4
  89. package/dist/{user-C1NEGH5J.js → user-ZU2f1nbT.js} +1 -1
  90. package/dist/{vue-i18n-CzjqSUwt.js → vue-i18n-BtpjMXUM.js} +301 -301
  91. package/dist/{xlsx-DOkzrP7b.js → xlsx-BiJUMUcX.js} +1 -1
  92. package/package.json +1 -1
  93. package/dist/Broadcast-B3W5RzRy.js +0 -227
  94. package/dist/Credit-BcaIvY_C.js +0 -222
  95. package/dist/Experience-CqpT4RKC.js +0 -223
  96. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  97. package/dist/Point-Bw1G73vZ.js +0 -226
  98. package/dist/objectid-DiYL018Z.js +0 -145
@@ -0,0 +1,228 @@
1
+ import { defineComponent as N, ref as L, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as y, Fragment as h, createVNode as i, unref as t, createElementVNode as n, withCtx as C, renderList as q, createBlock as w, resolveDynamicComponent as O, toDisplayString as g, createCommentVNode as z } from "vue";
2
+ import { _ as G } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as J, components as Q } from "@feedmepos/ui-library";
4
+ import { p as W } from "./plugins-BVLU2dc_.js";
5
+ import { u as X } from "./loading-BIAeRmZo.js";
6
+ import { u as Y } from "./business--P6e14wH.js";
7
+ import { u as Z } from "./campaign-C_gQlNNb.js";
8
+ import { g as ee, a as S, b as V } from "./campaign-CR_hUukZ.js";
9
+ import { u as oe } from "./vue-i18n-BtpjMXUM.js";
10
+ import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-FxEXBhTK.js";
12
+ import { u as ne } from "./template-DlLEQKFu.js";
13
+ import { c as _ } from "./index-C0uZD6Fb.js";
14
+ const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { 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" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Ie = /* @__PURE__ */ N({
15
+ __name: "Credit",
16
+ setup(ge) {
17
+ const { t: r } = oe(), B = {
18
+ label: r("connect.program.common.actions.create", {
19
+ type: r("connect.program.credit.title").toLowerCase()
20
+ }),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, I = ne("CREDIT", J()), R = Y(), u = Z(), { global: D, minor: v } = X, s = L({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function T(e) {
29
+ const o = s.value.location;
30
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((l) => {
31
+ var c;
32
+ return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
33
+ }) : e.targetLocation.includes(o);
34
+ }
35
+ const p = j(
36
+ () => u.campaigns.credit.filter((e) => T(e))
37
+ ), E = [
38
+ {
39
+ header: r("connect.program.common.table.title"),
40
+ accessorFn: (e) => e.name
41
+ },
42
+ {
43
+ header: r("connect.program.common.table.status"),
44
+ accessorFn: (e) => ee(e),
45
+ cell(e) {
46
+ return S(e.row.original);
47
+ }
48
+ },
49
+ {
50
+ header: r("connect.program.common.table.summary"),
51
+ accessorFn: (e) => V(e)
52
+ },
53
+ {
54
+ header: r("connect.program.common.table.actions"),
55
+ cell(e) {
56
+ return M(Q.FmButton, {
57
+ variant: "tertiary",
58
+ icon: "delete",
59
+ iconColor: "neutral-gray-400",
60
+ onClick: (o) => {
61
+ o.stopPropagation(), x(e.row.original);
62
+ }
63
+ });
64
+ }
65
+ }
66
+ ], b = L();
67
+ async function x(e) {
68
+ await W.remove(
69
+ r("connect.program.common.remove.confirm", { name: e.name })
70
+ ) && await v(
71
+ async () => {
72
+ await _.delete(e._id), await u.read("CREDIT");
73
+ },
74
+ {
75
+ message: r("connect.program.common.remove.removing", { name: e.name }),
76
+ successMessage: r("connect.program.common.remove.removed", {
77
+ name: e.name
78
+ })
79
+ }
80
+ );
81
+ }
82
+ async function f(e) {
83
+ e ? await o() : I.open(async (l) => {
84
+ await o(l);
85
+ });
86
+ async function o(l) {
87
+ var c;
88
+ (c = b.value) == null || c.showSheet(
89
+ !0,
90
+ "CREDIT",
91
+ e ? await _.readById(e._id) : void 0,
92
+ l
93
+ );
94
+ }
95
+ }
96
+ async function K(e) {
97
+ await v(
98
+ async () => {
99
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("CREDIT");
100
+ },
101
+ {
102
+ message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
103
+ successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
104
+ }
105
+ );
106
+ }
107
+ return H(async () => {
108
+ await D(async () => {
109
+ await u.read("CREDIT");
110
+ });
111
+ }), (e, o) => {
112
+ const l = m("FmPageHead"), c = m("FmSearch"), $ = m("FmTable"), F = m("FmButton"), P = m("FmListItem"), U = m("FmList"), A = m("FmCard");
113
+ return d(), y(h, null, [
114
+ i(l, {
115
+ title: t(r)("connect.program.credit.title"),
116
+ actions: t(p).length > 0 ? [B] : [],
117
+ "onClick:action": o[0] || (o[0] = () => f())
118
+ }, null, 8, ["title", "actions"]),
119
+ n("div", re, [
120
+ i(c, {
121
+ modelValue: t(s).searchKey,
122
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => t(s).searchKey = a),
123
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
124
+ placeholder: "search",
125
+ collapsible: ""
126
+ }, null, 8, ["modelValue"]),
127
+ t(u).campaigns.credit && t(u).campaigns.credit.length > 0 ? (d(), y(h, { key: 0 }, [
128
+ n("div", se, [
129
+ n("div", ie, [
130
+ i(te, {
131
+ label: `${t(r)("connect.common.location")}: `,
132
+ "right-icon": "keyboard_arrow_down",
133
+ modelValue: t(s).location,
134
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => t(s).location = a),
135
+ icon: "storefront",
136
+ "show-item-label": !0,
137
+ items: t(R).locationOptions
138
+ }, null, 8, ["label", "modelValue", "items"])
139
+ ]),
140
+ i(c, {
141
+ modelValue: t(s).searchKey,
142
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => t(s).searchKey = a),
143
+ class: "xs:hidden",
144
+ placeholder: "search",
145
+ collapsible: ""
146
+ }, null, 8, ["modelValue"])
147
+ ]),
148
+ i($, {
149
+ class: "xs:hidden",
150
+ "row-data": t(p),
151
+ "column-defs": E,
152
+ "search-value": t(s).searchKey,
153
+ "column-filter": [],
154
+ onRowClick: o[4] || (o[4] = (a) => f(a.original)),
155
+ "hide-footer": t(p).length < 10
156
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
157
+ i(U, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
158
+ default: C(() => [
159
+ (d(!0), y(h, null, q(t(p).filter(
160
+ (a) => a.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
161
+ ), (a) => (d(), w(P, {
162
+ key: a._id.toString(),
163
+ onClick: (k) => f(a),
164
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
165
+ }, {
166
+ default: C(() => [
167
+ n("div", ce, [
168
+ n("div", le, [
169
+ (d(), w(O(t(S)(a)))),
170
+ n("div", me, g(a.currentReceive ?? 0) + " used ", 1)
171
+ ]),
172
+ n("div", de, [
173
+ n("div", ue, g(a.name), 1),
174
+ n("div", pe, g(t(V)(a)), 1)
175
+ ]),
176
+ n("div", fe, " Credit received: " + g(a.currentReceive ?? 0), 1)
177
+ ]),
178
+ i(F, {
179
+ icon: "delete",
180
+ "icon-color": "neutral-gray-400",
181
+ variant: "tertiary",
182
+ onClick: (k) => (k.stopPropagation(), x(a))
183
+ }, null, 8, ["onClick"])
184
+ ]),
185
+ _: 2
186
+ }, 1032, ["onClick"]))), 128))
187
+ ]),
188
+ _: 1
189
+ }),
190
+ t(p).length == 0 ? (d(), y("div", ye, [...o[6] || (o[6] = [
191
+ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
192
+ ])])) : z("", !0)
193
+ ], 64)) : (d(), w(A, {
194
+ key: 1,
195
+ variant: "outlined",
196
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
197
+ }, {
198
+ default: C(() => [
199
+ o[7] || (o[7] = n("img", {
200
+ src: G,
201
+ class: "aspect-square w-[150px]"
202
+ }, null, -1)),
203
+ o[8] || (o[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
204
+ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
205
+ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
206
+ ], -1)),
207
+ i(F, {
208
+ variant: "primary",
209
+ label: "Create credit program",
210
+ icon: "add",
211
+ onClick: o[5] || (o[5] = (a) => f())
212
+ })
213
+ ]),
214
+ _: 1
215
+ })),
216
+ i(ae, {
217
+ ref_key: "sheetRef",
218
+ ref: b,
219
+ "onSubmit:modelValue": K
220
+ }, null, 512)
221
+ ])
222
+ ], 64);
223
+ };
224
+ }
225
+ });
226
+ export {
227
+ Ie as default
228
+ };