@feedmepos/mf-connect 0.1.38-beta.9 → 0.1.38-beta.91

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 (162) hide show
  1. package/dist/{Analytic-3MN2saaU.js → Analytic-Drbkm5By.js} +31 -32
  2. package/dist/{App-Co8X5Wdy.js → App-C0cdcG5i.js} +741 -728
  3. package/dist/AuditLogs-BZZLtf2u.js +2013 -0
  4. package/dist/{Bin-8a56ZDib.js → Bin-DRV5lRmj.js} +10 -10
  5. package/dist/Broadcast-C90FN2LB.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVXlfq31.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CsdxwjCn.js} +6 -6
  7. package/dist/{Card-B8_09LJu.js → Card-CWF84A1O.js} +145 -140
  8. package/dist/Collections-ja0gMaFf.js +540 -0
  9. package/dist/Credit-D8U2AJgq.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-YR62BvBG.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BVbhDMqH.js +351 -0
  15. package/dist/Experience-DDXLGizu.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-Dng61jiL.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-CMOilzsW.js +330 -0
  20. package/dist/Grab-tPVQB39R.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-BbtEXO4b.js} +49 -48
  22. package/dist/{Index-DLF71mx_.js → Index-Ch7wiShF.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-DLO0jj6Z.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CplyhUFF.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-BMqnfxHh.js} +1 -1
  26. package/dist/Marketing-C0weDg-u.js +236 -0
  27. package/dist/MarketingMaterialEdit-BD-SyXVQ.js +1036 -0
  28. package/dist/{Member-Bkw4aqtv.js → Member-Bpf0amjr.js} +38 -37
  29. package/dist/{MemberList-a3PdVYB3.js → MemberList-cWYPEpL4.js} +485 -489
  30. package/dist/{MemberTransactions-CPDBd-n3.js → MemberTransactions-vzRUVwpO.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-pbN8pN1m.js → MessageInput.vue_vue_type_script_setup_true_lang-DY3L9CvB.js} +10392 -9967
  32. package/dist/Mission-HRwIp1QY.js +334 -0
  33. package/dist/{Overview-De97NDoe.js → Overview-D9cfX4Kr.js} +34 -34
  34. package/dist/Point-Dz-Z0_m9.js +262 -0
  35. package/dist/Promotion-Csb0bdI6.js +397 -0
  36. package/dist/{Queue-ISVZxCE2.js → Queue-CAVKh9bK.js} +18 -18
  37. package/dist/{Record-2FMByNC6.js → Record-bPnIoHnT.js} +15 -14
  38. package/dist/Review-D2DfvLqJ.js +621 -0
  39. package/dist/ReviewFacebookCallback-CI7V3xbp.js +243 -0
  40. package/dist/ReviewGoogleCallback-LA2S8FLZ.js +213 -0
  41. package/dist/{Reward-DPRyQ37x.js → Reward-DdHF5Pr7.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Ba7-3bL-.js → RewardGroup.vue_vue_type_script_setup_true_lang-DyZhWnI4.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B0OSLJVN.js +1912 -0
  44. package/dist/Segment-DV1zcWF7.js +1015 -0
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DZbyDVid.js → SelectItems.vue_vue_type_script_setup_true_lang-Df1HE9sL.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ioMFYIwK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0K9giqI.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CzJL8Xl0.js +226 -0
  48. package/dist/Setting-DZiZy8A5.js +2039 -0
  49. package/dist/SettingAdvertisements-Bb9shWVJ.js +264 -0
  50. package/dist/Store-mymtMyho.js +1996 -0
  51. package/dist/StoreRewards-jcjZfSv7.js +537 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B-b5_TFL.js +1130 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-sCa1J_hq.js +7007 -0
  54. package/dist/{Tier-CwRj0oJ1.js → Tier-Ba6aHC3R.js} +562 -480
  55. package/dist/{Title-EII5OxSP.js → Title-C4uKD8E1.js} +151 -149
  56. package/dist/{Transaction-1MTkAfej.js → Transaction-Bf2uG6co.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BlQVWQHJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C3ttU-bw.js} +7 -7
  58. package/dist/Voucher-Lsc2pKCk.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-MA7tsTm-.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CTeGK4bk.js → ZodTextField.vue_vue_type_script_setup_true_lang-DEDavbCx.js} +2 -2
  61. package/dist/app-BRrGcz9U.js +59647 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-DjnN-J4U.js → business-TBSvPv65.js} +11 -8
  64. package/dist/campaign-CL95CZkI.js +219 -0
  65. package/dist/campaign-DxcuYXB7.js +254 -0
  66. package/dist/campaign.enum-DRydaoy9.js +26 -0
  67. package/dist/campaign.fn-BsoUwQ5N.js +776 -0
  68. package/dist/{collectible.enum-r6N115Lu.js → collectible.enum-CpTbpumt.js} +1 -1
  69. package/dist/{collection.fn-CSsfVv26.js → collection.fn-BNrPdDIr.js} +2 -2
  70. package/dist/dto-BGrkIVqX.js +222 -0
  71. package/dist/duplicateCampaign-DBaFROXd.js +51 -0
  72. package/dist/effect-fonU-1xO.js +89 -0
  73. package/dist/{email-addresses-D8uheCCF.js → email-addresses-WeV5Gvxa.js} +2 -2
  74. package/dist/{export-Ver6WiX6.js → export-DDXf8yf_.js} +4 -4
  75. package/dist/{helper-Bg4xoFbh.js → helper-DwnzJKxo.js} +22 -7
  76. package/dist/index-10x-WMiS.js +30289 -0
  77. package/dist/index-9Wt89ReU.js +3625 -0
  78. package/dist/{index-Bb0CHeNx.js → index-Brh5FXQ7.js} +3 -3
  79. package/dist/index-BxxNZQUc.js +8910 -0
  80. package/dist/{index-hJUxCNsF.js → index-CDAMmPIn.js} +1 -1
  81. package/dist/{index-CNhr0_Zx.js → index-Cg1vzNzf.js} +617 -191
  82. package/dist/{index-BZZ4iF4-.js → index-Cl7QnFc4.js} +23 -12
  83. package/dist/index-CuvNtC_M.js +61 -0
  84. package/dist/{index-BPQyQc4q.js → index-Cvw-xFek.js} +1 -1
  85. package/dist/index-DCJ_r_e2.js +85 -0
  86. package/dist/{index-Dn_bmcns.js → index-DLG8B-TK.js} +3 -3
  87. package/dist/{index-D4JOeJJJ.js → index-DWhh_u0L.js} +1 -1
  88. package/dist/index-DsQJTvKe.js +28900 -0
  89. package/dist/index-oR7xhhIt.js +48 -0
  90. package/dist/{index.esm2017-hK1Mi9yY.js → index.esm2017-CFvohTUs.js} +122 -122
  91. package/dist/{loading-kIQFOTwH.js → loading-DiD8J1Jc.js} +4 -3
  92. package/dist/{lodash-B5I3zXaY.js → lodash-BJgKlNEt.js} +1 -1
  93. package/dist/{membership--xR-HZoa.js → membership-C8HuK9_K.js} +38 -18
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-c-ITXnlg.js → money-DXl1-c0l.js} +1 -1
  96. package/dist/{number-DfZSBLOY.js → number-C6RGu6qp.js} +1 -1
  97. package/dist/objectid-8Boc1xMT.js +145 -0
  98. package/dist/{campaign-BpJ1O6KS.js → plugins-CxBcRdUi.js} +677 -699
  99. package/dist/remy-D_Deb3ue.js +13 -0
  100. package/dist/{reward-CE0ifMHS.js → reward-CEh2CA9Z.js} +1 -1
  101. package/dist/{rule-DrjdmpaB.js → rule-DEfU8NOO.js} +505 -487
  102. package/dist/rule-builder-BZIx2IzX.js +102 -0
  103. package/dist/string-Gcy5IM_H.js +32 -0
  104. package/dist/style.css +11 -2
  105. package/dist/template-Ba8NxY41.js +188 -0
  106. package/dist/timezone-DUqMvcwo.js +1156 -0
  107. package/dist/trigger-KQ-DPHv-.js +213 -0
  108. package/dist/useMarketingMaterialActions-DSI7Fpu9.js +96 -0
  109. package/dist/usePagination-BeTADCIt.js +220 -0
  110. package/dist/{user-Cl3IotYV.js → user-DN6_QE2j.js} +15 -14
  111. package/dist/vue-i18n-B4dOYJz4.js +2365 -0
  112. package/dist/{xlsx-BDBzdOuM.js → xlsx-BDFTkXYe.js} +1 -1
  113. package/dist/{zod-Bg2FbC-D.js → zod-B8WJKIxe.js} +32 -31
  114. package/package.json +14 -6
  115. package/dist/AuditLogs-DTq6IAuc.js +0 -1887
  116. package/dist/Broadcast-UreS5Kiq.js +0 -227
  117. package/dist/Collections-B0I5ULxR.js +0 -465
  118. package/dist/Credit-B4Ad8DWP.js +0 -222
  119. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  120. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjgACf9F.js +0 -2185
  121. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-y5JnuIev.js +0 -347
  122. package/dist/Experience-xO5KpTTm.js +0 -223
  123. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  124. package/dist/Game-ChgrVvz5.js +0 -278
  125. package/dist/Marketing-BlmRXSGl.js +0 -20073
  126. package/dist/Mission-B07wK0HX.js +0 -296
  127. package/dist/Point-Ckj9QIeH.js +0 -226
  128. package/dist/Promotion-aGNCOeRN.js +0 -289
  129. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DWj-421v.js +0 -1751
  130. package/dist/Segment-CRMNJ11X.js +0 -882
  131. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cfp8XXdO.js +0 -147
  132. package/dist/Setting-c0FWRZsD.js +0 -1936
  133. package/dist/Store-Bm1_15s8.js +0 -1842
  134. package/dist/StoreRewards-BCQHHfay.js +0 -423
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfTF2l-D.js +0 -1029
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-rvhoxo0w.js +0 -139
  137. package/dist/Voucher-CYvjCb-v.js +0 -384
  138. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-63Jr71dJ.js +0 -419
  139. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  140. package/dist/app-BJLHk8ao.js +0 -33357
  141. package/dist/app-BzIk1ojT.js +0 -7086
  142. package/dist/campaign-BHNS5kXt.js +0 -96
  143. package/dist/campaign.enum-CJDWE_Om.js +0 -20
  144. package/dist/campaign.fn-C0HQE9uh.js +0 -758
  145. package/dist/dto-Byq51uVH.js +0 -214
  146. package/dist/effect-Do3yTM-_.js +0 -78
  147. package/dist/index-B1V9UnI9.js +0 -76
  148. package/dist/index-BM9CWjC6.js +0 -38
  149. package/dist/index-CsaQJMAR.js +0 -66
  150. package/dist/index-D6VxioBg.js +0 -30038
  151. package/dist/index-DGKlRWn3.js +0 -32260
  152. package/dist/index-DLKyOu7W.js +0 -8861
  153. package/dist/index-DyYF6HYL.js +0 -121
  154. package/dist/index-UXtH44XQ.js +0 -3120
  155. package/dist/objectid-DKbha9-x.js +0 -145
  156. package/dist/plugins-DtakupKW.js +0 -208
  157. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  158. package/dist/rule-builder-B_hCyq3x.js +0 -89
  159. package/dist/template-WI4a-lFY.js +0 -190
  160. package/dist/trigger-DieDHht3.js +0 -144
  161. package/dist/usePagination-BeF5K3M7.js +0 -223
  162. package/dist/vue-i18n-DKh0SMhL.js +0 -2365
@@ -0,0 +1,351 @@
1
+ import { defineComponent as B, ref as O, onMounted as Q, computed as G, resolveComponent as x, openBlock as d, createElementBlock as b, renderSlot as W, toDisplayString as V, createCommentVNode as f, createBlock as u, unref as e, isRef as q, createVNode as h, normalizeClass as Z, watch as X, withCtx as w, resolveDynamicComponent as P, Fragment as _, createElementVNode as k, createTextVNode as ee } from "vue";
2
+ import { z as te, l as le } from "./app-BRrGcz9U.js";
3
+ import { Z as r } from "./zod-B8WJKIxe.js";
4
+ import { g as oe, f as ae } from "./index-BxxNZQUc.js";
5
+ import { u as I } from "./vue-i18n-B4dOYJz4.js";
6
+ import { s as S } from "./effect-fonU-1xO.js";
7
+ import { p as ne } from "./plugins-CxBcRdUi.js";
8
+ const ie = { class: "flex flex-col gap-8" }, de = {
9
+ key: 0,
10
+ class: "fm-typo-en-body-lg-600"
11
+ }, se = { key: 1 }, me = {
12
+ key: 2,
13
+ class: "space-y-16"
14
+ }, re = /* @__PURE__ */ B({
15
+ __name: "ValidityInput",
16
+ props: {
17
+ label: {
18
+ type: String
19
+ },
20
+ disabled: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ type: {
25
+ type: String,
26
+ default: void 0
27
+ },
28
+ modelValue: {
29
+ type: Object,
30
+ required: !0
31
+ },
32
+ forCredit: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ helperText: {
37
+ type: String
38
+ }
39
+ },
40
+ emits: ["update:model-value"],
41
+ setup(t, { emit: C }) {
42
+ var A, U;
43
+ const { t: n } = I(), i = t, v = C, a = [
44
+ { label: n("connect.template.validity_option.date_range"), value: "range" },
45
+ { label: n("connect.template.validity_option.custom"), value: "custom" }
46
+ ], c = O(!1);
47
+ Q(() => {
48
+ c.value = i.modelValue && Object.entries(i.modelValue).filter(
49
+ ([m, s]) => m != "followFirstReceive" && s != null
50
+ ).length > 0;
51
+ });
52
+ const l = O(
53
+ i.type ? a.find((m) => m.value === i.type) : (A = i.modelValue) != null && A.validBefore || (U = i.modelValue) != null && U.validAfter ? a[0] : a[1]
54
+ ), g = G(
55
+ () => i.forCredit ? oe : ae
56
+ ), y = G(() => {
57
+ const m = g.value.safeParse(i.modelValue);
58
+ return m.success ? [] : m.error.errors;
59
+ });
60
+ function o(m) {
61
+ v("update:model-value", m);
62
+ }
63
+ function D(m) {
64
+ var s, R;
65
+ if (m.value == "range")
66
+ return o({
67
+ followFirstReceive: (s = i.modelValue) == null ? void 0 : s.followFirstReceive,
68
+ validAfter: void 0,
69
+ validBefore: void 0
70
+ });
71
+ if (m.value == "custom")
72
+ return c.value = !1, o({
73
+ validForDay: (R = i.modelValue) == null ? void 0 : R.validForDay
74
+ });
75
+ }
76
+ return (m, s) => {
77
+ var E, $, j, M, H, N, L, z;
78
+ const R = x("FmButtonGroup"), Y = x("FmSimpleDateRangePicker"), J = x("FmSwitch"), K = x("FmStepperField"), T = x("FmHelperText");
79
+ return d(), b("div", ie, [
80
+ W(m.$slots, "label", {}, () => [
81
+ t.label ? (d(), b("div", de, V(t.label), 1)) : f("", !0)
82
+ ]),
83
+ t.type ? f("", !0) : (d(), u(R, {
84
+ key: 0,
85
+ modelValue: e(l),
86
+ "onUpdate:modelValue": [
87
+ s[0] || (s[0] = (p) => q(l) ? l.value = p : null),
88
+ s[1] || (s[1] = (p) => D(p))
89
+ ],
90
+ items: a
91
+ }, null, 8, ["modelValue"])),
92
+ e(l).value === "range" ? (d(), b("div", se, [
93
+ h(Y, {
94
+ "model-value": {
95
+ startDate: (E = t.modelValue) != null && E.validAfter ? new Date(($ = t.modelValue) == null ? void 0 : $.validAfter).toISOString() : null,
96
+ endDate: (j = t.modelValue) != null && j.validAfter ? new Date(((M = t.modelValue) == null ? void 0 : M.validBefore) || "").toISOString() : null
97
+ },
98
+ "onUpdate:modelValue": s[2] || (s[2] = (p) => {
99
+ var F;
100
+ o({
101
+ followFirstReceive: (F = i.modelValue) == null ? void 0 : F.followFirstReceive,
102
+ validAfter: new Date(p.startDate).toISOString(),
103
+ validBefore: new Date(p.endDate).toISOString()
104
+ });
105
+ })
106
+ }, null, 8, ["model-value"])
107
+ ])) : e(l).value === "custom" ? (d(), b("div", me, [
108
+ t.forCredit ? f("", !0) : (d(), u(J, {
109
+ key: 0,
110
+ "model-value": e(c),
111
+ label: e(n)("connect.template.validity_option.expire"),
112
+ "label-placement": "right",
113
+ "onUpdate:modelValue": s[3] || (s[3] = (p) => {
114
+ var F;
115
+ c.value = p, o({
116
+ validForDay: p ? 1 : void 0,
117
+ followFirstReceive: (F = i.modelValue) == null ? void 0 : F.followFirstReceive
118
+ });
119
+ })
120
+ }, null, 8, ["model-value", "label"])),
121
+ e(c) || t.forCredit ? (d(), u(K, {
122
+ key: 1,
123
+ label: e(n)("connect.template.validity_option.after_day"),
124
+ class: Z([{
125
+ "opacity-50 pointer-events-none": !e(c) && !t.forCredit
126
+ }, "mt-[-4px]"]),
127
+ "max-fraction-digits": 0,
128
+ disabled: !e(c) && !t.forCredit,
129
+ "show-steppers": !1,
130
+ max: 99999,
131
+ "append-text": e(n)("connect.template.validity_option.days"),
132
+ "model-value": ((H = i.modelValue) == null ? void 0 : H.validForDay) ?? null,
133
+ "onUpdate:modelValue": s[4] || (s[4] = (p) => {
134
+ var F;
135
+ return o({
136
+ validForDay: p == null ? void 0 : parseInt(p.toString()),
137
+ followFirstReceive: (F = i.modelValue) == null ? void 0 : F.followFirstReceive
138
+ });
139
+ })
140
+ }, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : f("", !0)
141
+ ])) : f("", !0),
142
+ ((N = i.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(c) ? (d(), u(T, {
143
+ key: 3,
144
+ text: e(n)("connect.template.validity_option.expire_follow_first_receive")
145
+ }, null, 8, ["text"])) : f("", !0),
146
+ h(T, {
147
+ text: t.helperText || (((L = i.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(n)("connect.template.validity_option.expires_on_same_day") : e(r).helperText(e(y), "")),
148
+ state: t.helperText ? "error" : ((z = i.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(r).helperState(e(y), "")
149
+ }, null, 8, ["text", "state"])
150
+ ]);
151
+ };
152
+ }
153
+ }), ue = { class: "space-y-8" }, Ce = /* @__PURE__ */ B({
154
+ __name: "CollectibleOptionInput",
155
+ props: {
156
+ modelValue: {
157
+ type: Object
158
+ },
159
+ noCampaign: {
160
+ type: Boolean
161
+ },
162
+ schema: {
163
+ type: Object,
164
+ default: () => te.any()
165
+ },
166
+ isMission: {
167
+ type: Boolean,
168
+ default: !1
169
+ }
170
+ },
171
+ emits: ["update:model-value"],
172
+ setup(t, { emit: C }) {
173
+ const { t: n } = I(), i = t, v = C, a = O(i.modelValue ?? {});
174
+ return X(a, () => v("update:model-value", a.value)), (c, l) => {
175
+ const g = x("FmSwitch"), y = x("FmStepperField");
176
+ return d(), b("div", ue, [
177
+ t.isMission ? f("", !0) : (d(), u(g, {
178
+ key: 0,
179
+ label: e(n)("connect.template.enable_transfer"),
180
+ "label-placement": "right",
181
+ modelValue: e(a).enableTransfer,
182
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e(a).enableTransfer = o)
183
+ }, null, 8, ["label", "modelValue"])),
184
+ t.noCampaign ? f("", !0) : (d(), b("div", {
185
+ key: 1,
186
+ class: Z(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
187
+ }, [
188
+ h(y, {
189
+ modelValue: e(a).maxPerUser,
190
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => e(a).maxPerUser = o),
191
+ "show-steppers": !1,
192
+ rules: [e(r).ruleAtPath(t.schema, "maxPerUser")],
193
+ "helper-text": e(n)("connect.template.leave_empty_unlimited")
194
+ }, {
195
+ label: w(() => [
196
+ (d(), u(P(
197
+ e(r).toInputLabel(
198
+ e(r).typeAtPath(t.schema, "maxPerUser"),
199
+ e(n)("connect.template.max_per_user")
200
+ )
201
+ )))
202
+ ]),
203
+ _: 1
204
+ }, 8, ["modelValue", "rules", "helper-text"]),
205
+ t.isMission ? f("", !0) : (d(), u(y, {
206
+ key: 0,
207
+ modelValue: e(a).maxReceive,
208
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => e(a).maxReceive = o),
209
+ "show-steppers": !1,
210
+ rules: [e(r).ruleAtPath(t.schema, "maxReceive")],
211
+ "helper-text": e(n)("connect.template.leave_empty_unlimited")
212
+ }, {
213
+ label: w(() => [
214
+ (d(), u(P(
215
+ e(r).toInputLabel(
216
+ e(r).typeAtPath(t.schema, "maxReceive"),
217
+ e(n)("connect.template.max_distribute")
218
+ )
219
+ )))
220
+ ]),
221
+ _: 1
222
+ }, 8, ["modelValue", "rules", "helper-text"]))
223
+ ], 2)),
224
+ t.isMission ? f("", !0) : (d(), b(_, { key: 2 }, [
225
+ h(y, {
226
+ modelValue: e(a).maxUse,
227
+ "onUpdate:modelValue": l[3] || (l[3] = (o) => e(a).maxUse = o),
228
+ "append-text": "use(s)",
229
+ "show-steppers": !1,
230
+ rules: [e(r).ruleAtPath(t.schema, "maxUse")]
231
+ }, {
232
+ label: w(() => [
233
+ (d(), u(P(
234
+ e(r).toInputLabel(
235
+ e(r).typeAtPath(t.schema, "maxUse"),
236
+ e(n)("connect.template.usage_count")
237
+ )
238
+ )))
239
+ ]),
240
+ _: 1
241
+ }, 8, ["modelValue", "rules"]),
242
+ e(a).maxUse && e(a).maxUse > 1 ? (d(), u(y, {
243
+ key: 0,
244
+ modelValue: e(a).cooldown,
245
+ "onUpdate:modelValue": l[4] || (l[4] = (o) => e(a).cooldown = o),
246
+ "append-text": "minute(s)",
247
+ "show-steppers": !1,
248
+ rules: [e(r).ruleAtPath(t.schema, "cooldown")]
249
+ }, {
250
+ label: w(() => [
251
+ (d(), u(P(
252
+ e(r).toInputLabel(
253
+ e(r).typeAtPath(t.schema, "cooldown"),
254
+ e(n)("connect.template.cooldown")
255
+ )
256
+ )))
257
+ ]),
258
+ _: 1
259
+ }, 8, ["modelValue", "rules"])) : f("", !0),
260
+ h(re, {
261
+ modelValue: e(a).validityOption,
262
+ "onUpdate:modelValue": l[5] || (l[5] = (o) => e(a).validityOption = o),
263
+ label: e(n)("connect.template.validity_option.title")
264
+ }, null, 8, ["modelValue", "label"])
265
+ ], 64))
266
+ ]);
267
+ };
268
+ }
269
+ }), ce = { class: "space-y-8" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = {
270
+ key: 1,
271
+ class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
272
+ }, ve = { class: "fm-typo-en-body-lg-400" }, ye = { class: "text-fm-color-typo-secondary" }, Ve = {
273
+ key: 0,
274
+ class: "fm-typo-en-body-md-500 text-fm-color-typo-error mt-4"
275
+ }, Ae = /* @__PURE__ */ B({
276
+ __name: "EffectSheet",
277
+ props: {
278
+ modelValue: { type: Object },
279
+ canSetAutoApply: {
280
+ type: Boolean
281
+ }
282
+ },
283
+ emits: ["update:model-value"],
284
+ setup(t, { emit: C }) {
285
+ const { t: n } = I(), i = C, v = O(!1);
286
+ async function a(c) {
287
+ c.stopPropagation(), await ne.remove(n("connect.effect.removeConfirm")) && i("update:model-value", null);
288
+ }
289
+ return (c, l) => {
290
+ const g = x("FmButton"), y = x("FmSideSheet");
291
+ return d(), u(y, {
292
+ "max-width": 550,
293
+ header: e(n)("connect.effect.title"),
294
+ modelValue: e(v),
295
+ "onUpdate:modelValue": [
296
+ l[2] || (l[2] = (o) => q(v) ? v.value = o : null),
297
+ l[3] || (l[3] = (o) => v.value = o)
298
+ ]
299
+ }, {
300
+ "side-sheet-button": w(() => {
301
+ var o, D, A, U, m, s;
302
+ return [
303
+ k("div", ce, [
304
+ k("div", pe, V(e(n)("connect.effect.description")), 1),
305
+ t.modelValue ? (d(), b("div", fe, [
306
+ k("div", ve, [
307
+ k("div", null, V((o = e(S)(t.modelValue)) == null ? void 0 : o.type), 1),
308
+ k("div", ye, V((D = e(S)(t.modelValue)) == null ? void 0 : D.adjustment) + " " + V(e(n)("connect.effect.with")) + " " + V((A = e(S)(t.modelValue)) == null ? void 0 : A.requirements) + " " + V((U = e(S)(t.modelValue)) == null ? void 0 : U.maxCap), 1),
309
+ (m = e(S)(t.modelValue)) != null && m.posHint ? (d(), b("div", Ve, V((s = e(S)(t.modelValue)) == null ? void 0 : s.posHint), 1)) : f("", !0)
310
+ ]),
311
+ h(g, {
312
+ icon: "delete",
313
+ "icon-color": "neutral-gray-400",
314
+ variant: "tertiary",
315
+ onClick: a
316
+ })
317
+ ])) : (d(), u(g, {
318
+ key: 0,
319
+ label: e(n)("connect.effect.title"),
320
+ icon: "add",
321
+ "icon-color": "primary",
322
+ variant: "secondary",
323
+ class: "border-fm-color-primary text-fm-color-primary"
324
+ }, null, 8, ["label"]))
325
+ ])
326
+ ];
327
+ }),
328
+ "side-sheet-footer": w(() => [...l[4] || (l[4] = [
329
+ ee(V(void 0), -1)
330
+ ])]),
331
+ default: w(() => [
332
+ h(e(le), {
333
+ class: "fm-effect-sheet",
334
+ title: "",
335
+ "can-set-auto-apply": t.canSetAutoApply,
336
+ "disable-effects": t.canSetAutoApply ? ["PAYMENT"] : ["PRICE_CHANGE"],
337
+ "initial-value": t.modelValue,
338
+ onOnConfirm: l[0] || (l[0] = (o) => (i("update:model-value", o), v.value = !1)),
339
+ onOnCancel: l[1] || (l[1] = (o) => v.value = !1)
340
+ }, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
341
+ ]),
342
+ _: 1
343
+ }, 8, ["header", "modelValue"]);
344
+ };
345
+ }
346
+ });
347
+ export {
348
+ Ae as _,
349
+ Ce as a,
350
+ re as b
351
+ };
@@ -0,0 +1,259 @@
1
+ import { defineComponent as M, ref as P, computed as H, onMounted as q, resolveComponent as m, openBlock as d, createElementBlock as w, Fragment as C, createVNode as s, unref as o, createElementVNode as n, withCtx as v, renderList as z, createBlock as b, resolveDynamicComponent as G, toDisplayString as _, h as k } from "vue";
2
+ import { _ as J } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as Q, components as B } from "@feedmepos/ui-library";
4
+ import { p as W } from "./plugins-CxBcRdUi.js";
5
+ import { u as X } from "./loading-DiD8J1Jc.js";
6
+ import { u as Y } from "./business-TBSvPv65.js";
7
+ import { u as Z, c as u } from "./campaign-CL95CZkI.js";
8
+ import { b as I, c as V, a as ee } from "./campaign-DxcuYXB7.js";
9
+ import { c as te, p as oe } from "./duplicateCampaign-DBaFROXd.js";
10
+ import { u as ae } from "./vue-i18n-B4dOYJz4.js";
11
+ import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
+ import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-YR62BvBG.js";
13
+ import { u as ie } from "./template-Ba8NxY41.js";
14
+ const se = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex items-center gap-8" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ M({
15
+ __name: "Experience",
16
+ setup(xe) {
17
+ const { t: r } = ae(), T = {
18
+ label: r("connect.program.common.actions.create", {
19
+ type: r("connect.program.experience.title").toLowerCase()
20
+ }),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, N = ie("POINT", Q()), $ = Y(), p = Z(), { global: D, minor: F } = X, c = P({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function K(e) {
29
+ const t = c.value.location;
30
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
31
+ var i;
32
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
33
+ }) : e.targetLocation.includes(t);
34
+ }
35
+ const f = H(
36
+ () => p.campaigns.experience.filter((e) => K(e))
37
+ ), O = [
38
+ {
39
+ header: "Program title",
40
+ accessorFn: (e) => e.name
41
+ },
42
+ {
43
+ header: "Status",
44
+ accessorFn: (e) => ee(e),
45
+ cell(e) {
46
+ return I(e.row.original);
47
+ }
48
+ },
49
+ {
50
+ header: "Summary",
51
+ accessorFn: (e) => V(e)
52
+ //v.effect,
53
+ },
54
+ {
55
+ header: "Actions",
56
+ cell(e) {
57
+ return k("div", { class: "flex items-center gap-8 justify-end" }, [
58
+ k(B.FmButton, {
59
+ variant: "tertiary",
60
+ icon: "content_copy",
61
+ iconColor: "neutral-gray-400",
62
+ onClick: async (t) => {
63
+ t.stopPropagation(), await L(e.row.original);
64
+ }
65
+ }),
66
+ k(B.FmButton, {
67
+ variant: "tertiary",
68
+ icon: "delete",
69
+ iconColor: "neutral-gray-400",
70
+ onClick: (t) => {
71
+ t.stopPropagation(), S(e.row.original);
72
+ }
73
+ })
74
+ ]);
75
+ }
76
+ }
77
+ ], h = P();
78
+ async function S(e) {
79
+ await W.remove(`Are you sure you want to remove ${e.name}?`) && await F(
80
+ async () => {
81
+ await u.delete(e._id), await p.read("POINT");
82
+ },
83
+ {
84
+ message: `Removing ${e.name}`,
85
+ successMessage: `Removed ${e.name} successfully`
86
+ }
87
+ );
88
+ }
89
+ async function g(e) {
90
+ e ? await t() : N.open(async (l) => {
91
+ await t(l);
92
+ });
93
+ async function t(l) {
94
+ var i;
95
+ (i = h.value) == null || i.showSheet(
96
+ !0,
97
+ "POINT",
98
+ e ? await u.readById(e._id) : void 0,
99
+ l
100
+ );
101
+ }
102
+ }
103
+ async function L(e) {
104
+ var i;
105
+ if (!await te(e.name))
106
+ return;
107
+ const t = await u.readById(e._id), l = oe(t, {
108
+ keepCollectible: !0
109
+ });
110
+ (i = h.value) == null || i.showSheet(
111
+ !0,
112
+ "POINT",
113
+ l,
114
+ t.template
115
+ );
116
+ }
117
+ async function A(e) {
118
+ await F(
119
+ async () => {
120
+ e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await p.read("POINT");
121
+ },
122
+ {
123
+ message: r("connect.program.common.update.updating", {
124
+ type: r("connect.program.experience.title")
125
+ }),
126
+ successMessage: r("connect.program.common.update.success", {
127
+ type: r("connect.program.experience.title"),
128
+ action: e.campaign._id ? "updated" : "created"
129
+ })
130
+ }
131
+ );
132
+ }
133
+ return q(async () => {
134
+ await D(async () => {
135
+ await p.read("POINT");
136
+ });
137
+ }), (e, t) => {
138
+ const l = m("FmPageHead"), i = m("FmSearch"), R = m("FmTable"), x = m("FmButton"), j = m("FmListItem"), E = m("FmList"), U = m("FmCard");
139
+ return d(), w(C, null, [
140
+ s(l, {
141
+ title: o(r)("connect.program.experience.title"),
142
+ actions: o(f).length > 0 ? [T] : [],
143
+ "onClick:action": t[0] || (t[0] = () => g())
144
+ }, null, 8, ["title", "actions"]),
145
+ n("div", se, [
146
+ s(i, {
147
+ modelValue: o(c).searchKey,
148
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
149
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
150
+ placeholder: o(r)("connect.program.common.search"),
151
+ collapsible: ""
152
+ }, null, 8, ["modelValue", "placeholder"]),
153
+ o(p).campaigns.experience && o(p).campaigns.experience.length > 0 ? (d(), w(C, { key: 0 }, [
154
+ n("div", ce, [
155
+ n("div", le, [
156
+ s(ne, {
157
+ label: `${o(r)("connect.common.location")}: `,
158
+ "right-icon": "keyboard_arrow_down",
159
+ modelValue: o(c).location,
160
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
161
+ icon: "storefront",
162
+ "show-item-label": !0,
163
+ items: o($).locationOptions
164
+ }, null, 8, ["label", "modelValue", "items"])
165
+ ]),
166
+ s(i, {
167
+ modelValue: o(c).searchKey,
168
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
169
+ class: "xs:hidden sm:hidden",
170
+ placeholder: "search",
171
+ collapsible: ""
172
+ }, null, 8, ["modelValue"])
173
+ ]),
174
+ s(R, {
175
+ class: "xs:hidden sm:hidden",
176
+ "row-data": o(f),
177
+ "column-defs": O,
178
+ "search-value": o(c).searchKey,
179
+ "column-filter": [],
180
+ onRowClick: t[4] || (t[4] = (a) => g(a.original)),
181
+ "hide-footer": o(f).length < 10
182
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
183
+ s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
184
+ default: v(() => [
185
+ (d(!0), w(C, null, z(o(f).filter(
186
+ (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
187
+ ), (a) => (d(), b(j, {
188
+ key: a._id.toString(),
189
+ onClick: (y) => g(a),
190
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
191
+ }, {
192
+ default: v(() => [
193
+ n("div", me, [
194
+ n("div", pe, [
195
+ (d(), b(G(o(I)(a))))
196
+ ]),
197
+ n("div", de, [
198
+ n("div", ue, _(a.name), 1),
199
+ n("div", fe, _(o(V)(a)), 1)
200
+ ])
201
+ ]),
202
+ n("div", ge, [
203
+ s(x, {
204
+ icon: "content_copy",
205
+ "icon-color": "neutral-gray-400",
206
+ variant: "tertiary",
207
+ onClick: async (y) => {
208
+ y.stopPropagation(), await L(a);
209
+ }
210
+ }, null, 8, ["onClick"]),
211
+ s(x, {
212
+ icon: "delete",
213
+ "icon-color": "neutral-gray-400",
214
+ variant: "tertiary",
215
+ onClick: (y) => (y.stopPropagation(), S(a))
216
+ }, null, 8, ["onClick"])
217
+ ])
218
+ ]),
219
+ _: 2
220
+ }, 1032, ["onClick"]))), 128))
221
+ ]),
222
+ _: 1
223
+ })
224
+ ], 64)) : (d(), b(U, {
225
+ key: 1,
226
+ variant: "outlined",
227
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
228
+ }, {
229
+ default: v(() => [
230
+ t[6] || (t[6] = n("img", {
231
+ src: J,
232
+ class: "aspect-square w-[150px]"
233
+ }, null, -1)),
234
+ n("div", ye, [
235
+ n("div", _e, _(o(r)("connect.program.experience.empty_state.title")), 1),
236
+ n("div", he, _(o(r)("connect.program.experience.empty_state.description")), 1)
237
+ ]),
238
+ s(x, {
239
+ variant: "primary",
240
+ label: "Create experience program",
241
+ icon: "add",
242
+ onClick: t[5] || (t[5] = (a) => g())
243
+ })
244
+ ]),
245
+ _: 1
246
+ })),
247
+ s(re, {
248
+ ref_key: "sheetRef",
249
+ ref: h,
250
+ "onSubmit:modelValue": A
251
+ }, null, 512)
252
+ ])
253
+ ], 64);
254
+ };
255
+ }
256
+ });
257
+ export {
258
+ Ne as default
259
+ };
@@ -1,4 +1,4 @@
1
- import { c as s } from "./_commonjsHelpers-BkfeUUK-.js";
1
+ import { c as s } from "./app-BRrGcz9U.js";
2
2
  var E = { exports: {} };
3
3
  (function(h, j) {
4
4
  (function(p, i) {