@feedmepos/mf-connect 0.0.3-beta.0

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 (303) hide show
  1. package/README.md +31 -0
  2. package/dist/Analytic-Dljae6Yl.js +614 -0
  3. package/dist/Broadcast-CejuUG-1.js +216 -0
  4. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DAxAfdPe.js +117 -0
  5. package/dist/Card-BqgQuGNe.js +775 -0
  6. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  7. package/dist/Collections-CmIFQQxo.js +437 -0
  8. package/dist/Credit-Bi7zJdvK.js +214 -0
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DLb_mc7S.js +1952 -0
  10. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BN9vbCIU.js +309 -0
  11. package/dist/Experience-CndnSCnn.js +211 -0
  12. package/dist/Game-CDctToIr.js +242 -0
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-DMsxZkxf.js +144 -0
  14. package/dist/JsonViewer-CDb_cQJh.js +87 -0
  15. package/dist/MainLayout-5NCcYKPh.js +18770 -0
  16. package/dist/Marketing-DcRex89D.js +309 -0
  17. package/dist/Member-KDAOZ4y7.js +90 -0
  18. package/dist/MemberList-7cfMhvnU.js +1752 -0
  19. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  20. package/dist/MemberTransactions-Dd1NNP_h.js +38 -0
  21. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bniz5T6m.js +163 -0
  22. package/dist/Point-B-Yo0tOQ.js +211 -0
  23. package/dist/Promotion-B2t2rOB2.js +219 -0
  24. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ml889DRQ.js +1461 -0
  25. package/dist/Segment-quTtfnsL.js +392 -0
  26. package/dist/Setting-BMQkU33O.js +1862 -0
  27. package/dist/Store-C0JEZe6U.js +1415 -0
  28. package/dist/StoreRewards-CozvYaoP.js +432 -0
  29. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BHaiBpBC.js +640 -0
  30. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CASpFDTp.js +124 -0
  31. package/dist/Tier-DU0ptI0I.js +821 -0
  32. package/dist/Title-BPvcg94P.js +496 -0
  33. package/dist/Transaction-Cgs5H5Vg.js +34 -0
  34. package/dist/Voucher-CMLmRUp5.js +448 -0
  35. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
  36. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  37. package/dist/app-DRUbn5GO.js +31282 -0
  38. package/dist/app.js +5 -0
  39. package/dist/campaign-CpzFl8Vr.js +4 -0
  40. package/dist/campaign-DmbniSEP.js +93 -0
  41. package/dist/collection.fn-DHlfGYAC.js +24 -0
  42. package/dist/dto-ts2Lkngs.js +353 -0
  43. package/dist/effect-BTYIMeYm.js +61 -0
  44. package/dist/feedme.ico +0 -0
  45. package/dist/helper-CRmH0_yS.js +58 -0
  46. package/dist/index-BTanTa5F.js +64 -0
  47. package/dist/index-BZbepUcT.js +104 -0
  48. package/dist/index-C4AxDwBx.js +674 -0
  49. package/dist/index-CKhgwiA8.js +234 -0
  50. package/dist/index-ChAaKnz9.js +99 -0
  51. package/dist/index-CuvNtC_M.js +61 -0
  52. package/dist/index-DGFTGZj1.js +190 -0
  53. package/dist/index-Dbd4WA4r.js +61 -0
  54. package/dist/index-DkxEfDKI.js +1757 -0
  55. package/dist/index-DzrgTguB.js +38 -0
  56. package/dist/index-Iej6yAF2.js +8796 -0
  57. package/dist/index-Ix0P1Q7X.js +1742 -0
  58. package/dist/index-y3taWZm8.js +29565 -0
  59. package/dist/libs/packages/core/src/bill/bill.dto.d.ts +75 -0
  60. package/dist/libs/packages/core/src/bill/index.d.ts +115 -0
  61. package/dist/libs/packages/core/src/business/index.d.ts +21 -0
  62. package/dist/libs/packages/core/src/campaign/broadcast/index.d.ts +36 -0
  63. package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +3 -0
  64. package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +5 -0
  65. package/dist/libs/packages/core/src/campaign/group.d.ts +25 -0
  66. package/dist/libs/packages/core/src/campaign/index.d.ts +33448 -0
  67. package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +15 -0
  68. package/dist/libs/packages/core/src/collectible/collectible.enum.d.ts +14 -0
  69. package/dist/libs/packages/core/src/collectible/helper.d.ts +195 -0
  70. package/dist/libs/packages/core/src/collectible/index.d.ts +1588 -0
  71. package/dist/libs/packages/core/src/collectible/pool/index.d.ts +1381 -0
  72. package/dist/libs/packages/core/src/collection/collection.fn.d.ts +5 -0
  73. package/dist/libs/packages/core/src/collection/index.d.ts +901 -0
  74. package/dist/libs/packages/core/src/collection/transaction.d.ts +845 -0
  75. package/dist/libs/packages/core/src/collection/transaction.fn.d.ts +10 -0
  76. package/dist/libs/packages/core/src/common/array.d.ts +2 -0
  77. package/dist/libs/packages/core/src/common/hash.d.ts +10 -0
  78. package/dist/libs/packages/core/src/common/index.d.ts +42 -0
  79. package/dist/libs/packages/core/src/common/number.d.ts +7 -0
  80. package/dist/libs/packages/core/src/common/object.d.ts +5 -0
  81. package/dist/libs/packages/core/src/common/objectId.d.ts +2 -0
  82. package/dist/libs/packages/core/src/common/string.d.ts +4 -0
  83. package/dist/libs/packages/core/src/counter/counter.dto.d.ts +767 -0
  84. package/dist/libs/packages/core/src/counter/index.d.ts +1 -0
  85. package/dist/libs/packages/core/src/event/index.d.ts +4246 -0
  86. package/dist/libs/packages/core/src/feedback/index.d.ts +24 -0
  87. package/dist/libs/packages/core/src/game/index.d.ts +32 -0
  88. package/dist/libs/packages/core/src/index.d.ts +21 -0
  89. package/dist/libs/packages/core/src/internal/index.d.ts +56 -0
  90. package/dist/libs/packages/core/src/legacy/setting/index.d.ts +89 -0
  91. package/dist/libs/packages/core/src/location/index.d.ts +44 -0
  92. package/dist/libs/packages/core/src/loyalty/card/index.d.ts +1287 -0
  93. package/dist/libs/packages/core/src/loyalty/index.d.ts +3 -0
  94. package/dist/libs/packages/core/src/loyalty/tier/helper.d.ts +2 -0
  95. package/dist/libs/packages/core/src/loyalty/tier/index.d.ts +251 -0
  96. package/dist/libs/packages/core/src/loyalty/title/index.d.ts +4 -0
  97. package/dist/libs/packages/core/src/marketing-material/index.d.ts +186 -0
  98. package/dist/libs/packages/core/src/marketing-material/marketing-material.enum.d.ts +3 -0
  99. package/dist/libs/packages/core/src/notification/index.d.ts +130 -0
  100. package/dist/libs/packages/core/src/pagination/index.d.ts +25 -0
  101. package/dist/libs/packages/core/src/permission/index.d.ts +243 -0
  102. package/dist/libs/packages/core/src/service/index.d.ts +10 -0
  103. package/dist/libs/packages/core/src/store/dto.d.ts +1060 -0
  104. package/dist/libs/packages/core/src/store/index.d.ts +3894 -0
  105. package/dist/libs/packages/core/src/store/store.fn.d.ts +103 -0
  106. package/dist/libs/packages/core/src/template/index.d.ts +880 -0
  107. package/dist/libs/packages/core/src/template/templates.d.ts +1217 -0
  108. package/dist/libs/packages/core/src/user/index.d.ts +245 -0
  109. package/dist/libs/packages/core/src/user/segment.dto.d.ts +27 -0
  110. package/dist/libs/packages/core/src/user/segmentation.d.ts +28 -0
  111. package/dist/libs/packages/core/src/user/user.dto.d.ts +873 -0
  112. package/dist/libs/packages/core/src/validation/index.d.ts +1 -0
  113. package/dist/libs/packages/core/src/validation/rule/builder.d.ts +36 -0
  114. package/dist/libs/packages/core/src/validation/rule/index.d.ts +45 -0
  115. package/dist/libs/packages/core/src/validation/rule/operator.enum.d.ts +405 -0
  116. package/dist/libs/packages/core/src/validation/rule/rule.fn.d.ts +6 -0
  117. package/dist/libs/packages/validation/src/index.d.ts +3 -0
  118. package/dist/libs/packages/validation/src/rule/rule-builder.d.ts +19 -0
  119. package/dist/libs/packages/validation/src/rule/rule.d.ts +52 -0
  120. package/dist/libs/packages/validation/src/rule/validate.d.ts +2 -0
  121. package/dist/loading-Dy-VtOFu.js +3131 -0
  122. package/dist/lodash-BnddClG8.js +3678 -0
  123. package/dist/membership-28vBGpTw.js +213 -0
  124. package/dist/moment-BWErdI6_.js +2578 -0
  125. package/dist/money-Ch7o4R5s.js +15 -0
  126. package/dist/number-BgOMhVX5.js +12 -0
  127. package/dist/object-qECH92oz.js +26 -0
  128. package/dist/objectId-dwaoBfJX.js +7 -0
  129. package/dist/packages/connect/src/App.vue.d.ts +2 -0
  130. package/dist/packages/connect/src/Entry.vue.d.ts +2 -0
  131. package/dist/packages/connect/src/api/auth/index.d.ts +3 -0
  132. package/dist/packages/connect/src/api/campaign/index.d.ts +30 -0
  133. package/dist/packages/connect/src/api/campaign/template.d.ts +5 -0
  134. package/dist/packages/connect/src/api/index.d.ts +24 -0
  135. package/dist/packages/connect/src/api/location/index.d.ts +7 -0
  136. package/dist/packages/connect/src/api/marketing-material/index.d.ts +7 -0
  137. package/dist/packages/connect/src/api/member/index.d.ts +12 -0
  138. package/dist/packages/connect/src/api/membership/index.d.ts +31 -0
  139. package/dist/packages/connect/src/api/segments/index.d.ts +13 -0
  140. package/dist/packages/connect/src/api/settings/index.d.ts +4 -0
  141. package/dist/packages/connect/src/api/transaction/index.d.ts +9 -0
  142. package/dist/packages/connect/src/api/users/index.d.ts +8 -0
  143. package/dist/packages/connect/src/app.d.ts +16 -0
  144. package/dist/packages/connect/src/components/NavigationTab.vue.d.ts +2 -0
  145. package/dist/packages/connect/src/components/analytic/CampaignCard.vue.d.ts +24 -0
  146. package/dist/packages/connect/src/components/analytic/CampaignChip.vue.d.ts +47 -0
  147. package/dist/packages/connect/src/components/analytic/CampaignGroup.vue.d.ts +25 -0
  148. package/dist/packages/connect/src/components/analytic/CampaignStat.vue.d.ts +31 -0
  149. package/dist/packages/connect/src/components/analytic/LinkCampaign.vue.d.ts +30 -0
  150. package/dist/packages/connect/src/components/campaign/CampaignChip.vue.d.ts +13 -0
  151. package/dist/packages/connect/src/components/campaign/CampaignTriggerInput.vue.d.ts +34 -0
  152. package/dist/packages/connect/src/components/campaign/EarningOptionInput.vue.d.ts +50 -0
  153. package/dist/packages/connect/src/components/campaign/GameTypeInput.vue.d.ts +15 -0
  154. package/dist/packages/connect/src/components/campaign/MessageInput.vue.d.ts +58 -0
  155. package/dist/packages/connect/src/components/campaign/PromotionGameTypeInput.vue.d.ts +19 -0
  156. package/dist/packages/connect/src/components/campaign/ScheduleRuleInput.vue.d.ts +29 -0
  157. package/dist/packages/connect/src/components/campaign/TargetLocationInput.vue.d.ts +32 -0
  158. package/dist/packages/connect/src/components/campaign/ValidityInput.vue.d.ts +59 -0
  159. package/dist/packages/connect/src/components/collectible/CollectibleChip.vue.d.ts +13 -0
  160. package/dist/packages/connect/src/components/collectible/CollectibleOptionInput.vue.d.ts +59 -0
  161. package/dist/packages/connect/src/components/collection/Collections.vue.d.ts +2 -0
  162. package/dist/packages/connect/src/components/custom/ChipMenu.vue.d.ts +96 -0
  163. package/dist/packages/connect/src/components/custom/CustomSelect.vue.d.ts +68 -0
  164. package/dist/packages/connect/src/components/custom/DateInput.vue.d.ts +24 -0
  165. package/dist/packages/connect/src/components/custom/DateRangeChip.vue.d.ts +25 -0
  166. package/dist/packages/connect/src/components/custom/DateRangeInput.vue.d.ts +28 -0
  167. package/dist/packages/connect/src/components/custom/FilterChip.vue.d.ts +90 -0
  168. package/dist/packages/connect/src/components/custom/ImageInput.vue.d.ts +115 -0
  169. package/dist/packages/connect/src/components/custom/json/JsonNode.vue.d.ts +36 -0
  170. package/dist/packages/connect/src/components/custom/json/JsonViewer.vue.d.ts +22 -0
  171. package/dist/packages/connect/src/components/custom/zod/ZodTextField.vue.d.ts +52 -0
  172. package/dist/packages/connect/src/components/loading/ImageLoading.vue.d.ts +2 -0
  173. package/dist/packages/connect/src/components/loading/LottieAnimation.vue.d.ts +39 -0
  174. package/dist/packages/connect/src/components/loading/Splash.vue.d.ts +2 -0
  175. package/dist/packages/connect/src/components/loyalty/CampaignTypeDialog.vue.d.ts +13 -0
  176. package/dist/packages/connect/src/components/loyalty/CreditCoinDialog.vue.d.ts +29 -0
  177. package/dist/packages/connect/src/components/loyalty/TierExpression.vue.d.ts +32 -0
  178. package/dist/packages/connect/src/components/marketing/HeadlineStyleSideSheet.vue.d.ts +42 -0
  179. package/dist/packages/connect/src/components/marketing/ImageSideSheet.vue.d.ts +40 -0
  180. package/dist/packages/connect/src/components/marketing/LinkRewardSideSheet.vue.d.ts +30 -0
  181. package/dist/packages/connect/src/components/marketing/MarketingSheet.vue.d.ts +2 -0
  182. package/dist/packages/connect/src/components/marketing/RewardDropDown.vue.d.ts +26 -0
  183. package/dist/packages/connect/src/components/marketing/RightSheet.vue.d.ts +66 -0
  184. package/dist/packages/connect/src/components/marketing/SlideUpDown.vue.d.ts +27 -0
  185. package/dist/packages/connect/src/components/marketing/platform/BrandAppImage.vue.d.ts +103 -0
  186. package/dist/packages/connect/src/components/marketing/platform/FacebookPost.vue.d.ts +103 -0
  187. package/dist/packages/connect/src/components/marketing/platform/FacebookStory.vue.d.ts +103 -0
  188. package/dist/packages/connect/src/components/marketing/platform/ImageCanvas.vue.d.ts +81 -0
  189. package/dist/packages/connect/src/components/marketing/platform/InstagramPost.vue.d.ts +102 -0
  190. package/dist/packages/connect/src/components/marketing/platform/InstagramReel.vue.d.ts +102 -0
  191. package/dist/packages/connect/src/components/marketing/platform/InstagramStory.vue.d.ts +102 -0
  192. package/dist/packages/connect/src/components/marketing/platform/TvImage.vue.d.ts +103 -0
  193. package/dist/packages/connect/src/components/member/MemberDetail.vue.d.ts +2 -0
  194. package/dist/packages/connect/src/components/member/MemberList.vue.d.ts +2 -0
  195. package/dist/packages/connect/src/components/member/MemberOverview.vue.d.ts +2 -0
  196. package/dist/packages/connect/src/components/member/MemberStatsDialog.vue.d.ts +21 -0
  197. package/dist/packages/connect/src/components/rule/BillRuleGroup.vue.d.ts +19 -0
  198. package/dist/packages/connect/src/components/rule/CustomRuleDialog.vue.d.ts +30 -0
  199. package/dist/packages/connect/src/components/rule/FeedbackRuleGroup.vue.d.ts +19 -0
  200. package/dist/packages/connect/src/components/rule/PresetRuleDialog.vue.d.ts +20 -0
  201. package/dist/packages/connect/src/components/rule/RuleConfigurator.vue.d.ts +37 -0
  202. package/dist/packages/connect/src/components/rule/RuleEntry.vue.d.ts +19 -0
  203. package/dist/packages/connect/src/components/rule/RuleEquator.vue.d.ts +31 -0
  204. package/dist/packages/connect/src/components/rule/RuleGroup.vue.d.ts +30 -0
  205. package/dist/packages/connect/src/components/rule/SegmentConfigurator.vue.d.ts +17 -0
  206. package/dist/packages/connect/src/components/rule/TimeRuleGroup.vue.d.ts +19 -0
  207. package/dist/packages/connect/src/components/rule/UserRuleGroup.vue.d.ts +19 -0
  208. package/dist/packages/connect/src/components/rule/equators/BirthdayInput.vue.d.ts +15 -0
  209. package/dist/packages/connect/src/components/rule/equators/IsDayInput.vue.d.ts +24 -0
  210. package/dist/packages/connect/src/components/rule/equators/IsInMonthInput.vue.d.ts +16 -0
  211. package/dist/packages/connect/src/components/rule/equators/IsRangeInput.vue.d.ts +55 -0
  212. package/dist/packages/connect/src/components/rule/equators/RruleInput.vue.d.ts +37 -0
  213. package/dist/packages/connect/src/components/rule/presets.d.ts +18 -0
  214. package/dist/packages/connect/src/components/segment/ReviewSegment.vue.d.ts +16 -0
  215. package/dist/packages/connect/src/components/setting/LinkDeviceDialog.vue.d.ts +2 -0
  216. package/dist/packages/connect/src/components/store/AddBundleCard.vue.d.ts +6 -0
  217. package/dist/packages/connect/src/components/store/CategoryDialog.vue.d.ts +23 -0
  218. package/dist/packages/connect/src/components/store/StoreBundleCard.vue.d.ts +20 -0
  219. package/dist/packages/connect/src/components/store/StoreTransactions.vue.d.ts +10 -0
  220. package/dist/packages/connect/src/components/stripe/StripeSetting.vue.d.ts +21 -0
  221. package/dist/packages/connect/src/components/tax/TaxInclusiveSetting.vue.d.ts +30 -0
  222. package/dist/packages/connect/src/components/tax/TaxVariantSetting.vue.d.ts +24 -0
  223. package/dist/packages/connect/src/components/template/TemplateDialog.vue.d.ts +24 -0
  224. package/dist/packages/connect/src/components/template/TemplateInput.vue.d.ts +54 -0
  225. package/dist/packages/connect/src/components/tier/TierCard.vue.d.ts +39 -0
  226. package/dist/packages/connect/src/components/transactions/CollectionTransactions.vue.d.ts +10 -0
  227. package/dist/packages/connect/src/components/transactions/MemberTransactions.vue.d.ts +2 -0
  228. package/dist/packages/connect/src/composables/index.d.ts +2 -0
  229. package/dist/packages/connect/src/composables/loading.d.ts +19 -0
  230. package/dist/packages/connect/src/composables/template.d.ts +7 -0
  231. package/dist/packages/connect/src/export/collection.export.d.ts +9 -0
  232. package/dist/packages/connect/src/export/index.d.ts +9 -0
  233. package/dist/packages/connect/src/export/member.export.d.ts +33 -0
  234. package/dist/packages/connect/src/helpers/campaign.d.ts +94 -0
  235. package/dist/packages/connect/src/helpers/collectible.d.ts +58 -0
  236. package/dist/packages/connect/src/helpers/common.d.ts +1 -0
  237. package/dist/packages/connect/src/helpers/country.d.ts +21 -0
  238. package/dist/packages/connect/src/helpers/currency.d.ts +2 -0
  239. package/dist/packages/connect/src/helpers/effect.d.ts +7 -0
  240. package/dist/packages/connect/src/helpers/message.d.ts +32 -0
  241. package/dist/packages/connect/src/helpers/number.d.ts +3 -0
  242. package/dist/packages/connect/src/helpers/qr.d.ts +7 -0
  243. package/dist/packages/connect/src/helpers/rrule.d.ts +26 -0
  244. package/dist/packages/connect/src/helpers/rule.d.ts +91 -0
  245. package/dist/packages/connect/src/helpers/string.d.ts +16 -0
  246. package/dist/packages/connect/src/helpers/tax.d.ts +74 -0
  247. package/dist/packages/connect/src/helpers/trigger.d.ts +59 -0
  248. package/dist/packages/connect/src/helpers/zod.d.ts +27 -0
  249. package/dist/packages/connect/src/layouts/MainLayout.vue.d.ts +2 -0
  250. package/dist/packages/connect/src/main.d.ts +2 -0
  251. package/dist/packages/connect/src/router/index.d.ts +4 -0
  252. package/dist/packages/connect/src/router/name.d.ts +3 -0
  253. package/dist/packages/connect/src/router/shared.d.ts +11 -0
  254. package/dist/packages/connect/src/sheets/analytic/AnalyticSheet.vue.d.ts +12 -0
  255. package/dist/packages/connect/src/sheets/campaign/EditCampaignSheet.vue.d.ts +11 -0
  256. package/dist/packages/connect/src/sheets/campaign/SendVoucherSheet.vue.d.ts +13 -0
  257. package/dist/packages/connect/src/sheets/card/CardDesignSheet.vue.d.ts +9 -0
  258. package/dist/packages/connect/src/sheets/card/CreateCardSheet.vue.d.ts +9 -0
  259. package/dist/packages/connect/src/sheets/collectible/EditRewardSheet.vue.d.ts +15 -0
  260. package/dist/packages/connect/src/sheets/collectible/EditTitleSheet.vue.d.ts +15 -0
  261. package/dist/packages/connect/src/sheets/collection/CreateCollectionSheet.vue.d.ts +9 -0
  262. package/dist/packages/connect/src/sheets/effect/EffectSheet.vue.d.ts +135 -0
  263. package/dist/packages/connect/src/sheets/member/MemberDetailSheet.vue.d.ts +22 -0
  264. package/dist/packages/connect/src/sheets/store/StoreSettingSheet.vue.d.ts +80 -0
  265. package/dist/packages/connect/src/types/index.d.ts +4 -0
  266. package/dist/packages/connect/src/views/Analytic.vue.d.ts +2 -0
  267. package/dist/packages/connect/src/views/Marketing.vue.d.ts +2 -0
  268. package/dist/packages/connect/src/views/Setting.vue.d.ts +2 -0
  269. package/dist/packages/connect/src/views/Transaction.vue.d.ts +2 -0
  270. package/dist/packages/connect/src/views/campaign/Broadcast.vue.d.ts +2 -0
  271. package/dist/packages/connect/src/views/campaign/Promotion.vue.d.ts +2 -0
  272. package/dist/packages/connect/src/views/campaign/Voucher.vue.d.ts +2 -0
  273. package/dist/packages/connect/src/views/loyalty/Card.vue.d.ts +2 -0
  274. package/dist/packages/connect/src/views/loyalty/Member.vue.d.ts +2 -0
  275. package/dist/packages/connect/src/views/loyalty/Segment.vue.d.ts +2 -0
  276. package/dist/packages/connect/src/views/program/Credit.vue.d.ts +2 -0
  277. package/dist/packages/connect/src/views/program/Experience.vue.d.ts +2 -0
  278. package/dist/packages/connect/src/views/program/Game.vue.d.ts +2 -0
  279. package/dist/packages/connect/src/views/program/Point.vue.d.ts +2 -0
  280. package/dist/packages/connect/src/views/program/Tier.vue.d.ts +2 -0
  281. package/dist/packages/connect/src/views/program/Title.vue.d.ts +2 -0
  282. package/dist/packages/connect/src/views/store/Store.vue.d.ts +2 -0
  283. package/dist/packages/connect/src/views/store/StoreRewards.vue.d.ts +2 -0
  284. package/dist/rule-ByvLGHt_.js +1966 -0
  285. package/dist/rule-builder-C2aRGLCt.js +89 -0
  286. package/dist/style.css +1 -0
  287. package/dist/template-xUeXMsdp.js +190 -0
  288. package/dist/tier-BJDhpH6X.js +4 -0
  289. package/dist/tiers/tier=1.png +0 -0
  290. package/dist/tiers/tier=2.png +0 -0
  291. package/dist/tiers/tier=3.png +0 -0
  292. package/dist/tiers/tier=4.png +0 -0
  293. package/dist/titles/type=diamond.png +0 -0
  294. package/dist/titles/type=drinks.png +0 -0
  295. package/dist/titles/type=food.png +0 -0
  296. package/dist/titles/type=heart.png +0 -0
  297. package/dist/titles/type=medal.png +0 -0
  298. package/dist/titles/type=spend.png +0 -0
  299. package/dist/titles/type=thank-you.png +0 -0
  300. package/dist/titles/type=thumbs-up.png +0 -0
  301. package/dist/titles/type=years.png +0 -0
  302. package/dist/xlsx-CxXT5AXI.js +15491 -0
  303. package/package.json +67 -0
@@ -0,0 +1,58 @@
1
+ import { defineComponent as d, resolveComponent as o, openBlock as r, createElementBlock as s, Fragment as a, createElementVNode as e, createVNode as c, withCtx as v, renderList as p, normalizeClass as _, toDisplayString as n, createCommentVNode as u } from "vue";
2
+ const y = { class: "bg-gradient-to-r from-orange-200 p-24 to-blue-200 via-pink-100 mx-[-24px]" }, b = /* @__PURE__ */ e("div", { class: "fm-typo-en-body-lg-600" }, "Member overview", -1), g = { class: "grid grid-cols-6 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, x = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, f = { class: "fm-typo-en-title-sm-800" }, F = /* @__PURE__ */ d({
3
+ __name: "MemberOverview",
4
+ setup(k) {
5
+ const l = [
6
+ {
7
+ key: "Total member",
8
+ value: 4
9
+ },
10
+ {
11
+ key: "New member",
12
+ value: 2
13
+ },
14
+ {
15
+ key: "Member average spend",
16
+ value: 100
17
+ },
18
+ {
19
+ key: "Average visit time",
20
+ value: 567
21
+ },
22
+ {
23
+ key: "Member growth",
24
+ value: "100%"
25
+ },
26
+ { key: "Inactive member", value: 0 }
27
+ ];
28
+ return (h, C) => {
29
+ const i = o("FmCard");
30
+ return o("FmButton"), r(), s(a, null, [
31
+ e("div", y, [
32
+ c(i, {
33
+ variant: "outlined",
34
+ class: "flex flex-col gap-16 p-16"
35
+ }, {
36
+ default: v(() => [
37
+ b,
38
+ e("div", g, [
39
+ (r(), s(a, null, p(l, (t, m) => e("div", {
40
+ key: t.key,
41
+ class: _(["px-8", { "xs:!border-r": m % 2 == 0 }])
42
+ }, [
43
+ e("div", x, n(t.key), 1),
44
+ e("div", f, n(t.value), 1)
45
+ ], 2)), 64))
46
+ ])
47
+ ]),
48
+ _: 1
49
+ })
50
+ ]),
51
+ u("", !0)
52
+ ], 64);
53
+ };
54
+ }
55
+ });
56
+ export {
57
+ F as default
58
+ };
@@ -0,0 +1,38 @@
1
+ import { defineComponent as m, ref as i, resolveComponent as p, openBlock as t, createElementBlock as _, createVNode as d, unref as e, createBlock as r, createCommentVNode as f } from "vue";
2
+ import { _ as v, a as b } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BHaiBpBC.js";
3
+ import { R as k } from "./app-DRUbn5GO.js";
4
+ const x = { class: "flex flex-col gap-y-32 pb-24" }, V = /* @__PURE__ */ m({
5
+ __name: "MemberTransactions",
6
+ setup(C) {
7
+ const l = [
8
+ {
9
+ label: "Collection",
10
+ value: "collection"
11
+ },
12
+ {
13
+ label: "Store",
14
+ value: "store"
15
+ }
16
+ ], o = i(l[0]), a = k.currentRoute.value.params.id;
17
+ return (T, n) => {
18
+ const s = p("FmTabs");
19
+ return t(), _("div", x, [
20
+ d(s, {
21
+ "model-value": e(o).value,
22
+ items: l,
23
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => o.value = l.find((c) => c.value === u))
24
+ }, null, 8, ["model-value"]),
25
+ e(o).value == "collection" ? (t(), r(v, {
26
+ key: 0,
27
+ user: e(a)
28
+ }, null, 8, ["user"])) : e(o).value == "store" ? (t(), r(b, {
29
+ key: 1,
30
+ user: e(a)
31
+ }, null, 8, ["user"])) : f("", !0)
32
+ ]);
33
+ };
34
+ }
35
+ });
36
+ export {
37
+ V as default
38
+ };
@@ -0,0 +1,163 @@
1
+ import { defineComponent as _, onMounted as w, resolveComponent as o, openBlock as l, createElementBlock as g, createElementVNode as s, createVNode as i, withCtx as y, Fragment as S, renderList as M, createBlock as E, unref as F } from "vue";
2
+ import { p as C } from "./loading-Dy-VtOFu.js";
3
+ import { r as D } from "./index-C4AxDwBx.js";
4
+ const j = {
5
+ "user.name": {
6
+ name: "User name"
7
+ },
8
+ "user.birthday": {
9
+ name: "Birthday"
10
+ },
11
+ "user.joinAt": {
12
+ name: "Join at"
13
+ },
14
+ "user.expiringVouchers.days7": {
15
+ name: "Expiring vouchers in 7 days"
16
+ },
17
+ "user.expiringVouchers.days30": {
18
+ name: "Expiring vouchers in 30 days"
19
+ },
20
+ "user.expiringVouchers.days90": {
21
+ name: "Expiring vouchers in 90 days"
22
+ },
23
+ "user.tier": {
24
+ name: "User tier"
25
+ },
26
+ "user.point": {
27
+ name: "User experience"
28
+ },
29
+ "transaction.amount": {
30
+ name: "Reward amount"
31
+ },
32
+ "collectible.name": {
33
+ name: "Reward name"
34
+ }
35
+ }, k = { class: "space-y-0" }, T = { class: "flex items-center gap-8 justify-between" }, U = /* @__PURE__ */ s("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1), B = { class: "relative" }, L = { class: "absolute bottom-[24px] right-[4px]" }, P = /* @__PURE__ */ _({
36
+ __name: "MessageInput",
37
+ props: {
38
+ modelValue: {
39
+ type: Object
40
+ },
41
+ triggerType: {
42
+ type: String,
43
+ default: () => "SCHEDULE"
44
+ },
45
+ helperText: {
46
+ type: String
47
+ },
48
+ helperState: {
49
+ type: String
50
+ },
51
+ variables: {
52
+ type: Object,
53
+ default: () => [
54
+ "user.name",
55
+ "user.birthday",
56
+ "user.joinAt",
57
+ "user.expiringVouchers.days7",
58
+ "user.expiringVouchers.days30",
59
+ "user.expiringVouchers.days90",
60
+ "user.tier",
61
+ "user.point",
62
+ "transaction.amount",
63
+ "collectible.name"
64
+ ]
65
+ }
66
+ },
67
+ emits: ["update:model-value"],
68
+ setup(e, { emit: v }) {
69
+ const a = e, c = v;
70
+ function b() {
71
+ var n;
72
+ const r = {
73
+ user: {
74
+ name: "John Doe",
75
+ tier: 1,
76
+ point: 1283,
77
+ birthday: (/* @__PURE__ */ new Date("2000-10-02T16:00:00.000Z")).toLocaleDateString(),
78
+ joinAt: (/* @__PURE__ */ new Date("2024-06-14")).toLocaleDateString(),
79
+ expiringVouchers: { days7: 3, days30: 5, days90: 5 }
80
+ },
81
+ transaction: {
82
+ amount: 3
83
+ },
84
+ collectible: {
85
+ name: "RM10 Voucher"
86
+ }
87
+ }, u = D(
88
+ ((n = a.modelValue) == null ? void 0 : n.content) ?? "",
89
+ r
90
+ );
91
+ C.confirm(u, "Preview message", "OK");
92
+ }
93
+ function m(r) {
94
+ c("update:model-value", {
95
+ channel: "SMS",
96
+ content: r,
97
+ language: "en",
98
+ variables: a.variables
99
+ });
100
+ }
101
+ return w(() => {
102
+ c("update:model-value", {
103
+ ...a.modelValue,
104
+ variables: a.variables
105
+ });
106
+ }), (r, u) => {
107
+ var d;
108
+ const n = o("FmButton"), x = o("FmTextarea"), f = o("FmMenuItem"), V = o("FmMenu");
109
+ return l(), g("div", k, [
110
+ s("div", T, [
111
+ U,
112
+ i(n, {
113
+ icon: "visibility",
114
+ label: "Preview message",
115
+ variant: "plain",
116
+ onClick: b
117
+ })
118
+ ]),
119
+ s("div", B, [
120
+ i(x, {
121
+ "model-value": (d = e.modelValue) == null ? void 0 : d.content,
122
+ "onUpdate:modelValue": m,
123
+ "max-length": 160,
124
+ "show-word-count": !0,
125
+ placeholder: "Hi there, you have been invited to join membership",
126
+ "helper-state": e.helperState || void 0,
127
+ "helper-text": e.helperText
128
+ }, null, 8, ["model-value", "helper-state", "helper-text"]),
129
+ s("div", L, [
130
+ i(V, { placement: "left-end" }, {
131
+ "menu-button": y(() => [
132
+ i(n, {
133
+ icon: "add",
134
+ variant: "tertiary",
135
+ size: "md"
136
+ })
137
+ ]),
138
+ default: y(() => [
139
+ (l(!0), g(S, null, M(e.variables.filter(
140
+ (t) => e.triggerType == "SCHEDULE" ? !t.startsWith("transaction.") : !0
141
+ ), (t) => {
142
+ var p;
143
+ return l(), E(f, {
144
+ key: t,
145
+ label: ((p = F(j)[t]) == null ? void 0 : p.name) || t,
146
+ onClick: (A) => {
147
+ var h;
148
+ return m(((h = e.modelValue) == null ? void 0 : h.content) + `{{${t}}}`);
149
+ }
150
+ }, null, 8, ["label", "onClick"]);
151
+ }), 128))
152
+ ]),
153
+ _: 1
154
+ })
155
+ ])
156
+ ])
157
+ ]);
158
+ };
159
+ }
160
+ });
161
+ export {
162
+ P as _
163
+ };
@@ -0,0 +1,211 @@
1
+ import { defineComponent as A, ref as k, computed as D, onMounted as T, resolveComponent as i, openBlock as c, createElementBlock as g, Fragment as _, createVNode as r, unref as a, createElementVNode as n, withCtx as h, renderList as j, createBlock as C, resolveDynamicComponent as E, toDisplayString as f, h as M } from "vue";
2
+ import { _ as H } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as q, components as z } from "@feedmepos/ui-library";
4
+ import { u as G, p as J } from "./loading-Dy-VtOFu.js";
5
+ import { a as Q } from "./app-DRUbn5GO.js";
6
+ import { u as W } from "./campaign-DmbniSEP.js";
7
+ import { g as S, b as V } from "./dto-ts2Lkngs.js";
8
+ import { _ as X } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
+ import { _ as Y } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DLb_mc7S.js";
10
+ import { u as Z } from "./template-xUeXMsdp.js";
11
+ import { c as y } from "./index-BZbepUcT.js";
12
+ const ee = { class: "px-24 flex flex-col gap-y-16" }, te = { class: "flex items-center justify-between w-full" }, oe = { class: "flex gap-8 overflow-x-auto" }, ae = { class: "space-y-8" }, ne = { class: "flex w-full gap-4 items-center" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, re = { class: "space-y-4" }, ie = { class: "fm-typo-en-body-lg-600" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = /* @__PURE__ */ n("img", {
13
+ src: H,
14
+ class: "aspect-square w-[150px]"
15
+ }, null, -1), de = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
16
+ /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your point program"),
17
+ /* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Points are virtual point that customers can earn and use to purchase bundle items. ")
18
+ ], -1), Fe = /* @__PURE__ */ A({
19
+ __name: "Point",
20
+ setup(pe) {
21
+ const L = {
22
+ label: "Create campaign",
23
+ value: "create",
24
+ isPrimary: !0,
25
+ prependIcon: "add"
26
+ }, P = Z("COIN", q()), I = Q(), l = W(), { global: B, minor: w } = G, s = k({
27
+ searchKey: "",
28
+ location: null
29
+ }), p = D(
30
+ () => l.campaigns.point.filter(
31
+ (e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
32
+ )
33
+ ), $ = [
34
+ {
35
+ header: "Program title",
36
+ accessorFn: (e) => e.name
37
+ },
38
+ {
39
+ header: "Status",
40
+ cell(e) {
41
+ return S(e.row.original);
42
+ }
43
+ },
44
+ {
45
+ header: "Summary",
46
+ accessorFn: (e) => V(e)
47
+ //v.effect,
48
+ },
49
+ {
50
+ header: "Actions",
51
+ cell(e) {
52
+ return M(z.FmButton, {
53
+ variant: "tertiary",
54
+ icon: "delete",
55
+ iconColor: "neutral-gray-400",
56
+ onClick: (o) => {
57
+ o.stopPropagation(), v(e.row.original);
58
+ }
59
+ });
60
+ }
61
+ }
62
+ ], x = k();
63
+ async function v(e) {
64
+ await J.remove(`Are you sure you want to remove ${e.name}?`) && await w(
65
+ async () => {
66
+ await y.delete(e._id), await l.read("COIN");
67
+ },
68
+ {
69
+ message: `Removing ${e.name}`,
70
+ successMessage: `Removed ${e.name} successfully`
71
+ }
72
+ );
73
+ }
74
+ async function u(e) {
75
+ e ? await o() : P.open(async (m) => {
76
+ await o(m);
77
+ });
78
+ async function o(m) {
79
+ var d;
80
+ (d = x.value) == null || d.showSheet(
81
+ !0,
82
+ "COIN",
83
+ e ? await y.readById(e._id) : void 0,
84
+ m
85
+ );
86
+ }
87
+ }
88
+ async function K(e) {
89
+ await w(
90
+ async () => {
91
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await l.read("COIN");
92
+ },
93
+ {
94
+ message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
95
+ successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
96
+ }
97
+ );
98
+ }
99
+ return T(async () => {
100
+ await B(async () => {
101
+ await l.read("COIN");
102
+ });
103
+ }), (e, o) => {
104
+ const m = i("FmPageHead"), d = i("FmSearch"), N = i("FmTable"), b = i("FmButton"), R = i("FmListItem"), O = i("FmList"), U = i("FmCard");
105
+ return c(), g(_, null, [
106
+ r(m, {
107
+ title: "Point",
108
+ actions: a(p).length > 0 ? [L] : [],
109
+ "onClick:action": o[0] || (o[0] = () => u())
110
+ }, null, 8, ["actions"]),
111
+ n("div", ee, [
112
+ r(d, {
113
+ modelValue: a(s).searchKey,
114
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => a(s).searchKey = t),
115
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
116
+ placeholder: "search",
117
+ collapsible: ""
118
+ }, null, 8, ["modelValue"]),
119
+ a(l).campaigns.point && a(l).campaigns.point.length > 0 ? (c(), g(_, { key: 0 }, [
120
+ n("div", te, [
121
+ n("div", oe, [
122
+ r(X, {
123
+ modelValue: a(s).location,
124
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => a(s).location = t),
125
+ label: "Location: ",
126
+ "show-item-label": !0,
127
+ icon: "storefront",
128
+ placement: "bottom-start",
129
+ items: a(I).locationItems
130
+ }, null, 8, ["modelValue", "items"])
131
+ ]),
132
+ r(d, {
133
+ modelValue: a(s).searchKey,
134
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => a(s).searchKey = t),
135
+ class: "xs:hidden",
136
+ placeholder: "search",
137
+ collapsible: ""
138
+ }, null, 8, ["modelValue"])
139
+ ]),
140
+ r(N, {
141
+ class: "xs:hidden",
142
+ "row-data": a(p),
143
+ "column-defs": $,
144
+ "search-value": a(s).searchKey,
145
+ "column-filter": [],
146
+ onRowClick: o[4] || (o[4] = (t) => u(t.original)),
147
+ "hide-footer": a(p).length < 10
148
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
149
+ r(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
150
+ default: h(() => [
151
+ (c(!0), g(_, null, j(a(p).filter(
152
+ (t) => t.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
153
+ ), (t) => (c(), C(R, {
154
+ key: t._id.toString(),
155
+ onClick: (F) => u(t),
156
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
157
+ }, {
158
+ default: h(() => [
159
+ n("div", ae, [
160
+ n("div", ne, [
161
+ (c(), C(E(a(S)(t)))),
162
+ n("div", se, f(t.currentReceive ?? 0) + " used ", 1)
163
+ ]),
164
+ n("div", re, [
165
+ n("div", ie, f(t.name), 1),
166
+ n("div", le, f(a(V)(t)), 1)
167
+ ]),
168
+ n("div", ce, " Point received: " + f(t.currentReceive ?? 0), 1)
169
+ ]),
170
+ r(b, {
171
+ icon: "delete",
172
+ "icon-color": "neutral-gray-400",
173
+ variant: "tertiary",
174
+ onClick: (F) => (F.stopPropagation(), v(t))
175
+ }, null, 8, ["onClick"])
176
+ ]),
177
+ _: 2
178
+ }, 1032, ["onClick"]))), 128))
179
+ ]),
180
+ _: 1
181
+ })
182
+ ], 64)) : (c(), C(U, {
183
+ key: 1,
184
+ variant: "outlined",
185
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
186
+ }, {
187
+ default: h(() => [
188
+ me,
189
+ de,
190
+ r(b, {
191
+ variant: "primary",
192
+ label: "Create point program",
193
+ icon: "add",
194
+ onClick: o[5] || (o[5] = (t) => u())
195
+ })
196
+ ]),
197
+ _: 1
198
+ })),
199
+ r(Y, {
200
+ ref_key: "sheetRef",
201
+ ref: x,
202
+ "onSubmit:modelValue": K
203
+ }, null, 512)
204
+ ])
205
+ ], 64);
206
+ };
207
+ }
208
+ });
209
+ export {
210
+ Fe as default
211
+ };
@@ -0,0 +1,219 @@
1
+ import { defineComponent as A, ref as P, computed as D, onMounted as j, resolveComponent as i, openBlock as c, createElementBlock as y, Fragment as g, createVNode as s, unref as l, createElementVNode as a, withCtx as _, renderList as E, createBlock as h, resolveDynamicComponent as H, toDisplayString as v, 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 { c as S, u as Q, p as W } from "./loading-Dy-VtOFu.js";
5
+ import { a as X } from "./app-DRUbn5GO.js";
6
+ import { u as Y } from "./campaign-DmbniSEP.js";
7
+ import { g as O } from "./dto-ts2Lkngs.js";
8
+ import { e as L } from "./effect-BTYIMeYm.js";
9
+ import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DLb_mc7S.js";
11
+ import { u as oe } from "./template-xUeXMsdp.js";
12
+ import { c as f } from "./index-BZbepUcT.js";
13
+ const te = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-center justify-between w-full" }, ne = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, re = { class: "space-y-4" }, ce = { class: "fm-typo-en-body-lg-600" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = /* @__PURE__ */ a("img", {
14
+ src: z,
15
+ class: "aspect-square w-[150px]"
16
+ }, null, -1), pe = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
17
+ /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Create promotion campaign"),
18
+ /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Special offers or deals made available for a limited time to encourage user engagement and purchases. Promotions are generally available to all eligible users without the need for a specific code and are applied by merchant during the promotional period. ")
19
+ ], -1), Pe = /* @__PURE__ */ A({
20
+ __name: "Promotion",
21
+ setup(ue) {
22
+ const V = {
23
+ label: "Create campaign",
24
+ value: "create",
25
+ isPrimary: !0,
26
+ prependIcon: "add"
27
+ }, $ = oe("PROMOTION", G()), w = X(), p = Y(), { global: R, minor: b } = Q, n = P({
28
+ searchKey: "",
29
+ location: null
30
+ }), r = D(
31
+ () => p.campaigns.promotion.filter(
32
+ (e) => !n.value.location || !e.targetLocation || e.targetLocation.includes(n.value.location)
33
+ )
34
+ ), T = [
35
+ {
36
+ header: "Promotion title",
37
+ accessorFn: (e) => e.name
38
+ },
39
+ {
40
+ header: "Status",
41
+ cell(e) {
42
+ return O(e.row.original);
43
+ }
44
+ },
45
+ {
46
+ header: "Type",
47
+ accessorFn: (e) => `${S.title(e.effect.options.target)} promotion`
48
+ },
49
+ {
50
+ header: "Summary",
51
+ accessorFn: (e) => L(e.effect)
52
+ },
53
+ {
54
+ header: "Actions",
55
+ cell(e) {
56
+ return q(J.FmButton, {
57
+ variant: "tertiary",
58
+ icon: "delete",
59
+ iconColor: "neutral-gray-400",
60
+ onClick: (t) => {
61
+ t.stopPropagation(), C(e.row.original);
62
+ }
63
+ });
64
+ }
65
+ }
66
+ ], x = P();
67
+ async function C(e) {
68
+ await W.remove(`Are you sure you want to remove ${e.name}?`) && await b(
69
+ async () => {
70
+ await f.delete(e._id), await p.read("PROMOTION");
71
+ },
72
+ {
73
+ message: `Removing ${e.name}`,
74
+ successMessage: `Removed ${e.name} successfully`
75
+ }
76
+ );
77
+ }
78
+ async function u(e) {
79
+ e ? await t() : $.open(async (m) => {
80
+ await t(m);
81
+ });
82
+ async function t(m) {
83
+ var d;
84
+ (d = x.value) == null || d.showSheet(
85
+ !0,
86
+ "PROMOTION",
87
+ e ? await f.readById(e._id) : void 0,
88
+ m
89
+ );
90
+ }
91
+ }
92
+ async function I(e) {
93
+ await b(
94
+ async () => {
95
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("PROMOTION");
96
+ },
97
+ {
98
+ message: `${e.campaign._id ? "Updating" : "Creating"} promotion`,
99
+ successMessage: `Promotion ${e.campaign._id ? "updated" : "created"} successfully`
100
+ }
101
+ );
102
+ }
103
+ return j(async () => {
104
+ await R(async () => {
105
+ await w.readLocations(), await p.read("PROMOTION");
106
+ });
107
+ }), (e, t) => {
108
+ const m = i("FmPageHead"), d = i("FmSearch"), B = i("FmTable"), M = i("FmChip"), F = i("FmButton"), K = i("FmListItem"), N = i("FmList"), U = i("FmCard");
109
+ return c(), y(g, null, [
110
+ s(m, {
111
+ title: "Promotion",
112
+ actions: l(r).length > 0 ? [V] : [],
113
+ "onClick:action": t[0] || (t[0] = (o) => u())
114
+ }, null, 8, ["actions"]),
115
+ a("div", te, [
116
+ s(d, {
117
+ modelValue: n.value.searchKey,
118
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => n.value.searchKey = o),
119
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
120
+ placeholder: "search",
121
+ collapsible: ""
122
+ }, null, 8, ["modelValue"]),
123
+ l(r) && l(r).length > 0 ? (c(), y(g, { key: 0 }, [
124
+ a("div", ae, [
125
+ a("div", ne, [
126
+ s(Z, {
127
+ modelValue: n.value.location,
128
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => n.value.location = o),
129
+ label: "Location: ",
130
+ "show-item-label": !0,
131
+ icon: "storefront",
132
+ placement: "bottom-start",
133
+ items: l(w).locationItems
134
+ }, null, 8, ["modelValue", "items"])
135
+ ]),
136
+ s(d, {
137
+ modelValue: n.value.searchKey,
138
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => n.value.searchKey = o),
139
+ class: "xs:hidden",
140
+ placeholder: "search",
141
+ collapsible: ""
142
+ }, null, 8, ["modelValue"])
143
+ ]),
144
+ s(B, {
145
+ class: "xs:hidden",
146
+ "row-data": l(r),
147
+ "column-defs": T,
148
+ "search-value": n.value.searchKey,
149
+ "column-filter": [],
150
+ onRowClick: t[4] || (t[4] = (o) => u(o.original)),
151
+ "hide-footer": l(r).length < 10
152
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
153
+ s(N, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
154
+ default: _(() => [
155
+ (c(!0), y(g, null, E(l(r).filter(
156
+ (o) => o.name.toLowerCase().includes(n.value.searchKey.toLowerCase())
157
+ ), (o) => (c(), h(K, {
158
+ key: o._id.toString(),
159
+ onClick: (k) => u(o),
160
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
161
+ }, {
162
+ default: _(() => [
163
+ a("div", se, [
164
+ a("div", le, [
165
+ (c(), h(H(l(O)(o)))),
166
+ s(M, {
167
+ class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
168
+ compact: !0,
169
+ label: `${l(S).title(o.effect.options.target)} promotion`
170
+ }, null, 8, ["label"]),
171
+ a("div", ie, v(o.currentReceive ?? 0) + " used ", 1)
172
+ ]),
173
+ a("div", re, [
174
+ a("div", ce, v(o.name), 1),
175
+ a("div", me, v(l(L)(o.effect)), 1)
176
+ ])
177
+ ]),
178
+ s(F, {
179
+ icon: "delete",
180
+ "icon-color": "neutral-gray-400",
181
+ variant: "tertiary",
182
+ onClick: (k) => (k.stopPropagation(), C(o))
183
+ }, null, 8, ["onClick"])
184
+ ]),
185
+ _: 2
186
+ }, 1032, ["onClick"]))), 128))
187
+ ]),
188
+ _: 1
189
+ })
190
+ ], 64)) : (c(), h(U, {
191
+ key: 1,
192
+ variant: "outlined",
193
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
194
+ }, {
195
+ default: _(() => [
196
+ de,
197
+ pe,
198
+ s(F, {
199
+ variant: "primary",
200
+ label: "Create promotion campaign",
201
+ icon: "add",
202
+ onClick: t[5] || (t[5] = (o) => u())
203
+ })
204
+ ]),
205
+ _: 1
206
+ }))
207
+ ]),
208
+ s(ee, {
209
+ ref_key: "sheetRef",
210
+ ref: x,
211
+ "onSubmit:modelValue": I
212
+ }, null, 512)
213
+ ], 64);
214
+ };
215
+ }
216
+ });
217
+ export {
218
+ Pe as default
219
+ };