@feedmepos/mf-connect 0.1.48-prod → 0.1.50-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 (96) hide show
  1. package/dist/{Analytic-DrjBaKmx.js → Analytic-DetQY5GC.js} +11 -11
  2. package/dist/{App-eIaytGsZ.js → App-BKAkMGZw.js} +7 -7
  3. package/dist/{Bin-CVp0eFwl.js → Bin-DqWL1Uxx.js} +8 -8
  4. package/dist/Broadcast-8QF-MUmN.js +233 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CugJWeBo.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7hZS2PW.js} +6 -6
  6. package/dist/{Card-DkP6oJVn.js → Card-sor9JviQ.js} +16 -16
  7. package/dist/{Collections-DYb_aeTW.js → Collections-C0Db6mEj.js} +7 -7
  8. package/dist/Credit-rEapztLw.js +228 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BmBKIEVi.js} +30 -30
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js → EffectSheet.vue_vue_type_style_index_0_lang-CurNXC5g.js} +6 -6
  11. package/dist/Experience--KRaE_Li.js +229 -0
  12. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  13. package/dist/{Game-C7jxRESY.js → Game-DAkkgwzf.js} +103 -97
  14. package/dist/{Index-DYr1p4sh.js → Index-DU5r6mjQ.js} +10 -10
  15. package/dist/{Marketing-Djl27fez.js → Marketing-Ct5vKaig.js} +6 -6
  16. package/dist/{Member-CWXedfTG.js → Member-Dc4-BH4L.js} +10 -10
  17. package/dist/{MemberList-C2TvGi22.js → MemberList-CxwklJTB.js} +25 -25
  18. package/dist/{MemberTransactions-BSUocGg9.js → MemberTransactions-CwzDZAl2.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js → MessageInput.vue_vue_type_script_setup_true_lang-CPQt4nvp.js} +7 -7
  20. package/dist/{Mission-BVx9Cqi5.js → Mission-Bn1aqRYm.js} +112 -106
  21. package/dist/{Overview-DyXF9zfB.js → Overview-Dx-7fuPI.js} +18 -18
  22. package/dist/Point-sitkRn9W.js +232 -0
  23. package/dist/{Promotion-B0Q6GItP.js → Promotion-Gfnd0zqz.js} +11 -11
  24. package/dist/{Queue-BAWG1Hh-.js → Queue-r2m3kpfO.js} +11 -11
  25. package/dist/{Record-CTp80g4A.js → Record-C2lwWPrY.js} +8 -8
  26. package/dist/{Reward-_Jow1lJ7.js → Reward-6_bESA4r.js} +15 -15
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BV8xCejA.js → RewardGroup.vue_vue_type_script_setup_true_lang-S_jJxZYB.js} +11 -11
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js → RuleGroup.vue_vue_type_script_setup_true_lang-dK8IcQjI.js} +13 -13
  29. package/dist/{Segment-CsdJ1SjK.js → Segment-CIKgedqx.js} +22 -22
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DH3oIm2t.js → SelectItems.vue_vue_type_script_setup_true_lang-Co6QzIYj.js} +2 -2
  31. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DvVrjpxR.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-y2UFm_m_.js} +11 -11
  32. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5gV89Xk.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DZDWIry7.js} +3 -3
  33. package/dist/{Setting-BZRA50LO.js → Setting-k_xmt5bE.js} +11 -11
  34. package/dist/{Store-CFnCN_7-.js → Store-Ag9cJqq5.js} +19 -19
  35. package/dist/{StoreRewards-B_McpBz-.js → StoreRewards-RO9OsV_l.js} +13 -13
  36. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-vL0vr-Xn.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BmBZgPtR.js} +20 -20
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BNtW7Fdv.js} +1 -1
  38. package/dist/{Tier-CCYFu6kJ.js → Tier-Cm-xmOeT.js} +20 -20
  39. package/dist/{Title-7Mg-Ml4z.js → Title-IRrmK7t7.js} +19 -19
  40. package/dist/{Transaction-BqZrbpZi.js → Transaction-BaGLhfdx.js} +2 -2
  41. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BP1HZcmM.js} +6 -6
  42. package/dist/{Voucher-Yty_7SuS.js → Voucher-BvH508SF.js} +14 -14
  43. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BRbpOzoW.js} +10 -10
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js → ZodTextField.vue_vue_type_script_setup_true_lang-BO13CzIt.js} +1 -1
  45. package/dist/{app-2EJP4psh.js → app-CoIOKtZT.js} +30 -30
  46. package/dist/{app-Dzon--6x.js → app-DInntAeW.js} +1 -1
  47. package/dist/app.js +1 -1
  48. package/dist/{business-BehG4fR2.js → business-CEezohK9.js} +11 -8
  49. package/dist/{campaign-CAcP56Sz.js → campaign-BiJIXVFh.js} +2 -2
  50. package/dist/{campaign-BpaiTG4f.js → campaign-DN4wRHB1.js} +9 -9
  51. package/dist/{campaign.enum-BWjI8Hop.js → campaign.enum-B1ofvKe0.js} +1 -1
  52. package/dist/{campaign.fn-PVdB1-V1.js → campaign.fn-CHOnx0h3.js} +33 -33
  53. package/dist/{collectible.enum-BYmuqayi.js → collectible.enum-DCJQ4kRG.js} +1 -1
  54. package/dist/{collection.fn-CbH8hbWW.js → collection.fn-DDUQOBpT.js} +2 -2
  55. package/dist/{dto-Dd3Oc4QO.js → dto-PJfDH2ob.js} +4 -4
  56. package/dist/{effect-DvEQNEl0.js → effect-BG3qfaJa.js} +1 -1
  57. package/dist/{email-addresses-C-9JrAi8.js → email-addresses-_qAqETU4.js} +1 -1
  58. package/dist/{export-RWE9Cn-d.js → export-BkXHJNqp.js} +3 -3
  59. package/dist/{helper-Bl6LdWED.js → helper-DURbnPWw.js} +1 -1
  60. package/dist/{index-BCQMVr1J.js → index-0vL_6ITj.js} +1 -1
  61. package/dist/{index-wOExBjGo.js → index-B-sSLyBV.js} +1 -1
  62. package/dist/{index-DX1X6Owa.js → index-BAmB5yiT.js} +1 -1
  63. package/dist/{index-G_XSbrXB.js → index-BZ64wqfO.js} +4 -4
  64. package/dist/{index-Bgnrbk5x.js → index-BnIQoKWu.js} +1 -1
  65. package/dist/{index-CFW9ogow.js → index-DO21OBbC.js} +1 -1
  66. package/dist/{index-DhUvELhc.js → index-DX-ycdBx.js} +3 -3
  67. package/dist/{index-VVy4GPzJ.js → index-D_UkMUVu.js} +1 -1
  68. package/dist/{index-DpoNuVc-.js → index-DyqlTP2f.js} +6 -6
  69. package/dist/{index-CfgczUMX.js → index-KuVAb425.js} +2 -2
  70. package/dist/{index-1bU9cLqV.js → index-cdBSUDQZ.js} +1 -1
  71. package/dist/{index-CzCqc7ph.js → index-ckRnO0P8.js} +1 -1
  72. package/dist/{index-DZN5WWgq.js → index-iqGVdsb3.js} +3 -3
  73. package/dist/{index-Bjf5Z2QE.js → index-wBtnVW6-.js} +4 -4
  74. package/dist/{index.esm2017-DfgZFSqe.js → index.esm2017-xsA1Ke9N.js} +40 -40
  75. package/dist/{loading-qlqqYGF3.js → loading-JUECGK_w.js} +1 -1
  76. package/dist/{membership-Bh_1iu5v.js → membership-3dOL9I-2.js} +3 -3
  77. package/dist/{money-DvTB_Fek.js → money-Bj8WRBgr.js} +1 -1
  78. package/dist/{number-DJQ3gi1P.js → number-C3eoGwAF.js} +1 -1
  79. package/dist/objectid-BbM7wSa-.js +145 -0
  80. package/dist/{plugins-DJpBrPbQ.js → plugins-CihdO0FL.js} +2 -2
  81. package/dist/{reward-DZ4KlN9B.js → reward-B7voCFtP.js} +1 -1
  82. package/dist/{rule-DV0yCGlq.js → rule-CRac4es-.js} +3 -3
  83. package/dist/{rule-builder-D6ihVPNO.js → rule-builder-PIKcs0df.js} +1 -1
  84. package/dist/{template-ElP-JIFL.js → template-DkXoHjc6.js} +4 -4
  85. package/dist/{timezone-FaHjut_D.js → timezone-gOOWBZ0e.js} +1 -1
  86. package/dist/{trigger-D8wnJVTA.js → trigger-ByWt9UsS.js} +4 -4
  87. package/dist/{user-NWV9KppR.js → user-HwAeHnO-.js} +1 -1
  88. package/dist/{vue-i18n-CkbS-IDD.js → vue-i18n-BlWI3iG4.js} +247 -247
  89. package/dist/{xlsx-CdQE5RZi.js → xlsx-Cdgu-2pL.js} +1 -1
  90. package/package.json +1 -1
  91. package/dist/Broadcast-DBgBT6yz.js +0 -227
  92. package/dist/Credit-WVv_PL5D.js +0 -222
  93. package/dist/Experience-BdH44wBG.js +0 -223
  94. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  95. package/dist/Point-ovkgTwZO.js +0 -226
  96. package/dist/objectid-BKU0cEuv.js +0 -145
@@ -1,42 +1,42 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createCommentVNode, computed, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, toRefs, normalizeStyle, resolveDynamicComponent, createSlots } from "vue";
2
2
  import { _ } from "./lodash-B5I3zXaY.js";
3
- import { z } from "./app-2EJP4psh.js";
3
+ import { z } from "./app-CoIOKtZT.js";
4
4
  import { Z as ZodHelper } from "./zod-Bg2FbC-D.js";
5
- import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-BpaiTG4f.js";
6
- import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-Dd3Oc4QO.js";
7
- import { u as useMembershipStore } from "./membership-Bh_1iu5v.js";
8
- import { u as useBusinessStore } from "./business-BehG4fR2.js";
9
- import "./index-CfgczUMX.js";
10
- import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-D6ihVPNO.js";
5
+ import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-DN4wRHB1.js";
6
+ import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-PJfDH2ob.js";
7
+ import { u as useMembershipStore } from "./membership-3dOL9I-2.js";
8
+ import { u as useBusinessStore } from "./business-CEezohK9.js";
9
+ import "./index-KuVAb425.js";
10
+ import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-PIKcs0df.js";
11
11
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
12
12
  import { h as hooks } from "./moment-D7p2TMB-.js";
13
- import { f as featureVersionMapping } from "./campaign.enum-BWjI8Hop.js";
13
+ import { f as featureVersionMapping } from "./campaign.enum-B1ofvKe0.js";
14
14
  import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
15
- import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js";
16
- import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js";
17
- import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js";
18
- import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js";
19
- import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-DJpBrPbQ.js";
20
- import { u as useI18n } from "./vue-i18n-CkbS-IDD.js";
21
- import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-D8wnJVTA.js";
22
- import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js";
23
- import { C as CountryTimezone, m as moment } from "./timezone-FaHjut_D.js";
24
- import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-DV0yCGlq.js";
15
+ import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-CurNXC5g.js";
16
+ import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BNtW7Fdv.js";
17
+ import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-BP1HZcmM.js";
18
+ import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-dK8IcQjI.js";
19
+ import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-CihdO0FL.js";
20
+ import { u as useI18n } from "./vue-i18n-BlWI3iG4.js";
21
+ import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-ByWt9UsS.js";
22
+ import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-CPQt4nvp.js";
23
+ import { C as CountryTimezone, m as moment } from "./timezone-gOOWBZ0e.js";
24
+ import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-CRac4es-.js";
25
25
  import { useCoreStore } from "@feedmepos/mf-common";
26
- import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js";
27
- import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-Bjf5Z2QE.js";
28
- import { T as TEMPLATES } from "./index-DpoNuVc-.js";
29
- import "./index-CFW9ogow.js";
30
- import "./index-DZN5WWgq.js";
31
- import { a as F_GAME_TYPE } from "./collectible.enum-BYmuqayi.js";
32
- import { u as useLoading } from "./loading-qlqqYGF3.js";
33
- import { i as initCollectibleConfig } from "./helper-Bl6LdWED.js";
34
- import { C as CollectionUtils } from "./collection.fn-CbH8hbWW.js";
26
+ import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BRbpOzoW.js";
27
+ import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-wBtnVW6-.js";
28
+ import { T as TEMPLATES } from "./index-DyqlTP2f.js";
29
+ import "./index-DO21OBbC.js";
30
+ import "./index-iqGVdsb3.js";
31
+ import { a as F_GAME_TYPE } from "./collectible.enum-DCJQ4kRG.js";
32
+ import { u as useLoading } from "./loading-JUECGK_w.js";
33
+ import { i as initCollectibleConfig } from "./helper-DURbnPWw.js";
34
+ import { C as CollectionUtils } from "./collection.fn-DDUQOBpT.js";
35
35
  import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
36
- import "./index-DhUvELhc.js";
36
+ import "./index-DX-ycdBx.js";
37
37
  import { useDialog } from "@feedmepos/ui-library";
38
- import { u as useCampaignStore } from "./campaign-CAcP56Sz.js";
39
- import { S as SvcConfig } from "./index-G_XSbrXB.js";
38
+ import { u as useCampaignStore } from "./campaign-BiJIXVFh.js";
39
+ import { S as SvcConfig } from "./index-BZ64wqfO.js";
40
40
  import { a as cleanPF } from "./object-qECH92oz.js";
41
41
  const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
42
42
  __name: "TimeRuleGroup",
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as P, ref as O, 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 R, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-2EJP4psh.js";
2
+ import { z as te } from "./app-CoIOKtZT.js";
3
3
  import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { f as le, g as oe } from "./index-CfgczUMX.js";
5
- import { u as Z } from "./vue-i18n-CkbS-IDD.js";
6
- import { s as C } from "./effect-DvEQNEl0.js";
7
- import { p as ae } from "./plugins-DJpBrPbQ.js";
8
- import { e as ne } from "./app-Dzon--6x.js";
4
+ import { f as le, g as oe } from "./index-KuVAb425.js";
5
+ import { u as Z } from "./vue-i18n-BlWI3iG4.js";
6
+ import { s as C } from "./effect-BG3qfaJa.js";
7
+ import { p as ae } from "./plugins-CihdO0FL.js";
8
+ import { e as ne } from "./app-DInntAeW.js";
9
9
  const ie = { class: "flex flex-col gap-8" }, se = {
10
10
  key: 0,
11
11
  class: "fm-typo-en-body-lg-600"
@@ -0,0 +1,229 @@
1
+ import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as x, createVNode as i, unref as o, createElementVNode as a, withCtx as h, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as u, h as q } from "vue";
2
+ import { _ as z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
+ import { p as Q } from "./plugins-CihdO0FL.js";
5
+ import { u as W } from "./loading-JUECGK_w.js";
6
+ import { u as X } from "./business-CEezohK9.js";
7
+ import { u as Y } from "./campaign-BiJIXVFh.js";
8
+ import { a as L, b as V, g as Z } from "./campaign-DN4wRHB1.js";
9
+ import { u as ee } from "./vue-i18n-BlWI3iG4.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-BmBKIEVi.js";
12
+ import { u as ne } from "./template-DkXoHjc6.js";
13
+ import { c as g } from "./index-0vL_6ITj.js";
14
+ const ae = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ E({
15
+ __name: "Experience",
16
+ setup(_e) {
17
+ const { t: r } = ee(), P = {
18
+ label: r("connect.program.common.actions.create", {
19
+ type: r("connect.program.experience.title").toLowerCase()
20
+ }),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, B = ne("POINT", G()), I = X(), d = Y(), { global: T, minor: v } = W, s = S({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function $(e) {
29
+ const t = s.value.location;
30
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
31
+ var c;
32
+ return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
33
+ }) : e.targetLocation.includes(t);
34
+ }
35
+ const f = U(
36
+ () => d.campaigns.experience.filter((e) => $(e))
37
+ ), K = [
38
+ {
39
+ header: "Program title",
40
+ accessorFn: (e) => e.name
41
+ },
42
+ {
43
+ header: "Status",
44
+ accessorFn: (e) => Z(e),
45
+ cell(e) {
46
+ return L(e.row.original);
47
+ }
48
+ },
49
+ {
50
+ header: "Summary",
51
+ accessorFn: (e) => V(e)
52
+ //v.effect,
53
+ },
54
+ {
55
+ header: "Actions",
56
+ cell(e) {
57
+ return q(J.FmButton, {
58
+ variant: "tertiary",
59
+ icon: "delete",
60
+ iconColor: "neutral-gray-400",
61
+ onClick: (t) => {
62
+ t.stopPropagation(), C(e.row.original);
63
+ }
64
+ });
65
+ }
66
+ }
67
+ ], b = S();
68
+ async function C(e) {
69
+ await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
70
+ async () => {
71
+ await g.delete(e._id), await d.read("POINT");
72
+ },
73
+ {
74
+ message: `Removing ${e.name}`,
75
+ successMessage: `Removed ${e.name} successfully`
76
+ }
77
+ );
78
+ }
79
+ async function y(e) {
80
+ e ? await t() : B.open(async (l) => {
81
+ await t(l);
82
+ });
83
+ async function t(l) {
84
+ var c;
85
+ (c = b.value) == null || c.showSheet(
86
+ !0,
87
+ "POINT",
88
+ e ? await g.readById(e._id) : void 0,
89
+ l
90
+ );
91
+ }
92
+ }
93
+ async function N(e) {
94
+ await v(
95
+ async () => {
96
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await d.read("POINT");
97
+ },
98
+ {
99
+ message: r("connect.program.common.update.updating", {
100
+ type: r("connect.program.experience.title")
101
+ }),
102
+ successMessage: r("connect.program.common.update.success", {
103
+ type: r("connect.program.experience.title"),
104
+ action: e.campaign._id ? "updated" : "created"
105
+ })
106
+ }
107
+ );
108
+ }
109
+ return j(async () => {
110
+ await T(async () => {
111
+ await d.read("POINT");
112
+ });
113
+ }), (e, t) => {
114
+ const l = m("FmPageHead"), c = m("FmSearch"), R = m("FmTable"), F = m("FmButton"), A = m("FmListItem"), O = m("FmList"), D = m("FmCard");
115
+ return p(), _(x, null, [
116
+ i(l, {
117
+ title: o(r)("connect.program.experience.title"),
118
+ actions: o(f).length > 0 ? [P] : [],
119
+ "onClick:action": t[0] || (t[0] = () => y())
120
+ }, null, 8, ["title", "actions"]),
121
+ a("div", ae, [
122
+ i(c, {
123
+ modelValue: o(s).searchKey,
124
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => o(s).searchKey = n),
125
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
126
+ placeholder: o(r)("connect.program.common.search"),
127
+ collapsible: ""
128
+ }, null, 8, ["modelValue", "placeholder"]),
129
+ o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(x, { key: 0 }, [
130
+ a("div", re, [
131
+ a("div", se, [
132
+ i(te, {
133
+ label: `${o(r)("connect.common.location")}: `,
134
+ "right-icon": "keyboard_arrow_down",
135
+ modelValue: o(s).location,
136
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => o(s).location = n),
137
+ icon: "storefront",
138
+ "show-item-label": !0,
139
+ items: o(I).locationOptions
140
+ }, null, 8, ["label", "modelValue", "items"])
141
+ ]),
142
+ i(c, {
143
+ modelValue: o(s).searchKey,
144
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => o(s).searchKey = n),
145
+ class: "xs:hidden",
146
+ placeholder: "search",
147
+ collapsible: ""
148
+ }, null, 8, ["modelValue"])
149
+ ]),
150
+ i(R, {
151
+ class: "xs:hidden",
152
+ "row-data": o(f),
153
+ "column-defs": K,
154
+ "search-value": o(s).searchKey,
155
+ "column-filter": [],
156
+ onRowClick: t[4] || (t[4] = (n) => y(n.original)),
157
+ "hide-footer": o(f).length < 10
158
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
159
+ i(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
160
+ default: h(() => [
161
+ (p(!0), _(x, null, M(o(f).filter(
162
+ (n) => n.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
163
+ ), (n) => (p(), w(A, {
164
+ key: n._id.toString(),
165
+ onClick: (k) => y(n),
166
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
167
+ }, {
168
+ default: h(() => [
169
+ a("div", ie, [
170
+ a("div", ce, [
171
+ (p(), w(H(o(L)(n)))),
172
+ a("div", le, u(n.currentReceive ?? 0) + " used ", 1)
173
+ ]),
174
+ a("div", me, [
175
+ a("div", de, u(n.name), 1),
176
+ a("div", pe, u(o(V)(n)), 1)
177
+ ]),
178
+ a("div", ue, u(o(r)("connect.program.experience.received", {
179
+ count: n.currentReceive ?? 0
180
+ })), 1)
181
+ ]),
182
+ i(F, {
183
+ icon: "delete",
184
+ "icon-color": "neutral-gray-400",
185
+ variant: "tertiary",
186
+ onClick: (k) => (k.stopPropagation(), C(n))
187
+ }, null, 8, ["onClick"])
188
+ ]),
189
+ _: 2
190
+ }, 1032, ["onClick"]))), 128))
191
+ ]),
192
+ _: 1
193
+ })
194
+ ], 64)) : (p(), w(D, {
195
+ key: 1,
196
+ variant: "outlined",
197
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
198
+ }, {
199
+ default: h(() => [
200
+ t[6] || (t[6] = a("img", {
201
+ src: z,
202
+ class: "aspect-square w-[150px]"
203
+ }, null, -1)),
204
+ a("div", fe, [
205
+ a("div", ye, u(o(r)("connect.program.experience.empty_state.title")), 1),
206
+ a("div", ge, u(o(r)("connect.program.experience.empty_state.description")), 1)
207
+ ]),
208
+ i(F, {
209
+ variant: "primary",
210
+ label: "Create experience program",
211
+ icon: "add",
212
+ onClick: t[5] || (t[5] = (n) => y())
213
+ })
214
+ ]),
215
+ _: 1
216
+ })),
217
+ i(oe, {
218
+ ref_key: "sheetRef",
219
+ ref: b,
220
+ "onSubmit:modelValue": N
221
+ }, null, 512)
222
+ ])
223
+ ], 64);
224
+ };
225
+ }
226
+ });
227
+ export {
228
+ Ie as default
229
+ };
@@ -0,0 +1,129 @@
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
+ };