@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.
- package/dist/App-CKxXz-yv.js +109 -0
- package/dist/{AssetsSettings-CqLnxCVp.js → AssetsSettings-D7stEXBP.js} +11 -10
- package/dist/BaDivider-DWZv3fqi.js +10 -0
- package/dist/BrandkitView-CGFsc8gN.js +8434 -0
- package/dist/BuilderView-h-AD0K_z.js +9403 -0
- package/dist/ColorPicker-BsSFgHSF.js +156 -0
- package/dist/ColorPicker-CHzKbuCD.js +543 -0
- package/dist/{ImageUpload-CSFXBbR9.js → ImageUpload-Bu1QY9Tu.js} +11 -11
- package/dist/{LinkButton-BW3l1VVh.js → LinkButton-DS5DH9B8.js} +57 -56
- package/dist/{ListRepeater-ClJTp-6r.js → ListRepeater-Bjq_VTKB.js} +1 -1
- package/dist/{ManagementSettings-BC4fKORI.js → ManagementSettings-DWh1pA_2.js} +70 -56
- package/dist/ProjectView-BweZwCAj.js +680 -0
- package/dist/Select-DQrjO2Su.js +91 -0
- package/dist/StepperField-BeeZ_sl9.js +30 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{app-PkUx7Ubo.js → app-DKN3IiyF.js} +143 -76
- package/dist/app.js +1 -1
- package/dist/brand-core/src/entity.d.ts +52 -0
- package/dist/{components → client/components}/src/components/ButtonList.vue.d.ts +2 -0
- package/dist/{components → client/components}/src/components/Homepage.vue.d.ts +2 -0
- package/dist/client/components/src/components/Member/MemberAchievements.vue.d.ts +33 -0
- package/dist/client/components/src/components/Member/MemberCards.vue.d.ts +19 -0
- package/dist/client/components/src/components/Member/MemberSummary.vue.d.ts +24 -0
- package/dist/client/components/src/components/Member/TransactionList.vue.d.ts +5 -0
- package/dist/client/components/src/components/NavigationBar.vue.d.ts +17 -0
- package/dist/{components → client/components}/src/components/atoms/Container.vue.d.ts +1 -0
- package/dist/{components → client/components}/src/main.d.ts +9 -1
- package/dist/client/components/src/utils/date.d.ts +22 -0
- package/dist/client/components/src/views/_Credit.vue.d.ts +20 -0
- package/dist/client/components/src/views/_MemberProfile.vue.d.ts +46 -0
- package/dist/client/components/src/views/_Point.vue.d.ts +20 -0
- package/dist/client/components/src/views/_Referral.vue.d.ts +31 -0
- package/dist/client/components/src/views/_ReferralTutorial.vue.d.ts +24 -0
- package/dist/{merchant → client/merchant}/src/api/business/index.d.ts +14 -0
- package/dist/{merchant → client/merchant}/src/api/template/index.d.ts +2 -2
- package/dist/{merchant → client/merchant}/src/app.d.ts +1 -1
- package/dist/client/merchant/src/components/brandkit/ColorSelection.vue.d.ts +15 -0
- package/dist/client/merchant/src/components/element-sidebar/ElementSidebar.vue.d.ts +2 -0
- package/dist/{merchant → client/merchant}/src/components/element-sidebar/all-elements.d.ts +1 -0
- package/dist/{merchant → client/merchant}/src/components/inputs/ColorPicker.vue.d.ts +2 -1
- package/dist/client/merchant/src/components/inputs/LinkBrandkitColor.vue.d.ts +9 -0
- package/dist/client/merchant/src/components/template/TemplatePreview.vue.d.ts +8 -0
- package/dist/{merchant → client/merchant}/src/composables/useNode/index.d.ts +1 -1
- package/dist/client/merchant/src/composables/useToast/index.d.ts +8 -0
- package/dist/{merchant → client/merchant}/src/node-configs/branch-list/props.d.ts +1 -0
- package/dist/{merchant → client/merchant}/src/node-configs/button-list/props.d.ts +3 -0
- package/dist/{merchant → client/merchant}/src/node-configs/carousel/props.d.ts +1 -0
- package/dist/client/merchant/src/node-configs/container/props.d.ts +85 -0
- package/dist/{merchant → client/merchant}/src/node-configs/display-image/props.d.ts +1 -0
- package/dist/{merchant → client/merchant}/src/node-configs/display-text/props.d.ts +1 -0
- package/dist/client/merchant/src/node-configs/member-achievements/mock-data.d.ts +15 -0
- package/dist/client/merchant/src/node-configs/member-achievements/props.d.ts +40 -0
- package/dist/client/merchant/src/node-configs/member-achievements/schema.d.ts +2 -0
- package/dist/{merchant → client/merchant}/src/node-configs/member-card/props.d.ts +1 -0
- package/dist/client/merchant/src/node-configs/member-cards/mock-data.d.ts +3 -0
- package/dist/client/merchant/src/node-configs/member-cards/props.d.ts +24 -0
- package/dist/client/merchant/src/node-configs/member-cards/schema.d.ts +2 -0
- package/dist/client/merchant/src/node-configs/member-history/mock-data.d.ts +843 -0
- package/dist/client/merchant/src/node-configs/member-history/props.d.ts +1692 -0
- package/dist/client/merchant/src/node-configs/member-history/schema.d.ts +3 -0
- package/dist/client/merchant/src/node-configs/member-profile/props.d.ts +449 -0
- package/dist/client/merchant/src/node-configs/member-profile/schema.d.ts +2 -0
- package/dist/client/merchant/src/node-configs/member-referral/props.d.ts +98 -0
- package/dist/client/merchant/src/node-configs/member-referral/schema.d.ts +2 -0
- package/dist/client/merchant/src/node-configs/member-referral-tutorial/props.d.ts +8 -0
- package/dist/client/merchant/src/node-configs/member-referral-tutorial/schema.d.ts +2 -0
- package/dist/client/merchant/src/node-configs/member-summary/mock-data.d.ts +9 -0
- package/dist/client/merchant/src/node-configs/member-summary/props.d.ts +32 -0
- package/dist/client/merchant/src/node-configs/member-summary/schema.d.ts +2 -0
- package/dist/client/merchant/src/node-configs/mock-data.d.ts +7 -0
- package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/props.d.ts +1 -0
- package/dist/{merchant → client/merchant}/src/node-configs/order-method/props.d.ts +1 -0
- package/dist/{merchant → client/merchant}/src/node-configs/props.d.ts +8 -1
- package/dist/{merchant → client/merchant}/src/node-configs/schema.d.ts +8 -1
- package/dist/client/merchant/src/stores/business/index.d.ts +262 -0
- package/dist/{merchant → client/merchant}/src/stores/editor/index.d.ts +1 -1
- package/dist/{merchant → client/merchant}/src/stores/template/index.d.ts +88 -9
- package/dist/client/merchant/src/views/BuilderView.vue.d.ts +5 -0
- package/dist/client/merchant/src/views/views.d.ts +101 -0
- package/dist/{image-CZHt-VXw.js → image-BYlGZH0E.js} +1 -1
- package/dist/index-BvuwuHni.js +30 -0
- package/dist/index-DBOAICnu.js +198 -0
- package/dist/{index-C9F3TTHx.js → index-DDahVJiF.js} +206 -205
- package/dist/index-DzaJbB6y.js +40 -0
- package/dist/index-bSKZrhdP.js +90 -0
- package/dist/main-pKSbpQEA.js +7928 -0
- package/dist/package.json +8 -2
- package/dist/style.css +1 -1
- package/dist/views-BDWw3w14.js +119 -0
- package/dist/{index-BekN4F_2.js → vue-sonner-PX6Req0V.js} +263 -333
- package/package.json +8 -2
- package/dist/App-BK8oMq3l.js +0 -101
- package/dist/BuilderView-DRVOcsVV.js +0 -5501
- package/dist/ColorPicker-DAysa9fA.js +0 -22
- package/dist/Select-CbQFoAzb.js +0 -25
- package/dist/StepperField-DrHM9EDn.js +0 -29
- package/dist/index-B-LGv3nI.js +0 -188
- package/dist/index-BaHmjvBz.js +0 -25
- package/dist/main-DT3xX1S6.js +0 -6736
- package/dist/merchant/src/node-configs/container/props.d.ts +0 -57
- package/dist/merchant/src/node-configs/mock-data.d.ts +0 -3
- package/dist/merchant/src/stores/business/index.d.ts +0 -59
- package/dist/merchant/src/views/HomeView.vue.d.ts +0 -2
- /package/dist/{components → client/components}/src/components/BranchList.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/CountrySwitcher.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/ImageCarousel.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/ImageDisplay.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/MemberCard.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/OrderHistoryCard.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/OrderMethod.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/TextDisplay.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/atoms/Button.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/atoms/CircularProgress.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/atoms/Divider.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/atoms/Icon.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/atoms/LinkSlot.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/components/atoms/OrderTypeChip.vue.d.ts +0 -0
- /package/dist/{components → client/components}/src/utils/image.d.ts +0 -0
- /package/dist/{components → client/components}/src/views/OrderDetails.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/App.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/Entry.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/api/image/index.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/api/index.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/atoms/BaButtonGroup.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/atoms/BaDivider.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/atoms/index.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/editor/Editor.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/editor/EditorFloatingToobar.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/EditorToolbar.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/PreviewQrCode.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/TemplatePicker.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/editor/toolbar/TemplateShareMenu.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/ButtonGroup.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/ImageUpload.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/LinkButton.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/ListRepeater.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/Select.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/StepperField.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/Switch.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/TextAlign.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/TextDecorators.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/TextField.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/TextStyleList.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inputs/index.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inspector/Inspector.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigSection.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTab.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTabItem.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/inspector/atoms/ConfigTabTitle.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/navigation-sidebar/NavigationSidebar.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/settings/AssetsSettings.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/components/settings/ManagementSettings.vue.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/helpers/businessUrl.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/main.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/branch-list/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/button-list/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/carousel/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/container/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/display-image/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/display-text/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/homepage/props.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/homepage/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/member-card/mock-data.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/member-card/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/mock-data.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/order-history-card/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/node-configs/order-method/schema.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/plugin/formkit.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/router/index.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/router/shared.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/utils/deep-to-raw.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/utils/image.d.ts +0 -0
- /package/dist/{merchant → client/merchant}/src/utils/provider-keys.d.ts +0 -0
- /package/dist/{merchant/src/components/element-sidebar/ElementSidebar.vue.d.ts → client/merchant/src/views/BrandkitView.vue.d.ts} +0 -0
- /package/dist/{merchant/src/views/BuilderView.vue.d.ts → client/merchant/src/views/ProjectView.vue.d.ts} +0 -0
- /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-
|
|
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-
|
|
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 = _,
|
|
17
|
+
const e = _, a = I(), t = b(!1);
|
|
18
18
|
async function v(o) {
|
|
19
19
|
t.value = !0, await h.uploadImage(
|
|
20
|
-
|
|
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
|
|
26
|
-
e.context.node.input(
|
|
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
|
|
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(
|
|
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(
|
|
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
|
|
40
|
+
const l = w("FmDropField");
|
|
41
41
|
return r(), s("div", B, [
|
|
42
|
-
c(
|
|
42
|
+
c(l, {
|
|
43
43
|
class: "w-full h-full",
|
|
44
44
|
onFileUpload: v
|
|
45
45
|
}),
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import {
|
|
5
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
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 =
|
|
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: "
|
|
26
|
-
{ title: "
|
|
27
|
-
{ title: "Points", path: "Member::
|
|
28
|
-
{ title: "
|
|
29
|
-
{ title: "
|
|
30
|
-
{ title: "
|
|
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
|
|
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
|
|
42
|
+
function C() {
|
|
42
43
|
l.context.node.input({
|
|
43
44
|
path: "",
|
|
44
45
|
isExternal: !1
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
function
|
|
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
|
|
58
|
+
function V() {
|
|
58
59
|
d.value = !1, w();
|
|
59
60
|
}
|
|
60
|
-
const
|
|
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 =
|
|
66
|
-
(
|
|
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((
|
|
70
|
+
return (n = _.find((p) => p.path === l.context._value.path)) == null ? void 0 : n.title;
|
|
70
71
|
});
|
|
71
|
-
return
|
|
72
|
+
return L(() => {
|
|
72
73
|
w();
|
|
73
74
|
}), (t, e) => {
|
|
74
|
-
const n = c("FmButton"),
|
|
75
|
-
return
|
|
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] = (
|
|
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
|
|
82
|
+
var o;
|
|
82
83
|
return [
|
|
83
|
-
(
|
|
84
|
-
|
|
85
|
-
r(
|
|
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(
|
|
89
|
+
onClick: R(C, ["stop"])
|
|
89
90
|
})
|
|
90
|
-
])) : (
|
|
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
|
-
|
|
102
|
+
a("div", null, "Link Destination", -1)
|
|
102
103
|
])),
|
|
103
104
|
"dialog-footer": m(() => [
|
|
104
|
-
|
|
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:
|
|
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:
|
|
118
|
+
onClick: B
|
|
118
119
|
})
|
|
119
120
|
])
|
|
120
121
|
]),
|
|
121
122
|
default: m(() => [
|
|
122
|
-
|
|
123
|
-
e[4] || (e[4] =
|
|
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
|
-
|
|
126
|
-
(
|
|
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:
|
|
131
|
-
value:
|
|
131
|
+
label: o.title,
|
|
132
|
+
value: o.path
|
|
132
133
|
}, null, 8, ["model-value", "label", "value"])), 64))
|
|
133
134
|
]),
|
|
134
|
-
e[5] || (e[5] =
|
|
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
|
-
|
|
137
|
-
(
|
|
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:
|
|
142
|
-
value: `Template::${
|
|
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] =
|
|
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
|
-
|
|
148
|
-
e[3] || (e[3] =
|
|
149
|
-
r(
|
|
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":
|
|
153
|
+
"onUpdate:modelValue": T
|
|
153
154
|
}, {
|
|
154
155
|
prepend: m(() => e[2] || (e[2] = [
|
|
155
|
-
|
|
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-
|
|
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
|
|
2
|
-
import { useCoreStore as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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
|
-
],
|
|
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(
|
|
506
|
-
const s =
|
|
507
|
+
setup(H) {
|
|
508
|
+
const s = U(), h = A(), p = w(!0), a = w({
|
|
507
509
|
name: "",
|
|
508
510
|
url: "",
|
|
509
511
|
thumbnail: ""
|
|
510
|
-
}),
|
|
512
|
+
}), k = z(
|
|
511
513
|
() => "https://{slug}.feedme.vip".replace("https://{slug}", "")
|
|
512
514
|
);
|
|
513
515
|
function _() {
|
|
514
|
-
|
|
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
|
|
540
|
-
var
|
|
541
|
-
const e = ((
|
|
542
|
-
|
|
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
|
-
|
|
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,
|
|
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 = ((
|
|
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
|
|
578
|
-
return
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
e[4] || (e[4] =
|
|
582
|
-
l(
|
|
583
|
-
disabled:
|
|
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
|
-
|
|
589
|
-
|
|
590
|
-
a.value.thumbnail ? (
|
|
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(
|
|
594
|
-
}, null, 8,
|
|
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
|
-
|
|
600
|
-
|
|
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:
|
|
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
|
-
|
|
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) =>
|
|
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) =>
|
|
645
|
+
e[3] || (e[3] = (n) => p.value = !1)
|
|
632
646
|
],
|
|
633
647
|
rules: [
|
|
634
|
-
(n) => !n || o(
|
|
635
|
-
(n) => !n || !o(
|
|
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:
|
|
639
|
-
|
|
640
|
-
l(
|
|
652
|
+
append: $(() => [
|
|
653
|
+
i("span", G, C(k.value), 1),
|
|
654
|
+
l(r, {
|
|
641
655
|
icon: "content_copy",
|
|
642
656
|
variant: "plain",
|
|
643
|
-
onClick:
|
|
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
|
-
|
|
670
|
+
ee as default
|
|
657
671
|
};
|