@feedmepos/mf-connect 0.1.104-prod → 0.1.105-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 (126) hide show
  1. package/dist/{App-B4UWz7ir.js → App-Bb5yBnOB.js} +10 -9
  2. package/dist/{Bin-D_eSutW-.js → Bin-DXIYjMm_.js} +8 -8
  3. package/dist/{Broadcast-DDQE_RLR.js → Broadcast-BpcvdGj_.js} +11 -11
  4. package/dist/CampaignAnalytic-BDqEZmHy.js +1830 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2cTNgaS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBiIrN0a.js} +6 -6
  6. package/dist/{Card-CPozdg3m.js → Card-D2sggPws.js} +19 -19
  7. package/dist/{Collections-IrwF5bWH.js → Collections-BdZU2wR5.js} +9 -9
  8. package/dist/{Credit-BVXpy5tw.js → Credit-DeDCjtcp.js} +118 -93
  9. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DEwMzs6L.js +53 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CCe1rp0f.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DbukUBK2.js} +815 -609
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DwP64fmL.js → EffectSheet.vue_vue_type_style_index_0_lang-BNOrfkpI.js} +12 -12
  12. package/dist/{Experience-BR1JXdH5.js → Experience-CT_3fZPR.js} +109 -84
  13. package/dist/{FileSaver.min-CX-3gU49.js → FileSaver.min-C3sYNQw3.js} +1 -1
  14. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  15. package/dist/Game-C4v96zEu.js +355 -0
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-q5fF5d7d.js → ImageInput.vue_vue_type_script_setup_true_lang-6PmRI47X.js} +1 -1
  17. package/dist/{Index--Xl_8CFP.js → Index-C5DRA08U.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-C-xW5Tw8.js → LocationPicker.vue_vue_type_script_setup_true_lang-BXcpCtHI.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DGVqQz1j.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C8dm05l2.js} +1 -1
  20. package/dist/LoyaltyDashboard-BCPojLdm.js +2865 -0
  21. package/dist/{MainLayout-DB_Y2C3K.js → MainLayout-p92jJ4Mp.js} +3 -3
  22. package/dist/{Marketing-CjAGzfL7.js → Marketing-Z-TiSgs6.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-BoF6kTOz.js → MarketingMaterialEdit-CS-hcbGU.js} +6 -6
  24. package/dist/{Member-DnypOK2I.js → Member-DwY0tXwr.js} +7 -7
  25. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DDSBw1sL.js +1286 -0
  26. package/dist/{MemberImportHistory-BJSyT6Ys.js → MemberImportHistory-BN85ZxpX.js} +8 -8
  27. package/dist/MemberList-DaIJCa_0.js +336 -0
  28. package/dist/{MemberTransactions-CbPxUrtd.js → MemberTransactions-DrgA6jX1.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CVzfjs9D.js → MessageInput.vue_vue_type_script_setup_true_lang-rl8Sr_zl.js} +11 -11
  30. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-lGB6WCj6.js +40 -0
  31. package/dist/Mission-BFBmJTjP.js +359 -0
  32. package/dist/{Overview-BW2_y1_7.js → Overview-DaZA6Oxr.js} +5 -5
  33. package/dist/{Overview-DZxRuA5F.js → Overview-DtiqH8iJ.js} +19 -19
  34. package/dist/Point-DeaTc_Gj.js +287 -0
  35. package/dist/Promotion-BBIylJxt.js +417 -0
  36. package/dist/{Queue-CSF9M_Lc.js → Queue-WsDiZkdN.js} +11 -11
  37. package/dist/{Record-B-HdI5A4.js → Record-CzD7sYYG.js} +10 -10
  38. package/dist/{Review-D6RQbcP6.js → Review-BkPHrt33.js} +2 -2
  39. package/dist/{ReviewFacebookCallback-CkULwhF-.js → ReviewFacebookCallback-Bu8j9CLF.js} +5 -5
  40. package/dist/{ReviewGoogleCallback-DgPEXV_R.js → ReviewGoogleCallback-Bh3R06MN.js} +5 -5
  41. package/dist/{Reward-CZvM6GQ9.js → Reward-BHe9y1VN.js} +17 -17
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C1y2_pHY.js → RewardGroup.vue_vue_type_script_setup_true_lang-DVNknaoM.js} +12 -12
  43. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cvo6a7Nw.js → RuleGroup.vue_vue_type_script_setup_true_lang-DAXfiO8F.js} +279 -286
  44. package/dist/{Segment-D2bXEF1U.js → Segment-CjaPWdMt.js} +24 -24
  45. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Ytimazjg.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-srMHsTa6.js} +12 -12
  46. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bn1IWAd_.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C5taZCvV.js} +4 -4
  47. package/dist/{Setting-DelduRrh.js → Setting-Dr_lawoc.js} +57 -57
  48. package/dist/{SettingAdvertisements-gTDg1C60.js → SettingAdvertisements-BXJd1btw.js} +13 -13
  49. package/dist/{Settings-VUEo9wwx.js → Settings-DPJq4qbw.js} +5 -5
  50. package/dist/{Store-CXQZirbg.js → Store-BNq7oK2B.js} +22 -22
  51. package/dist/{StoreRewards-BDuZPA8S.js → StoreRewards-WExx61kV.js} +16 -16
  52. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C-yqZEn4.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BaqyPTXc.js} +327 -386
  53. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BayrgH7m.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CnCHFZL3.js} +2 -2
  54. package/dist/{Tier-DtPE4IJ5.js → Tier-BSLPHzsj.js} +102 -102
  55. package/dist/{Title-DNCnQeeR.js → Title-BQ_CVnIN.js} +22 -22
  56. package/dist/{Transaction-BkUaCGwl.js → Transaction-CvyyRq8P.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B7TY_AGp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-ByHFu7ry.js} +6 -6
  58. package/dist/{Voucher-BBuB9tf8.js → Voucher-DQ-yXZAC.js} +143 -121
  59. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bu09bIut.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BB0n73WF.js} +115 -121
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BSKpAMJL.js → ZodTextField.vue_vue_type_script_setup_true_lang-nnWYrHgL.js} +2 -2
  61. package/dist/{app-CSLQmdYA.js → app-BxM9Ghdm.js} +27795 -25657
  62. package/dist/app.js +1 -1
  63. package/dist/{business-okSb42At.js → business-nbLS8l9h.js} +1 -1
  64. package/dist/{campaign-V7nlCdxR.js → campaign-C_IR2u8a.js} +49 -48
  65. package/dist/{campaign-Ck9GwZdI.js → campaign-Ki9WAmYl.js} +2 -2
  66. package/dist/{campaign.enum-BQ5khvqI.js → campaign.enum-CtgtWycO.js} +1 -1
  67. package/dist/{campaign.fn-DMDpxVSZ.js → campaign.fn-CJOfTzI6.js} +32 -32
  68. package/dist/{collectible.enum-lKz3vTQM.js → collectible.enum-a5dfnH3M.js} +1 -1
  69. package/dist/{collection.fn-BH5cqMNy.js → collection.fn-Cc-luweq.js} +2 -2
  70. package/dist/{effect-pUpfqkCF.js → effect-D66eImId.js} +1 -1
  71. package/dist/{email-addresses-CzBv1fzv.js → email-addresses-DNHwCrI5.js} +2 -2
  72. package/dist/{export-Du7ZAv-8.js → export-Bp-Fwp-h.js} +3 -3
  73. package/dist/{helper-BpthZPU4.js → helper-BpHRMtgf.js} +1 -1
  74. package/dist/{index-DSltrIkA.js → index-B8cXkkGF.js} +1 -1
  75. package/dist/{timezone-DYWqfGTu.js → index-BPV5Dkjl.js} +105 -122
  76. package/dist/{index-D7PksEV2.js → index-BdqanLnJ.js} +675 -677
  77. package/dist/{index-CWAdNVKN.js → index-BnH5UiZx.js} +6 -6
  78. package/dist/{index-v8QQ-4ZP.js → index-C1Bp0PPS.js} +10 -10
  79. package/dist/{index-BhuD1NhH.js → index-CA5atWo4.js} +1 -1
  80. package/dist/{index-ZTYDfSkT.js → index-CZ-SWULS.js} +4 -5
  81. package/dist/{index-CGK1kSCt.js → index-DB13tnmJ.js} +3 -3
  82. package/dist/{index-C0JgU0Z2.js → index-DFLwgFnq.js} +1 -1
  83. package/dist/{index-DCp9k5BB.js → index-DVcOSnAP.js} +2 -2
  84. package/dist/{index-DNdHiAXR.js → index-Dj3FzUo_.js} +18 -2
  85. package/dist/{index-CN5Zoynf.js → index-DyllcNwd.js} +2 -2
  86. package/dist/{index-OaZRtKP_.js → index-JU7Ed3Ex.js} +5 -5
  87. package/dist/{index--6uUWSMc.js → index-Oeiw4Epg.js} +1 -1
  88. package/dist/{index-izVlVA8-.js → index-VzLsGqcm.js} +1 -1
  89. package/dist/{index-DPgGmpyL.js → index-nUrA9Q7e.js} +9 -9
  90. package/dist/{index.esm2017-mpnkyDRb.js → index.esm2017-32NtkXiv.js} +34 -34
  91. package/dist/{loading-BG3Pj6qz.js → loading-CLZ5IFPe.js} +1 -1
  92. package/dist/{lodash-BfDdt-c9.js → lodash-k98YPjFm.js} +1 -1
  93. package/dist/{member-import-BNFdZ3Df.js → member-import-CxNPNPh5.js} +1 -1
  94. package/dist/membership-CjqXHl0l.js +274 -0
  95. package/dist/{money-CRftC-F0.js → money-zJomyMyN.js} +1 -1
  96. package/dist/{number-z7YZyGFS.js → number-BfHmokvl.js} +1 -1
  97. package/dist/object-BYyQ0PZp.js +18 -0
  98. package/dist/{objectid-BKMqp_oR.js → objectid-g-s-CuBk.js} +6 -6
  99. package/dist/{plugins-CWeDGuzy.js → plugins-DNZv50xL.js} +87 -87
  100. package/dist/{reward-BVTKTGi6.js → reward-BefNUdd_.js} +1 -1
  101. package/dist/{rule-YhhCOals.js → rule-DkLIl8GM.js} +3 -3
  102. package/dist/{rule-builder-ae8A0qoi.js → rule-builder-BVyNMiE8.js} +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/{template-CQrM_0hz.js → template-BmSOVHcp.js} +7 -7
  105. package/dist/timezone-DoX-vj_6.js +20 -0
  106. package/dist/transaction.fn-D15eS4nB.js +64 -0
  107. package/dist/{trigger-Clo3vSjw.js → trigger-BhReH6kZ.js} +5 -5
  108. package/dist/{useMarketingMaterialActions-HyqIT94N.js → useMarketingMaterialActions-DdcVqSlV.js} +3 -3
  109. package/dist/{usePagination-CWRrkbFL.js → usePagination-rx2JFS-5.js} +1 -1
  110. package/dist/{user-MVk5s412.js → user-B4gZia2L.js} +1 -1
  111. package/dist/{vue-i18n-BN9KLJoz.js → vue-i18n-JLM70-gr.js} +201 -201
  112. package/dist/{xlsx-s0BxKsa_.js → xlsx-CuKZcLfT.js} +440 -440
  113. package/dist/{zod-H4l78-by.js → zod-ByE_90T4.js} +1 -1
  114. package/package.json +3 -4
  115. package/dist/Analytic-1rqyus1X.js +0 -428
  116. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  117. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  118. package/dist/Game-8nvdSkbi.js +0 -330
  119. package/dist/MemberList-Bf_XyoxW.js +0 -1602
  120. package/dist/Mission-DE4O6XM6.js +0 -334
  121. package/dist/Point-BMEe6duo.js +0 -262
  122. package/dist/Promotion-lamxp48U.js +0 -392
  123. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BxOEEr9-.js +0 -181
  124. package/dist/dto-GksE6pni.js +0 -216
  125. package/dist/membership-tNeaKAeS.js +0 -255
  126. package/dist/object-qECH92oz.js +0 -26
@@ -1,4 +1,4 @@
1
- import { i as Z } from "./plugins-CWeDGuzy.js";
1
+ import { i as Z } from "./plugins-DNZv50xL.js";
2
2
  import { h as f } from "vue";
3
3
  function u(e, o) {
4
4
  return e.path.join(".") === o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-connect",
3
- "version": "0.1.104-prod",
3
+ "version": "0.1.105-prod",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -18,10 +18,9 @@
18
18
  "@ckeditor/ckeditor5-build-classic": "^44.3.0",
19
19
  "@ckeditor/ckeditor5-vue": "^7.3.0",
20
20
  "@feedmepos/core": "2.15.21",
21
- "@feedmepos/menu": "1.0.34",
22
21
  "@feedmepos/hrm-permission": "1.0.14",
23
- "@feedmepos/mf-common": "1.29.23",
24
- "@feedmepos/mf-core-ui": "1.0.26",
22
+ "@feedmepos/mf-common": "1.29.31",
23
+ "@feedmepos/mf-core-ui": "1.0.29",
25
24
  "@feedmepos/ui-library": "1.10.13",
26
25
  "@feedmepos/mf-remy-panel": "0.15.0",
27
26
  "@tailwindcss/typography": "^0.5.16",
@@ -1,428 +0,0 @@
1
- import { defineComponent as I, ref as y, watch as X, onMounted as T, resolveComponent as x, openBlock as d, createBlock as A, withCtx as P, createVNode as b, unref as t, createElementVNode as i, createElementBlock as k, Fragment as $, renderList as D, computed as G, toDisplayString as M, isRef as j, createSlots as Y, createCommentVNode as V, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
2
- import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
- import "./index-CN5Zoynf.js";
4
- import "./campaign-V7nlCdxR.js";
5
- import { useRouter as le } from "vue-router";
6
- import { c as E } from "./index-DNdHiAXR.js";
7
- import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BSKpAMJL.js";
8
- import { Z as se } from "./zod-H4l78-by.js";
9
- import { F as re } from "./dto-GksE6pni.js";
10
- import { J as ie } from "./JsonViewer-v8_C7l5N.js";
11
- import "./index-OaZRtKP_.js";
12
- import { useSnackbar as ue } from "@feedmepos/ui-library";
13
- import { u as ce } from "./app-wDQR6dpb.js";
14
- import { u as me } from "./loading-BG3Pj6qz.js";
15
- import { C as de } from "./campaign.fn-DMDpxVSZ.js";
16
- import { g as pe } from "./object-qECH92oz.js";
17
- import { u as ve } from "./campaign-Ck9GwZdI.js";
18
- import { u as fe } from "./membership-tNeaKAeS.js";
19
- import { u as ye } from "./vue-i18n-BN9KLJoz.js";
20
- import "./member-import-BNFdZ3Df.js";
21
- const ge = { class: "ml-32 flex flex-col" }, _e = /* @__PURE__ */ I({
22
- __name: "CampaignCard",
23
- props: {
24
- title: {},
25
- items: {},
26
- modelValue: {}
27
- },
28
- emits: ["update:model-value"],
29
- setup(U, { emit: g }) {
30
- const c = U, v = g, S = (o) => {
31
- o ? p.value = c.items.map((a) => a.value) : p.value = [], r.value = o, v("update:model-value", p.value);
32
- }, _ = (o) => {
33
- p.value = o, r.value = o.length === c.items.length, v("update:model-value", o);
34
- }, r = y(!1), p = y([]);
35
- return X(
36
- () => c.modelValue,
37
- () => {
38
- p.value = c.modelValue.filter(
39
- (o) => c.items.find((a) => a.value === o)
40
- );
41
- }
42
- ), T(() => {
43
- p.value = c.modelValue.filter(
44
- (o) => c.items.find((a) => a.value === o)
45
- );
46
- }), (o, a) => {
47
- const h = x("FmCheckbox"), l = x("FmCard");
48
- return d(), A(l, {
49
- variant: "outlined",
50
- class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
51
- }, {
52
- default: P(() => [
53
- b(h, {
54
- "model-value": t(r),
55
- value: "1",
56
- label: c.title,
57
- indeterminate: t(p).length > 0,
58
- "onUpdate:modelValue": S
59
- }, null, 8, ["model-value", "label", "indeterminate"]),
60
- i("div", ge, [
61
- (d(!0), k($, null, D(c.items, (n, u) => (d(), A(h, {
62
- key: u,
63
- "model-value": t(p),
64
- label: n.label,
65
- value: n.value,
66
- "onUpdate:modelValue": _
67
- }, null, 8, ["model-value", "label", "value"]))), 128))
68
- ])
69
- ]),
70
- _: 1
71
- });
72
- };
73
- }
74
- }), he = { class: "space-y-16" }, be = { class: "flex items-center" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ce = { class: "space-y-[40px]" }, ke = /* @__PURE__ */ I({
75
- __name: "LinkCampaign",
76
- props: {
77
- modelValue: {
78
- type: Array,
79
- required: !0
80
- },
81
- campaigns: {
82
- type: Object,
83
- required: !0
84
- }
85
- },
86
- emits: ["update:model-value"],
87
- setup(U, { emit: g }) {
88
- const c = y(""), v = y([]), S = U, _ = g, r = G(() => Object.entries(S.campaigns).reduce((o, [a, h]) => {
89
- const l = h.filter(
90
- (n) => n.label.toLowerCase().includes(c.value.toLowerCase())
91
- );
92
- return l.length > 0 && (o[a] = l), o;
93
- }, {}));
94
- function p(o, a) {
95
- v.value = v.value.filter(
96
- (h) => !a.map((l) => l.value).includes(h)
97
- ), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], _("update:model-value", v.value);
98
- }
99
- return T(() => {
100
- v.value = S.modelValue;
101
- }), (o, a) => {
102
- const h = x("FmTextField");
103
- return d(), k($, null, [
104
- b(ie, { json: U.campaigns }, null, 8, ["json"]),
105
- i("div", he, [
106
- i("div", be, [
107
- i("div", xe, M(t(v).length) + " campaign(s) linked ", 1),
108
- b(h, {
109
- modelValue: t(c),
110
- "onUpdate:modelValue": a[0] || (a[0] = (l) => j(c) ? c.value = l : null),
111
- "prepend-icon": "search",
112
- placeholder: "Search",
113
- class: "w-full"
114
- }, null, 8, ["modelValue"])
115
- ]),
116
- i("div", Ce, [
117
- (d(!0), k($, null, D(t(r), (l, n) => (d(), A(_e, {
118
- "model-value": t(v),
119
- title: n,
120
- items: l,
121
- "onUpdate:modelValue": (u) => p(u, l)
122
- }, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
123
- ])
124
- ])
125
- ], 64);
126
- };
127
- }
128
- }), Ve = { class: "flex items-center gap-x-8" }, Se = {
129
- key: 0,
130
- class: "space-y-16 pr-12"
131
- }, we = { class: "flex items-center gap-x-16" }, Fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ae = { class: "mt-16" }, $e = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Ue = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Le = { class: "flex items-center gap-8" }, Pe = /* @__PURE__ */ I({
132
- __name: "AnalyticSheet",
133
- emits: ["success"],
134
- setup(U, { expose: g, emit: c }) {
135
- const v = c, S = ce();
136
- ue();
137
- const _ = y(!1), r = y(!1), p = {
138
- name: "",
139
- campaigns: []
140
- }, o = y(""), a = y({ ...p }), h = re.superRefine((s, e) => {
141
- }), l = y([]), n = y(null), { global: u, minor: w } = me, L = G(() => {
142
- const s = h.safeParse(a.value);
143
- return s.success ? [] : s.error.errors;
144
- });
145
- function B(s) {
146
- var e;
147
- _.value = !0, s ? (n.value = { ...s }, a.value = { ...s, campaigns: (e = s.pf_campaigns) == null ? void 0 : e.map((m) => m._id) }) : (n.value = null, a.value = { ...p });
148
- }
149
- function F() {
150
- _.value = !1, n.value = null;
151
- }
152
- function K() {
153
- r.value = !0;
154
- }
155
- async function q() {
156
- const s = await E.readAll({
157
- limit: 1e3,
158
- skip: 0,
159
- sortBy: "_id",
160
- search: "",
161
- descending: !0
162
- });
163
- l.value = s.resources.filter(
164
- (e) => !["MEMBERSHIP", "REWARD_POOL"].includes(e.type) && !["ISSUE_REWARD"].includes("event" in e ? e == null ? void 0 : e.event.type : "")
165
- );
166
- }
167
- const N = G(() => {
168
- const s = (m) => m.map((C) => ({
169
- label: C.name,
170
- value: C._id
171
- }));
172
- return pe(
173
- l.value,
174
- (m) => de.formattedType(m.type),
175
- s
176
- );
177
- }), J = G(() => Object.entries(N.value).reduce(
178
- (s, [e, m]) => {
179
- const C = m.filter((R) => {
180
- var O, f;
181
- return (f = (O = a.value) == null ? void 0 : O.campaigns) == null ? void 0 : f.includes(R.value);
182
- }).filter(
183
- (R) => R.label.toLowerCase().includes(o.value.toLowerCase())
184
- );
185
- return C.length > 0 && (s[e] = C), s;
186
- },
187
- {}
188
- ));
189
- function W(s) {
190
- var m, C;
191
- const e = (m = a.value.campaigns) == null ? void 0 : m.indexOf(s);
192
- e != null && e > -1 && ((C = a.value.campaigns) == null || C.splice(e, 1));
193
- }
194
- async function Z() {
195
- h.safeParse(a.value).success && await w(
196
- async () => {
197
- var e;
198
- n.value ? await E.updateGroup(
199
- (e = n.value) == null ? void 0 : e._id,
200
- a.value
201
- ) : await E.createGroup(a.value), v("success"), F();
202
- },
203
- {
204
- message: "Saving group",
205
- successMessage: "Group saved"
206
- }
207
- );
208
- }
209
- async function z() {
210
- await w(
211
- async () => {
212
- var s;
213
- await E.deleteGroup((s = n.value) == null ? void 0 : s._id), v("success"), F();
214
- },
215
- {
216
- message: "Deleting group",
217
- successMessage: "Group deleted"
218
- }
219
- );
220
- }
221
- return T(async () => {
222
- await q();
223
- }), g({
224
- showSheet: B,
225
- hideSheet: F
226
- }), (s, e) => {
227
- const m = x("FmButton"), C = x("FmTextField"), R = x("FmList"), O = x("FmSideSheet");
228
- return d(), A(O, {
229
- modelValue: t(_),
230
- "onUpdate:modelValue": e[7] || (e[7] = (f) => j(_) ? _.value = f : null),
231
- header: t(n) ? "Edit group" : "Add group",
232
- "dismiss-away": "",
233
- "close-button": !0,
234
- "max-width": 550
235
- }, Y({
236
- "side-sheet-footer": P(() => [
237
- i("div", Le, [
238
- t(r) ? V("", !0) : (d(), k($, { key: 0 }, [
239
- b(m, {
240
- label: "Submit",
241
- onClick: Z,
242
- disabled: t(L).length > 0 || t(S).isLoading
243
- }, null, 8, ["disabled"]),
244
- b(m, {
245
- label: "Cancel",
246
- onClick: e[4] || (e[4] = (f) => F()),
247
- variant: "tertiary"
248
- }),
249
- t(n) ? (d(), A(m, {
250
- key: 0,
251
- label: "Delete",
252
- variant: "plain",
253
- class: "ml-auto fm-color-system-error-300",
254
- onClick: e[5] || (e[5] = (f) => z())
255
- })) : V("", !0)
256
- ], 64)),
257
- t(r) ? (d(), A(m, {
258
- key: 1,
259
- label: "Confirm",
260
- onClick: e[6] || (e[6] = (f) => r.value = !1)
261
- })) : V("", !0)
262
- ])
263
- ]),
264
- default: P(() => [
265
- t(r) ? V("", !0) : (d(), k("div", Se, [
266
- e[9] || (e[9] = i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1)),
267
- b(oe, {
268
- modelValue: t(a).name,
269
- "onUpdate:modelValue": e[1] || (e[1] = (f) => t(a).name = f),
270
- label: "Name",
271
- schema: t(se).typeAtPath(t(h), "name")
272
- }, null, 8, ["modelValue", "schema"]),
273
- e[10] || (e[10] = i("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1)),
274
- i("div", we, [
275
- i("div", Fe, M(t(a).campaigns.length) + " campaign(s) linked ", 1),
276
- b(C, {
277
- modelValue: t(o),
278
- "onUpdate:modelValue": e[2] || (e[2] = (f) => j(o) ? o.value = f : null),
279
- "prepend-icon": "search",
280
- placeholder: "Search",
281
- class: "w-auto"
282
- }, null, 8, ["modelValue"])
283
- ]),
284
- b(m, {
285
- variant: "plain",
286
- icon: "link",
287
- label: "Link Campaign",
288
- onClick: K
289
- })
290
- ])),
291
- t(r) ? (d(), A(ke, {
292
- key: 1,
293
- modelValue: t(a).campaigns,
294
- "onUpdate:modelValue": e[3] || (e[3] = (f) => t(a).campaigns = f),
295
- campaigns: t(N)
296
- }, null, 8, ["modelValue", "campaigns"])) : V("", !0),
297
- i("div", Ae, [
298
- t(r) ? V("", !0) : (d(!0), k($, { key: 0 }, D(t(J), (f, Q) => (d(), k("div", null, [
299
- i("div", $e, M(Q), 1),
300
- b(R, { separator: !0 }, {
301
- default: P(() => [
302
- (d(!0), k($, null, D(f, (H) => (d(), k("div", Ue, [
303
- i("div", null, M(H.label), 1),
304
- i("div", null, [
305
- b(m, {
306
- icon: "delete",
307
- onClick: (Oe) => W(H.value),
308
- variant: "tertiary"
309
- }, null, 8, ["onClick"])
310
- ])
311
- ]))), 256))
312
- ]),
313
- _: 2
314
- }, 1024)
315
- ]))), 256))
316
- ])
317
- ]),
318
- _: 2
319
- }, [
320
- t(r) ? {
321
- name: "side-sheet-header",
322
- fn: P(() => [
323
- i("div", Ve, [
324
- b(m, {
325
- icon: "arrow_back",
326
- variant: "tertiary",
327
- onClick: e[0] || (e[0] = (f) => r.value = !1)
328
- }),
329
- e[8] || (e[8] = ee("Link campaign ", -1))
330
- ])
331
- ]),
332
- key: "0"
333
- } : void 0
334
- ]), 1032, ["modelValue", "header"]);
335
- };
336
- }
337
- }), Ge = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Me = { class: "space-y-16" }, Be = { class: "flex items-center justify-end" }, Re = { class: "fm-typo-en-title-sm-800 text-center" }, Ee = { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ I({
338
- __name: "Analytic",
339
- setup(U) {
340
- const { t: g } = ye(), c = {
341
- label: g("connect.analytic.addGroup"),
342
- value: "create",
343
- isPrimary: !0,
344
- prependIcon: "add"
345
- }, v = ve(), S = y(), _ = y([]), r = y(""), p = te({
346
- totalCampaign: 0,
347
- totalProgram: 0,
348
- totalMember: 0
349
- }), o = y("1");
350
- g("connect.analytic.summary.totalCampaign"), g("connect.analytic.summary.totalProgram"), g("connect.analytic.summary.totalMember");
351
- function a(n) {
352
- var u;
353
- o.value = (/* @__PURE__ */ new Date()).toISOString(), (u = S.value) == null || u.showSheet(n);
354
- }
355
- async function h() {
356
- await v.readGroups();
357
- const n = await E.readAllGrouped({
358
- limit: 100,
359
- skip: 0,
360
- sortBy: "_id",
361
- search: "",
362
- descending: !0
363
- });
364
- _.value = n.resources;
365
- }
366
- G(() => _.value.filter((n) => {
367
- var u;
368
- return n.name.includes(r.value) || ((u = n.pf_campaigns) == null ? void 0 : u.filter((w) => w.name.includes(r.value)).length);
369
- }));
370
- const l = fe();
371
- return le(), y(!0), G(() => {
372
- var n, u, w, L;
373
- return !l.storeOption || !l.storeOption.company ? -1 : !l.payoutAccount || !l.payoutAccount.enable || l.payoutAccount.status != "APPROVED" ? 0 : (u = (n = l.store) == null ? void 0 : n.categories) != null && u.length ? (L = (w = l.store) == null ? void 0 : w.categories) != null && L.some(
374
- (B) => B.bundles.some((F) => F.isFeedvibe)
375
- ) ? 3 : 2 : 1;
376
- }), ae(async () => {
377
- await l.readMemberStore(), await l.readMembership(), await l.readPayoutAccount();
378
- }), (n, u) => {
379
- const w = x("FmPageHead"), L = x("FmSearch"), B = x("FmCard");
380
- return x("FmButton"), x("FmIcon"), d(), k($, null, [
381
- b(w, {
382
- title: t(g)("connect.analytic.title"),
383
- actions: t(_).length > 0 ? [c] : [],
384
- "onClick:action": u[0] || (u[0] = (F) => a())
385
- }, null, 8, ["title", "actions"]),
386
- i("div", Ge, [
387
- i("div", Me, [
388
- i("div", Be, [
389
- b(L, {
390
- class: "xs:hidden",
391
- modelValue: t(r),
392
- "onUpdate:modelValue": u[1] || (u[1] = (F) => j(r) ? r.value = F : null),
393
- placeholder: t(g)("connect.analytic.search"),
394
- collapsible: ""
395
- }, null, 8, ["modelValue", "placeholder"])
396
- ]),
397
- V("", !0)
398
- ]),
399
- V("", !0),
400
- t(_).length ? V("", !0) : (d(), A(B, {
401
- key: 1,
402
- variant: "outlined",
403
- class: "flex flex-col gap-y-24 items-center p-16"
404
- }, {
405
- default: P(() => [
406
- u[7] || (u[7] = i("img", {
407
- src: ne,
408
- class: "w-[150px]"
409
- }, null, -1)),
410
- i("div", Re, M(t(g)("connect.analytic.maintenance.title")), 1),
411
- i("div", Ee, M(t(g)("connect.analytic.maintenance.description")), 1)
412
- ]),
413
- _: 1
414
- })),
415
- V("", !0),
416
- b(Pe, {
417
- ref_key: "sheetRef",
418
- ref: S,
419
- onSuccess: h
420
- }, null, 512)
421
- ])
422
- ], 64);
423
- };
424
- }
425
- });
426
- export {
427
- ot as default
428
- };
@@ -1,58 +0,0 @@
1
- import { defineComponent as f, mergeModels as l, useModel as g, computed as u, onMounted as _, watch as R, resolveComponent as m, openBlock as h, createBlock as V, withCtx as b, createVNode as k, unref as y } from "vue";
2
- import { h as t } from "./moment-D7p2TMB-.js";
3
- const a = "YYYY-MM-DD", F = /* @__PURE__ */ f({
4
- __name: "DateRangeChip",
5
- props: /* @__PURE__ */ l({
6
- modelValue: {
7
- type: Object,
8
- required: !0
9
- }
10
- }, {
11
- dateRange: {
12
- type: Object,
13
- default: () => ({
14
- startDate: t().subtract(7, "day").format(a),
15
- endDate: t().endOf("day").format(a)
16
- })
17
- },
18
- dateRangeModifiers: {}
19
- }),
20
- emits: /* @__PURE__ */ l(["update:model-value"], ["update:dateRange"]),
21
- setup(r, { emit: s }) {
22
- const o = r, c = s, e = g(r, "dateRange"), i = u(() => e.value ? `${n.value.startDate ?? "Start"} - ${n.value.endDate ?? "End"}` : "No dates selected."), n = u(() => ({
23
- startDate: e.value.startDate ? t(e.value.startDate).format(a) : void 0,
24
- endDate: e.value.endDate ? t(e.value.endDate).format(a) : void 0
25
- }));
26
- return _(() => {
27
- e.value = {
28
- startDate: o.modelValue.startDate ? t(o.modelValue.startDate).format(a) : void 0,
29
- endDate: o.modelValue.endDate ? t(o.modelValue.endDate).format(a) : void 0
30
- };
31
- }), R(
32
- () => e.value,
33
- () => {
34
- c("update:model-value", n.value);
35
- }
36
- ), (C, d) => {
37
- const p = m("FmChip"), D = m("FmDateRangePicker");
38
- return h(), V(D, {
39
- modelValue: e.value,
40
- "onUpdate:modelValue": d[0] || (d[0] = (v) => e.value = v),
41
- "show-predefined-range": ""
42
- }, {
43
- "trigger-button": b(() => [
44
- k(p, {
45
- label: y(i),
46
- icon: "calendar_month",
47
- "right-icon": "keyboard_arrow_down",
48
- class: "text-fm-color-neutral-gray-400 cursor-pointer"
49
- }, null, 8, ["label"])
50
- ]),
51
- _: 1
52
- }, 8, ["modelValue"]);
53
- };
54
- }
55
- });
56
- export {
57
- F as _
58
- };
@@ -1,129 +0,0 @@
1
- import { defineComponent as j, ref as i, computed as g, onMounted as B, resolveComponent as r, openBlock as m, createBlock as c, unref as o, withCtx as p, createVNode as v, normalizeClass as f, createCommentVNode as k, createElementVNode as L, toDisplayString as F, isRef as M, createElementBlock as O, Fragment as A, renderList as N } from "vue";
2
- const z = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ j({
3
- __name: "FilterChip",
4
- props: {
5
- modelValue: {
6
- type: Array,
7
- required: !1
8
- },
9
- label: {
10
- type: String,
11
- required: !1,
12
- default: ""
13
- },
14
- showItemLabel: {
15
- type: Boolean,
16
- default: !1
17
- },
18
- placement: {
19
- type: String,
20
- required: !1,
21
- default: "bottom-end"
22
- },
23
- class: {
24
- type: String,
25
- required: !1
26
- },
27
- disabled: {
28
- type: Boolean,
29
- required: !1
30
- },
31
- items: {
32
- type: Array,
33
- required: !0
34
- },
35
- icon: {
36
- type: String,
37
- required: !1
38
- },
39
- searchable: {
40
- type: Boolean,
41
- required: !1,
42
- default: !0
43
- }
44
- },
45
- emits: ["update:model-value"],
46
- setup(u, { emit: C }) {
47
- const t = u, b = C, d = i(!1), l = i({}), s = i(""), V = g(() => {
48
- const e = Object.keys(l.value).length;
49
- return !l.value || Object.keys(l.value).length == t.items.length || e === 0 ? "All" : `${e > 0 ? e : "None"} selected`;
50
- });
51
- function w(e) {
52
- l.value[e] ? delete l.value[e] : l.value[e] = !0, b("update:model-value", Object.keys(l.value));
53
- }
54
- function _() {
55
- Object.keys(l.value).length > 0 ? l.value = {} : l.value = t.items.reduce((e, n) => (e[n.value] = !0, e), {}), b("update:model-value", Object.keys(l.value));
56
- }
57
- const x = g(() => s.value && s.value.length > 0 ? t.items.filter(
58
- (e) => e.label.toLowerCase().includes(s.value.trim().toLowerCase())
59
- ) : t.items);
60
- return B(() => {
61
- l.value = t.modelValue.reduce(
62
- (e, n) => (e[n] = !0, e),
63
- {}
64
- ), t.modelValue.length == 0;
65
- }), (e, n) => {
66
- const y = r("FmIcon"), q = r("FmChip"), I = r("FmTextField"), h = r("FmMenuItem"), S = r("FmMenu");
67
- return m(), c(S, {
68
- placement: u.placement || "bottom-end",
69
- disabled: u.disabled == !0,
70
- "model-value": o(d),
71
- onMenuChanged: n[1] || (n[1] = (a) => d.value = a),
72
- "close-on-click": !1
73
- }, {
74
- "menu-button": p(() => [
75
- v(q, {
76
- label: u.label,
77
- class: f(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
78
- }, {
79
- default: p(() => [
80
- t.icon ? (m(), c(y, {
81
- key: 0,
82
- name: t.icon,
83
- class: f(t.class),
84
- outline: "",
85
- size: "sm"
86
- }, null, 8, ["name", "class"])) : k("", !0),
87
- L("div", z, F(t.label) + " " + F(u.showItemLabel ? o(V) : ""), 1),
88
- v(y, {
89
- name: o(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
90
- class: f(t.class),
91
- outline: "",
92
- size: "sm"
93
- }, null, 8, ["name", "class"])
94
- ]),
95
- _: 1
96
- }, 8, ["label", "class"])
97
- ]),
98
- default: p(() => [
99
- u.searchable ? (m(), c(I, {
100
- key: 0,
101
- modelValue: o(s),
102
- "onUpdate:modelValue": n[0] || (n[0] = (a) => M(s) ? s.value = a : null),
103
- placeholder: "Search locations",
104
- class: "my-8"
105
- }, null, 8, ["modelValue"])) : k("", !0),
106
- v(h, {
107
- "model-value": Object.keys(o(l)).length === t.items.length,
108
- label: "All",
109
- "has-checkbox": !0,
110
- indeterminate: !0,
111
- onClick: _
112
- }, null, 8, ["model-value"]),
113
- (m(!0), O(A, null, N(o(x) ?? [], (a) => (m(), c(h, {
114
- key: a.value,
115
- value: a.value,
116
- label: a.label,
117
- "has-checkbox": !0,
118
- "model-value": o(l)[a.value],
119
- "onUpdate:modelValue": (T) => w(a.value)
120
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
121
- ]),
122
- _: 1
123
- }, 8, ["placement", "disabled", "model-value"]);
124
- };
125
- }
126
- });
127
- export {
128
- E as _
129
- };