@feedmepos/mf-connect 0.1.56-prod → 0.1.58-prod

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 (128) hide show
  1. package/package.json +1 -1
  2. package/dist/Analytic-XUI4rZyP.js +0 -427
  3. package/dist/App-vv5J1Ebe.js +0 -4630
  4. package/dist/Bin-D4V36uXK.js +0 -166
  5. package/dist/Broadcast-BvW27G77.js +0 -233
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2MC6Gy1.js +0 -121
  7. package/dist/Card-C7xLv1Fb.js +0 -911
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-BKfS-bGL.js +0 -458
  10. package/dist/Credit-CGmWQq0t.js +0 -228
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C2p6_R01.js +0 -2194
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGlaqjWp.js +0 -348
  14. package/dist/Experience-CT7Yab3W.js +0 -229
  15. package/dist/FileSaver.min-NlMItPOc.js +0 -74
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  17. package/dist/Game-DtW4rtYQ.js +0 -284
  18. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
  19. package/dist/Index-Bs5ob9Km.js +0 -259
  20. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  21. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
  22. package/dist/MainLayout-B1aJoR95.js +0 -41
  23. package/dist/Marketing-tA350rTd.js +0 -319
  24. package/dist/Member-CZoTXgKz.js +0 -279
  25. package/dist/MemberList-ChwyPtmW.js +0 -1607
  26. package/dist/MemberOverview-wL_ailso.js +0 -58
  27. package/dist/MemberTransactions-Cchtvxm9.js +0 -45
  28. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bo0EnHBx.js +0 -60553
  29. package/dist/Mission-DDpelLqN.js +0 -302
  30. package/dist/Overview-Da3ewBat.js +0 -1079
  31. package/dist/Point-CggE8VUk.js +0 -232
  32. package/dist/Promotion-DxvbZhgQ.js +0 -289
  33. package/dist/Queue-fIxlHrMd.js +0 -260
  34. package/dist/Record-Bv90_VUG.js +0 -341
  35. package/dist/Reward-BWYLk7aC.js +0 -442
  36. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CjYEtENe.js +0 -150
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ak1R8Y2a.js +0 -1763
  38. package/dist/Segment-_VGdBy3a.js +0 -882
  39. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-Dm4hF1n1.js +0 -181
  40. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DWDMhmNr.js +0 -188
  41. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Czy25PII.js +0 -147
  42. package/dist/Setting-7fTz1dJa.js +0 -1936
  43. package/dist/Store-TQHKR__B.js +0 -1842
  44. package/dist/StoreRewards-DZy1ZwiI.js +0 -423
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cae25Vr6.js +0 -995
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BVVEzpyP.js +0 -139
  47. package/dist/Tier-CK53vdbl.js +0 -895
  48. package/dist/Title-CGWPq_FF.js +0 -566
  49. package/dist/Transaction-DjJ03PfX.js +0 -39
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DNSdyxrF.js +0 -130
  51. package/dist/Voucher-D6RuJjNn.js +0 -384
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-D4iCOq3V.js +0 -419
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BFz8RvY_.js +0 -56
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  56. package/dist/app-BLlAxdVk.js +0 -57962
  57. package/dist/app-_rmIFJ8M.js +0 -7057
  58. package/dist/app-wDQR6dpb.js +0 -39
  59. package/dist/app.js +0 -6
  60. package/dist/business-gJ9fK_2b.js +0 -82
  61. package/dist/campaign-BfznfcHc.js +0 -94
  62. package/dist/campaign-C_Yq-ffV.js +0 -1810
  63. package/dist/campaign-CpzFl8Vr.js +0 -4
  64. package/dist/campaign.enum-Dsbpz7BO.js +0 -20
  65. package/dist/campaign.fn-C6vKb-lp.js +0 -758
  66. package/dist/collectible.enum-DNpj_oyC.js +0 -19
  67. package/dist/collection.fn-Cgo0sPL2.js +0 -26
  68. package/dist/dto-CaSQ4Pp9.js +0 -216
  69. package/dist/effect-DuH74x-N.js +0 -78
  70. package/dist/email-addresses-DXr-Qqt9.js +0 -705
  71. package/dist/export-tMPFlVV0.js +0 -97
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-CJTseW10.js +0 -71
  74. package/dist/index-8RETBwYy.js +0 -8861
  75. package/dist/index-B57kxqv7.js +0 -3
  76. package/dist/index-BNUuy_4R.js +0 -44
  77. package/dist/index-BSJ-4JYy.js +0 -146
  78. package/dist/index-BTpBLMHl.js +0 -3070
  79. package/dist/index-C6Iyn1Q6.js +0 -54
  80. package/dist/index-CWI06v9e.js +0 -31
  81. package/dist/index-CdnKwJuz.js +0 -30076
  82. package/dist/index-Cr_9Bqa1.js +0 -121
  83. package/dist/index-CuvNtC_M.js +0 -61
  84. package/dist/index-DTyfvK3U.js +0 -2130
  85. package/dist/index-Dn0gJspN.js +0 -32269
  86. package/dist/index-IHKkNyxb.js +0 -38
  87. package/dist/index-J3TDCX-5.js +0 -76
  88. package/dist/index-V9kRRAB1.js +0 -32
  89. package/dist/index-vh86FiIQ.js +0 -10
  90. package/dist/index.esm2017-P2nmohVw.js +0 -3069
  91. package/dist/loading-D5ZAAdUU.js +0 -71
  92. package/dist/lodash-B5I3zXaY.js +0 -3678
  93. package/dist/membership-xl9aKOQ_.js +0 -235
  94. package/dist/moment-D7p2TMB-.js +0 -2583
  95. package/dist/money-CIHN3jJZ.js +0 -15
  96. package/dist/number-BN4-Jdog.js +0 -12
  97. package/dist/object-qECH92oz.js +0 -26
  98. package/dist/objectId-dwaoBfJX.js +0 -7
  99. package/dist/objectid-Dh6RD0Tk.js +0 -145
  100. package/dist/plugins-CJlgzIv2.js +0 -208
  101. package/dist/reward-C8mezXzs.js +0 -36
  102. package/dist/rule-9VRIJFHZ.js +0 -1951
  103. package/dist/rule-builder-CZUgrDAw.js +0 -102
  104. package/dist/style.css +0 -4
  105. package/dist/template-aPJnNGLi.js +0 -190
  106. package/dist/tier-BJDhpH6X.js +0 -4
  107. package/dist/tiers/tier=1.png +0 -0
  108. package/dist/tiers/tier=2.png +0 -0
  109. package/dist/tiers/tier=3.png +0 -0
  110. package/dist/tiers/tier=4.png +0 -0
  111. package/dist/timezone-CpvXaiqq.js +0 -1151
  112. package/dist/titles/type=diamond.png +0 -0
  113. package/dist/titles/type=drinks.png +0 -0
  114. package/dist/titles/type=food.png +0 -0
  115. package/dist/titles/type=heart.png +0 -0
  116. package/dist/titles/type=medal.png +0 -0
  117. package/dist/titles/type=spend.png +0 -0
  118. package/dist/titles/type=thank-you.png +0 -0
  119. package/dist/titles/type=thumbs-up.png +0 -0
  120. package/dist/titles/type=years.png +0 -0
  121. package/dist/trigger-BfrtcBd-.js +0 -144
  122. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  123. package/dist/type_drinks-D6jnpvwV.js +0 -4
  124. package/dist/usePagination-Ds-cuHop.js +0 -223
  125. package/dist/user-Bt1C0yV5.js +0 -54
  126. package/dist/vue-i18n-OdHHHpEE.js +0 -2365
  127. package/dist/xlsx-BgB0dYfE.js +0 -15491
  128. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -1,348 +0,0 @@
1
- import { defineComponent as P, ref as O, onMounted as Q, computed as H, resolveComponent as y, openBlock as i, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as c, unref as e, isRef as q, createVNode as F, normalizeClass as G, watch as X, withCtx as b, resolveDynamicComponent as D, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-_rmIFJ8M.js";
3
- import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { f as le, g as oe } from "./index-8RETBwYy.js";
5
- import { u as Z } from "./vue-i18n-OdHHHpEE.js";
6
- import { s as R } from "./effect-DuH74x-N.js";
7
- import { p as ae } from "./plugins-CJlgzIv2.js";
8
- import { e as ne } from "./app-BLlAxdVk.js";
9
- const ie = { class: "flex flex-col gap-8" }, de = {
10
- key: 0,
11
- class: "fm-typo-en-body-lg-600"
12
- }, se = { 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: s } = Z(), l = t, S = g, o = [
45
- { label: s("connect.template.validity_option.date_range"), value: "range" },
46
- { label: s("connect.template.validity_option.custom"), value: "custom" }
47
- ], a = O(!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 = O(
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 d(p) {
62
- S("update:model-value", p);
63
- }
64
- function C(p) {
65
- var r, k;
66
- if (p.value == "range")
67
- return d({
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, d({
74
- validForDay: (k = l.modelValue) == null ? void 0 : k.validForDay
75
- });
76
- }
77
- return (p, r) => {
78
- var I, $, j, E, M, N, L, z;
79
- const k = y("FmButtonGroup"), Y = y("FmSimpleDateRangePicker"), J = y("FmSwitch"), K = y("FmStepperField"), T = y("FmHelperText");
80
- return i(), x("div", ie, [
81
- W(p.$slots, "label", {}, () => [
82
- t.label ? (i(), x("div", de, w(t.label), 1)) : v("", !0)
83
- ]),
84
- t.type ? v("", !0) : (i(), c(k, {
85
- key: 0,
86
- modelValue: e(n),
87
- "onUpdate:modelValue": [
88
- r[0] || (r[0] = (f) => q(n) ? n.value = f : null),
89
- r[1] || (r[1] = (f) => C(f))
90
- ],
91
- items: o
92
- }, null, 8, ["modelValue"])),
93
- e(n).value === "range" ? (i(), x("div", se, [
94
- F(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] = (f) => {
100
- var V;
101
- d({
102
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive,
103
- validAfter: new Date(f.startDate).toISOString(),
104
- validBefore: new Date(f.endDate).toISOString()
105
- });
106
- })
107
- }, null, 8, ["model-value"])
108
- ])) : e(n).value === "custom" ? (i(), x("div", me, [
109
- t.forCredit ? v("", !0) : (i(), c(J, {
110
- key: 0,
111
- "model-value": e(a),
112
- label: e(s)("connect.template.validity_option.expire"),
113
- "label-placement": "right",
114
- "onUpdate:modelValue": r[3] || (r[3] = (f) => {
115
- var V;
116
- a.value = f, d({
117
- validForDay: f ? 1 : void 0,
118
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
119
- });
120
- })
121
- }, null, 8, ["model-value", "label"])),
122
- e(a) || t.forCredit ? (i(), c(K, {
123
- key: 1,
124
- label: e(s)("connect.template.validity_option.after_day"),
125
- class: G([{
126
- "opacity-50 pointer-events-none": !e(a) && !t.forCredit
127
- }, "mt-[-4px]"]),
128
- "max-fraction-digits": 0,
129
- disabled: !e(a) && !t.forCredit,
130
- "show-steppers": !1,
131
- max: 99999,
132
- "append-text": e(s)("connect.template.validity_option.days"),
133
- "model-value": ((M = l.modelValue) == null ? void 0 : M.validForDay) ?? null,
134
- "onUpdate:modelValue": r[4] || (r[4] = (f) => {
135
- var V;
136
- return d({
137
- validForDay: f == null ? void 0 : parseInt(f.toString()),
138
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
139
- });
140
- })
141
- }, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : v("", !0)
142
- ])) : v("", !0),
143
- ((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (i(), c(T, {
144
- key: 3,
145
- text: e(s)("connect.template.validity_option.expire_follow_first_receive")
146
- }, null, 8, ["text"])) : v("", !0),
147
- F(T, {
148
- text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(s)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
149
- state: t.helperText ? "error" : ((z = l.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(u).helperState(e(m), "")
150
- }, null, 8, ["text", "state"])
151
- ]);
152
- };
153
- }
154
- }), ue = { class: "space-y-8" }, he = /* @__PURE__ */ P({
155
- __name: "CollectibleOptionInput",
156
- props: {
157
- modelValue: {
158
- type: Object
159
- },
160
- noCampaign: {
161
- type: Boolean
162
- },
163
- schema: {
164
- type: Object,
165
- default: () => te.any()
166
- },
167
- isMission: {
168
- type: Boolean,
169
- default: !1
170
- }
171
- },
172
- emits: ["update:model-value"],
173
- setup(t, { emit: g }) {
174
- const { t: s } = Z(), l = t, S = g, o = O(l.modelValue ?? {});
175
- return X(o, () => S("update:model-value", o.value)), (a, n) => {
176
- const h = y("FmSwitch"), m = y("FmStepperField");
177
- return i(), x("div", ue, [
178
- t.isMission ? v("", !0) : (i(), c(h, {
179
- key: 0,
180
- label: e(s)("connect.template.enable_transfer"),
181
- "label-placement": "right",
182
- modelValue: e(o).enableTransfer,
183
- "onUpdate:modelValue": n[0] || (n[0] = (d) => e(o).enableTransfer = d)
184
- }, null, 8, ["label", "modelValue"])),
185
- t.noCampaign ? v("", !0) : (i(), x("div", {
186
- key: 1,
187
- class: G(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
188
- }, [
189
- F(m, {
190
- modelValue: e(o).maxPerUser,
191
- "onUpdate:modelValue": n[1] || (n[1] = (d) => e(o).maxPerUser = d),
192
- "show-steppers": !1,
193
- rules: [e(u).ruleAtPath(t.schema, "maxPerUser")],
194
- "helper-text": e(s)("connect.template.leave_empty_unlimited")
195
- }, {
196
- label: b(() => [
197
- (i(), c(D(
198
- e(u).toInputLabel(
199
- e(u).typeAtPath(t.schema, "maxPerUser"),
200
- e(s)("connect.template.max_per_user")
201
- )
202
- )))
203
- ]),
204
- _: 1
205
- }, 8, ["modelValue", "rules", "helper-text"]),
206
- t.isMission ? v("", !0) : (i(), c(m, {
207
- key: 0,
208
- modelValue: e(o).maxReceive,
209
- "onUpdate:modelValue": n[2] || (n[2] = (d) => e(o).maxReceive = d),
210
- "show-steppers": !1,
211
- rules: [e(u).ruleAtPath(t.schema, "maxReceive")],
212
- "helper-text": e(s)("connect.template.leave_empty_unlimited")
213
- }, {
214
- label: b(() => [
215
- (i(), c(D(
216
- e(u).toInputLabel(
217
- e(u).typeAtPath(t.schema, "maxReceive"),
218
- e(s)("connect.template.max_distribute")
219
- )
220
- )))
221
- ]),
222
- _: 1
223
- }, 8, ["modelValue", "rules", "helper-text"]))
224
- ], 2)),
225
- t.isMission ? v("", !0) : (i(), x(_, { key: 2 }, [
226
- F(m, {
227
- modelValue: e(o).maxUse,
228
- "onUpdate:modelValue": n[3] || (n[3] = (d) => e(o).maxUse = d),
229
- "append-text": "use(s)",
230
- "show-steppers": !1,
231
- rules: [e(u).ruleAtPath(t.schema, "maxUse")]
232
- }, {
233
- label: b(() => [
234
- (i(), c(D(
235
- e(u).toInputLabel(
236
- e(u).typeAtPath(t.schema, "maxUse"),
237
- e(s)("connect.template.usage_count")
238
- )
239
- )))
240
- ]),
241
- _: 1
242
- }, 8, ["modelValue", "rules"]),
243
- e(o).maxUse && e(o).maxUse > 1 ? (i(), c(m, {
244
- key: 0,
245
- modelValue: e(o).cooldown,
246
- "onUpdate:modelValue": n[4] || (n[4] = (d) => e(o).cooldown = d),
247
- "append-text": "minute(s)",
248
- "show-steppers": !1,
249
- rules: [e(u).ruleAtPath(t.schema, "cooldown")]
250
- }, {
251
- label: b(() => [
252
- (i(), c(D(
253
- e(u).toInputLabel(
254
- e(u).typeAtPath(t.schema, "cooldown"),
255
- e(s)("connect.template.cooldown")
256
- )
257
- )))
258
- ]),
259
- _: 1
260
- }, 8, ["modelValue", "rules"])) : v("", !0),
261
- F(re, {
262
- modelValue: e(o).validityOption,
263
- "onUpdate:modelValue": n[5] || (n[5] = (d) => e(o).validityOption = d),
264
- label: e(s)("connect.template.validity_option.title")
265
- }, null, 8, ["modelValue", "label"])
266
- ], 64))
267
- ]);
268
- };
269
- }
270
- }), pe = { class: "space-y-8" }, ce = {
271
- key: 1,
272
- class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
273
- }, fe = { class: "fm-typo-en-body-lg-400" }, ve = { class: "text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ P({
274
- __name: "EffectSheet",
275
- props: {
276
- modelValue: { type: Object },
277
- canSetAutoApply: {
278
- type: Boolean
279
- }
280
- },
281
- emits: ["update:model-value"],
282
- setup(t, { emit: g }) {
283
- const s = g, l = O(!1);
284
- async function S(o) {
285
- o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && s("update:model-value", null);
286
- }
287
- return (o, a) => {
288
- const n = y("FmButton"), h = y("FmSideSheet");
289
- return i(), c(h, {
290
- "max-width": 550,
291
- header: "Apply discount",
292
- modelValue: e(l),
293
- "onUpdate:modelValue": [
294
- a[2] || (a[2] = (m) => q(l) ? l.value = m : null),
295
- a[3] || (a[3] = (m) => l.value = m)
296
- ]
297
- }, {
298
- "side-sheet-button": b(() => {
299
- var m, d, C, A;
300
- return [
301
- U("div", pe, [
302
- 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)),
303
- t.modelValue ? (i(), x("div", ce, [
304
- U("div", fe, [
305
- U("div", null, w((m = e(R)(t.modelValue)) == null ? void 0 : m.type), 1),
306
- U("div", ve, w((d = e(R)(t.modelValue)) == null ? void 0 : d.adjustment) + " with " + w((C = e(R)(t.modelValue)) == null ? void 0 : C.requirements) + " " + w((A = e(R)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
307
- ]),
308
- F(n, {
309
- icon: "delete",
310
- "icon-color": "neutral-gray-400",
311
- variant: "tertiary",
312
- onClick: S
313
- })
314
- ])) : (i(), c(n, {
315
- key: 0,
316
- label: "Apply discount",
317
- icon: "add",
318
- "icon-color": "primary",
319
- variant: "secondary",
320
- class: "border-fm-color-primary text-fm-color-primary"
321
- }))
322
- ])
323
- ];
324
- }),
325
- "side-sheet-footer": b(() => [...a[5] || (a[5] = [
326
- ee(w(void 0), -1)
327
- ])]),
328
- default: b(() => [
329
- F(e(ne), {
330
- class: "fm-effect-sheet",
331
- title: "",
332
- "can-set-auto-apply": t.canSetAutoApply,
333
- "disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
334
- "initial-value": t.modelValue,
335
- onOnConfirm: a[0] || (a[0] = (m) => (s("update:model-value", m), l.value = !1)),
336
- onOnCancel: a[1] || (a[1] = (m) => l.value = !1)
337
- }, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
338
- ]),
339
- _: 1
340
- }, 8, ["modelValue"]);
341
- };
342
- }
343
- });
344
- export {
345
- Ae as _,
346
- he as a,
347
- re as b
348
- };
@@ -1,229 +0,0 @@
1
- import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as x, createVNode as i, unref as o, createElementVNode as a, withCtx as h, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as u, h as q } from "vue";
2
- import { _ as z } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
- import { p as Q } from "./plugins-CJlgzIv2.js";
5
- import { u as W } from "./loading-D5ZAAdUU.js";
6
- import { u as X } from "./business-gJ9fK_2b.js";
7
- import { u as Y } from "./campaign-BfznfcHc.js";
8
- import { a as L, b as V, g as Z } from "./campaign-C_Yq-ffV.js";
9
- import { u as ee } from "./vue-i18n-OdHHHpEE.js";
10
- import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
- import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C2p6_R01.js";
12
- import { u as ne } from "./template-aPJnNGLi.js";
13
- import { c as g } from "./index-Cr_9Bqa1.js";
14
- const ae = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ E({
15
- __name: "Experience",
16
- setup(_e) {
17
- const { t: r } = ee(), P = {
18
- label: r("connect.program.common.actions.create", {
19
- type: r("connect.program.experience.title").toLowerCase()
20
- }),
21
- value: "create",
22
- isPrimary: !0,
23
- prependIcon: "add"
24
- }, B = ne("POINT", G()), I = X(), d = Y(), { global: T, minor: v } = W, s = S({
25
- searchKey: "",
26
- location: []
27
- });
28
- function $(e) {
29
- const t = s.value.location;
30
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
31
- var c;
32
- return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
33
- }) : e.targetLocation.includes(t);
34
- }
35
- const f = U(
36
- () => d.campaigns.experience.filter((e) => $(e))
37
- ), K = [
38
- {
39
- header: "Program title",
40
- accessorFn: (e) => e.name
41
- },
42
- {
43
- header: "Status",
44
- accessorFn: (e) => Z(e),
45
- cell(e) {
46
- return L(e.row.original);
47
- }
48
- },
49
- {
50
- header: "Summary",
51
- accessorFn: (e) => V(e)
52
- //v.effect,
53
- },
54
- {
55
- header: "Actions",
56
- cell(e) {
57
- return q(J.FmButton, {
58
- variant: "tertiary",
59
- icon: "delete",
60
- iconColor: "neutral-gray-400",
61
- onClick: (t) => {
62
- t.stopPropagation(), C(e.row.original);
63
- }
64
- });
65
- }
66
- }
67
- ], b = S();
68
- async function C(e) {
69
- await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
70
- async () => {
71
- await g.delete(e._id), await d.read("POINT");
72
- },
73
- {
74
- message: `Removing ${e.name}`,
75
- successMessage: `Removed ${e.name} successfully`
76
- }
77
- );
78
- }
79
- async function y(e) {
80
- e ? await t() : B.open(async (l) => {
81
- await t(l);
82
- });
83
- async function t(l) {
84
- var c;
85
- (c = b.value) == null || c.showSheet(
86
- !0,
87
- "POINT",
88
- e ? await g.readById(e._id) : void 0,
89
- l
90
- );
91
- }
92
- }
93
- async function N(e) {
94
- await v(
95
- async () => {
96
- e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await d.read("POINT");
97
- },
98
- {
99
- message: r("connect.program.common.update.updating", {
100
- type: r("connect.program.experience.title")
101
- }),
102
- successMessage: r("connect.program.common.update.success", {
103
- type: r("connect.program.experience.title"),
104
- action: e.campaign._id ? "updated" : "created"
105
- })
106
- }
107
- );
108
- }
109
- return j(async () => {
110
- await T(async () => {
111
- await d.read("POINT");
112
- });
113
- }), (e, t) => {
114
- const l = m("FmPageHead"), c = m("FmSearch"), R = m("FmTable"), F = m("FmButton"), A = m("FmListItem"), O = m("FmList"), D = m("FmCard");
115
- return p(), _(x, null, [
116
- i(l, {
117
- title: o(r)("connect.program.experience.title"),
118
- actions: o(f).length > 0 ? [P] : [],
119
- "onClick:action": t[0] || (t[0] = () => y())
120
- }, null, 8, ["title", "actions"]),
121
- a("div", ae, [
122
- i(c, {
123
- modelValue: o(s).searchKey,
124
- "onUpdate:modelValue": t[1] || (t[1] = (n) => o(s).searchKey = n),
125
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
126
- placeholder: o(r)("connect.program.common.search"),
127
- collapsible: ""
128
- }, null, 8, ["modelValue", "placeholder"]),
129
- o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(x, { key: 0 }, [
130
- a("div", re, [
131
- a("div", se, [
132
- i(te, {
133
- label: `${o(r)("connect.common.location")}: `,
134
- "right-icon": "keyboard_arrow_down",
135
- modelValue: o(s).location,
136
- "onUpdate:modelValue": t[2] || (t[2] = (n) => o(s).location = n),
137
- icon: "storefront",
138
- "show-item-label": !0,
139
- items: o(I).locationOptions
140
- }, null, 8, ["label", "modelValue", "items"])
141
- ]),
142
- i(c, {
143
- modelValue: o(s).searchKey,
144
- "onUpdate:modelValue": t[3] || (t[3] = (n) => o(s).searchKey = n),
145
- class: "xs:hidden",
146
- placeholder: "search",
147
- collapsible: ""
148
- }, null, 8, ["modelValue"])
149
- ]),
150
- i(R, {
151
- class: "xs:hidden",
152
- "row-data": o(f),
153
- "column-defs": K,
154
- "search-value": o(s).searchKey,
155
- "column-filter": [],
156
- onRowClick: t[4] || (t[4] = (n) => y(n.original)),
157
- "hide-footer": o(f).length < 10
158
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
159
- i(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
160
- default: h(() => [
161
- (p(!0), _(x, null, M(o(f).filter(
162
- (n) => n.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
163
- ), (n) => (p(), w(A, {
164
- key: n._id.toString(),
165
- onClick: (k) => y(n),
166
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
167
- }, {
168
- default: h(() => [
169
- a("div", ie, [
170
- a("div", ce, [
171
- (p(), w(H(o(L)(n)))),
172
- a("div", le, u(n.currentReceive ?? 0) + " used ", 1)
173
- ]),
174
- a("div", me, [
175
- a("div", de, u(n.name), 1),
176
- a("div", pe, u(o(V)(n)), 1)
177
- ]),
178
- a("div", ue, u(o(r)("connect.program.experience.received", {
179
- count: n.currentReceive ?? 0
180
- })), 1)
181
- ]),
182
- i(F, {
183
- icon: "delete",
184
- "icon-color": "neutral-gray-400",
185
- variant: "tertiary",
186
- onClick: (k) => (k.stopPropagation(), C(n))
187
- }, null, 8, ["onClick"])
188
- ]),
189
- _: 2
190
- }, 1032, ["onClick"]))), 128))
191
- ]),
192
- _: 1
193
- })
194
- ], 64)) : (p(), w(D, {
195
- key: 1,
196
- variant: "outlined",
197
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
198
- }, {
199
- default: h(() => [
200
- t[6] || (t[6] = a("img", {
201
- src: z,
202
- class: "aspect-square w-[150px]"
203
- }, null, -1)),
204
- a("div", fe, [
205
- a("div", ye, u(o(r)("connect.program.experience.empty_state.title")), 1),
206
- a("div", ge, u(o(r)("connect.program.experience.empty_state.description")), 1)
207
- ]),
208
- i(F, {
209
- variant: "primary",
210
- label: "Create experience program",
211
- icon: "add",
212
- onClick: t[5] || (t[5] = (n) => y())
213
- })
214
- ]),
215
- _: 1
216
- })),
217
- i(oe, {
218
- ref_key: "sheetRef",
219
- ref: b,
220
- "onSubmit:modelValue": N
221
- }, null, 512)
222
- ])
223
- ], 64);
224
- };
225
- }
226
- });
227
- export {
228
- Ie as default
229
- };
@@ -1,74 +0,0 @@
1
- import { c as s } from "./_commonjsHelpers-BkfeUUK-.js";
2
- var E = { exports: {} };
3
- (function(h, j) {
4
- (function(p, i) {
5
- i();
6
- })(s, function() {
7
- function p(e, t) {
8
- return typeof t > "u" ? t = { autoBom: !1 } : typeof t != "object" && (console.warn("Deprecated: Expected third argument to be a object"), t = { autoBom: !t }), t.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
9
- }
10
- function i(e, t, r) {
11
- var n = new XMLHttpRequest();
12
- n.open("GET", e), n.responseType = "blob", n.onload = function() {
13
- u(n.response, t, r);
14
- }, n.onerror = function() {
15
- console.error("could not download file");
16
- }, n.send();
17
- }
18
- function v(e) {
19
- var t = new XMLHttpRequest();
20
- t.open("HEAD", e, !1);
21
- try {
22
- t.send();
23
- } catch {
24
- }
25
- return 200 <= t.status && 299 >= t.status;
26
- }
27
- function l(e) {
28
- try {
29
- e.dispatchEvent(new MouseEvent("click"));
30
- } catch {
31
- var t = document.createEvent("MouseEvents");
32
- t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
33
- }
34
- }
35
- var a = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof s == "object" && s.global === s ? s : void 0, w = a.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), u = a.saveAs || (typeof window != "object" || window !== a ? function() {
36
- } : "download" in HTMLAnchorElement.prototype && !w ? function(e, t, r) {
37
- var n = a.URL || a.webkitURL, o = document.createElement("a");
38
- t = t || e.name || "download", o.download = t, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin === location.origin ? l(o) : v(o.href) ? i(e, t, r) : l(o, o.target = "_blank")) : (o.href = n.createObjectURL(e), setTimeout(function() {
39
- n.revokeObjectURL(o.href);
40
- }, 4e4), setTimeout(function() {
41
- l(o);
42
- }, 0));
43
- } : "msSaveOrOpenBlob" in navigator ? function(e, t, r) {
44
- if (t = t || e.name || "download", typeof e != "string") navigator.msSaveOrOpenBlob(p(e, r), t);
45
- else if (v(e)) i(e, t, r);
46
- else {
47
- var n = document.createElement("a");
48
- n.href = e, n.target = "_blank", setTimeout(function() {
49
- l(n);
50
- });
51
- }
52
- } : function(e, t, r, n) {
53
- if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string") return i(e, t, r);
54
- var o = e.type === "application/octet-stream", b = /constructor/i.test(a.HTMLElement) || a.safari, m = /CriOS\/[\d]+/.test(navigator.userAgent);
55
- if ((m || o && b || w) && typeof FileReader < "u") {
56
- var d = new FileReader();
57
- d.onloadend = function() {
58
- var c = d.result;
59
- c = m ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location = c, n = null;
60
- }, d.readAsDataURL(e);
61
- } else {
62
- var y = a.URL || a.webkitURL, f = y.createObjectURL(e);
63
- n ? n.location = f : location.href = f, n = null, setTimeout(function() {
64
- y.revokeObjectURL(f);
65
- }, 4e4);
66
- }
67
- });
68
- a.saveAs = u.saveAs = u, h.exports = u;
69
- });
70
- })(E);
71
- var R = E.exports;
72
- export {
73
- R as F
74
- };