@feedmepos/mf-connect 0.1.47-prod → 0.1.49-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 (109) hide show
  1. package/dist/{Analytic-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
  2. package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
  3. package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
  4. package/dist/Broadcast-CbF3d_N7.js +233 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
  6. package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
  7. package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
  8. package/dist/Credit-DiTnwnFe.js +228 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
  11. package/dist/Experience-CjMVeGsX.js +229 -0
  12. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  13. package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
  14. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  15. package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
  16. package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
  17. package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
  18. package/dist/MemberList-CZtriA_Q.js +1606 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
  22. package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
  23. package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
  24. package/dist/Point-51MD49EM.js +232 -0
  25. package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
  26. package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
  27. package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
  28. package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
  31. package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
  35. package/dist/Setting-DGDgmP84.js +1936 -0
  36. package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
  37. package/dist/StoreRewards-DFF_0g59.js +423 -0
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
  40. package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
  41. package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
  42. package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
  44. package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
  47. package/dist/app-DaFoFS2V.js +57962 -0
  48. package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
  49. package/dist/app.js +1 -1
  50. package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
  51. package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
  52. package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
  53. package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
  54. package/dist/campaign.fn-B-xvcbEb.js +758 -0
  55. package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
  56. package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
  57. package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
  58. package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
  59. package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
  60. package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
  61. package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
  62. package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
  63. package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
  64. package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
  65. package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
  66. package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
  67. package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
  68. package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
  69. package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
  70. package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
  71. package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
  72. package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
  73. package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
  74. package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
  75. package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
  76. package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
  77. package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
  78. package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
  79. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  80. package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
  81. package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
  82. package/dist/objectid-BQJRv_jX.js +145 -0
  83. package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
  84. package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
  85. package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
  86. package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
  87. package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
  88. package/dist/timezone-B64-HrWi.js +1150 -0
  89. package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
  90. package/dist/usePagination-Ds-cuHop.js +223 -0
  91. package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
  92. package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
  93. package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
  94. package/package.json +5 -4
  95. package/dist/Broadcast-T2a5tN8R.js +0 -227
  96. package/dist/Credit-DQQCXqS0.js +0 -222
  97. package/dist/Experience-DzTV21vX.js +0 -223
  98. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/MemberList-DLSLGQ02.js +0 -1606
  101. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  102. package/dist/Point-BeBYi1BT.js +0 -226
  103. package/dist/Setting-Dt0sG_hk.js +0 -1936
  104. package/dist/StoreRewards-DuSsWnTE.js +0 -423
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
  106. package/dist/app-jRT7vsk_.js +0 -33357
  107. package/dist/campaign.fn-C-UojhHv.js +0 -758
  108. package/dist/objectid-CVDLTdni.js +0 -145
  109. package/dist/usePagination-JoYaROkV.js +0 -223
@@ -0,0 +1,129 @@
1
+ import { defineComponent as j, ref as i, computed as g, onMounted as B, resolveComponent as r, openBlock as m, createBlock as c, unref as o, withCtx as p, createVNode as v, normalizeClass as f, createCommentVNode as k, createElementVNode as L, toDisplayString as F, isRef as M, createElementBlock as O, Fragment as A, renderList as N } from "vue";
2
+ const z = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ j({
3
+ __name: "FilterChip",
4
+ props: {
5
+ modelValue: {
6
+ type: Array,
7
+ required: !1
8
+ },
9
+ label: {
10
+ type: String,
11
+ required: !1,
12
+ default: ""
13
+ },
14
+ showItemLabel: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ placement: {
19
+ type: String,
20
+ required: !1,
21
+ default: "bottom-end"
22
+ },
23
+ class: {
24
+ type: String,
25
+ required: !1
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ required: !1
30
+ },
31
+ items: {
32
+ type: Array,
33
+ required: !0
34
+ },
35
+ icon: {
36
+ type: String,
37
+ required: !1
38
+ },
39
+ searchable: {
40
+ type: Boolean,
41
+ required: !1,
42
+ default: !0
43
+ }
44
+ },
45
+ emits: ["update:model-value"],
46
+ setup(u, { emit: C }) {
47
+ const t = u, b = C, d = i(!1), l = i({}), s = i(""), V = g(() => {
48
+ const e = Object.keys(l.value).length;
49
+ return !l.value || Object.keys(l.value).length == t.items.length || e === 0 ? "All" : `${e > 0 ? e : "None"} selected`;
50
+ });
51
+ function w(e) {
52
+ l.value[e] ? delete l.value[e] : l.value[e] = !0, b("update:model-value", Object.keys(l.value));
53
+ }
54
+ function _() {
55
+ Object.keys(l.value).length > 0 ? l.value = {} : l.value = t.items.reduce((e, n) => (e[n.value] = !0, e), {}), b("update:model-value", Object.keys(l.value));
56
+ }
57
+ const x = g(() => s.value && s.value.length > 0 ? t.items.filter(
58
+ (e) => e.label.toLowerCase().includes(s.value.trim().toLowerCase())
59
+ ) : t.items);
60
+ return B(() => {
61
+ l.value = t.modelValue.reduce(
62
+ (e, n) => (e[n] = !0, e),
63
+ {}
64
+ ), t.modelValue.length == 0;
65
+ }), (e, n) => {
66
+ const y = r("FmIcon"), q = r("FmChip"), I = r("FmTextField"), h = r("FmMenuItem"), S = r("FmMenu");
67
+ return m(), c(S, {
68
+ placement: u.placement || "bottom-end",
69
+ disabled: u.disabled == !0,
70
+ "model-value": o(d),
71
+ onMenuChanged: n[1] || (n[1] = (a) => d.value = a),
72
+ "close-on-click": !1
73
+ }, {
74
+ "menu-button": p(() => [
75
+ v(q, {
76
+ label: u.label,
77
+ class: f(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
78
+ }, {
79
+ default: p(() => [
80
+ t.icon ? (m(), c(y, {
81
+ key: 0,
82
+ name: t.icon,
83
+ class: f(t.class),
84
+ outline: "",
85
+ size: "sm"
86
+ }, null, 8, ["name", "class"])) : k("", !0),
87
+ L("div", z, F(t.label) + " " + F(u.showItemLabel ? o(V) : ""), 1),
88
+ v(y, {
89
+ name: o(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
90
+ class: f(t.class),
91
+ outline: "",
92
+ size: "sm"
93
+ }, null, 8, ["name", "class"])
94
+ ]),
95
+ _: 1
96
+ }, 8, ["label", "class"])
97
+ ]),
98
+ default: p(() => [
99
+ u.searchable ? (m(), c(I, {
100
+ key: 0,
101
+ modelValue: o(s),
102
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => M(s) ? s.value = a : null),
103
+ placeholder: "Search locations",
104
+ class: "my-8"
105
+ }, null, 8, ["modelValue"])) : k("", !0),
106
+ v(h, {
107
+ "model-value": Object.keys(o(l)).length === t.items.length,
108
+ label: "All",
109
+ "has-checkbox": !0,
110
+ indeterminate: !0,
111
+ onClick: _
112
+ }, null, 8, ["model-value"]),
113
+ (m(!0), O(A, null, N(o(x) ?? [], (a) => (m(), c(h, {
114
+ key: a.value,
115
+ value: a.value,
116
+ label: a.label,
117
+ "has-checkbox": !0,
118
+ "model-value": o(l)[a.value],
119
+ "onUpdate:modelValue": (T) => w(a.value)
120
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
121
+ ]),
122
+ _: 1
123
+ }, 8, ["placement", "disabled", "model-value"]);
124
+ };
125
+ }
126
+ });
127
+ export {
128
+ E as _
129
+ };
@@ -1,38 +1,41 @@
1
- import { defineComponent as N, ref as v, computed as q, onMounted as z, resolveComponent as r, openBlock as p, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as c, renderList as J, createBlock as k, resolveDynamicComponent as O, h as l } from "vue";
2
- import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as W, components as w } from "@feedmepos/ui-library";
4
- import { a as X, p as Y } from "./plugins-Dn7JDHi7.js";
5
- import { u as Z } from "./loading-c4b7n9Xp.js";
6
- import { u as ee } from "./business-DVlHPzaL.js";
7
- import { u as te } from "./campaign-D9KeUWA7.js";
8
- import { a as $, b as A, g as oe } from "./campaign-l-u9A514.js";
9
- import { _ as ae } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js";
11
- import { u as se } from "./template-BSQLFHf4.js";
12
- import { u as ie } from "./vue-i18n--_Wu1nMj.js";
13
- import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js";
14
- import { c as x } from "./index-1BGPM6Uy.js";
15
- const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = /* @__PURE__ */ n("img", {
16
- src: Q,
17
- class: "aspect-square w-[150px]"
18
- }, null, -1), ve = { class: "flex flex-col gap-16 text-center" }, Ce = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ N({
1
+ import { defineComponent as q, ref as v, computed as z, onMounted as O, resolveComponent as r, openBlock as f, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as J, createBlock as k, resolveDynamicComponent as Q, h as l } from "vue";
2
+ import { _ as W } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as X, components as w } from "@feedmepos/ui-library";
4
+ import { a as Y, p as Z } from "./plugins-Z2YcDTj8.js";
5
+ import { u as ee } from "./loading-CZH88Duq.js";
6
+ import { u as te } from "./business-BSP_3iNl.js";
7
+ import { u as oe } from "./campaign-C1hWNRWr.js";
8
+ import { a as $, b as R, g as ae } from "./campaign-DMZnXtyb.js";
9
+ import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
10
+ import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js";
11
+ import { u as ie } from "./template-BnyUm8is.js";
12
+ import { u as re } from "./vue-i18n-2D47GxQX.js";
13
+ import { _ as le } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js";
14
+ import { c as x } from "./index-Ba5-z1MU.js";
15
+ const ce = { class: "flex items-center" }, me = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, de = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, fe = { class: "space-y-8" }, ge = { class: "flex w-full gap-4 items-center" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "space-y-4" }, he = { class: "fm-typo-en-body-lg-600" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ve = { class: "flex flex-col gap-16 text-center" }, Ce = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ q({
19
16
  __name: "Game",
20
17
  setup(ke) {
21
- const { t: m } = ie(), E = {
22
- label: m("connect.program.common.actions.create", {
23
- type: m("connect.program.game.title").toLowerCase()
18
+ const { t: c } = re(), E = {
19
+ label: c("connect.program.common.actions.create", {
20
+ type: c("connect.program.game.title").toLowerCase()
24
21
  }),
25
22
  value: "create",
26
23
  isPrimary: !0,
27
24
  prependIcon: "add"
28
- }, K = se("GAME", W()), f = ee(), d = te(), { global: M, minor: F } = Z, i = v({
25
+ }, K = ie("GAME", X()), g = te(), p = oe(), { global: M, minor: F } = ee, i = v({
29
26
  searchKey: "",
30
- location: null
31
- }), g = q(
32
- () => d.campaigns.token.filter(
33
- (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
34
- )
35
- ), G = [
27
+ location: []
28
+ });
29
+ function G(e) {
30
+ const t = i.value.location;
31
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((m) => {
32
+ var d;
33
+ return (d = e == null ? void 0 : e.targetLocation) == null ? void 0 : d.includes(m);
34
+ }) : e.targetLocation.includes(t);
35
+ }
36
+ const y = z(
37
+ () => p.campaigns.token.filter((e) => G(e))
38
+ ), I = [
36
39
  {
37
40
  header: "Program title",
38
41
  accessorKey: "name",
@@ -45,7 +48,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
45
48
  {
46
49
  content: e.row.original._id,
47
50
  onClick: (t) => {
48
- t.stopPropagation(), X(e.row.original._id);
51
+ t.stopPropagation(), Y(e.row.original._id);
49
52
  }
50
53
  },
51
54
  [
@@ -63,14 +66,14 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
63
66
  },
64
67
  {
65
68
  header: "Status",
66
- accessorFn: (e) => oe(e),
69
+ accessorFn: (e) => ae(e),
67
70
  cell(e) {
68
71
  return $(e.row.original);
69
72
  }
70
73
  },
71
74
  {
72
75
  header: "Summary",
73
- accessorFn: (e) => A(e)
76
+ accessorFn: (e) => R(e)
74
77
  //v.effect,
75
78
  },
76
79
  {
@@ -89,7 +92,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
89
92
  icon: "send",
90
93
  iconColor: "neutral-gray-400",
91
94
  onClick: (t) => {
92
- t.stopPropagation(), T(e.row.original);
95
+ t.stopPropagation(), U(e.row.original);
93
96
  }
94
97
  }),
95
98
  l(w.FmButton, {
@@ -97,17 +100,17 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
97
100
  icon: "delete",
98
101
  iconColor: "neutral-gray-400",
99
102
  onClick: (t) => {
100
- t.stopPropagation(), L(e.row.original);
103
+ t.stopPropagation(), P(e.row.original);
101
104
  }
102
105
  })
103
106
  ]);
104
107
  }
105
108
  }
106
- ], S = v(), P = v();
107
- async function L(e) {
108
- await Y.remove(`Are you sure you want to remove ${e.name}?`) && await F(
109
+ ], S = v(), L = v();
110
+ async function P(e) {
111
+ await Z.remove(`Are you sure you want to remove ${e.name}?`) && await F(
109
112
  async () => {
110
- await x.delete(e._id), await d.read("GAME");
113
+ await x.delete(e._id), await p.read("GAME");
111
114
  },
112
115
  {
113
116
  message: `Removing ${e.name}`,
@@ -116,23 +119,23 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
116
119
  );
117
120
  }
118
121
  async function _(e) {
119
- e ? await t() : K.open(async (u) => {
120
- await t(u);
122
+ e ? await t() : K.open(async (m) => {
123
+ await t(m);
121
124
  });
122
- async function t(u) {
123
- var y;
124
- (y = S.value) == null || y.showSheet(
125
+ async function t(m) {
126
+ var d;
127
+ (d = S.value) == null || d.showSheet(
125
128
  !0,
126
129
  "GAME",
127
130
  e ? await x.readById(e._id) : void 0,
128
- u
131
+ m
129
132
  );
130
133
  }
131
134
  }
132
- async function I(e) {
135
+ async function T(e) {
133
136
  await F(
134
137
  async () => {
135
- e.campaign._id ? await x.update(e.campaign._id, e) : await x.create(e), await d.read("GAME");
138
+ e.campaign._id ? await x.update(e.campaign._id, e) : await x.create(e), await p.read("GAME");
136
139
  },
137
140
  {
138
141
  message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
@@ -140,32 +143,32 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
140
143
  }
141
144
  );
142
145
  }
143
- function T(e) {
146
+ function U(e) {
144
147
  var t;
145
- (t = P.value) == null || t.showSheet({
148
+ (t = L.value) == null || t.showSheet({
146
149
  campaign: e
147
150
  });
148
151
  }
149
- return z(async () => {
152
+ return O(async () => {
150
153
  await M(async () => {
151
- await d.read("GAME"), await f.readPremium();
154
+ await p.read("GAME"), await g.readPremium();
152
155
  });
153
156
  }), (e, t) => {
154
- const u = r("FmPill"), y = r("FmPageHead"), V = r("FmSearch"), U = r("FmTable"), B = r("FmButton"), j = r("FmListItem"), D = r("FmList"), H = r("FmCard");
155
- return p(), C(b, null, [
156
- s(y, {
157
- actions: o(g).length > 0 && o(f).isPremium ? [E] : [],
157
+ const m = r("FmPill"), d = r("FmPageHead"), V = r("FmSearch"), j = r("FmTable"), A = r("FmButton"), D = r("FmListItem"), H = r("FmList"), N = r("FmCard");
158
+ return f(), C(b, null, [
159
+ s(d, {
160
+ actions: o(y).length > 0 && o(g).isPremium ? [E] : [],
158
161
  "onClick:action": t[0] || (t[0] = () => _())
159
162
  }, {
160
163
  title: h(() => [
161
- n("div", le, [
162
- n("span", ce, c(o(m)("connect.program.game.title")), 1),
163
- s(u, { variant: "premium" })
164
+ n("div", ce, [
165
+ n("span", me, u(o(c)("connect.program.game.title")), 1),
166
+ s(m, { variant: "premium" })
164
167
  ])
165
168
  ]),
166
169
  _: 1
167
170
  }, 8, ["actions"]),
168
- n("div", me, [
171
+ n("div", de, [
169
172
  s(V, {
170
173
  modelValue: o(i).searchKey,
171
174
  "onUpdate:modelValue": t[1] || (t[1] = (a) => o(i).searchKey = a),
@@ -173,18 +176,18 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
173
176
  placeholder: "search",
174
177
  collapsible: ""
175
178
  }, null, 8, ["modelValue"]),
176
- o(d).campaigns.token && o(d).campaigns.token.length > 0 ? (p(), C(b, { key: 0 }, [
177
- n("div", de, [
179
+ o(p).campaigns.token && o(p).campaigns.token.length > 0 ? (f(), C(b, { key: 0 }, [
180
+ n("div", ue, [
178
181
  n("div", pe, [
179
- s(ae, {
182
+ s(ne, {
183
+ label: `${o(c)("connect.common.location")}: `,
184
+ "right-icon": "keyboard_arrow_down",
180
185
  modelValue: o(i).location,
181
186
  "onUpdate:modelValue": t[2] || (t[2] = (a) => o(i).location = a),
182
- label: "Location: ",
183
- "show-item-label": !0,
184
187
  icon: "storefront",
185
- placement: "bottom-start",
186
- items: o(f).locationItems
187
- }, null, 8, ["modelValue", "items"])
188
+ "show-item-label": !0,
189
+ items: o(g).locationOptions
190
+ }, null, 8, ["label", "modelValue", "items"])
188
191
  ]),
189
192
  s(V, {
190
193
  modelValue: o(i).searchKey,
@@ -194,43 +197,43 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
194
197
  collapsible: ""
195
198
  }, null, 8, ["modelValue"])
196
199
  ]),
197
- s(U, {
200
+ s(j, {
198
201
  class: "xs:hidden",
199
- "row-data": o(g),
200
- "column-defs": G,
202
+ "row-data": o(y),
203
+ "column-defs": I,
201
204
  "search-value": o(i).searchKey,
202
205
  "column-filter": [],
203
206
  onRowClick: t[4] || (t[4] = (a) => _(a.original)),
204
- "hide-footer": o(g).length < 10
207
+ "hide-footer": o(y).length < 10
205
208
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
206
- s(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
209
+ s(H, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
207
210
  default: h(() => [
208
- (p(!0), C(b, null, J(o(g).filter(
211
+ (f(!0), C(b, null, J(o(y).filter(
209
212
  (a) => a.name.toLowerCase().includes(o(i).searchKey.toLowerCase())
210
- ), (a) => (p(), k(j, {
213
+ ), (a) => (f(), k(D, {
211
214
  key: a._id.toString(),
212
- onClick: (R) => _(a),
215
+ onClick: (B) => _(a),
213
216
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
214
217
  }, {
215
218
  default: h(() => [
216
- n("div", ue, [
217
- n("div", fe, [
218
- (p(), k(O(o($)(a)))),
219
- n("div", ge, c(a.currentReceive ?? 0) + " used ", 1)
219
+ n("div", fe, [
220
+ n("div", ge, [
221
+ (f(), k(Q(o($)(a)))),
222
+ n("div", ye, u(a.currentReceive ?? 0) + " used ", 1)
220
223
  ]),
221
224
  n("div", _e, [
222
- n("div", ye, c(a.name), 1),
223
- n("div", he, c(o(A)(a)), 1)
225
+ n("div", he, u(a.name), 1),
226
+ n("div", we, u(o(R)(a)), 1)
224
227
  ]),
225
- n("div", we, c(o(m)("connect.program.game.token_received", {
228
+ n("div", xe, u(o(c)("connect.program.game.token_received", {
226
229
  count: a.currentReceive ?? 0
227
230
  })), 1)
228
231
  ]),
229
- s(B, {
232
+ s(A, {
230
233
  icon: "delete",
231
234
  "icon-color": "neutral-gray-400",
232
235
  variant: "tertiary",
233
- onClick: (R) => (R.stopPropagation(), L(a))
236
+ onClick: (B) => (B.stopPropagation(), P(a))
234
237
  }, null, 8, ["onClick"])
235
238
  ]),
236
239
  _: 2
@@ -238,35 +241,38 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
238
241
  ]),
239
242
  _: 1
240
243
  })
241
- ], 64)) : (p(), k(H, {
244
+ ], 64)) : (f(), k(N, {
242
245
  key: 1,
243
246
  variant: "outlined",
244
247
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
245
248
  }, {
246
249
  default: h(() => [
247
- xe,
250
+ t[6] || (t[6] = n("img", {
251
+ src: W,
252
+ class: "aspect-square w-[150px]"
253
+ }, null, -1)),
248
254
  n("div", ve, [
249
- n("div", Ce, c(o(m)("connect.program.game.empty_state.title")), 1),
250
- n("div", be, c(o(m)("connect.program.game.empty_state.description")), 1)
255
+ n("div", Ce, u(o(c)("connect.program.game.empty_state.title")), 1),
256
+ n("div", be, u(o(c)("connect.program.game.empty_state.description")), 1)
251
257
  ]),
252
- s(B, {
258
+ s(A, {
253
259
  variant: "primary",
254
260
  label: "Create game program",
255
261
  icon: "add",
256
- disabled: !o(f).isPremium,
262
+ disabled: !o(g).isPremium,
257
263
  onClick: t[5] || (t[5] = (a) => _())
258
264
  }, null, 8, ["disabled"])
259
265
  ]),
260
266
  _: 1
261
267
  })),
262
- s(ne, {
268
+ s(se, {
263
269
  ref_key: "sheetRef",
264
270
  ref: S,
265
- "onSubmit:modelValue": I
271
+ "onSubmit:modelValue": T
266
272
  }, null, 512),
267
- s(re, {
273
+ s(le, {
268
274
  ref_key: "sendCollectionSheetRef",
269
- ref: P
275
+ ref: L
270
276
  }, null, 512)
271
277
  ])
272
278
  ], 64);
@@ -0,0 +1,144 @@
1
+ import { openBlock as l, createElementBlock as o, createElementVNode as i, defineComponent as C, ref as v, onMounted as $, resolveComponent as f, renderSlot as b, toDisplayString as r, createCommentVNode as x, normalizeStyle as R, unref as s, Fragment as h, createVNode as w, withCtx as g, createTextVNode as p, normalizeClass as V, createBlock as F } from "vue";
2
+ import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const H = {}, N = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
4
+ function A(e, d) {
5
+ return l(), o("div", N, [...d[0] || (d[0] = [
6
+ i("svg", {
7
+ class: "dark:text-gray-600 h-10 text-gray-200 w-10",
8
+ "aria-hidden": "true",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ fill: "currentColor",
11
+ viewBox: "0 0 20 18"
12
+ }, [
13
+ i("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" })
14
+ ], -1)
15
+ ])]);
16
+ }
17
+ const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-[400px] space-y-4" }, L = { key: 0 }, T = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, U = {
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
+ }, Z = ["src"], _ = ["src"], E = { class: "absolute right-0 top-0" }, O = /* @__PURE__ */ C({
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: d }) {
69
+ const c = e, a = v({
70
+ loading: !1,
71
+ imgsrc: c.thumbnail
72
+ }), m = v(!1), y = d;
73
+ async function u(t) {
74
+ return t == null ? (a.value.imgsrc = void 0, y("update:file", null)) : (m.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 $(() => {
77
+ var t;
78
+ c.file && u(c.file), (t = c.thumbnail) != null && t.includes("mp4") && (m.value = !0);
79
+ }), (t, n) => {
80
+ const k = f("FmDropField"), S = f("FmHelperText"), B = f("FmButton");
81
+ return l(), o("div", I, [
82
+ b(t.$slots, "label", {}, () => [
83
+ e.label ? (l(), o("div", L, r(e.label), 1)) : x("", !0)
84
+ ]),
85
+ i("div", {
86
+ style: R({ "aspect-ratio": e.aspectRatio }),
87
+ class: "flex flex-col max-h-full max-w-full"
88
+ }, [
89
+ s(a).loading ? (l(), F(D, { key: 1 })) : (l(), o(h, { key: 0 }, [
90
+ s(a).imgsrc ? (l(), o("div", U, [
91
+ s(m) ? (l(), o("video", {
92
+ key: 1,
93
+ src: s(a).imgsrc || e.thumbnail,
94
+ class: "w-full h-full",
95
+ controls: ""
96
+ }, null, 8, _)) : (l(), o("img", {
97
+ key: 0,
98
+ class: V([`object-${e.imageFit}`, "w-full h-full"]),
99
+ src: s(a).imgsrc || e.thumbnail
100
+ }, null, 10, Z)),
101
+ i("div", E, [
102
+ b(t.$slots, "delete-button"),
103
+ e.deleteButton ? (l(), F(B, {
104
+ key: 0,
105
+ class: "!text-neutral-50 !bg-neutral-700",
106
+ icon: "delete",
107
+ variant: "tertiary",
108
+ disabled: e.disabled,
109
+ onClick: n[1] || (n[1] = (j) => u(null))
110
+ }, null, 8, ["disabled"])) : x("", !0)
111
+ ])
112
+ ])) : (l(), o(h, { key: 0 }, [
113
+ w(k, {
114
+ class: "flex-1 hihiha",
115
+ accept: e.accept,
116
+ disabled: e.disabled,
117
+ onFileUpload: u,
118
+ onFileRejected: n[0] || (n[0] = (j) => u(null))
119
+ }, {
120
+ label: g(() => [...n[2] || (n[2] = [
121
+ p(r(void 0), -1)
122
+ ])]),
123
+ "helper-text": g(() => [...n[3] || (n[3] = [
124
+ p(r(void 0), -1)
125
+ ])]),
126
+ "accept-text": g(() => [
127
+ i("div", T, [
128
+ i("div", null, "(" + r(e.recommendedSize) + ")", 1),
129
+ p(" Accepts " + r(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
+ O as _
144
+ };