@feedmepos/mf-common 1.26.8-beta.2 → 1.26.8-prod

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-common",
3
- "version": "1.26.8-beta.2",
3
+ "version": "1.26.8-prod",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -16,25 +16,25 @@
16
16
  "./style.css": "./dist/style.css"
17
17
  },
18
18
  "dependencies": {
19
- "@feedmepos/ui-library": "1.6.7",
19
+ "@casl/ability": "^3.2.0",
20
20
  "@feedmepos/auth": "^1.2.1-beta.3",
21
- "@feedmepos/core": "2.14.16",
21
+ "@feedmepos/core": "2.14.19",
22
22
  "@feedmepos/menu": "1.4.3",
23
23
  "@feedmepos/i18n": "0.3.1",
24
24
  "@feedmepos/custom-attributes": "0.0.0-rc.6",
25
- "vue-i18n": "10.0.5",
25
+ "@feedmepos/ui-library": "1.7.0",
26
+ "@feedmepos/vue-client-monitoring": "0.1.0-beta.6",
26
27
  "@vue/devtools-api": "^6.5.0",
27
28
  "@vueuse/core": "^10.11.0",
28
29
  "axios": "^1.7.7",
29
30
  "firebase": "^10.12.2",
30
31
  "libphonenumber-js": "^1.11.1",
31
32
  "pinia": "^2.1.6",
32
- "vue": "^3.5.13",
33
- "vue-router": "^4.2.5",
34
- "@casl/ability": "^3.2.0",
35
33
  "sift": "^17.1.3",
36
- "@feedmepos/vue-client-monitoring": "0.1.0-beta.6",
37
- "vue-country-flag-next": "2.3.2"
34
+ "vue": "^3.5.13",
35
+ "vue-country-flag-next": "2.3.2",
36
+ "vue-i18n": "10.0.5",
37
+ "vue-router": "^4.2.5"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@tsconfig/node18": "^18.2.2",
@@ -1,109 +0,0 @@
1
- import { defineComponent as _, computed as p, resolveComponent as k, openBlock as d, createElementBlock as f, createVNode as C, toDisplayString as O, unref as D, h as b } from "vue";
2
- import { t as F, u as T } from "./app-2ee53239.js";
3
- import { components as h } from "@feedmepos/ui-library";
4
- import { c as E } from "./object-27ce045b.js";
5
- import "pinia";
6
- import "vue-router";
7
- const w = { key: 0 }, B = {
8
- key: 1,
9
- class: "text-fm-color-neutral-gray-500"
10
- }, U = /* @__PURE__ */ _({
11
- __name: "CustomAttributesForm",
12
- props: {
13
- entity: {},
14
- modelValue: {},
15
- valueOptions: {}
16
- },
17
- emits: ["update:modelValue"],
18
- setup(y, { emit: g }) {
19
- const s = y, A = g, { t: u } = F(), m = T();
20
- function v(t) {
21
- var e;
22
- if ((e = s.valueOptions) != null && e[t] && s.valueOptions[t].length > 0)
23
- return s.valueOptions[t];
24
- if (s.entity === "restaurant") {
25
- const r = m.restaurants.value.map((n) => {
26
- var o;
27
- return (o = n.customAttributes) == null ? void 0 : o[t];
28
- }).filter((n) => typeof n == "string" && !!n), l = [...new Set(r)];
29
- return l.length > 0 ? l : void 0;
30
- }
31
- }
32
- const N = p(() => {
33
- var t, e;
34
- return ((e = (t = m.currentBusiness.value) == null ? void 0 : t.attributeSettings) == null ? void 0 : e.filter(
35
- (r) => r.entity === s.entity
36
- )) || [];
37
- }), i = p(() => N.value.map((t) => {
38
- var r;
39
- const e = v(t.key);
40
- return {
41
- key: t.key,
42
- type: t.type,
43
- value: ((r = s.modelValue) == null ? void 0 : r[t.key]) || "",
44
- options: e
45
- };
46
- }) || []), S = {
47
- group: {
48
- type: ["MIXMATCH", "ADDON"]
49
- },
50
- item: {
51
- type: ["DRINK", "FOOD", "MERCHANDISE", "ADDON", "FREEGIFT", "SNACKS", "BOTTLED"]
52
- }
53
- }, V = [
54
- {
55
- header: () => u("portalshell.customAttributes.form.key"),
56
- accessorKey: "key",
57
- enableSorting: !1
58
- },
59
- {
60
- header: () => u("portalshell.customAttributes.form.value"),
61
- accessorKey: "value",
62
- enableSorting: !1,
63
- cell: (t) => {
64
- var n;
65
- const e = t.row.original, r = (o) => {
66
- const a = E(s.modelValue);
67
- if (a[e.key] = o == null ? void 0 : o.trim(), e.type === "number") {
68
- if (isNaN(Number(o)))
69
- return;
70
- a[e.key] = Number(o);
71
- }
72
- Object.keys(a).forEach((c) => {
73
- a[c] || delete a[c];
74
- }), A("update:modelValue", a);
75
- }, l = ((n = S[s.entity]) == null ? void 0 : n[e.key]) ?? [];
76
- return l != null && l.length ? b(h.FmSelect, {
77
- modelValue: e.value,
78
- placeholder: u("portalshell.customAttributes.form.valuePlaceholder"),
79
- items: l.map((o) => ({ label: o, value: o })),
80
- "onUpdate:modelValue": r
81
- }) : b(h.FmTextField, {
82
- modelValue: e.value,
83
- placeholder: u("portalshell.customAttributes.form.valuePlaceholder"),
84
- datalist: e.options,
85
- rules: [
86
- (o) => e.type === "number" && isNaN(Number(o)) ? u("portalshell.customAttributes.form.attributeValueMustBeNumber") : !0
87
- ],
88
- "onUpdate:modelValue": r
89
- });
90
- }
91
- }
92
- ];
93
- return (t, e) => {
94
- const r = k("FmTable");
95
- return i.value.length > 0 ? (d(), f("div", w, [
96
- C(r, {
97
- "column-defs": V,
98
- "row-data": i.value,
99
- "shrink-at": !1,
100
- "page-size": i.value.length,
101
- "hide-footer": ""
102
- }, null, 8, ["row-data", "page-size"])
103
- ])) : (d(), f("p", B, O(D(u)("portalshell.customAttributes.form.noCustomAttributes")), 1));
104
- };
105
- }
106
- });
107
- export {
108
- U as default
109
- };