@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.61

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 (148) hide show
  1. package/dist/{Analytic-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
  2. package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
  3. package/dist/AuditLogs-VWx8DFKA.js +1991 -0
  4. package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
  5. package/dist/Broadcast-6VXz4-IG.js +233 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
  7. package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
  8. package/dist/Collections-CF_OcAL3.js +540 -0
  9. package/dist/Credit-BUqGOyp_.js +226 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js +3150 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
  14. package/dist/Experience-BxiFH_uV.js +225 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BzYW0LfY.js +300 -0
  18. package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
  19. package/dist/Grab-BgiMqwvj.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
  21. package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
  24. package/dist/Marketing-Bnijl7lA.js +145 -0
  25. package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
  26. package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
  27. package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
  28. package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
  30. package/dist/Mission-Q5_sGgrm.js +304 -0
  31. package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
  32. package/dist/Point-BGYFMvev.js +228 -0
  33. package/dist/Promotion-0acd63nA.js +364 -0
  34. package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
  35. package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
  36. package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
  39. package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
  43. package/dist/Setting-CjcnxK34.js +1992 -0
  44. package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
  45. package/dist/Store-B8k5YVqU.js +1934 -0
  46. package/dist/StoreRewards-BW08rwpL.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
  49. package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
  50. package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
  51. package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
  53. package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
  56. package/dist/app-IvbII0ql.js +45026 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
  59. package/dist/campaign-RuIwxc4y.js +253 -0
  60. package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
  61. package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
  62. package/dist/campaign.fn-B_P1MkRV.js +776 -0
  63. package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
  64. package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
  65. package/dist/dto-jwO_sX9I.js +222 -0
  66. package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
  67. package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
  68. package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
  69. package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
  70. package/dist/index-B-AMMFfT.js +3419 -0
  71. package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
  72. package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
  73. package/dist/index-Bflu4Rft.js +8884 -0
  74. package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
  75. package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
  76. package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
  77. package/dist/index-CppLPpqB.js +30933 -0
  78. package/dist/index-CuvNtC_M.js +61 -0
  79. package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
  80. package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
  81. package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
  82. package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
  83. package/dist/index-wzSeRJAd.js +36 -0
  84. package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
  85. package/dist/loading-CivgDw5C.js +215 -0
  86. package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
  87. package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
  88. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  89. package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
  90. package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
  91. package/dist/objectid-CHab6j3r.js +145 -0
  92. package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
  93. package/dist/remy-D_Deb3ue.js +13 -0
  94. package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
  95. package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
  96. package/dist/rule-builder-DANv7Rmz.js +102 -0
  97. package/dist/style.css +11 -2
  98. package/dist/template-Dbz3FhHK.js +188 -0
  99. package/dist/timezone-BgVqObBq.js +1151 -0
  100. package/dist/trigger-CbriUibd.js +213 -0
  101. package/dist/usePagination-DtNK7W0U.js +223 -0
  102. package/dist/user-CVapqHfr.js +55 -0
  103. package/dist/vue-i18n-tpDAnnmD.js +2365 -0
  104. package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
  105. package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
  106. package/package.json +13 -5
  107. package/dist/AuditLogs-C-gCCPvF.js +0 -1887
  108. package/dist/Broadcast-B2-itjvZ.js +0 -227
  109. package/dist/Collections-DepGq6WJ.js +0 -465
  110. package/dist/Credit-D7K0gFwc.js +0 -222
  111. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  112. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
  113. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
  114. package/dist/Experience-FlBX3eyN.js +0 -223
  115. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  116. package/dist/Game-Cc3D7lKV.js +0 -278
  117. package/dist/Marketing-D7PXYloN.js +0 -20073
  118. package/dist/Mission-BSGc9822.js +0 -296
  119. package/dist/Point-0U4TTdPW.js +0 -226
  120. package/dist/Promotion-DiUa0GcV.js +0 -289
  121. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
  122. package/dist/Setting-RLI7RgmN.js +0 -1936
  123. package/dist/Store-gxmv8hWJ.js +0 -1842
  124. package/dist/StoreRewards-C_6gY_Nk.js +0 -423
  125. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
  126. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
  127. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
  128. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  129. package/dist/app-B90wINOO.js +0 -33357
  130. package/dist/app-DuUxQ1ZP.js +0 -7086
  131. package/dist/campaign.fn-DKScnmjX.js +0 -758
  132. package/dist/dto-C5ri8Nws.js +0 -214
  133. package/dist/index-BCGDOgxb.js +0 -38
  134. package/dist/index-BCPBmANe.js +0 -3120
  135. package/dist/index-BN2Uyvj4.js +0 -30038
  136. package/dist/index-CrbnfAk8.js +0 -8861
  137. package/dist/index-CsaQJMAR.js +0 -66
  138. package/dist/index-DJwQICyC.js +0 -146
  139. package/dist/loading-MEQuW9Xa.js +0 -71
  140. package/dist/objectid-BeZTZYqi.js +0 -145
  141. package/dist/plugins-KiMuDTPp.js +0 -208
  142. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  143. package/dist/rule-builder-BTcZx77a.js +0 -89
  144. package/dist/template-DPpMK30W.js +0 -190
  145. package/dist/trigger-DLp1bkZP.js +0 -144
  146. package/dist/usePagination-BeF5K3M7.js +0 -223
  147. package/dist/user-Cq9CGBHZ.js +0 -54
  148. package/dist/vue-i18n-COzqUgQy.js +0 -2365
@@ -0,0 +1,301 @@
1
+ import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
2
+ import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as ee, components as te } from "@feedmepos/ui-library";
4
+ import { p as P } from "./plugins-P-V4XWmW.js";
5
+ import { u as oe } from "./loading-CivgDw5C.js";
6
+ import { u as ne } from "./business-BFIwFfkq.js";
7
+ import { u as ae } from "./campaign-w9j4I4jn.js";
8
+ import { u as re } from "./vue-i18n-tpDAnnmD.js";
9
+ import { h as d } from "./moment-D7p2TMB-.js";
10
+ import { a as se, b as V } from "./campaign-RuIwxc4y.js";
11
+ import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
12
+ import { u as le } from "./template-Dbz3FhHK.js";
13
+ import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
14
+ import { c as C } from "./index-DpjYgKTN.js";
15
+ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
16
+ __name: "Grab",
17
+ setup(_e) {
18
+ const { t: o } = re(), I = {
19
+ label: o("connect.grab.createCampaign"),
20
+ value: "create",
21
+ isPrimary: !0,
22
+ prependIcon: "add"
23
+ }, A = le("GRAB", ee()), S = ne(), g = ae(), { global: R, minor: T } = oe, K = [
24
+ {
25
+ label: "Bill promotion",
26
+ value: "BILL"
27
+ },
28
+ {
29
+ label: "Item promotion",
30
+ value: "ITEM"
31
+ }
32
+ ], c = L({
33
+ searchKey: "",
34
+ location: [],
35
+ effectType: []
36
+ });
37
+ function E(e) {
38
+ const t = c.value.location;
39
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
40
+ var s;
41
+ return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(a);
42
+ }) : e.targetLocation.includes(t);
43
+ }
44
+ function j(e) {
45
+ var s, r;
46
+ const t = c.value.effectType;
47
+ if (!t || t.length === 0) return !0;
48
+ const a = (r = (s = e.effect) == null ? void 0 : s.options) == null ? void 0 : r.target;
49
+ return t.includes(a);
50
+ }
51
+ const p = z(
52
+ () => g.campaigns.grab.filter(
53
+ (e) => E(e) && j(e)
54
+ )
55
+ ), G = [
56
+ {
57
+ header: o("connect.grab.promotionTitle"),
58
+ accessorFn: (e) => e.name
59
+ },
60
+ {
61
+ header: o("connect.grab.period"),
62
+ accessorFn: (e) => {
63
+ const t = d(e.timeframeOptions.start).format("DD/MM/YYYY"), a = d(e.timeframeOptions.end).format("DD/MM/YYYY");
64
+ return `${t} - ${a}`;
65
+ }
66
+ },
67
+ {
68
+ header: o("connect.grab.status"),
69
+ accessorFn: (e) => se(e),
70
+ cell(e) {
71
+ return V(e.row.original);
72
+ }
73
+ },
74
+ {
75
+ header: o("connect.grab.summary"),
76
+ cell(e) {
77
+ const t = ie(e.row.original.discount);
78
+ return t ? `${t.type} - ${t.adjustment}` : "-";
79
+ }
80
+ },
81
+ {
82
+ header: o("connect.grab.actions"),
83
+ cell(e) {
84
+ return J(te.FmButton, {
85
+ variant: "tertiary",
86
+ icon: "delete",
87
+ iconColor: "neutral-gray-400",
88
+ onClick: (t) => {
89
+ t.stopPropagation(), D(e.row.original);
90
+ }
91
+ });
92
+ }
93
+ }
94
+ ], B = L();
95
+ async function D(e) {
96
+ await P.remove(o("connect.grab.confirmRemove", { name: e.name })) && await T(
97
+ async () => {
98
+ await C.delete(e._id), await g.read("PROMOTION");
99
+ },
100
+ {
101
+ message: o("connect.grab.removing", { name: e.name }),
102
+ successMessage: o("connect.grab.removedSuccessfully", {
103
+ name: e.name
104
+ })
105
+ }
106
+ );
107
+ }
108
+ async function b(e) {
109
+ e ? await t() : A.open(async (a) => {
110
+ await t(a);
111
+ });
112
+ async function t(a) {
113
+ var s;
114
+ (s = B.value) == null || s.showSheet(
115
+ !0,
116
+ "GRAB",
117
+ e ? await C.readById(e._id) : void 0,
118
+ a
119
+ );
120
+ }
121
+ }
122
+ async function N(e) {
123
+ var a;
124
+ const t = await U(e.campaign);
125
+ if (t.length > 0) {
126
+ const s = t.map(
127
+ (r) => `"${r.name}" (${d(r.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(r.timeframeOptions.end).format("DD/MM/YYYY")})`
128
+ ).join(`
129
+ `);
130
+ return await ((a = P.dialog) == null ? void 0 : a.open({
131
+ title: o("connect.grab.conflictDetected"),
132
+ message: o("connect.grab.conflictMessage", {
133
+ conflicts: s
134
+ }),
135
+ closeButton: !0,
136
+ overlay: !0,
137
+ primaryActions: {
138
+ close: !0,
139
+ text: "OK"
140
+ }
141
+ })), !1;
142
+ }
143
+ await T(
144
+ async () => (e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("PROMOTION"), !0),
145
+ {
146
+ message: o(
147
+ e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
148
+ ),
149
+ successMessage: o(
150
+ e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
151
+ )
152
+ }
153
+ );
154
+ }
155
+ async function U(e) {
156
+ const t = g.campaigns.grab, a = [], s = !!e._id;
157
+ for (const r of t) {
158
+ if (s && r._id === e._id) continue;
159
+ const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(r.timeframeOptions.start), v = d(r.timeframeOptions.end);
160
+ if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
161
+ const n = e.discount, w = r.discount;
162
+ n.scope.type === w.scope.type && a.push(r);
163
+ }
164
+ }
165
+ return a;
166
+ }
167
+ async function H(e) {
168
+ switch (e) {
169
+ case "create":
170
+ b();
171
+ break;
172
+ }
173
+ }
174
+ return Q(async () => {
175
+ await R(async () => {
176
+ await S.readLocations(), await g.read("PROMOTION");
177
+ });
178
+ }), (e, t) => {
179
+ const a = u("FmPill"), s = u("FmPageHead"), r = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
180
+ return f(), k(F, null, [
181
+ l(s, {
182
+ title: i(o)("connect.grab.title"),
183
+ actions: i(p).length > 0 ? [I] : [],
184
+ "onClick:action": H
185
+ }, {
186
+ prepend: x(() => [
187
+ l(a, { variant: "beta" }),
188
+ l(a, { variant: "premium" })
189
+ ]),
190
+ _: 1
191
+ }, 8, ["title", "actions"]),
192
+ m("div", me, [
193
+ l(r, {
194
+ modelValue: c.value.searchKey,
195
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
196
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
197
+ placeholder: i(o)("connect.grab.search"),
198
+ collapsible: ""
199
+ }, null, 8, ["modelValue", "placeholder"]),
200
+ i(p) && i(p).length > 0 ? (f(), k(F, { key: 0 }, [
201
+ m("div", ue, [
202
+ m("div", de, [
203
+ l($, {
204
+ label: `${i(o)("connect.common.location")}: `,
205
+ "right-icon": "keyboard_arrow_down",
206
+ modelValue: c.value.location,
207
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => c.value.location = n),
208
+ icon: "storefront",
209
+ "show-item-label": !0,
210
+ items: i(S).locationOptions
211
+ }, null, 8, ["label", "modelValue", "items"]),
212
+ l($, {
213
+ label: "Type:",
214
+ "right-icon": "keyboard_arrow_down",
215
+ modelValue: c.value.effectType,
216
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => c.value.effectType = n),
217
+ icon: "filter_list",
218
+ "show-item-label": !0,
219
+ items: K
220
+ }, null, 8, ["modelValue"])
221
+ ]),
222
+ l(r, {
223
+ modelValue: c.value.searchKey,
224
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
225
+ class: "xs:hidden",
226
+ placeholder: "search",
227
+ collapsible: ""
228
+ }, null, 8, ["modelValue"])
229
+ ]),
230
+ l(_, {
231
+ class: "xs:hidden",
232
+ "row-data": i(p),
233
+ "column-defs": G,
234
+ "search-value": c.value.searchKey,
235
+ "column-filter": [],
236
+ onRowClick: t[4] || (t[4] = (n) => b(n.original)),
237
+ "hide-footer": i(p).length < 10
238
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
239
+ l(v, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
240
+ default: x(() => [
241
+ (f(!0), k(F, null, W(i(p).filter(
242
+ (n) => n.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
243
+ ), (n) => (f(), O(h, {
244
+ key: n._id.toString(),
245
+ onClick: (w) => b(n),
246
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
247
+ }, {
248
+ default: x(() => [
249
+ m("div", pe, [
250
+ m("div", fe, [
251
+ (f(), O(X(i(V)(n))))
252
+ ])
253
+ ]),
254
+ l(y, {
255
+ icon: "delete",
256
+ "icon-color": "neutral-gray-400",
257
+ variant: "tertiary",
258
+ onClick: (w) => (w.stopPropagation(), D(n))
259
+ }, null, 8, ["onClick"])
260
+ ]),
261
+ _: 2
262
+ }, 1032, ["onClick"]))), 128))
263
+ ]),
264
+ _: 1
265
+ })
266
+ ], 64)) : (f(), O(M, {
267
+ key: 1,
268
+ variant: "outlined",
269
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
270
+ }, {
271
+ default: x(() => [
272
+ t[6] || (t[6] = m("img", {
273
+ src: Z,
274
+ class: "aspect-square w-[150px]"
275
+ }, null, -1)),
276
+ m("div", ge, [
277
+ m("div", ye, Y(i(o)("connect.grab.createPromotionCampaign")), 1),
278
+ m("div", be, Y(i(o)("connect.grab.description")), 1)
279
+ ]),
280
+ l(y, {
281
+ variant: "primary",
282
+ label: i(o)("connect.grab.createPromotionCampaign"),
283
+ icon: "add",
284
+ onClick: t[5] || (t[5] = (n) => b())
285
+ }, null, 8, ["label"])
286
+ ]),
287
+ _: 1
288
+ }))
289
+ ]),
290
+ l(ce, {
291
+ ref_key: "sheetRef",
292
+ ref: B,
293
+ "onSubmit:modelValue": N
294
+ }, null, 512)
295
+ ], 64);
296
+ };
297
+ }
298
+ });
299
+ export {
300
+ Pe as default
301
+ };
@@ -1,23 +1,24 @@
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", {
1
+ import { openBlock as l, createElementBlock as o, createElementVNode as r, defineComponent as $, ref as b, onMounted as I, resolveComponent as f, renderSlot as x, toDisplayString as s, createCommentVNode as h, normalizeStyle as V, unref as i, Fragment as w, createVNode as F, withCtx as g, createTextVNode as p, normalizeClass as z, createBlock as k } from "vue";
2
+ import { u as R } from "./vue-i18n-tpDAnnmD.js";
3
+ import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const N = {}, D = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
5
+ function L(e, d) {
6
+ return l(), o("div", D, [...d[0] || (d[0] = [
7
+ r("svg", {
7
8
  class: "dark:text-gray-600 h-10 text-gray-200 w-10",
8
9
  "aria-hidden": "true",
9
10
  xmlns: "http://www.w3.org/2000/svg",
10
11
  fill: "currentColor",
11
12
  viewBox: "0 0 20 18"
12
13
  }, [
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
+ r("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
15
  ], -1)
15
- ]));
16
+ ])]);
16
17
  }
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
+ const T = /* @__PURE__ */ H(N, [["render", L]]), U = { class: "max-w-full max-h-[400px] space-y-4" }, Z = { key: 0 }, _ = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, A = {
18
19
  key: 1,
19
20
  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
+ }, E = ["src"], M = ["src"], q = { class: "absolute right-0 top-0" }, J = /* @__PURE__ */ $({
21
22
  __name: "ImageInput",
22
23
  props: {
23
24
  required: {
@@ -57,7 +58,7 @@ const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-
57
58
  },
58
59
  recommendedSize: {
59
60
  type: String,
60
- default: "Recommended: 950px x 600px"
61
+ default: void 0
61
62
  },
62
63
  deleteButton: {
63
64
  type: Boolean,
@@ -66,72 +67,72 @@ const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-
66
67
  },
67
68
  emits: ["update:file"],
68
69
  setup(e, { emit: d }) {
69
- const c = e, a = v({
70
+ const { t: y } = R(), c = e, a = b({
70
71
  loading: !1,
71
72
  imgsrc: c.thumbnail
72
- }), m = v(!1), y = d;
73
+ }), m = b(!1), v = d;
73
74
  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
+ return t == null ? (a.value.imgsrc = void 0, v("update:file", null)) : (m.value = !!t.type.startsWith("video/"), a.value.loading = !0, a.value.imgsrc = URL.createObjectURL(t), a.value.loading = !1, v("update:file", t));
75
76
  }
76
- return $(() => {
77
+ return I(() => {
77
78
  var t;
78
79
  c.file && u(c.file), (t = c.thumbnail) != null && t.includes("mp4") && (m.value = !0);
79
80
  }), (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)
81
+ const S = f("FmDropField"), B = f("FmHelperText"), j = f("FmButton");
82
+ return l(), o("div", U, [
83
+ x(t.$slots, "label", {}, () => [
84
+ e.label ? (l(), o("div", Z, s(e.label), 1)) : h("", !0)
84
85
  ]),
85
- i("div", {
86
- style: R({ "aspect-ratio": e.aspectRatio }),
86
+ r("div", {
87
+ style: V({ "aspect-ratio": e.aspectRatio }),
87
88
  class: "flex flex-col max-h-full max-w-full"
88
89
  }, [
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", {
90
+ i(a).loading ? (l(), k(T, { key: 1 })) : (l(), o(w, { key: 0 }, [
91
+ i(a).imgsrc ? (l(), o("div", A, [
92
+ i(m) ? (l(), o("video", {
92
93
  key: 1,
93
- src: s(a).imgsrc || e.thumbnail,
94
+ src: i(a).imgsrc || e.thumbnail,
94
95
  class: "w-full h-full",
95
96
  controls: ""
96
- }, null, 8, _)) : (l(), o("img", {
97
+ }, null, 8, M)) : (l(), o("img", {
97
98
  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, {
99
+ class: z([`object-${e.imageFit}`, "w-full h-full"]),
100
+ src: i(a).imgsrc || e.thumbnail
101
+ }, null, 10, E)),
102
+ r("div", q, [
103
+ x(t.$slots, "delete-button"),
104
+ e.deleteButton ? (l(), k(j, {
104
105
  key: 0,
105
106
  class: "!text-neutral-50 !bg-neutral-700",
106
107
  icon: "delete",
107
108
  variant: "tertiary",
108
109
  disabled: e.disabled,
109
- onClick: n[1] || (n[1] = (j) => u(null))
110
- }, null, 8, ["disabled"])) : x("", !0)
110
+ onClick: n[1] || (n[1] = (C) => u(null))
111
+ }, null, 8, ["disabled"])) : h("", !0)
111
112
  ])
112
- ])) : (l(), o(h, { key: 0 }, [
113
- w(k, {
113
+ ])) : (l(), o(w, { key: 0 }, [
114
+ F(S, {
114
115
  class: "flex-1 hihiha",
115
116
  accept: e.accept,
116
117
  disabled: e.disabled,
117
118
  onFileUpload: u,
118
- onFileRejected: n[0] || (n[0] = (j) => u(null))
119
+ onFileRejected: n[0] || (n[0] = (C) => u(null))
119
120
  }, {
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
- ])),
121
+ label: g(() => [...n[2] || (n[2] = [
122
+ p(s(void 0), -1)
123
+ ])]),
124
+ "helper-text": g(() => [...n[3] || (n[3] = [
125
+ p(s(void 0), -1)
126
+ ])]),
126
127
  "accept-text": g(() => [
127
- i("div", T, [
128
- i("div", null, "(" + r(e.recommendedSize) + ")", 1),
129
- p(" Accepts " + r(e.accept), 1)
128
+ r("div", _, [
129
+ r("div", null, " (" + s(e.recommendedSize ?? i(y)("connect.common.imageInput.recommendedSize")) + ") ", 1),
130
+ p(" " + s(i(y)("connect.common.imageInput.accepts", { accept: e.accept })), 1)
130
131
  ])
131
132
  ]),
132
133
  _: 1
133
134
  }, 8, ["accept", "disabled"]),
134
- w(S, { text: "" })
135
+ F(B, { text: "" })
135
136
  ], 64))
136
137
  ], 64))
137
138
  ], 4)
@@ -140,5 +141,5 @@ const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-
140
141
  }
141
142
  });
142
143
  export {
143
- O as _
144
+ J as _
144
145
  };