@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.81

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 (159) hide show
  1. package/dist/{Analytic-CJap-Cat.js → Analytic-FMehGs58.js} +31 -32
  2. package/dist/{App-CLTtX1QT.js → App-7cwNu3e0.js} +617 -607
  3. package/dist/AuditLogs-CpmLBHAR.js +1991 -0
  4. package/dist/{Bin-C2xMLxoE.js → Bin-D21tScmC.js} +10 -10
  5. package/dist/Broadcast-DrX9zS2Z.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BvN7Q36X.js} +6 -6
  7. package/dist/{Card-BPrCNLQy.js → Card-Nk0KHSjb.js} +145 -140
  8. package/dist/Collections-BAnIaZRj.js +540 -0
  9. package/dist/Credit-BhU_Vd3l.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  12. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DUrvbUE4.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CqBGsZmi.js +351 -0
  15. package/dist/Experience-B7Fl1uzk.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-DaCnYliS.js} +1 -1
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-BdkSBpyV.js +330 -0
  20. package/dist/Grab-y_ISAZvb.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-WEsv0wME.js} +49 -48
  22. package/dist/{Index-DMdNgISh.js → Index-DZp0xkxW.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-DXMshwQu.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-24MFkuKg.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-B8VvzvAT.js} +1 -1
  26. package/dist/Marketing-BXfk7ZLc.js +166 -0
  27. package/dist/MarketingMaterialEdit-CoDx_QvV.js +1065 -0
  28. package/dist/{Member-CnSXGQi_.js → Member-DOP3Z4-m.js} +38 -37
  29. package/dist/{MemberList-DcpEKV1D.js → MemberList-BcMezuLM.js} +486 -491
  30. package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-BEG9Cfgw.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-R6ImfcMO.js} +13443 -10607
  32. package/dist/Mission-C4eWldYu.js +334 -0
  33. package/dist/{Overview-elpi-jpI.js → Overview-0V1dmEPw.js} +24 -25
  34. package/dist/Point-s9t7_Iee.js +262 -0
  35. package/dist/Promotion-VZCoFHHx.js +396 -0
  36. package/dist/{Queue-GvBhNEFe.js → Queue-DdoHcsXv.js} +23 -24
  37. package/dist/{Record-CbSxgo8i.js → Record-B73AsvsB.js} +10 -10
  38. package/dist/Review-eEJG7-gc.js +621 -0
  39. package/dist/ReviewFacebookCallback-Cq1fGEP3.js +243 -0
  40. package/dist/ReviewGoogleCallback-C7BBKqnK.js +213 -0
  41. package/dist/{Reward-QCGlrq89.js → Reward-DKFT9MmI.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-vbTI-3-L.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dc4daP4P.js +1912 -0
  44. package/dist/{Segment-5PndnEUa.js → Segment-RAMBNzZd.js} +273 -274
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-pQmd43cO.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-PwedwyBw.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-rN37l0uX.js +226 -0
  48. package/dist/Setting--t7CPcWL.js +2039 -0
  49. package/dist/SettingAdvertisements-BzhckLOK.js +264 -0
  50. package/dist/Store-Dnax6l9z.js +1996 -0
  51. package/dist/StoreRewards-BIdtA-W4.js +535 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B__Nqwzg.js +1129 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-on00idd9.js +7007 -0
  54. package/dist/{Tier-BKKxG29r.js → Tier-Ch63LeNc.js} +561 -480
  55. package/dist/{Title-CReZgw8V.js → Title-wOMe2o3w.js} +151 -149
  56. package/dist/{Transaction-HWCmSVaJ.js → Transaction-CpkfV_sQ.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-MPlAwheJ.js} +7 -7
  58. package/dist/Voucher-DlOZmlyt.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DBAk4tDY.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-BhCfP2wn.js} +2 -2
  61. package/dist/app-nACimuOe.js +59309 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-Bc-EMd2p.js → business-BpM7Eni_.js} +11 -8
  64. package/dist/campaign-BaSTB-19.js +219 -0
  65. package/dist/campaign-CN7MibEN.js +253 -0
  66. package/dist/campaign.enum-CW4ESvMk.js +26 -0
  67. package/dist/campaign.fn-DPMaaXjP.js +776 -0
  68. package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-_Bg6BIol.js} +1 -1
  69. package/dist/{collection.fn-AjDNdFe1.js → collection.fn-D86VQVrc.js} +2 -2
  70. package/dist/dto-By8psmkB.js +222 -0
  71. package/dist/duplicateCampaign-AVfDsabR.js +51 -0
  72. package/dist/effect-CCB9eCEr.js +89 -0
  73. package/dist/{email-addresses-B0SzUCQM.js → email-addresses-CyMOiGPR.js} +2 -2
  74. package/dist/{export-Bgz6WcNZ.js → export-DPUTGKPb.js} +4 -4
  75. package/dist/{helper-B1vFwohM.js → helper-CYKFnu8y.js} +22 -7
  76. package/dist/index-43V5T9JA.js +28899 -0
  77. package/dist/{index-DVQnrex_.js → index-9FXa-6Mk.js} +3 -3
  78. package/dist/{index-26SopNpv.js → index-B9vArh0F.js} +1 -1
  79. package/dist/index-BF2vcn02.js +3431 -0
  80. package/dist/{index-BIRmS75g.js → index-BPBdEGEz.js} +1 -1
  81. package/dist/index-BTaTuuEo.js +48 -0
  82. package/dist/{index-Cm2sBagk.js → index-Beq-ShJI.js} +1 -1
  83. package/dist/{index-CSQY21Zb.js → index-BxGFddJP.js} +3 -3
  84. package/dist/index-C0veCCui.js +85 -0
  85. package/dist/index-C0yZzlB3.js +8912 -0
  86. package/dist/index-CJy_KEtq.js +30289 -0
  87. package/dist/{index-DwT9RLst.js → index-CZRA2IY5.js} +23 -12
  88. package/dist/{index-DT2viYsL.js → index-Cpff1wjo.js} +617 -191
  89. package/dist/index-CuvNtC_M.js +61 -0
  90. package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-DHrbC5Ry.js} +185 -185
  91. package/dist/{loading-C6Ouh0mG.js → loading-BSMi2eIc.js} +1 -1
  92. package/dist/{lodash-B5I3zXaY.js → lodash-DZxxJH2N.js} +1 -1
  93. package/dist/{membership-DU0BwIj8.js → membership-CWkspNDR.js} +3 -3
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-Bg7GuE5s.js → money-CSBC-3Ol.js} +1 -1
  96. package/dist/{number-Ddmqo5D_.js → number-CeqAGZy9.js} +1 -1
  97. package/dist/objectid-C_sYOjBD.js +145 -0
  98. package/dist/{campaign-BeF8kTyg.js → plugins-B37e5K6S.js} +784 -777
  99. package/dist/remy-DM_pSPd3.js +46 -0
  100. package/dist/{reward-CN4gvn4c.js → reward-BHf9o7F7.js} +1 -1
  101. package/dist/{rule-CpiqqR0c.js → rule-CAOC63go.js} +505 -487
  102. package/dist/rule-builder-BTxbYw5Z.js +102 -0
  103. package/dist/style.css +11 -2
  104. package/dist/template-DHmXFTjv.js +188 -0
  105. package/dist/timezone-C9EUfUmm.js +1156 -0
  106. package/dist/trigger--TbXeeFT.js +213 -0
  107. package/dist/usePagination-Lr6F7nYH.js +220 -0
  108. package/dist/user-DOc3B6F_.js +55 -0
  109. package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DQbt3scE.js} +409 -409
  110. package/dist/{xlsx-qJHsnW7k.js → xlsx-QxmpwFgC.js} +1 -1
  111. package/dist/{zod-Bg2FbC-D.js → zod-OfQMlh-A.js} +32 -31
  112. package/package.json +14 -6
  113. package/dist/AuditLogs-DW4rwNOn.js +0 -1887
  114. package/dist/Broadcast-Dhc0j16O.js +0 -227
  115. package/dist/Collections-CsUJEmqz.js +0 -465
  116. package/dist/Credit-Mqa-0XJd.js +0 -222
  117. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  118. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js +0 -2185
  119. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
  120. package/dist/Experience-BD5C3old.js +0 -223
  121. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  122. package/dist/Game-D4xsi8Ym.js +0 -278
  123. package/dist/Marketing-axcQYl8k.js +0 -20073
  124. package/dist/Mission-BHZiL-GH.js +0 -296
  125. package/dist/Point-gKvdggAl.js +0 -226
  126. package/dist/Promotion-7x2F_sFX.js +0 -289
  127. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
  128. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
  129. package/dist/Setting-Cab47wfH.js +0 -1936
  130. package/dist/Store-BFL3T9B5.js +0 -1842
  131. package/dist/StoreRewards-C43dCJtM.js +0 -423
  132. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
  133. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
  134. package/dist/Voucher-BhUAcPZg.js +0 -384
  135. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
  136. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  137. package/dist/app-BGaUIdCr.js +0 -7086
  138. package/dist/app-DccKBdW_.js +0 -33357
  139. package/dist/campaign-DbJZEU7P.js +0 -96
  140. package/dist/campaign.enum-PBKYGUQY.js +0 -20
  141. package/dist/campaign.fn-Cq-4LfQj.js +0 -758
  142. package/dist/dto-8NvMMYAb.js +0 -214
  143. package/dist/effect-DZhcEQ5g.js +0 -78
  144. package/dist/index-CQQedv0M.js +0 -32260
  145. package/dist/index-CTgQRqQR.js +0 -30038
  146. package/dist/index-CsaQJMAR.js +0 -66
  147. package/dist/index-DGaywhpY.js +0 -76
  148. package/dist/index-DOfLDlI8.js +0 -8861
  149. package/dist/index-DVpAocyR.js +0 -3120
  150. package/dist/index-DlJGd8RC.js +0 -121
  151. package/dist/index-Dm65CTdy.js +0 -38
  152. package/dist/objectid-MCaJXAgq.js +0 -145
  153. package/dist/plugins-C-CRzeyC.js +0 -208
  154. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  155. package/dist/rule-builder-DmkJng-x.js +0 -89
  156. package/dist/template-DTZgnkl5.js +0 -190
  157. package/dist/trigger-CPjJ73Rc.js +0 -144
  158. package/dist/usePagination-BeF5K3M7.js +0 -223
  159. package/dist/user-8VIt8A1x.js +0 -54
@@ -1,222 +0,0 @@
1
- import { defineComponent as N, ref as S, computed as j, h as M, onMounted as A, resolveComponent as l, openBlock as c, createElementBlock as y, Fragment as C, createVNode as i, unref as a, createElementVNode as n, withCtx as h, renderList as H, createBlock as v, resolveDynamicComponent as q, toDisplayString as g, createCommentVNode as z } from "vue";
2
- import { _ as G } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as J, components as O } from "@feedmepos/ui-library";
4
- import { p as Q } from "./plugins-C-CRzeyC.js";
5
- import { u as W } from "./loading-C6Ouh0mG.js";
6
- import { u as X } from "./business-Bc-EMd2p.js";
7
- import { u as Y } from "./campaign-DbJZEU7P.js";
8
- import { g as Z, a as V, b as L } from "./campaign-BeF8kTyg.js";
9
- import { u as ee } from "./vue-i18n-DVmD9I_o.js";
10
- import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js";
12
- import { u as ae } from "./template-DTZgnkl5.js";
13
- import { c as _ } from "./index-DlJGd8RC.js";
14
- const ne = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { key: 0 }, Ie = /* @__PURE__ */ N({
15
- __name: "Credit",
16
- setup(ye) {
17
- const { t: r } = ee(), I = {
18
- label: r("connect.program.common.actions.create", {
19
- type: r("connect.program.credit.title").toLowerCase()
20
- }),
21
- value: "create",
22
- isPrimary: !0,
23
- prependIcon: "add"
24
- }, R = ae("CREDIT", J()), B = X(), m = Y(), { global: D, minor: w } = W, s = S({
25
- searchKey: "",
26
- location: null
27
- }), d = j(
28
- () => m.campaigns.credit.filter(
29
- (e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
30
- )
31
- ), T = [
32
- {
33
- header: r("connect.program.common.table.title"),
34
- accessorFn: (e) => e.name
35
- },
36
- {
37
- header: r("connect.program.common.table.status"),
38
- accessorFn: (e) => Z(e),
39
- cell(e) {
40
- return V(e.row.original);
41
- }
42
- },
43
- {
44
- header: r("connect.program.common.table.summary"),
45
- accessorFn: (e) => L(e)
46
- },
47
- {
48
- header: r("connect.program.common.table.actions"),
49
- cell(e) {
50
- return M(O.FmButton, {
51
- variant: "tertiary",
52
- icon: "delete",
53
- iconColor: "neutral-gray-400",
54
- onClick: (o) => {
55
- o.stopPropagation(), x(e.row.original);
56
- }
57
- });
58
- }
59
- }
60
- ], b = S();
61
- async function x(e) {
62
- await Q.remove(
63
- r("connect.program.common.remove.confirm", { name: e.name })
64
- ) && await w(
65
- async () => {
66
- await _.delete(e._id), await m.read("CREDIT");
67
- },
68
- {
69
- message: r("connect.program.common.remove.removing", { name: e.name }),
70
- successMessage: r("connect.program.common.remove.removed", {
71
- name: e.name
72
- })
73
- }
74
- );
75
- }
76
- async function f(e) {
77
- e ? await o() : R.open(async (p) => {
78
- await o(p);
79
- });
80
- async function o(p) {
81
- var u;
82
- (u = b.value) == null || u.showSheet(
83
- !0,
84
- "CREDIT",
85
- e ? await _.readById(e._id) : void 0,
86
- p
87
- );
88
- }
89
- }
90
- async function E(e) {
91
- await w(
92
- async () => {
93
- e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("CREDIT");
94
- },
95
- {
96
- message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
97
- successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
98
- }
99
- );
100
- }
101
- return A(async () => {
102
- await D(async () => {
103
- await m.read("CREDIT");
104
- });
105
- }), (e, o) => {
106
- const p = l("FmPageHead"), u = l("FmSearch"), K = l("FmTable"), F = l("FmButton"), $ = l("FmListItem"), P = l("FmList"), U = l("FmCard");
107
- return c(), y(C, null, [
108
- i(p, {
109
- title: a(r)("connect.program.credit.title"),
110
- actions: a(d).length > 0 ? [I] : [],
111
- "onClick:action": o[0] || (o[0] = () => f())
112
- }, null, 8, ["title", "actions"]),
113
- n("div", ne, [
114
- i(u, {
115
- modelValue: a(s).searchKey,
116
- "onUpdate:modelValue": o[1] || (o[1] = (t) => a(s).searchKey = t),
117
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
118
- placeholder: "search",
119
- collapsible: ""
120
- }, null, 8, ["modelValue"]),
121
- a(m).campaigns.credit && a(m).campaigns.credit.length > 0 ? (c(), y(C, { key: 0 }, [
122
- n("div", re, [
123
- n("div", se, [
124
- i(oe, {
125
- modelValue: a(s).location,
126
- "onUpdate:modelValue": o[2] || (o[2] = (t) => a(s).location = t),
127
- label: "Location: ",
128
- "show-item-label": !0,
129
- icon: "storefront",
130
- placement: "bottom-start",
131
- items: a(B).locationItems
132
- }, null, 8, ["modelValue", "items"])
133
- ]),
134
- i(u, {
135
- modelValue: a(s).searchKey,
136
- "onUpdate:modelValue": o[3] || (o[3] = (t) => a(s).searchKey = t),
137
- class: "xs:hidden",
138
- placeholder: "search",
139
- collapsible: ""
140
- }, null, 8, ["modelValue"])
141
- ]),
142
- i(K, {
143
- class: "xs:hidden",
144
- "row-data": a(d),
145
- "column-defs": T,
146
- "search-value": a(s).searchKey,
147
- "column-filter": [],
148
- onRowClick: o[4] || (o[4] = (t) => f(t.original)),
149
- "hide-footer": a(d).length < 10
150
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
151
- i(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
152
- default: h(() => [
153
- (c(!0), y(C, null, H(a(d).filter(
154
- (t) => t.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
155
- ), (t) => (c(), v($, {
156
- key: t._id.toString(),
157
- onClick: (k) => f(t),
158
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
159
- }, {
160
- default: h(() => [
161
- n("div", ie, [
162
- n("div", le, [
163
- (c(), v(q(a(V)(t)))),
164
- n("div", ce, g(t.currentReceive ?? 0) + " used ", 1)
165
- ]),
166
- n("div", me, [
167
- n("div", de, g(t.name), 1),
168
- n("div", pe, g(a(L)(t)), 1)
169
- ]),
170
- n("div", ue, " Credit received: " + g(t.currentReceive ?? 0), 1)
171
- ]),
172
- i(F, {
173
- icon: "delete",
174
- "icon-color": "neutral-gray-400",
175
- variant: "tertiary",
176
- onClick: (k) => (k.stopPropagation(), x(t))
177
- }, null, 8, ["onClick"])
178
- ]),
179
- _: 2
180
- }, 1032, ["onClick"]))), 128))
181
- ]),
182
- _: 1
183
- }),
184
- a(d).length == 0 ? (c(), y("div", fe, o[6] || (o[6] = [
185
- n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
186
- ]))) : z("", !0)
187
- ], 64)) : (c(), v(U, {
188
- key: 1,
189
- variant: "outlined",
190
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
191
- }, {
192
- default: h(() => [
193
- o[7] || (o[7] = n("img", {
194
- src: G,
195
- class: "aspect-square w-[150px]"
196
- }, null, -1)),
197
- o[8] || (o[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
198
- n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
199
- n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
200
- ], -1)),
201
- i(F, {
202
- variant: "primary",
203
- label: "Create credit program",
204
- icon: "add",
205
- onClick: o[5] || (o[5] = (t) => f())
206
- })
207
- ]),
208
- _: 1
209
- })),
210
- i(te, {
211
- ref_key: "sheetRef",
212
- ref: b,
213
- "onSubmit:modelValue": E
214
- }, null, 512)
215
- ])
216
- ], 64);
217
- };
218
- }
219
- });
220
- export {
221
- Ie as default
222
- };
@@ -1,108 +0,0 @@
1
- import { defineComponent as I, ref as P, resolveComponent as u, openBlock as t, createBlock as y, unref as h, withCtx as d, renderSlot as V, createElementBlock as s, toDisplayString as i, createCommentVNode as S, createVNode as x, normalizeClass as g, createElementVNode as B, Fragment as N, renderList as j } from "vue";
2
- const q = {
3
- key: 0,
4
- class: "fm-typo-en-body-lg-400 mb-4"
5
- }, $ = {
6
- key: 1,
7
- class: "fm-typo-en-body-lg-400"
8
- }, E = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, O = /* @__PURE__ */ I({
9
- __name: "CustomSelect",
10
- props: {
11
- label: {
12
- type: String,
13
- required: !1
14
- },
15
- placeholder: {
16
- type: String,
17
- required: !1
18
- },
19
- items: {
20
- type: Object,
21
- required: !0
22
- },
23
- modelValue: {
24
- type: Object
25
- },
26
- zIndex: {
27
- type: Number
28
- },
29
- multiselect: {
30
- type: Boolean
31
- }
32
- },
33
- emits: ["update:model-value"],
34
- setup(e, { emit: k }) {
35
- const r = k, m = P(!1);
36
- return (v, b) => {
37
- const F = u("FmIcon"), C = u("FmField"), p = u("FmMenuItem"), w = u("FmPopover");
38
- return t(), y(w, {
39
- "show-popover": h(m),
40
- onPopoverChanged: b[0] || (b[0] = (l) => m.value = l),
41
- "z-index": e.zIndex
42
- }, {
43
- "popover-button": d(() => [
44
- V(v.$slots, "popover-button", {}, () => [
45
- e.label ? (t(), s("div", q, i(e.label), 1)) : S("", !0),
46
- x(C, null, {
47
- append: d(() => [
48
- V(v.$slots, "append"),
49
- x(F, {
50
- name: h(m) ? "expand_less" : "expand_more",
51
- size: "md",
52
- color: "black"
53
- }, null, 8, ["name"])
54
- ]),
55
- default: d(() => {
56
- var l;
57
- return [
58
- e.multiselect ? (t(), s("div", $, i(e.items.filter((o) => {
59
- var a;
60
- return (a = e.modelValue) == null ? void 0 : a.includes(o.value);
61
- }).map((o) => o.label).join(", ")), 1)) : (t(), s("div", {
62
- key: 0,
63
- class: g(["fm-typo-en-body-lg-400", {
64
- "text-fm-color-typo-secondary": !e.items.find(
65
- (o) => o.value == e.modelValue
66
- )
67
- }])
68
- }, i(((l = e.items.find((o) => o.value == e.modelValue)) == null ? void 0 : l.label) || e.placeholder), 3))
69
- ];
70
- }),
71
- _: 3
72
- })
73
- ])
74
- ]),
75
- default: d(() => [
76
- B("div", E, [
77
- (t(!0), s(N, null, j(e.items, (l) => {
78
- var o, a;
79
- return t(), y(p, {
80
- class: g(`${e.multiselect ? (o = e.modelValue) != null && o.some((n) => n == l.value) ? "bg-fm-color-system-warning-100" : "" : e.modelValue == l.value}`),
81
- "has-checkbox": e.multiselect,
82
- key: l.value,
83
- "model-value": e.multiselect ? (a = e.modelValue) == null ? void 0 : a.some((n) => n == l.value) : e.modelValue == l.value,
84
- label: l.label,
85
- onClick: (n) => {
86
- var f;
87
- if (n.stopPropagation(), !e.multiselect)
88
- m.value = !1, r("update:model-value", l.value);
89
- else {
90
- const z = (f = e.modelValue) == null ? void 0 : f.some((c) => c == l.value);
91
- r(
92
- "update:model-value",
93
- z ? (e.modelValue ?? []).filter((c) => c !== l.value) : [...e.modelValue ?? [], l.value]
94
- );
95
- }
96
- }
97
- }, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
98
- }), 128))
99
- ])
100
- ]),
101
- _: 3
102
- }, 8, ["show-popover", "z-index"]);
103
- };
104
- }
105
- });
106
- export {
107
- O as _
108
- };