@feedmepos/mf-connect 0.1.0-beta.9 → 0.1.0-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-D1vIDmhJ.js +620 -0
  2. package/dist/{App-DQUbRsdA.js → App-DHrfWG8l.js} +249 -250
  3. package/dist/Broadcast-B2rxZAZi.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-D2a9rcXK.js} +20 -20
  5. package/dist/Card-Dr6pTTM0.js +824 -0
  6. package/dist/Collections-0tbg0MFt.js +441 -0
  7. package/dist/Credit-KbB_7Jq-.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-we7ADwFk.js} +999 -1018
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js +344 -0
  10. package/dist/Experience-C_Q9Iml8.js +211 -0
  11. package/dist/Game-BwODw7M6.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-QOKTAS_T.js +309 -0
  15. package/dist/Member-d7RIGRm1.js +92 -0
  16. package/dist/MemberList-CK9629ew.js +1737 -0
  17. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  18. package/dist/{MemberTransactions-zSxSnUkK.js → MemberTransactions-D-pnlXiP.js} +1 -1
  19. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js +203 -0
  20. package/dist/Mission-BAKDm4VZ.js +248 -0
  21. package/dist/Point-Puu0jKz0.js +220 -0
  22. package/dist/Promotion-DRIaUvJi.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-DTdfYGya.js} +557 -557
  24. package/dist/Segment-DpBxGuuu.js +435 -0
  25. package/dist/Setting-DLB2ywCp.js +1870 -0
  26. package/dist/Store-8DO6ITWc.js +1513 -0
  27. package/dist/StoreRewards-DZfqUeYR.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-RTfozD01.js} +10 -10
  29. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BkdSj0cX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js} +1 -1
  30. package/dist/{Tier-Cpl0FV8L.js → Tier-BnQRujpX.js} +453 -481
  31. package/dist/{Title-CbMDd1Et.js → Title-BPf1tUFx.js} +295 -314
  32. package/dist/Transaction-ese0oNrz.js +36 -0
  33. package/dist/Voucher--gtOZQx1.js +485 -0
  34. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
  35. package/dist/app-Bt59niI-.js +2974 -0
  36. package/dist/{app-VxaUCtgl.js → app-DHE61XdR.js} +1 -1
  37. package/dist/app.js +3 -5
  38. package/dist/{business-DR7jpnLz.js → business-BSo7EPan.js} +1 -1
  39. package/dist/{campaign-MqcTb329.js → campaign-CsOje3Ap.js} +3 -5
  40. package/dist/{collection.fn-CvEoe61K.js → collection.fn-BYQfFJOr.js} +2 -2
  41. package/dist/dto-CfEXSCq6.js +1145 -0
  42. package/dist/{effect-BjjQeiQg.js → effect-Bn_ofYS3.js} +9 -9
  43. package/dist/{export-B8cvWh5n.js → export-CMR243CF.js} +3 -3
  44. package/dist/{helper-DfgVNY7B.js → helper-BqOQRtvW.js} +1 -1
  45. package/dist/index-BLDYTxnc.js +28058 -0
  46. package/dist/{index-C2JNcGc-.js → index-BWnFs-Cb.js} +281 -299
  47. package/dist/{index-B5NufbUt.js → index-BaBNmzUb.js} +1 -1
  48. package/dist/{index-CWR3qYjb.js → index-Boo5np6l.js} +1 -1
  49. package/dist/{index-BsfWRB8R.js → index-CC1GV8OW.js} +1 -1
  50. package/dist/{index-0UYoh1-7.js → index-CHO4_zsT.js} +1 -1
  51. package/dist/{index-2P9w5u3m.js → index-DEZsrQ2f.js} +3 -3
  52. package/dist/{index-C7zMfUgy.js → index-D_f2lmK2.js} +1 -1
  53. package/dist/{index-Dap5R3vr.js → index-Da142OER.js} +66 -78
  54. package/dist/index-DbP04yeg.js +11 -0
  55. package/dist/{index-DBy30v8N.js → index-DtPe-TEm.js} +3 -3
  56. package/dist/{index-CJ8Uh2Ja.js → index-FvlaxwGB.js} +3 -3
  57. package/dist/{index.esm2017-D1X3PgpO.js → index.esm2017-ePm--Atp.js} +55 -55
  58. package/dist/{loading-CJ3nOovJ.js → loading-KNmEMBUB.js} +460 -469
  59. package/dist/{membership-B1cmSRyk.js → membership-DKoVIS1a.js} +3 -3
  60. package/dist/money-CkD3zl5C.js +15 -0
  61. package/dist/number-BDsGpOXm.js +12 -0
  62. package/dist/{rule-ChWyR-0j.js → rule-CzamI50_.js} +2 -2
  63. package/dist/{rule-builder-CSmOONdb.js → rule-builder-DHf6wfaQ.js} +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/{template-Cug7aRK0.js → template-CFAIPoD7.js} +63 -63
  66. package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
  67. package/dist/{xlsx-CfgPFFvp.js → xlsx-BDJMaozs.js} +517 -517
  68. package/package.json +4 -7
  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/vue-i18n-BRhKDHdF.js +0 -2365
  101. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -0,0 +1,216 @@
1
+ import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as l, openBlock as i, createElementBlock as f, Fragment as _, createVNode as r, unref as a, createElementVNode as s, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as E, toDisplayString as b, createCommentVNode as H, h as q } from "vue";
2
+ import { _ as z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
+ import { u as Q, p as W } from "./loading-KNmEMBUB.js";
5
+ import { u as X } from "./business-BSo7EPan.js";
6
+ import { u as Y } from "./campaign-CsOje3Ap.js";
7
+ import { g as F, b as k } from "./dto-CfEXSCq6.js";
8
+ import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js";
10
+ import { u as te } from "./template-CFAIPoD7.js";
11
+ import { c as y } from "./index-Boo5np6l.js";
12
+ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ne = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, ce = { class: "fm-typo-en-body-lg-600" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { key: 0 }, ue = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), pe = [
13
+ ue
14
+ ], fe = /* @__PURE__ */ s("img", {
15
+ src: z,
16
+ class: "aspect-square w-[150px]"
17
+ }, null, -1), ye = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
18
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, " Create your broadcast campaign "),
19
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Broadcasting allows you to send text messages to all your customers, informing them about new deals, events, or important updates. ")
20
+ ], -1), Ae = /* @__PURE__ */ P({
21
+ __name: "Broadcast",
22
+ setup(ge) {
23
+ const A = {
24
+ label: "Create campaign",
25
+ value: "create",
26
+ isPrimary: !0,
27
+ prependIcon: "add"
28
+ }, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor: C } = Q, L = g((/* @__PURE__ */ new Date()).toISOString()), n = g({
29
+ searchKey: "",
30
+ location: null
31
+ }), u = U(
32
+ () => c.campaigns.broadcast.filter(
33
+ (e) => !n.value.location || !e.targetLocation || e.targetLocation.includes(n.value.location)
34
+ )
35
+ ), T = [
36
+ {
37
+ header: "Broadcast title",
38
+ accessorFn: (e) => e.name
39
+ },
40
+ {
41
+ header: "Status",
42
+ cell(e) {
43
+ return F(e.row.original);
44
+ }
45
+ },
46
+ {
47
+ header: "Summary",
48
+ accessorFn: (e) => k(e)
49
+ },
50
+ {
51
+ header: "Message sent",
52
+ accessorFn: (e) => e.currentReceive ?? "N/A"
53
+ },
54
+ {
55
+ header: "Actions",
56
+ cell(e) {
57
+ return q(J.FmButton, {
58
+ variant: "tertiary",
59
+ icon: "delete",
60
+ iconColor: "neutral-gray-400",
61
+ onClick: (o) => {
62
+ o.stopPropagation(), x(e.row.original);
63
+ }
64
+ });
65
+ }
66
+ }
67
+ ], v = g();
68
+ async function x(e) {
69
+ await W.remove(`Are you sure you want to remove ${e.name}?`) && await C(
70
+ async () => {
71
+ await y.delete(e._id), await c.read("BROADCAST");
72
+ },
73
+ {
74
+ message: `Removing ${e.name}`,
75
+ successMessage: `Removed ${e.name} successfully`
76
+ }
77
+ );
78
+ }
79
+ async function p(e) {
80
+ L.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await o() : V.open(async (m) => {
81
+ await o(m);
82
+ });
83
+ async function o(m) {
84
+ var d;
85
+ (d = v.value) == null || d.showSheet(
86
+ !0,
87
+ "BROADCAST",
88
+ e ? await y.readById(e._id) : void 0,
89
+ m
90
+ );
91
+ }
92
+ }
93
+ async function $(e) {
94
+ await C(
95
+ async () => {
96
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await c.read("BROADCAST");
97
+ },
98
+ {
99
+ message: `${e.campaign._id ? "Updating" : "Creating"} broadcast`,
100
+ successMessage: `Broadcast ${e.campaign._id ? "updated" : "created"} successfully`
101
+ }
102
+ );
103
+ }
104
+ return M(async () => {
105
+ await D(async () => {
106
+ await c.read("BROADCAST");
107
+ });
108
+ }), (e, o) => {
109
+ const m = l("FmPageHead"), d = l("FmSearch"), K = l("FmTable"), S = l("FmButton"), I = l("FmListItem"), O = l("FmList"), N = l("FmCard");
110
+ return i(), f(_, null, [
111
+ r(m, {
112
+ title: "Broadcast",
113
+ actions: a(u).length > 0 ? [A] : [],
114
+ "onClick:action": o[0] || (o[0] = () => p())
115
+ }, null, 8, ["actions"]),
116
+ s("div", oe, [
117
+ r(d, {
118
+ modelValue: a(n).searchKey,
119
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => a(n).searchKey = t),
120
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
121
+ placeholder: "search",
122
+ collapsible: ""
123
+ }, null, 8, ["modelValue"]),
124
+ a(c).campaigns.broadcast && a(c).campaigns.broadcast.length > 0 ? (i(), f(_, { key: 0 }, [
125
+ s("div", ae, [
126
+ s("div", se, [
127
+ r(Z, {
128
+ modelValue: a(n).location,
129
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => a(n).location = t),
130
+ label: "Location: ",
131
+ "show-item-label": !0,
132
+ icon: "storefront",
133
+ placement: "bottom-start",
134
+ items: a(R).locationItems
135
+ }, null, 8, ["modelValue", "items"])
136
+ ]),
137
+ r(d, {
138
+ modelValue: a(n).searchKey,
139
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => a(n).searchKey = t),
140
+ class: "xs:hidden",
141
+ placeholder: "search",
142
+ collapsible: ""
143
+ }, null, 8, ["modelValue"])
144
+ ]),
145
+ r(K, {
146
+ class: "xs:hidden",
147
+ "row-data": a(u),
148
+ "column-defs": T,
149
+ "search-value": a(n).searchKey,
150
+ "column-filter": [],
151
+ onRowClick: o[4] || (o[4] = (t) => p(t.original)),
152
+ "hide-footer": !0
153
+ }, null, 8, ["row-data", "search-value"]),
154
+ r(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
155
+ default: h(() => [
156
+ (i(!0), f(_, null, j(a(u).filter(
157
+ (t) => t.name.toLowerCase().includes(a(n).searchKey.toLowerCase())
158
+ ), (t) => (i(), w(I, {
159
+ key: t._id.toString(),
160
+ onClick: (B) => p(t),
161
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
162
+ }, {
163
+ default: h(() => [
164
+ s("div", ne, [
165
+ s("div", re, [
166
+ (i(), w(E(a(F)(t)))),
167
+ s("div", le, b(t.currentReceive ?? 0) + " sent ", 1)
168
+ ]),
169
+ s("div", ie, [
170
+ s("div", ce, b(t.name), 1),
171
+ s("div", me, b(a(k)(t)), 1)
172
+ ])
173
+ ]),
174
+ r(S, {
175
+ icon: "delete",
176
+ "icon-color": "neutral-gray-400",
177
+ variant: "tertiary",
178
+ onClick: (B) => (B.stopPropagation(), x(t))
179
+ }, null, 8, ["onClick"])
180
+ ]),
181
+ _: 2
182
+ }, 1032, ["onClick"]))), 128))
183
+ ]),
184
+ _: 1
185
+ }),
186
+ a(u).length == 0 ? (i(), f("div", de, pe)) : H("", !0)
187
+ ], 64)) : (i(), w(N, {
188
+ key: 1,
189
+ variant: "outlined",
190
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
191
+ }, {
192
+ default: h(() => [
193
+ fe,
194
+ ye,
195
+ r(S, {
196
+ variant: "primary",
197
+ label: "Create broadcast campaign",
198
+ icon: "add",
199
+ onClick: o[5] || (o[5] = (t) => p())
200
+ })
201
+ ]),
202
+ _: 1
203
+ })),
204
+ r(ee, {
205
+ ref_key: "sheetRef",
206
+ ref: v,
207
+ "onSubmit:modelValue": $
208
+ }, null, 512)
209
+ ])
210
+ ], 64);
211
+ };
212
+ }
213
+ });
214
+ export {
215
+ Ae as default
216
+ };
@@ -1,13 +1,13 @@
1
- import { R as RuleOperator, _ } from "./index-C7zMfUgy.js";
2
- import { i as isRuleGroup } from "./rule-builder-CSmOONdb.js";
1
+ import { R as RuleOperator, _ } from "./index-D_f2lmK2.js";
2
+ import { i as isRuleGroup } from "./rule-builder-DHf6wfaQ.js";
3
3
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
4
4
  import { useDialog } from "@feedmepos/ui-library";
5
- import "./index-CJ8Uh2Ja.js";
6
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-Dap5R3vr.js";
7
- import "./index-DBy30v8N.js";
8
- import "./index-C2JNcGc-.js";
9
- import "./index-2P9w5u3m.js";
10
- import "./index-B5NufbUt.js";
5
+ import "./index-FvlaxwGB.js";
6
+ import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-Da142OER.js";
7
+ import "./index-DtPe-TEm.js";
8
+ import "./index-BWnFs-Cb.js";
9
+ import "./index-DEZsrQ2f.js";
10
+ import "./index-BaBNmzUb.js";
11
11
  function validateRule(data, r, date) {
12
12
  const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
13
13
  function meetConditions(e) {
@@ -39,7 +39,10 @@ function validateRule(data, r, date) {
39
39
  }
40
40
  return isRuleGroup(r) ? evaluateRuleResult(getRuleResults(r), r.logic) : meetConditions(r);
41
41
  }
42
- const _hoisted_1 = { class: "flex flex-col h-full space-y-24" }, _hoisted_2 = { class: "fm-typo-en-title-sm-600" }, _hoisted_3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
42
+ const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
43
+ /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
44
+ /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
45
+ ], -1), _hoisted_2 = { class: "flex flex-col h-full space-y-24" }, _hoisted_3 = { class: "fm-typo-en-title-sm-600" }, _hoisted_4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
43
46
  __name: "CampaignTypeDialog",
44
47
  props: {
45
48
  onSelect: {
@@ -83,24 +86,21 @@ const _hoisted_1 = { class: "flex flex-col h-full space-y-24" }, _hoisted_2 = {
83
86
  function l(i) {
84
87
  n.close(), o.onSelect(i);
85
88
  }
86
- return (i, a) => {
87
- const c = resolveComponent("FmCard");
88
- return openBlock(), createBlock(c, { class: "p-24 space-y-16" }, {
89
+ return (i, c) => {
90
+ const a = resolveComponent("FmCard");
91
+ return openBlock(), createBlock(a, { class: "p-24 space-y-16" }, {
89
92
  default: withCtx(() => [
90
- a[0] || (a[0] = createElementVNode("div", { class: "" }, [
91
- createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
92
- createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
93
- ], -1)),
94
- createElementVNode("div", _hoisted_1, [
95
- (openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(c, {
93
+ _hoisted_1,
94
+ createElementVNode("div", _hoisted_2, [
95
+ (openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(a, {
96
96
  variant: "outlined",
97
97
  key: s.value,
98
98
  onClick: (u) => l(s.value),
99
99
  class: "p-16 space-y-8 cursor-pointer"
100
100
  }, {
101
101
  default: withCtx(() => [
102
- createElementVNode("div", _hoisted_2, toDisplayString(s.title), 1),
103
- createElementVNode("div", _hoisted_3, toDisplayString(s.description), 1)
102
+ createElementVNode("div", _hoisted_3, toDisplayString(s.title), 1),
103
+ createElementVNode("div", _hoisted_4, toDisplayString(s.description), 1)
104
104
  ]),
105
105
  _: 2
106
106
  }, 1032, ["onClick"])), 64))