@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11

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 (95) hide show
  1. package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
  2. package/dist/App-Cikl5jnp.js +177 -0
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/Collections-B1SC1rr7.js +453 -0
  7. package/dist/Credit-BgwI8DR3.js +216 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
  10. package/dist/Experience-C2Q-zqV6.js +221 -0
  11. package/dist/Game-DU2pZDGk.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
  15. package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
  16. package/dist/Marketing-DWiTQp9I.js +316 -0
  17. package/dist/Member-BEXKBFry.js +69 -0
  18. package/dist/MemberList-DzMdajIf.js +1733 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
  22. package/dist/Mission-KzwRlaA5.js +259 -0
  23. package/dist/Point-CSKvZXHc.js +222 -0
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
  26. package/dist/Segment-2Q0PonBb.js +447 -0
  27. package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
  28. package/dist/Store-C0WXCKs6.js +1503 -0
  29. package/dist/StoreRewards-eSSIO0nk.js +401 -0
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
  31. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
  32. package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
  33. package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
  34. package/dist/Transaction-0OouN_6s.js +39 -0
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  37. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  38. package/dist/app-Bd19eW7X.js +5381 -0
  39. package/dist/app-CfS25Z66.js +34797 -0
  40. package/dist/app-wDQR6dpb.js +39 -0
  41. package/dist/app.js +5 -3
  42. package/dist/business-dQh3AEot.js +78 -0
  43. package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
  44. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
  45. package/dist/dto-B8NfyVPG.js +1169 -0
  46. package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
  47. package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
  48. package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
  49. package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
  50. package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
  51. package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
  52. package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
  53. package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
  54. package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
  55. package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
  56. package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
  57. package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
  58. package/dist/index-DwKqFNF6.js +3 -0
  59. package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
  60. package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
  61. package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
  62. package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
  63. package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
  64. package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
  65. package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
  66. package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
  67. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/template-clxvNnbF.js +190 -0
  70. package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
  71. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  72. package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
  73. package/package.json +9 -5
  74. package/dist/Broadcast-X69Mtv3b.js +0 -216
  75. package/dist/Card-D0X3v1UF.js +0 -822
  76. package/dist/Collections-umR6Ehqf.js +0 -452
  77. package/dist/Credit-C1EWF7R0.js +0 -214
  78. package/dist/Experience-CqL8wyPm.js +0 -211
  79. package/dist/Game--kYe64EV.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
  81. package/dist/Marketing-CTCQ5ZmZ.js +0 -308
  82. package/dist/Member-DCduX7zP.js +0 -91
  83. package/dist/MemberList-B0EkXZJu.js +0 -1729
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/Mission-CVr9rS_D.js +0 -248
  86. package/dist/Point-BnZ6M74y.js +0 -220
  87. package/dist/Promotion-B0PUve5S.js +0 -218
  88. package/dist/Segment-B-XpkyM5.js +0 -445
  89. package/dist/Store-B2gywCt2.js +0 -1503
  90. package/dist/StoreRewards-D8410Q_-.js +0 -434
  91. package/dist/Transaction-CZBO4v4d.js +0 -36
  92. package/dist/Voucher-se-4JF9B.js +0 -481
  93. package/dist/app-B2ImSO3V.js +0 -53382
  94. package/dist/dto-BWpvRpK2.js +0 -1151
  95. package/dist/template-Dwp7heBA.js +0 -190
@@ -1,211 +0,0 @@
1
- import { defineComponent as O, ref as k, computed as U, onMounted as A, resolveComponent as i, openBlock as c, createElementBlock as g, Fragment as _, createVNode as r, unref as a, createElementVNode as n, withCtx as h, renderList as D, createBlock as x, resolveDynamicComponent as j, toDisplayString as f, h as M } from "vue";
2
- import { _ as H } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as q, components as z } from "@feedmepos/ui-library";
4
- import { u as G, p as J } from "./loading-BzV5acUX.js";
5
- import { a as Q } from "./app-DkI7dYRN.js";
6
- import { u as W } from "./campaign-BZJuknWK.js";
7
- import { g as S, b as V } from "./dto-BWpvRpK2.js";
8
- import { _ as X } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { _ as Y } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js";
10
- import { u as Z } from "./template-Dwp7heBA.js";
11
- import { c as y } from "./index-BxkxVtgm.js";
12
- const ee = { class: "px-24 flex flex-col gap-y-16" }, te = { class: "flex items-center justify-between w-full" }, oe = { class: "flex gap-8 overflow-x-auto" }, ae = { class: "space-y-8" }, ne = { class: "flex w-full gap-4 items-center" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, re = { class: "space-y-4" }, ie = { class: "fm-typo-en-body-lg-600" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = /* @__PURE__ */ n("img", {
13
- src: H,
14
- class: "aspect-square w-[150px]"
15
- }, null, -1), de = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
16
- /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create experience program"),
17
- /* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Experience help customers gain membership tiers. The more they interact and spend, the higher their membership level, unlocking more rewards and benefits. ")
18
- ], -1), Fe = /* @__PURE__ */ O({
19
- __name: "Experience",
20
- setup(pe) {
21
- const L = {
22
- label: "Create campaign",
23
- value: "create",
24
- isPrimary: !0,
25
- prependIcon: "add"
26
- }, P = Z("POINT", q()), I = Q(), l = W(), { global: T, minor: w } = G, s = k({
27
- searchKey: "",
28
- location: null
29
- }), p = U(
30
- () => l.campaigns.experience.filter(
31
- (e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
32
- )
33
- ), B = [
34
- {
35
- header: "Program title",
36
- accessorFn: (e) => e.name
37
- },
38
- {
39
- header: "Status",
40
- cell(e) {
41
- return S(e.row.original);
42
- }
43
- },
44
- {
45
- header: "Summary",
46
- accessorFn: (e) => V(e)
47
- //v.effect,
48
- },
49
- {
50
- header: "Actions",
51
- cell(e) {
52
- return M(z.FmButton, {
53
- variant: "tertiary",
54
- icon: "delete",
55
- iconColor: "neutral-gray-400",
56
- onClick: (o) => {
57
- o.stopPropagation(), v(e.row.original);
58
- }
59
- });
60
- }
61
- }
62
- ], b = k();
63
- async function v(e) {
64
- await J.remove(`Are you sure you want to remove ${e.name}?`) && await w(
65
- async () => {
66
- await y.delete(e._id), await l.read("POINT");
67
- },
68
- {
69
- message: `Removing ${e.name}`,
70
- successMessage: `Removed ${e.name} successfully`
71
- }
72
- );
73
- }
74
- async function u(e) {
75
- e ? await o() : P.open(async (m) => {
76
- await o(m);
77
- });
78
- async function o(m) {
79
- var d;
80
- (d = b.value) == null || d.showSheet(
81
- !0,
82
- "POINT",
83
- e ? await y.readById(e._id) : void 0,
84
- m
85
- );
86
- }
87
- }
88
- async function $(e) {
89
- await w(
90
- async () => {
91
- e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await l.read("POINT");
92
- },
93
- {
94
- message: `${e.campaign._id ? "Updating" : "Creating"} experience program`,
95
- successMessage: `Experience program ${e.campaign._id ? "updated" : "created"} successfully`
96
- }
97
- );
98
- }
99
- return A(async () => {
100
- await T(async () => {
101
- await l.read("POINT");
102
- });
103
- }), (e, o) => {
104
- const m = i("FmPageHead"), d = i("FmSearch"), E = i("FmTable"), C = i("FmButton"), K = i("FmListItem"), N = i("FmList"), R = i("FmCard");
105
- return c(), g(_, null, [
106
- r(m, {
107
- title: "Experience",
108
- actions: a(p).length > 0 ? [L] : [],
109
- "onClick:action": o[0] || (o[0] = () => u())
110
- }, null, 8, ["actions"]),
111
- n("div", ee, [
112
- r(d, {
113
- modelValue: a(s).searchKey,
114
- "onUpdate:modelValue": o[1] || (o[1] = (t) => a(s).searchKey = t),
115
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
116
- placeholder: "search",
117
- collapsible: ""
118
- }, null, 8, ["modelValue"]),
119
- a(l).campaigns.experience && a(l).campaigns.experience.length > 0 ? (c(), g(_, { key: 0 }, [
120
- n("div", te, [
121
- n("div", oe, [
122
- r(X, {
123
- modelValue: a(s).location,
124
- "onUpdate:modelValue": o[2] || (o[2] = (t) => a(s).location = t),
125
- label: "Location: ",
126
- "show-item-label": !0,
127
- icon: "storefront",
128
- placement: "bottom-start",
129
- items: a(I).locationItems
130
- }, null, 8, ["modelValue", "items"])
131
- ]),
132
- r(d, {
133
- modelValue: a(s).searchKey,
134
- "onUpdate:modelValue": o[3] || (o[3] = (t) => a(s).searchKey = t),
135
- class: "xs:hidden",
136
- placeholder: "search",
137
- collapsible: ""
138
- }, null, 8, ["modelValue"])
139
- ]),
140
- r(E, {
141
- class: "xs:hidden",
142
- "row-data": a(p),
143
- "column-defs": B,
144
- "search-value": a(s).searchKey,
145
- "column-filter": [],
146
- onRowClick: o[4] || (o[4] = (t) => u(t.original)),
147
- "hide-footer": a(p).length < 10
148
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
149
- r(N, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
150
- default: h(() => [
151
- (c(!0), g(_, null, D(a(p).filter(
152
- (t) => t.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
153
- ), (t) => (c(), x(K, {
154
- key: t._id.toString(),
155
- onClick: (F) => u(t),
156
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
157
- }, {
158
- default: h(() => [
159
- n("div", ae, [
160
- n("div", ne, [
161
- (c(), x(j(a(S)(t)))),
162
- n("div", se, f(t.currentReceive ?? 0) + " used ", 1)
163
- ]),
164
- n("div", re, [
165
- n("div", ie, f(t.name), 1),
166
- n("div", le, f(a(V)(t)), 1)
167
- ]),
168
- n("div", ce, " Experience received: " + f(t.currentReceive ?? 0), 1)
169
- ]),
170
- r(C, {
171
- icon: "delete",
172
- "icon-color": "neutral-gray-400",
173
- variant: "tertiary",
174
- onClick: (F) => (F.stopPropagation(), v(t))
175
- }, null, 8, ["onClick"])
176
- ]),
177
- _: 2
178
- }, 1032, ["onClick"]))), 128))
179
- ]),
180
- _: 1
181
- })
182
- ], 64)) : (c(), x(R, {
183
- key: 1,
184
- variant: "outlined",
185
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
186
- }, {
187
- default: h(() => [
188
- me,
189
- de,
190
- r(C, {
191
- variant: "primary",
192
- label: "Create experience program",
193
- icon: "add",
194
- onClick: o[5] || (o[5] = (t) => u())
195
- })
196
- ]),
197
- _: 1
198
- })),
199
- r(Y, {
200
- ref_key: "sheetRef",
201
- ref: b,
202
- "onSubmit:modelValue": $
203
- }, null, 512)
204
- ])
205
- ], 64);
206
- };
207
- }
208
- });
209
- export {
210
- Fe as default
211
- };
@@ -1,250 +0,0 @@
1
- import { defineComponent as j, ref as L, computed as D, onMounted as H, resolveComponent as l, openBlock as c, createElementBlock as w, Fragment as x, createVNode as i, unref as a, withCtx as y, createElementVNode as n, renderList as N, createBlock as b, resolveDynamicComponent as q, toDisplayString as _, h as m } from "vue";
2
- import { _ as z } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as J, components as v } from "@feedmepos/ui-library";
4
- import { u as O, a as Q, p as W } from "./loading-BzV5acUX.js";
5
- import { a as X } from "./app-DkI7dYRN.js";
6
- import { u as Y } from "./campaign-BZJuknWK.js";
7
- import { g as A, b as B } from "./dto-BWpvRpK2.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-Bz6TSmbW.js";
10
- import { u as te } from "./template-Dwp7heBA.js";
11
- import { c as h } from "./index-BxkxVtgm.js";
12
- const oe = { class: "flex items-center" }, ae = /* @__PURE__ */ n("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, "Game", -1), ne = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, ce = { 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" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = /* @__PURE__ */ n("img", {
13
- src: z,
14
- class: "aspect-square w-[150px]"
15
- }, null, -1), ge = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
16
- /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your game program"),
17
- /* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " The game feature adds a fun element to shopping, encouraging customers to engage more. ")
18
- ], -1), Ve = /* @__PURE__ */ j({
19
- __name: "Game",
20
- setup(ye) {
21
- const $ = {
22
- label: "Create campaign",
23
- value: "create",
24
- isPrimary: !0,
25
- prependIcon: "add"
26
- }, E = te("GAME", J()), u = X(), r = Y(), { global: G, minor: C } = O, s = L({
27
- searchKey: "",
28
- location: null
29
- }), p = D(
30
- () => r.campaigns.token.filter(
31
- (e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
32
- )
33
- ), K = [
34
- {
35
- header: "Program title",
36
- accessorKey: "name",
37
- // accessorFn: (v) => v.name,
38
- cell(e) {
39
- return m("div", { class: "flex items-center justify-between gap-4" }, [
40
- m("div", { class: "flex items-center" }, [
41
- m(
42
- v.FmTooltip,
43
- {
44
- content: e.row.original._id,
45
- onClick: (t) => {
46
- t.stopPropagation(), Q(e.row.original._id);
47
- }
48
- },
49
- [
50
- m(v.FmIcon, {
51
- name: "info",
52
- outline: !0,
53
- size: "sm"
54
- })
55
- ]
56
- )
57
- ]),
58
- m("div", { class: "flex-1" }, e.row.original.name)
59
- ]);
60
- }
61
- },
62
- {
63
- header: "Status",
64
- cell(e) {
65
- return A(e.row.original);
66
- }
67
- },
68
- {
69
- header: "Summary",
70
- accessorFn: (e) => B(e)
71
- //v.effect,
72
- },
73
- {
74
- header: "Token received",
75
- accessorFn: (e) => {
76
- var t;
77
- return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
78
- }
79
- },
80
- {
81
- header: "Actions",
82
- cell(e) {
83
- return m(v.FmButton, {
84
- variant: "tertiary",
85
- icon: "delete",
86
- iconColor: "neutral-gray-400",
87
- onClick: (t) => {
88
- t.stopPropagation(), F(e.row.original);
89
- }
90
- });
91
- }
92
- }
93
- ], k = L();
94
- async function F(e) {
95
- await W.remove(`Are you sure you want to remove ${e.name}?`) && await C(
96
- async () => {
97
- await h.delete(e._id), await r.read("GAME");
98
- },
99
- {
100
- message: `Removing ${e.name}`,
101
- successMessage: `Removed ${e.name} successfully`
102
- }
103
- );
104
- }
105
- async function f(e) {
106
- e ? await t() : E.open(async (d) => {
107
- await t(d);
108
- });
109
- async function t(d) {
110
- var g;
111
- (g = k.value) == null || g.showSheet(
112
- !0,
113
- "GAME",
114
- e ? await h.readById(e._id) : void 0,
115
- d
116
- );
117
- }
118
- }
119
- async function M(e) {
120
- await C(
121
- async () => {
122
- e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await r.read("GAME");
123
- },
124
- {
125
- message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
126
- successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
127
- }
128
- );
129
- }
130
- return H(async () => {
131
- await G(async () => {
132
- await r.read("GAME"), await u.readPremium();
133
- });
134
- }), (e, t) => {
135
- const d = l("FmPill"), g = l("FmPageHead"), S = l("FmSearch"), R = l("FmTable"), P = l("FmButton"), T = l("FmListItem"), I = l("FmList"), U = l("FmCard");
136
- return c(), w(x, null, [
137
- i(g, {
138
- actions: a(p).length > 0 && a(u).isPremium ? [$] : [],
139
- "onClick:action": t[0] || (t[0] = () => f())
140
- }, {
141
- title: y(() => [
142
- n("div", oe, [
143
- ae,
144
- i(d, { variant: "premium" })
145
- ])
146
- ]),
147
- _: 1
148
- }, 8, ["actions"]),
149
- n("div", ne, [
150
- i(S, {
151
- modelValue: a(s).searchKey,
152
- "onUpdate:modelValue": t[1] || (t[1] = (o) => a(s).searchKey = o),
153
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
154
- placeholder: "search",
155
- collapsible: ""
156
- }, null, 8, ["modelValue"]),
157
- a(r).campaigns.token && a(r).campaigns.token.length > 0 ? (c(), w(x, { key: 0 }, [
158
- n("div", se, [
159
- n("div", ie, [
160
- i(Z, {
161
- modelValue: a(s).location,
162
- "onUpdate:modelValue": t[2] || (t[2] = (o) => a(s).location = o),
163
- label: "Location: ",
164
- "show-item-label": !0,
165
- icon: "storefront",
166
- placement: "bottom-start",
167
- items: a(u).locationItems
168
- }, null, 8, ["modelValue", "items"])
169
- ]),
170
- i(S, {
171
- modelValue: a(s).searchKey,
172
- "onUpdate:modelValue": t[3] || (t[3] = (o) => a(s).searchKey = o),
173
- class: "xs:hidden",
174
- placeholder: "search",
175
- collapsible: ""
176
- }, null, 8, ["modelValue"])
177
- ]),
178
- i(R, {
179
- class: "xs:hidden",
180
- "row-data": a(p),
181
- "column-defs": K,
182
- "search-value": a(s).searchKey,
183
- "column-filter": [],
184
- onRowClick: t[4] || (t[4] = (o) => f(o.original)),
185
- "hide-footer": a(p).length < 10
186
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
187
- i(I, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
188
- default: y(() => [
189
- (c(!0), w(x, null, N(a(p).filter(
190
- (o) => o.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
191
- ), (o) => (c(), b(T, {
192
- key: o._id.toString(),
193
- onClick: (V) => f(o),
194
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
195
- }, {
196
- default: y(() => [
197
- n("div", le, [
198
- n("div", re, [
199
- (c(), b(q(a(A)(o)))),
200
- n("div", ce, _(o.currentReceive ?? 0) + " used ", 1)
201
- ]),
202
- n("div", me, [
203
- n("div", de, _(o.name), 1),
204
- n("div", ue, _(a(B)(o)), 1)
205
- ]),
206
- n("div", pe, " Token received: " + _(o.currentReceive ?? 0), 1)
207
- ]),
208
- i(P, {
209
- icon: "delete",
210
- "icon-color": "neutral-gray-400",
211
- variant: "tertiary",
212
- onClick: (V) => (V.stopPropagation(), F(o))
213
- }, null, 8, ["onClick"])
214
- ]),
215
- _: 2
216
- }, 1032, ["onClick"]))), 128))
217
- ]),
218
- _: 1
219
- })
220
- ], 64)) : (c(), b(U, {
221
- key: 1,
222
- variant: "outlined",
223
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
224
- }, {
225
- default: y(() => [
226
- fe,
227
- ge,
228
- i(P, {
229
- variant: "primary",
230
- label: "Create game program",
231
- icon: "add",
232
- disabled: !a(u).isPremium,
233
- onClick: t[5] || (t[5] = (o) => f())
234
- }, null, 8, ["disabled"])
235
- ]),
236
- _: 1
237
- })),
238
- i(ee, {
239
- ref_key: "sheetRef",
240
- ref: k,
241
- "onSubmit:modelValue": M
242
- }, null, 512)
243
- ])
244
- ], 64);
245
- };
246
- }
247
- });
248
- export {
249
- Ve as default
250
- };
@@ -1,144 +0,0 @@
1
- import { openBlock as l, createElementBlock as o, createElementVNode as n, defineComponent as $, ref as h, onMounted as j, resolveComponent as m, renderSlot as v, toDisplayString as i, createCommentVNode as b, normalizeStyle as C, unref as s, Fragment as x, createVNode as w, withCtx as f, createTextVNode as g, normalizeClass as R, createBlock as F } from "vue";
2
- import { _ as V } from "./app-DkI7dYRN.js";
3
- const z = {}, H = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" }, N = /* @__PURE__ */ n("svg", {
4
- class: "dark:text-gray-600 h-10 text-gray-200 w-10",
5
- "aria-hidden": "true",
6
- xmlns: "http://www.w3.org/2000/svg",
7
- fill: "currentColor",
8
- viewBox: "0 0 20 18"
9
- }, [
10
- /* @__PURE__ */ n("path", { d: "M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" })
11
- ], -1), A = [
12
- N
13
- ];
14
- function D(e, p) {
15
- return l(), o("div", H, A);
16
- }
17
- const I = /* @__PURE__ */ V(z, [["render", D]]), L = { class: "max-w-full max-h-[400px] space-y-4" }, T = { key: 0 }, U = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, Z = {
18
- key: 1,
19
- class: "h-full w-full relative bg-fm-color-neutral-white p-12 border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md flex flex-col items-center justify-center gap-8 hover:border-fm-color-neutral-gray-400"
20
- }, E = ["src"], M = ["src"], q = { class: "absolute right-0 top-0" }, G = /* @__PURE__ */ $({
21
- __name: "ImageInput",
22
- props: {
23
- required: {
24
- type: Boolean,
25
- default: () => !1
26
- },
27
- disabled: {
28
- type: Boolean,
29
- default: () => !1
30
- },
31
- thumbnail: {
32
- type: String,
33
- default: () => {
34
- }
35
- },
36
- file: {
37
- type: File,
38
- default: () => {
39
- }
40
- },
41
- label: {
42
- type: String,
43
- default: () => {
44
- }
45
- },
46
- aspectRatio: {
47
- type: String,
48
- default: "2/3"
49
- },
50
- imageFit: {
51
- type: String,
52
- default: "contain"
53
- },
54
- accept: {
55
- type: String,
56
- default: ".png, .jpg, .jpeg, .webm"
57
- },
58
- recommendedSize: {
59
- type: String,
60
- default: "Recommended: 950px x 600px"
61
- },
62
- deleteButton: {
63
- type: Boolean,
64
- default: !0
65
- }
66
- },
67
- emits: ["update:file"],
68
- setup(e, { emit: p }) {
69
- const r = e, a = h({
70
- loading: !1,
71
- imgsrc: r.thumbnail
72
- }), u = h(!1), y = p;
73
- async function d(t) {
74
- return t == null ? (a.value.imgsrc = void 0, y("update:file", null)) : (u.value = !!t.type.startsWith("video/"), a.value.loading = !0, a.value.imgsrc = URL.createObjectURL(t), a.value.loading = !1, y("update:file", t));
75
- }
76
- return j(() => {
77
- var t;
78
- r.file && d(r.file), (t = r.thumbnail) != null && t.includes("mp4") && (u.value = !0);
79
- }), (t, c) => {
80
- const k = m("FmDropField"), S = m("FmHelperText"), _ = m("FmButton");
81
- return l(), o("div", L, [
82
- v(t.$slots, "label", {}, () => [
83
- e.label ? (l(), o("div", T, i(e.label), 1)) : b("", !0)
84
- ]),
85
- n("div", {
86
- style: C({ "aspect-ratio": e.aspectRatio }),
87
- class: "flex flex-col max-h-full max-w-full"
88
- }, [
89
- s(a).loading ? (l(), F(I, { key: 1 })) : (l(), o(x, { key: 0 }, [
90
- s(a).imgsrc ? (l(), o("div", Z, [
91
- s(u) ? (l(), o("video", {
92
- key: 1,
93
- src: s(a).imgsrc || e.thumbnail,
94
- class: "w-full h-full",
95
- controls: ""
96
- }, null, 8, M)) : (l(), o("img", {
97
- key: 0,
98
- class: R([`object-${e.imageFit}`, "w-full h-full"]),
99
- src: s(a).imgsrc || e.thumbnail
100
- }, null, 10, E)),
101
- n("div", q, [
102
- v(t.$slots, "delete-button"),
103
- e.deleteButton ? (l(), F(_, {
104
- key: 0,
105
- class: "!text-neutral-50 !bg-neutral-700",
106
- icon: "delete",
107
- variant: "tertiary",
108
- disabled: e.disabled,
109
- onClick: c[1] || (c[1] = (B) => d(null))
110
- }, null, 8, ["disabled"])) : b("", !0)
111
- ])
112
- ])) : (l(), o(x, { key: 0 }, [
113
- w(k, {
114
- class: "flex-1 hihiha",
115
- accept: e.accept,
116
- disabled: e.disabled,
117
- onFileUpload: d,
118
- onFileRejected: c[0] || (c[0] = (B) => d(null))
119
- }, {
120
- label: f(() => [
121
- g(i(void 0))
122
- ]),
123
- "helper-text": f(() => [
124
- g(i(void 0))
125
- ]),
126
- "accept-text": f(() => [
127
- n("div", U, [
128
- n("div", null, "(" + i(e.recommendedSize) + ")", 1),
129
- g(" Accepts " + i(e.accept), 1)
130
- ])
131
- ]),
132
- _: 1
133
- }, 8, ["accept", "disabled"]),
134
- w(S, { text: "" })
135
- ], 64))
136
- ], 64))
137
- ], 4)
138
- ]);
139
- };
140
- }
141
- });
142
- export {
143
- G as _
144
- };