@feedmepos/mf-settings 0.0.48-beta.1-ex → 0.0.49

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.
@@ -1,88 +0,0 @@
1
- import { ref as f, watch as d, nextTick as h, onMounted as y, onBeforeUnmount as b, defineComponent as p, openBlock as s, createElementBlock as i, normalizeClass as m, renderSlot as r, createElementVNode as l, toDisplayString as a, createCommentVNode as c, createVNode as _, withCtx as k, h as u, withModifiers as v } from "vue";
2
- import { components as w } from "@feedmepos/ui-library";
3
- function z(t) {
4
- const e = f({ top: 0, bottom: 0, left: 0, right: 0 });
5
- function o() {
6
- if (t.value) {
7
- const n = t.value.getBoundingClientRect();
8
- e.value = {
9
- top: n.top,
10
- bottom: n.bottom,
11
- left: n.left,
12
- right: n.right
13
- };
14
- }
15
- }
16
- return d(t, async (n) => {
17
- n && (await h(), o());
18
- }), y(() => {
19
- window.addEventListener("resize", o);
20
- }), b(() => {
21
- window.removeEventListener("resize", o);
22
- }), e;
23
- }
24
- const C = /* @__PURE__ */ p({
25
- __name: "FormColumn",
26
- props: {
27
- shrinkable: { type: Boolean }
28
- },
29
- setup(t) {
30
- return (e, o) => (s(), i("div", {
31
- class: m(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
32
- }, [
33
- r(e.$slots, "default")
34
- ], 2));
35
- }
36
- }), g = {
37
- key: 0,
38
- class: "flex flex-row justify-between items-center"
39
- }, B = { class: "space-y-4" }, E = { class: "fm-typo-en-title-sm-600" }, x = {
40
- key: 0,
41
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
42
- }, F = /* @__PURE__ */ p({
43
- __name: "FormSection",
44
- props: {
45
- title: {},
46
- subTitle: {},
47
- shrinkable: { type: Boolean }
48
- },
49
- setup(t) {
50
- return (e, o) => (s(), i("div", {
51
- class: m(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
52
- }, [
53
- e.title ? (s(), i("div", g, [
54
- l("div", B, [
55
- l("p", E, a(e.title), 1),
56
- e.subTitle ? (s(), i("p", x, a(e.subTitle), 1)) : c("", !0)
57
- ]),
58
- r(e.$slots, "append-title")
59
- ])) : c("", !0),
60
- _(C, { shrinkable: e.shrinkable }, {
61
- default: k(() => [
62
- r(e.$slots, "default")
63
- ]),
64
- _: 3
65
- }, 8, ["shrinkable"])
66
- ], 2));
67
- }
68
- });
69
- function N(t) {
70
- return u(
71
- "div",
72
- {
73
- class: "flex justify-end"
74
- },
75
- t.map(({ name: e, onClick: o }) => u(w.FmButton, {
76
- icon: e,
77
- outline: !0,
78
- variant: "tertiary",
79
- iconColor: "neutral-gray-400",
80
- onClick: v(o, ["stop", "prevent"])
81
- }))
82
- );
83
- }
84
- export {
85
- F as _,
86
- N as c,
87
- z as u
88
- };
@@ -1 +0,0 @@
1
- export declare function initSettings(): Promise<void>;
@@ -1,31 +0,0 @@
1
- import { g as e, b as a } from "./loading-eb019aa4.js";
2
- const i = {
3
- async readBusiness(s) {
4
- return e(await a().get(`/businesses/${s}`));
5
- },
6
- async updateBusinessProfile(s, t) {
7
- return e(await a().put(`/businesses/${s}/profile`, t));
8
- },
9
- async updateBusinessAttributeSettings(s, t) {
10
- return e(await a().put(`/businesses/${s}/attribute-settings`, {
11
- attributes: t
12
- }));
13
- },
14
- async updateRestaurantAttributeSettings(s, t) {
15
- return e(await a().put(`/businesses/${s}/restaurant-attribute-settings`, {
16
- attributes: t
17
- }));
18
- },
19
- async readAgentByCode(s) {
20
- return e(await a("").get(`/agents/search-by-code/${s}`));
21
- },
22
- async createBusiness(s, t) {
23
- return e(await a("", t).post("/businesses", s));
24
- },
25
- async readBusinesses(s) {
26
- return e(await a("", s).get("/my/businesses"));
27
- }
28
- };
29
- export {
30
- i as b
31
- };
@@ -1,92 +0,0 @@
1
- import { defineComponent as u, openBlock as p, createElementBlock as f, createElementVNode as c, renderSlot as a, toDisplayString as m, normalizeClass as i, toRaw as g, markRaw as h, createVNode as y, render as b } from "vue";
2
- var x = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
- function N(e) {
4
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
- }
6
- function j(e) {
7
- if (e.__esModule)
8
- return e;
9
- var t = e.default;
10
- if (typeof t == "function") {
11
- var n = function o() {
12
- return this instanceof o ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
13
- };
14
- n.prototype = t.prototype;
15
- } else
16
- n = {};
17
- return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
18
- var s = Object.getOwnPropertyDescriptor(e, o);
19
- Object.defineProperty(n, o, s.get ? s : {
20
- enumerable: !0,
21
- get: function() {
22
- return e[o];
23
- }
24
- });
25
- }), n;
26
- }
27
- const _ = {
28
- class: /* @__PURE__ */ i([
29
- "flex flex-col",
30
- "p-24 xs:p-0",
31
- "bg-fm-color-neutral-white",
32
- "min-h-[calc(100dvh-56px)]",
33
- "xs:max-h-[calc(100dvh-56px)]"
34
- ])
35
- }, w = {
36
- class: /* @__PURE__ */ i([
37
- "flex items-center",
38
- "mb-24 xs:mb-0 xs:p-16",
39
- "xs:border-b border-fm-color-neutral-gray-100"
40
- ])
41
- }, v = { class: "fm-typo-en-title-md-600" }, E = /* @__PURE__ */ u({
42
- __name: "PageLayout",
43
- props: {
44
- heading: {}
45
- },
46
- setup(e) {
47
- return (t, n) => (p(), f("div", _, [
48
- c("div", w, [
49
- a(t.$slots, "prepend-heading"),
50
- c("div", null, [
51
- c("h1", v, m(t.heading), 1),
52
- a(t.$slots, "sub-heading")
53
- ]),
54
- a(t.$slots, "append-heading")
55
- ]),
56
- a(t.$slots, "default")
57
- ]));
58
- }
59
- });
60
- function d(e) {
61
- return JSON.parse(JSON.stringify(e));
62
- }
63
- function P(e) {
64
- if (typeof structuredClone > "u")
65
- return d(e);
66
- try {
67
- return structuredClone(g(e));
68
- } catch {
69
- return d(e);
70
- }
71
- }
72
- const C = (e, t, n) => {
73
- if (!t)
74
- throw new Error("No current instance found");
75
- const o = document.createElement("div");
76
- document.body.appendChild(o);
77
- const s = h(e), r = y(s, n);
78
- return r.appContext = t.appContext, b(r, o), { container: o, vNode: r };
79
- };
80
- function S(e, t, n) {
81
- var l;
82
- const { vNode: o, unmount: s } = C(t, e, n), r = (l = o.component) == null ? void 0 : l.exposed;
83
- r == null || r.trigger();
84
- }
85
- export {
86
- E as _,
87
- P as a,
88
- S as b,
89
- x as c,
90
- j as d,
91
- N as g
92
- };