@feedmepos/mf-connect 0.1.82-prod → 0.1.84-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 (104) hide show
  1. package/dist/{Analytic-D850nvXy.js → Analytic---kwMsJh.js} +11 -11
  2. package/dist/{App-Dwp2SQFt.js → App-Dz1QFoj1.js} +7 -7
  3. package/dist/{Bin-t3dMVk18.js → Bin-CRYowBLt.js} +8 -8
  4. package/dist/Broadcast-C8_buAc0.js +265 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFa7asTL.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYY2JwZP.js} +6 -6
  6. package/dist/{Card-DueuT99c.js → Card-DePqhNID.js} +19 -19
  7. package/dist/{Collections-D50oEyeZ.js → Collections-RwrRqA0j.js} +8 -8
  8. package/dist/Credit-C8PUzFqm.js +259 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CgUd84nn.js} +245 -241
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L0-aFhRw.js → EffectSheet.vue_vue_type_style_index_0_lang-DnPaODeO.js} +6 -6
  11. package/dist/Experience-DhtTPHu-.js +258 -0
  12. package/dist/{FileSaver.min-DH3eS7yi.js → FileSaver.min-BWjfwA9o.js} +1 -1
  13. package/dist/Game-CYj7LBJv.js +329 -0
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js → ImageInput.vue_vue_type_script_setup_true_lang-CUltj6id.js} +1 -1
  15. package/dist/{Index-BucLJQqP.js → Index-D8AcIz6r.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CIoZurPE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CpUmN6FR.js} +1 -1
  17. package/dist/{MainLayout-DYGrSfgc.js → MainLayout-DkxA5idl.js} +1 -1
  18. package/dist/{Marketing-CsAIdNjF.js → Marketing-4h6RtJ9w.js} +6 -6
  19. package/dist/{Member-D4HF_VGN.js → Member-Mi1lEgxG.js} +11 -11
  20. package/dist/{MemberList-CPoA4ovd.js → MemberList-Cd7SXI7d.js} +27 -27
  21. package/dist/{MemberTransactions-AMv9NeIb.js → MemberTransactions-aM_CTN3-.js} +1 -1
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhhSwnK0.js → MessageInput.vue_vue_type_script_setup_true_lang-LkKXfpQ8.js} +9864 -9759
  23. package/dist/Mission-BbZXMfe2.js +333 -0
  24. package/dist/{Overview-ByO2p2Wx.js → Overview-tjz1RxkD.js} +19 -19
  25. package/dist/Point-DqSlh8lv.js +261 -0
  26. package/dist/Promotion-FNZOyKDM.js +390 -0
  27. package/dist/{Queue-BD29Mmbf.js → Queue-BGr-V2dv.js} +11 -11
  28. package/dist/{Record-CNLiN6YR.js → Record-YSp6Ra7G.js} +9 -9
  29. package/dist/{Reward-Ceo3M1yD.js → Reward-CfWeF_XY.js} +16 -16
  30. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJWQEL9W.js → RewardGroup.vue_vue_type_script_setup_true_lang-BdT11T69.js} +12 -12
  31. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CWuWGs6r.js → RuleGroup.vue_vue_type_script_setup_true_lang-D7pC5cM-.js} +15 -15
  32. package/dist/{Segment-BOQUlP-m.js → Segment-B8kCEI6G.js} +25 -25
  33. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BcXeiz0p.js → SelectItems.vue_vue_type_script_setup_true_lang-iK1tNyZN.js} +2 -2
  34. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJ--FC-i.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cd9_IVCK.js} +12 -12
  35. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CDNCuGzR.js} +4 -4
  36. package/dist/{Setting-CWapXD31.js → Setting-DRK1-tm8.js} +14 -14
  37. package/dist/{SettingAdvertisements-QEf2eyem.js → SettingAdvertisements-CPBFpIuM.js} +12 -12
  38. package/dist/{Store-Bfm2olbH.js → Store-CF55C7mv.js} +22 -22
  39. package/dist/{StoreRewards-DNDkyxxn.js → StoreRewards-hF8rcPIS.js} +15 -15
  40. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-zKLbY4Qb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BYugGARP.js} +20 -20
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D3-wIOQ7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BSOpqCbD.js} +1 -1
  42. package/dist/{Tier-uC45o2AK.js → Tier-RKT4ClDE.js} +22 -22
  43. package/dist/{Title-zDjlDJCB.js → Title-vFFh4BdE.js} +20 -20
  44. package/dist/{Transaction-Bo9FEjMQ.js → Transaction-BHeWenhg.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BR5F0bWS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-iKbV9AAj.js} +6 -6
  46. package/dist/{Voucher-B7BTa4Vt.js → Voucher-C6ywMiLW.js} +162 -141
  47. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjrjJW7x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DHlpDIkL.js} +12 -12
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js → ZodTextField.vue_vue_type_script_setup_true_lang-BHhDgBiv.js} +2 -2
  49. package/dist/{app-CkUBXnib.js → app-P5wZqN7K.js} +961 -875
  50. package/dist/app.js +1 -1
  51. package/dist/{business-C8P05bjQ.js → business-B35Wh7fa.js} +1 -1
  52. package/dist/{campaign-DcLhSQVQ.js → campaign-CdGwiufg.js} +1 -1
  53. package/dist/{campaign-CyYAvl3p.js → campaign-CxeRf6Kf.js} +8 -8
  54. package/dist/{campaign.enum-h6B-mP82.js → campaign.enum-G61yFqyz.js} +1 -1
  55. package/dist/{campaign.fn-CStjDAoU.js → campaign.fn-DBGVgh7k.js} +128 -128
  56. package/dist/{collectible.enum-DT-wjl-a.js → collectible.enum-CmO4wF4e.js} +1 -1
  57. package/dist/{collection.fn-14o3RW2e.js → collection.fn-BZtvtGPA.js} +2 -2
  58. package/dist/{dto-Bv09Baex.js → dto-BmjMkp1Z.js} +4 -4
  59. package/dist/{effect-CF0s7QWQ.js → effect-eEYO0AvV.js} +1 -1
  60. package/dist/{email-addresses-B5qrHbxg.js → email-addresses-sloQNBJG.js} +2 -2
  61. package/dist/{export-B6nvdBmg.js → export-CmGCO7dx.js} +3 -3
  62. package/dist/{helper-B4-2ut7E.js → helper-CW7xMPjC.js} +1 -1
  63. package/dist/{index-D5xt8OjL.js → index-639mCQ6J.js} +1 -1
  64. package/dist/{index-CR8brl_k.js → index-B5KXKlhV.js} +1 -1
  65. package/dist/{index-DG_Ej3ec.js → index-B6dK27Ud.js} +3 -3
  66. package/dist/{index-B-y0UTZw.js → index-BD00XsAg.js} +6 -6
  67. package/dist/{index-DesSizn4.js → index-C7X2wMHZ.js} +3 -3
  68. package/dist/{index-BebGg-0n.js → index-CK4IRu1N.js} +1 -1
  69. package/dist/{index-Ct90ybe0.js → index-CLoMa41m.js} +1 -1
  70. package/dist/{index-DVb99_67.js → index-CmdjTQSX.js} +1 -1
  71. package/dist/{index-DzQjej5Y.js → index-CqtPReHP.js} +4 -4
  72. package/dist/{index-DIQ2MyWF.js → index-DCzBwaDb.js} +4 -4
  73. package/dist/{index-HhVIn4Bn.js → index-DF11MBlC.js} +1 -1
  74. package/dist/{index-DRX9TTMn.js → index-DzgPdiHK.js} +3 -3
  75. package/dist/{index-XDg25M5a.js → index-INxinXgP.js} +1 -1
  76. package/dist/{index.esm2017-1A2eV8x_.js → index.esm2017-CFPCtvwG.js} +1 -1
  77. package/dist/{loading-B0_BwPgo.js → loading-D77DfZBP.js} +1 -1
  78. package/dist/{lodash-DxIglhqk.js → lodash-B8BR1gR7.js} +1 -1
  79. package/dist/{membership-H_whlbUP.js → membership-B5p556SC.js} +3 -3
  80. package/dist/{money-DEE8QW6m.js → money-CRPmLrb_.js} +1 -1
  81. package/dist/{number-BmN5A4Cu.js → number-bJoTVZNO.js} +1 -1
  82. package/dist/objectid-DCHsjF9h.js +145 -0
  83. package/dist/{plugins-DTrOHd7d.js → plugins-DQdMt5nO.js} +3 -3
  84. package/dist/{reward-CsJhkkaT.js → reward-DeTD3TQ1.js} +1 -1
  85. package/dist/{rule-ByMxYH4c.js → rule-DSuuXRg3.js} +3 -3
  86. package/dist/{rule-builder-DwGwUlV1.js → rule-builder-D8rRlIOO.js} +1 -1
  87. package/dist/template-HTjC1_ed.js +236 -0
  88. package/dist/{timezone-Bpe-fhwZ.js → timezone-CWcYmamV.js} +2 -2
  89. package/dist/{trigger-CEprJYiD.js → trigger-BZa0mW7v.js} +5 -5
  90. package/dist/{usePagination-Du6qS5aj.js → usePagination-Abs8KbO-.js} +1 -1
  91. package/dist/{user-Be8HNWuo.js → user-B94fPQnM.js} +1 -1
  92. package/dist/{vue-i18n-fg0FtbNR.js → vue-i18n-D5HHFPRa.js} +296 -296
  93. package/dist/{xlsx-CSQJ3YWk.js → xlsx-BsqWVudt.js} +1 -1
  94. package/dist/{zod-BB7zZ5ec.js → zod-Bp867gMI.js} +1 -1
  95. package/package.json +1 -1
  96. package/dist/Broadcast-DORnkgZc.js +0 -232
  97. package/dist/Credit-CIWSRGuJ.js +0 -225
  98. package/dist/Experience-qABtjxNP.js +0 -224
  99. package/dist/Game-D67q1zKd.js +0 -299
  100. package/dist/Mission-CRinLn7e.js +0 -303
  101. package/dist/Point-4JqzbNgP.js +0 -227
  102. package/dist/Promotion-DlWVF6hF.js +0 -358
  103. package/dist/objectid-B8LZDZOt.js +0 -145
  104. package/dist/template-Bdwy6QXF.js +0 -188
@@ -0,0 +1,259 @@
1
+ import { defineComponent as H, ref as L, computed as q, h as w, onMounted as O, resolveComponent as m, openBlock as d, createElementBlock as _, Fragment as v, createVNode as i, unref as o, createElementVNode as n, withCtx as b, renderList as z, createBlock as x, resolveDynamicComponent as G, toDisplayString as D, createCommentVNode as J } from "vue";
2
+ import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as W, components as V } from "@feedmepos/ui-library";
4
+ import { p as X } from "./plugins-DQdMt5nO.js";
5
+ import { u as Y } from "./loading-D77DfZBP.js";
6
+ import { u as Z } from "./business-B35Wh7fa.js";
7
+ import { u as ee, c as f } from "./campaign-CdGwiufg.js";
8
+ import { g as te, a as B, b as I } from "./campaign-CxeRf6Kf.js";
9
+ import { u as oe, c as ae, p as ne } from "./template-HTjC1_ed.js";
10
+ import { u as re } from "./vue-i18n-D5HHFPRa.js";
11
+ import { _ as se } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
+ import { _ as ie } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CgUd84nn.js";
13
+ const ce = { class: "px-24 flex flex-col gap-y-16" }, le = { class: "flex items-center justify-between w-full" }, me = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, ue = { class: "space-y-4" }, fe = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex items-center gap-8" }, _e = { key: 0 }, Ie = /* @__PURE__ */ H({
14
+ __name: "Credit",
15
+ setup(Ce) {
16
+ const { t: r } = re(), T = {
17
+ label: r("connect.program.common.actions.create", {
18
+ type: r("connect.program.credit.title").toLowerCase()
19
+ }),
20
+ value: "create",
21
+ isPrimary: !0,
22
+ prependIcon: "add"
23
+ }, E = oe("CREDIT", W()), R = Z(), p = ee(), { global: K, minor: k } = Y, c = L({
24
+ searchKey: "",
25
+ location: []
26
+ });
27
+ function P(e) {
28
+ const t = c.value.location;
29
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
30
+ var s;
31
+ return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(l);
32
+ }) : e.targetLocation.includes(t);
33
+ }
34
+ const u = q(
35
+ () => p.campaigns.credit.filter((e) => P(e))
36
+ ), $ = [
37
+ {
38
+ header: r("connect.program.common.table.title"),
39
+ accessorFn: (e) => e.name
40
+ },
41
+ {
42
+ header: r("connect.program.common.table.status"),
43
+ accessorFn: (e) => te(e),
44
+ cell(e) {
45
+ return B(e.row.original);
46
+ }
47
+ },
48
+ {
49
+ header: r("connect.program.common.table.summary"),
50
+ accessorFn: (e) => I(e)
51
+ },
52
+ {
53
+ header: r("connect.program.common.table.actions"),
54
+ cell(e) {
55
+ return w("div", { class: "flex items-center gap-8 justify-end" }, [
56
+ w(V.FmButton, {
57
+ variant: "tertiary",
58
+ icon: "content_copy",
59
+ iconColor: "neutral-gray-400",
60
+ onClick: async (t) => {
61
+ t.stopPropagation(), await S(e.row.original);
62
+ }
63
+ }),
64
+ w(V.FmButton, {
65
+ variant: "tertiary",
66
+ icon: "delete",
67
+ iconColor: "neutral-gray-400",
68
+ onClick: (t) => {
69
+ t.stopPropagation(), F(e.row.original);
70
+ }
71
+ })
72
+ ]);
73
+ }
74
+ }
75
+ ], C = L();
76
+ async function F(e) {
77
+ await X.remove(
78
+ r("connect.program.common.remove.confirm", { name: e.name })
79
+ ) && await k(
80
+ async () => {
81
+ await f.delete(e._id), await p.read("CREDIT");
82
+ },
83
+ {
84
+ message: r("connect.program.common.remove.removing", { name: e.name }),
85
+ successMessage: r("connect.program.common.remove.removed", {
86
+ name: e.name
87
+ })
88
+ }
89
+ );
90
+ }
91
+ async function g(e) {
92
+ e ? await t() : E.open(async (l) => {
93
+ await t(l);
94
+ });
95
+ async function t(l) {
96
+ var s;
97
+ (s = C.value) == null || s.showSheet(
98
+ !0,
99
+ "CREDIT",
100
+ e ? await f.readById(e._id) : void 0,
101
+ l
102
+ );
103
+ }
104
+ }
105
+ async function S(e) {
106
+ var s;
107
+ if (!await ae(e.name))
108
+ return;
109
+ const t = await f.readById(e._id), l = ne(t, {
110
+ keepCollectible: !0
111
+ });
112
+ (s = C.value) == null || s.showSheet(
113
+ !0,
114
+ "CREDIT",
115
+ l,
116
+ t.template
117
+ );
118
+ }
119
+ async function U(e) {
120
+ await k(
121
+ async () => {
122
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("CREDIT");
123
+ },
124
+ {
125
+ message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
126
+ successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
127
+ }
128
+ );
129
+ }
130
+ return O(async () => {
131
+ await K(async () => {
132
+ await p.read("CREDIT");
133
+ });
134
+ }), (e, t) => {
135
+ const l = m("FmPageHead"), s = m("FmSearch"), j = m("FmTable"), h = m("FmButton"), A = m("FmListItem"), N = m("FmList"), M = m("FmCard");
136
+ return d(), _(v, null, [
137
+ i(l, {
138
+ title: o(r)("connect.program.credit.title"),
139
+ actions: o(u).length > 0 ? [T] : [],
140
+ "onClick:action": t[0] || (t[0] = () => g())
141
+ }, null, 8, ["title", "actions"]),
142
+ n("div", ce, [
143
+ i(s, {
144
+ modelValue: o(c).searchKey,
145
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
146
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
147
+ placeholder: "search",
148
+ collapsible: ""
149
+ }, null, 8, ["modelValue"]),
150
+ o(p).campaigns.credit && o(p).campaigns.credit.length > 0 ? (d(), _(v, { key: 0 }, [
151
+ n("div", le, [
152
+ n("div", me, [
153
+ i(se, {
154
+ label: `${o(r)("connect.common.location")}: `,
155
+ "right-icon": "keyboard_arrow_down",
156
+ modelValue: o(c).location,
157
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
158
+ icon: "storefront",
159
+ "show-item-label": !0,
160
+ items: o(R).locationOptions
161
+ }, null, 8, ["label", "modelValue", "items"])
162
+ ]),
163
+ i(s, {
164
+ modelValue: o(c).searchKey,
165
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
166
+ class: "xs:hidden sm:hidden",
167
+ placeholder: "search",
168
+ collapsible: ""
169
+ }, null, 8, ["modelValue"])
170
+ ]),
171
+ i(j, {
172
+ class: "xs:hidden sm:hidden",
173
+ "row-data": o(u),
174
+ "column-defs": $,
175
+ "search-value": o(c).searchKey,
176
+ "column-filter": [],
177
+ onRowClick: t[4] || (t[4] = (a) => g(a.original)),
178
+ "hide-footer": o(u).length < 10
179
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
180
+ i(N, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
181
+ default: b(() => [
182
+ (d(!0), _(v, null, z(o(u).filter(
183
+ (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
184
+ ), (a) => (d(), x(A, {
185
+ key: a._id.toString(),
186
+ onClick: (y) => g(a),
187
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
188
+ }, {
189
+ default: b(() => [
190
+ n("div", de, [
191
+ n("div", pe, [
192
+ (d(), x(G(o(B)(a))))
193
+ ]),
194
+ n("div", ue, [
195
+ n("div", fe, D(a.name), 1),
196
+ n("div", ge, D(o(I)(a)), 1)
197
+ ])
198
+ ]),
199
+ n("div", ye, [
200
+ i(h, {
201
+ icon: "content_copy",
202
+ "icon-color": "neutral-gray-400",
203
+ variant: "tertiary",
204
+ onClick: async (y) => {
205
+ y.stopPropagation(), await S(a);
206
+ }
207
+ }, null, 8, ["onClick"]),
208
+ i(h, {
209
+ icon: "delete",
210
+ "icon-color": "neutral-gray-400",
211
+ variant: "tertiary",
212
+ onClick: (y) => (y.stopPropagation(), F(a))
213
+ }, null, 8, ["onClick"])
214
+ ])
215
+ ]),
216
+ _: 2
217
+ }, 1032, ["onClick"]))), 128))
218
+ ]),
219
+ _: 1
220
+ }),
221
+ o(u).length == 0 ? (d(), _("div", _e, [...t[6] || (t[6] = [
222
+ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
223
+ ])])) : J("", !0)
224
+ ], 64)) : (d(), x(M, {
225
+ key: 1,
226
+ variant: "outlined",
227
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
228
+ }, {
229
+ default: b(() => [
230
+ t[7] || (t[7] = n("img", {
231
+ src: Q,
232
+ class: "aspect-square w-[150px]"
233
+ }, null, -1)),
234
+ t[8] || (t[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
235
+ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
236
+ 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. ")
237
+ ], -1)),
238
+ i(h, {
239
+ variant: "primary",
240
+ label: "Create credit program",
241
+ icon: "add",
242
+ onClick: t[5] || (t[5] = (a) => g())
243
+ })
244
+ ]),
245
+ _: 1
246
+ })),
247
+ i(ie, {
248
+ ref_key: "sheetRef",
249
+ ref: C,
250
+ "onSubmit:modelValue": U
251
+ }, null, 512)
252
+ ])
253
+ ], 64);
254
+ };
255
+ }
256
+ });
257
+ export {
258
+ Ie as default
259
+ };