@feedmepos/mf-connect 0.1.38-beta.33 → 0.1.38-beta.34

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 (93) hide show
  1. package/dist/{Analytic-B1hvdnhQ.js → Analytic-DBUfOGXN.js} +13 -13
  2. package/dist/{App-BCjFwtVu.js → App-BKoC43t0.js} +8 -8
  3. package/dist/{AuditLogs-DwOzstOt.js → AuditLogs-DfcDKAAx.js} +9 -9
  4. package/dist/{Bin-BgnnzoZS.js → Bin-K1LAZ7Il.js} +8 -8
  5. package/dist/{Broadcast-DqSOAE01.js → Broadcast-dPQylejk.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CBMG8_Sk.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CADc94lG.js} +6 -6
  7. package/dist/{Card-A9CkhfVY.js → Card-DqXEthXd.js} +16 -16
  8. package/dist/{Collections-BgnFnaWo.js → Collections-2higR9xt.js} +6 -6
  9. package/dist/{Credit-a_OpuZJM.js → Credit-C0zUwRx_.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CNBh1Id6.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DiMkp8eD.js} +32 -32
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-oao_UwRf.js → EffectSheet.vue_vue_type_style_index_0_lang-CeZvW4CN.js} +6 -6
  12. package/dist/{Experience-CpGj9JqO.js → Experience-B2an8JbD.js} +9 -9
  13. package/dist/{Game-D0e3MyPK.js → Game-BO7F7MwC.js} +10 -10
  14. package/dist/{Grab-Exo0vj4b.js → Grab-DhHyUon4.js} +9 -9
  15. package/dist/{Index-DU0reBq4.js → Index-uadi-EZ6.js} +10 -10
  16. package/dist/{Marketing-BZtDNsA-.js → Marketing-BWpOwWf0.js} +7 -7
  17. package/dist/{Member-D8buIkBR.js → Member-Mcwja1E6.js} +10 -10
  18. package/dist/{MemberList-CDwYfTlS.js → MemberList-BPGNOKXn.js} +25 -25
  19. package/dist/{MemberTransactions-DRkpizb_.js → MemberTransactions-DaBU7MOW.js} +1 -1
  20. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-VzyI4O5z.js → MessageInput.vue_vue_type_script_setup_true_lang-DYuWH0OF.js} +8 -8
  21. package/dist/{Mission-BTzIK2Yx.js → Mission-DSRwwQMw.js} +10 -10
  22. package/dist/{Overview-CMkljRYt.js → Overview-B897q3qA.js} +18 -18
  23. package/dist/{Point-DGPLd8z-.js → Point-lhl01-GA.js} +9 -9
  24. package/dist/{Promotion-D8K2pFnv.js → Promotion-BvO0BUst.js} +10 -10
  25. package/dist/{Queue-CySghWZm.js → Queue-ec2IpEuf.js} +10 -10
  26. package/dist/{Record-CxloqLoN.js → Record-BXLVpbR2.js} +8 -8
  27. package/dist/{Reward-DxvFaqzm.js → Reward-DCzxzMzn.js} +15 -15
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-WOC3rplt.js → RewardGroup.vue_vue_type_script_setup_true_lang-COiUXYSb.js} +11 -11
  29. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-C4zhGkBY.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bz3lj9Ng.js} +13 -13
  30. package/dist/{Segment-DKD6P0cE.js → Segment-CYk3w6PO.js} +22 -22
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-bpblaVLq.js → SelectItems.vue_vue_type_script_setup_true_lang-ITaqten3.js} +2 -2
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1g0fHPV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ViJglQse.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CSR5EuVO.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DSm11Q46.js} +3 -3
  34. package/dist/{Setting-khHGWePA.js → Setting-DZtcRs0k.js} +141 -141
  35. package/dist/SettingAdvertisements-DBQEaFBm.js +262 -0
  36. package/dist/{Store-0cJJpCIV.js → Store-5svFOdbG.js} +20 -20
  37. package/dist/{StoreRewards-CV8XStEA.js → StoreRewards-DImHNqJA.js} +13 -13
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bqw4ayC4.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BUnlE8_-.js} +20 -20
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BprUyeOJ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CiDVA4p8.js} +1 -1
  40. package/dist/{Tier-BgahD6Rs.js → Tier-B43j8PN_.js} +20 -20
  41. package/dist/{Title-DKGqu5SL.js → Title-6ThYGwPj.js} +19 -19
  42. package/dist/{Transaction-Bu-Zaa-_.js → Transaction-CGkAjZ9A.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-cDZZz9DR.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cvr5u0Zs.js} +6 -6
  44. package/dist/{Voucher-sko-4yOv.js → Voucher-Blbht91D.js} +14 -14
  45. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DVlYxnyk.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Bi0Z03Ai.js} +10 -10
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CeNxiT5A.js → ZodTextField.vue_vue_type_script_setup_true_lang-CWoUnCAa.js} +1 -1
  47. package/dist/{app-DivOpQ--.js → app-C6urTnJ4.js} +1 -1
  48. package/dist/{app-B06WmmlS.js → app-xTCQAKl2.js} +2209 -1122
  49. package/dist/app.js +1 -1
  50. package/dist/{business-ClV-3_wH.js → business-B7k-tZEN.js} +1 -1
  51. package/dist/{campaign-C-DtV5gs.js → campaign-Bz9UcS_m.js} +2 -2
  52. package/dist/{campaign-ChCAqzSE.js → campaign-muSKe19-.js} +71 -71
  53. package/dist/{campaign.enum-HJvL6WCW.js → campaign.enum-hDvXhq3o.js} +1 -1
  54. package/dist/{campaign.fn-FkHPIhXx.js → campaign.fn-dcycsEgm.js} +3 -3
  55. package/dist/{collectible.enum-DlxRyJMy.js → collectible.enum-wxQMWK6c.js} +1 -1
  56. package/dist/{collection.fn-DmYKiZsL.js → collection.fn-DDzDInuW.js} +2 -2
  57. package/dist/{dto-BKG9T2I2.js → dto-CunCCKYQ.js} +4 -4
  58. package/dist/{effect-qQUWG0In.js → effect-BXObGcbg.js} +1 -1
  59. package/dist/{email-addresses-Dqyt8I7s.js → email-addresses-C6eoXJGp.js} +1 -1
  60. package/dist/{export-CUcU1l-K.js → export-BDFxcaL0.js} +3 -3
  61. package/dist/{helper-Bxi0o7m8.js → helper-BvwYqXjY.js} +1 -1
  62. package/dist/{index-B5SrWi06.js → index--EQGC2IH.js} +3 -3
  63. package/dist/{index-C06Q7hpx.js → index-3EjNf2am.js} +1 -1
  64. package/dist/{index-BWq6tQbu.js → index-B41wOGTO.js} +1 -1
  65. package/dist/{index-Dhh1sEG_.js → index-BuvsKdUo.js} +6 -6
  66. package/dist/{index-BAv3BkZY.js → index-C-Y8B9_g.js} +1023 -1023
  67. package/dist/{index-DlK01rGI.js → index-CVG-2gDW.js} +1 -1
  68. package/dist/{index-DdekcTG4.js → index-CkdgYD-t.js} +1 -1
  69. package/dist/{index-Ct2-fiN2.js → index-D23WXsuy.js} +1 -1
  70. package/dist/{index-BEN3tBqd.js → index-DQqUeKpy.js} +2 -2
  71. package/dist/{index-BL_1CL4C.js → index-DVL-x7W6.js} +4 -4
  72. package/dist/{index-B94mBxiL.js → index-DtFTHQOJ.js} +1 -1
  73. package/dist/{index-DzELBV8R.js → index-RKOwESmg.js} +1 -1
  74. package/dist/{index-TKz_0Ysa.js → index-_9R9an9a.js} +1 -1
  75. package/dist/{index-UjD7i6Rs.js → index-tz_n5lEb.js} +4 -4
  76. package/dist/{index.esm2017-DHCRXeWh.js → index.esm2017-wyZHjxJg.js} +1 -1
  77. package/dist/{loading-B_UZCyhK.js → loading-CVL-OePP.js} +1 -1
  78. package/dist/{membership-_kM8eXz7.js → membership-Cwolq8Cj.js} +3 -3
  79. package/dist/{money-CoVA-srK.js → money-hSkLuGRM.js} +1 -1
  80. package/dist/{number-YRitPV2s.js → number-C6FRJ2M7.js} +1 -1
  81. package/dist/{objectid-C1na7D-x.js → objectid-aShDJfER.js} +4 -4
  82. package/dist/{plugins-CRzS5EeK.js → plugins-CPwW8rZp.js} +2 -2
  83. package/dist/{reward-BzSjQxTf.js → reward-BRjFlh6E.js} +1 -1
  84. package/dist/{rule-BTgu7Yg-.js → rule-CYMGrUxS.js} +3 -3
  85. package/dist/{rule-builder-DqxBZKm0.js → rule-builder-TdDaDyR7.js} +1 -1
  86. package/dist/{template-Cb_6r-V_.js → template-C78lPPQn.js} +4 -4
  87. package/dist/{timezone-_t4BbV7Q.js → timezone-CAUT5KZd.js} +1 -1
  88. package/dist/{trigger-B0ldNAaK.js → trigger-CQKxXHDL.js} +4 -4
  89. package/dist/{user-B4J6WtQq.js → user-8R-3y6sK.js} +1 -1
  90. package/dist/{vue-i18n-c1uC6tyM.js → vue-i18n-LviVr_kr.js} +2 -2
  91. package/dist/{xlsx-BRAFCQ59.js → xlsx-mDgALSyS.js} +1 -1
  92. package/package.json +1 -1
  93. package/dist/SettingAdvertisements-DJHKjE95.js +0 -264
@@ -1,264 +0,0 @@
1
- import { defineComponent as H, ref as y, computed as I, onMounted as J, resolveComponent as A, openBlock as d, createElementBlock as b, createElementVNode as o, createVNode as i, createTextVNode as K, unref as n, withCtx as w, toDisplayString as P, createBlock as V, Fragment as W, renderList as Y, createCommentVNode as N, isRef as Z } from "vue";
2
- import { u as ee } from "./loading-B_UZCyhK.js";
3
- import { u as te } from "./app-wDQR6dpb.js";
4
- import { u as oe } from "./business-ClV-3_wH.js";
5
- import { u as se } from "./membership-_kM8eXz7.js";
6
- import "./index-BAv3BkZY.js";
7
- import { k as ne } from "./index-UjD7i6Rs.js";
8
- import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
9
- import { f as U, p as ae } from "./plugins-CRzS5EeK.js";
10
- import { _ as ie } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BprUyeOJ.js";
11
- import { u as re } from "./vue-i18n-c1uC6tyM.js";
12
- import { useRouter as de } from "vue-router";
13
- import { m as ue } from "./index-B94mBxiL.js";
14
- import { a as me } from "./object-qECH92oz.js";
15
- const ce = { class: "min-h-screen bg-fm-color-neutral-gray-50" }, pe = { class: "bg-white border-b border-fm-color-neutral-gray-100 sticky top-0 z-10" }, ve = { class: "px-24 py-16 flex items-center justify-between" }, fe = { class: "flex items-center gap-16" }, ge = { class: "fm-typo-en-title-md-800 flex items-center gap-8" }, ye = {
16
- key: 0,
17
- class: "px-24 py-24"
18
- }, be = { class: "flex items-center gap-24 mb-24" }, he = { class: "fm-typo-en-body-lg-600" }, _e = {
19
- key: 1,
20
- class: "grid grid-cols-5 gap-16 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2"
21
- }, we = { class: "absolute top-8 right-8 z-10" }, xe = { class: "aspect-[3/4] bg-fm-color-neutral-gray-100" }, Ae = ["src"], Se = ["src", "alt"], ke = {
22
- key: 2,
23
- class: "w-full h-full flex items-center justify-center text-fm-color-typo-disabled"
24
- }, Ce = { class: "w-48 h-48 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center mb-8" }, Fe = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary" }, Me = { class: "space-y-[40px]" }, je = { class: "flex" }, Le = { class: "flex flex-wrap" }, Pe = { class: "flex items-center gap-8" }, B = 20, Ge = /* @__PURE__ */ H({
25
- __name: "SettingAdvertisements",
26
- setup(Ve) {
27
- const E = de(), S = te(), M = oe(), k = se(), { global: Q, minor: T } = ee;
28
- re();
29
- const r = y(), c = y([]), f = y([]), h = y(!1), p = y(null), C = y(null), F = y(null), j = I(() => {
30
- var t, e;
31
- return ((e = (t = r.value) == null ? void 0 : t.advertisements) == null ? void 0 : e.length) ?? 0;
32
- }), D = I(() => j.value < B);
33
- function _(t) {
34
- var s, l;
35
- const e = (l = (s = r.value) == null ? void 0 : s.advertisements) == null ? void 0 : l[t];
36
- if (e)
37
- return typeof e == "string" ? e : e.url;
38
- }
39
- function R(t) {
40
- return t ? [".mp4", ".webm", ".ogg", ".mov"].some((s) => t.toLowerCase().includes(s)) : !1;
41
- }
42
- async function L() {
43
- await T(
44
- async () => {
45
- const t = me(r.value), e = ne.parse(t), s = await Promise.all(
46
- c.value.map(async (l, u) => {
47
- var x;
48
- const a = (x = e.advertisements) == null ? void 0 : x[u];
49
- let g;
50
- return l ? g = await U.update(
51
- U.advertisementPath(u, l),
52
- l
53
- ) : typeof a == "string" ? g = a : a && typeof a == "object" && (g = a.url), g ? {
54
- _id: typeof a == "object" && (a == null ? void 0 : a._id) || `${Date.now()}-${Math.random().toString(36).substring(2, 15)}`,
55
- url: g,
56
- targetLocation: f.value[u] || null,
57
- order: u
58
- } : null;
59
- })
60
- );
61
- e.advertisements = s.filter((l) => l), await ue.update(e), await k.readMembership(), r.value = k.membership;
62
- },
63
- {
64
- message: "Saving advertisements",
65
- successMessage: "Advertisements saved successfully"
66
- }
67
- );
68
- }
69
- function $(t) {
70
- p.value = t, C.value = c.value[t], F.value = f.value[t], h.value = !0;
71
- }
72
- function O() {
73
- if (!D.value) return;
74
- const t = c.value.length;
75
- c.value.push(null), f.value.push(null), $(t);
76
- }
77
- async function X() {
78
- p.value !== null && (c.value[p.value] = C.value, f.value[p.value] = F.value, await L(), h.value = !1);
79
- }
80
- async function q(t, e) {
81
- var s, l;
82
- t.stopPropagation(), await ae.remove("Delete this advertisement?", "Delete", "Delete") && ((l = (s = r.value) == null ? void 0 : s.advertisements) == null || l.splice(e, 1), c.value.splice(e, 1), f.value.splice(e, 1), await L());
83
- }
84
- function G() {
85
- E.push("/setting");
86
- }
87
- return J(async () => {
88
- await Q(async () => {
89
- var t, e;
90
- await M.readPremium(), await M.readLocations(), await k.readMembership(), r.value = k.membership, (e = (t = r.value) == null ? void 0 : t.advertisements) != null && e.length ? (c.value = r.value.advertisements.map(() => null), f.value = r.value.advertisements.map(
91
- (s) => typeof s == "string" ? null : s.targetLocation || null
92
- )) : (c.value = [], f.value = []);
93
- });
94
- }), (t, e) => {
95
- var x;
96
- const s = A("FmButton"), l = A("FmPill"), u = A("FmCard"), a = A("FmIcon"), g = A("FmSideSheet");
97
- return d(), b("div", ce, [
98
- o("div", pe, [
99
- o("div", ve, [
100
- o("div", fe, [
101
- i(s, {
102
- icon: "arrow_back",
103
- variant: "tertiary",
104
- onClick: G
105
- }),
106
- o("div", null, [
107
- o("div", ge, [
108
- e[4] || (e[4] = K(" Advertisements ", -1)),
109
- i(l, { variant: "premium" })
110
- ]),
111
- e[5] || (e[5] = o("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Manage ads shown on FeedMe ordering app ", -1))
112
- ])
113
- ]),
114
- i(s, {
115
- label: "Save Changes",
116
- onClick: L,
117
- disabled: !!n(S).loadingQueue.length,
118
- loading: !!n(S).loadingQueue.length
119
- }, null, 8, ["disabled", "loading"])
120
- ])
121
- ]),
122
- n(r) ? (d(), b("div", ye, [
123
- o("div", be, [
124
- i(u, {
125
- variant: "outlined",
126
- class: "px-16 py-12 flex items-center gap-8"
127
- }, {
128
- default: w(() => [
129
- e[6] || (e[6] = o("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Active Ads:", -1)),
130
- o("span", he, P(n(j)) + " / " + P(B), 1)
131
- ]),
132
- _: 1
133
- })
134
- ]),
135
- n(M).isPremium ? (d(), b("div", _e, [
136
- (d(!0), b(W, null, Y(((x = n(r).advertisements) == null ? void 0 : x.length) || 0, (v, m) => (d(), V(u, {
137
- key: m,
138
- variant: "outlined",
139
- class: "cursor-pointer hover:shadow-lg transition-shadow overflow-hidden relative",
140
- onClick: (z) => $(m)
141
- }, {
142
- default: w(() => [
143
- o("div", we, [
144
- i(s, {
145
- icon: "delete",
146
- variant: "tertiary",
147
- size: "sm",
148
- class: "bg-white/90 hover:bg-white shadow-sm",
149
- onClick: (z) => q(z, m)
150
- }, null, 8, ["onClick"])
151
- ]),
152
- o("div", xe, [
153
- _(m) && R(_(m)) ? (d(), b("video", {
154
- key: 0,
155
- src: _(m),
156
- class: "w-full h-full object-cover",
157
- muted: "",
158
- loop: "",
159
- autoplay: "",
160
- playsinline: ""
161
- }, null, 8, Ae)) : _(m) ? (d(), b("img", {
162
- key: 1,
163
- src: _(m),
164
- class: "w-full h-full object-cover",
165
- alt: `Ad ${m + 1}`
166
- }, null, 8, Se)) : (d(), b("div", ke, [
167
- i(a, {
168
- name: "image",
169
- size: "48"
170
- })
171
- ]))
172
- ])
173
- ]),
174
- _: 2
175
- }, 1032, ["onClick"]))), 128)),
176
- n(D) ? (d(), V(u, {
177
- key: 0,
178
- variant: "outlined",
179
- class: "cursor-pointer hover:bg-fm-color-neutral-gray-50 transition-colors border-dashed aspect-[3/4] flex flex-col items-center justify-center",
180
- onClick: O
181
- }, {
182
- default: w(() => [
183
- o("div", Ce, [
184
- i(a, {
185
- name: "add",
186
- size: "24",
187
- class: "text-fm-color-typo-secondary"
188
- })
189
- ]),
190
- e[9] || (e[9] = o("div", { class: "fm-typo-en-body-md-600 mb-4" }, "Add Ad", -1)),
191
- o("div", Fe, P(B - n(j)) + " left ", 1)
192
- ]),
193
- _: 1
194
- })) : N("", !0)
195
- ])) : (d(), V(u, {
196
- key: 0,
197
- variant: "outlined",
198
- class: "p-24 text-center mb-24 bg-fm-color-warning-50"
199
- }, {
200
- default: w(() => [
201
- e[7] || (e[7] = o("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Premium Feature", -1)),
202
- e[8] || (e[8] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-16" }, " Upgrade to Premium to manage advertisements ", -1)),
203
- i(s, {
204
- label: "Upgrade Now",
205
- variant: "primary"
206
- })
207
- ]),
208
- _: 1
209
- }))
210
- ])) : N("", !0),
211
- i(g, {
212
- modelValue: n(h),
213
- "onUpdate:modelValue": [
214
- e[2] || (e[2] = (v) => Z(h) ? h.value = v : null),
215
- e[3] || (e[3] = (v) => h.value = v)
216
- ],
217
- "max-width": 560,
218
- header: n(p) !== null ? `Manage Ad #${n(p) + 1}` : "Add Advertisement"
219
- }, {
220
- "side-sheet-footer": w(() => [
221
- o("div", Pe, [
222
- i(s, {
223
- label: "Save",
224
- onClick: X,
225
- loading: !!n(S).loadingQueue.length,
226
- disabled: !!n(S).loadingQueue.length
227
- }, null, 8, ["loading", "disabled"])
228
- ])
229
- ]),
230
- default: w(() => [
231
- o("div", Me, [
232
- o("div", je, [
233
- o("div", Le, [
234
- i(le, {
235
- label: "Advertisement Image",
236
- "image-fit": "cover",
237
- "aspect-ratio": "2/3",
238
- thumbnail: n(p) !== null ? _(n(p)) : void 0,
239
- accept: ".png, .jpg, .jpeg, .mp4, .gif",
240
- "recommended-size": "1080px x 1350px (4:5)",
241
- file: n(C) ?? void 0,
242
- "onUpdate:file": e[0] || (e[0] = (v) => C.value = v)
243
- }, null, 8, ["thumbnail", "file"])
244
- ])
245
- ]),
246
- o("div", null, [
247
- i(ie, {
248
- label: "Target Locations",
249
- "helper-text": "Leave empty to show in all locations",
250
- "model-value": n(F) ?? null,
251
- "onUpdate:modelValue": e[1] || (e[1] = (v) => F.value = v)
252
- }, null, 8, ["model-value"])
253
- ])
254
- ])
255
- ]),
256
- _: 1
257
- }, 8, ["modelValue", "header"])
258
- ]);
259
- };
260
- }
261
- });
262
- export {
263
- Ge as default
264
- };