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

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-LOK5TzX0.js} +31 -32
  2. package/dist/{App-CLTtX1QT.js → App-Bk5Z5u5_.js} +617 -607
  3. package/dist/AuditLogs-Rezf9EeA.js +1991 -0
  4. package/dist/{Bin-C2xMLxoE.js → Bin-B8yzS5bD.js} +10 -10
  5. package/dist/Broadcast-CZ0QCvua.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-iJQS2Ck9.js} +6 -6
  7. package/dist/{Card-BPrCNLQy.js → Card-BQOv5yB9.js} +145 -140
  8. package/dist/Collections-qenPlCd2.js +540 -0
  9. package/dist/Credit-BJLskbVu.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-DKWCWOU_.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dw1qQfnG.js +351 -0
  15. package/dist/Experience-BjfEiGT8.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-C013Tr1o.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-Gw_tFjen.js +330 -0
  20. package/dist/Grab-Bdv7SaB9.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-Ba4L39GL.js} +49 -48
  22. package/dist/{Index-DMdNgISh.js → Index-C67U3YDJ.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-pQ8sF5KW.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-o-eN3J4i.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DPjqCyJ5.js} +1 -1
  26. package/dist/Marketing-DtEooXof.js +166 -0
  27. package/dist/MarketingMaterialEdit-Balw055Y.js +1065 -0
  28. package/dist/{Member-CnSXGQi_.js → Member-QA7TQnyw.js} +38 -37
  29. package/dist/{MemberList-DcpEKV1D.js → MemberList-CSJQFYlh.js} +486 -491
  30. package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-D-46vda_.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-6a7_lw74.js} +13443 -10607
  32. package/dist/Mission-DJVxFbX5.js +334 -0
  33. package/dist/{Overview-elpi-jpI.js → Overview-Btkh3oiI.js} +24 -25
  34. package/dist/Point-CVdF9GtN.js +262 -0
  35. package/dist/Promotion-BtmlvUd3.js +396 -0
  36. package/dist/{Queue-GvBhNEFe.js → Queue-BfiCMsLC.js} +23 -24
  37. package/dist/{Record-CbSxgo8i.js → Record-B07QGPli.js} +10 -10
  38. package/dist/Review-BeZ90jW9.js +621 -0
  39. package/dist/ReviewFacebookCallback-CwAcKaib.js +243 -0
  40. package/dist/ReviewGoogleCallback-CVK6Yc5E.js +213 -0
  41. package/dist/{Reward-QCGlrq89.js → Reward-CyXqNpAa.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-BICsdgSh.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js +1912 -0
  44. package/dist/{Segment-5PndnEUa.js → Segment-B9g57O7g.js} +273 -274
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-BwDOXE87.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js +226 -0
  48. package/dist/Setting-BHteqZv6.js +2039 -0
  49. package/dist/SettingAdvertisements-CubrbuSL.js +264 -0
  50. package/dist/Store-u6LYUnmp.js +1996 -0
  51. package/dist/StoreRewards-D9h0YnEx.js +535 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js +1129 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-WgNstmNx.js +7007 -0
  54. package/dist/{Tier-BKKxG29r.js → Tier-CBdi4sPT.js} +561 -480
  55. package/dist/{Title-CReZgw8V.js → Title-BegmN7hs.js} +151 -149
  56. package/dist/{Transaction-HWCmSVaJ.js → Transaction-C6XMd9_r.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BBf4BP4m.js} +7 -7
  58. package/dist/Voucher-D6hSas_z.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-ZOlAZ_q5.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bs8TNiCY.js} +2 -2
  61. package/dist/app-Duwed9mD.js +59309 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-Bc-EMd2p.js → business-6oZ8Rgui.js} +11 -8
  64. package/dist/campaign-CzenWLhs.js +219 -0
  65. package/dist/campaign-PYce7g0o.js +253 -0
  66. package/dist/campaign.enum-KHniCp5a.js +26 -0
  67. package/dist/campaign.fn-dOSgHJcU.js +776 -0
  68. package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-BZA1DKIB.js} +1 -1
  69. package/dist/{collection.fn-AjDNdFe1.js → collection.fn-CyfrdKBf.js} +2 -2
  70. package/dist/dto-DYmM2ud_.js +222 -0
  71. package/dist/duplicateCampaign-BXaDK8Q6.js +51 -0
  72. package/dist/effect-DBI_JHbP.js +89 -0
  73. package/dist/{email-addresses-B0SzUCQM.js → email-addresses-BNs-WN79.js} +2 -2
  74. package/dist/{export-Bgz6WcNZ.js → export-DTCCKE2m.js} +4 -4
  75. package/dist/{helper-B1vFwohM.js → helper-CeYr7Anh.js} +22 -7
  76. package/dist/index-38u-cCwD.js +3431 -0
  77. package/dist/{index-Cm2sBagk.js → index-BdjY7GRO.js} +1 -1
  78. package/dist/index-CGMiuxyf.js +85 -0
  79. package/dist/index-CQZbm9P5.js +8912 -0
  80. package/dist/index-Cal60fAm.js +48 -0
  81. package/dist/{index-DT2viYsL.js → index-CnRLkzpg.js} +617 -191
  82. package/dist/index-CuvNtC_M.js +61 -0
  83. package/dist/{index-CSQY21Zb.js → index-D-kPBF9C.js} +3 -3
  84. package/dist/{index-DVQnrex_.js → index-DcFYm1fy.js} +3 -3
  85. package/dist/index-DjONNxbl.js +30289 -0
  86. package/dist/{index-26SopNpv.js → index-ItaoypTr.js} +1 -1
  87. package/dist/index-_jxXI4_v.js +28899 -0
  88. package/dist/{index-DwT9RLst.js → index-nXfjG8UQ.js} +23 -12
  89. package/dist/{index-BIRmS75g.js → index-pHQfP2e7.js} +1 -1
  90. package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-CokFPnqn.js} +185 -185
  91. package/dist/{loading-C6Ouh0mG.js → loading-fZQi5zP8.js} +1 -1
  92. package/dist/{lodash-B5I3zXaY.js → lodash-R-DIRmbj.js} +1 -1
  93. package/dist/{membership-DU0BwIj8.js → membership-CApN5ZJ1.js} +3 -3
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-Bg7GuE5s.js → money-C6I6vVy2.js} +1 -1
  96. package/dist/{number-Ddmqo5D_.js → number-Dq4d381U.js} +1 -1
  97. package/dist/objectid-Kv5GREBk.js +145 -0
  98. package/dist/{campaign-BeF8kTyg.js → plugins-9_UvAdJ2.js} +784 -777
  99. package/dist/remy-NLAa-9Qg.js +46 -0
  100. package/dist/{reward-CN4gvn4c.js → reward-DXHGeGYY.js} +1 -1
  101. package/dist/{rule-CpiqqR0c.js → rule-B_XgRDr-.js} +505 -487
  102. package/dist/rule-builder-BMXyzu8k.js +102 -0
  103. package/dist/style.css +11 -2
  104. package/dist/template-CnyTUzQU.js +188 -0
  105. package/dist/timezone-Izs3ibB-.js +1156 -0
  106. package/dist/trigger-Dda3NmaE.js +213 -0
  107. package/dist/usePagination-Byxk4XVn.js +220 -0
  108. package/dist/user-BZxO8qdh.js +55 -0
  109. package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DDbkmbSf.js} +433 -433
  110. package/dist/{xlsx-qJHsnW7k.js → xlsx-D8yNl8dN.js} +1 -1
  111. package/dist/{zod-Bg2FbC-D.js → zod-Xp7TePRP.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,347 +0,0 @@
1
- import { defineComponent as P, ref as C, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as O, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-BGaUIdCr.js";
3
- import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { f as le, g as oe } from "./index-DOfLDlI8.js";
5
- import { u as Z } from "./vue-i18n-DVmD9I_o.js";
6
- import { s as R } from "./effect-DZhcEQ5g.js";
7
- import { p as ae } from "./plugins-C-CRzeyC.js";
8
- import { O as ne } from "./app-DccKBdW_.js";
9
- const ie = { class: "flex flex-col gap-8" }, se = {
10
- key: 0,
11
- class: "fm-typo-en-body-lg-600"
12
- }, de = { key: 1 }, me = {
13
- key: 2,
14
- class: "space-y-16"
15
- }, re = /* @__PURE__ */ P({
16
- __name: "ValidityInput",
17
- props: {
18
- label: {
19
- type: String
20
- },
21
- disabled: {
22
- type: Boolean,
23
- default: !1
24
- },
25
- type: {
26
- type: String,
27
- default: void 0
28
- },
29
- modelValue: {
30
- type: Object,
31
- required: !0
32
- },
33
- forCredit: {
34
- type: Boolean,
35
- default: !1
36
- },
37
- helperText: {
38
- type: String
39
- }
40
- },
41
- emits: ["update:model-value"],
42
- setup(t, { emit: g }) {
43
- var A, B;
44
- const { t: d } = Z(), l = t, S = g, o = [
45
- { label: d("connect.template.validity_option.date_range"), value: "range" },
46
- { label: d("connect.template.validity_option.custom"), value: "custom" }
47
- ], a = C(!1);
48
- Q(() => {
49
- a.value = l.modelValue && Object.entries(l.modelValue).filter(
50
- ([p, r]) => p != "followFirstReceive" && r != null
51
- ).length > 0;
52
- });
53
- const n = C(
54
- l.type ? o.find((p) => p.value === l.type) : (A = l.modelValue) != null && A.validBefore || (B = l.modelValue) != null && B.validAfter ? o[0] : o[1]
55
- ), h = H(
56
- () => l.forCredit ? le : oe
57
- ), m = H(() => {
58
- const p = h.value.safeParse(l.modelValue);
59
- return p.success ? [] : p.error.errors;
60
- });
61
- function i(p) {
62
- S("update:model-value", p);
63
- }
64
- function k(p) {
65
- var r, D;
66
- if (p.value == "range")
67
- return i({
68
- followFirstReceive: (r = l.modelValue) == null ? void 0 : r.followFirstReceive,
69
- validAfter: void 0,
70
- validBefore: void 0
71
- });
72
- if (p.value == "custom")
73
- return a.value = !1, i({
74
- validForDay: (D = l.modelValue) == null ? void 0 : D.validForDay
75
- });
76
- }
77
- return (p, r) => {
78
- var I, $, j, E, M, N, L, z;
79
- const D = y("FmButtonGroup"), Y = y("FmSimpleDateRangePicker"), J = y("FmSwitch"), K = y("FmStepperField"), T = y("FmHelperText");
80
- return s(), x("div", ie, [
81
- W(p.$slots, "label", {}, () => [
82
- t.label ? (s(), x("div", se, w(t.label), 1)) : v("", !0)
83
- ]),
84
- t.type ? v("", !0) : (s(), f(D, {
85
- key: 0,
86
- modelValue: e(n),
87
- "onUpdate:modelValue": [
88
- r[0] || (r[0] = (c) => q(n) ? n.value = c : null),
89
- r[1] || (r[1] = (c) => k(c))
90
- ],
91
- items: o
92
- }, null, 8, ["modelValue"])),
93
- e(n).value === "range" ? (s(), x("div", de, [
94
- b(Y, {
95
- "model-value": {
96
- startDate: (I = t.modelValue) != null && I.validAfter ? new Date(($ = t.modelValue) == null ? void 0 : $.validAfter).toISOString() : null,
97
- endDate: (j = t.modelValue) != null && j.validAfter ? new Date(((E = t.modelValue) == null ? void 0 : E.validBefore) || "").toISOString() : null
98
- },
99
- "onUpdate:modelValue": r[2] || (r[2] = (c) => {
100
- var V;
101
- i({
102
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive,
103
- validAfter: new Date(c.startDate).toISOString(),
104
- validBefore: new Date(c.endDate).toISOString()
105
- });
106
- })
107
- }, null, 8, ["model-value"])
108
- ])) : e(n).value === "custom" ? (s(), x("div", me, [
109
- b(J, {
110
- "model-value": e(a),
111
- label: e(d)("connect.template.validity_option.expire"),
112
- "label-placement": "right",
113
- "onUpdate:modelValue": r[3] || (r[3] = (c) => {
114
- var V;
115
- a.value = c, i({
116
- validForDay: c ? 1 : void 0,
117
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
118
- });
119
- })
120
- }, null, 8, ["model-value", "label"]),
121
- e(a) ? (s(), f(K, {
122
- key: 0,
123
- label: e(d)("connect.template.validity_option.after_day"),
124
- class: G([{
125
- "opacity-50 pointer-events-none": !e(a)
126
- }, "mt-[-4px]"]),
127
- "max-fraction-digits": 0,
128
- disabled: !e(a),
129
- "show-steppers": !1,
130
- max: 99999,
131
- "append-text": e(d)("connect.template.validity_option.days"),
132
- "model-value": ((M = l.modelValue) == null ? void 0 : M.validForDay) ?? null,
133
- "onUpdate:modelValue": r[4] || (r[4] = (c) => {
134
- var V;
135
- return i({
136
- validForDay: c == null ? void 0 : parseInt(c.toString()),
137
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
138
- });
139
- })
140
- }, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : v("", !0)
141
- ])) : v("", !0),
142
- ((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (s(), f(T, {
143
- key: 3,
144
- text: e(d)("connect.template.validity_option.expire_follow_first_receive")
145
- }, null, 8, ["text"])) : v("", !0),
146
- b(T, {
147
- text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(d)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
148
- state: t.helperText ? "error" : ((z = l.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(u).helperState(e(m), "")
149
- }, null, 8, ["text", "state"])
150
- ]);
151
- };
152
- }
153
- }), ue = { class: "space-y-8" }, he = /* @__PURE__ */ P({
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: g }) {
173
- const { t: d } = Z(), l = t, S = g, o = C(l.modelValue ?? {});
174
- return X(o, () => S("update:model-value", o.value)), (a, n) => {
175
- const h = y("FmSwitch"), m = y("FmStepperField");
176
- return s(), x("div", ue, [
177
- t.isMission ? v("", !0) : (s(), f(h, {
178
- key: 0,
179
- label: e(d)("connect.template.enable_transfer"),
180
- "label-placement": "right",
181
- modelValue: e(o).enableTransfer,
182
- "onUpdate:modelValue": n[0] || (n[0] = (i) => e(o).enableTransfer = i)
183
- }, null, 8, ["label", "modelValue"])),
184
- t.noCampaign ? v("", !0) : (s(), x("div", {
185
- key: 1,
186
- class: G(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
187
- }, [
188
- b(m, {
189
- modelValue: e(o).maxPerUser,
190
- "onUpdate:modelValue": n[1] || (n[1] = (i) => e(o).maxPerUser = i),
191
- "show-steppers": !1,
192
- rules: [e(u).ruleAtPath(t.schema, "maxPerUser")],
193
- "helper-text": e(d)("connect.template.leave_empty_unlimited")
194
- }, {
195
- label: F(() => [
196
- (s(), f(O(
197
- e(u).toInputLabel(
198
- e(u).typeAtPath(t.schema, "maxPerUser"),
199
- e(d)("connect.template.max_per_user")
200
- )
201
- )))
202
- ]),
203
- _: 1
204
- }, 8, ["modelValue", "rules", "helper-text"]),
205
- t.isMission ? v("", !0) : (s(), f(m, {
206
- key: 0,
207
- modelValue: e(o).maxReceive,
208
- "onUpdate:modelValue": n[2] || (n[2] = (i) => e(o).maxReceive = i),
209
- "show-steppers": !1,
210
- rules: [e(u).ruleAtPath(t.schema, "maxReceive")],
211
- "helper-text": e(d)("connect.template.leave_empty_unlimited")
212
- }, {
213
- label: F(() => [
214
- (s(), f(O(
215
- e(u).toInputLabel(
216
- e(u).typeAtPath(t.schema, "maxReceive"),
217
- e(d)("connect.template.max_distribute")
218
- )
219
- )))
220
- ]),
221
- _: 1
222
- }, 8, ["modelValue", "rules", "helper-text"]))
223
- ], 2)),
224
- t.isMission ? v("", !0) : (s(), x(_, { key: 2 }, [
225
- b(m, {
226
- modelValue: e(o).maxUse,
227
- "onUpdate:modelValue": n[3] || (n[3] = (i) => e(o).maxUse = i),
228
- "append-text": "use(s)",
229
- "show-steppers": !1,
230
- rules: [e(u).ruleAtPath(t.schema, "maxUse")]
231
- }, {
232
- label: F(() => [
233
- (s(), f(O(
234
- e(u).toInputLabel(
235
- e(u).typeAtPath(t.schema, "maxUse"),
236
- e(d)("connect.template.usage_count")
237
- )
238
- )))
239
- ]),
240
- _: 1
241
- }, 8, ["modelValue", "rules"]),
242
- e(o).maxUse && e(o).maxUse > 1 ? (s(), f(m, {
243
- key: 0,
244
- modelValue: e(o).cooldown,
245
- "onUpdate:modelValue": n[4] || (n[4] = (i) => e(o).cooldown = i),
246
- "append-text": "minute(s)",
247
- "show-steppers": !1,
248
- rules: [e(u).ruleAtPath(t.schema, "cooldown")]
249
- }, {
250
- label: F(() => [
251
- (s(), f(O(
252
- e(u).toInputLabel(
253
- e(u).typeAtPath(t.schema, "cooldown"),
254
- e(d)("connect.template.cooldown")
255
- )
256
- )))
257
- ]),
258
- _: 1
259
- }, 8, ["modelValue", "rules"])) : v("", !0),
260
- b(re, {
261
- modelValue: e(o).validityOption,
262
- "onUpdate:modelValue": n[5] || (n[5] = (i) => e(o).validityOption = i),
263
- label: e(d)("connect.template.validity_option.title")
264
- }, null, 8, ["modelValue", "label"])
265
- ], 64))
266
- ]);
267
- };
268
- }
269
- }), pe = { class: "space-y-8" }, ce = {
270
- key: 1,
271
- class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
272
- }, fe = { class: "fm-typo-en-body-lg-400" }, ve = { class: "text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ P({
273
- __name: "EffectSheet",
274
- props: {
275
- modelValue: { type: Object },
276
- canSetAutoApply: {
277
- type: Boolean
278
- }
279
- },
280
- emits: ["update:model-value"],
281
- setup(t, { emit: g }) {
282
- const d = g, l = C(!1);
283
- async function S(o) {
284
- o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && d("update:model-value", null);
285
- }
286
- return (o, a) => {
287
- const n = y("FmButton"), h = y("FmSideSheet");
288
- return s(), f(h, {
289
- "max-width": 550,
290
- header: "Apply discount",
291
- modelValue: e(l),
292
- "onUpdate:modelValue": [
293
- a[2] || (a[2] = (m) => q(l) ? l.value = m : null),
294
- a[3] || (a[3] = (m) => l.value = m)
295
- ]
296
- }, {
297
- "side-sheet-button": F(() => {
298
- var m, i, k, A;
299
- return [
300
- U("div", pe, [
301
- a[4] || (a[4] = U("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1)),
302
- t.modelValue ? (s(), x("div", ce, [
303
- U("div", fe, [
304
- U("div", null, w((m = e(R)(t.modelValue)) == null ? void 0 : m.type), 1),
305
- U("div", ve, w((i = e(R)(t.modelValue)) == null ? void 0 : i.adjustment) + " with " + w((k = e(R)(t.modelValue)) == null ? void 0 : k.requirements) + " " + w((A = e(R)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
306
- ]),
307
- b(n, {
308
- icon: "delete",
309
- "icon-color": "neutral-gray-400",
310
- variant: "tertiary",
311
- onClick: S
312
- })
313
- ])) : (s(), f(n, {
314
- key: 0,
315
- label: "Apply discount",
316
- icon: "add",
317
- "icon-color": "primary",
318
- variant: "secondary",
319
- class: "border-fm-color-primary text-fm-color-primary"
320
- }))
321
- ])
322
- ];
323
- }),
324
- "side-sheet-footer": F(() => a[5] || (a[5] = [
325
- ee(w(void 0))
326
- ])),
327
- default: F(() => [
328
- b(e(ne), {
329
- class: "fm-effect-sheet",
330
- title: "",
331
- "can-set-auto-apply": t.canSetAutoApply,
332
- "disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
333
- "initial-value": t.modelValue,
334
- onOnConfirm: a[0] || (a[0] = (m) => (d("update:model-value", m), l.value = !1)),
335
- onOnCancel: a[1] || (a[1] = (m) => l.value = !1)
336
- }, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
337
- ]),
338
- _: 1
339
- }, 8, ["modelValue"]);
340
- };
341
- }
342
- });
343
- export {
344
- Ae as _,
345
- he as a,
346
- re as b
347
- };
@@ -1,223 +0,0 @@
1
- import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
2
- import { _ as q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as z, components as G } from "@feedmepos/ui-library";
4
- import { p as J } from "./plugins-C-CRzeyC.js";
5
- import { u as Q } from "./loading-C6Ouh0mG.js";
6
- import { u as W } from "./business-Bc-EMd2p.js";
7
- import { u as X } from "./campaign-DbJZEU7P.js";
8
- import { a as L, b as V, g as Y } from "./campaign-BeF8kTyg.js";
9
- import { u as Z } from "./vue-i18n-DVmD9I_o.js";
10
- import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js";
12
- import { u as oe } from "./template-DTZgnkl5.js";
13
- import { c as g } from "./index-DlJGd8RC.js";
14
- const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "flex flex-col gap-16 text-center" }, fe = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ D({
15
- __name: "Experience",
16
- setup(ge) {
17
- const { t: s } = Z(), I = {
18
- label: s("connect.program.common.actions.create", {
19
- type: s("connect.program.experience.title").toLowerCase()
20
- }),
21
- value: "create",
22
- isPrimary: !0,
23
- prependIcon: "add"
24
- }, P = oe("POINT", z()), B = W(), l = X(), { global: T, minor: v } = Q, r = S({
25
- searchKey: "",
26
- location: null
27
- }), f = E(
28
- () => l.campaigns.experience.filter(
29
- (e) => !r.value.location || !e.targetLocation || e.targetLocation.includes(r.value.location)
30
- )
31
- ), K = [
32
- {
33
- header: "Program title",
34
- accessorFn: (e) => e.name
35
- },
36
- {
37
- header: "Status",
38
- accessorFn: (e) => Y(e),
39
- cell(e) {
40
- return L(e.row.original);
41
- }
42
- },
43
- {
44
- header: "Summary",
45
- accessorFn: (e) => V(e)
46
- //v.effect,
47
- },
48
- {
49
- header: "Actions",
50
- cell(e) {
51
- return H(G.FmButton, {
52
- variant: "tertiary",
53
- icon: "delete",
54
- iconColor: "neutral-gray-400",
55
- onClick: (o) => {
56
- o.stopPropagation(), C(e.row.original);
57
- }
58
- });
59
- }
60
- }
61
- ], b = S();
62
- async function C(e) {
63
- await J.remove(`Are you sure you want to remove ${e.name}?`) && await v(
64
- async () => {
65
- await g.delete(e._id), await l.read("POINT");
66
- },
67
- {
68
- message: `Removing ${e.name}`,
69
- successMessage: `Removed ${e.name} successfully`
70
- }
71
- );
72
- }
73
- async function y(e) {
74
- e ? await o() : P.open(async (d) => {
75
- await o(d);
76
- });
77
- async function o(d) {
78
- var u;
79
- (u = b.value) == null || u.showSheet(
80
- !0,
81
- "POINT",
82
- e ? await g.readById(e._id) : void 0,
83
- d
84
- );
85
- }
86
- }
87
- async function N(e) {
88
- await v(
89
- async () => {
90
- e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await l.read("POINT");
91
- },
92
- {
93
- message: s("connect.program.common.update.updating", {
94
- type: s("connect.program.experience.title")
95
- }),
96
- successMessage: s("connect.program.common.update.success", {
97
- type: s("connect.program.experience.title"),
98
- action: e.campaign._id ? "updated" : "created"
99
- })
100
- }
101
- );
102
- }
103
- return U(async () => {
104
- await T(async () => {
105
- await l.read("POINT");
106
- });
107
- }), (e, o) => {
108
- const d = i("FmPageHead"), u = i("FmSearch"), R = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), O = i("FmList"), A = i("FmCard");
109
- return m(), _(x, null, [
110
- c(d, {
111
- title: t(s)("connect.program.experience.title"),
112
- actions: t(f).length > 0 ? [I] : [],
113
- "onClick:action": o[0] || (o[0] = () => y())
114
- }, null, 8, ["title", "actions"]),
115
- n("div", ae, [
116
- c(u, {
117
- modelValue: t(r).searchKey,
118
- "onUpdate:modelValue": o[1] || (o[1] = (a) => t(r).searchKey = a),
119
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
120
- placeholder: t(s)("connect.program.common.search"),
121
- collapsible: ""
122
- }, null, 8, ["modelValue", "placeholder"]),
123
- t(l).campaigns.experience && t(l).campaigns.experience.length > 0 ? (m(), _(x, { key: 0 }, [
124
- n("div", ne, [
125
- n("div", se, [
126
- c(ee, {
127
- modelValue: t(r).location,
128
- "onUpdate:modelValue": o[2] || (o[2] = (a) => t(r).location = a),
129
- label: "Location: ",
130
- "show-item-label": !0,
131
- icon: "storefront",
132
- placement: "bottom-start",
133
- items: t(B).locationItems
134
- }, null, 8, ["modelValue", "items"])
135
- ]),
136
- c(u, {
137
- modelValue: t(r).searchKey,
138
- "onUpdate:modelValue": o[3] || (o[3] = (a) => t(r).searchKey = a),
139
- class: "xs:hidden",
140
- placeholder: "search",
141
- collapsible: ""
142
- }, null, 8, ["modelValue"])
143
- ]),
144
- c(R, {
145
- class: "xs:hidden",
146
- "row-data": t(f),
147
- "column-defs": K,
148
- "search-value": t(r).searchKey,
149
- "column-filter": [],
150
- onRowClick: o[4] || (o[4] = (a) => y(a.original)),
151
- "hide-footer": t(f).length < 10
152
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
153
- c(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
154
- default: h(() => [
155
- (m(!0), _(x, null, j(t(f).filter(
156
- (a) => a.name.toLowerCase().includes(t(r).searchKey.toLowerCase())
157
- ), (a) => (m(), w($, {
158
- key: a._id.toString(),
159
- onClick: (k) => y(a),
160
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
161
- }, {
162
- default: h(() => [
163
- n("div", re, [
164
- n("div", ce, [
165
- (m(), w(M(t(L)(a)))),
166
- n("div", ie, p(a.currentReceive ?? 0) + " used ", 1)
167
- ]),
168
- n("div", le, [
169
- n("div", me, p(a.name), 1),
170
- n("div", pe, p(t(V)(a)), 1)
171
- ]),
172
- n("div", de, p(t(s)("connect.program.experience.received", {
173
- count: a.currentReceive ?? 0
174
- })), 1)
175
- ]),
176
- c(F, {
177
- icon: "delete",
178
- "icon-color": "neutral-gray-400",
179
- variant: "tertiary",
180
- onClick: (k) => (k.stopPropagation(), C(a))
181
- }, null, 8, ["onClick"])
182
- ]),
183
- _: 2
184
- }, 1032, ["onClick"]))), 128))
185
- ]),
186
- _: 1
187
- })
188
- ], 64)) : (m(), w(A, {
189
- key: 1,
190
- variant: "outlined",
191
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
192
- }, {
193
- default: h(() => [
194
- o[6] || (o[6] = n("img", {
195
- src: q,
196
- class: "aspect-square w-[150px]"
197
- }, null, -1)),
198
- n("div", ue, [
199
- n("div", fe, p(t(s)("connect.program.experience.empty_state.title")), 1),
200
- n("div", ye, p(t(s)("connect.program.experience.empty_state.description")), 1)
201
- ]),
202
- c(F, {
203
- variant: "primary",
204
- label: "Create experience program",
205
- icon: "add",
206
- onClick: o[5] || (o[5] = (a) => y())
207
- })
208
- ]),
209
- _: 1
210
- })),
211
- c(te, {
212
- ref_key: "sheetRef",
213
- ref: b,
214
- "onSubmit:modelValue": N
215
- }, null, 512)
216
- ])
217
- ], 64);
218
- };
219
- }
220
- });
221
- export {
222
- Pe as default
223
- };
@@ -1,114 +0,0 @@
1
- import { defineComponent as V, ref as y, computed as q, onMounted as x, resolveComponent as s, openBlock as r, createBlock as m, unref as u, withCtx as d, createVNode as i, normalizeClass as p, createCommentVNode as j, createElementVNode as I, toDisplayString as h, createElementBlock as M, Fragment as O, renderList as S } from "vue";
2
- const A = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, N = /* @__PURE__ */ V({
3
- __name: "FilterChip",
4
- props: {
5
- modelValue: {
6
- type: Array,
7
- required: !1
8
- },
9
- label: {
10
- type: String,
11
- required: !1,
12
- default: ""
13
- },
14
- showItemLabel: {
15
- type: Boolean,
16
- default: !1
17
- },
18
- placement: {
19
- type: String,
20
- required: !1,
21
- default: "bottom-end"
22
- },
23
- class: {
24
- type: String,
25
- required: !1
26
- },
27
- disabled: {
28
- type: Boolean,
29
- required: !1
30
- },
31
- items: {
32
- type: Array,
33
- required: !0
34
- },
35
- icon: {
36
- type: String,
37
- required: !1
38
- }
39
- },
40
- emits: ["update:model-value"],
41
- setup(o, { emit: g }) {
42
- const t = o, v = g, c = y(!1), e = y({}), k = q(() => {
43
- const l = Object.keys(e.value).length;
44
- return !e.value || Object.keys(e.value).length == t.items.length || l === 0 ? "All" : `${l > 0 ? l : "None"} selected`;
45
- });
46
- function _(l) {
47
- e.value[l] ? delete e.value[l] : e.value[l] = !0, v("update:model-value", Object.keys(e.value));
48
- }
49
- function C() {
50
- Object.keys(e.value).length > 0 ? e.value = {} : e.value = t.items.reduce((l, n) => (l[n.value] = !0, l), {}), v("update:model-value", Object.keys(e.value));
51
- }
52
- return x(() => {
53
- e.value = t.modelValue.reduce(
54
- (l, n) => (l[n] = !0, l),
55
- {}
56
- ), t.modelValue.length == 0;
57
- }), (l, n) => {
58
- const b = s("FmIcon"), F = s("FmChip"), f = s("FmMenuItem"), w = s("FmMenu");
59
- return r(), m(w, {
60
- placement: o.placement || "bottom-end",
61
- disabled: o.disabled == !0,
62
- "model-value": u(c),
63
- onMenuChanged: n[0] || (n[0] = (a) => c.value = a),
64
- "close-on-click": !1
65
- }, {
66
- "menu-button": d(() => [
67
- i(F, {
68
- label: o.label,
69
- class: p(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
70
- }, {
71
- default: d(() => [
72
- t.icon ? (r(), m(b, {
73
- key: 0,
74
- name: t.icon,
75
- class: p(t.class),
76
- outline: "",
77
- size: "sm"
78
- }, null, 8, ["name", "class"])) : j("", !0),
79
- I("div", A, h(t.label) + " " + h(o.showItemLabel ? u(k) : ""), 1),
80
- i(b, {
81
- name: u(c) ? "keyboard_arrow_up" : "keyboard_arrow_down",
82
- class: p(t.class),
83
- outline: "",
84
- size: "sm"
85
- }, null, 8, ["name", "class"])
86
- ]),
87
- _: 1
88
- }, 8, ["label", "class"])
89
- ]),
90
- default: d(() => [
91
- i(f, {
92
- "model-value": Object.keys(u(e)).length === t.items.length,
93
- label: "All",
94
- "has-checkbox": !0,
95
- indeterminate: !0,
96
- onClick: C
97
- }, null, 8, ["model-value"]),
98
- (r(!0), M(O, null, S(t.items ?? [], (a) => (r(), m(f, {
99
- key: a.value,
100
- value: a.value,
101
- label: a.label,
102
- "has-checkbox": !0,
103
- "model-value": u(e)[a.value],
104
- "onUpdate:modelValue": (B) => _(a.value)
105
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
106
- ]),
107
- _: 1
108
- }, 8, ["placement", "disabled", "model-value"]);
109
- };
110
- }
111
- });
112
- export {
113
- N as _
114
- };