@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.60

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 (130) hide show
  1. package/package.json +13 -5
  2. package/dist/Analytic-NBx32reB.js +0 -761
  3. package/dist/App-CaK9PvMd.js +0 -4632
  4. package/dist/AuditLogs-C-gCCPvF.js +0 -1887
  5. package/dist/Bin-CL6o1JSs.js +0 -166
  6. package/dist/Broadcast-B2-itjvZ.js +0 -227
  7. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js +0 -121
  8. package/dist/Card-DNdEjt6s.js +0 -905
  9. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  10. package/dist/Collections-DepGq6WJ.js +0 -465
  11. package/dist/Credit-D7K0gFwc.js +0 -222
  12. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
  16. package/dist/Experience-FlBX3eyN.js +0 -223
  17. package/dist/FileSaver.min-NlMItPOc.js +0 -74
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  19. package/dist/Game-Cc3D7lKV.js +0 -278
  20. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  21. package/dist/Index-2wokhhFB.js +0 -259
  22. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  23. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
  24. package/dist/MainLayout-B1aJoR95.js +0 -41
  25. package/dist/Marketing-D7PXYloN.js +0 -20073
  26. package/dist/Member-2xV4Izwa.js +0 -279
  27. package/dist/MemberList-CYgBdyJt.js +0 -1606
  28. package/dist/MemberOverview-wL_ailso.js +0 -58
  29. package/dist/MemberTransactions-DWDV01N4.js +0 -45
  30. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js +0 -60343
  31. package/dist/Mission-BSGc9822.js +0 -296
  32. package/dist/Overview-BZjto86d.js +0 -1079
  33. package/dist/Point-0U4TTdPW.js +0 -226
  34. package/dist/Promotion-DiUa0GcV.js +0 -289
  35. package/dist/Queue-D62r2qjy.js +0 -260
  36. package/dist/Record-0iF3dG7y.js +0 -341
  37. package/dist/Reward-C5IEJYu6.js +0 -442
  38. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js +0 -150
  39. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
  40. package/dist/Segment-BknjBrUP.js +0 -882
  41. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js +0 -181
  42. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js +0 -188
  43. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js +0 -147
  44. package/dist/Setting-RLI7RgmN.js +0 -1936
  45. package/dist/Store-gxmv8hWJ.js +0 -1842
  46. package/dist/StoreRewards-C_6gY_Nk.js +0 -423
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
  49. package/dist/Tier-B168DtFj.js +0 -888
  50. package/dist/Title-uH0RI1N3.js +0 -565
  51. package/dist/Transaction-Bx-pmLrJ.js +0 -39
  52. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js +0 -130
  53. package/dist/Voucher-Dzpz2AEB.js +0 -384
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
  55. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js +0 -56
  56. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  57. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  58. package/dist/app-B90wINOO.js +0 -33357
  59. package/dist/app-DuUxQ1ZP.js +0 -7086
  60. package/dist/app-wDQR6dpb.js +0 -39
  61. package/dist/app.js +0 -7
  62. package/dist/business-B65OtB5B.js +0 -79
  63. package/dist/campaign-CpzFl8Vr.js +0 -4
  64. package/dist/campaign-iKI-L84v.js +0 -1810
  65. package/dist/campaign-qGy6uzrC.js +0 -96
  66. package/dist/campaign.enum-CZp2DmXI.js +0 -20
  67. package/dist/campaign.fn-DKScnmjX.js +0 -758
  68. package/dist/collectible.enum-CN-lnG1m.js +0 -19
  69. package/dist/collection.fn-mMwGQWce.js +0 -26
  70. package/dist/dto-C5ri8Nws.js +0 -214
  71. package/dist/effect-Bg3yb9T6.js +0 -78
  72. package/dist/email-addresses-CQsN724N.js +0 -705
  73. package/dist/export-BLf2dhFd.js +0 -97
  74. package/dist/feedme.ico +0 -0
  75. package/dist/helper-CFaph16Q.js +0 -71
  76. package/dist/index-BBPIZjw6.js +0 -31
  77. package/dist/index-BCGDOgxb.js +0 -38
  78. package/dist/index-BCPBmANe.js +0 -3120
  79. package/dist/index-BKOgzVx6.js +0 -32
  80. package/dist/index-BN2Uyvj4.js +0 -30038
  81. package/dist/index-BPZtjcTm.js +0 -76
  82. package/dist/index-BPyac0fq.js +0 -56
  83. package/dist/index-BkySejFg.js +0 -54
  84. package/dist/index-CH2d_B8c.js +0 -121
  85. package/dist/index-CrbnfAk8.js +0 -8861
  86. package/dist/index-CsaQJMAR.js +0 -66
  87. package/dist/index-DJwQICyC.js +0 -146
  88. package/dist/index-DaEQgaiW.js +0 -2213
  89. package/dist/index-Dkmn0jmX.js +0 -32260
  90. package/dist/index-Dy5p_b1S.js +0 -3
  91. package/dist/index-vh86FiIQ.js +0 -10
  92. package/dist/index.esm2017-B9vJTKYg.js +0 -3069
  93. package/dist/loading-MEQuW9Xa.js +0 -71
  94. package/dist/lodash-B5I3zXaY.js +0 -3678
  95. package/dist/membership-Du79A0Pl.js +0 -235
  96. package/dist/moment-BWErdI6_.js +0 -2578
  97. package/dist/money-DXgYs2-R.js +0 -15
  98. package/dist/number-CBMkNZvH.js +0 -12
  99. package/dist/object-qECH92oz.js +0 -26
  100. package/dist/objectId-dwaoBfJX.js +0 -7
  101. package/dist/objectid-BeZTZYqi.js +0 -145
  102. package/dist/plugins-KiMuDTPp.js +0 -208
  103. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  104. package/dist/reward-ClX_lWcQ.js +0 -36
  105. package/dist/rule-BfidJ75Y.js +0 -1951
  106. package/dist/rule-builder-BTcZx77a.js +0 -89
  107. package/dist/style.css +0 -4
  108. package/dist/template-DPpMK30W.js +0 -190
  109. package/dist/tier-BJDhpH6X.js +0 -4
  110. package/dist/tiers/tier=1.png +0 -0
  111. package/dist/tiers/tier=2.png +0 -0
  112. package/dist/tiers/tier=3.png +0 -0
  113. package/dist/tiers/tier=4.png +0 -0
  114. package/dist/titles/type=diamond.png +0 -0
  115. package/dist/titles/type=drinks.png +0 -0
  116. package/dist/titles/type=food.png +0 -0
  117. package/dist/titles/type=heart.png +0 -0
  118. package/dist/titles/type=medal.png +0 -0
  119. package/dist/titles/type=spend.png +0 -0
  120. package/dist/titles/type=thank-you.png +0 -0
  121. package/dist/titles/type=thumbs-up.png +0 -0
  122. package/dist/titles/type=years.png +0 -0
  123. package/dist/trigger-DLp1bkZP.js +0 -144
  124. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  125. package/dist/type_drinks-D6jnpvwV.js +0 -4
  126. package/dist/usePagination-BeF5K3M7.js +0 -223
  127. package/dist/user-Cq9CGBHZ.js +0 -54
  128. package/dist/vue-i18n-COzqUgQy.js +0 -2365
  129. package/dist/xlsx-Be4bARvl.js +0 -15491
  130. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -1,347 +0,0 @@
1
- import { defineComponent as P, ref as C, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as O, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-DuUxQ1ZP.js";
3
- import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { f as le, g as oe } from "./index-CrbnfAk8.js";
5
- import { u as Z } from "./vue-i18n-COzqUgQy.js";
6
- import { s as R } from "./effect-Bg3yb9T6.js";
7
- import { p as ae } from "./plugins-KiMuDTPp.js";
8
- import { O as ne } from "./app-B90wINOO.js";
9
- const ie = { class: "flex flex-col gap-8" }, se = {
10
- key: 0,
11
- class: "fm-typo-en-body-lg-600"
12
- }, de = { key: 1 }, me = {
13
- key: 2,
14
- class: "space-y-16"
15
- }, re = /* @__PURE__ */ P({
16
- __name: "ValidityInput",
17
- props: {
18
- label: {
19
- type: String
20
- },
21
- disabled: {
22
- type: Boolean,
23
- default: !1
24
- },
25
- type: {
26
- type: String,
27
- default: void 0
28
- },
29
- modelValue: {
30
- type: Object,
31
- required: !0
32
- },
33
- forCredit: {
34
- type: Boolean,
35
- default: !1
36
- },
37
- helperText: {
38
- type: String
39
- }
40
- },
41
- emits: ["update:model-value"],
42
- setup(t, { emit: g }) {
43
- var A, B;
44
- const { t: d } = Z(), l = t, S = g, o = [
45
- { label: d("connect.template.validity_option.date_range"), value: "range" },
46
- { label: d("connect.template.validity_option.custom"), value: "custom" }
47
- ], a = C(!1);
48
- Q(() => {
49
- a.value = l.modelValue && Object.entries(l.modelValue).filter(
50
- ([p, r]) => p != "followFirstReceive" && r != null
51
- ).length > 0;
52
- });
53
- const n = C(
54
- l.type ? o.find((p) => p.value === l.type) : (A = l.modelValue) != null && A.validBefore || (B = l.modelValue) != null && B.validAfter ? o[0] : o[1]
55
- ), h = H(
56
- () => l.forCredit ? le : oe
57
- ), m = H(() => {
58
- const p = h.value.safeParse(l.modelValue);
59
- return p.success ? [] : p.error.errors;
60
- });
61
- function i(p) {
62
- S("update:model-value", p);
63
- }
64
- function k(p) {
65
- var r, D;
66
- if (p.value == "range")
67
- return i({
68
- followFirstReceive: (r = l.modelValue) == null ? void 0 : r.followFirstReceive,
69
- validAfter: void 0,
70
- validBefore: void 0
71
- });
72
- if (p.value == "custom")
73
- return a.value = !1, i({
74
- validForDay: (D = l.modelValue) == null ? void 0 : D.validForDay
75
- });
76
- }
77
- return (p, r) => {
78
- var I, $, j, E, M, N, L, z;
79
- const D = y("FmButtonGroup"), Y = y("FmSimpleDateRangePicker"), J = y("FmSwitch"), K = y("FmStepperField"), T = y("FmHelperText");
80
- return s(), x("div", ie, [
81
- W(p.$slots, "label", {}, () => [
82
- t.label ? (s(), x("div", se, w(t.label), 1)) : v("", !0)
83
- ]),
84
- t.type ? v("", !0) : (s(), f(D, {
85
- key: 0,
86
- modelValue: e(n),
87
- "onUpdate:modelValue": [
88
- r[0] || (r[0] = (c) => q(n) ? n.value = c : null),
89
- r[1] || (r[1] = (c) => k(c))
90
- ],
91
- items: o
92
- }, null, 8, ["modelValue"])),
93
- e(n).value === "range" ? (s(), x("div", de, [
94
- b(Y, {
95
- "model-value": {
96
- startDate: (I = t.modelValue) != null && I.validAfter ? new Date(($ = t.modelValue) == null ? void 0 : $.validAfter).toISOString() : null,
97
- endDate: (j = t.modelValue) != null && j.validAfter ? new Date(((E = t.modelValue) == null ? void 0 : E.validBefore) || "").toISOString() : null
98
- },
99
- "onUpdate:modelValue": r[2] || (r[2] = (c) => {
100
- var V;
101
- i({
102
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive,
103
- validAfter: new Date(c.startDate).toISOString(),
104
- validBefore: new Date(c.endDate).toISOString()
105
- });
106
- })
107
- }, null, 8, ["model-value"])
108
- ])) : e(n).value === "custom" ? (s(), x("div", me, [
109
- b(J, {
110
- "model-value": e(a),
111
- label: e(d)("connect.template.validity_option.expire"),
112
- "label-placement": "right",
113
- "onUpdate:modelValue": r[3] || (r[3] = (c) => {
114
- var V;
115
- a.value = c, i({
116
- validForDay: c ? 1 : void 0,
117
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
118
- });
119
- })
120
- }, null, 8, ["model-value", "label"]),
121
- e(a) ? (s(), f(K, {
122
- key: 0,
123
- label: e(d)("connect.template.validity_option.after_day"),
124
- class: G([{
125
- "opacity-50 pointer-events-none": !e(a)
126
- }, "mt-[-4px]"]),
127
- "max-fraction-digits": 0,
128
- disabled: !e(a),
129
- "show-steppers": !1,
130
- max: 99999,
131
- "append-text": e(d)("connect.template.validity_option.days"),
132
- "model-value": ((M = l.modelValue) == null ? void 0 : M.validForDay) ?? null,
133
- "onUpdate:modelValue": r[4] || (r[4] = (c) => {
134
- var V;
135
- return i({
136
- validForDay: c == null ? void 0 : parseInt(c.toString()),
137
- followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
138
- });
139
- })
140
- }, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : v("", !0)
141
- ])) : v("", !0),
142
- ((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (s(), f(T, {
143
- key: 3,
144
- text: e(d)("connect.template.validity_option.expire_follow_first_receive")
145
- }, null, 8, ["text"])) : v("", !0),
146
- b(T, {
147
- text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(d)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
148
- state: t.helperText ? "error" : ((z = l.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(u).helperState(e(m), "")
149
- }, null, 8, ["text", "state"])
150
- ]);
151
- };
152
- }
153
- }), ue = { class: "space-y-8" }, he = /* @__PURE__ */ P({
154
- __name: "CollectibleOptionInput",
155
- props: {
156
- modelValue: {
157
- type: Object
158
- },
159
- noCampaign: {
160
- type: Boolean
161
- },
162
- schema: {
163
- type: Object,
164
- default: () => te.any()
165
- },
166
- isMission: {
167
- type: Boolean,
168
- default: !1
169
- }
170
- },
171
- emits: ["update:model-value"],
172
- setup(t, { emit: g }) {
173
- const { t: d } = Z(), l = t, S = g, o = C(l.modelValue ?? {});
174
- return X(o, () => S("update:model-value", o.value)), (a, n) => {
175
- const h = y("FmSwitch"), m = y("FmStepperField");
176
- return s(), x("div", ue, [
177
- t.isMission ? v("", !0) : (s(), f(h, {
178
- key: 0,
179
- label: e(d)("connect.template.enable_transfer"),
180
- "label-placement": "right",
181
- modelValue: e(o).enableTransfer,
182
- "onUpdate:modelValue": n[0] || (n[0] = (i) => e(o).enableTransfer = i)
183
- }, null, 8, ["label", "modelValue"])),
184
- t.noCampaign ? v("", !0) : (s(), x("div", {
185
- key: 1,
186
- class: G(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
187
- }, [
188
- b(m, {
189
- modelValue: e(o).maxPerUser,
190
- "onUpdate:modelValue": n[1] || (n[1] = (i) => e(o).maxPerUser = i),
191
- "show-steppers": !1,
192
- rules: [e(u).ruleAtPath(t.schema, "maxPerUser")],
193
- "helper-text": e(d)("connect.template.leave_empty_unlimited")
194
- }, {
195
- label: F(() => [
196
- (s(), f(O(
197
- e(u).toInputLabel(
198
- e(u).typeAtPath(t.schema, "maxPerUser"),
199
- e(d)("connect.template.max_per_user")
200
- )
201
- )))
202
- ]),
203
- _: 1
204
- }, 8, ["modelValue", "rules", "helper-text"]),
205
- t.isMission ? v("", !0) : (s(), f(m, {
206
- key: 0,
207
- modelValue: e(o).maxReceive,
208
- "onUpdate:modelValue": n[2] || (n[2] = (i) => e(o).maxReceive = i),
209
- "show-steppers": !1,
210
- rules: [e(u).ruleAtPath(t.schema, "maxReceive")],
211
- "helper-text": e(d)("connect.template.leave_empty_unlimited")
212
- }, {
213
- label: F(() => [
214
- (s(), f(O(
215
- e(u).toInputLabel(
216
- e(u).typeAtPath(t.schema, "maxReceive"),
217
- e(d)("connect.template.max_distribute")
218
- )
219
- )))
220
- ]),
221
- _: 1
222
- }, 8, ["modelValue", "rules", "helper-text"]))
223
- ], 2)),
224
- t.isMission ? v("", !0) : (s(), x(_, { key: 2 }, [
225
- b(m, {
226
- modelValue: e(o).maxUse,
227
- "onUpdate:modelValue": n[3] || (n[3] = (i) => e(o).maxUse = i),
228
- "append-text": "use(s)",
229
- "show-steppers": !1,
230
- rules: [e(u).ruleAtPath(t.schema, "maxUse")]
231
- }, {
232
- label: F(() => [
233
- (s(), f(O(
234
- e(u).toInputLabel(
235
- e(u).typeAtPath(t.schema, "maxUse"),
236
- e(d)("connect.template.usage_count")
237
- )
238
- )))
239
- ]),
240
- _: 1
241
- }, 8, ["modelValue", "rules"]),
242
- e(o).maxUse && e(o).maxUse > 1 ? (s(), f(m, {
243
- key: 0,
244
- modelValue: e(o).cooldown,
245
- "onUpdate:modelValue": n[4] || (n[4] = (i) => e(o).cooldown = i),
246
- "append-text": "minute(s)",
247
- "show-steppers": !1,
248
- rules: [e(u).ruleAtPath(t.schema, "cooldown")]
249
- }, {
250
- label: F(() => [
251
- (s(), f(O(
252
- e(u).toInputLabel(
253
- e(u).typeAtPath(t.schema, "cooldown"),
254
- e(d)("connect.template.cooldown")
255
- )
256
- )))
257
- ]),
258
- _: 1
259
- }, 8, ["modelValue", "rules"])) : v("", !0),
260
- b(re, {
261
- modelValue: e(o).validityOption,
262
- "onUpdate:modelValue": n[5] || (n[5] = (i) => e(o).validityOption = i),
263
- label: e(d)("connect.template.validity_option.title")
264
- }, null, 8, ["modelValue", "label"])
265
- ], 64))
266
- ]);
267
- };
268
- }
269
- }), pe = { class: "space-y-8" }, ce = {
270
- key: 1,
271
- class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
272
- }, fe = { class: "fm-typo-en-body-lg-400" }, ve = { class: "text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ P({
273
- __name: "EffectSheet",
274
- props: {
275
- modelValue: { type: Object },
276
- canSetAutoApply: {
277
- type: Boolean
278
- }
279
- },
280
- emits: ["update:model-value"],
281
- setup(t, { emit: g }) {
282
- const d = g, l = C(!1);
283
- async function S(o) {
284
- o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && d("update:model-value", null);
285
- }
286
- return (o, a) => {
287
- const n = y("FmButton"), h = y("FmSideSheet");
288
- return s(), f(h, {
289
- "max-width": 550,
290
- header: "Apply discount",
291
- modelValue: e(l),
292
- "onUpdate:modelValue": [
293
- a[2] || (a[2] = (m) => q(l) ? l.value = m : null),
294
- a[3] || (a[3] = (m) => l.value = m)
295
- ]
296
- }, {
297
- "side-sheet-button": F(() => {
298
- var m, i, k, A;
299
- return [
300
- U("div", pe, [
301
- a[4] || (a[4] = U("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1)),
302
- t.modelValue ? (s(), x("div", ce, [
303
- U("div", fe, [
304
- U("div", null, w((m = e(R)(t.modelValue)) == null ? void 0 : m.type), 1),
305
- U("div", ve, w((i = e(R)(t.modelValue)) == null ? void 0 : i.adjustment) + " with " + w((k = e(R)(t.modelValue)) == null ? void 0 : k.requirements) + " " + w((A = e(R)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
306
- ]),
307
- b(n, {
308
- icon: "delete",
309
- "icon-color": "neutral-gray-400",
310
- variant: "tertiary",
311
- onClick: S
312
- })
313
- ])) : (s(), f(n, {
314
- key: 0,
315
- label: "Apply discount",
316
- icon: "add",
317
- "icon-color": "primary",
318
- variant: "secondary",
319
- class: "border-fm-color-primary text-fm-color-primary"
320
- }))
321
- ])
322
- ];
323
- }),
324
- "side-sheet-footer": F(() => a[5] || (a[5] = [
325
- ee(w(void 0))
326
- ])),
327
- default: F(() => [
328
- b(e(ne), {
329
- class: "fm-effect-sheet",
330
- title: "",
331
- "can-set-auto-apply": t.canSetAutoApply,
332
- "disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
333
- "initial-value": t.modelValue,
334
- onOnConfirm: a[0] || (a[0] = (m) => (d("update:model-value", m), l.value = !1)),
335
- onOnCancel: a[1] || (a[1] = (m) => l.value = !1)
336
- }, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
337
- ]),
338
- _: 1
339
- }, 8, ["modelValue"]);
340
- };
341
- }
342
- });
343
- export {
344
- Ae as _,
345
- he as a,
346
- re as b
347
- };
@@ -1,223 +0,0 @@
1
- import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
2
- import { _ as q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as z, components as G } from "@feedmepos/ui-library";
4
- import { p as J } from "./plugins-KiMuDTPp.js";
5
- import { u as Q } from "./loading-MEQuW9Xa.js";
6
- import { u as W } from "./business-B65OtB5B.js";
7
- import { u as X } from "./campaign-qGy6uzrC.js";
8
- import { a as L, b as V, g as Y } from "./campaign-iKI-L84v.js";
9
- import { u as Z } from "./vue-i18n-COzqUgQy.js";
10
- import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js";
12
- import { u as oe } from "./template-DPpMK30W.js";
13
- import { c as g } from "./index-CH2d_B8c.js";
14
- const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "flex flex-col gap-16 text-center" }, fe = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ D({
15
- __name: "Experience",
16
- setup(ge) {
17
- const { t: s } = Z(), I = {
18
- label: s("connect.program.common.actions.create", {
19
- type: s("connect.program.experience.title").toLowerCase()
20
- }),
21
- value: "create",
22
- isPrimary: !0,
23
- prependIcon: "add"
24
- }, P = oe("POINT", z()), B = W(), l = X(), { global: T, minor: v } = Q, r = S({
25
- searchKey: "",
26
- location: null
27
- }), f = E(
28
- () => l.campaigns.experience.filter(
29
- (e) => !r.value.location || !e.targetLocation || e.targetLocation.includes(r.value.location)
30
- )
31
- ), K = [
32
- {
33
- header: "Program title",
34
- accessorFn: (e) => e.name
35
- },
36
- {
37
- header: "Status",
38
- accessorFn: (e) => Y(e),
39
- cell(e) {
40
- return L(e.row.original);
41
- }
42
- },
43
- {
44
- header: "Summary",
45
- accessorFn: (e) => V(e)
46
- //v.effect,
47
- },
48
- {
49
- header: "Actions",
50
- cell(e) {
51
- return H(G.FmButton, {
52
- variant: "tertiary",
53
- icon: "delete",
54
- iconColor: "neutral-gray-400",
55
- onClick: (o) => {
56
- o.stopPropagation(), C(e.row.original);
57
- }
58
- });
59
- }
60
- }
61
- ], b = S();
62
- async function C(e) {
63
- await J.remove(`Are you sure you want to remove ${e.name}?`) && await v(
64
- async () => {
65
- await g.delete(e._id), await l.read("POINT");
66
- },
67
- {
68
- message: `Removing ${e.name}`,
69
- successMessage: `Removed ${e.name} successfully`
70
- }
71
- );
72
- }
73
- async function y(e) {
74
- e ? await o() : P.open(async (d) => {
75
- await o(d);
76
- });
77
- async function o(d) {
78
- var u;
79
- (u = b.value) == null || u.showSheet(
80
- !0,
81
- "POINT",
82
- e ? await g.readById(e._id) : void 0,
83
- d
84
- );
85
- }
86
- }
87
- async function N(e) {
88
- await v(
89
- async () => {
90
- e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await l.read("POINT");
91
- },
92
- {
93
- message: s("connect.program.common.update.updating", {
94
- type: s("connect.program.experience.title")
95
- }),
96
- successMessage: s("connect.program.common.update.success", {
97
- type: s("connect.program.experience.title"),
98
- action: e.campaign._id ? "updated" : "created"
99
- })
100
- }
101
- );
102
- }
103
- return U(async () => {
104
- await T(async () => {
105
- await l.read("POINT");
106
- });
107
- }), (e, o) => {
108
- const d = i("FmPageHead"), u = i("FmSearch"), R = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), O = i("FmList"), A = i("FmCard");
109
- return m(), _(x, null, [
110
- c(d, {
111
- title: t(s)("connect.program.experience.title"),
112
- actions: t(f).length > 0 ? [I] : [],
113
- "onClick:action": o[0] || (o[0] = () => y())
114
- }, null, 8, ["title", "actions"]),
115
- n("div", ae, [
116
- c(u, {
117
- modelValue: t(r).searchKey,
118
- "onUpdate:modelValue": o[1] || (o[1] = (a) => t(r).searchKey = a),
119
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
120
- placeholder: t(s)("connect.program.common.search"),
121
- collapsible: ""
122
- }, null, 8, ["modelValue", "placeholder"]),
123
- t(l).campaigns.experience && t(l).campaigns.experience.length > 0 ? (m(), _(x, { key: 0 }, [
124
- n("div", ne, [
125
- n("div", se, [
126
- c(ee, {
127
- modelValue: t(r).location,
128
- "onUpdate:modelValue": o[2] || (o[2] = (a) => t(r).location = a),
129
- label: "Location: ",
130
- "show-item-label": !0,
131
- icon: "storefront",
132
- placement: "bottom-start",
133
- items: t(B).locationItems
134
- }, null, 8, ["modelValue", "items"])
135
- ]),
136
- c(u, {
137
- modelValue: t(r).searchKey,
138
- "onUpdate:modelValue": o[3] || (o[3] = (a) => t(r).searchKey = a),
139
- class: "xs:hidden",
140
- placeholder: "search",
141
- collapsible: ""
142
- }, null, 8, ["modelValue"])
143
- ]),
144
- c(R, {
145
- class: "xs:hidden",
146
- "row-data": t(f),
147
- "column-defs": K,
148
- "search-value": t(r).searchKey,
149
- "column-filter": [],
150
- onRowClick: o[4] || (o[4] = (a) => y(a.original)),
151
- "hide-footer": t(f).length < 10
152
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
153
- c(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
154
- default: h(() => [
155
- (m(!0), _(x, null, j(t(f).filter(
156
- (a) => a.name.toLowerCase().includes(t(r).searchKey.toLowerCase())
157
- ), (a) => (m(), w($, {
158
- key: a._id.toString(),
159
- onClick: (k) => y(a),
160
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
161
- }, {
162
- default: h(() => [
163
- n("div", re, [
164
- n("div", ce, [
165
- (m(), w(M(t(L)(a)))),
166
- n("div", ie, p(a.currentReceive ?? 0) + " used ", 1)
167
- ]),
168
- n("div", le, [
169
- n("div", me, p(a.name), 1),
170
- n("div", pe, p(t(V)(a)), 1)
171
- ]),
172
- n("div", de, p(t(s)("connect.program.experience.received", {
173
- count: a.currentReceive ?? 0
174
- })), 1)
175
- ]),
176
- c(F, {
177
- icon: "delete",
178
- "icon-color": "neutral-gray-400",
179
- variant: "tertiary",
180
- onClick: (k) => (k.stopPropagation(), C(a))
181
- }, null, 8, ["onClick"])
182
- ]),
183
- _: 2
184
- }, 1032, ["onClick"]))), 128))
185
- ]),
186
- _: 1
187
- })
188
- ], 64)) : (m(), w(A, {
189
- key: 1,
190
- variant: "outlined",
191
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
192
- }, {
193
- default: h(() => [
194
- o[6] || (o[6] = n("img", {
195
- src: q,
196
- class: "aspect-square w-[150px]"
197
- }, null, -1)),
198
- n("div", ue, [
199
- n("div", fe, p(t(s)("connect.program.experience.empty_state.title")), 1),
200
- n("div", ye, p(t(s)("connect.program.experience.empty_state.description")), 1)
201
- ]),
202
- c(F, {
203
- variant: "primary",
204
- label: "Create experience program",
205
- icon: "add",
206
- onClick: o[5] || (o[5] = (a) => y())
207
- })
208
- ]),
209
- _: 1
210
- })),
211
- c(te, {
212
- ref_key: "sheetRef",
213
- ref: b,
214
- "onSubmit:modelValue": N
215
- }, null, 512)
216
- ])
217
- ], 64);
218
- };
219
- }
220
- });
221
- export {
222
- Pe as default
223
- };
@@ -1,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
- };