@feedmepos/mf-connect 0.0.16-beta.10 → 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 (86) hide show
  1. package/dist/{Analytic-BVk0jPDU.js → Analytic-Gq7PoNer.js} +32 -20
  2. package/dist/{App-BbAalq1k.js → App-Cikl5jnp.js} +33 -27
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +18 -11
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  7. package/dist/Collections-B1SC1rr7.js +453 -0
  8. package/dist/{Credit-Bc9EzdsC.js → Credit-BgwI8DR3.js} +78 -69
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js +2788 -0
  10. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js +344 -0
  11. package/dist/{Experience-CgKak5ik.js → Experience-C2Q-zqV6.js} +64 -55
  12. package/dist/{Game-QhfKqrN_.js → Game-DU2pZDGk.js} +54 -45
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  14. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  15. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  16. package/dist/MainLayout-B1aJoR95.js +41 -0
  17. package/dist/{Marketing-CSx4N7UJ.js → Marketing-DWiTQp9I.js} +79 -72
  18. package/dist/{Member-CY6WMD8D.js → Member-BEXKBFry.js} +25 -22
  19. package/dist/{MemberList-8iRwm7Sz.js → MemberList-DzMdajIf.js} +321 -307
  20. package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js +432 -0
  22. package/dist/{Mission-BTy1p7lU.js → Mission-KzwRlaA5.js} +50 -40
  23. package/dist/{Point-A6B_ggSy.js → Point-CSKvZXHc.js} +67 -58
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js +1751 -0
  26. package/dist/{Segment-CFVXtyEj.js → Segment-2Q0PonBb.js} +145 -130
  27. package/dist/{Setting-Jmtw-_DV.js → Setting-Df5vVRt4.js} +167 -154
  28. package/dist/{Store-DQypT-7e.js → Store-C0WXCKs6.js} +504 -489
  29. package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-eSSIO0nk.js} +124 -108
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +131 -123
  31. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js +139 -0
  32. package/dist/{Tier-D1jymeLK.js → Tier-v-1FkRU-.js} +144 -125
  33. package/dist/{Title-DN9DIP2k.js → Title-CQ2JWqBW.js} +107 -90
  34. package/dist/{Transaction-BAJvAoU6.js → Transaction-0OouN_6s.js} +2 -2
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
  37. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  38. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  39. package/dist/app-Bd19eW7X.js +5381 -0
  40. package/dist/app-CfS25Z66.js +34797 -0
  41. package/dist/app-wDQR6dpb.js +39 -0
  42. package/dist/app.js +2 -1
  43. package/dist/business-dQh3AEot.js +78 -0
  44. package/dist/campaign-BOl8AgKA.js +96 -0
  45. package/dist/campaign-CpzFl8Vr.js +4 -0
  46. package/dist/collection.fn-B_YsXmrP.js +26 -0
  47. package/dist/dto-B8NfyVPG.js +1169 -0
  48. package/dist/effect-C2jCStXO.js +61 -0
  49. package/dist/{export-DjeNY5Pc.js → export-BtZc3Yzh.js} +19 -16
  50. package/dist/helper-8oGsrM56.js +71 -0
  51. package/dist/index-6FkKY3q0.js +73 -0
  52. package/dist/index-C7oeXRUl.js +95 -0
  53. package/dist/index-CZKYIefW.js +203 -0
  54. package/dist/index-C_0IFnwi.js +2071 -0
  55. package/dist/index-CuvNtC_M.js +61 -0
  56. package/dist/index-DCixRRvz.js +761 -0
  57. package/dist/index-DFgt4-VW.js +38 -0
  58. package/dist/index-DYDhH9bi.js +8832 -0
  59. package/dist/index-Dbd4WA4r.js +61 -0
  60. package/dist/index-Di-kWSmf.js +1737 -0
  61. package/dist/index-Dn0jdj0o.js +28058 -0
  62. package/dist/index-DwKqFNF6.js +3 -0
  63. package/dist/index-HoacsZDk.js +291 -0
  64. package/dist/index-UTQHDUdW.js +94 -0
  65. package/dist/loading-D_AN6p24.js +32697 -0
  66. package/dist/lodash-B5I3zXaY.js +3678 -0
  67. package/dist/membership-Ccrx9R6r.js +221 -0
  68. package/dist/moment-BWErdI6_.js +2578 -0
  69. package/dist/money-waD-f-Zz.js +15 -0
  70. package/dist/number-CwTGGsh9.js +12 -0
  71. package/dist/object-qECH92oz.js +26 -0
  72. package/dist/objectId-dwaoBfJX.js +7 -0
  73. package/dist/rule-DJ07h3Gh.js +1973 -0
  74. package/dist/rule-builder-DJ-acvVD.js +89 -0
  75. package/dist/template-clxvNnbF.js +190 -0
  76. package/dist/usePagination-BeF5K3M7.js +223 -0
  77. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  78. package/dist/xlsx-BB366cdN.js +15491 -0
  79. package/dist/zod-W_PvIofQ.js +90 -0
  80. package/package.json +2 -2
  81. package/dist/Card-B5in1RMa.js +0 -805
  82. package/dist/Collections-CFCZ9YIG.js +0 -4
  83. package/dist/MainLayout-JbHzENFy.js +0 -4
  84. package/dist/app-BpzzygYP.js +0 -87765
  85. package/dist/money-DKGIIplY.js +0 -15
  86. package/dist/number-tPodRxTN.js +0 -12
@@ -1,20 +1,29 @@
1
- import { defineComponent as D, ref as B, computed as N, onMounted as H, resolveComponent as i, openBlock as d, createElementBlock as x, Fragment as v, createVNode as l, unref as o, withCtx as h, createElementVNode as n, toDisplayString as r, renderList as q, createBlock as b, resolveDynamicComponent as z, h as p } from "vue";
2
- import { u as O, M as J, b as Q, h as W, N as X, v as A, w as M, j as Y, y as Z, e as ee, O as te, B as oe, c as w } from "./app-BpzzygYP.js";
3
- import { useDialog as ae, components as C } from "@feedmepos/ui-library";
4
- const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, le = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, 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" }, Ce = /* @__PURE__ */ D({
1
+ import { defineComponent as D, ref as A, computed as H, onMounted as N, resolveComponent as r, openBlock as d, createElementBlock as x, Fragment as b, createVNode as i, unref as o, withCtx as h, createElementVNode as n, toDisplayString as l, renderList as q, createBlock as v, resolveDynamicComponent as z, h as p } from "vue";
2
+ import { _ as J } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as O, components as C } from "@feedmepos/ui-library";
4
+ import { u as Q, a as W, p as X } from "./loading-D_AN6p24.js";
5
+ import { u as Y } from "./business-dQh3AEot.js";
6
+ import { u as Z } from "./campaign-BOl8AgKA.js";
7
+ import { g as B, b as $ } from "./dto-B8NfyVPG.js";
8
+ import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js";
10
+ import { u as oe } from "./template-clxvNnbF.js";
11
+ import { u as ae } from "./vue-i18n-BxwiXSkp.js";
12
+ import { c as w } from "./index-UTQHDUdW.js";
13
+ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, 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" }, $e = /* @__PURE__ */ D({
5
14
  __name: "Game",
6
15
  setup(we) {
7
- const { t: c } = O(), $ = {
16
+ const { t: c } = ae(), E = {
8
17
  label: c("connect.program.common.actions.create", {
9
18
  type: c("connect.program.game.title").toLowerCase()
10
19
  }),
11
20
  value: "create",
12
21
  isPrimary: !0,
13
22
  prependIcon: "add"
14
- }, E = J("GAME", ae()), f = Q(), m = W(), { global: K, minor: k } = ee, s = B({
23
+ }, K = oe("GAME", O()), f = Y(), m = Z(), { global: M, minor: k } = Q, s = A({
15
24
  searchKey: "",
16
25
  location: null
17
- }), g = N(
26
+ }), g = H(
18
27
  () => m.campaigns.token.filter(
19
28
  (e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
20
29
  )
@@ -31,7 +40,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
31
40
  {
32
41
  content: e.row.original._id,
33
42
  onClick: (t) => {
34
- t.stopPropagation(), te(e.row.original._id);
43
+ t.stopPropagation(), W(e.row.original._id);
35
44
  }
36
45
  },
37
46
  [
@@ -50,12 +59,12 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
50
59
  {
51
60
  header: "Status",
52
61
  cell(e) {
53
- return A(e.row.original);
62
+ return B(e.row.original);
54
63
  }
55
64
  },
56
65
  {
57
66
  header: "Summary",
58
- accessorFn: (e) => M(e)
67
+ accessorFn: (e) => $(e)
59
68
  //v.effect,
60
69
  },
61
70
  {
@@ -78,9 +87,9 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
78
87
  });
79
88
  }
80
89
  }
81
- ], F = B();
90
+ ], F = A();
82
91
  async function S(e) {
83
- await oe.remove(`Are you sure you want to remove ${e.name}?`) && await k(
92
+ await X.remove(`Are you sure you want to remove ${e.name}?`) && await k(
84
93
  async () => {
85
94
  await w.delete(e._id), await m.read("GAME");
86
95
  },
@@ -91,7 +100,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
91
100
  );
92
101
  }
93
102
  async function y(e) {
94
- e ? await t() : E.open(async (u) => {
103
+ e ? await t() : K.open(async (u) => {
95
104
  await t(u);
96
105
  });
97
106
  async function t(u) {
@@ -115,37 +124,37 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
115
124
  }
116
125
  );
117
126
  }
118
- return H(async () => {
119
- await K(async () => {
127
+ return N(async () => {
128
+ await M(async () => {
120
129
  await m.read("GAME"), await f.readPremium();
121
130
  });
122
131
  }), (e, t) => {
123
- const u = i("FmPill"), _ = i("FmPageHead"), L = i("FmSearch"), I = i("FmTable"), P = i("FmButton"), T = i("FmListItem"), j = i("FmList"), U = i("FmCard");
124
- return d(), x(v, null, [
125
- l(_, {
126
- actions: o(g).length > 0 && o(f).isPremium ? [$] : [],
132
+ const u = r("FmPill"), _ = r("FmPageHead"), L = r("FmSearch"), I = r("FmTable"), P = r("FmButton"), T = r("FmListItem"), U = r("FmList"), j = r("FmCard");
133
+ return d(), x(b, null, [
134
+ i(_, {
135
+ actions: o(g).length > 0 && o(f).isPremium ? [E] : [],
127
136
  "onClick:action": t[0] || (t[0] = () => y())
128
137
  }, {
129
138
  title: h(() => [
130
139
  n("div", ne, [
131
- n("span", se, r(o(c)("connect.program.game.title")), 1),
132
- l(u, { variant: "premium" })
140
+ n("span", se, l(o(c)("connect.program.game.title")), 1),
141
+ i(u, { variant: "premium" })
133
142
  ])
134
143
  ]),
135
144
  _: 1
136
145
  }, 8, ["actions"]),
137
- n("div", le, [
138
- l(L, {
146
+ n("div", ie, [
147
+ i(L, {
139
148
  modelValue: o(s).searchKey,
140
149
  "onUpdate:modelValue": t[1] || (t[1] = (a) => o(s).searchKey = a),
141
150
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
142
151
  placeholder: "search",
143
152
  collapsible: ""
144
153
  }, null, 8, ["modelValue"]),
145
- o(m).campaigns.token && o(m).campaigns.token.length > 0 ? (d(), x(v, { key: 0 }, [
146
- n("div", ie, [
147
- n("div", re, [
148
- l(X, {
154
+ o(m).campaigns.token && o(m).campaigns.token.length > 0 ? (d(), x(b, { key: 0 }, [
155
+ n("div", re, [
156
+ n("div", le, [
157
+ i(ee, {
149
158
  modelValue: o(s).location,
150
159
  "onUpdate:modelValue": t[2] || (t[2] = (a) => o(s).location = a),
151
160
  label: "Location: ",
@@ -155,7 +164,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
155
164
  items: o(f).locationItems
156
165
  }, null, 8, ["modelValue", "items"])
157
166
  ]),
158
- l(L, {
167
+ i(L, {
159
168
  modelValue: o(s).searchKey,
160
169
  "onUpdate:modelValue": t[3] || (t[3] = (a) => o(s).searchKey = a),
161
170
  class: "xs:hidden",
@@ -163,7 +172,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
163
172
  collapsible: ""
164
173
  }, null, 8, ["modelValue"])
165
174
  ]),
166
- l(I, {
175
+ i(I, {
167
176
  class: "xs:hidden",
168
177
  "row-data": o(g),
169
178
  "column-defs": R,
@@ -172,11 +181,11 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
172
181
  onRowClick: t[4] || (t[4] = (a) => y(a.original)),
173
182
  "hide-footer": o(g).length < 10
174
183
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
175
- l(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
184
+ i(U, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
176
185
  default: h(() => [
177
- (d(!0), x(v, null, q(o(g).filter(
186
+ (d(!0), x(b, null, q(o(g).filter(
178
187
  (a) => a.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
179
- ), (a) => (d(), b(T, {
188
+ ), (a) => (d(), v(T, {
180
189
  key: a._id.toString(),
181
190
  onClick: (V) => y(a),
182
191
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
@@ -184,18 +193,18 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
184
193
  default: h(() => [
185
194
  n("div", ce, [
186
195
  n("div", me, [
187
- (d(), b(z(o(A)(a)))),
188
- n("div", de, r(a.currentReceive ?? 0) + " used ", 1)
196
+ (d(), v(z(o(B)(a)))),
197
+ n("div", de, l(a.currentReceive ?? 0) + " used ", 1)
189
198
  ]),
190
199
  n("div", pe, [
191
- n("div", ue, r(a.name), 1),
192
- n("div", fe, r(o(M)(a)), 1)
200
+ n("div", ue, l(a.name), 1),
201
+ n("div", fe, l(o($)(a)), 1)
193
202
  ]),
194
- n("div", ge, r(o(c)("program.game.token_received", {
203
+ n("div", ge, l(o(c)("program.game.token_received", {
195
204
  count: a.currentReceive ?? 0
196
205
  })), 1)
197
206
  ]),
198
- l(P, {
207
+ i(P, {
199
208
  icon: "delete",
200
209
  "icon-color": "neutral-gray-400",
201
210
  variant: "tertiary",
@@ -207,21 +216,21 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
207
216
  ]),
208
217
  _: 1
209
218
  })
210
- ], 64)) : (d(), b(U, {
219
+ ], 64)) : (d(), v(j, {
211
220
  key: 1,
212
221
  variant: "outlined",
213
222
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
214
223
  }, {
215
224
  default: h(() => [
216
225
  t[6] || (t[6] = n("img", {
217
- src: Y,
226
+ src: J,
218
227
  class: "aspect-square w-[150px]"
219
228
  }, null, -1)),
220
229
  n("div", ye, [
221
- n("div", _e, r(o(c)("connect.program.game.empty_state.title")), 1),
222
- n("div", he, r(o(c)("connect.program.game.empty_state.description")), 1)
230
+ n("div", _e, l(o(c)("connect.program.game.empty_state.title")), 1),
231
+ n("div", he, l(o(c)("connect.program.game.empty_state.description")), 1)
223
232
  ]),
224
- l(P, {
233
+ i(P, {
225
234
  variant: "primary",
226
235
  label: "Create game program",
227
236
  icon: "add",
@@ -231,7 +240,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
231
240
  ]),
232
241
  _: 1
233
242
  })),
234
- l(Z, {
243
+ i(te, {
235
244
  ref_key: "sheetRef",
236
245
  ref: F,
237
246
  "onSubmit:modelValue": G
@@ -242,5 +251,5 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
242
251
  }
243
252
  });
244
253
  export {
245
- Ce as default
254
+ $e as default
246
255
  };
@@ -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))
122
+ ])),
123
+ "helper-text": g(() => n[3] || (n[3] = [
124
+ p(r(void 0))
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
+ };
@@ -0,0 +1,87 @@
1
+ import { defineComponent as x, ref as k, resolveComponent as _, openBlock as n, createElementBlock as r, unref as t, createBlock as A, toDisplayString as i, createCommentVNode as u, Fragment as w, renderList as C, createVNode as g, normalizeClass as J } from "vue";
2
+ import { u as B } from "./app-wDQR6dpb.js";
3
+ import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const V = { class: "flex justify-start" }, $ = {
5
+ key: 1,
6
+ class: "ml-0"
7
+ }, F = {
8
+ key: 2,
9
+ class: "text-red-600"
10
+ }, S = { key: 3 }, q = { key: 4 }, I = { key: 0 }, z = /* @__PURE__ */ x({
11
+ __name: "JsonNode",
12
+ props: {
13
+ node: {
14
+ type: Object,
15
+ required: !0
16
+ },
17
+ keyName: {
18
+ type: String,
19
+ required: !1,
20
+ default: ""
21
+ },
22
+ expanded: {
23
+ type: Boolean
24
+ }
25
+ },
26
+ setup(e) {
27
+ const s = e, c = typeof s.node == "object" && s.node !== null, y = c || Array.isArray(s.node), a = k(y && s.expanded || !1), d = k(), h = () => {
28
+ a.value = !a.value;
29
+ }, v = (o) => Array.isArray(o) ? `[Array(${o.length})]` : typeof o == "object" && o !== null ? `{${Object.keys(o).length ? "…" : ""}}` : "", m = (o) => typeof o == "string" ? `"${o}"` : String(o), p = typeof s.node == "function" && m(s.node) !== "function () { [native code] }" && !d.value;
30
+ return (o, l) => {
31
+ const b = _("FmIcon"), j = _("JsonNode", !0);
32
+ return n(), r("div", V, [
33
+ t(y) ? (n(), A(b, {
34
+ key: 0,
35
+ onClick: h,
36
+ class: "cursor-pointer mt-[2px]",
37
+ name: t(a) ? "arrow_drop_down" : "arrow_right",
38
+ size: "sm"
39
+ }, null, 8, ["name"])) : (n(), r("span", $)),
40
+ e.keyName || e.keyName == "0" ? (n(), r("span", F, i(e.keyName) + ": ", 1)) : u("", !0),
41
+ t(c) && !t(a) ? (n(), r("span", S, i(v(e.node)), 1)) : t(c) && t(a) ? (n(), r("div", q, [
42
+ (n(!0), r(w, null, C(e.node, (N, f) => (n(), r("div", { key: f }, [
43
+ g(j, {
44
+ node: N,
45
+ "key-name": f
46
+ }, null, 8, ["node", "key-name"])
47
+ ]))), 128)),
48
+ Object.keys(e.node || {}).length == 0 ? (n(), r("div", I, i(Array.isArray(e.node) ? "[]" : "{}"), 1)) : u("", !0)
49
+ ])) : (n(), r("span", {
50
+ key: 5,
51
+ class: J(["text-gray-800", {
52
+ "cursor-pointer text-blue-500": t(p) && !t(d)
53
+ }]),
54
+ onClick: l[0] || (l[0] = () => {
55
+ t(p) && typeof s.node == "function" && (d.value = s.node());
56
+ })
57
+ }, i(t(d) || m(e.node)), 3))
58
+ ]);
59
+ };
60
+ }
61
+ }), E = {
62
+ key: 0,
63
+ class: "json-viewer"
64
+ }, D = /* @__PURE__ */ x({
65
+ __name: "JsonViewer",
66
+ props: {
67
+ json: {
68
+ type: Object,
69
+ required: !0
70
+ },
71
+ expand: {
72
+ type: Boolean,
73
+ default: !1
74
+ }
75
+ },
76
+ setup(e) {
77
+ return (s, c) => t(B)().debugMode ? (n(), r("div", E, [
78
+ g(z, {
79
+ node: e.json,
80
+ expanded: e.expand
81
+ }, null, 8, ["node", "expanded"])
82
+ ])) : u("", !0);
83
+ }
84
+ }), R = /* @__PURE__ */ O(D, [["__scopeId", "data-v-d8502b13"]]);
85
+ export {
86
+ R as J
87
+ };