@feedmepos/mf-connect 0.1.110-prod → 0.1.112-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-BIuwkgjE.js → App-CFJcQZEE.js} +522 -500
  2. package/dist/{Bin-B6PDvhj7.js → Bin-DaqUNsSV.js} +8 -8
  3. package/dist/{Broadcast-BsUYu9Kq.js → Broadcast-CdAN6JCa.js} +82 -79
  4. package/dist/{CampaignAnalytic-D0_Kh2Sv.js → CampaignAnalytic-CpP7lgTX.js} +7 -7
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-bfMr_7XS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BQiQVQBN.js} +49 -31
  6. package/dist/Card-Bmz5p5Pq.js +1085 -0
  7. package/dist/{Collections-B0umkbKL.js → Collections-BKND60cK.js} +9 -9
  8. package/dist/{Credit-DMrHYtmf.js → Credit-DQ_tDm8l.js} +11 -11
  9. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-IuEHozwd.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CCwpsEWf.js} +1 -1
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C06_qwVx.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bn-lauCv.js} +34 -32
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CHCLAOYT.js → EffectSheet.vue_vue_type_style_index_0_lang-wUV_beN0.js} +6 -6
  12. package/dist/{Experience-3xvTI41j.js → Experience-BOE6jLIS.js} +86 -83
  13. package/dist/{FileSaver.min-CEjHOYSg.js → FileSaver.min-D0CP0E3N.js} +1 -1
  14. package/dist/{Game-Drkfnm94.js → Game-B-8by2dp.js} +12 -12
  15. package/dist/GiftCardSetup-CdqZd1ee.js +748 -0
  16. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-BVTu4uTR.js +424 -0
  17. package/dist/Goals-xFHNbwt7.js +247 -0
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BYIIaPD9.js → ImageInput.vue_vue_type_script_setup_true_lang-B5Z1AZRV.js} +1 -1
  19. package/dist/{Index-BNfZ-mAu.js → Index-t6veJ0lU.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CqJLimu2.js → LocationPicker.vue_vue_type_script_setup_true_lang-Deeanc8z.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BnMjqLMU.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B8qOJYoS.js} +1 -1
  22. package/dist/{LoyaltyDashboard-BmRdWFCw.js → LoyaltyDashboard-DXNBsnM5.js} +1216 -1170
  23. package/dist/{MainLayout-m4H59w6_.js → MainLayout-CmCboaEn.js} +3 -3
  24. package/dist/{Marketing-BqdCdc76.js → Marketing-DCq9O5eb.js} +4 -4
  25. package/dist/{MarketingMaterialEdit-UjCEMJ7c.js → MarketingMaterialEdit-CGLxanxm.js} +6 -6
  26. package/dist/{Member-BbpQizye.js → Member-BCYmEmhD.js} +7 -7
  27. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbL7cw4g.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Djrfmj9g.js} +26 -24
  28. package/dist/{MemberImportHistory-FYMyd_uX.js → MemberImportHistory-D-5NAOfo.js} +7 -7
  29. package/dist/{MemberList-CFtv0HI5.js → MemberList-IySTKOT_.js} +14 -14
  30. package/dist/{MemberTransactions-BYpugGs7.js → MemberTransactions-BgQZvc5O.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CDzQ0rnK.js → MessageInput.vue_vue_type_script_setup_true_lang-N8PCSKBx.js} +3369 -3290
  32. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BlhwugZQ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-_JNdYsBu.js} +1 -1
  33. package/dist/{Mission-BMhY1kl1.js → Mission-DtaTKWE2.js} +83 -80
  34. package/dist/{Overview-BmZelkd_.js → Overview-D-uC2-Pi.js} +4 -4
  35. package/dist/{Overview-E0KL28Fc.js → Overview-DVMdPa97.js} +57 -55
  36. package/dist/{Point-BX5p9ZVF.js → Point-jnPIgHMZ.js} +119 -110
  37. package/dist/{Promotion-D662WYaR.js → Promotion-mdQg-RSh.js} +89 -86
  38. package/dist/{Queue-CI5rumWZ.js → Queue-D8YY1lbn.js} +20 -18
  39. package/dist/{Record-DRZVEW0I.js → Record-Dh-rN7a0.js} +9 -9
  40. package/dist/{Review-yMVGBErp.js → Review-C8B-SIR8.js} +2 -2
  41. package/dist/{ReviewFacebookCallback-Docv-Uil.js → ReviewFacebookCallback-C3eyH0pS.js} +5 -5
  42. package/dist/{ReviewGoogleCallback-3xVh_G7M.js → ReviewGoogleCallback-pNF2ICvQ.js} +5 -5
  43. package/dist/{Reward-lzBLyu0x.js → Reward-D7KPnzXt.js} +35 -35
  44. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Bs32tPvC.js → RewardGroup.vue_vue_type_script_setup_true_lang-C87CDjxP.js} +25 -23
  45. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-fNwFSHL1.js → RuleGroup.vue_vue_type_script_setup_true_lang-D1S2sLOK.js} +17 -15
  46. package/dist/{Segment-BRPf66q8.js → Segment-Ct8JRTjV.js} +32 -30
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQmbCewC.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-w-UpWetC.js} +38 -36
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-fHX_ftax.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbEX2h2u.js} +4 -4
  49. package/dist/{Setting-D5k2jymY.js → Setting-C3Binnn_.js} +56 -56
  50. package/dist/{SettingAdvertisements-1Oc29mzb.js → SettingAdvertisements-BrB-dGPs.js} +12 -12
  51. package/dist/{Settings-B3OCofxq.js → Settings-D6h2QM6X.js} +5 -5
  52. package/dist/Store-EKPfHEmY.js +2622 -0
  53. package/dist/{StoreRewards-C7_RKZ00.js → StoreRewards-B208ENOi.js} +15 -15
  54. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dy7_GFoi.js +1264 -0
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BW-HTNMr.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B2KJeL5Y.js} +2 -2
  56. package/dist/{Tier-8pGUR8GA.js → Tier-CjYiCZy_.js} +342 -338
  57. package/dist/{Title-DnYVX2k8.js → Title-BXkVolaL.js} +34 -32
  58. package/dist/Transaction-D1T3aIC3.js +45 -0
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-ATWU025y.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-flUDCSA5.js} +6 -6
  60. package/dist/Voucher-DnQ8jNjI.js +837 -0
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C1dCFS2S.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Z9GDpO4z.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CbUdt4GK.js → ZodTextField.vue_vue_type_script_setup_true_lang-Dcw8Oi-t.js} +2 -2
  63. package/dist/{app-DoUnw6pe.js → app-BtGohMqA.js} +6211 -5092
  64. package/dist/app.js +1 -1
  65. package/dist/base.export-DulNMo7e.js +75 -0
  66. package/dist/{business-B-PlsFIY.js → business-Bla8vvZH.js} +1 -1
  67. package/dist/{campaign-yUUxyk0R.js → campaign-BIPNFBY5.js} +2 -2
  68. package/dist/{campaign-GkMET7FI.js → campaign-DYqAyRCY.js} +8 -8
  69. package/dist/{campaign.enum-DbPiwqfi.js → campaign.enum-liUaxkcy.js} +1 -1
  70. package/dist/{campaign.fn-CF5mOcSE.js → campaign.fn-J7hYcX_7.js} +98 -98
  71. package/dist/{collectible.enum-CbOzGIud.js → collectible.enum-C0FfRMrW.js} +1 -1
  72. package/dist/{collection.fn-BByCTXVz.js → collection.fn-DdDMfaFO.js} +2 -2
  73. package/dist/currency-BrVnqxQ1.js +7 -0
  74. package/dist/{effect-jriAOaEq.js → effect-gfVmfrm9.js} +1 -1
  75. package/dist/{email-addresses-DH4xgace.js → email-addresses-Dy8NFNBw.js} +2 -2
  76. package/dist/{helper-CQjM35T_.js → helper-CMhQctQK.js} +1 -1
  77. package/dist/{index-v3DTwO9s.js → index-B6x6s8mu.js} +1805 -2128
  78. package/dist/{index-iZDBfoRk.js → index-BOZ3oVHd.js} +2 -2
  79. package/dist/{index-MtVkfI7s.js → index-BqKrePY8.js} +3 -3
  80. package/dist/{index-BLOFQAMK.js → index-C5rRuwhC.js} +1 -1
  81. package/dist/{index-BHYKmUkc.js → index-C67-z1uf.js} +11 -6
  82. package/dist/{index-CptAtzHf.js → index-CLiJUFmJ.js} +2 -2
  83. package/dist/{index-DEmV6_BZ.js → index-CUFuU2eJ.js} +10 -8
  84. package/dist/index-CZqwIQXi.js +738 -0
  85. package/dist/{index-D1vRPik1.js → index-CghtzuVO.js} +1 -1
  86. package/dist/{index-DszI88g9.js → index-Culx-Z9v.js} +20 -14
  87. package/dist/{index-Dr68iOIO.js → index-D1T4Yf4t.js} +1 -1
  88. package/dist/{index-Duqxyi9L.js → index-D6RDVy95.js} +1112 -34
  89. package/dist/index-DKmtDBKS.js +53 -0
  90. package/dist/{index-De9f7Fwe.js → index-Dalmv1m4.js} +5 -5
  91. package/dist/{index-DKZEN-aI.js → index-DvW-3flw.js} +4 -3
  92. package/dist/{index-CCBpqK6M.js → index-dyMdi0Rt.js} +1 -1
  93. package/dist/index-otcusTFM.js +171 -0
  94. package/dist/{index-BlKeV6aM.js → index-qJOEwQ_z.js} +4 -1
  95. package/dist/{index-BPTCREXM.js → index-v1exQSyU.js} +1 -1
  96. package/dist/{index.esm2017-DvOnDQUA.js → index.esm2017-BLKRIlb9.js} +1 -1
  97. package/dist/{loading-DO3WUS3q.js → loading-BkJ3h_4U.js} +1 -1
  98. package/dist/{lodash-6izwukKR.js → lodash-C0Kbs8lQ.js} +1 -1
  99. package/dist/{member-import-hKbS-7lM.js → member-import-trpK8l8R.js} +1 -1
  100. package/dist/{membership-buZOqdNV.js → membership-TV1CoyKQ.js} +3 -3
  101. package/dist/{money-WR6-v2Bl.js → money-BM-DK9iD.js} +1 -1
  102. package/dist/{number-CjEejmUn.js → number-BclgE86R.js} +1 -1
  103. package/dist/{objectid-BvtNS241.js → objectid-C2XvpEgx.js} +12 -12
  104. package/dist/onboarding-BLuoXyCY.js +131 -0
  105. package/dist/onboardingSetup-BLmLAgIV.js +17 -0
  106. package/dist/{plugins-BLcKp-ww.js → plugins-3_mD58dh.js} +3 -3
  107. package/dist/{reward-DCNR2-_F.js → reward-Bo4szVCU.js} +1 -1
  108. package/dist/{rule-BsdMlDuH.js → rule-Bwy5-zD7.js} +3 -3
  109. package/dist/{rule-builder-C2z6Ki1X.js → rule-builder-Co_1uuj4.js} +1 -1
  110. package/dist/{template-DuuTNfO4.js → template-fImyGLa7.js} +7 -7
  111. package/dist/{timezone-nMBfnPp_.js → timezone-DQ7TNXmV.js} +1 -1
  112. package/dist/{transaction.fn-CYC2Uh5Y.js → transaction.fn-OT7ucfCB.js} +2 -2
  113. package/dist/{trigger-CtlvsU7_.js → trigger-BJKHGcNG.js} +14 -14
  114. package/dist/{useMarketingMaterialActions-Dec-VZh7.js → useMarketingMaterialActions-BX3C1Gga.js} +3 -3
  115. package/dist/{usePagination-DvJ9IfI_.js → usePagination-Qp0qoWBj.js} +1 -1
  116. package/dist/{user-CYOAXuDw.js → user-BcE3fiEa.js} +1 -1
  117. package/dist/{vue-i18n-Cy0bIZpQ.js → vue-i18n-BQmB8Ex1.js} +99 -99
  118. package/dist/{xlsx-Ct_b6gSU.js → xlsx-DYZ421PG.js} +584 -584
  119. package/dist/{zod-DZR76_dr.js → zod-DestzeIp.js} +1 -1
  120. package/package.json +1 -1
  121. package/dist/Card-D5sknDf_.js +0 -910
  122. package/dist/Store-B8WVn8ZA.js +0 -1997
  123. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CmqgxDJ6.js +0 -1008
  124. package/dist/Transaction-YJkVkePM.js +0 -39
  125. package/dist/Voucher-BcCzreI3.js +0 -443
  126. package/dist/export-CN3lbc2j.js +0 -97
@@ -0,0 +1,837 @@
1
+ import { defineComponent as le, ref as w, computed as ce, h as m, onMounted as re, resolveComponent as h, openBlock as u, createElementBlock as N, Fragment as E, createVNode as r, unref as a, createElementVNode as c, withCtx as x, renderList as se, createBlock as y, resolveDynamicComponent as me, createCommentVNode as F, toDisplayString as _ } from "vue";
2
+ import { _ as pe } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as ue, components as d } from "@feedmepos/ui-library";
4
+ import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
5
+ import { c as de, p as he } from "./plugins-3_mD58dh.js";
6
+ import { useCoreStore as ge } from "@feedmepos/mf-common";
7
+ import { u as fe } from "./loading-BkJ3h_4U.js";
8
+ import { u as ye } from "./business-Bla8vvZH.js";
9
+ import { u as _e } from "./campaign-BIPNFBY5.js";
10
+ import { g as Ce, a as B, b as D } from "./campaign-DYqAyRCY.js";
11
+ import { c as be, p as ve, u as He } from "./template-fImyGLa7.js";
12
+ import "./index-C5rRuwhC.js";
13
+ import { _ as Se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bn-lauCv.js";
14
+ import { _ as ze } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbEX2h2u.js";
15
+ import { u as Ue } from "./vue-i18n-BQmB8Ex1.js";
16
+ import { T as Te } from "./trigger-BJKHGcNG.js";
17
+ import { u as Ve } from "./onboardingSetup-BLmLAgIV.js";
18
+ import { W as Pe, S as we } from "./index-D6RDVy95.js";
19
+ import "./index-BqKrePY8.js";
20
+ import { R as W } from "./rule-builder-Co_1uuj4.js";
21
+ import { i as $ } from "./helper-CMhQctQK.js";
22
+ import { useRouter as Ne } from "vue-router";
23
+ import { c as C } from "./index-C67-z1uf.js";
24
+ import { R } from "./app-BtGohMqA.js";
25
+ const Ee = {
26
+ _id: "",
27
+ intention: ["REVISITING", "MEMBER_REWARD"],
28
+ name: "Win Back Inactive Customers",
29
+ name_locale: {
30
+ "en-US": "Win Back Inactive Customers",
31
+ "th-TH": "ดึงลูกค้าที่ไม่ได้ใช้งานกลับมา",
32
+ "zh-Hant": "挽回沉睡顧客",
33
+ "zh-CN": "挽回沉默客户",
34
+ "ja-JP": "休眠顧客を取り戻す"
35
+ },
36
+ description: "Re-engage customers who haven't visited recently with special offers",
37
+ description_locale: {
38
+ "en-US": "Re-engage customers who haven't visited recently with special offers",
39
+ "th-TH": "กระตุ้นลูกค้าที่ไม่ได้มาเยี่ยมเยียนเร็ว ๆ นี้ด้วยข้อเสนอพิเศษ",
40
+ "zh-Hant": "透過特別優惠重新吸引近期未到訪的顧客",
41
+ "zh-CN": "通过特别优惠重新吸引近期未到访的客户",
42
+ "ja-JP": "最近来店していない顧客を特別オファーで再エンゲージ"
43
+ },
44
+ steps: [
45
+ {
46
+ name: "connect.template.general_information",
47
+ name_locale: {
48
+ "en-US": "General information",
49
+ "th-TH": "ข้อมูลทั่วไป",
50
+ "zh-Hant": "基本信息",
51
+ "zh-CN": "基本信息",
52
+ "ja-JP": "一般情報"
53
+ },
54
+ groups: [
55
+ {
56
+ name: "connect.template.general",
57
+ name_locale: {
58
+ "en-US": "General",
59
+ "th-TH": "ทั่วไป",
60
+ "zh-Hant": "常規",
61
+ "zh-CN": "常规",
62
+ "ja-JP": "一般"
63
+ },
64
+ fields: [
65
+ {
66
+ label: "connect.template.campaign_name",
67
+ label_locale: {
68
+ "en-US": "Campaign name",
69
+ "th-TH": "ชื่อแคมเปญ",
70
+ "zh-Hant": "活動名稱",
71
+ "zh-CN": "活动名称",
72
+ "ja-JP": "キャンペーン名"
73
+ },
74
+ property: "campaign.name",
75
+ type: "text"
76
+ },
77
+ {
78
+ label: "connect.template.campaign_description",
79
+ label_locale: {
80
+ "en-US": "Campaign description",
81
+ "th-TH": "คำอธิบายแคมเปญ",
82
+ "zh-Hant": "活動描述",
83
+ "zh-CN": "活动描述",
84
+ "ja-JP": "キャンペーンの説明"
85
+ },
86
+ property: "campaign.description",
87
+ type: "textarea"
88
+ },
89
+ {
90
+ label: "connect.template.campaign_period",
91
+ label_locale: {
92
+ "en-US": "Campaign period",
93
+ "th-TH": "ระยะเวลาแคมเปญ",
94
+ "zh-Hant": "活動週期",
95
+ "zh-CN": "活动周期",
96
+ "ja-JP": "キャンペーン期間"
97
+ },
98
+ property: "campaign.timeframeOptions",
99
+ type: "timeframe"
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ name: void 0,
105
+ name_locale: {},
106
+ fields: [
107
+ {
108
+ label: void 0,
109
+ label_locale: {},
110
+ property: "campaign.event.rule.rules.g_schedule",
111
+ type: "rule_schedule",
112
+ extras: "campaign.timeframeOptions"
113
+ }
114
+ ],
115
+ condition: {
116
+ property: "campaign.event.type",
117
+ value: "SCHEDULE"
118
+ }
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ name: "connect.template.discount",
124
+ name_locale: {
125
+ "en-US": "Discount",
126
+ "th-TH": "ส่วนลด",
127
+ "zh-Hant": "折扣",
128
+ "zh-CN": "折扣",
129
+ "ja-JP": "割引"
130
+ },
131
+ groups: [
132
+ {
133
+ name: "connect.template.discount",
134
+ name_locale: {
135
+ "en-US": "Discount",
136
+ "th-TH": "ส่วนลด",
137
+ "zh-Hant": "折扣",
138
+ "zh-CN": "折扣",
139
+ "ja-JP": "割引"
140
+ },
141
+ fields: [
142
+ {
143
+ label: void 0,
144
+ label_locale: {},
145
+ property: "configs.extras.effect",
146
+ type: "effect"
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ name: "connect.template.voucher_detail",
152
+ name_locale: {
153
+ "en-US": "Voucher detail",
154
+ "th-TH": "รายละเอียดบัตรกำนัล",
155
+ "zh-Hant": "優惠券詳情",
156
+ "zh-CN": "优惠券详情",
157
+ "ja-JP": "バウチャー詳細"
158
+ },
159
+ fields: [
160
+ {
161
+ label: "connect.template.voucher_name",
162
+ label_locale: {
163
+ "en-US": "Voucher name",
164
+ "th-TH": "ชื่อบัตรกำนัล",
165
+ "zh-Hant": "優惠券名稱",
166
+ "zh-CN": "优惠券名称",
167
+ "ja-JP": "バウチャー名"
168
+ },
169
+ property: "configs.name",
170
+ type: "text"
171
+ },
172
+ {
173
+ label: "connect.template.voucher_description",
174
+ label_locale: {
175
+ "en-US": "Voucher description",
176
+ "th-TH": "คำอธิบายบัตรกำนัล",
177
+ "zh-Hant": "優惠券描述",
178
+ "zh-CN": "优惠券描述",
179
+ "ja-JP": "バウチャーの説明"
180
+ },
181
+ property: "configs.description",
182
+ type: "textarea"
183
+ },
184
+ {
185
+ label: "Voucher Image",
186
+ label_locale: {
187
+ "en-US": "Voucher Image",
188
+ "th-TH": "รูปภาพคูปอง",
189
+ "zh-Hant": "優惠券圖片",
190
+ "zh-CN": "优惠券图片",
191
+ "ja-JP": "バウチャー画像"
192
+ },
193
+ property: "configs.image",
194
+ type: "image"
195
+ }
196
+ ]
197
+ }
198
+ ]
199
+ },
200
+ {
201
+ name: "connect.template.terms_conditions",
202
+ name_locale: {
203
+ "en-US": "Terms and conditions",
204
+ "th-TH": "ข้อตกลงและเงื่อนไข",
205
+ "zh-Hant": "條款和條件",
206
+ "zh-CN": "条款和条件",
207
+ "ja-JP": "利用規約"
208
+ },
209
+ groups: [
210
+ {
211
+ name: "connect.template.target_audience",
212
+ name_locale: {
213
+ "en-US": "Target audience",
214
+ "th-TH": "กลุ่มเป้าหมาย",
215
+ "zh-Hant": "目標受眾",
216
+ "zh-CN": "目标受众",
217
+ "ja-JP": "対象者"
218
+ },
219
+ fields: [
220
+ {
221
+ label: void 0,
222
+ label_locale: {},
223
+ property: "campaign.event.rule",
224
+ type: "rule_user"
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ name: "connect.template.voucher_usage_configuration",
230
+ name_locale: {
231
+ "en-US": "Voucher usage configuration",
232
+ "th-TH": "การกำหนดค่าการใช้งานบัตรกำนัล",
233
+ "zh-Hant": "優惠券使用配置",
234
+ "zh-CN": "优惠券使用配置",
235
+ "ja-JP": "バウチャー使用設定"
236
+ },
237
+ fields: [
238
+ {
239
+ label: void 0,
240
+ label_locale: {},
241
+ property: "configs.options",
242
+ type: "collectible_options"
243
+ }
244
+ ]
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ name: "connect.template.configuration",
250
+ name_locale: {
251
+ "en-US": "Configuration",
252
+ "th-TH": "การกำหนดค่า",
253
+ "zh-Hant": "配置",
254
+ "zh-CN": "配置",
255
+ "ja-JP": "設定"
256
+ },
257
+ groups: [
258
+ {
259
+ name: "connect.template.notify_audience",
260
+ name_locale: {
261
+ "en-US": "Notify audience",
262
+ "th-TH": "แจ้งเตือนกลุ่มเป้าหมาย",
263
+ "zh-Hant": "通知受眾",
264
+ "zh-CN": "通知受众",
265
+ "ja-JP": "対象者への通知"
266
+ },
267
+ fields: [
268
+ {
269
+ label: "Send notification",
270
+ label_locale: {
271
+ "en-US": "Send notification",
272
+ "th-TH": "ส่งการแจ้งเตือน",
273
+ "zh-Hant": "發送通知",
274
+ "zh-CN": "发送通知",
275
+ "ja-JP": "通知を送信"
276
+ },
277
+ property: "campaign.notify",
278
+ type: "switch"
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ name: "connect.template.notify_message",
284
+ name_locale: {
285
+ "en-US": "Notify message",
286
+ "th-TH": "ข้อความแจ้งเตือน",
287
+ "zh-Hant": "通知消息",
288
+ "zh-CN": "通知消息",
289
+ "ja-JP": "通知メッセージ"
290
+ },
291
+ fields: [
292
+ {
293
+ label: "Notification message",
294
+ label_locale: {
295
+ "en-US": "Notification message",
296
+ "th-TH": "ข้อความแจ้งเตือน",
297
+ "zh-Hant": "通知消息",
298
+ "zh-CN": "通知消息",
299
+ "ja-JP": "通知メッセージ"
300
+ },
301
+ property: "campaign.notifyMessage",
302
+ type: "message",
303
+ extras: "ISSUE_REWARD"
304
+ }
305
+ ],
306
+ condition: {
307
+ property: "campaign.notify",
308
+ value: !0
309
+ }
310
+ }
311
+ ]
312
+ }
313
+ ],
314
+ defaultValue: {
315
+ templateId: "",
316
+ campaign: {
317
+ collectible: "",
318
+ type: "VOUCHER",
319
+ templateId: "",
320
+ name: "",
321
+ description: "",
322
+ image: "",
323
+ event: {
324
+ type: "SCHEDULE",
325
+ rule: {
326
+ ...W.scaffoldGroup(),
327
+ rules: {
328
+ g_schedule: {
329
+ name: "g_schedule",
330
+ rules: {
331
+ r_triggerdate: {
332
+ name: "r_triggerdate",
333
+ property: "trigger.date",
334
+ conditions: {
335
+ _rrule: "RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=10;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
336
+ },
337
+ negated: !1
338
+ },
339
+ r_triggertime: {
340
+ name: "r_triggertime",
341
+ property: "trigger.time",
342
+ conditions: {
343
+ _isOnTime: "10:00"
344
+ },
345
+ negated: !1
346
+ }
347
+ },
348
+ logic: "r_triggerdate && r_triggertime"
349
+ },
350
+ g_user: {
351
+ name: "g_user",
352
+ rules: {
353
+ r_lastVisit: {
354
+ name: "r_lastVisit",
355
+ property: "user.stats.lastVisit",
356
+ conditions: {
357
+ _isRange: {
358
+ op: "last",
359
+ unit: "day",
360
+ ignoreYear: !1,
361
+ x: 30
362
+ }
363
+ },
364
+ negated: !0
365
+ }
366
+ },
367
+ logic: "!r_lastVisit"
368
+ }
369
+ },
370
+ logic: "g_user && g_schedule"
371
+ }
372
+ },
373
+ group: null,
374
+ targetLocation: null,
375
+ timeframeOptions: {
376
+ type: "timeframe",
377
+ property: "__now"
378
+ },
379
+ earningOption: {
380
+ type: "FIXED",
381
+ amount: 1
382
+ },
383
+ notify: !1,
384
+ hideInApp: !0
385
+ },
386
+ configs: $("VOUCHER", {
387
+ name: "",
388
+ business: null,
389
+ noCampaign: !1
390
+ })
391
+ }
392
+ };
393
+ W.scaffoldGroup(), $("VOUCHER", {
394
+ name: "",
395
+ business: null,
396
+ noCampaign: !1
397
+ });
398
+ var xe = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
399
+ const Fe = { class: "px-24 flex flex-col gap-y-16" }, Re = { class: "flex items-center justify-between w-full" }, je = { class: "flex gap-8 overflow-x-auto" }, ke = { class: "space-y-8" }, Ie = { class: "flex w-full gap-4 items-center" }, Je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = { class: "flex gap-8 items-center" }, Be = { class: "flex flex-col gap-16 text-center" }, De = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, yt = /* @__PURE__ */ le({
400
+ __name: "Voucher",
401
+ setup($e) {
402
+ const { t: i } = Ue(), G = {
403
+ label: i("connect.voucher.createCampaign"),
404
+ value: "create",
405
+ isPrimary: !0,
406
+ prependIcon: "add"
407
+ }, j = ue(), K = He("VOUCHER", j), Y = ye(), g = _e(), { global: X, minor: k } = fe, z = Ne(), s = w({
408
+ searchKey: "",
409
+ location: [],
410
+ triggerType: []
411
+ }), b = ce(
412
+ () => g.campaigns.voucher.filter(
413
+ (e) => Q(e) && Z(e)
414
+ )
415
+ ), q = Te.VOUCHER.map((e) => ({
416
+ label: e.name,
417
+ value: e.value
418
+ }));
419
+ function Q(e) {
420
+ const t = s.value.location;
421
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some(
422
+ (o) => {
423
+ var l;
424
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(o);
425
+ }
426
+ ) : e.targetLocation.includes(t);
427
+ }
428
+ function U(e) {
429
+ return e.hideInApp === !1;
430
+ }
431
+ function T(e) {
432
+ return e.event.type === "SIMPLE_CLAIM" && !U(e);
433
+ }
434
+ function Z(e) {
435
+ const t = s.value.triggerType;
436
+ if (!t || t.length === 0) return !0;
437
+ const o = e.event.type;
438
+ return t.includes(o);
439
+ }
440
+ const ee = [
441
+ {
442
+ header: i("connect.voucher.voucherTitle"),
443
+ accessorFn: (e) => e.name,
444
+ cell(e) {
445
+ const t = [e.row.original.name];
446
+ return U(e.row.original) && t.push(
447
+ m(d.FmChip, {
448
+ label: "Feedvibe",
449
+ class: "text-fm-color-primary bg-fm-color-system-warning-100",
450
+ compact: !0
451
+ })
452
+ ), m("div", { class: "flex items-center gap-4" }, t);
453
+ }
454
+ },
455
+ {
456
+ header: i("connect.voucher.status"),
457
+ accessorFn: (e) => Ce(e),
458
+ cell(e) {
459
+ return B(e.row.original);
460
+ }
461
+ },
462
+ {
463
+ header: i("connect.voucher.summary"),
464
+ accessorFn: (e) => D(e)
465
+ },
466
+ {
467
+ header: i("connect.voucher.quota"),
468
+ accessorFn: (e) => {
469
+ var t;
470
+ return ((t = e.pf_collectible) == null ? void 0 : t.options.maxReceive) ?? "Unlimited";
471
+ }
472
+ },
473
+ {
474
+ header: i("connect.voucher.claimed"),
475
+ accessorFn: (e) => {
476
+ var t;
477
+ return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
478
+ }
479
+ },
480
+ {
481
+ header: i("connect.voucher.actions"),
482
+ cell(e) {
483
+ return m("div", { class: "flex items-center justify-end" }, [
484
+ m(d.FmButton, {
485
+ icon: "insights",
486
+ variant: "tertiary",
487
+ iconColor: "neutral-gray-400",
488
+ onClick: async (t) => {
489
+ t.stopPropagation(), await J(e.row.original);
490
+ }
491
+ }),
492
+ m(d.FmButton, {
493
+ icon: "visibility",
494
+ variant: "tertiary",
495
+ iconColor: "neutral-gray-400",
496
+ onClick: async (t) => {
497
+ t.stopPropagation(), await z.push({
498
+ name: R["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
499
+ params: { id: e.row.original._id }
500
+ });
501
+ }
502
+ }),
503
+ m(
504
+ d.FmMenu,
505
+ {
506
+ placement: "bottom-end",
507
+ onClick: (t) => {
508
+ t.stopPropagation();
509
+ }
510
+ },
511
+ {
512
+ "menu-button": () => m(d.FmButton, {
513
+ icon: "more_vert",
514
+ iconColor: "neutral-gray-400",
515
+ variant: "tertiary"
516
+ }),
517
+ default: () => {
518
+ const t = [
519
+ m(d.FmMenuItem, {
520
+ label: i("connect.voucher.duplicate"),
521
+ onClick: async (o) => {
522
+ o.stopPropagation(), await O(e.row.original);
523
+ }
524
+ }),
525
+ m(
526
+ d.FmMenuItem,
527
+ {
528
+ onClick: async (o) => {
529
+ o.stopPropagation(), I(e.row.original);
530
+ }
531
+ },
532
+ {
533
+ label: m(
534
+ "div",
535
+ {
536
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400"
537
+ },
538
+ i("connect.voucher.remove")
539
+ )
540
+ }
541
+ )
542
+ ];
543
+ return T(e.row.original) && (t.unshift(
544
+ m(d.FmMenuItem, {
545
+ label: i("connect.voucher.send"),
546
+ onClick: async (o) => {
547
+ var l;
548
+ o.stopPropagation(), (l = V.value) == null || l.showSheet({
549
+ campaignId: e.row.original._id
550
+ });
551
+ }
552
+ })
553
+ ), t.unshift(
554
+ m(d.FmMenuItem, {
555
+ label: i("connect.voucher.share"),
556
+ onClick: async (o) => {
557
+ o.stopPropagation(), await de(
558
+ `https://${ge().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
559
+ {
560
+ successMessage: "Voucher link copied to clipboard"
561
+ }
562
+ );
563
+ }
564
+ })
565
+ )), t;
566
+ }
567
+ }
568
+ )
569
+ ]);
570
+ }
571
+ }
572
+ ], v = w(), V = w();
573
+ async function I(e) {
574
+ await he.remove(i("connect.voucher.confirmRemove", { name: e.name })) && await k(
575
+ async () => {
576
+ await C.delete(e._id), await g.read("VOUCHER");
577
+ },
578
+ {
579
+ message: i("connect.voucher.removing", { name: e.name }),
580
+ successMessage: i("connect.voucher.removedSuccessfully", {
581
+ name: e.name
582
+ })
583
+ }
584
+ );
585
+ }
586
+ async function H(e) {
587
+ e ? await t(await C.readById(e._id)) : K.open(async (o) => {
588
+ await t(void 0, o);
589
+ });
590
+ async function t(o, l) {
591
+ var S;
592
+ (S = v.value) == null || S.showSheet(!0, "VOUCHER", o, l);
593
+ }
594
+ }
595
+ async function J(e) {
596
+ await z.push({
597
+ name: R["$connect-CAMPAIGN_VOUCHER_ANALYTIC"],
598
+ params: { id: e._id }
599
+ });
600
+ }
601
+ async function O(e) {
602
+ var l;
603
+ if (!await be(e.name))
604
+ return;
605
+ const t = await C.readById(e._id), o = ve(t);
606
+ (l = v.value) == null || l.showSheet(
607
+ !0,
608
+ "VOUCHER",
609
+ o,
610
+ t.template
611
+ );
612
+ }
613
+ async function te(e) {
614
+ e.campaign._id && await new Promise((t) => {
615
+ j.open({
616
+ title: "Confirmation",
617
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
618
+ primaryActions: { text: "Update all", close: !0 },
619
+ secondaryActions: { text: "Update future only", close: !0 }
620
+ }).onPrimary(async () => {
621
+ var o;
622
+ e.updateCollections = !0, (o = window.top) == null || o.postMessage("updateAllVoucher", "*"), t();
623
+ }).onSecondary(async () => {
624
+ t();
625
+ });
626
+ }), await k(
627
+ async () => {
628
+ e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("VOUCHER");
629
+ },
630
+ {
631
+ message: i(
632
+ e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
633
+ ),
634
+ successMessage: i(
635
+ e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
636
+ )
637
+ }
638
+ );
639
+ }
640
+ const L = Ve();
641
+ return re(async () => {
642
+ var o;
643
+ await X(async () => {
644
+ await g.read("VOUCHER");
645
+ });
646
+ const e = await L.consume(), t = {
647
+ VOUCHER_WELCOME: Pe,
648
+ VOUCHER_SPEND_MORE: we,
649
+ VOUCHER_WIN_BACK: Ee
650
+ };
651
+ if (e && e in t) {
652
+ const l = t[e];
653
+ (o = v.value) == null || o.showSheet(
654
+ !0,
655
+ "VOUCHER",
656
+ void 0,
657
+ await L.template(l)
658
+ );
659
+ }
660
+ }), (e, t) => {
661
+ const o = h("FmPageHead"), l = h("FmSearch"), S = h("FmTable"), ae = h("FmChip"), f = h("FmButton"), ne = h("FmListItem"), oe = h("FmList"), ie = h("FmCard");
662
+ return u(), N(E, null, [
663
+ r(o, {
664
+ title: a(i)("connect.voucher.title"),
665
+ actions: a(b).length > 0 ? [G] : [],
666
+ "onClick:action": t[0] || (t[0] = () => H())
667
+ }, null, 8, ["title", "actions"]),
668
+ c("div", Fe, [
669
+ r(l, {
670
+ modelValue: a(s).searchKey,
671
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => a(s).searchKey = n),
672
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
673
+ placeholder: a(i)("connect.voucher.search"),
674
+ collapsible: ""
675
+ }, null, 8, ["modelValue", "placeholder"]),
676
+ a(g).campaigns.voucher && a(g).campaigns.voucher.length > 0 ? (u(), N(E, { key: 0 }, [
677
+ c("div", Re, [
678
+ c("div", je, [
679
+ r(M, {
680
+ label: `${a(i)("connect.common.location")}: `,
681
+ "right-icon": "keyboard_arrow_down",
682
+ modelValue: a(s).location,
683
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => a(s).location = n),
684
+ icon: "storefront",
685
+ "show-item-label": !0,
686
+ items: a(Y).locationOptions
687
+ }, null, 8, ["label", "modelValue", "items"]),
688
+ r(M, {
689
+ label: "Type:",
690
+ "right-icon": "keyboard_arrow_down",
691
+ modelValue: a(s).triggerType,
692
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => a(s).triggerType = n),
693
+ icon: "filter_list",
694
+ "show-item-label": !0,
695
+ items: a(q)
696
+ }, null, 8, ["modelValue", "items"])
697
+ ]),
698
+ r(l, {
699
+ modelValue: a(s).searchKey,
700
+ "onUpdate:modelValue": t[4] || (t[4] = (n) => a(s).searchKey = n),
701
+ class: "xs:hidden sm:hidden",
702
+ placeholder: a(i)("connect.voucher.search"),
703
+ collapsible: ""
704
+ }, null, 8, ["modelValue", "placeholder"])
705
+ ]),
706
+ r(S, {
707
+ class: "xs:hidden sm:hidden",
708
+ "row-data": a(b),
709
+ "column-defs": ee,
710
+ "search-value": a(s).searchKey,
711
+ "column-filter": [],
712
+ onRowClick: t[5] || (t[5] = (n) => H(n.original)),
713
+ "hide-footer": a(b).length < 10
714
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
715
+ r(oe, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
716
+ default: x(() => [
717
+ (u(!0), N(E, null, se(a(b).filter(
718
+ (n) => n.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
719
+ ), (n) => (u(), y(ne, {
720
+ key: n._id.toString(),
721
+ onClick: (P) => H(n),
722
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
723
+ }, {
724
+ default: x(() => {
725
+ var P;
726
+ return [
727
+ c("div", ke, [
728
+ c("div", Ie, [
729
+ (u(), y(me(a(B)(n)))),
730
+ U(n) ? (u(), y(ae, {
731
+ key: 0,
732
+ label: "Feedvibe",
733
+ class: "text-fm-color-primary bg-fm-color-system-warning-100",
734
+ compact: ""
735
+ })) : F("", !0),
736
+ c("div", Je, _(((P = n.pf_collectible) == null ? void 0 : P.currentReceive) ?? 0) + " claimed ", 1)
737
+ ]),
738
+ c("div", Oe, [
739
+ c("div", Le, _(n.name), 1),
740
+ c("div", Ae, _(a(D)(n)), 1)
741
+ ])
742
+ ]),
743
+ c("div", Me, [
744
+ r(f, {
745
+ icon: "insights",
746
+ "icon-color": "neutral-gray-400",
747
+ variant: "tertiary",
748
+ onClick: async (p) => {
749
+ p.stopPropagation(), await J(n);
750
+ }
751
+ }, null, 8, ["onClick"]),
752
+ r(f, {
753
+ icon: "content_copy",
754
+ "icon-color": "neutral-gray-400",
755
+ variant: "tertiary",
756
+ onClick: async (p) => {
757
+ p.stopPropagation(), await O(n);
758
+ }
759
+ }, null, 8, ["onClick"]),
760
+ T(n) ? (u(), y(f, {
761
+ key: 0,
762
+ icon: "visibility",
763
+ "icon-color": "neutral-gray-400",
764
+ variant: "tertiary",
765
+ onClick: async (p) => {
766
+ p.stopPropagation(), await a(z).push({
767
+ name: a(R)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
768
+ params: { id: n._id }
769
+ });
770
+ }
771
+ }, null, 8, ["onClick"])) : F("", !0),
772
+ T(n) ? (u(), y(f, {
773
+ key: 1,
774
+ icon: "send",
775
+ "icon-color": "neutral-gray-400",
776
+ variant: "tertiary",
777
+ onClick: (p) => {
778
+ var A;
779
+ p.stopPropagation(), (A = a(V)) == null || A.showSheet({
780
+ campaignId: n._id
781
+ });
782
+ }
783
+ }, null, 8, ["onClick"])) : F("", !0),
784
+ r(f, {
785
+ icon: "delete",
786
+ "icon-color": "neutral-gray-400",
787
+ variant: "tertiary",
788
+ onClick: (p) => (p.stopPropagation(), I(n))
789
+ }, null, 8, ["onClick"])
790
+ ])
791
+ ];
792
+ }),
793
+ _: 2
794
+ }, 1032, ["onClick"]))), 128))
795
+ ]),
796
+ _: 1
797
+ })
798
+ ], 64)) : (u(), y(ie, {
799
+ key: 1,
800
+ variant: "outlined",
801
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
802
+ }, {
803
+ default: x(() => [
804
+ t[7] || (t[7] = c("img", {
805
+ src: pe,
806
+ class: "aspect-square w-[150px]"
807
+ }, null, -1)),
808
+ c("div", Be, [
809
+ c("div", De, _(a(i)("connect.voucher.createVoucherCampaign")), 1),
810
+ c("div", We, _(a(i)("connect.voucher.description")), 1)
811
+ ]),
812
+ r(f, {
813
+ variant: "primary",
814
+ label: a(i)("connect.voucher.createVoucherCampaign"),
815
+ icon: "add",
816
+ onClick: t[6] || (t[6] = (n) => H())
817
+ }, null, 8, ["label"])
818
+ ]),
819
+ _: 1
820
+ })),
821
+ r(Se, {
822
+ ref_key: "sheetRef",
823
+ ref: v,
824
+ "onSubmit:modelValue": te
825
+ }, null, 512),
826
+ r(ze, {
827
+ ref_key: "sendVoucherSheetRef",
828
+ ref: V
829
+ }, null, 512)
830
+ ])
831
+ ], 64);
832
+ };
833
+ }
834
+ });
835
+ export {
836
+ yt as default
837
+ };