@feedmepos/mf-connect 0.1.38-beta.52 → 0.1.38-beta.53

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 +2 -2
  2. package/dist/Analytic-BU1mOMoX.js +0 -760
  3. package/dist/App-fw6iFNxW.js +0 -4638
  4. package/dist/AuditLogs-CliU8167.js +0 -1887
  5. package/dist/Bin-C49tzfas.js +0 -166
  6. package/dist/Broadcast-YZVnZTCD.js +0 -232
  7. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DEwsZags.js +0 -122
  8. package/dist/Card-DcQQyJl9.js +0 -911
  9. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  10. package/dist/Collections--8lmoXWR.js +0 -540
  11. package/dist/Credit-CfkLFMei.js +0 -227
  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-t6eac8yR.js +0 -3151
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CXVOuiLI.js +0 -347
  16. package/dist/Experience-BnVVC2-L.js +0 -228
  17. package/dist/FileSaver.min-NlMItPOc.js +0 -74
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  19. package/dist/Game-Dbz4DzY_.js +0 -297
  20. package/dist/Grab-CCqScmpp.js +0 -300
  21. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-C5irH9v6.js +0 -145
  22. package/dist/Index-DPsM9D4W.js +0 -259
  23. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  24. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
  25. package/dist/MainLayout-B1aJoR95.js +0 -41
  26. package/dist/Marketing-CFwxWdJq.js +0 -21761
  27. package/dist/Member-ZPKbf5Bk.js +0 -281
  28. package/dist/MemberList-BDs-70nG.js +0 -1607
  29. package/dist/MemberOverview-wL_ailso.js +0 -58
  30. package/dist/MemberTransactions-C-zHpuZF.js +0 -45
  31. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B2TKmOOK.js +0 -60616
  32. package/dist/Mission-BHkb1E9m.js +0 -301
  33. package/dist/Overview-DYlcqNCX.js +0 -1079
  34. package/dist/Point-BEhNBY2_.js +0 -231
  35. package/dist/Promotion-DOXRIej4.js +0 -363
  36. package/dist/Queue-Bwa0LWhf.js +0 -260
  37. package/dist/Record-BoI8l1Qq.js +0 -341
  38. package/dist/Reward-BVQaqAYM.js +0 -442
  39. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BC3dEiWi.js +0 -150
  40. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-HpleMvjm.js +0 -1767
  41. package/dist/Segment-Cmy7nu27.js +0 -882
  42. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-pab6X2DC.js +0 -181
  43. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BqIh8D8O.js +0 -189
  44. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CESoNd87.js +0 -147
  45. package/dist/Setting-DN8j_6Xv.js +0 -1993
  46. package/dist/SettingAdvertisements-qHdiaa6m.js +0 -264
  47. package/dist/Store-DfhVYCgX.js +0 -1936
  48. package/dist/StoreRewards-NYucFLJU.js +0 -535
  49. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BGOcOAXR.js +0 -1036
  50. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DRin8Jzw.js +0 -8093
  51. package/dist/Tier-Dl0aBuJz.js +0 -970
  52. package/dist/Title-DvO6Mira.js +0 -568
  53. package/dist/Transaction-ONVl4UZZ.js +0 -39
  54. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-FyE25D8o.js +0 -130
  55. package/dist/Voucher-BZ1feYh1.js +0 -399
  56. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Lilql8J4.js +0 -421
  57. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-C_ZdCOPI.js +0 -56
  58. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  59. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  60. package/dist/app-B_RRkjaD.js +0 -42566
  61. package/dist/app-wDQR6dpb.js +0 -39
  62. package/dist/app.js +0 -7
  63. package/dist/business-y5qSMcd-.js +0 -82
  64. package/dist/campaign-CpzFl8Vr.js +0 -4
  65. package/dist/campaign-DHgol2Lt.js +0 -219
  66. package/dist/campaign-Drxe0zPX.js +0 -253
  67. package/dist/campaign.enum-CwAPVgPe.js +0 -21
  68. package/dist/campaign.fn-DMx5xsiK.js +0 -776
  69. package/dist/collectible.enum-Bh4jnUgP.js +0 -19
  70. package/dist/collection.fn-BpC_YBwG.js +0 -26
  71. package/dist/dto-DWkf9QOb.js +0 -222
  72. package/dist/effect-D5ZWGpNS.js +0 -78
  73. package/dist/email-addresses-DFtVESS8.js +0 -705
  74. package/dist/export-BtUy3sWU.js +0 -97
  75. package/dist/feedme.ico +0 -0
  76. package/dist/helper-DtWMZoWX.js +0 -86
  77. package/dist/index-7HXC3sH0.js +0 -56
  78. package/dist/index-BQlhmw75.js +0 -3
  79. package/dist/index-BdX7CxUg.js +0 -30076
  80. package/dist/index-BerRe0M3.js +0 -76
  81. package/dist/index-BrZ3xZzk.js +0 -146
  82. package/dist/index-CJzBpsBP.js +0 -3412
  83. package/dist/index-CQiABpeB.js +0 -32456
  84. package/dist/index-CqIWlGW3.js +0 -38
  85. package/dist/index-CsaQJMAR.js +0 -66
  86. package/dist/index-DPCDboPA.js +0 -32
  87. package/dist/index-DPaH8jaV.js +0 -8884
  88. package/dist/index-Dkce3JZ_.js +0 -54
  89. package/dist/index-DrYv_gG4.js +0 -31
  90. package/dist/index-SfJbKfWl.js +0 -2407
  91. package/dist/index-vh86FiIQ.js +0 -10
  92. package/dist/index.esm2017-CbvE5vCC.js +0 -3069
  93. package/dist/loading-BWGIK17X.js +0 -71
  94. package/dist/lodash-B5I3zXaY.js +0 -3678
  95. package/dist/membership-Zy2P6O6X.js +0 -235
  96. package/dist/moment-D7p2TMB-.js +0 -2583
  97. package/dist/money-D_fZmBbi.js +0 -15
  98. package/dist/number-C4DhXkCm.js +0 -12
  99. package/dist/object-qECH92oz.js +0 -26
  100. package/dist/objectId-dwaoBfJX.js +0 -7
  101. package/dist/objectid-C6eRcDzI.js +0 -145
  102. package/dist/plugins-DDAJav2s.js +0 -1817
  103. package/dist/reward-Dxjvmy7-.js +0 -36
  104. package/dist/rule-builder-ZkPWAiTl.js +0 -102
  105. package/dist/rule-sclqeiyk.js +0 -1951
  106. package/dist/style.css +0 -4
  107. package/dist/template-CAs0lkTY.js +0 -188
  108. package/dist/tier-BJDhpH6X.js +0 -4
  109. package/dist/tiers/tier=1.png +0 -0
  110. package/dist/tiers/tier=2.png +0 -0
  111. package/dist/tiers/tier=3.png +0 -0
  112. package/dist/tiers/tier=4.png +0 -0
  113. package/dist/timezone-5t8ki0gE.js +0 -1151
  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-B2fpKTfg.js +0 -213
  124. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  125. package/dist/type_drinks-D6jnpvwV.js +0 -4
  126. package/dist/usePagination-Ds-cuHop.js +0 -223
  127. package/dist/user-ORhbAsqi.js +0 -55
  128. package/dist/vue-i18n-cyOhW8mW.js +0 -2365
  129. package/dist/xlsx-4klfjFae.js +0 -15491
  130. package/dist/zod-BsHmzMQd.js +0 -91
@@ -1,347 +0,0 @@
1
- import { defineComponent as B, ref as P, onMounted as Q, computed as q, resolveComponent as V, openBlock as d, createElementBlock as F, renderSlot as W, toDisplayString as b, createCommentVNode as f, createBlock as u, unref as e, isRef as G, createVNode as g, normalizeClass as Z, watch as X, withCtx as w, resolveDynamicComponent as R, Fragment as _, createElementVNode as C, createTextVNode as ee } from "vue";
2
- import { z as te, s as le } from "./app-B_RRkjaD.js";
3
- import { Z as m } from "./zod-BsHmzMQd.js";
4
- import { g as oe, f as ae } from "./index-DPaH8jaV.js";
5
- import { u as T } from "./vue-i18n-cyOhW8mW.js";
6
- import { s as O } from "./effect-D5ZWGpNS.js";
7
- import { p as ne } from "./plugins-DDAJav2s.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: S }) {
42
- var U, A;
43
- const { t: n } = T(), i = t, v = S, a = [
44
- { label: n("connect.template.validity_option.date_range"), value: "range" },
45
- { label: n("connect.template.validity_option.custom"), value: "custom" }
46
- ], c = P(!1);
47
- Q(() => {
48
- c.value = i.modelValue && Object.entries(i.modelValue).filter(
49
- ([r, s]) => r != "followFirstReceive" && s != null
50
- ).length > 0;
51
- });
52
- const l = P(
53
- i.type ? a.find((r) => r.value === i.type) : (U = i.modelValue) != null && U.validBefore || (A = i.modelValue) != null && A.validAfter ? a[0] : a[1]
54
- ), h = q(
55
- () => i.forCredit ? oe : ae
56
- ), y = q(() => {
57
- const r = h.value.safeParse(i.modelValue);
58
- return r.success ? [] : r.error.errors;
59
- });
60
- function o(r) {
61
- v("update:model-value", r);
62
- }
63
- function k(r) {
64
- var s, D;
65
- if (r.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 (r.value == "custom")
72
- return c.value = !1, o({
73
- validForDay: (D = i.modelValue) == null ? void 0 : D.validForDay
74
- });
75
- }
76
- return (r, s) => {
77
- var $, j, E, M, N, L, z, H;
78
- const D = V("FmButtonGroup"), Y = V("FmSimpleDateRangePicker"), J = V("FmSwitch"), K = V("FmStepperField"), I = V("FmHelperText");
79
- return d(), F("div", ie, [
80
- W(r.$slots, "label", {}, () => [
81
- t.label ? (d(), F("div", de, b(t.label), 1)) : f("", !0)
82
- ]),
83
- t.type ? f("", !0) : (d(), u(D, {
84
- key: 0,
85
- modelValue: e(l),
86
- "onUpdate:modelValue": [
87
- s[0] || (s[0] = (p) => G(l) ? l.value = p : null),
88
- s[1] || (s[1] = (p) => k(p))
89
- ],
90
- items: a
91
- }, null, 8, ["modelValue"])),
92
- e(l).value === "range" ? (d(), F("div", se, [
93
- g(Y, {
94
- "model-value": {
95
- startDate: ($ = t.modelValue) != null && $.validAfter ? new Date((j = t.modelValue) == null ? void 0 : j.validAfter).toISOString() : null,
96
- endDate: (E = t.modelValue) != null && E.validAfter ? new Date(((M = t.modelValue) == null ? void 0 : M.validBefore) || "").toISOString() : null
97
- },
98
- "onUpdate:modelValue": s[2] || (s[2] = (p) => {
99
- var x;
100
- o({
101
- followFirstReceive: (x = i.modelValue) == null ? void 0 : x.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(), F("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 x;
115
- c.value = p, o({
116
- validForDay: p ? 1 : void 0,
117
- followFirstReceive: (x = i.modelValue) == null ? void 0 : x.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": ((N = i.modelValue) == null ? void 0 : N.validForDay) ?? null,
133
- "onUpdate:modelValue": s[4] || (s[4] = (p) => {
134
- var x;
135
- return o({
136
- validForDay: p == null ? void 0 : parseInt(p.toString()),
137
- followFirstReceive: (x = i.modelValue) == null ? void 0 : x.followFirstReceive
138
- });
139
- })
140
- }, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : f("", !0)
141
- ])) : f("", !0),
142
- ((L = i.modelValue) == null ? void 0 : L.followFirstReceive) === !0 && e(c) ? (d(), u(I, {
143
- key: 3,
144
- text: e(n)("connect.template.validity_option.expire_follow_first_receive")
145
- }, null, 8, ["text"])) : f("", !0),
146
- g(I, {
147
- text: t.helperText || (((z = i.modelValue) == null ? void 0 : z.validForDay) === 0 ? e(n)("connect.template.validity_option.expires_on_same_day") : e(m).helperText(e(y), "")),
148
- state: t.helperText ? "error" : ((H = i.modelValue) == null ? void 0 : H.validForDay) === 0 ? "warning" : e(m).helperState(e(y), "")
149
- }, null, 8, ["text", "state"])
150
- ]);
151
- };
152
- }
153
- }), ue = { class: "space-y-8" }, Se = /* @__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: S }) {
173
- const { t: n } = T(), i = t, v = S, a = P(i.modelValue ?? {});
174
- return X(a, () => v("update:model-value", a.value)), (c, l) => {
175
- const h = V("FmSwitch"), y = V("FmStepperField");
176
- return d(), F("div", ue, [
177
- t.isMission ? f("", !0) : (d(), u(h, {
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(), F("div", {
185
- key: 1,
186
- class: Z(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
187
- }, [
188
- g(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(m).ruleAtPath(t.schema, "maxPerUser")],
193
- "helper-text": e(n)("connect.template.leave_empty_unlimited")
194
- }, {
195
- label: w(() => [
196
- (d(), u(R(
197
- e(m).toInputLabel(
198
- e(m).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(m).ruleAtPath(t.schema, "maxReceive")],
211
- "helper-text": e(n)("connect.template.leave_empty_unlimited")
212
- }, {
213
- label: w(() => [
214
- (d(), u(R(
215
- e(m).toInputLabel(
216
- e(m).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(), F(_, { key: 2 }, [
225
- g(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(m).ruleAtPath(t.schema, "maxUse")]
231
- }, {
232
- label: w(() => [
233
- (d(), u(R(
234
- e(m).toInputLabel(
235
- e(m).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(m).ruleAtPath(t.schema, "cooldown")]
249
- }, {
250
- label: w(() => [
251
- (d(), u(R(
252
- e(m).toInputLabel(
253
- e(m).typeAtPath(t.schema, "cooldown"),
254
- e(n)("connect.template.cooldown")
255
- )
256
- )))
257
- ]),
258
- _: 1
259
- }, 8, ["modelValue", "rules"])) : f("", !0),
260
- g(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" }, Ue = /* @__PURE__ */ B({
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: S }) {
282
- const { t: n } = T(), i = S, v = P(!1);
283
- async function a(c) {
284
- c.stopPropagation(), await ne.remove(n("connect.effect.removeConfirm")) && i("update:model-value", null);
285
- }
286
- return (c, l) => {
287
- const h = V("FmButton"), y = V("FmSideSheet");
288
- return d(), u(y, {
289
- "max-width": 550,
290
- header: e(n)("connect.effect.title"),
291
- modelValue: e(v),
292
- "onUpdate:modelValue": [
293
- l[2] || (l[2] = (o) => G(v) ? v.value = o : null),
294
- l[3] || (l[3] = (o) => v.value = o)
295
- ]
296
- }, {
297
- "side-sheet-button": w(() => {
298
- var o, k, U, A;
299
- return [
300
- C("div", ce, [
301
- C("div", pe, b(e(n)("connect.effect.description")), 1),
302
- t.modelValue ? (d(), F("div", fe, [
303
- C("div", ve, [
304
- C("div", null, b((o = e(O)(t.modelValue)) == null ? void 0 : o.type), 1),
305
- C("div", ye, b((k = e(O)(t.modelValue)) == null ? void 0 : k.adjustment) + " " + b(e(n)("connect.effect.with")) + " " + b((U = e(O)(t.modelValue)) == null ? void 0 : U.requirements) + " " + b((A = e(O)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
306
- ]),
307
- g(h, {
308
- icon: "delete",
309
- "icon-color": "neutral-gray-400",
310
- variant: "tertiary",
311
- onClick: a
312
- })
313
- ])) : (d(), u(h, {
314
- key: 0,
315
- label: e(n)("connect.effect.title"),
316
- icon: "add",
317
- "icon-color": "primary",
318
- variant: "secondary",
319
- class: "border-fm-color-primary text-fm-color-primary"
320
- }, null, 8, ["label"]))
321
- ])
322
- ];
323
- }),
324
- "side-sheet-footer": w(() => [...l[4] || (l[4] = [
325
- ee(b(void 0), -1)
326
- ])]),
327
- default: w(() => [
328
- g(e(le), {
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: l[0] || (l[0] = (o) => (i("update:model-value", o), v.value = !1)),
335
- onOnCancel: l[1] || (l[1] = (o) => v.value = !1)
336
- }, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
337
- ]),
338
- _: 1
339
- }, 8, ["header", "modelValue"]);
340
- };
341
- }
342
- });
343
- export {
344
- Ue as _,
345
- Se as a,
346
- re as b
347
- };
@@ -1,228 +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 c, 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-DDAJav2s.js";
5
- import { u as W } from "./loading-BWGIK17X.js";
6
- import { u as X } from "./business-y5qSMcd-.js";
7
- import { u as Y, c as g } from "./campaign-DHgol2Lt.js";
8
- import { b as L, c as V, a as Z } from "./campaign-Drxe0zPX.js";
9
- import { u as ee } from "./vue-i18n-cyOhW8mW.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-t6eac8yR.js";
12
- import { u as ne } from "./template-CAs0lkTY.js";
13
- 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" }, ce = { class: "space-y-8" }, ie = { 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" }, Be = /* @__PURE__ */ E({
14
- __name: "Experience",
15
- setup(_e) {
16
- const { t: r } = ee(), P = {
17
- label: r("connect.program.common.actions.create", {
18
- type: r("connect.program.experience.title").toLowerCase()
19
- }),
20
- value: "create",
21
- isPrimary: !0,
22
- prependIcon: "add"
23
- }, B = ne("POINT", G()), I = X(), d = Y(), { global: T, minor: v } = W, s = S({
24
- searchKey: "",
25
- location: []
26
- });
27
- function $(e) {
28
- const t = s.value.location;
29
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
30
- var i;
31
- return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
32
- }) : e.targetLocation.includes(t);
33
- }
34
- const f = U(
35
- () => d.campaigns.experience.filter((e) => $(e))
36
- ), K = [
37
- {
38
- header: "Program title",
39
- accessorFn: (e) => e.name
40
- },
41
- {
42
- header: "Status",
43
- accessorFn: (e) => Z(e),
44
- cell(e) {
45
- return L(e.row.original);
46
- }
47
- },
48
- {
49
- header: "Summary",
50
- accessorFn: (e) => V(e)
51
- //v.effect,
52
- },
53
- {
54
- header: "Actions",
55
- cell(e) {
56
- return q(J.FmButton, {
57
- variant: "tertiary",
58
- icon: "delete",
59
- iconColor: "neutral-gray-400",
60
- onClick: (t) => {
61
- t.stopPropagation(), C(e.row.original);
62
- }
63
- });
64
- }
65
- }
66
- ], b = S();
67
- async function C(e) {
68
- await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
69
- async () => {
70
- await g.delete(e._id), await d.read("POINT");
71
- },
72
- {
73
- message: `Removing ${e.name}`,
74
- successMessage: `Removed ${e.name} successfully`
75
- }
76
- );
77
- }
78
- async function y(e) {
79
- e ? await t() : B.open(async (l) => {
80
- await t(l);
81
- });
82
- async function t(l) {
83
- var i;
84
- (i = b.value) == null || i.showSheet(
85
- !0,
86
- "POINT",
87
- e ? await g.readById(e._id) : void 0,
88
- l
89
- );
90
- }
91
- }
92
- async function N(e) {
93
- await v(
94
- async () => {
95
- e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await d.read("POINT");
96
- },
97
- {
98
- message: r("connect.program.common.update.updating", {
99
- type: r("connect.program.experience.title")
100
- }),
101
- successMessage: r("connect.program.common.update.success", {
102
- type: r("connect.program.experience.title"),
103
- action: e.campaign._id ? "updated" : "created"
104
- })
105
- }
106
- );
107
- }
108
- return j(async () => {
109
- await T(async () => {
110
- await d.read("POINT");
111
- });
112
- }), (e, t) => {
113
- const l = m("FmPageHead"), i = m("FmSearch"), R = m("FmTable"), F = m("FmButton"), A = m("FmListItem"), O = m("FmList"), D = m("FmCard");
114
- return p(), _(x, null, [
115
- c(l, {
116
- title: o(r)("connect.program.experience.title"),
117
- actions: o(f).length > 0 ? [P] : [],
118
- "onClick:action": t[0] || (t[0] = () => y())
119
- }, null, 8, ["title", "actions"]),
120
- a("div", ae, [
121
- c(i, {
122
- modelValue: o(s).searchKey,
123
- "onUpdate:modelValue": t[1] || (t[1] = (n) => o(s).searchKey = n),
124
- class: "hidden xs:!block border-b-2 border-fm-color-neutral-gray-100",
125
- placeholder: o(r)("connect.program.common.search"),
126
- collapsible: ""
127
- }, null, 8, ["modelValue", "placeholder"]),
128
- o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(x, { key: 0 }, [
129
- a("div", re, [
130
- a("div", se, [
131
- c(te, {
132
- label: `${o(r)("connect.common.location")}: `,
133
- "right-icon": "keyboard_arrow_down",
134
- modelValue: o(s).location,
135
- "onUpdate:modelValue": t[2] || (t[2] = (n) => o(s).location = n),
136
- icon: "storefront",
137
- "show-item-label": !0,
138
- items: o(I).locationOptions
139
- }, null, 8, ["label", "modelValue", "items"])
140
- ]),
141
- c(i, {
142
- modelValue: o(s).searchKey,
143
- "onUpdate:modelValue": t[3] || (t[3] = (n) => o(s).searchKey = n),
144
- class: "xs:hidden",
145
- placeholder: "search",
146
- collapsible: ""
147
- }, null, 8, ["modelValue"])
148
- ]),
149
- c(R, {
150
- class: "xs:hidden",
151
- "row-data": o(f),
152
- "column-defs": K,
153
- "search-value": o(s).searchKey,
154
- "column-filter": [],
155
- onRowClick: t[4] || (t[4] = (n) => y(n.original)),
156
- "hide-footer": o(f).length < 10
157
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
158
- c(O, { class: "hidden xs:!flex flex-col mx-[-24px]" }, {
159
- default: h(() => [
160
- (p(!0), _(x, null, M(o(f).filter(
161
- (n) => n.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
162
- ), (n) => (p(), w(A, {
163
- key: n._id.toString(),
164
- onClick: (k) => y(n),
165
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
166
- }, {
167
- default: h(() => [
168
- a("div", ce, [
169
- a("div", ie, [
170
- (p(), w(H(o(L)(n)))),
171
- a("div", le, u(n.currentReceive ?? 0) + " used ", 1)
172
- ]),
173
- a("div", me, [
174
- a("div", de, u(n.name), 1),
175
- a("div", pe, u(o(V)(n)), 1)
176
- ]),
177
- a("div", ue, u(o(r)("connect.program.experience.received", {
178
- count: n.currentReceive ?? 0
179
- })), 1)
180
- ]),
181
- c(F, {
182
- icon: "delete",
183
- "icon-color": "neutral-gray-400",
184
- variant: "tertiary",
185
- onClick: (k) => (k.stopPropagation(), C(n))
186
- }, null, 8, ["onClick"])
187
- ]),
188
- _: 2
189
- }, 1032, ["onClick"]))), 128))
190
- ]),
191
- _: 1
192
- })
193
- ], 64)) : (p(), w(D, {
194
- key: 1,
195
- variant: "outlined",
196
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
197
- }, {
198
- default: h(() => [
199
- t[6] || (t[6] = a("img", {
200
- src: z,
201
- class: "aspect-square w-[150px]"
202
- }, null, -1)),
203
- a("div", fe, [
204
- a("div", ye, u(o(r)("connect.program.experience.empty_state.title")), 1),
205
- a("div", ge, u(o(r)("connect.program.experience.empty_state.description")), 1)
206
- ]),
207
- c(F, {
208
- variant: "primary",
209
- label: "Create experience program",
210
- icon: "add",
211
- onClick: t[5] || (t[5] = (n) => y())
212
- })
213
- ]),
214
- _: 1
215
- })),
216
- c(oe, {
217
- ref_key: "sheetRef",
218
- ref: b,
219
- "onSubmit:modelValue": N
220
- }, null, 512)
221
- ])
222
- ], 64);
223
- };
224
- }
225
- });
226
- export {
227
- Be as default
228
- };
@@ -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
- };