@feedmepos/mf-connect 0.1.38-beta.7 → 0.1.38-beta.71

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 (153) hide show
  1. package/dist/{Analytic-NNi-22sK.js → Analytic-BY0xqCru.js} +16 -16
  2. package/dist/{App-Bu14Mro_.js → App-n6-XqhU7.js} +625 -619
  3. package/dist/AuditLogs-Dml3WjdH.js +1991 -0
  4. package/dist/{Bin-CnAQA85j.js → Bin-DaPZyWm-.js} +10 -10
  5. package/dist/Broadcast-hLmkBNne.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BahnNhzD.js} +6 -6
  7. package/dist/{Card-DqAGiETA.js → Card-C_Fm3E0s.js} +144 -140
  8. package/dist/Collections-DAUsUa0c.js +540 -0
  9. package/dist/Credit-DklbckuQ.js +261 -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-vpnaCdLI.js +3167 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js +351 -0
  14. package/dist/Experience-D3Ve8dCI.js +260 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-Bg15HHd0.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BJzRdZNg.js +331 -0
  18. package/dist/GenerateMaterial-pDWgptXt.js +589 -0
  19. package/dist/Grab-B0D8SpcD.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js} +49 -48
  21. package/dist/{Index-loHkiwyo.js → Index-ysSM8-pd.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C7bEzQ4b.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-Kt1Wiz87.js} +1 -1
  24. package/dist/Marketing-CFS6ff03.js +145 -0
  25. package/dist/MarketingMaterialEdit-BDYr5Rlw.js +746 -0
  26. package/dist/{Member-BQjQQdoA.js → Member-Dgb3QBKF.js} +38 -37
  27. package/dist/{MemberList-WPsEUKf_.js → MemberList-CfcQUvN8.js} +158 -159
  28. package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-BVwGdpXo.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dj3h51yH.js} +13463 -10597
  30. package/dist/Mission-B9K8-Wrt.js +335 -0
  31. package/dist/{Overview-Bsf5IPOg.js → Overview-DJgKxAvU.js} +24 -25
  32. package/dist/Point-lev1_Nit.js +263 -0
  33. package/dist/Promotion-De9e8yPj.js +397 -0
  34. package/dist/{Queue-XFVbSuDw.js → Queue-DH_F0Ekd.js} +14 -15
  35. package/dist/{Record-CQzujESE.js → Record-CH2AZqzF.js} +10 -10
  36. package/dist/{Reward-Dj_h_May.js → Reward-BUgOAjd4.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-KTaTLjjw.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js +1912 -0
  39. package/dist/{Segment-D_DUu_Sp.js → Segment-DL6O--Aw.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js} +23 -23
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIeyrheH.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js} +4 -4
  43. package/dist/Setting-DOA80XlJ.js +1999 -0
  44. package/dist/SettingAdvertisements-Dl0eisXq.js +263 -0
  45. package/dist/Store-fni1Xblz.js +1995 -0
  46. package/dist/StoreRewards-CLMO-kNi.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js +7005 -0
  49. package/dist/{Tier-YQsLRt06.js → Tier-B0_DiVNv.js} +561 -480
  50. package/dist/{Title-C5gxYNvh.js → Title-twptCzpk.js} +149 -147
  51. package/dist/{Transaction-CZ_QdIii.js → Transaction-CTX5I6gO.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js} +7 -7
  53. package/dist/Voucher-C7Kxmzjr.js +422 -0
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js} +2 -2
  56. package/dist/app-D5GVWKxc.js +59071 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-DZYFoAKz.js → business-BvNsRlY4.js} +11 -8
  59. package/dist/{campaign-Ca4l6UUg.js → campaign-DRErhSfb.js} +29 -25
  60. package/dist/campaign-MN_o01w6.js +253 -0
  61. package/dist/campaign.enum-BtfwwLCf.js +26 -0
  62. package/dist/campaign.fn-BgSGxLPo.js +776 -0
  63. package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-CV2tpD2C.js} +1 -1
  64. package/dist/{collection.fn-mQfXEwJv.js → collection.fn-BYjqObg7.js} +2 -2
  65. package/dist/dto-CyhnIGn-.js +222 -0
  66. package/dist/duplicateCampaign-jOZ1UznM.js +51 -0
  67. package/dist/effect-NKfquhhR.js +89 -0
  68. package/dist/{email-addresses-CQYqi2rN.js → email-addresses-EmFJeFmB.js} +2 -2
  69. package/dist/{export-BsikVZw2.js → export-B70Bp6s8.js} +9 -10
  70. package/dist/{helper-n74IteBU.js → helper-DiSstsUa.js} +22 -7
  71. package/dist/index-5FmmWAib.js +30289 -0
  72. package/dist/index-B09KKPb4.js +3419 -0
  73. package/dist/{index-CrHCbDIs.js → index-BgP5ZHK6.js} +3 -3
  74. package/dist/{index-DRrSsoqp.js → index-C46EHygk.js} +1 -1
  75. package/dist/{index-Bg3fAg5z.js → index-CD7Ji4Nw.js} +1 -1
  76. package/dist/{index-BJ-IAF-1.js → index-CHXlBh7-.js} +1 -1
  77. package/dist/{index-BpjT8Rx0.js → index-Cr2243n7.js} +455 -245
  78. package/dist/index-CrDg9PFk.js +8912 -0
  79. package/dist/index-CuvNtC_M.js +61 -0
  80. package/dist/{index-Dt6wui_L.js → index-DK45XoFG.js} +3 -3
  81. package/dist/{index-DTErPYrT.js → index-Qg_bzaF2.js} +1 -1
  82. package/dist/{index-Do7TcKmg.js → index-bAmlAkpk.js} +4 -1
  83. package/dist/index-nTpkh7pU.js +28897 -0
  84. package/dist/index-tvZKdKVU.js +36 -0
  85. package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-B8fYlj6l.js} +185 -185
  86. package/dist/loading-DVr3dbZ1.js +215 -0
  87. package/dist/{lodash-B5I3zXaY.js → lodash-BNr1VEn2.js} +1 -1
  88. package/dist/{membership-BRy4jMt2.js → membership-LEuPDIbe.js} +3 -3
  89. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  90. package/dist/{money-B9Auav5u.js → money-CogUwiv6.js} +1 -1
  91. package/dist/{number-BdhIBsUp.js → number-C5wGUTN5.js} +1 -1
  92. package/dist/objectid-DbUENFHd.js +145 -0
  93. package/dist/{campaign-162kZMje.js → plugins-BxKrsjEx.js} +784 -777
  94. package/dist/remy-D_Deb3ue.js +13 -0
  95. package/dist/{reward-UuqZUHsq.js → reward-CM4Wx2zA.js} +1 -1
  96. package/dist/{rule-D158NIpm.js → rule-CMMr2GMg.js} +505 -487
  97. package/dist/rule-builder-D5QsmOxi.js +102 -0
  98. package/dist/style.css +11 -2
  99. package/dist/template-BDKqBasy.js +188 -0
  100. package/dist/timezone-DuaWQsQ2.js +1154 -0
  101. package/dist/trigger-IcyZcRow.js +213 -0
  102. package/dist/usePagination-D8OEDsCt.js +223 -0
  103. package/dist/user-u3blYzG2.js +55 -0
  104. package/dist/vue-i18n-DfD8ZY6j.js +2365 -0
  105. package/dist/{xlsx-Ddqi5i8p.js → xlsx-Bgf4_JHr.js} +1 -1
  106. package/dist/{zod-Bg2FbC-D.js → zod-9J33xiFS.js} +32 -31
  107. package/package.json +14 -6
  108. package/dist/AuditLogs-Cai9CVBl.js +0 -1887
  109. package/dist/Broadcast-DskXjXn4.js +0 -227
  110. package/dist/Collections-DuaIQAk7.js +0 -465
  111. package/dist/Credit-D40Vzu2g.js +0 -222
  112. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  113. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
  114. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
  115. package/dist/Experience-B9yHQPuj.js +0 -223
  116. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  117. package/dist/Game-e9-Q3qmO.js +0 -278
  118. package/dist/Marketing-CipbukIV.js +0 -20073
  119. package/dist/Mission-B_DJ3Yu_.js +0 -296
  120. package/dist/Point-DMphcWjy.js +0 -226
  121. package/dist/Promotion-B33A-Jwe.js +0 -289
  122. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
  123. package/dist/Setting-CtdC4G3W.js +0 -1936
  124. package/dist/Store-DCksWACh.js +0 -1842
  125. package/dist/StoreRewards-CHWKYKet.js +0 -423
  126. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
  127. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
  128. package/dist/Voucher-BzV8yZ3o.js +0 -384
  129. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
  130. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  131. package/dist/app-FFOpPHwj.js +0 -33357
  132. package/dist/app-az9e8Yfl.js +0 -7086
  133. package/dist/campaign.enum-DWjyDV2D.js +0 -20
  134. package/dist/campaign.fn-DWWJ74z-.js +0 -758
  135. package/dist/dto-mKZIPV4o.js +0 -214
  136. package/dist/effect-B8UexeyG.js +0 -78
  137. package/dist/index-5ShiAY8U.js +0 -8861
  138. package/dist/index-Bf6AmJwX.js +0 -32260
  139. package/dist/index-C5gjIb5d.js +0 -146
  140. package/dist/index-C9YrDtDN.js +0 -38
  141. package/dist/index-CK-MAqWE.js +0 -3120
  142. package/dist/index-CsaQJMAR.js +0 -66
  143. package/dist/index-f4MzX8IY.js +0 -30038
  144. package/dist/loading-BEAayQS-.js +0 -71
  145. package/dist/objectid-K-JVTsfA.js +0 -145
  146. package/dist/plugins-CWlRYif_.js +0 -208
  147. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  148. package/dist/rule-builder-DNeViq0I.js +0 -89
  149. package/dist/template-B02wYF7G.js +0 -190
  150. package/dist/trigger-BDjnKHLI.js +0 -144
  151. package/dist/usePagination-BeF5K3M7.js +0 -223
  152. package/dist/user-DbP37Ohh.js +0 -54
  153. package/dist/vue-i18n-BbhkYWlk.js +0 -2365
@@ -0,0 +1,421 @@
1
+ import { defineComponent as B, ref as k, resolveComponent as g, openBlock as d, createBlock as F, withCtx as y, renderSlot as J, createVNode as m, createTextVNode as U, toDisplayString as f, createElementVNode as s, computed as N, createElementBlock as P, Fragment as w, renderList as K, unref as e, normalizeClass as Q, createCommentVNode as I, resolveDynamicComponent as H } from "vue";
2
+ import { u as G } from "./vue-i18n-DfD8ZY6j.js";
3
+ import { c as j } from "./index-nTpkh7pU.js";
4
+ import { e as W, F as Y } from "./index-CrDg9PFk.js";
5
+ import { C as ee } from "./membership-LEuPDIbe.js";
6
+ import { Z as V } from "./zod-9J33xiFS.js";
7
+ import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js";
8
+ import { u as le } from "./business-BvNsRlY4.js";
9
+ import { useCoreStore as oe } from "@feedmepos/mf-common";
10
+ import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js";
11
+ import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js";
12
+ import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js";
13
+ import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js";
14
+ import { i as re } from "./helper-DiSstsUa.js";
15
+ const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
16
+ __name: "MenuSheet",
17
+ props: {
18
+ modelValue: {},
19
+ filterItems: { type: Function }
20
+ },
21
+ emits: ["confirm"],
22
+ setup(o, { emit: T }) {
23
+ const C = k(), l = k(!1);
24
+ function t() {
25
+ var v;
26
+ (v = C.value) == null || v.onConfirm();
27
+ }
28
+ const u = T;
29
+ return (v, p) => {
30
+ const n = g("FmField"), _ = g("FmButton"), x = g("FmSideSheet");
31
+ return d(), F(x, {
32
+ modelValue: l.value,
33
+ "onUpdate:modelValue": p[1] || (p[1] = (b) => l.value = b),
34
+ title: "Select Items",
35
+ "close-button": !1,
36
+ "dismiss-away": !0,
37
+ "max-width": 560
38
+ }, {
39
+ "side-sheet-button": y(() => [
40
+ J(v.$slots, "side-sheet-button", {}, () => [
41
+ m(n, { class: "text-fm-color-typo-tertiary cursor-pointer" }, {
42
+ default: y(() => [
43
+ U(f(o.modelValue.length) + " item(s) selected ", 1)
44
+ ]),
45
+ _: 1
46
+ })
47
+ ])
48
+ ]),
49
+ "side-sheet-footer": y(() => [
50
+ s("div", ue, [
51
+ m(_, {
52
+ variant: "tertiary",
53
+ onClick: p[0] || (p[0] = (b) => l.value = !1),
54
+ label: "Cancel"
55
+ }),
56
+ m(_, {
57
+ variant: "primary",
58
+ onClick: t,
59
+ label: "Confirm"
60
+ })
61
+ ])
62
+ ]),
63
+ default: y(() => [
64
+ m(te, {
65
+ class: "h-full",
66
+ "max-height": 0,
67
+ ref_key: "selectItemRef",
68
+ ref: C,
69
+ "initial-value": o.modelValue,
70
+ "filter-items": o.filterItems,
71
+ "on-complete": (b) => {
72
+ u("confirm", b), l.value = !1;
73
+ }
74
+ }, null, 8, ["initial-value", "filter-items", "on-complete"])
75
+ ]),
76
+ _: 3
77
+ }, 8, ["modelValue"]);
78
+ };
79
+ }
80
+ }), de = { class: "space-y-24" }, pe = { class: "grid grid-cols-2 gap-16" }, fe = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-16" }, be = { class: "fm-typo-en-body-lg-600" }, ve = { class: "fm-typo-en-body-lg-400" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ve = {
81
+ key: 0,
82
+ class: "xs:!block flex gap-16 items-center pt-8"
83
+ }, Oe = { class: "xs:py-4 text-center" }, Fe = { class: "fm-typo-en-body-lg-400" }, he = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ce = {
84
+ key: 0,
85
+ class: "pt-8 space-y-8"
86
+ }, _e = { class: "flex items-center gap-16 xs:block xs:space-y-8 w-fit" }, Pe = { class: "xs:!block flex gap-16 items-center" }, Ie = { class: "xs:py-4 text-center" }, je = /* @__PURE__ */ B({
87
+ __name: "EarningOptionInput",
88
+ props: {
89
+ modelValue: {
90
+ type: Object
91
+ },
92
+ extras: {
93
+ type: Object
94
+ },
95
+ fixedType: {
96
+ type: Boolean
97
+ },
98
+ errorText: {
99
+ type: String
100
+ }
101
+ },
102
+ emits: ["update:model-value"],
103
+ setup(o, { emit: T }) {
104
+ var b, R, E;
105
+ const C = le(), { t: l } = G(), t = o, u = T, v = N(
106
+ () => [
107
+ {
108
+ label: l("connect.campaign.earningOption.type.PROPORTIONAL.label"),
109
+ sublabel: l("connect.campaign.earningOption.type.PROPORTIONAL.sublabel"),
110
+ value: "PROPORTIONAL"
111
+ },
112
+ {
113
+ label: l("connect.campaign.earningOption.type.FIXED.label"),
114
+ sublabel: l("connect.campaign.earningOption.type.FIXED.sublabel"),
115
+ value: "FIXED"
116
+ }
117
+ ].filter((a) => {
118
+ var i, h;
119
+ return t.fixedType || ((h = (i = t.extras) == null ? void 0 : i.campaign) == null ? void 0 : h.event.type) != "BILL_COMPLETED" ? a.value == "FIXED" : !0;
120
+ })
121
+ ), p = N(() => {
122
+ var i, h;
123
+ const a = t.extras && "configs" in t.extras ? t.extras.configs.type : (i = t.extras) == null ? void 0 : i.campaign.type;
124
+ return (((h = ee[a]) == null ? void 0 : h.name) || "reward").toLowerCase();
125
+ }), n = N(() => {
126
+ const a = W.safeParse(t.modelValue);
127
+ return a.success ? [] : a.error.errors;
128
+ });
129
+ function _(a) {
130
+ var i;
131
+ a != ((i = t.modelValue) == null ? void 0 : i.type) && u(
132
+ "update:model-value",
133
+ a === "FIXED" ? {
134
+ type: "FIXED",
135
+ amount: 1
136
+ } : {
137
+ type: "PROPORTIONAL",
138
+ amount: 1,
139
+ every: 1
140
+ }
141
+ );
142
+ }
143
+ const x = k(
144
+ ((b = t.modelValue) == null ? void 0 : b.type) === "PROPORTIONAL" && !!((E = (R = t.modelValue) == null ? void 0 : R.property) != null && E.length) || !1
145
+ );
146
+ return (a, i) => {
147
+ var D, $, X;
148
+ const h = g("FmCard"), S = g("FmStepperField"), A = g("FmRadio"), M = g("FmPill"), Z = g("FmButton"), q = g("FmRadioGroup"), z = g("FmHelperText");
149
+ return d(), P("div", de, [
150
+ s("div", pe, [
151
+ (d(!0), P(w, null, K(e(v), (r) => {
152
+ var O, c;
153
+ return d(), F(h, {
154
+ variant: "outlined",
155
+ class: Q(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
156
+ "col-span-2": e(v).length == 1,
157
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((O = o.modelValue) == null ? void 0 : O.type) === r.value,
158
+ "hover:bg-fm-color-opacity-sm": ((c = o.modelValue) == null ? void 0 : c.type) != r.value
159
+ }]),
160
+ onClick: (L) => _(r.value),
161
+ key: r.value
162
+ }, {
163
+ default: y(() => [
164
+ s("div", fe, f(r.label), 1),
165
+ s("div", ge, f(r.sublabel), 1)
166
+ ]),
167
+ _: 2
168
+ }, 1032, ["class", "onClick"]);
169
+ }), 128))
170
+ ]),
171
+ s("div", ye, [
172
+ ((D = o.modelValue) == null ? void 0 : D.type) === "FIXED" ? (d(), F(S, {
173
+ key: 0,
174
+ label: e(l)("connect.campaign.earningOption.receiveLabel", { configName: e(p) }),
175
+ class: "flex-1",
176
+ "model-value": (($ = o.modelValue) == null ? void 0 : $.amount) ?? null,
177
+ "onUpdate:modelValue": i[0] || (i[0] = (r) => u("update:model-value", {
178
+ ...o.modelValue ?? { type: "FIXED" },
179
+ amount: r
180
+ }))
181
+ }, null, 8, ["label", "model-value"])) : ((X = o.modelValue) == null ? void 0 : X.type) === "PROPORTIONAL" ? (d(), P(w, { key: 1 }, [
182
+ s("div", be, f(e(l)("connect.campaign.earningOption.spendingType")), 1),
183
+ m(q, {
184
+ "model-value": e(x),
185
+ "onUpdate:modelValue": i[6] || (i[6] = (r) => {
186
+ e(x) != r && (u("update:model-value", {
187
+ ...o.modelValue ?? {
188
+ type: "PROPORTIONAL",
189
+ amount: 1,
190
+ every: 1
191
+ },
192
+ property: r ? [] : void 0,
193
+ every: 1
194
+ }), x.value = r);
195
+ })
196
+ }, {
197
+ default: y(() => [
198
+ m(A, {
199
+ label: e(l)("connect.campaign.earningOption.amountSpent.label"),
200
+ sublabel: e(l)("connect.campaign.earningOption.amountSpent.sublabel", { configName: e(p) }),
201
+ value: !1
202
+ }, {
203
+ label: y(() => {
204
+ var r, O;
205
+ return [
206
+ s("div", ve, f(e(l)("connect.campaign.earningOption.amountSpent.label")), 1),
207
+ s("div", xe, f(e(l)("connect.campaign.earningOption.amountSpent.sublabel", { configName: e(p) })), 1),
208
+ e(x) ? I("", !0) : (d(), P("div", Ve, [
209
+ m(S, {
210
+ label: e(l)("connect.campaign.earningOption.receiveLabel", { configName: e(p) }),
211
+ inputmode: "decimal",
212
+ class: "flex-1",
213
+ "model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
214
+ "onUpdate:modelValue": i[1] || (i[1] = (c) => u("update:model-value", {
215
+ ...o.modelValue ?? { type: "FIXED" },
216
+ amount: c
217
+ }))
218
+ }, null, 8, ["label", "model-value"]),
219
+ s("div", Oe, f(e(l)("connect.campaign.earningOption.forEvery")), 1),
220
+ m(S, {
221
+ label: e(l)("connect.campaign.earningOption.amountSpend", { currency: e(j.Config).getCountry().currency.symbol }),
222
+ class: "flex-1",
223
+ inputmode: "decimal",
224
+ "model-value": ((O = o.modelValue) == null ? void 0 : O.every) ?? null,
225
+ "onUpdate:modelValue": i[2] || (i[2] = (c) => u("update:model-value", {
226
+ ...o.modelValue,
227
+ every: c
228
+ }))
229
+ }, {
230
+ prepend: y(() => [
231
+ U(f(e(j.Config).getCountry().currency.symbol), 1)
232
+ ]),
233
+ _: 1
234
+ }, 8, ["label", "model-value"])
235
+ ]))
236
+ ];
237
+ }),
238
+ _: 1
239
+ }, 8, ["label", "sublabel"]),
240
+ m(A, {
241
+ label: e(l)("connect.campaign.earningOption.productBought.label"),
242
+ sublabel: e(l)("connect.campaign.earningOption.productBought.sublabel", { configName: e(p) }),
243
+ value: !0,
244
+ disabled: !e(C).isPremium
245
+ }, {
246
+ label: y(() => {
247
+ var r, O;
248
+ return [
249
+ s("div", Fe, [
250
+ U(f(e(l)("connect.campaign.earningOption.productBought.label")) + " ", 1),
251
+ m(M, { variant: "premium" })
252
+ ]),
253
+ s("div", he, f(e(l)("connect.campaign.earningOption.productBought.sublabel", { configName: e(p) })), 1),
254
+ e(x) ? (d(), P("div", Ce, [
255
+ s("div", _e, [
256
+ m(ce, {
257
+ "model-value": t.modelValue.property || [],
258
+ onConfirm: i[3] || (i[3] = (c) => u("update:model-value", {
259
+ ...o.modelValue,
260
+ property: c
261
+ }))
262
+ }, {
263
+ "side-sheet-button": y(() => {
264
+ var c, L;
265
+ return [
266
+ m(Z, {
267
+ label: (c = t.modelValue.property) != null && c.length ? e(l)("connect.campaign.earningOption.productsSelected", { count: (L = t.modelValue.property) == null ? void 0 : L.length }) : e(l)("connect.campaign.earningOption.selectProduct"),
268
+ icon: "link",
269
+ variant: "secondary"
270
+ }, null, 8, ["label"])
271
+ ];
272
+ }),
273
+ _: 1
274
+ }, 8, ["model-value"])
275
+ ]),
276
+ s("div", Pe, [
277
+ m(S, {
278
+ inputmode: "decimal",
279
+ label: e(l)("connect.campaign.earningOption.receiveLabel", { configName: e(p) }),
280
+ class: "flex-1",
281
+ "model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
282
+ "onUpdate:modelValue": i[4] || (i[4] = (c) => u("update:model-value", {
283
+ ...o.modelValue ?? { type: "FIXED" },
284
+ amount: c
285
+ }))
286
+ }, null, 8, ["label", "model-value"]),
287
+ s("div", Ie, f(e(l)("connect.campaign.earningOption.forEvery")), 1),
288
+ m(S, {
289
+ label: e(l)("connect.campaign.earningOption.itemPurchased"),
290
+ class: "flex-1",
291
+ "model-value": ((O = o.modelValue) == null ? void 0 : O.every) ?? null,
292
+ inputmode: "numeric",
293
+ "max-fraction-digits": 0,
294
+ "onUpdate:modelValue": i[5] || (i[5] = (c) => u("update:model-value", {
295
+ ...o.modelValue,
296
+ every: c
297
+ }))
298
+ }, null, 8, ["label", "model-value"])
299
+ ])
300
+ ])) : I("", !0)
301
+ ];
302
+ }),
303
+ _: 1
304
+ }, 8, ["label", "sublabel", "disabled"])
305
+ ]),
306
+ _: 1
307
+ }, 8, ["model-value"])
308
+ ], 64)) : I("", !0)
309
+ ]),
310
+ o.errorText || e(n).length > 0 ? (d(), F(z, {
311
+ key: 0,
312
+ class: "!mt-4",
313
+ text: o.errorText || e(V).helperText(e(n), ""),
314
+ state: "error"
315
+ }, null, 8, ["text"])) : I("", !0)
316
+ ]);
317
+ };
318
+ }
319
+ }), Te = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, Ge = /* @__PURE__ */ B({
320
+ __name: "VoucherEditor",
321
+ props: {
322
+ modelValue: {
323
+ type: Object
324
+ },
325
+ rewardImage: {
326
+ type: Object
327
+ }
328
+ },
329
+ emits: ["update:model-value", "update:reward-image"],
330
+ setup(o, { emit: T }) {
331
+ const { t: C } = G(), t = k(
332
+ o.modelValue ?? re("VOUCHER", {
333
+ business: oe().currentBusiness.value._id,
334
+ name: ""
335
+ })
336
+ ), u = Y, v = T;
337
+ return (p, n) => {
338
+ var b, R, E;
339
+ const _ = g("FmTextarea"), x = g("FmHelperText");
340
+ return d(), P(w, null, [
341
+ m(ne, {
342
+ modelValue: e(t).name,
343
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => e(t).name = a),
344
+ label: "Voucher name",
345
+ schema: e(V).typeAtPath(e(u), "name", [e(t).type])
346
+ }, null, 8, ["modelValue", "schema"]),
347
+ m(_, {
348
+ class: "!mb-[-16px]",
349
+ modelValue: e(t).description,
350
+ "onUpdate:modelValue": n[1] || (n[1] = (a) => e(t).description = a),
351
+ rules: [e(V).ruleAtPath(e(u), "description", [e(t).type])]
352
+ }, {
353
+ label: y(() => [
354
+ (d(), F(H(
355
+ e(V).toInputLabel(
356
+ e(V).typeAtPath(e(u), "description", [e(t).type]),
357
+ "Voucher description"
358
+ )
359
+ )))
360
+ ]),
361
+ _: 1
362
+ }, 8, ["modelValue", "rules"]),
363
+ s("div", Te, [
364
+ n[6] || (n[6] = s("div", null, "Voucher description should not exceed 200 characters.", -1)),
365
+ s("div", null, f(((b = e(t).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
366
+ ]),
367
+ m(ae, {
368
+ class: "w-1/2 xs:w-2/3",
369
+ "aspect-ratio": "16/9",
370
+ file: o.rewardImage ?? void 0,
371
+ thumbnail: e(t).image ?? void 0,
372
+ "onUpdate:file": n[2] || (n[2] = async (a) => {
373
+ v("update:reward-image", a), a || (e(t).image = null);
374
+ })
375
+ }, {
376
+ label: y(() => [
377
+ (d(), F(H(
378
+ e(V).toInputLabel(
379
+ e(V).typeAtPath(e(u), "image", [e(t).type]),
380
+ "Voucher image"
381
+ )
382
+ )))
383
+ ]),
384
+ _: 1
385
+ }, 8, ["file", "thumbnail"]),
386
+ n[7] || (n[7] = s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
387
+ m(ie, {
388
+ "model-value": e(t).extras.effect,
389
+ "onUpdate:modelValue": n[3] || (n[3] = (a) => e(t).extras.effect = a)
390
+ }, null, 8, ["model-value"]),
391
+ e(t).extras.effect == null ? (d(), F(x, {
392
+ key: 0,
393
+ class: "!mt-8",
394
+ text: e(C)("connect.campaign.common.effect_required"),
395
+ state: "error"
396
+ }, null, 8, ["text"])) : I("", !0),
397
+ n[8] || (n[8] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Usage configuration", -1)),
398
+ m(se, {
399
+ "model-value": e(t).options,
400
+ "no-campaign": e(t).noCampaign,
401
+ "onUpdate:modelValue": n[4] || (n[4] = (a) => e(t).options = a),
402
+ schema: e(V).typeAtPath(e(u), "options", ["VOUCHER"])
403
+ }, null, 8, ["model-value", "no-campaign", "schema"]),
404
+ n[9] || (n[9] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
405
+ e(t).type === "VOUCHER" ? (d(), F(me, {
406
+ key: 1,
407
+ "model-value": ((E = (R = e(t).extras) == null ? void 0 : R.targetLocation) == null ? void 0 : E.map(String)) ?? null,
408
+ type: "select",
409
+ "onUpdate:modelValue": n[5] || (n[5] = (a) => {
410
+ e(t).extras.targetLocation = a;
411
+ }),
412
+ rules: [e(V).ruleAtPath(e(u), "extras.targetLocation")]
413
+ }, null, 8, ["model-value", "rules"])) : I("", !0)
414
+ ], 64);
415
+ };
416
+ }
417
+ });
418
+ export {
419
+ je as _,
420
+ Ge as a
421
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
- import { Z as d } from "./zod-Bg2FbC-D.js";
3
- import { u as V } from "./vue-i18n-BbhkYWlk.js";
2
+ import { Z as d } from "./zod-9J33xiFS.js";
3
+ import { u as V } from "./vue-i18n-DfD8ZY6j.js";
4
4
  const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
5
  key: 0,
6
6
  class: "text-fm-color-typo-tertiary"