@feedmepos/mf-brand-app-builder 0.5.17 → 0.5.18-prod.2

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 (184) hide show
  1. package/README.md +37 -18
  2. package/dist/App-Blp0Dun4.js +109 -0
  3. package/dist/{AssetsSettings-CqLnxCVp.js → AssetsSettings-C5RW4SGM.js} +140 -138
  4. package/dist/BaDivider-DWZv3fqi.js +10 -0
  5. package/dist/BrandkitView-C1iWDB5l.js +9308 -0
  6. package/dist/BuilderView-BBr1lr5n.js +9664 -0
  7. package/dist/ButtonGroup-D_HkX122.js +29 -0
  8. package/dist/ColorPicker-CHzKbuCD.js +543 -0
  9. package/dist/ColorPicker-I6CkNIxt.js +159 -0
  10. package/dist/{ImageUpload-CSFXBbR9.js → ImageUpload-DzQOvA_F.js} +11 -11
  11. package/dist/{LinkButton-BW3l1VVh.js → LinkButton-nIWN_c55.js} +57 -56
  12. package/dist/{ListRepeater-ClJTp-6r.js → ListRepeater-BEgiqfsp.js} +1 -1
  13. package/dist/{ManagementSettings-BC4fKORI.js → ManagementSettings-i_joE8Xh.js} +89 -75
  14. package/dist/ProjectView-CJjhjrVQ.js +705 -0
  15. package/dist/Select-BRYuMWoQ.js +95 -0
  16. package/dist/SettingsView-DHA7hXUx.js +34 -0
  17. package/dist/StepperField-BeeZ_sl9.js +30 -0
  18. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  19. package/dist/app-CODSxYNv.js +6826 -0
  20. package/dist/app.js +5 -4
  21. package/dist/brand-core/src/entity.d.ts +52 -0
  22. package/dist/{components → client/components}/src/components/ButtonList.vue.d.ts +2 -0
  23. package/dist/{components → client/components}/src/components/Homepage.vue.d.ts +2 -0
  24. package/dist/client/components/src/components/Member/MemberAchievements.vue.d.ts +33 -0
  25. package/dist/client/components/src/components/Member/MemberCards.vue.d.ts +19 -0
  26. package/dist/client/components/src/components/Member/MemberSummary.vue.d.ts +24 -0
  27. package/dist/client/components/src/components/Member/TransactionList.vue.d.ts +5 -0
  28. package/dist/client/components/src/components/NavigationBar.vue.d.ts +17 -0
  29. package/dist/{components → client/components}/src/components/atoms/Container.vue.d.ts +1 -0
  30. package/dist/{components → client/components}/src/main.d.ts +9 -1
  31. package/dist/client/components/src/utils/date.d.ts +22 -0
  32. package/dist/client/components/src/views/_Credit.vue.d.ts +24 -0
  33. package/dist/client/components/src/views/_MemberProfile.vue.d.ts +34 -0
  34. package/dist/client/components/src/views/_Point.vue.d.ts +24 -0
  35. package/dist/client/components/src/views/_Referral.vue.d.ts +31 -0
  36. package/dist/client/components/src/views/_ReferralTutorial.vue.d.ts +24 -0
  37. package/dist/{merchant → client/merchant}/src/api/business/index.d.ts +14 -0
  38. package/dist/{merchant → client/merchant}/src/api/index.d.ts +2 -0
  39. package/dist/{merchant → client/merchant}/src/api/template/index.d.ts +2 -2
  40. package/dist/client/merchant/src/app.d.ts +2058 -0
  41. package/dist/client/merchant/src/components/brandkit/ColorSelection.vue.d.ts +15 -0
  42. package/dist/{merchant → client/merchant}/src/components/element-sidebar/all-elements.d.ts +1 -0
  43. package/dist/{merchant → client/merchant}/src/components/inputs/ColorPicker.vue.d.ts +2 -1
  44. package/dist/client/merchant/src/components/inputs/LinkBrandkitColor.vue.d.ts +9 -0
  45. package/dist/client/merchant/src/components/template/TemplatePreview.vue.d.ts +8 -0
  46. package/dist/{merchant → client/merchant}/src/composables/useNode/index.d.ts +1 -1
  47. package/dist/client/merchant/src/composables/useToast/index.d.ts +8 -0
  48. package/dist/{merchant → client/merchant}/src/node-configs/branch-list/props.d.ts +1 -0
  49. package/dist/{merchant → client/merchant}/src/node-configs/button-list/props.d.ts +3 -0
  50. package/dist/{merchant → client/merchant}/src/node-configs/carousel/props.d.ts +1 -0
  51. package/dist/client/merchant/src/node-configs/container/props.d.ts +85 -0
  52. package/dist/{merchant → client/merchant}/src/node-configs/display-image/props.d.ts +1 -0
  53. package/dist/{merchant → client/merchant}/src/node-configs/display-text/props.d.ts +1 -0
  54. package/dist/client/merchant/src/node-configs/member-achievements/mock-data.d.ts +15 -0
  55. package/dist/client/merchant/src/node-configs/member-achievements/props.d.ts +40 -0
  56. package/dist/client/merchant/src/node-configs/member-achievements/schema.d.ts +2 -0
  57. package/dist/{merchant → client/merchant}/src/node-configs/member-card/props.d.ts +1 -0
  58. package/dist/client/merchant/src/node-configs/member-cards/mock-data.d.ts +3 -0
  59. package/dist/client/merchant/src/node-configs/member-cards/props.d.ts +24 -0
  60. package/dist/client/merchant/src/node-configs/member-cards/schema.d.ts +2 -0
  61. package/dist/client/merchant/src/node-configs/member-history/mock-data.d.ts +843 -0
  62. package/dist/client/merchant/src/node-configs/member-history/props.d.ts +1692 -0
  63. package/dist/client/merchant/src/node-configs/member-history/schema.d.ts +3 -0
  64. package/dist/client/merchant/src/node-configs/member-profile/props.d.ts +449 -0
  65. package/dist/client/merchant/src/node-configs/member-profile/schema.d.ts +2 -0
  66. package/dist/client/merchant/src/node-configs/member-referral/props.d.ts +98 -0
  67. package/dist/client/merchant/src/node-configs/member-referral/schema.d.ts +2 -0
  68. package/dist/client/merchant/src/node-configs/member-referral-tutorial/props.d.ts +8 -0
  69. package/dist/client/merchant/src/node-configs/member-referral-tutorial/schema.d.ts +2 -0
  70. package/dist/client/merchant/src/node-configs/member-summary/mock-data.d.ts +9 -0
  71. package/dist/client/merchant/src/node-configs/member-summary/props.d.ts +32 -0
  72. package/dist/client/merchant/src/node-configs/member-summary/schema.d.ts +2 -0
  73. package/dist/client/merchant/src/node-configs/mock-data.d.ts +7 -0
  74. package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/props.d.ts +1 -0
  75. package/dist/{merchant → client/merchant}/src/node-configs/order-method/props.d.ts +1 -0
  76. package/dist/{merchant → client/merchant}/src/node-configs/props.d.ts +8 -1
  77. package/dist/{merchant → client/merchant}/src/node-configs/schema.d.ts +8 -1
  78. package/dist/client/merchant/src/plugin/formkit-i18n.d.ts +2 -0
  79. package/dist/client/merchant/src/plugin/i18n.d.ts +2 -0
  80. package/dist/client/merchant/src/stores/business/index.d.ts +262 -0
  81. package/dist/{merchant → client/merchant}/src/stores/editor/index.d.ts +1 -1
  82. package/dist/{merchant → client/merchant}/src/stores/template/index.d.ts +88 -9
  83. package/dist/client/merchant/src/views/BuilderView.vue.d.ts +5 -0
  84. package/dist/client/merchant/src/views/views.d.ts +101 -0
  85. package/dist/{image-CZHt-VXw.js → image-B1cQ74D8.js} +13 -12
  86. package/dist/index-B7FXWkzh.js +90 -0
  87. package/dist/index-BqHH4xhH.js +198 -0
  88. package/dist/{index-C9F3TTHx.js → index-CSvRSq4D.js} +271 -269
  89. package/dist/index-DzaJbB6y.js +40 -0
  90. package/dist/index-bjsjfWiI.js +30 -0
  91. package/dist/main-TEd7G2KS.js +7957 -0
  92. package/dist/package.json +11 -3
  93. package/dist/style.css +1 -1
  94. package/dist/views-BDWw3w14.js +119 -0
  95. package/dist/{index-BekN4F_2.js → vue-sonner-PX6Req0V.js} +263 -333
  96. package/package.json +11 -3
  97. package/dist/App-BK8oMq3l.js +0 -101
  98. package/dist/BuilderView-DRVOcsVV.js +0 -5501
  99. package/dist/ButtonGroup-B3ba45VA.js +0 -25
  100. package/dist/ColorPicker-DAysa9fA.js +0 -22
  101. package/dist/Select-CbQFoAzb.js +0 -25
  102. package/dist/SettingsView-DFAxZPug.js +0 -33
  103. package/dist/StepperField-DrHM9EDn.js +0 -29
  104. package/dist/app-PkUx7Ubo.js +0 -4690
  105. package/dist/index-B-LGv3nI.js +0 -188
  106. package/dist/index-BaHmjvBz.js +0 -25
  107. package/dist/main-DT3xX1S6.js +0 -6736
  108. package/dist/merchant/src/app.d.ts +0 -3
  109. package/dist/merchant/src/node-configs/container/props.d.ts +0 -57
  110. package/dist/merchant/src/node-configs/mock-data.d.ts +0 -3
  111. package/dist/merchant/src/stores/business/index.d.ts +0 -59
  112. /package/dist/{components → client/components}/src/components/BranchList.vue.d.ts +0 -0
  113. /package/dist/{components → client/components}/src/components/CountrySwitcher.vue.d.ts +0 -0
  114. /package/dist/{components → client/components}/src/components/ImageCarousel.vue.d.ts +0 -0
  115. /package/dist/{components → client/components}/src/components/ImageDisplay.vue.d.ts +0 -0
  116. /package/dist/{components → client/components}/src/components/MemberCard.vue.d.ts +0 -0
  117. /package/dist/{components → client/components}/src/components/OrderHistoryCard.vue.d.ts +0 -0
  118. /package/dist/{components → client/components}/src/components/OrderMethod.vue.d.ts +0 -0
  119. /package/dist/{components → client/components}/src/components/TextDisplay.vue.d.ts +0 -0
  120. /package/dist/{components → client/components}/src/components/atoms/Button.vue.d.ts +0 -0
  121. /package/dist/{components → client/components}/src/components/atoms/CircularProgress.vue.d.ts +0 -0
  122. /package/dist/{components → client/components}/src/components/atoms/Divider.vue.d.ts +0 -0
  123. /package/dist/{components → client/components}/src/components/atoms/Icon.vue.d.ts +0 -0
  124. /package/dist/{components → client/components}/src/components/atoms/LinkSlot.vue.d.ts +0 -0
  125. /package/dist/{components → client/components}/src/components/atoms/OrderTypeChip.vue.d.ts +0 -0
  126. /package/dist/{components → client/components}/src/utils/image.d.ts +0 -0
  127. /package/dist/{components → client/components}/src/views/OrderDetails.vue.d.ts +0 -0
  128. /package/dist/{merchant → client/merchant}/src/App.vue.d.ts +0 -0
  129. /package/dist/{merchant → client/merchant}/src/Entry.vue.d.ts +0 -0
  130. /package/dist/{merchant → client/merchant}/src/api/image/index.d.ts +0 -0
  131. /package/dist/{merchant → client/merchant}/src/components/atoms/BaButtonGroup.vue.d.ts +0 -0
  132. /package/dist/{merchant → client/merchant}/src/components/atoms/BaDivider.vue.d.ts +0 -0
  133. /package/dist/{merchant → client/merchant}/src/components/atoms/index.d.ts +0 -0
  134. /package/dist/{merchant → client/merchant}/src/components/editor/Editor.vue.d.ts +0 -0
  135. /package/dist/{merchant → client/merchant}/src/components/editor/EditorFloatingToobar.vue.d.ts +0 -0
  136. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/EditorToolbar.vue.d.ts +0 -0
  137. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/PreviewQrCode.vue.d.ts +0 -0
  138. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/TemplatePicker.vue.d.ts +0 -0
  139. /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/TemplateShareMenu.vue.d.ts +0 -0
  140. /package/dist/{merchant → client/merchant}/src/components/element-sidebar/ElementSidebar.vue.d.ts +0 -0
  141. /package/dist/{merchant → client/merchant}/src/components/inputs/ButtonGroup.vue.d.ts +0 -0
  142. /package/dist/{merchant → client/merchant}/src/components/inputs/ImageUpload.vue.d.ts +0 -0
  143. /package/dist/{merchant → client/merchant}/src/components/inputs/LinkButton.vue.d.ts +0 -0
  144. /package/dist/{merchant → client/merchant}/src/components/inputs/ListRepeater.vue.d.ts +0 -0
  145. /package/dist/{merchant → client/merchant}/src/components/inputs/Select.vue.d.ts +0 -0
  146. /package/dist/{merchant → client/merchant}/src/components/inputs/StepperField.vue.d.ts +0 -0
  147. /package/dist/{merchant → client/merchant}/src/components/inputs/Switch.vue.d.ts +0 -0
  148. /package/dist/{merchant → client/merchant}/src/components/inputs/TextAlign.vue.d.ts +0 -0
  149. /package/dist/{merchant → client/merchant}/src/components/inputs/TextDecorators.vue.d.ts +0 -0
  150. /package/dist/{merchant → client/merchant}/src/components/inputs/TextField.vue.d.ts +0 -0
  151. /package/dist/{merchant → client/merchant}/src/components/inputs/TextStyleList.vue.d.ts +0 -0
  152. /package/dist/{merchant → client/merchant}/src/components/inputs/index.d.ts +0 -0
  153. /package/dist/{merchant → client/merchant}/src/components/inspector/Inspector.vue.d.ts +0 -0
  154. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigSection.vue.d.ts +0 -0
  155. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTab.vue.d.ts +0 -0
  156. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTabItem.vue.d.ts +0 -0
  157. /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTabTitle.vue.d.ts +0 -0
  158. /package/dist/{merchant → client/merchant}/src/components/navigation-sidebar/NavigationSidebar.vue.d.ts +0 -0
  159. /package/dist/{merchant → client/merchant}/src/components/settings/AssetsSettings.vue.d.ts +0 -0
  160. /package/dist/{merchant → client/merchant}/src/components/settings/ManagementSettings.vue.d.ts +0 -0
  161. /package/dist/{merchant → client/merchant}/src/helpers/businessUrl.d.ts +0 -0
  162. /package/dist/{merchant → client/merchant}/src/main.d.ts +0 -0
  163. /package/dist/{merchant → client/merchant}/src/node-configs/branch-list/schema.d.ts +0 -0
  164. /package/dist/{merchant → client/merchant}/src/node-configs/button-list/schema.d.ts +0 -0
  165. /package/dist/{merchant → client/merchant}/src/node-configs/carousel/schema.d.ts +0 -0
  166. /package/dist/{merchant → client/merchant}/src/node-configs/container/schema.d.ts +0 -0
  167. /package/dist/{merchant → client/merchant}/src/node-configs/display-image/schema.d.ts +0 -0
  168. /package/dist/{merchant → client/merchant}/src/node-configs/display-text/schema.d.ts +0 -0
  169. /package/dist/{merchant → client/merchant}/src/node-configs/homepage/props.d.ts +0 -0
  170. /package/dist/{merchant → client/merchant}/src/node-configs/homepage/schema.d.ts +0 -0
  171. /package/dist/{merchant → client/merchant}/src/node-configs/member-card/mock-data.d.ts +0 -0
  172. /package/dist/{merchant → client/merchant}/src/node-configs/member-card/schema.d.ts +0 -0
  173. /package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/mock-data.d.ts +0 -0
  174. /package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/schema.d.ts +0 -0
  175. /package/dist/{merchant → client/merchant}/src/node-configs/order-method/schema.d.ts +0 -0
  176. /package/dist/{merchant → client/merchant}/src/plugin/formkit.d.ts +0 -0
  177. /package/dist/{merchant → client/merchant}/src/router/index.d.ts +0 -0
  178. /package/dist/{merchant → client/merchant}/src/router/shared.d.ts +0 -0
  179. /package/dist/{merchant → client/merchant}/src/utils/deep-to-raw.d.ts +0 -0
  180. /package/dist/{merchant → client/merchant}/src/utils/image.d.ts +0 -0
  181. /package/dist/{merchant → client/merchant}/src/utils/provider-keys.d.ts +0 -0
  182. /package/dist/{merchant/src/views/BuilderView.vue.d.ts → client/merchant/src/views/BrandkitView.vue.d.ts} +0 -0
  183. /package/dist/{merchant/src/views/HomeView.vue.d.ts → client/merchant/src/views/ProjectView.vue.d.ts} +0 -0
  184. /package/dist/{merchant → client/merchant}/src/views/SettingsView.vue.d.ts +0 -0
@@ -0,0 +1,159 @@
1
+ import { defineComponent as x, ref as b, watch as w, resolveComponent as m, openBlock as y, createBlock as h, withCtx as d, createVNode as i, createTextVNode as F, createElementVNode as r, createElementBlock as C, Fragment as B, renderList as V, normalizeClass as $, normalizeStyle as k, toDisplayString as P, computed as S, unref as D } from "vue";
2
+ import { K as E } from "./ColorPicker-CHzKbuCD.js";
3
+ const L = { class: "grid grid-cols-4 place-items-center items-start gap-16 flex-wrap pb-24" }, N = { class: "flex flex-col items-center" }, z = ["onClick"], K = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary text-center" }, R = { class: "w-full flex gap-8 justify-end items-center" }, T = /* @__PURE__ */ x({
4
+ __name: "LinkBrandkitColor",
5
+ props: {
6
+ color: {}
7
+ },
8
+ emits: ["update"],
9
+ setup(f, { emit: l }) {
10
+ const p = f, a = b(p.color);
11
+ w(
12
+ () => p.color,
13
+ (o) => {
14
+ a.value = o;
15
+ }
16
+ );
17
+ const s = b(!1), v = l, e = [
18
+ "--brand-color-primary",
19
+ "--brand-color-secondary",
20
+ "--brand-color-accent",
21
+ "--brand-color-background-base",
22
+ "--brand-color-background-elevated",
23
+ "--brand-color-neutral-light",
24
+ "--brand-color-neutral-mid",
25
+ "--brand-color-neutral-dark",
26
+ "--brand-color-typo-on-primary",
27
+ "--brand-color-typo-primary",
28
+ "--brand-color-typo-secondary",
29
+ "--brand-color-typo-tertiary",
30
+ "--brand-color-status-success",
31
+ "--brand-color-status-warning",
32
+ "--brand-color-status-error",
33
+ "--brand-color-status-info"
34
+ ];
35
+ return (o, t) => {
36
+ const u = m("FmButton"), c = m("FmDialog");
37
+ return y(), h(c, {
38
+ modelValue: s.value,
39
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => s.value = n),
40
+ "dismiss-away": ""
41
+ }, {
42
+ "dialog-button": d(() => [
43
+ i(u, {
44
+ variant: "plain",
45
+ icon: "link"
46
+ })
47
+ ]),
48
+ "dialog-header": d(() => t[3] || (t[3] = [
49
+ F(" Link with brandkit color ")
50
+ ])),
51
+ default: d(() => [
52
+ r("div", L, [
53
+ (y(), C(B, null, V(e, (n) => {
54
+ var g, _;
55
+ return r("div", N, [
56
+ r("div", {
57
+ onClick: (q) => a.value = n,
58
+ class: $(["p-[2px] border-1 rounded-sm", {
59
+ "border-fm-color-primary": (g = a.value) == null ? void 0 : g.includes(n),
60
+ "border-fm-color-neutral-gray-200": !((_ = a.value) != null && _.includes(n))
61
+ }])
62
+ }, [
63
+ r("div", {
64
+ class: "h-[40px] aspect-square cursor-pointer",
65
+ style: k({ backgroundColor: `var(${n})` })
66
+ }, null, 4)
67
+ ], 10, z),
68
+ r("div", K, P(n.replace("--brand-color-", "").replace(/-/g, " ")), 1)
69
+ ]);
70
+ }), 64))
71
+ ])
72
+ ]),
73
+ "dialog-footer": d(() => [
74
+ r("div", R, [
75
+ i(u, {
76
+ variant: "secondary",
77
+ label: "Close",
78
+ onClick: t[0] || (t[0] = (n) => s.value = !1)
79
+ }),
80
+ i(u, {
81
+ label: "Confirm",
82
+ onClick: t[1] || (t[1] = (n) => (v("update", `var(${a.value})`), s.value = !1))
83
+ })
84
+ ])
85
+ ]),
86
+ _: 1
87
+ }, 8, ["modelValue"]);
88
+ };
89
+ }
90
+ }), U = { class: "flex items-center gap-8" }, j = { class: "shadow-lg rounded-lg p-8" }, A = /* @__PURE__ */ x({
91
+ __name: "ColorPicker",
92
+ props: {
93
+ context: {}
94
+ },
95
+ setup(f) {
96
+ const l = f, p = b(), a = async (e) => {
97
+ await l.context.node.input(e);
98
+ }, s = (e) => {
99
+ navigator.clipboard.writeText(e);
100
+ }, v = S(() => {
101
+ var e;
102
+ return (e = l.context._value) != null && e.startsWith("var") ? getComputedStyle(document.documentElement).getPropertyValue(
103
+ l.context._value.slice(
104
+ 4,
105
+ l.context._value.length - 1
106
+ )
107
+ ).trim() : l.context._value;
108
+ });
109
+ return (e, o) => {
110
+ const t = m("FmButton"), u = m("FmPopover");
111
+ return y(), C("div", U, [
112
+ i(u, null, {
113
+ "popover-button": d(() => [
114
+ r("div", {
115
+ ref_key: "elRef",
116
+ ref: p,
117
+ class: "w-[50px] h-[25px] relative border border-gray-400 rounded overflow-hidden"
118
+ }, [
119
+ o[3] || (o[3] = r("div", { class: "absolute inset-0 bg-checkerboard" }, null, -1)),
120
+ r("div", {
121
+ class: "absolute inset-0",
122
+ style: k({ backgroundColor: e.context._value || "#ffffff00" })
123
+ }, null, 4)
124
+ ], 512)
125
+ ]),
126
+ default: d(() => [
127
+ r("div", j, [
128
+ i(D(E), {
129
+ copy: s,
130
+ onColorCopy: o[0] || (o[0] = (c) => s(c.cssColor)),
131
+ "default-format": "hex",
132
+ color: v.value,
133
+ "visible-formats": ["hex"],
134
+ onColorChange: o[1] || (o[1] = (c) => a(c.cssColor))
135
+ }, {
136
+ "copy-button": d(() => [
137
+ i(t, {
138
+ class: "w-full h-32",
139
+ variant: "secondary",
140
+ icon: "content_copy"
141
+ })
142
+ ]),
143
+ _: 1
144
+ }, 8, ["color"])
145
+ ])
146
+ ]),
147
+ _: 1
148
+ }),
149
+ i(T, {
150
+ color: l.context._value || "#ffffff00",
151
+ onUpdate: o[2] || (o[2] = (c) => a(c))
152
+ }, null, 8, ["color"])
153
+ ]);
154
+ };
155
+ }
156
+ });
157
+ export {
158
+ A as default
159
+ };
@@ -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-B1cQ74D8.js";
3
3
  import { useCoreStore as I } from "@feedmepos/mf-common";
4
- import "./main-DT3xX1S6.js";
4
+ import "./main-TEd7G2KS.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-BqHH4xhH.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-CODSxYNv.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: {