@feedmepos/mf-connect 0.1.2-prod → 0.1.4-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 (87) hide show
  1. package/dist/Analytic-07T9poLx.js +423 -0
  2. package/dist/{App-CRTD0U-N.js → App-C6MukSCT.js} +276 -275
  3. package/dist/Broadcast-CzsgeZNO.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C5zUv0Zx.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BirunpzI.js} +8 -8
  5. package/dist/Card-DQnyWZZf.js +824 -0
  6. package/dist/{Collections-BgbWoLWI.js → Collections-BV7CSqRw.js} +4 -4
  7. package/dist/Credit-CxsbYGLZ.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C137bE1q.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js} +918 -901
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DpsrI-Z3.js +345 -0
  10. package/dist/Experience-eMUbhq7h.js +221 -0
  11. package/dist/Game-CxAG2ViS.js +255 -0
  12. package/dist/Marketing-CozMj2Y5.js +316 -0
  13. package/dist/Member-DM1dj3F5.js +69 -0
  14. package/dist/{MemberList-ISy05wGZ.js → MemberList-DNjK9BbG.js} +14 -14
  15. package/dist/{MemberTransactions-CXvhJngX.js → MemberTransactions-CsjN3LZA.js} +1 -1
  16. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Ca1LO__F.js → MessageInput.vue_vue_type_script_setup_true_lang-DVQE9v2R.js} +2 -2
  17. package/dist/Mission-BugvTPPH.js +261 -0
  18. package/dist/Point-D8BjGtqT.js +222 -0
  19. package/dist/Promotion-mc9KBzoJ.js +253 -0
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D1eQ3i5D.js → RuleGroup.vue_vue_type_script_setup_true_lang-B2H3D_kZ.js} +15 -15
  21. package/dist/Segment-DZRFA-Pb.js +565 -0
  22. package/dist/Setting-DxNhR44e.js +1871 -0
  23. package/dist/Store-CdkJWpjV.js +1530 -0
  24. package/dist/StoreRewards-Cdturia8.js +400 -0
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-nhS5Dhhk.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D7GcOiUM.js} +10 -10
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DWlpmE56.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-nuCOrrLE.js} +1 -1
  27. package/dist/{Tier-DLrOmrnK.js → Tier-I_MMd39Y.js} +470 -445
  28. package/dist/{Title-MHQuel7h.js → Title-DK5gmUvo.js} +298 -282
  29. package/dist/Transaction-BXpTIMS_.js +39 -0
  30. package/dist/Voucher-BQ5h2G0I.js +490 -0
  31. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-eAP99wyg.js +141 -0
  32. package/dist/app-CL2Wxzv5.js +5639 -0
  33. package/dist/{app-BjOpRVdv.js → app-DTAyCT-G.js} +1 -1
  34. package/dist/app.js +4 -3
  35. package/dist/{business-DveMDDHY.js → business-B9OUlaFZ.js} +1 -1
  36. package/dist/{campaign-CMb05XLt.js → campaign-CNbUA51l.js} +2 -2
  37. package/dist/{collection.fn-BjaBPYMU.js → collection.fn-D_i45T4Q.js} +2 -2
  38. package/dist/dto-B4208_es.js +2770 -0
  39. package/dist/{effect-CxAdSlyD.js → effect-Ye_yr8et.js} +1 -1
  40. package/dist/{email-addresses-Dtr5OALQ.js → email-addresses-Gm7Dyaxy.js} +1 -1
  41. package/dist/{export-DuBekrcg.js → export-Buee5oUV.js} +3 -3
  42. package/dist/{helper-DL6hnmtJ.js → helper-BBlHhMFc.js} +1 -1
  43. package/dist/{index-raYm7Ew2.js → index-BxJgFvym.js} +2 -2
  44. package/dist/{index-gcsOy_cD.js → index-ByaM-yoc.js} +91 -86
  45. package/dist/{index-DISwCnfH.js → index-C0QHb5SL.js} +2 -2
  46. package/dist/{index-Cibwzgac.js → index-C363BG5A.js} +3 -3
  47. package/dist/{index-BZAlqAaJ.js → index-CLL3no-v.js} +1 -1
  48. package/dist/{index-CAQpU5Rv.js → index-ChSVaFk3.js} +1 -1
  49. package/dist/{index-BSIUoSG3.js → index-Co9n8I_5.js} +3 -3
  50. package/dist/index-CoGNKU8v.js +3 -0
  51. package/dist/{index-Dx4pkNRc.js → index-DHGcUMVN.js} +1 -1
  52. package/dist/{index-CgPlJqkX.js → index-DWWtZSrm.js} +1 -1
  53. package/dist/{index-CGHNWhkM.js → index-DdVZgYE4.js} +258 -256
  54. package/dist/{index-BBBytzpn.js → index-Dx3HwWcb.js} +1 -1
  55. package/dist/{index.esm2017-Bs9CWbrs.js → index.esm2017-Dd02dg_O.js} +38 -38
  56. package/dist/{loading-Dj5bx8fg.js → loading-Or1ZDzDS.js} +11 -11
  57. package/dist/{membership-B2avlZoN.js → membership-B8h5ku-v.js} +3 -3
  58. package/dist/{money-CNSWtAf-.js → money-CmsKAJBT.js} +1 -1
  59. package/dist/{number-BA58pjU6.js → number-iEhp7Uai.js} +1 -1
  60. package/dist/{rule-BWazFYuZ.js → rule-BORkgSMK.js} +3 -3
  61. package/dist/{rule-builder-RIloDQBn.js → rule-builder-DEfkSr68.js} +1 -1
  62. package/dist/{template-u01r84LY.js → template-C_Y7bhlI.js} +4 -4
  63. package/dist/{usePagination--B6Wt7C1.js → usePagination-Ci8-uZvb.js} +1 -1
  64. package/dist/vue-i18n-BXzrZRP6.js +2365 -0
  65. package/package.json +7 -4
  66. package/dist/Analytic-AqWU_lJy.js +0 -620
  67. package/dist/Broadcast-utWSrzP9.js +0 -216
  68. package/dist/Card-x6qnEaIt.js +0 -823
  69. package/dist/Credit-CojzmUnh.js +0 -214
  70. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-8l3Dt_Lo.js +0 -344
  71. package/dist/Experience-CPjovKWF.js +0 -211
  72. package/dist/Game-DWcjPfZP.js +0 -250
  73. package/dist/Marketing-CwoI0pFF.js +0 -309
  74. package/dist/Member-oRcVGr20.js +0 -92
  75. package/dist/Mission-Y8s5MQIC.js +0 -248
  76. package/dist/Point-0Fw3qLIW.js +0 -220
  77. package/dist/Promotion-vqM23NPX.js +0 -244
  78. package/dist/Segment-lgzMRCyd.js +0 -564
  79. package/dist/Setting-CFGB53S0.js +0 -1870
  80. package/dist/Store-fJlew3HJ.js +0 -1533
  81. package/dist/StoreRewards-DWq34E4p.js +0 -429
  82. package/dist/Transaction-CYqMFEzc.js +0 -36
  83. package/dist/Voucher-B0QCX_nG.js +0 -485
  84. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  85. package/dist/app-SOHUUM08.js +0 -2974
  86. package/dist/dto-CY7JrHkZ.js +0 -1145
  87. package/dist/index-BMxu_XL-.js +0 -11
@@ -0,0 +1,223 @@
1
+ import { defineComponent as N, ref as h, computed as U, onMounted as j, resolveComponent as r, openBlock as l, createElementBlock as y, Fragment as b, createVNode as i, unref as t, createElementVNode as n, withCtx as v, renderList as E, createBlock as w, resolveDynamicComponent as H, toDisplayString as d, createCommentVNode as q, h 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 { u as W, p as X } from "./loading-Or1ZDzDS.js";
5
+ import { u as Y } from "./business-B9OUlaFZ.js";
6
+ import { u as Z } from "./campaign-CNbUA51l.js";
7
+ import { g as B, a as A } from "./dto-B4208_es.js";
8
+ import { u as ee } from "./vue-i18n-BXzrZRP6.js";
9
+ import { _ as te } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js";
11
+ import { u as oe } from "./template-C_Y7bhlI.js";
12
+ import { c as _ } from "./index-DWWtZSrm.js";
13
+ const ne = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, ie = { 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" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { key: 0 }, fe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, ge = /* @__PURE__ */ n("img", {
14
+ src: G,
15
+ class: "aspect-square w-[150px]"
16
+ }, null, -1), ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = /* @__PURE__ */ N({
17
+ __name: "Broadcast",
18
+ setup(be) {
19
+ const { t: s } = ee(), V = {
20
+ label: s("connect.campaign.common.createCampaign"),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, D = oe("BROADCAST", J()), R = Y(), m = Z(), { global: L, minor: x } = W, T = h((/* @__PURE__ */ new Date()).toISOString()), c = h({
25
+ searchKey: "",
26
+ location: null
27
+ }), f = U(
28
+ () => m.campaigns.broadcast.filter(
29
+ (e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
30
+ )
31
+ ), I = [
32
+ {
33
+ header: "Broadcast title",
34
+ accessorFn: (e) => e.name
35
+ },
36
+ {
37
+ header: "Status",
38
+ cell(e) {
39
+ return B(e.row.original);
40
+ }
41
+ },
42
+ {
43
+ header: "Summary",
44
+ accessorFn: (e) => A(e)
45
+ },
46
+ {
47
+ header: "Message sent",
48
+ accessorFn: (e) => e.currentReceive ?? "N/A"
49
+ },
50
+ {
51
+ header: "Actions",
52
+ cell(e) {
53
+ return z(Q.FmButton, {
54
+ variant: "tertiary",
55
+ icon: "delete",
56
+ iconColor: "neutral-gray-400",
57
+ onClick: (o) => {
58
+ o.stopPropagation(), S(e.row.original);
59
+ }
60
+ });
61
+ }
62
+ }
63
+ ], C = h();
64
+ async function S(e) {
65
+ await X.remove(
66
+ s("campaign.common.remove.confirm", { name: e.name })
67
+ ) && await x(
68
+ async () => {
69
+ await _.delete(e._id), await m.read("BROADCAST");
70
+ },
71
+ {
72
+ message: s("campaign.common.remove.removing", { name: e.name }),
73
+ successMessage: s("campaign.common.remove.removed", { name: e.name })
74
+ }
75
+ );
76
+ }
77
+ async function g(e) {
78
+ T.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await o() : D.open(async (p) => {
79
+ await o(p);
80
+ });
81
+ async function o(p) {
82
+ var u;
83
+ (u = C.value) == null || u.showSheet(
84
+ !0,
85
+ "BROADCAST",
86
+ e ? await _.readById(e._id) : void 0,
87
+ p
88
+ );
89
+ }
90
+ }
91
+ async function K(e) {
92
+ await x(
93
+ async () => {
94
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("BROADCAST");
95
+ },
96
+ {
97
+ message: s(
98
+ `connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
99
+ ),
100
+ successMessage: s("connect.campaign.broadcast.update.success", {
101
+ action: e.campaign._id ? "updated" : "created"
102
+ })
103
+ }
104
+ );
105
+ }
106
+ return j(async () => {
107
+ await L(async () => {
108
+ await m.read("BROADCAST");
109
+ });
110
+ }), (e, o) => {
111
+ const p = r("FmPageHead"), u = r("FmSearch"), O = r("FmTable"), F = r("FmButton"), $ = r("FmListItem"), P = r("FmList"), M = r("FmCard");
112
+ return l(), y(b, null, [
113
+ i(p, {
114
+ title: t(s)("connect.campaign.broadcast.title"),
115
+ actions: t(f).length > 0 ? [V] : [],
116
+ "onClick:action": o[0] || (o[0] = () => g())
117
+ }, null, 8, ["title", "actions"]),
118
+ n("div", ne, [
119
+ i(u, {
120
+ modelValue: t(c).searchKey,
121
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => t(c).searchKey = a),
122
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
123
+ placeholder: t(s)("connect.campaign.common.search"),
124
+ collapsible: ""
125
+ }, null, 8, ["modelValue", "placeholder"]),
126
+ t(m).campaigns.broadcast && t(m).campaigns.broadcast.length > 0 ? (l(), y(b, { key: 0 }, [
127
+ n("div", se, [
128
+ n("div", ce, [
129
+ i(te, {
130
+ modelValue: t(c).location,
131
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => t(c).location = a),
132
+ label: `${t(s)("connect.campaign.common.location")}: `,
133
+ "show-item-label": !0,
134
+ icon: "storefront",
135
+ placement: "bottom-start",
136
+ items: t(R).locationItems
137
+ }, null, 8, ["modelValue", "label", "items"])
138
+ ]),
139
+ i(u, {
140
+ modelValue: t(c).searchKey,
141
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => t(c).searchKey = a),
142
+ class: "xs:hidden",
143
+ placeholder: "search",
144
+ collapsible: ""
145
+ }, null, 8, ["modelValue"])
146
+ ]),
147
+ i(O, {
148
+ class: "xs:hidden",
149
+ "row-data": t(f),
150
+ "column-defs": I,
151
+ "search-value": t(c).searchKey,
152
+ "column-filter": [],
153
+ onRowClick: o[4] || (o[4] = (a) => g(a.original)),
154
+ "hide-footer": !0
155
+ }, null, 8, ["row-data", "search-value"]),
156
+ i(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
157
+ default: v(() => [
158
+ (l(!0), y(b, null, E(t(f).filter(
159
+ (a) => a.name.toLowerCase().includes(t(c).searchKey.toLowerCase())
160
+ ), (a) => (l(), w($, {
161
+ key: a._id.toString(),
162
+ onClick: (k) => g(a),
163
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
164
+ }, {
165
+ default: v(() => [
166
+ n("div", ie, [
167
+ n("div", re, [
168
+ (l(), w(H(t(B)(a)))),
169
+ n("div", le, d(a.currentReceive ?? 0) + " sent ", 1)
170
+ ]),
171
+ n("div", me, [
172
+ n("div", de, d(a.name), 1),
173
+ n("div", pe, d(t(A)(a)), 1)
174
+ ])
175
+ ]),
176
+ i(F, {
177
+ icon: "delete",
178
+ "icon-color": "neutral-gray-400",
179
+ variant: "tertiary",
180
+ onClick: (k) => (k.stopPropagation(), S(a))
181
+ }, null, 8, ["onClick"])
182
+ ]),
183
+ _: 2
184
+ }, 1032, ["onClick"]))), 128))
185
+ ]),
186
+ _: 1
187
+ }),
188
+ t(f).length == 0 ? (l(), y("div", ue, [
189
+ n("div", fe, d(t(s)("connect.campaign.common.noResults")), 1)
190
+ ])) : q("", !0)
191
+ ], 64)) : (l(), w(M, {
192
+ key: 1,
193
+ variant: "outlined",
194
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
195
+ }, {
196
+ default: v(() => [
197
+ ge,
198
+ n("div", ye, [
199
+ n("div", _e, d(t(s)("connect.campaign.broadcast.create.title")), 1),
200
+ n("div", he, d(t(s)("connect.campaign.broadcast.create.description")), 1)
201
+ ]),
202
+ i(F, {
203
+ variant: "primary",
204
+ label: t(s)("connect.campaign.broadcast.create.button"),
205
+ icon: "add",
206
+ onClick: o[5] || (o[5] = (a) => g())
207
+ }, null, 8, ["label"])
208
+ ]),
209
+ _: 1
210
+ })),
211
+ i(ae, {
212
+ ref_key: "sheetRef",
213
+ ref: C,
214
+ "onSubmit:modelValue": K
215
+ }, null, 512)
216
+ ])
217
+ ], 64);
218
+ };
219
+ }
220
+ });
221
+ export {
222
+ Le as default
223
+ };
@@ -1,13 +1,13 @@
1
- import { R as RuleOperator, _ } from "./index-CAQpU5Rv.js";
2
- import { i as isRuleGroup } from "./rule-builder-RIloDQBn.js";
1
+ import { R as RuleOperator, _ } from "./index-ChSVaFk3.js";
2
+ import { i as isRuleGroup } from "./rule-builder-DEfkSr68.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-raYm7Ew2.js";
6
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-gcsOy_cD.js";
7
- import "./index-Cibwzgac.js";
8
- import "./index-CGHNWhkM.js";
9
- import "./index-DISwCnfH.js";
10
- import "./index-BZAlqAaJ.js";
5
+ import "./index-BxJgFvym.js";
6
+ import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-ByaM-yoc.js";
7
+ import "./index-C363BG5A.js";
8
+ import "./index-DdVZgYE4.js";
9
+ import "./index-C0QHb5SL.js";
10
+ import "./index-CLL3no-v.js";
11
11
  function validateRule(data, r, date) {
12
12
  const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
13
13
  function meetConditions(e) {