@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
@@ -1,223 +0,0 @@
1
- import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
2
- import { _ as q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as z, components as G } from "@feedmepos/ui-library";
4
- import { p as J } from "./plugins-Dn7JDHi7.js";
5
- import { u as Q } from "./loading-c4b7n9Xp.js";
6
- import { u as W } from "./business-DVlHPzaL.js";
7
- import { u as X } from "./campaign-D9KeUWA7.js";
8
- import { a as L, b as V, g as Y } from "./campaign-l-u9A514.js";
9
- import { u as Z } from "./vue-i18n--_Wu1nMj.js";
10
- import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js";
12
- import { u as oe } from "./template-BSQLFHf4.js";
13
- import { c as g } from "./index-1BGPM6Uy.js";
14
- const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = /* @__PURE__ */ n("img", {
15
- src: q,
16
- class: "aspect-square w-[150px]"
17
- }, null, -1), fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ D({
18
- __name: "Experience",
19
- setup(_e) {
20
- const { t: s } = Z(), I = {
21
- label: s("connect.program.common.actions.create", {
22
- type: s("connect.program.experience.title").toLowerCase()
23
- }),
24
- value: "create",
25
- isPrimary: !0,
26
- prependIcon: "add"
27
- }, P = oe("POINT", z()), B = W(), l = X(), { global: T, minor: v } = Q, r = S({
28
- searchKey: "",
29
- location: null
30
- }), f = E(
31
- () => l.campaigns.experience.filter(
32
- (e) => !r.value.location || !e.targetLocation || e.targetLocation.includes(r.value.location)
33
- )
34
- ), K = [
35
- {
36
- header: "Program title",
37
- accessorFn: (e) => e.name
38
- },
39
- {
40
- header: "Status",
41
- accessorFn: (e) => Y(e),
42
- cell(e) {
43
- return L(e.row.original);
44
- }
45
- },
46
- {
47
- header: "Summary",
48
- accessorFn: (e) => V(e)
49
- //v.effect,
50
- },
51
- {
52
- header: "Actions",
53
- cell(e) {
54
- return H(G.FmButton, {
55
- variant: "tertiary",
56
- icon: "delete",
57
- iconColor: "neutral-gray-400",
58
- onClick: (a) => {
59
- a.stopPropagation(), C(e.row.original);
60
- }
61
- });
62
- }
63
- }
64
- ], b = S();
65
- async function C(e) {
66
- await J.remove(`Are you sure you want to remove ${e.name}?`) && await v(
67
- async () => {
68
- await g.delete(e._id), await l.read("POINT");
69
- },
70
- {
71
- message: `Removing ${e.name}`,
72
- successMessage: `Removed ${e.name} successfully`
73
- }
74
- );
75
- }
76
- async function y(e) {
77
- e ? await a() : P.open(async (d) => {
78
- await a(d);
79
- });
80
- async function a(d) {
81
- var u;
82
- (u = b.value) == null || u.showSheet(
83
- !0,
84
- "POINT",
85
- e ? await g.readById(e._id) : void 0,
86
- d
87
- );
88
- }
89
- }
90
- async function N(e) {
91
- await v(
92
- async () => {
93
- e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await l.read("POINT");
94
- },
95
- {
96
- message: s("connect.program.common.update.updating", {
97
- type: s("connect.program.experience.title")
98
- }),
99
- successMessage: s("connect.program.common.update.success", {
100
- type: s("connect.program.experience.title"),
101
- action: e.campaign._id ? "updated" : "created"
102
- })
103
- }
104
- );
105
- }
106
- return U(async () => {
107
- await T(async () => {
108
- await l.read("POINT");
109
- });
110
- }), (e, a) => {
111
- const d = i("FmPageHead"), u = i("FmSearch"), R = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), O = i("FmList"), A = i("FmCard");
112
- return m(), _(x, null, [
113
- c(d, {
114
- title: t(s)("connect.program.experience.title"),
115
- actions: t(f).length > 0 ? [I] : [],
116
- "onClick:action": a[0] || (a[0] = () => y())
117
- }, null, 8, ["title", "actions"]),
118
- n("div", ae, [
119
- c(u, {
120
- modelValue: t(r).searchKey,
121
- "onUpdate:modelValue": a[1] || (a[1] = (o) => t(r).searchKey = o),
122
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
123
- placeholder: t(s)("connect.program.common.search"),
124
- collapsible: ""
125
- }, null, 8, ["modelValue", "placeholder"]),
126
- t(l).campaigns.experience && t(l).campaigns.experience.length > 0 ? (m(), _(x, { key: 0 }, [
127
- n("div", ne, [
128
- n("div", se, [
129
- c(ee, {
130
- modelValue: t(r).location,
131
- "onUpdate:modelValue": a[2] || (a[2] = (o) => t(r).location = o),
132
- label: "Location: ",
133
- "show-item-label": !0,
134
- icon: "storefront",
135
- placement: "bottom-start",
136
- items: t(B).locationItems
137
- }, null, 8, ["modelValue", "items"])
138
- ]),
139
- c(u, {
140
- modelValue: t(r).searchKey,
141
- "onUpdate:modelValue": a[3] || (a[3] = (o) => t(r).searchKey = o),
142
- class: "xs:hidden",
143
- placeholder: "search",
144
- collapsible: ""
145
- }, null, 8, ["modelValue"])
146
- ]),
147
- c(R, {
148
- class: "xs:hidden",
149
- "row-data": t(f),
150
- "column-defs": K,
151
- "search-value": t(r).searchKey,
152
- "column-filter": [],
153
- onRowClick: a[4] || (a[4] = (o) => y(o.original)),
154
- "hide-footer": t(f).length < 10
155
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
156
- c(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
157
- default: h(() => [
158
- (m(!0), _(x, null, j(t(f).filter(
159
- (o) => o.name.toLowerCase().includes(t(r).searchKey.toLowerCase())
160
- ), (o) => (m(), w($, {
161
- key: o._id.toString(),
162
- onClick: (k) => y(o),
163
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
164
- }, {
165
- default: h(() => [
166
- n("div", re, [
167
- n("div", ce, [
168
- (m(), w(M(t(L)(o)))),
169
- n("div", ie, p(o.currentReceive ?? 0) + " used ", 1)
170
- ]),
171
- n("div", le, [
172
- n("div", me, p(o.name), 1),
173
- n("div", pe, p(t(V)(o)), 1)
174
- ]),
175
- n("div", de, p(t(s)("connect.program.experience.received", {
176
- count: o.currentReceive ?? 0
177
- })), 1)
178
- ]),
179
- c(F, {
180
- icon: "delete",
181
- "icon-color": "neutral-gray-400",
182
- variant: "tertiary",
183
- onClick: (k) => (k.stopPropagation(), C(o))
184
- }, null, 8, ["onClick"])
185
- ]),
186
- _: 2
187
- }, 1032, ["onClick"]))), 128))
188
- ]),
189
- _: 1
190
- })
191
- ], 64)) : (m(), w(A, {
192
- key: 1,
193
- variant: "outlined",
194
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
195
- }, {
196
- default: h(() => [
197
- ue,
198
- n("div", fe, [
199
- n("div", ye, p(t(s)("connect.program.experience.empty_state.title")), 1),
200
- n("div", ge, p(t(s)("connect.program.experience.empty_state.description")), 1)
201
- ]),
202
- c(F, {
203
- variant: "primary",
204
- label: "Create experience program",
205
- icon: "add",
206
- onClick: a[5] || (a[5] = (o) => y())
207
- })
208
- ]),
209
- _: 1
210
- })),
211
- c(te, {
212
- ref_key: "sheetRef",
213
- ref: b,
214
- "onSubmit:modelValue": N
215
- }, null, 512)
216
- ])
217
- ], 64);
218
- };
219
- }
220
- });
221
- export {
222
- Be as default
223
- };
@@ -1,114 +0,0 @@
1
- import { defineComponent as V, ref as y, computed as q, onMounted as x, resolveComponent as s, openBlock as r, createBlock as m, unref as u, withCtx as d, createVNode as i, normalizeClass as p, createCommentVNode as j, createElementVNode as I, toDisplayString as h, createElementBlock as M, Fragment as O, renderList as S } from "vue";
2
- const A = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, N = /* @__PURE__ */ V({
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
- },
40
- emits: ["update:model-value"],
41
- setup(o, { emit: g }) {
42
- const t = o, v = g, c = y(!1), e = y({}), k = q(() => {
43
- const l = Object.keys(e.value).length;
44
- return !e.value || Object.keys(e.value).length == t.items.length || l === 0 ? "All" : `${l > 0 ? l : "None"} selected`;
45
- });
46
- function _(l) {
47
- e.value[l] ? delete e.value[l] : e.value[l] = !0, v("update:model-value", Object.keys(e.value));
48
- }
49
- function C() {
50
- Object.keys(e.value).length > 0 ? e.value = {} : e.value = t.items.reduce((l, n) => (l[n.value] = !0, l), {}), v("update:model-value", Object.keys(e.value));
51
- }
52
- return x(() => {
53
- e.value = t.modelValue.reduce(
54
- (l, n) => (l[n] = !0, l),
55
- {}
56
- ), t.modelValue.length == 0;
57
- }), (l, n) => {
58
- const b = s("FmIcon"), F = s("FmChip"), f = s("FmMenuItem"), w = s("FmMenu");
59
- return r(), m(w, {
60
- placement: o.placement || "bottom-end",
61
- disabled: o.disabled == !0,
62
- "model-value": u(c),
63
- onMenuChanged: n[0] || (n[0] = (a) => c.value = a),
64
- "close-on-click": !1
65
- }, {
66
- "menu-button": d(() => [
67
- i(F, {
68
- label: o.label,
69
- class: p(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
70
- }, {
71
- default: d(() => [
72
- t.icon ? (r(), m(b, {
73
- key: 0,
74
- name: t.icon,
75
- class: p(t.class),
76
- outline: "",
77
- size: "sm"
78
- }, null, 8, ["name", "class"])) : j("", !0),
79
- I("div", A, h(t.label) + " " + h(o.showItemLabel ? u(k) : ""), 1),
80
- i(b, {
81
- name: u(c) ? "keyboard_arrow_up" : "keyboard_arrow_down",
82
- class: p(t.class),
83
- outline: "",
84
- size: "sm"
85
- }, null, 8, ["name", "class"])
86
- ]),
87
- _: 1
88
- }, 8, ["label", "class"])
89
- ]),
90
- default: d(() => [
91
- i(f, {
92
- "model-value": Object.keys(u(e)).length === t.items.length,
93
- label: "All",
94
- "has-checkbox": !0,
95
- indeterminate: !0,
96
- onClick: C
97
- }, null, 8, ["model-value"]),
98
- (r(!0), M(O, null, S(t.items ?? [], (a) => (r(), m(f, {
99
- key: a.value,
100
- value: a.value,
101
- label: a.label,
102
- "has-checkbox": !0,
103
- "model-value": u(e)[a.value],
104
- "onUpdate:modelValue": (B) => _(a.value)
105
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
106
- ]),
107
- _: 1
108
- }, 8, ["placement", "disabled", "model-value"]);
109
- };
110
- }
111
- });
112
- export {
113
- N as _
114
- };
@@ -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 "./_plugin-vue_export-helper-CHgC5LLL.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
- };