@feedmepos/mf-brand-app-builder 0.5.17 → 0.5.18

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 (176) hide show
  1. package/dist/App-CKxXz-yv.js +109 -0
  2. package/dist/{AssetsSettings-CqLnxCVp.js → AssetsSettings-D7stEXBP.js} +11 -10
  3. package/dist/BaDivider-DWZv3fqi.js +10 -0
  4. package/dist/BrandkitView-CGFsc8gN.js +8434 -0
  5. package/dist/BuilderView-h-AD0K_z.js +9403 -0
  6. package/dist/ColorPicker-BsSFgHSF.js +156 -0
  7. package/dist/ColorPicker-CHzKbuCD.js +543 -0
  8. package/dist/{ImageUpload-CSFXBbR9.js → ImageUpload-Bu1QY9Tu.js} +11 -11
  9. package/dist/{LinkButton-BW3l1VVh.js → LinkButton-DS5DH9B8.js} +57 -56
  10. package/dist/{ListRepeater-ClJTp-6r.js → ListRepeater-Bjq_VTKB.js} +1 -1
  11. package/dist/{ManagementSettings-BC4fKORI.js → ManagementSettings-DWh1pA_2.js} +70 -56
  12. package/dist/ProjectView-BweZwCAj.js +680 -0
  13. package/dist/Select-DQrjO2Su.js +91 -0
  14. package/dist/StepperField-BeeZ_sl9.js +30 -0
  15. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  16. package/dist/{app-PkUx7Ubo.js → app-DKN3IiyF.js} +143 -76
  17. package/dist/app.js +1 -1
  18. package/dist/brand-core/src/entity.d.ts +52 -0
  19. package/dist/{components → client/components}/src/components/ButtonList.vue.d.ts +2 -0
  20. package/dist/{components → client/components}/src/components/Homepage.vue.d.ts +2 -0
  21. package/dist/client/components/src/components/Member/MemberAchievements.vue.d.ts +33 -0
  22. package/dist/client/components/src/components/Member/MemberCards.vue.d.ts +19 -0
  23. package/dist/client/components/src/components/Member/MemberSummary.vue.d.ts +24 -0
  24. package/dist/client/components/src/components/Member/TransactionList.vue.d.ts +5 -0
  25. package/dist/client/components/src/components/NavigationBar.vue.d.ts +17 -0
  26. package/dist/{components → client/components}/src/components/atoms/Container.vue.d.ts +1 -0
  27. package/dist/{components → client/components}/src/main.d.ts +9 -1
  28. package/dist/client/components/src/utils/date.d.ts +22 -0
  29. package/dist/client/components/src/views/_Credit.vue.d.ts +20 -0
  30. package/dist/client/components/src/views/_MemberProfile.vue.d.ts +46 -0
  31. package/dist/client/components/src/views/_Point.vue.d.ts +20 -0
  32. package/dist/client/components/src/views/_Referral.vue.d.ts +31 -0
  33. package/dist/client/components/src/views/_ReferralTutorial.vue.d.ts +24 -0
  34. package/dist/{merchant → client/merchant}/src/api/business/index.d.ts +14 -0
  35. package/dist/{merchant → client/merchant}/src/api/template/index.d.ts +2 -2
  36. package/dist/{merchant → client/merchant}/src/app.d.ts +1 -1
  37. package/dist/client/merchant/src/components/brandkit/ColorSelection.vue.d.ts +15 -0
  38. package/dist/client/merchant/src/components/element-sidebar/ElementSidebar.vue.d.ts +2 -0
  39. package/dist/{merchant → client/merchant}/src/components/element-sidebar/all-elements.d.ts +1 -0
  40. package/dist/{merchant → client/merchant}/src/components/inputs/ColorPicker.vue.d.ts +2 -1
  41. package/dist/client/merchant/src/components/inputs/LinkBrandkitColor.vue.d.ts +9 -0
  42. package/dist/client/merchant/src/components/template/TemplatePreview.vue.d.ts +8 -0
  43. package/dist/{merchant → client/merchant}/src/composables/useNode/index.d.ts +1 -1
  44. package/dist/client/merchant/src/composables/useToast/index.d.ts +8 -0
  45. package/dist/{merchant → client/merchant}/src/node-configs/branch-list/props.d.ts +1 -0
  46. package/dist/{merchant → client/merchant}/src/node-configs/button-list/props.d.ts +3 -0
  47. package/dist/{merchant → client/merchant}/src/node-configs/carousel/props.d.ts +1 -0
  48. package/dist/client/merchant/src/node-configs/container/props.d.ts +85 -0
  49. package/dist/{merchant → client/merchant}/src/node-configs/display-image/props.d.ts +1 -0
  50. package/dist/{merchant → client/merchant}/src/node-configs/display-text/props.d.ts +1 -0
  51. package/dist/client/merchant/src/node-configs/member-achievements/mock-data.d.ts +15 -0
  52. package/dist/client/merchant/src/node-configs/member-achievements/props.d.ts +40 -0
  53. package/dist/client/merchant/src/node-configs/member-achievements/schema.d.ts +2 -0
  54. package/dist/{merchant → client/merchant}/src/node-configs/member-card/props.d.ts +1 -0
  55. package/dist/client/merchant/src/node-configs/member-cards/mock-data.d.ts +3 -0
  56. package/dist/client/merchant/src/node-configs/member-cards/props.d.ts +24 -0
  57. package/dist/client/merchant/src/node-configs/member-cards/schema.d.ts +2 -0
  58. package/dist/client/merchant/src/node-configs/member-history/mock-data.d.ts +843 -0
  59. package/dist/client/merchant/src/node-configs/member-history/props.d.ts +1692 -0
  60. package/dist/client/merchant/src/node-configs/member-history/schema.d.ts +3 -0
  61. package/dist/client/merchant/src/node-configs/member-profile/props.d.ts +449 -0
  62. package/dist/client/merchant/src/node-configs/member-profile/schema.d.ts +2 -0
  63. package/dist/client/merchant/src/node-configs/member-referral/props.d.ts +98 -0
  64. package/dist/client/merchant/src/node-configs/member-referral/schema.d.ts +2 -0
  65. package/dist/client/merchant/src/node-configs/member-referral-tutorial/props.d.ts +8 -0
  66. package/dist/client/merchant/src/node-configs/member-referral-tutorial/schema.d.ts +2 -0
  67. package/dist/client/merchant/src/node-configs/member-summary/mock-data.d.ts +9 -0
  68. package/dist/client/merchant/src/node-configs/member-summary/props.d.ts +32 -0
  69. package/dist/client/merchant/src/node-configs/member-summary/schema.d.ts +2 -0
  70. package/dist/client/merchant/src/node-configs/mock-data.d.ts +7 -0
  71. package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/props.d.ts +1 -0
  72. package/dist/{merchant → client/merchant}/src/node-configs/order-method/props.d.ts +1 -0
  73. package/dist/{merchant → client/merchant}/src/node-configs/props.d.ts +8 -1
  74. package/dist/{merchant → client/merchant}/src/node-configs/schema.d.ts +8 -1
  75. package/dist/client/merchant/src/stores/business/index.d.ts +262 -0
  76. package/dist/{merchant → client/merchant}/src/stores/editor/index.d.ts +1 -1
  77. package/dist/{merchant → client/merchant}/src/stores/template/index.d.ts +88 -9
  78. package/dist/client/merchant/src/views/BuilderView.vue.d.ts +5 -0
  79. package/dist/client/merchant/src/views/views.d.ts +101 -0
  80. package/dist/{image-CZHt-VXw.js → image-BYlGZH0E.js} +1 -1
  81. package/dist/index-BvuwuHni.js +30 -0
  82. package/dist/index-DBOAICnu.js +198 -0
  83. package/dist/{index-C9F3TTHx.js → index-DDahVJiF.js} +206 -205
  84. package/dist/index-DzaJbB6y.js +40 -0
  85. package/dist/index-bSKZrhdP.js +90 -0
  86. package/dist/main-pKSbpQEA.js +7928 -0
  87. package/dist/package.json +8 -2
  88. package/dist/style.css +1 -1
  89. package/dist/views-BDWw3w14.js +119 -0
  90. package/dist/{index-BekN4F_2.js → vue-sonner-PX6Req0V.js} +263 -333
  91. package/package.json +8 -2
  92. package/dist/App-BK8oMq3l.js +0 -101
  93. package/dist/BuilderView-DRVOcsVV.js +0 -5501
  94. package/dist/ColorPicker-DAysa9fA.js +0 -22
  95. package/dist/Select-CbQFoAzb.js +0 -25
  96. package/dist/StepperField-DrHM9EDn.js +0 -29
  97. package/dist/index-B-LGv3nI.js +0 -188
  98. package/dist/index-BaHmjvBz.js +0 -25
  99. package/dist/main-DT3xX1S6.js +0 -6736
  100. package/dist/merchant/src/node-configs/container/props.d.ts +0 -57
  101. package/dist/merchant/src/node-configs/mock-data.d.ts +0 -3
  102. package/dist/merchant/src/stores/business/index.d.ts +0 -59
  103. package/dist/merchant/src/views/HomeView.vue.d.ts +0 -2
  104. /package/dist/{components → client/components}/src/components/BranchList.vue.d.ts +0 -0
  105. /package/dist/{components → client/components}/src/components/CountrySwitcher.vue.d.ts +0 -0
  106. /package/dist/{components → client/components}/src/components/ImageCarousel.vue.d.ts +0 -0
  107. /package/dist/{components → client/components}/src/components/ImageDisplay.vue.d.ts +0 -0
  108. /package/dist/{components → client/components}/src/components/MemberCard.vue.d.ts +0 -0
  109. /package/dist/{components → client/components}/src/components/OrderHistoryCard.vue.d.ts +0 -0
  110. /package/dist/{components → client/components}/src/components/OrderMethod.vue.d.ts +0 -0
  111. /package/dist/{components → client/components}/src/components/TextDisplay.vue.d.ts +0 -0
  112. /package/dist/{components → client/components}/src/components/atoms/Button.vue.d.ts +0 -0
  113. /package/dist/{components → client/components}/src/components/atoms/CircularProgress.vue.d.ts +0 -0
  114. /package/dist/{components → client/components}/src/components/atoms/Divider.vue.d.ts +0 -0
  115. /package/dist/{components → client/components}/src/components/atoms/Icon.vue.d.ts +0 -0
  116. /package/dist/{components → client/components}/src/components/atoms/LinkSlot.vue.d.ts +0 -0
  117. /package/dist/{components → client/components}/src/components/atoms/OrderTypeChip.vue.d.ts +0 -0
  118. /package/dist/{components → client/components}/src/utils/image.d.ts +0 -0
  119. /package/dist/{components → client/components}/src/views/OrderDetails.vue.d.ts +0 -0
  120. /package/dist/{merchant → client/merchant}/src/App.vue.d.ts +0 -0
  121. /package/dist/{merchant → client/merchant}/src/Entry.vue.d.ts +0 -0
  122. /package/dist/{merchant → client/merchant}/src/api/image/index.d.ts +0 -0
  123. /package/dist/{merchant → client/merchant}/src/api/index.d.ts +0 -0
  124. /package/dist/{merchant → client/merchant}/src/components/atoms/BaButtonGroup.vue.d.ts +0 -0
  125. /package/dist/{merchant → client/merchant}/src/components/atoms/BaDivider.vue.d.ts +0 -0
  126. /package/dist/{merchant → client/merchant}/src/components/atoms/index.d.ts +0 -0
  127. /package/dist/{merchant → client/merchant}/src/components/editor/Editor.vue.d.ts +0 -0
  128. /package/dist/{merchant → client/merchant}/src/components/editor/EditorFloatingToobar.vue.d.ts +0 -0
  129. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/EditorToolbar.vue.d.ts +0 -0
  130. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/PreviewQrCode.vue.d.ts +0 -0
  131. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/TemplatePicker.vue.d.ts +0 -0
  132. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/TemplateShareMenu.vue.d.ts +0 -0
  133. /package/dist/{merchant → client/merchant}/src/components/inputs/ButtonGroup.vue.d.ts +0 -0
  134. /package/dist/{merchant → client/merchant}/src/components/inputs/ImageUpload.vue.d.ts +0 -0
  135. /package/dist/{merchant → client/merchant}/src/components/inputs/LinkButton.vue.d.ts +0 -0
  136. /package/dist/{merchant → client/merchant}/src/components/inputs/ListRepeater.vue.d.ts +0 -0
  137. /package/dist/{merchant → client/merchant}/src/components/inputs/Select.vue.d.ts +0 -0
  138. /package/dist/{merchant → client/merchant}/src/components/inputs/StepperField.vue.d.ts +0 -0
  139. /package/dist/{merchant → client/merchant}/src/components/inputs/Switch.vue.d.ts +0 -0
  140. /package/dist/{merchant → client/merchant}/src/components/inputs/TextAlign.vue.d.ts +0 -0
  141. /package/dist/{merchant → client/merchant}/src/components/inputs/TextDecorators.vue.d.ts +0 -0
  142. /package/dist/{merchant → client/merchant}/src/components/inputs/TextField.vue.d.ts +0 -0
  143. /package/dist/{merchant → client/merchant}/src/components/inputs/TextStyleList.vue.d.ts +0 -0
  144. /package/dist/{merchant → client/merchant}/src/components/inputs/index.d.ts +0 -0
  145. /package/dist/{merchant → client/merchant}/src/components/inspector/Inspector.vue.d.ts +0 -0
  146. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigSection.vue.d.ts +0 -0
  147. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTab.vue.d.ts +0 -0
  148. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTabItem.vue.d.ts +0 -0
  149. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTabTitle.vue.d.ts +0 -0
  150. /package/dist/{merchant → client/merchant}/src/components/navigation-sidebar/NavigationSidebar.vue.d.ts +0 -0
  151. /package/dist/{merchant → client/merchant}/src/components/settings/AssetsSettings.vue.d.ts +0 -0
  152. /package/dist/{merchant → client/merchant}/src/components/settings/ManagementSettings.vue.d.ts +0 -0
  153. /package/dist/{merchant → client/merchant}/src/helpers/businessUrl.d.ts +0 -0
  154. /package/dist/{merchant → client/merchant}/src/main.d.ts +0 -0
  155. /package/dist/{merchant → client/merchant}/src/node-configs/branch-list/schema.d.ts +0 -0
  156. /package/dist/{merchant → client/merchant}/src/node-configs/button-list/schema.d.ts +0 -0
  157. /package/dist/{merchant → client/merchant}/src/node-configs/carousel/schema.d.ts +0 -0
  158. /package/dist/{merchant → client/merchant}/src/node-configs/container/schema.d.ts +0 -0
  159. /package/dist/{merchant → client/merchant}/src/node-configs/display-image/schema.d.ts +0 -0
  160. /package/dist/{merchant → client/merchant}/src/node-configs/display-text/schema.d.ts +0 -0
  161. /package/dist/{merchant → client/merchant}/src/node-configs/homepage/props.d.ts +0 -0
  162. /package/dist/{merchant → client/merchant}/src/node-configs/homepage/schema.d.ts +0 -0
  163. /package/dist/{merchant → client/merchant}/src/node-configs/member-card/mock-data.d.ts +0 -0
  164. /package/dist/{merchant → client/merchant}/src/node-configs/member-card/schema.d.ts +0 -0
  165. /package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/mock-data.d.ts +0 -0
  166. /package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/schema.d.ts +0 -0
  167. /package/dist/{merchant → client/merchant}/src/node-configs/order-method/schema.d.ts +0 -0
  168. /package/dist/{merchant → client/merchant}/src/plugin/formkit.d.ts +0 -0
  169. /package/dist/{merchant → client/merchant}/src/router/index.d.ts +0 -0
  170. /package/dist/{merchant → client/merchant}/src/router/shared.d.ts +0 -0
  171. /package/dist/{merchant → client/merchant}/src/utils/deep-to-raw.d.ts +0 -0
  172. /package/dist/{merchant → client/merchant}/src/utils/image.d.ts +0 -0
  173. /package/dist/{merchant → client/merchant}/src/utils/provider-keys.d.ts +0 -0
  174. /package/dist/{merchant/src/components/element-sidebar/ElementSidebar.vue.d.ts → client/merchant/src/views/BrandkitView.vue.d.ts} +0 -0
  175. /package/dist/{merchant/src/views/BuilderView.vue.d.ts → client/merchant/src/views/ProjectView.vue.d.ts} +0 -0
  176. /package/dist/{merchant → client/merchant}/src/views/SettingsView.vue.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as y, ref as b, resolveComponent as w, openBlock as r, createElementBlock as s, createVNode as c, Fragment as C, createElementVNode as i, unref as u, createCommentVNode as d } from "vue";
2
- import { r as g, I as h } from "./image-CZHt-VXw.js";
2
+ import { r as g, I as h } from "./image-BYlGZH0E.js";
3
3
  import { useCoreStore as I } from "@feedmepos/mf-common";
4
- import "./main-DT3xX1S6.js";
4
+ import "./main-pKSbpQEA.js";
5
5
  import { _ as $ } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
6
6
  import { C as k } from "./CircularProgress-h90pbjU3.js";
7
7
  import { v as F } from "./v4-ANoOI1Qw.js";
@@ -14,32 +14,32 @@ const B = { class: "w-full h-[210px] relative" }, P = { class: "absolute z-[1] t
14
14
  context: {}
15
15
  },
16
16
  setup(_) {
17
- const e = _, l = I(), t = b(!1);
17
+ const e = _, a = I(), t = b(!1);
18
18
  async function v(o) {
19
19
  t.value = !0, await h.uploadImage(
20
- l.currentBusiness.value._id,
20
+ a.currentBusiness.value._id,
21
21
  `${F()}.${o.name.split(".").pop()}`,
22
22
  o
23
23
  ).then((m) => {
24
24
  var p;
25
- const a = `https://image.feedme.cc/business/${l.currentBusiness.value._id}/${m.imagePath}`;
26
- e.context.node.input(a);
25
+ const l = `https://image.feedme.cc/business/${a.currentBusiness.value._id}/${m.imagePath}`;
26
+ e.context.node.input(l);
27
27
  const n = new Image();
28
- (p = e.context.attrs.props) != null && p.ignoreUpdate || (n.onload = () => {
28
+ (p = e.context) != null && p.ignoreUpdate || (n.onload = () => {
29
29
  var f;
30
30
  ((f = e.context.node.at("$root")) == null ? void 0 : f._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
31
- }), n.src = g(a);
31
+ }), n.src = g(l);
32
32
  }).finally(() => t.value = !1);
33
33
  }
34
34
  async function x() {
35
35
  t.value = !0;
36
36
  const o = e.context._value.split("/").pop();
37
- await h.deleteImage(l.currentBusiness.value._id, o).then(() => e.context.node.input("")).finally(() => t.value = !1);
37
+ await h.deleteImage(a.currentBusiness.value._id, o).then(() => e.context.node.input("")).finally(() => t.value = !1);
38
38
  }
39
39
  return (o, m) => {
40
- const a = w("FmDropField");
40
+ const l = w("FmDropField");
41
41
  return r(), s("div", B, [
42
- c(a, {
42
+ c(l, {
43
43
  class: "w-full h-full",
44
44
  onFileUpload: v
45
45
  }),
@@ -1,35 +1,36 @@
1
- import { defineComponent as L, ref as f, computed as k, onBeforeMount as P, resolveComponent as c, openBlock as p, createBlock as v, withCtx as m, createElementBlock as x, createElementVNode as o, toDisplayString as I, createVNode as r, withModifiers as R, Fragment as C, renderList as F } from "vue";
2
- import { u as $, B as y } from "./index-B-LGv3nI.js";
3
- import { _ as j } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
4
- import { useCoreStore as z } from "@feedmepos/mf-common";
5
- const A = {
1
+ import { defineComponent as I, ref as f, computed as k, onBeforeMount as L, resolveComponent as c, openBlock as u, createBlock as v, withCtx as m, createElementBlock as x, createElementVNode as a, toDisplayString as P, createVNode as r, withModifiers as R, Fragment as M, renderList as F } from "vue";
2
+ import { B as y } from "./BaDivider-DWZv3fqi.js";
3
+ import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
4
+ import { u as $ } from "./index-DBOAICnu.js";
5
+ import "@feedmepos/mf-common";
6
+ const j = {
6
7
  key: 1,
7
8
  type: "button",
8
9
  class: "min-w-[162px] py-[6px] px-8 flex justify-between items-center bg-fm-color-system-warning-100 rounded-lg"
9
- }, G = { class: "w-[113px] h-full fm-typo-en-body-md-600 text-fm-color-primary line-clamp-1" }, H = { class: "w-full flex flex-col gap-16" }, N = { class: "w-full flex gap-8 flex-wrap" }, O = { class: "w-full flex gap-8 flex-wrap" }, W = { class: "w-full flex items-center" }, q = { class: "w-full flex justify-end items-center gap-12" }, Y = /* @__PURE__ */ L({
10
+ }, z = { class: "w-[113px] h-full fm-typo-en-body-md-600 text-fm-color-primary line-clamp-1" }, A = { class: "w-full flex flex-col gap-16" }, N = { class: "w-full flex gap-8 flex-wrap" }, O = { class: "w-full flex gap-8 flex-wrap" }, G = { class: "w-full flex items-center" }, H = { class: "w-full flex justify-end items-center gap-12" }, Y = /* @__PURE__ */ I({
10
11
  __name: "LinkButton",
11
12
  props: {
12
13
  context: {}
13
14
  },
14
15
  setup(E) {
15
- const l = E, s = f(""), i = f(""), d = f(!1);
16
- z();
17
- const b = $(), h = k(
18
- () => b.state.allTemplates.filter(
16
+ const l = E, s = f(""), i = f(""), d = f(!1), h = $(), b = k(
17
+ () => h.state.allTemplates.filter(
19
18
  (t) => {
20
19
  var e;
21
- return t.templateId !== ((e = b.state.selectedTemplate) == null ? void 0 : e.templateId);
20
+ return t.templateId !== ((e = h.state.selectedTemplate) == null ? void 0 : e.templateId) && !t.templateId.startsWith("member-");
22
21
  }
23
22
  )
24
23
  ), _ = [
25
- { title: "Homepage", path: "Member::Homepage" },
26
- { title: "Credit", path: "Member::Credit" },
27
- { title: "Points", path: "Member::Points" },
28
- { title: "Voucher", path: "Member::Voucher" },
29
- { title: "Game", path: "Member::Game" },
30
- { title: "Store", path: "Member::Store" }
24
+ { title: "Homepage", path: "" },
25
+ { title: "Credits", path: "Member::credit" },
26
+ { title: "Points", path: "Member::point" },
27
+ { title: "Vouchers", path: "Member::vouchers" },
28
+ { title: "Store", path: "Member::store" },
29
+ { title: "Missions", path: "Member::mission" },
30
+ { title: "Games", path: "Member::games" },
31
+ { title: "Referral", path: "Member::referral" }
31
32
  ];
32
- function M() {
33
+ function B() {
33
34
  i.value ? l.context.node.input({
34
35
  path: i.value ? `https://${i.value}` : "",
35
36
  isExternal: !0
@@ -38,13 +39,13 @@ const A = {
38
39
  isExternal: !1
39
40
  }), d.value = !1;
40
41
  }
41
- function V() {
42
+ function C() {
42
43
  l.context.node.input({
43
44
  path: "",
44
45
  isExternal: !1
45
46
  });
46
47
  }
47
- function B(t) {
48
+ function T(t) {
48
49
  s.value = "", i.value = t;
49
50
  }
50
51
  function g(t) {
@@ -54,40 +55,40 @@ const A = {
54
55
  var t, e, n;
55
56
  (t = l.context._value) != null && t.isExternal ? (i.value = ((e = l.context._value) == null ? void 0 : e.path.replace("https://", "")) || "", s.value = "") : (s.value = ((n = l.context._value) == null ? void 0 : n.path) || "", i.value = "");
56
57
  }
57
- function S() {
58
+ function V() {
58
59
  d.value = !1, w();
59
60
  }
60
- const T = k(() => {
61
+ const U = k(() => {
61
62
  var t, e, n;
62
63
  if ((t = l.context._value) != null && t.isExternal)
63
64
  return l.context._value.path;
64
65
  if (l.context._value.path.startsWith("Template::"))
65
- return (e = h.value.find(
66
- (u) => u.templateId === l.context._value.path.split("::").pop()
66
+ return (e = b.value.find(
67
+ (p) => p.templateId === l.context._value.path.split("::").pop()
67
68
  )) == null ? void 0 : e.templateAlias;
68
69
  if (l.context._value.path.startsWith("Member::"))
69
- return (n = _.find((u) => u.path === l.context._value.path)) == null ? void 0 : n.title;
70
+ return (n = _.find((p) => p.path === l.context._value.path)) == null ? void 0 : n.title;
70
71
  });
71
- return P(() => {
72
+ return L(() => {
72
73
  w();
73
74
  }), (t, e) => {
74
- const n = c("FmButton"), u = c("FmRadio"), U = c("FmTextField"), D = c("FmDialog");
75
- return p(), v(D, {
75
+ const n = c("FmButton"), p = c("FmRadio"), S = c("FmTextField"), D = c("FmDialog");
76
+ return u(), v(D, {
76
77
  modelValue: d.value,
77
- "onUpdate:modelValue": e[0] || (e[0] = (a) => d.value = a),
78
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => d.value = o),
78
79
  "min-width": 500
79
80
  }, {
80
81
  "dialog-button": m(() => {
81
- var a;
82
+ var o;
82
83
  return [
83
- (a = t.context._value) != null && a.path ? (p(), x("button", A, [
84
- o("p", G, I(T.value), 1),
85
- r(j, {
84
+ (o = t.context._value) != null && o.path ? (u(), x("button", j, [
85
+ a("p", z, P(U.value), 1),
86
+ r(W, {
86
87
  name: "close",
87
88
  class: "text-[24px] text-fm-color-primary",
88
- onClick: R(V, ["stop"])
89
+ onClick: R(C, ["stop"])
89
90
  })
90
- ])) : (p(), v(n, {
91
+ ])) : (u(), v(n, {
91
92
  key: 0,
92
93
  variant: "secondary",
93
94
  "prepend-icon": "link",
@@ -98,61 +99,61 @@ const A = {
98
99
  ];
99
100
  }),
100
101
  "dialog-header": m(() => e[1] || (e[1] = [
101
- o("div", null, "Link Destination", -1)
102
+ a("div", null, "Link Destination", -1)
102
103
  ])),
103
104
  "dialog-footer": m(() => [
104
- o("div", q, [
105
+ a("div", H, [
105
106
  r(n, {
106
107
  type: "button",
107
108
  variant: "secondary",
108
109
  label: "Cancel",
109
110
  size: "md",
110
- onClick: S
111
+ onClick: V
111
112
  }),
112
113
  r(n, {
113
114
  type: "button",
114
115
  variant: "primary",
115
116
  label: "Save",
116
117
  size: "md",
117
- onClick: M
118
+ onClick: B
118
119
  })
119
120
  ])
120
121
  ]),
121
122
  default: m(() => [
122
- o("div", H, [
123
- e[4] || (e[4] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, " Member ", -1)),
123
+ a("div", A, [
124
+ e[4] || (e[4] = a("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, " Member ", -1)),
124
125
  r(y),
125
- o("div", N, [
126
- (p(), x(C, null, F(_, (a) => r(u, {
126
+ a("div", N, [
127
+ (u(), x(M, null, F(_, (o) => r(p, {
127
128
  "model-value": s.value,
128
129
  "onUpdate:modelValue": g,
129
130
  rules: () => [],
130
- label: a.title,
131
- value: a.path
131
+ label: o.title,
132
+ value: o.path
132
133
  }, null, 8, ["model-value", "label", "value"])), 64))
133
134
  ]),
134
- e[5] || (e[5] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, " Other template ", -1)),
135
+ e[5] || (e[5] = a("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, " Other template ", -1)),
135
136
  r(y),
136
- o("div", O, [
137
- (p(!0), x(C, null, F(h.value, (a) => (p(), v(u, {
137
+ a("div", O, [
138
+ (u(!0), x(M, null, F(b.value, (o) => (u(), v(p, {
138
139
  "model-value": s.value,
139
140
  "onUpdate:modelValue": g,
140
141
  rules: () => [],
141
- label: a.templateAlias,
142
- value: `Template::${a.templateId}`
142
+ label: o.templateAlias,
143
+ value: `Template::${o.templateId}`
143
144
  }, null, 8, ["model-value", "label", "value"]))), 256))
144
145
  ]),
145
- e[6] || (e[6] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, " External URL ", -1)),
146
+ e[6] || (e[6] = a("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, " External URL ", -1)),
146
147
  r(y),
147
- o("div", W, [
148
- e[3] || (e[3] = o("div", { class: "w-120 shrink-0" }, "Enter URL", -1)),
149
- r(U, {
148
+ a("div", G, [
149
+ e[3] || (e[3] = a("div", { class: "w-120 shrink-0" }, "Enter URL", -1)),
150
+ r(S, {
150
151
  class: "w-full",
151
152
  "model-value": i.value,
152
- "onUpdate:modelValue": B
153
+ "onUpdate:modelValue": T
153
154
  }, {
154
155
  prepend: m(() => e[2] || (e[2] = [
155
- o("div", { class: "text-fm-color-typo-tertiary" }, "https://", -1)
156
+ a("div", { class: "text-fm-color-typo-tertiary" }, "https://", -1)
156
157
  ])),
157
158
  _: 1
158
159
  }, 8, ["model-value"])
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, resolveComponent as y, openBlock as c, createBlock as s, unref as u, withCtx as i, createElementBlock as m, Fragment as x, renderList as g, createElementVNode as p, createVNode as n, resolveDynamicComponent as F } from "vue";
2
- import { F as f } from "./app-PkUx7Ubo.js";
2
+ import { F as f } from "./app-DKN3IiyF.js";
3
3
  const h = { class: "flex justify-end gap-4 items-center w-full py-16 px-12 border-b" }, z = { class: "flex flex-col gap-4 w-full p-12" }, I = /* @__PURE__ */ b({
4
4
  __name: "ListRepeater",
5
5
  props: {
@@ -1,8 +1,10 @@
1
- import { defineComponent as j, ref as w, computed as z, watch as $, resolveComponent as m, openBlock as p, createElementBlock as y, createElementVNode as r, createVNode as l, unref as o, createBlock as S, withCtx as F, toDisplayString as C } from "vue";
2
- import { useCoreStore as P } from "@feedmepos/mf-common";
3
- import { K as k, B as g } from "./index-BekN4F_2.js";
4
- import { r as U, I as V } from "./image-CZHt-VXw.js";
5
- const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
1
+ import { defineComponent as j, ref as w, computed as z, watch as S, resolveComponent as m, openBlock as d, createElementBlock as y, createElementVNode as i, createVNode as l, unref as o, createBlock as F, withCtx as $, toDisplayString as C } from "vue";
2
+ import { useCoreStore as U } from "@feedmepos/mf-common";
3
+ import { B as g } from "./index-bSKZrhdP.js";
4
+ import { K as P } from "./vue-sonner-PX6Req0V.js";
5
+ import { r as V, I as q } from "./image-BYlGZH0E.js";
6
+ import { useSnackbar as A } from "@feedmepos/ui-library";
7
+ const I = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), R = [
6
8
  "brand",
7
9
  "home",
8
10
  "app",
@@ -500,18 +502,43 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
500
502
  "za",
501
503
  "zm",
502
504
  "zw"
503
- ], I = { class: "w-full flex flex-col gap-40" }, L = { class: "flex flex-col gap-24" }, T = { class: "w-full flex items-center justify-between h-[36px]" }, E = { class: "w-full flex gap-32" }, R = { class: "relative shrink-0 h-[100px] w-[100px]" }, D = ["src"], K = { class: "absolute -top-8 -right-8 rounded-full h-32 w-32 border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white flex justify-center items-center" }, M = { class: "w-full flex flex-col gap-24 max-w-[400px]" }, N = { class: "text-fm-color-typo-secondary" }, W = /* @__PURE__ */ j({
505
+ ], L = { class: "w-full flex flex-col gap-40" }, T = { class: "flex flex-col gap-24" }, E = { class: "w-full flex items-center justify-between h-[36px]" }, D = { class: "w-full flex gap-32" }, K = { class: "relative shrink-0 h-[100px] w-[100px]" }, M = ["src"], N = { class: "absolute -top-8 -right-8 rounded-full h-32 w-32 border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white flex justify-center items-center" }, O = { class: "w-full flex flex-col gap-24 max-w-[400px]" }, G = { class: "text-fm-color-typo-secondary" }, ee = /* @__PURE__ */ j({
504
506
  __name: "ManagementSettings",
505
- setup(O) {
506
- const s = P(), d = w(!0), a = w({
507
+ setup(H) {
508
+ const s = U(), h = A(), p = w(!0), a = w({
507
509
  name: "",
508
510
  url: "",
509
511
  thumbnail: ""
510
- }), h = z(
512
+ }), k = z(
511
513
  () => "https://{slug}.feedme.vip".replace("https://{slug}", "")
512
514
  );
513
515
  function _() {
514
- k.promise(
516
+ var t, e;
517
+ navigator.clipboard.writeText(
518
+ "https://{slug}.feedme.vip".replace(
519
+ "{slug}",
520
+ ((t = s.currentBusiness.value) == null ? void 0 : t.url) ?? ((e = s.currentBusiness.value) == null ? void 0 : e._id)
521
+ )
522
+ ).then(() => {
523
+ h.open(
524
+ {
525
+ message: "Copied URL to clipboard!",
526
+ type: "success"
527
+ },
528
+ 1500
529
+ );
530
+ }).catch((r) => {
531
+ h.open(
532
+ {
533
+ message: "Failed to copy URL to clipboard",
534
+ type: "error"
535
+ },
536
+ 1500
537
+ );
538
+ });
539
+ }
540
+ function x() {
541
+ P.promise(
515
542
  g.setShortUrl(
516
543
  a.value.url,
517
544
  s.currentBusiness.value.url ?? "",
@@ -536,10 +563,10 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
536
563
  }
537
564
  );
538
565
  }
539
- function x(t) {
540
- var i, u;
541
- const e = ((i = t.dataTransfer) == null ? void 0 : i.files[0]) ?? ((u = t.target) == null ? void 0 : u.files[0]);
542
- V.uploadImage(
566
+ function B(t) {
567
+ var r, u;
568
+ const e = ((r = t.dataTransfer) == null ? void 0 : r.files[0]) ?? ((u = t.target) == null ? void 0 : u.files[0]);
569
+ q.uploadImage(
543
570
  s.currentBusiness.value._id,
544
571
  `thumbnail/${(/* @__PURE__ */ new Date()).toISOString()}.${e.name.split(".").pop()}`,
545
572
  e
@@ -552,56 +579,43 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
552
579
  }), a.value.thumbnail = `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`;
553
580
  });
554
581
  }
555
- function B() {
556
- var t, e;
557
- k.promise(
558
- navigator.clipboard.writeText(
559
- `${((t = s.currentBusiness.value) == null ? void 0 : t.url) ?? ((e = s.currentBusiness.value) == null ? void 0 : e._id)}${h.value}`
560
- ),
561
- {
562
- loading: "Copying...",
563
- success: () => "Link copied",
564
- error: () => "Error copying link, please try again"
565
- }
566
- );
567
- }
568
- return $(
582
+ return S(
569
583
  () => s.currentBusiness.value,
570
584
  () => {
571
- var t, e, i;
572
- a.value.name = ((t = s.currentBusiness.value) == null ? void 0 : t.name) ?? "", a.value.url = ((e = s.currentBusiness.value) == null ? void 0 : e.url) ?? "", a.value.thumbnail = ((i = s.currentBusiness.value) == null ? void 0 : i.thumbnail) ?? "";
585
+ var t, e, r;
586
+ a.value.name = ((t = s.currentBusiness.value) == null ? void 0 : t.name) ?? "", a.value.url = ((e = s.currentBusiness.value) == null ? void 0 : e.url) ?? "", a.value.thumbnail = ((r = s.currentBusiness.value) == null ? void 0 : r.thumbnail) ?? "";
573
587
  },
574
588
  { immediate: !0 }
575
589
  ), (t, e) => {
576
590
  var v, b;
577
- const i = m("FmButton"), u = m("FmAvatar"), c = m("FmIcon"), f = m("FmTextField");
578
- return p(), y("div", I, [
579
- r("div", L, [
580
- r("div", T, [
581
- e[4] || (e[4] = r("h2", { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Business details ", -1)),
582
- l(i, {
583
- disabled: d.value,
591
+ const r = m("FmButton"), u = m("FmAvatar"), c = m("FmIcon"), f = m("FmTextField");
592
+ return d(), y("div", L, [
593
+ i("div", T, [
594
+ i("div", E, [
595
+ e[4] || (e[4] = i("h2", { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Business details ", -1)),
596
+ l(r, {
597
+ disabled: p.value,
584
598
  label: "Save",
585
- onClick: _
599
+ onClick: x
586
600
  }, null, 8, ["disabled"])
587
601
  ]),
588
- r("div", E, [
589
- r("div", R, [
590
- a.value.thumbnail ? (p(), y("img", {
602
+ i("div", D, [
603
+ i("div", K, [
604
+ a.value.thumbnail ? (d(), y("img", {
591
605
  key: 0,
592
606
  class: "h-full w-full rounded-full",
593
- src: o(U)(a.value.thumbnail)
594
- }, null, 8, D)) : (p(), S(u, {
607
+ src: o(V)(a.value.thumbnail)
608
+ }, null, 8, M)) : (d(), F(u, {
595
609
  key: 1,
596
610
  name: ((v = o(s).currentBusiness.value) == null ? void 0 : v.name) ?? "",
597
611
  class: "h-full w-full !fm-typo-en-title-md-600 bg-fm-color-primary-oats text-fm-color-primary"
598
612
  }, null, 8, ["name"])),
599
- r("button", K, [
600
- r("input", {
613
+ i("button", N, [
614
+ i("input", {
601
615
  class: "absolute top-0 left-0 h-32 w-32 opacity-0 cursor-pointer",
602
616
  type: "file",
603
617
  accept: "image/*",
604
- onChange: x
618
+ onChange: B
605
619
  }, null, 32),
606
620
  l(c, {
607
621
  size: "md",
@@ -611,14 +625,14 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
611
625
  })
612
626
  ])
613
627
  ]),
614
- r("div", M, [
628
+ i("div", O, [
615
629
  l(f, {
616
630
  class: "w-full",
617
631
  label: "Business name",
618
632
  modelValue: a.value.name,
619
633
  "onUpdate:modelValue": [
620
634
  e[0] || (e[0] = (n) => a.value.name = n),
621
- e[1] || (e[1] = (n) => d.value = !1)
635
+ e[1] || (e[1] = (n) => p.value = !1)
622
636
  ]
623
637
  }, null, 8, ["modelValue"]),
624
638
  l(f, {
@@ -628,19 +642,19 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
628
642
  modelValue: a.value.url,
629
643
  "onUpdate:modelValue": [
630
644
  e[2] || (e[2] = (n) => a.value.url = n),
631
- e[3] || (e[3] = (n) => d.value = !1)
645
+ e[3] || (e[3] = (n) => p.value = !1)
632
646
  ],
633
647
  rules: [
634
- (n) => !n || o(q).test(n) || "Min 6 characters, alphanumeric only",
635
- (n) => !n || !o(A).includes(n) || "Business URL is reserved"
648
+ (n) => !n || o(I).test(n) || "Min 6 characters, alphanumeric only",
649
+ (n) => !n || !o(R).includes(n) || "Business URL is reserved"
636
650
  ]
637
651
  }, {
638
- append: F(() => [
639
- r("span", N, C(h.value), 1),
640
- l(i, {
652
+ append: $(() => [
653
+ i("span", G, C(k.value), 1),
654
+ l(r, {
641
655
  icon: "content_copy",
642
656
  variant: "plain",
643
- onClick: B
657
+ onClick: _
644
658
  })
645
659
  ]),
646
660
  _: 1
@@ -653,5 +667,5 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), A = [
653
667
  }
654
668
  });
655
669
  export {
656
- W as default
670
+ ee as default
657
671
  };