@feedmepos/mf-common 1.26.6 → 1.26.8-beta.1
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/CustomAttributesForm-d2709f16.js +112 -0
- package/dist/{ItemSelector-4e07c532.js → ItemSelector-89a38fe2.js} +1 -1
- package/dist/{RestaurantSelector-0526e3a6.js → RestaurantSelector-ada11d44.js} +36 -36
- package/dist/{app-bc3f81a2.js → app-24adbe08.js} +18912 -18610
- package/dist/app.js +2 -2
- package/dist/components/attribute/CustomAttributesForm.vue.d.ts.map +1 -1
- package/dist/components.d.ts +2 -2
- package/dist/composables/usePaginatedBusinesses.d.ts +2 -2
- package/dist/store.d.ts +1223 -2522
- package/dist/store.d.ts.map +1 -1
- package/dist/stores/menu.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/CustomAttributesForm-40e4d1f7.js +0 -96
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@feedmepos/mf-common",
|
3
|
-
"version": "1.26.
|
3
|
+
"version": "1.26.8-beta.1",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"dependencies": {
|
19
19
|
"@feedmepos/ui-library": "1.6.7",
|
20
20
|
"@feedmepos/auth": "^1.2.1-beta.3",
|
21
|
-
"@feedmepos/core": "2.14.
|
21
|
+
"@feedmepos/core": "2.14.16",
|
22
22
|
"@feedmepos/menu": "1.4.3",
|
23
23
|
"@feedmepos/i18n": "0.3.1",
|
24
24
|
"@feedmepos/custom-attributes": "0.0.0-rc.6",
|
@@ -1,96 +0,0 @@
|
|
1
|
-
import { defineComponent as _, computed as m, resolveComponent as v, openBlock as c, createElementBlock as p, createVNode as k, toDisplayString as A, unref as N, h as V } from "vue";
|
2
|
-
import { t as S, u as C } from "./app-bc3f81a2.js";
|
3
|
-
import { components as O } from "@feedmepos/ui-library";
|
4
|
-
import { c as w } from "./object-27ce045b.js";
|
5
|
-
import "pinia";
|
6
|
-
import "vue-router";
|
7
|
-
const F = { key: 0 }, x = {
|
8
|
-
key: 1,
|
9
|
-
class: "text-fm-color-neutral-gray-500"
|
10
|
-
}, D = /* @__PURE__ */ _({
|
11
|
-
__name: "CustomAttributesForm",
|
12
|
-
props: {
|
13
|
-
entity: {},
|
14
|
-
modelValue: {},
|
15
|
-
valueOptions: {}
|
16
|
-
},
|
17
|
-
emits: ["update:modelValue"],
|
18
|
-
setup(d, { emit: f }) {
|
19
|
-
const s = d, b = f, { t: l } = S(), a = C();
|
20
|
-
function h(t) {
|
21
|
-
var o;
|
22
|
-
if ((o = s.valueOptions) != null && o[t] && s.valueOptions[t].length > 0)
|
23
|
-
return s.valueOptions[t];
|
24
|
-
if (s.entity === "restaurant") {
|
25
|
-
const e = a.restaurants.value.map((n) => {
|
26
|
-
var i;
|
27
|
-
return (i = n.customAttributes) == null ? void 0 : i[t];
|
28
|
-
}).filter((n) => typeof n == "string" && !!n), r = [...new Set(e)];
|
29
|
-
return r.length > 0 ? r : void 0;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
const y = m(() => {
|
33
|
-
var t, o;
|
34
|
-
return ((o = (t = a.currentBusiness.value) == null ? void 0 : t.attributeSettings) == null ? void 0 : o.filter(
|
35
|
-
(e) => e.entity === s.entity
|
36
|
-
)) || [];
|
37
|
-
}), u = m(() => y.value.map((t) => {
|
38
|
-
var e;
|
39
|
-
const o = h(t.key);
|
40
|
-
return {
|
41
|
-
key: t.key,
|
42
|
-
type: t.type,
|
43
|
-
value: ((e = s.modelValue) == null ? void 0 : e[t.key]) || "",
|
44
|
-
options: o
|
45
|
-
};
|
46
|
-
}) || []), g = [
|
47
|
-
{
|
48
|
-
header: () => l("portalshell.customAttributes.form.key"),
|
49
|
-
accessorKey: "key",
|
50
|
-
enableSorting: !1
|
51
|
-
},
|
52
|
-
{
|
53
|
-
header: () => l("portalshell.customAttributes.form.value"),
|
54
|
-
accessorKey: "value",
|
55
|
-
enableSorting: !1,
|
56
|
-
cell: (t) => {
|
57
|
-
const o = t.row.original;
|
58
|
-
return V(O.FmTextField, {
|
59
|
-
modelValue: o.value,
|
60
|
-
placeholder: l("portalshell.customAttributes.form.valuePlaceholder"),
|
61
|
-
datalist: o.options,
|
62
|
-
rules: [
|
63
|
-
(e) => o.type === "number" && isNaN(Number(e)) ? l("portalshell.customAttributes.form.attributeValueMustBeNumber") : !0
|
64
|
-
],
|
65
|
-
"onUpdate:modelValue": (e) => {
|
66
|
-
const r = w(s.modelValue);
|
67
|
-
if (r[o.key] = e == null ? void 0 : e.trim(), o.type === "number") {
|
68
|
-
if (isNaN(Number(e)))
|
69
|
-
return;
|
70
|
-
r[o.key] = Number(e);
|
71
|
-
}
|
72
|
-
Object.keys(r).forEach((n) => {
|
73
|
-
r[n] || delete r[n];
|
74
|
-
}), b("update:modelValue", r);
|
75
|
-
}
|
76
|
-
});
|
77
|
-
}
|
78
|
-
}
|
79
|
-
];
|
80
|
-
return (t, o) => {
|
81
|
-
const e = v("FmTable");
|
82
|
-
return u.value.length > 0 ? (c(), p("div", F, [
|
83
|
-
k(e, {
|
84
|
-
"column-defs": g,
|
85
|
-
"row-data": u.value,
|
86
|
-
"shrink-at": !1,
|
87
|
-
"page-size": u.value.length,
|
88
|
-
"hide-footer": ""
|
89
|
-
}, null, 8, ["row-data", "page-size"])
|
90
|
-
])) : (c(), p("p", x, A(N(l)("portalshell.customAttributes.form.noCustomAttributes")), 1));
|
91
|
-
};
|
92
|
-
}
|
93
|
-
});
|
94
|
-
export {
|
95
|
-
D as default
|
96
|
-
};
|