@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,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-D5GVWKxc.js";
3
+ import { Z as r } from "./zod-9J33xiFS.js";
4
+ import { g as oe, f as ae } from "./index-CrDg9PFk.js";
5
+ import { u as I } from "./vue-i18n-DfD8ZY6j.js";
6
+ import { s as S } from "./effect-NKfquhhR.js";
7
+ import { p as ne } from "./plugins-BxKrsjEx.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,260 @@
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-BxKrsjEx.js";
5
+ import { u as X } from "./loading-DVr3dbZ1.js";
6
+ import { u as Y } from "./business-BvNsRlY4.js";
7
+ import { u as Z } from "./campaign-DRErhSfb.js";
8
+ import { b as I, c as V, a as ee } from "./campaign-MN_o01w6.js";
9
+ import { c as te, p as oe } from "./duplicateCampaign-jOZ1UznM.js";
10
+ import { u as ae } from "./vue-i18n-DfD8ZY6j.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-vpnaCdLI.js";
13
+ import { u as ie } from "./template-BDKqBasy.js";
14
+ import { c as u } from "./index-bAmlAkpk.js";
15
+ 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" }, $e = /* @__PURE__ */ M({
16
+ __name: "Experience",
17
+ setup(xe) {
18
+ const { t: r } = ae(), T = {
19
+ label: r("connect.program.common.actions.create", {
20
+ type: r("connect.program.experience.title").toLowerCase()
21
+ }),
22
+ value: "create",
23
+ isPrimary: !0,
24
+ prependIcon: "add"
25
+ }, N = ie("POINT", Q()), $ = Y(), p = Z(), { global: D, minor: F } = X, c = P({
26
+ searchKey: "",
27
+ location: []
28
+ });
29
+ function K(e) {
30
+ const t = c.value.location;
31
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
32
+ var i;
33
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
34
+ }) : e.targetLocation.includes(t);
35
+ }
36
+ const f = H(
37
+ () => p.campaigns.experience.filter((e) => K(e))
38
+ ), O = [
39
+ {
40
+ header: "Program title",
41
+ accessorFn: (e) => e.name
42
+ },
43
+ {
44
+ header: "Status",
45
+ accessorFn: (e) => ee(e),
46
+ cell(e) {
47
+ return I(e.row.original);
48
+ }
49
+ },
50
+ {
51
+ header: "Summary",
52
+ accessorFn: (e) => V(e)
53
+ //v.effect,
54
+ },
55
+ {
56
+ header: "Actions",
57
+ cell(e) {
58
+ return k("div", { class: "flex items-center gap-8 justify-end" }, [
59
+ k(B.FmButton, {
60
+ variant: "tertiary",
61
+ icon: "content_copy",
62
+ iconColor: "neutral-gray-400",
63
+ onClick: async (t) => {
64
+ t.stopPropagation(), await L(e.row.original);
65
+ }
66
+ }),
67
+ k(B.FmButton, {
68
+ variant: "tertiary",
69
+ icon: "delete",
70
+ iconColor: "neutral-gray-400",
71
+ onClick: (t) => {
72
+ t.stopPropagation(), S(e.row.original);
73
+ }
74
+ })
75
+ ]);
76
+ }
77
+ }
78
+ ], h = P();
79
+ async function S(e) {
80
+ await W.remove(`Are you sure you want to remove ${e.name}?`) && await F(
81
+ async () => {
82
+ await u.delete(e._id), await p.read("POINT");
83
+ },
84
+ {
85
+ message: `Removing ${e.name}`,
86
+ successMessage: `Removed ${e.name} successfully`
87
+ }
88
+ );
89
+ }
90
+ async function g(e) {
91
+ e ? await t() : N.open(async (l) => {
92
+ await t(l);
93
+ });
94
+ async function t(l) {
95
+ var i;
96
+ (i = h.value) == null || i.showSheet(
97
+ !0,
98
+ "POINT",
99
+ e ? await u.readById(e._id) : void 0,
100
+ l
101
+ );
102
+ }
103
+ }
104
+ async function L(e) {
105
+ var i;
106
+ if (!await te(e.name))
107
+ return;
108
+ const t = await u.readById(e._id), l = oe(t, {
109
+ keepCollectible: !0
110
+ });
111
+ (i = h.value) == null || i.showSheet(
112
+ !0,
113
+ "POINT",
114
+ l,
115
+ t.template
116
+ );
117
+ }
118
+ async function A(e) {
119
+ await F(
120
+ async () => {
121
+ e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await p.read("POINT");
122
+ },
123
+ {
124
+ message: r("connect.program.common.update.updating", {
125
+ type: r("connect.program.experience.title")
126
+ }),
127
+ successMessage: r("connect.program.common.update.success", {
128
+ type: r("connect.program.experience.title"),
129
+ action: e.campaign._id ? "updated" : "created"
130
+ })
131
+ }
132
+ );
133
+ }
134
+ return q(async () => {
135
+ await D(async () => {
136
+ await p.read("POINT");
137
+ });
138
+ }), (e, t) => {
139
+ const l = m("FmPageHead"), i = m("FmSearch"), R = m("FmTable"), x = m("FmButton"), j = m("FmListItem"), E = m("FmList"), U = m("FmCard");
140
+ return d(), w(C, null, [
141
+ s(l, {
142
+ title: o(r)("connect.program.experience.title"),
143
+ actions: o(f).length > 0 ? [T] : [],
144
+ "onClick:action": t[0] || (t[0] = () => g())
145
+ }, null, 8, ["title", "actions"]),
146
+ n("div", se, [
147
+ s(i, {
148
+ modelValue: o(c).searchKey,
149
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
150
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
151
+ placeholder: o(r)("connect.program.common.search"),
152
+ collapsible: ""
153
+ }, null, 8, ["modelValue", "placeholder"]),
154
+ o(p).campaigns.experience && o(p).campaigns.experience.length > 0 ? (d(), w(C, { key: 0 }, [
155
+ n("div", ce, [
156
+ n("div", le, [
157
+ s(ne, {
158
+ label: `${o(r)("connect.common.location")}: `,
159
+ "right-icon": "keyboard_arrow_down",
160
+ modelValue: o(c).location,
161
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
162
+ icon: "storefront",
163
+ "show-item-label": !0,
164
+ items: o($).locationOptions
165
+ }, null, 8, ["label", "modelValue", "items"])
166
+ ]),
167
+ s(i, {
168
+ modelValue: o(c).searchKey,
169
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
170
+ class: "xs:hidden sm:hidden",
171
+ placeholder: "search",
172
+ collapsible: ""
173
+ }, null, 8, ["modelValue"])
174
+ ]),
175
+ s(R, {
176
+ class: "xs:hidden sm:hidden",
177
+ "row-data": o(f),
178
+ "column-defs": O,
179
+ "search-value": o(c).searchKey,
180
+ "column-filter": [],
181
+ onRowClick: t[4] || (t[4] = (a) => g(a.original)),
182
+ "hide-footer": o(f).length < 10
183
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
184
+ s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
185
+ default: v(() => [
186
+ (d(!0), w(C, null, z(o(f).filter(
187
+ (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
188
+ ), (a) => (d(), b(j, {
189
+ key: a._id.toString(),
190
+ onClick: (y) => g(a),
191
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
192
+ }, {
193
+ default: v(() => [
194
+ n("div", me, [
195
+ n("div", pe, [
196
+ (d(), b(G(o(I)(a))))
197
+ ]),
198
+ n("div", de, [
199
+ n("div", ue, _(a.name), 1),
200
+ n("div", fe, _(o(V)(a)), 1)
201
+ ])
202
+ ]),
203
+ n("div", ge, [
204
+ s(x, {
205
+ icon: "content_copy",
206
+ "icon-color": "neutral-gray-400",
207
+ variant: "tertiary",
208
+ onClick: async (y) => {
209
+ y.stopPropagation(), await L(a);
210
+ }
211
+ }, null, 8, ["onClick"]),
212
+ s(x, {
213
+ icon: "delete",
214
+ "icon-color": "neutral-gray-400",
215
+ variant: "tertiary",
216
+ onClick: (y) => (y.stopPropagation(), S(a))
217
+ }, null, 8, ["onClick"])
218
+ ])
219
+ ]),
220
+ _: 2
221
+ }, 1032, ["onClick"]))), 128))
222
+ ]),
223
+ _: 1
224
+ })
225
+ ], 64)) : (d(), b(U, {
226
+ key: 1,
227
+ variant: "outlined",
228
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
229
+ }, {
230
+ default: v(() => [
231
+ t[6] || (t[6] = n("img", {
232
+ src: J,
233
+ class: "aspect-square w-[150px]"
234
+ }, null, -1)),
235
+ n("div", ye, [
236
+ n("div", _e, _(o(r)("connect.program.experience.empty_state.title")), 1),
237
+ n("div", he, _(o(r)("connect.program.experience.empty_state.description")), 1)
238
+ ]),
239
+ s(x, {
240
+ variant: "primary",
241
+ label: "Create experience program",
242
+ icon: "add",
243
+ onClick: t[5] || (t[5] = (a) => g())
244
+ })
245
+ ]),
246
+ _: 1
247
+ })),
248
+ s(re, {
249
+ ref_key: "sheetRef",
250
+ ref: h,
251
+ "onSubmit:modelValue": A
252
+ }, null, 512)
253
+ ])
254
+ ], 64);
255
+ };
256
+ }
257
+ });
258
+ export {
259
+ $e as default
260
+ };
@@ -1,4 +1,4 @@
1
- import { c as s } from "./_commonjsHelpers-BkfeUUK-.js";
1
+ import { c as s } from "./app-D5GVWKxc.js";
2
2
  var E = { exports: {} };
3
3
  (function(h, j) {
4
4
  (function(p, i) {