@feedmepos/mf-connect 0.1.98-beta.39 → 0.1.98-beta.40

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 (151) hide show
  1. package/package.json +1 -1
  2. package/dist/App-DwjQisFZ.js +0 -4785
  3. package/dist/AuditLogs-DMGqmriL.js +0 -2014
  4. package/dist/Bin-4wvIqogM.js +0 -166
  5. package/dist/Broadcast-DPpuSZ8_.js +0 -269
  6. package/dist/CampaignAnalytic-CXFDo2X_.js +0 -1826
  7. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-SLoy1-Kd.js +0 -122
  8. package/dist/Card-C8SA6un0.js +0 -911
  9. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  10. package/dist/Collections-BCpSiM_4.js +0 -541
  11. package/dist/Credit-C8RTBpP7.js +0 -286
  12. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js +0 -3382
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CJTduNh3.js +0 -351
  16. package/dist/Experience-Bg3kFQQE.js +0 -285
  17. package/dist/FileSaver.min-DMUuMi9w.js +0 -74
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  19. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
  20. package/dist/Game-D3DbkRUj.js +0 -356
  21. package/dist/GiftCardSetup-CxlMM4up.js +0 -542
  22. package/dist/Grab-DvEK8ixP.js +0 -301
  23. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BBK-UrEe.js +0 -145
  24. package/dist/Index-Do_9DXuY.js +0 -259
  25. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  26. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BKPGBYiU.js +0 -48
  27. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-D6wJN9Gj.js +0 -18737
  28. package/dist/LoyaltyDashboard-B4WqycGN.js +0 -1345
  29. package/dist/MainLayout-DdxLaufS.js +0 -143
  30. package/dist/Marketing-CcFEMwKB.js +0 -236
  31. package/dist/MarketingMaterialEdit-DoYFaMf7.js +0 -1036
  32. package/dist/Member-BussgBln.js +0 -281
  33. package/dist/MemberList-BXJxSsjo.js +0 -1603
  34. package/dist/MemberOverview-wL_ailso.js +0 -58
  35. package/dist/MemberTransactions-O-XY5nz3.js +0 -45
  36. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DsxrIO0r.js +0 -60957
  37. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +0 -38
  38. package/dist/Mission-CPkM-8Ns.js +0 -360
  39. package/dist/Overview-BJjpYUJN.js +0 -1080
  40. package/dist/Overview-C5KF_Jxj.js +0 -1316
  41. package/dist/Point-FDFwR3Hk.js +0 -288
  42. package/dist/Promotion-qtucKxn0.js +0 -423
  43. package/dist/Queue-d91tocPX.js +0 -261
  44. package/dist/Record-CvkK2iLq.js +0 -342
  45. package/dist/Review-C_zLGtzU.js +0 -45
  46. package/dist/ReviewFacebookCallback-Bidg3P76.js +0 -238
  47. package/dist/ReviewGoogleCallback-DL0lxMBL.js +0 -213
  48. package/dist/Reward-BTsQaI-J.js +0 -442
  49. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BjxA4eMX.js +0 -150
  50. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D4NIDc-C.js +0 -1913
  51. package/dist/Segment-BgFyB3BK.js +0 -1017
  52. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CkhjFNvZ.js +0 -181
  53. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-HYbRyACe.js +0 -189
  54. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-7dv3cAW3.js +0 -226
  55. package/dist/Setting-BxHoCSxw.js +0 -2047
  56. package/dist/SettingAdvertisements-WfvuE4fA.js +0 -264
  57. package/dist/Settings-B42SAvEx.js +0 -179
  58. package/dist/Store-BnvWfCy-.js +0 -2413
  59. package/dist/StoreRewards-BRzAMqR-.js +0 -540
  60. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C3FJr1L5.js +0 -1075
  61. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-UZYzUcif.js +0 -7007
  62. package/dist/Tier-BrzLNat2.js +0 -972
  63. package/dist/Title-EnlaNXld.js +0 -569
  64. package/dist/Transaction-BiXNxUGX.js +0 -39
  65. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Db5_DKQ0.js +0 -130
  66. package/dist/Voucher-C2dyk-jj.js +0 -444
  67. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DPE24a-J.js +0 -421
  68. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CI1HM9HA.js +0 -56
  69. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  70. package/dist/app-Bt8HrAEr.js +0 -60740
  71. package/dist/app-wDQR6dpb.js +0 -39
  72. package/dist/app.js +0 -7
  73. package/dist/business-BwtQpfUr.js +0 -82
  74. package/dist/campaign-B6U9lwKi.js +0 -255
  75. package/dist/campaign-C6Cb9s3C.js +0 -100
  76. package/dist/campaign-CpzFl8Vr.js +0 -4
  77. package/dist/campaign.enum-Dx-Zo68Q.js +0 -26
  78. package/dist/campaign.fn-B0x2EGhw.js +0 -776
  79. package/dist/collectible.enum-Liy2wH3s.js +0 -19
  80. package/dist/collection.fn-DfoA9sJV.js +0 -26
  81. package/dist/duplicateCampaign-Cnq5N-V8.js +0 -51
  82. package/dist/effect-B2REbrv8.js +0 -89
  83. package/dist/email-addresses-BzmOsxLn.js +0 -705
  84. package/dist/export-jHpRhPQu.js +0 -97
  85. package/dist/feedme.ico +0 -0
  86. package/dist/google-C3S8u0mT.js +0 -4
  87. package/dist/helper-DQAHX1kX.js +0 -86
  88. package/dist/index-4GG-yjdN.js +0 -2963
  89. package/dist/index-BWgMbKOB.js +0 -85
  90. package/dist/index-BccUpf0U.js +0 -3
  91. package/dist/index-BkgkJkVs.js +0 -8919
  92. package/dist/index-C0PKVTf9.js +0 -32
  93. package/dist/index-C8cXXcLk.js +0 -45
  94. package/dist/index-CTTGf4TM.js +0 -151
  95. package/dist/index-C_H8jFYf.js +0 -2743
  96. package/dist/index-CuvNtC_M.js +0 -61
  97. package/dist/index-DJN4auwx.js +0 -146
  98. package/dist/index-DMr9ohGV.js +0 -1139
  99. package/dist/index-DQTo_ytu.js +0 -31
  100. package/dist/index-DW7-0rf_.js +0 -53
  101. package/dist/index-Da7J83jM.js +0 -2706
  102. package/dist/index-Di1Z4vLS.js +0 -27550
  103. package/dist/index-FoKZGh7Z.js +0 -67
  104. package/dist/index-N25Px7RQ.js +0 -72
  105. package/dist/index-PgblELTo.js +0 -897
  106. package/dist/index-STBMTK1u.js +0 -28900
  107. package/dist/index-hP3Mgc0u.js +0 -55
  108. package/dist/index-vh86FiIQ.js +0 -10
  109. package/dist/index.esm2017-DV56jzfJ.js +0 -3069
  110. package/dist/loading-D__sDcq1.js +0 -72
  111. package/dist/lodash-DgkDIHoV.js +0 -3678
  112. package/dist/membership-CBjt1MGx.js +0 -255
  113. package/dist/moment-D7p2TMB-.js +0 -2583
  114. package/dist/money-BFUbPKDM.js +0 -15
  115. package/dist/number-CJb8OUa3.js +0 -12
  116. package/dist/object-BYyQ0PZp.js +0 -18
  117. package/dist/objectId-dwaoBfJX.js +0 -7
  118. package/dist/objectid-BMUFNR9T.js +0 -145
  119. package/dist/plugins-D95ZeD-9.js +0 -1788
  120. package/dist/remy-Qz_pNsUS.js +0 -13
  121. package/dist/reward-CSfV_XFK.js +0 -36
  122. package/dist/rule-DIzVHy2z.js +0 -1969
  123. package/dist/rule-builder-DF7fCvec.js +0 -126
  124. package/dist/string-Gcy5IM_H.js +0 -32
  125. package/dist/style.css +0 -4
  126. package/dist/template-r3lAQP1B.js +0 -188
  127. package/dist/tier-BJDhpH6X.js +0 -4
  128. package/dist/tiers/tier=1.png +0 -0
  129. package/dist/tiers/tier=2.png +0 -0
  130. package/dist/tiers/tier=3.png +0 -0
  131. package/dist/tiers/tier=4.png +0 -0
  132. package/dist/timezone-D40qRUoz.js +0 -20
  133. package/dist/titles/type=diamond.png +0 -0
  134. package/dist/titles/type=drinks.png +0 -0
  135. package/dist/titles/type=food.png +0 -0
  136. package/dist/titles/type=heart.png +0 -0
  137. package/dist/titles/type=medal.png +0 -0
  138. package/dist/titles/type=spend.png +0 -0
  139. package/dist/titles/type=thank-you.png +0 -0
  140. package/dist/titles/type=thumbs-up.png +0 -0
  141. package/dist/titles/type=years.png +0 -0
  142. package/dist/transaction.fn-DV-cpfOj.js +0 -64
  143. package/dist/trigger-BEJaSv5R.js +0 -213
  144. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  145. package/dist/type_drinks-D6jnpvwV.js +0 -4
  146. package/dist/useMarketingMaterialActions-Bd5BDfE1.js +0 -96
  147. package/dist/usePagination-DLIo76-X.js +0 -220
  148. package/dist/user-DtEjuhyM.js +0 -55
  149. package/dist/vue-i18n-dQ1XCaUv.js +0 -2365
  150. package/dist/xlsx-BUMZsTov.js +0 -15491
  151. package/dist/zod-B_pVZhsV.js +0 -91
@@ -1,351 +0,0 @@
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-Bt8HrAEr.js";
3
- import { Z as r } from "./zod-B_pVZhsV.js";
4
- import { d as oe, c as ae } from "./index-BkgkJkVs.js";
5
- import { u as I } from "./vue-i18n-dQ1XCaUv.js";
6
- import { s as g } from "./effect-B2REbrv8.js";
7
- import { p as ne } from "./plugins-D95ZeD-9.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
- ), S = G(
55
- () => i.forCredit ? oe : ae
56
- ), y = G(() => {
57
- const m = S.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 S = x("FmSwitch"), y = x("FmStepperField");
176
- return d(), b("div", ue, [
177
- t.isMission ? f("", !0) : (d(), u(S, {
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 S = 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(g)(t.modelValue)) == null ? void 0 : o.type), 1),
308
- k("div", ye, V((D = e(g)(t.modelValue)) == null ? void 0 : D.adjustment) + " " + V(e(n)("connect.effect.with")) + " " + V((A = e(g)(t.modelValue)) == null ? void 0 : A.requirements) + " " + V((U = e(g)(t.modelValue)) == null ? void 0 : U.maxCap), 1),
309
- (m = e(g)(t.modelValue)) != null && m.posHint ? (d(), b("div", Ve, V((s = e(g)(t.modelValue)) == null ? void 0 : s.posHint), 1)) : f("", !0)
310
- ]),
311
- h(S, {
312
- icon: "delete",
313
- "icon-color": "neutral-gray-400",
314
- variant: "tertiary",
315
- onClick: a
316
- })
317
- ])) : (d(), u(S, {
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
- };
@@ -1,285 +0,0 @@
1
- import { defineComponent as q, ref as B, computed as G, onMounted as X, resolveComponent as m, openBlock as u, createElementBlock as C, Fragment as v, createVNode as s, unref as o, createElementVNode as n, withCtx as b, renderList as Y, createBlock as k, resolveDynamicComponent as z, toDisplayString as h, h as w } from "vue";
2
- import { _ as J } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as Q, components as F } from "@feedmepos/ui-library";
4
- import { p as W } from "./plugins-D95ZeD-9.js";
5
- import { u as Z } from "./loading-D__sDcq1.js";
6
- import { u as ee } from "./business-BwtQpfUr.js";
7
- import { u as te } from "./campaign-C6Cb9s3C.js";
8
- import { b as V, c as T, a as oe } from "./campaign-B6U9lwKi.js";
9
- import { c as ae, p as ne } from "./duplicateCampaign-Cnq5N-V8.js";
10
- import { u as re } from "./vue-i18n-dQ1XCaUv.js";
11
- import { _ as ie } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
- import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js";
13
- import { u as ce } from "./template-r3lAQP1B.js";
14
- import "./index-BccUpf0U.js";
15
- import { useRouter as le } from "vue-router";
16
- import { c as f } from "./index-DJN4auwx.js";
17
- import { R as me } from "./app-Bt8HrAEr.js";
18
- const pe = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, ue = { class: "flex gap-8 overflow-x-auto" }, fe = { class: "space-y-8" }, ge = { class: "flex w-full gap-4 items-center" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex items-center gap-8" }, xe = { class: "flex flex-col gap-16 text-center" }, Ce = { class: "fm-typo-en-title-sm-800" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = /* @__PURE__ */ q({
19
- __name: "Experience",
20
- setup(be) {
21
- const { t: r } = re(), A = le(), N = {
22
- label: r("connect.program.common.actions.create", {
23
- type: r("connect.program.experience.title").toLowerCase()
24
- }),
25
- value: "create",
26
- isPrimary: !0,
27
- prependIcon: "add"
28
- }, R = ce("POINT", Q()), E = ee(), p = te(), { global: O, minor: P } = Z, c = B({
29
- searchKey: "",
30
- location: []
31
- });
32
- function $(e) {
33
- const t = c.value.location;
34
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
35
- var i;
36
- return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
37
- }) : e.targetLocation.includes(t);
38
- }
39
- const g = G(
40
- () => p.campaigns.experience.filter((e) => $(e))
41
- ), D = [
42
- {
43
- header: "Program title",
44
- accessorFn: (e) => e.name
45
- },
46
- {
47
- header: "Status",
48
- accessorFn: (e) => oe(e),
49
- cell(e) {
50
- return V(e.row.original);
51
- }
52
- },
53
- {
54
- header: "Summary",
55
- accessorFn: (e) => T(e)
56
- //v.effect,
57
- },
58
- {
59
- header: "Actions",
60
- cell(e) {
61
- return w("div", { class: "flex items-center gap-8 justify-end" }, [
62
- w(F.FmButton, {
63
- variant: "tertiary",
64
- icon: "insights",
65
- iconColor: "neutral-gray-400",
66
- onClick: async (t) => {
67
- t.stopPropagation(), await L(e.row.original);
68
- }
69
- }),
70
- w(F.FmButton, {
71
- variant: "tertiary",
72
- icon: "content_copy",
73
- iconColor: "neutral-gray-400",
74
- onClick: async (t) => {
75
- t.stopPropagation(), await I(e.row.original);
76
- }
77
- }),
78
- w(F.FmButton, {
79
- variant: "tertiary",
80
- icon: "delete",
81
- iconColor: "neutral-gray-400",
82
- onClick: (t) => {
83
- t.stopPropagation(), S(e.row.original);
84
- }
85
- })
86
- ]);
87
- }
88
- }
89
- ], x = B();
90
- async function S(e) {
91
- await W.remove(`Are you sure you want to remove ${e.name}?`) && await P(
92
- async () => {
93
- await f.delete(e._id), await p.read("POINT");
94
- },
95
- {
96
- message: `Removing ${e.name}`,
97
- successMessage: `Removed ${e.name} successfully`
98
- }
99
- );
100
- }
101
- async function y(e) {
102
- e ? await t() : R.open(async (l) => {
103
- await t(l);
104
- });
105
- async function t(l) {
106
- var i;
107
- (i = x.value) == null || i.showSheet(
108
- !0,
109
- "POINT",
110
- e ? await f.readById(e._id) : void 0,
111
- l
112
- );
113
- }
114
- }
115
- async function L(e) {
116
- await A.push({
117
- name: me["$connect-PROGRAM_EXPERIENCE_ANALYTIC"],
118
- params: { id: e._id }
119
- });
120
- }
121
- async function I(e) {
122
- var i;
123
- if (!await ae(e.name))
124
- return;
125
- const t = await f.readById(e._id), l = ne(t, {
126
- keepCollectible: !0
127
- });
128
- (i = x.value) == null || i.showSheet(
129
- !0,
130
- "POINT",
131
- l,
132
- t.template
133
- );
134
- }
135
- async function K(e) {
136
- await P(
137
- async () => {
138
- e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("POINT");
139
- },
140
- {
141
- message: r("connect.program.common.update.updating", {
142
- type: r("connect.program.experience.title")
143
- }),
144
- successMessage: r("connect.program.common.update.success", {
145
- type: r("connect.program.experience.title"),
146
- action: e.campaign._id ? "updated" : "created"
147
- })
148
- }
149
- );
150
- }
151
- return X(async () => {
152
- await O(async () => {
153
- await p.read("POINT");
154
- });
155
- }), (e, t) => {
156
- const l = m("FmPageHead"), i = m("FmSearch"), M = m("FmTable"), _ = m("FmButton"), U = m("FmListItem"), j = m("FmList"), H = m("FmCard");
157
- return u(), C(v, null, [
158
- s(l, {
159
- title: o(r)("connect.program.experience.title"),
160
- actions: o(g).length > 0 ? [N] : [],
161
- "onClick:action": t[0] || (t[0] = () => y())
162
- }, null, 8, ["title", "actions"]),
163
- n("div", pe, [
164
- s(i, {
165
- modelValue: o(c).searchKey,
166
- "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
167
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
168
- placeholder: o(r)("connect.program.common.search"),
169
- collapsible: ""
170
- }, null, 8, ["modelValue", "placeholder"]),
171
- o(p).campaigns.experience && o(p).campaigns.experience.length > 0 ? (u(), C(v, { key: 0 }, [
172
- n("div", de, [
173
- n("div", ue, [
174
- s(ie, {
175
- label: `${o(r)("connect.common.location")}: `,
176
- "right-icon": "keyboard_arrow_down",
177
- modelValue: o(c).location,
178
- "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
179
- icon: "storefront",
180
- "show-item-label": !0,
181
- items: o(E).locationOptions
182
- }, null, 8, ["label", "modelValue", "items"])
183
- ]),
184
- s(i, {
185
- modelValue: o(c).searchKey,
186
- "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
187
- class: "xs:hidden sm:hidden",
188
- placeholder: "search",
189
- collapsible: ""
190
- }, null, 8, ["modelValue"])
191
- ]),
192
- s(M, {
193
- class: "xs:hidden sm:hidden",
194
- "row-data": o(g),
195
- "column-defs": D,
196
- "search-value": o(c).searchKey,
197
- "column-filter": [],
198
- onRowClick: t[4] || (t[4] = (a) => y(a.original)),
199
- "hide-footer": o(g).length < 10
200
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
201
- s(j, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
202
- default: b(() => [
203
- (u(!0), C(v, null, Y(o(g).filter(
204
- (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
205
- ), (a) => (u(), k(U, {
206
- key: a._id.toString(),
207
- onClick: (d) => y(a),
208
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
209
- }, {
210
- default: b(() => [
211
- n("div", fe, [
212
- n("div", ge, [
213
- (u(), k(z(o(V)(a))))
214
- ]),
215
- n("div", ye, [
216
- n("div", _e, h(a.name), 1),
217
- n("div", he, h(o(T)(a)), 1)
218
- ])
219
- ]),
220
- n("div", we, [
221
- s(_, {
222
- icon: "insights",
223
- "icon-color": "neutral-gray-400",
224
- variant: "tertiary",
225
- onClick: async (d) => {
226
- d.stopPropagation(), await L(a);
227
- }
228
- }, null, 8, ["onClick"]),
229
- s(_, {
230
- icon: "content_copy",
231
- "icon-color": "neutral-gray-400",
232
- variant: "tertiary",
233
- onClick: async (d) => {
234
- d.stopPropagation(), await I(a);
235
- }
236
- }, null, 8, ["onClick"]),
237
- s(_, {
238
- icon: "delete",
239
- "icon-color": "neutral-gray-400",
240
- variant: "tertiary",
241
- onClick: (d) => (d.stopPropagation(), S(a))
242
- }, null, 8, ["onClick"])
243
- ])
244
- ]),
245
- _: 2
246
- }, 1032, ["onClick"]))), 128))
247
- ]),
248
- _: 1
249
- })
250
- ], 64)) : (u(), k(H, {
251
- key: 1,
252
- variant: "outlined",
253
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
254
- }, {
255
- default: b(() => [
256
- t[6] || (t[6] = n("img", {
257
- src: J,
258
- class: "aspect-square w-[150px]"
259
- }, null, -1)),
260
- n("div", xe, [
261
- n("div", Ce, h(o(r)("connect.program.experience.empty_state.title")), 1),
262
- n("div", ve, h(o(r)("connect.program.experience.empty_state.description")), 1)
263
- ]),
264
- s(_, {
265
- variant: "primary",
266
- label: "Create experience program",
267
- icon: "add",
268
- onClick: t[5] || (t[5] = (a) => y())
269
- })
270
- ]),
271
- _: 1
272
- })),
273
- s(se, {
274
- ref_key: "sheetRef",
275
- ref: x,
276
- "onSubmit:modelValue": K
277
- }, null, 512)
278
- ])
279
- ], 64);
280
- };
281
- }
282
- });
283
- export {
284
- Me as default
285
- };