@feedmepos/mf-connect 0.0.10-prod → 0.0.11-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 (65) hide show
  1. package/dist/{Analytic-BFeicKpw.js → Analytic-CpXLcGWV.js} +7 -7
  2. package/dist/{Broadcast-D0NyeAPC.js → Broadcast-CEMQS5PI.js} +7 -7
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DAUidvXJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0Kvpl_V.js} +8 -8
  4. package/dist/{Card-DsFHDP5R.js → Card-BqX-aRK9.js} +177 -182
  5. package/dist/{Collections-mc47YFfd.js → Collections-SRmluAj0.js} +102 -84
  6. package/dist/{Credit-TQYanlxz.js → Credit-DdBKFsII.js} +7 -7
  7. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYNpBySQ.js +2600 -0
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-kA-uGqCI.js → EffectSheet.vue_vue_type_style_index_0_lang-admNNBWu.js} +1864 -1830
  9. package/dist/{Experience-CyASWXXY.js → Experience-CSfRrWqI.js} +7 -7
  10. package/dist/Game-BV--qn0e.js +250 -0
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-D-wHmyMe.js → ImageInput.vue_vue_type_script_setup_true_lang-DpYjrT3G.js} +1 -1
  12. package/dist/{MainLayout-zw-S_EV5.js → MainLayout-B_ZXQrMD.js} +1 -1
  13. package/dist/{Marketing-BcmbBw-5.js → Marketing-Bac3EbOu.js} +4 -4
  14. package/dist/{Member-DWRIIPj-.js → Member-CGMRVEuI.js} +2 -2
  15. package/dist/{MemberList-DNG0mNej.js → MemberList-CSyb4bNE.js} +196 -195
  16. package/dist/{MemberTransactions-xdm0zGuQ.js → MemberTransactions-BdraBHg6.js} +2 -2
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bqs3tfs_.js → MessageInput.vue_vue_type_script_setup_true_lang-BvAFOoym.js} +2 -2
  18. package/dist/Mission-D8-D99g-.js +248 -0
  19. package/dist/Point-BOI4mT-K.js +220 -0
  20. package/dist/{Promotion-DlxqsZFt.js → Promotion-D0MLMo9m.js} +8 -8
  21. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DcLK4o-E.js → RuleGroup.vue_vue_type_script_setup_true_lang-1L68zx5t.js} +58 -58
  22. package/dist/Segment-BeUbkVj7.js +444 -0
  23. package/dist/{Setting-CWftoE15.js → Setting-uM4iKdyM.js} +386 -379
  24. package/dist/{Store-jqibjN4j.js → Store-BkccNTnM.js} +432 -413
  25. package/dist/{StoreRewards-DWbp79R_.js → StoreRewards-BLgP6Mfv.js} +9 -9
  26. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-b21Sy462.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Z0nqQyi8.js} +39 -38
  27. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BUOfEY4s.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C771jjYx.js} +1 -1
  28. package/dist/{Tier-lymEcCqJ.js → Tier-DwKAfz6f.js} +17 -16
  29. package/dist/{Title-CYkql8-l.js → Title-B1_yd9pC.js} +16 -15
  30. package/dist/{Transaction-Ca_AVh3S.js → Transaction-DcVCMUY4.js} +1 -1
  31. package/dist/{Voucher-DX70cORv.js → Voucher-Djvai5vL.js} +9 -9
  32. package/dist/{app-Bpd1FsZZ.js → app-BvizV9z5.js} +2757 -2743
  33. package/dist/app.js +1 -1
  34. package/dist/{campaign-CfsRf50J.js → campaign-BdSwq7MJ.js} +31 -27
  35. package/dist/dto-CkH5Zama.js +1150 -0
  36. package/dist/{effect-CiUKauPm.js → effect-DT4ivttr.js} +1 -1
  37. package/dist/{export-oV5_2WhN.js → export-BAJL8_2G.js} +3 -3
  38. package/dist/{helper-dCIRT9Az.js → helper-CiIZ1pUo.js} +21 -8
  39. package/dist/{index-Qqifr9f8.js → index-7uOMMdXt.js} +245 -184
  40. package/dist/{index-BL_KPUtI.js → index-8nrxC9d5.js} +1 -1
  41. package/dist/{index-De3pocAb.js → index-B5gJ6P15.js} +269 -21
  42. package/dist/{index-DL_XK8dd.js → index-BLWw_MlC.js} +1363 -1341
  43. package/dist/{index-D9opigZA.js → index-C5N8jeJ1.js} +1 -1
  44. package/dist/{index-Dd41k099.js → index-C8dIiNQb.js} +1 -1
  45. package/dist/{index-XTz7nzez.js → index-Ccn7PGoB.js} +268 -267
  46. package/dist/{index-BYvX1Aa7.js → index-CjZxaXvZ.js} +69 -64
  47. package/dist/{index-BgPP5w8f.js → index-DCs4-zXS.js} +7 -17
  48. package/dist/{index-C8kJRh0b.js → index-DMyaEjMn.js} +26 -20
  49. package/dist/{loading-Baon-6K7.js → loading-C1IzY-n2.js} +1312 -1312
  50. package/dist/{lodash-C7zZd2mb.js → lodash-BMQ4xbjY.js} +1 -1
  51. package/dist/membership-D3I4udu3.js +221 -0
  52. package/dist/{money-CI5RX_Uc.js → money-BQEcWGhZ.js} +1 -1
  53. package/dist/{number-BD3GORAT.js → number-DGx2QPUy.js} +1 -1
  54. package/dist/{rule-BnlZjqSN.js → rule-CvlhLEGy.js} +2 -2
  55. package/dist/{rule-builder-Qvpo2dS_.js → rule-builder-Di3qiIBb.js} +1 -1
  56. package/dist/{template-CG_Y7BYa.js → template-D6Abrya4.js} +5 -5
  57. package/dist/{usePagination-BHEEnWBL.js → usePagination-MhbjQgN7.js} +1 -1
  58. package/dist/{xlsx-DQZIpY73.js → xlsx-mL_3T1k3.js} +226 -226
  59. package/package.json +2 -2
  60. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtEHnivB.js +0 -2002
  61. package/dist/Game-Tek__-5h.js +0 -242
  62. package/dist/Point-C1mfq_Fd.js +0 -211
  63. package/dist/Segment-BLMz7i-L.js +0 -407
  64. package/dist/dto-COz9T0F3.js +0 -1092
  65. package/dist/membership-Cg82yybg.js +0 -210
@@ -1,4 +1,4 @@
1
- import { g as ep, c as jt } from "./app-Bpd1FsZZ.js";
1
+ import { g as ep, c as jt } from "./app-BvizV9z5.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -0,0 +1,221 @@
1
+ import { components as R } from "@feedmepos/ui-library";
2
+ import { n } from "./index-BLWw_MlC.js";
3
+ import { h as d, ref as u, computed as o } from "vue";
4
+ import { defineStore as O } from "pinia";
5
+ import { m as f } from "./index-C5N8jeJ1.js";
6
+ import { e as c, f as A } from "./app-BvizV9z5.js";
7
+ function i(e) {
8
+ return d(
9
+ "div",
10
+ {
11
+ class: `${e.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
12
+ },
13
+ [
14
+ d(R.FmIcon, { size: "sm", name: e.icon, outline: !0 }),
15
+ d("span", { class: "fm-typo-en-body-md-600" }, e.name)
16
+ ]
17
+ );
18
+ }
19
+ const M = {
20
+ [n.enum.VOUCHER]: {
21
+ chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
22
+ icon: "sell",
23
+ name: "Voucher",
24
+ chip() {
25
+ return i(this);
26
+ }
27
+ },
28
+ [n.enum.CREDIT]: {
29
+ chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
30
+ icon: "local_activity",
31
+ name: "Credit",
32
+ chip() {
33
+ return i(this);
34
+ }
35
+ },
36
+ [n.enum.POINT]: {
37
+ chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
38
+ icon: "award_star",
39
+ name: "Experience",
40
+ chip() {
41
+ return i(this);
42
+ }
43
+ },
44
+ [n.enum.COIN]: {
45
+ chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
46
+ icon: "monetization_on",
47
+ name: "Point",
48
+ chip() {
49
+ return i(this);
50
+ }
51
+ },
52
+ // TODO: add color for this
53
+ [n.enum.TIER]: {
54
+ chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
55
+ icon: "leaderboard",
56
+ name: "Tier",
57
+ chip() {
58
+ return i(this);
59
+ }
60
+ },
61
+ // TODO: add color for this
62
+ [n.enum.TITLE]: {
63
+ chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
64
+ icon: "id_card",
65
+ name: "Title",
66
+ chip() {
67
+ return i(this);
68
+ }
69
+ },
70
+ [n.enum.GAME]: {
71
+ chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
72
+ icon: "database",
73
+ name: "Token",
74
+ chip() {
75
+ return i(this);
76
+ }
77
+ },
78
+ // TODO: confirm color
79
+ [n.enum.STAMP]: {
80
+ chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
81
+ icon: "database",
82
+ name: "Stamp",
83
+ chip() {
84
+ return i(this);
85
+ }
86
+ }
87
+ }, m = () => A("segments"), L = {
88
+ async readAll(e) {
89
+ const a = c(
90
+ await m().get("", { params: e })
91
+ );
92
+ return {
93
+ meta: a.meta,
94
+ resources: a.resources
95
+ };
96
+ },
97
+ async readById(e) {
98
+ return c(await m().get(e));
99
+ },
100
+ async refreshSegments() {
101
+ return c(await m().get("refresh"));
102
+ },
103
+ async refreshSegment(e) {
104
+ return c(
105
+ await m().get(`refresh/${e}`)
106
+ );
107
+ },
108
+ async paginateSegmentUsers(e, a) {
109
+ const l = c(
110
+ await m().get(`/${e}/users`, {
111
+ params: a
112
+ })
113
+ );
114
+ return {
115
+ meta: l.meta,
116
+ resources: l.resources
117
+ };
118
+ },
119
+ async create(e) {
120
+ return c(await m().post("", e));
121
+ },
122
+ async update(e, a) {
123
+ return c(await m().put(e, a));
124
+ },
125
+ async delete(e) {
126
+ return c(await m().delete(e));
127
+ }
128
+ }, F = O("mf-connect-membership", () => {
129
+ const e = u(null), a = u(null), l = u([]), p = u([]), h = async () => {
130
+ const s = await f.read();
131
+ e.value = s;
132
+ }, y = async () => {
133
+ const s = await f.readStore();
134
+ a.value = s;
135
+ }, g = async () => {
136
+ const s = await f.readRewards();
137
+ l.value = s;
138
+ }, b = async () => {
139
+ const s = await L.readAll({
140
+ skip: 0,
141
+ sortBy: "_id",
142
+ limit: 1e3
143
+ });
144
+ p.value = s.resources;
145
+ }, C = o(() => e.value), v = o(
146
+ () => {
147
+ var s;
148
+ return (((s = a.value) == null ? void 0 : s.categories) ?? []).map((r) => ({
149
+ ...r,
150
+ bundles: r.bundles.sort(
151
+ (t, _) => t.name.localeCompare(_.name, "en", { numeric: !0 })
152
+ )
153
+ })).sort((r, t) => r.name.localeCompare(t.name, "en", { numeric: !0 }));
154
+ }
155
+ ), T = o(() => {
156
+ var s, r, t;
157
+ return {
158
+ company: (s = a.value) == null ? void 0 : s.company,
159
+ inclusiveTaxes: ((r = a.value) == null ? void 0 : r.inclusiveTaxes) ?? [],
160
+ stripe: (t = a.value) == null ? void 0 : t.stripe
161
+ };
162
+ }), w = o(
163
+ () => e.value ? e.value.tiers : []
164
+ ), x = o(
165
+ () => e.value ? e.value.pf_title : []
166
+ ), E = o(() => {
167
+ var s;
168
+ return [
169
+ ...l.value.filter((r) => r.type == "VOUCHER" && r.noCampaign),
170
+ ...((s = e.value) == null ? void 0 : s.pf_title) ?? []
171
+ ];
172
+ }), I = o(() => {
173
+ var r;
174
+ const s = [
175
+ ...l.value.filter(
176
+ (t) => !["VOUCHER", "TIER", "GAME", "TITLE", "STAMP"].includes(t.type)
177
+ ).map((t) => ({ ...t, name: M[t.type].name })),
178
+ ...((r = e.value) == null ? void 0 : r.pf_title) ?? []
179
+ ];
180
+ return {
181
+ raw: s,
182
+ items: s.map((t) => ({
183
+ label: `${t.type === "TITLE" ? "[T] " : ""}${t.name}`,
184
+ value: t._id,
185
+ raw: t
186
+ }))
187
+ };
188
+ }), S = o(
189
+ () => p.value.map((s) => ({
190
+ label: s.name,
191
+ value: s._id,
192
+ raw: s
193
+ }))
194
+ );
195
+ return {
196
+ // State
197
+ membership: e,
198
+ store: a,
199
+ collectibles: l,
200
+ segments: p,
201
+ // Actions
202
+ readMembership: h,
203
+ readMemberStore: y,
204
+ readRewards: g,
205
+ readSegments: b,
206
+ // Getters
207
+ membershipInfo: C,
208
+ sortedStoreCategories: v,
209
+ storeOption: T,
210
+ sortedTiers: w,
211
+ sortedTitles: x,
212
+ bundleRewards: E,
213
+ loyaltyRewards: I,
214
+ segmentOptions: S
215
+ };
216
+ });
217
+ export {
218
+ M as C,
219
+ L as s,
220
+ F as u
221
+ };
@@ -1,4 +1,4 @@
1
- import { d as r } from "./app-Bpd1FsZZ.js";
1
+ import { d as r } from "./app-BvizV9z5.js";
2
2
  function n(o) {
3
3
  return r.Dinero.fromNumber({ number: o });
4
4
  }
@@ -1,4 +1,4 @@
1
- import { d as n } from "./app-Bpd1FsZZ.js";
1
+ import { d as n } from "./app-BvizV9z5.js";
2
2
  function s(t) {
3
3
  return n.DineroFactory(t).multiply(100).toFormat(!1);
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import { h as O } from "./moment-BWErdI6_.js";
2
- import { u as ee } from "./membership-Cg82yybg.js";
3
- import { R as K, a as we } from "./rule-builder-Qvpo2dS_.js";
2
+ import { u as ee } from "./membership-D3I4udu3.js";
3
+ import { R as K, a as we } from "./rule-builder-Di3qiIBb.js";
4
4
  var ue = [
5
5
  "MO",
6
6
  "TU",
@@ -1,4 +1,4 @@
1
- import { l as i } from "./index-DL_XK8dd.js";
1
+ import { l as i } from "./index-BLWw_MlC.js";
2
2
  function a(c, t) {
3
3
  let r = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
4
4
  const e = s.length;
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as L, openBlock as r, createBlock as C, resolveDynamicComponent as D, unref as e, ref as E, computed as I, onMounted as j, resolveComponent as m, withCtx as d, createElementVNode as s, createElementBlock as h, createVNode as a, normalizeClass as w, createTextVNode as T, Fragment as S, renderList as N, toDisplayString as g, createCommentVNode as M } from "vue";
2
- import { u as P } from "./campaign-CfsRf50J.js";
2
+ import { u as P } from "./campaign-BdSwq7MJ.js";
3
3
  import { useDialog as q } from "@feedmepos/ui-library";
4
- import { F as J } from "./index-De3pocAb.js";
4
+ import { F as J } from "./index-B5gJ6P15.js";
5
5
  import { C as A } from "./collection.fn-DHlfGYAC.js";
6
6
  import { s as V } from "./index-CuvNtC_M.js";
7
- import { _ as G } from "./lodash-C7zZd2mb.js";
8
- import { C as H } from "./dto-COz9T0F3.js";
9
- import { J as U } from "./app-Bpd1FsZZ.js";
7
+ import { _ as G } from "./lodash-BMQ4xbjY.js";
8
+ import { C as H } from "./dto-CkH5Zama.js";
9
+ import { J as U } from "./app-BvizV9z5.js";
10
10
  const K = /* @__PURE__ */ L({
11
11
  __name: "CampaignChip",
12
12
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as x, Fragment as P, renderList as E, computed as b, onMounted as L, watch as R, unref as p, createCommentVNode as V, toDisplayString as k } from "vue";
2
- import { l as A } from "./lodash-C7zZd2mb.js";
2
+ import { l as A } from "./lodash-BMQ4xbjY.js";
3
3
  const T = ["id"], D = /* @__PURE__ */ M({
4
4
  __name: "FmTableSelection",
5
5
  props: {