@feedmepos/mf-common 1.29.12 → 1.29.14

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 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../src/App.vue.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAA;;;;AA+KrE,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../src/App.vue.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAA;;;;AAiLrE,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as C, computed as y, resolveComponent as N, openBlock as h, createElementBlock as v, createVNode as S, toDisplayString as F, unref as w, h as c } from "vue";
2
- import { t as x, u as B } from "./app-7e617adf.js";
3
- import { components as p } from "@feedmepos/ui-library";
1
+ import { defineComponent as C, computed as b, resolveComponent as N, openBlock as h, createElementBlock as v, createVNode as S, toDisplayString as F, unref as w, h as d } from "vue";
2
+ import { t as x, u as B } from "./app-d5677e21.js";
3
+ import { components as c } from "@feedmepos/ui-library";
4
4
  import { c as O } from "./object-27ce045b.js";
5
5
  import "pinia";
6
6
  import "vue-router";
@@ -16,32 +16,33 @@ const U = { key: 0 }, z = {
16
16
  },
17
17
  emits: ["update:modelValue"],
18
18
  setup(g, { emit: k }) {
19
- const n = g, V = k, { t: u } = x(), f = B();
19
+ const s = g, V = k, { t: u } = x(), f = B();
20
20
  function _(t) {
21
21
  var e;
22
- if ((e = n.valueOptions) != null && e[t] && n.valueOptions[t].length > 0)
23
- return n.valueOptions[t];
24
- if (n.entity === "restaurant") {
22
+ if ((e = s.valueOptions) != null && e[t] && s.valueOptions[t].length > 0)
23
+ return s.valueOptions[t];
24
+ if (s.entity === "restaurant") {
25
25
  const a = f.restaurants.value.map((i) => {
26
26
  var o;
27
27
  return (o = i.customAttributes) == null ? void 0 : o[t];
28
- }).filter((i) => typeof i == "string" && !!i), s = [...new Set(a)];
29
- return s.length > 0 ? s : void 0;
28
+ }).filter((i) => typeof i == "string" && !!i), n = [...new Set(a)];
29
+ return n.length > 0 ? n : void 0;
30
30
  }
31
31
  }
32
- const b = y(() => {
32
+ const y = b(() => {
33
33
  var t, e;
34
34
  return ((e = (t = f.currentBusiness.value) == null ? void 0 : t.attributeSettings) == null ? void 0 : e.filter(
35
- (a) => a.entity === n.entity
35
+ (a) => a.entity === s.entity
36
36
  )) || [];
37
- }), d = y(() => b.value.map((t) => {
38
- var s;
37
+ }), p = b(() => y.value.map((t) => {
38
+ var n;
39
39
  const e = _(t.key), a = t.type === "boolean" ? !1 : "";
40
40
  return {
41
41
  key: t.key,
42
42
  type: t.type,
43
- value: ((s = n.modelValue) == null ? void 0 : s[t.key]) ?? a,
44
- options: e
43
+ value: ((n = s.modelValue) == null ? void 0 : n[t.key]) ?? a,
44
+ options: e,
45
+ readonly: t.readonly === !0
45
46
  };
46
47
  }) || []), A = [
47
48
  {
@@ -56,7 +57,7 @@ const U = { key: 0 }, z = {
56
57
  cell: (t) => {
57
58
  var i;
58
59
  const e = t.row.original, a = (o) => {
59
- const l = O(n.modelValue), r = l[e.key] = typeof o == "string" ? o.trim() : o;
60
+ const l = O(s.modelValue), r = l[e.key] = typeof o == "string" ? o.trim() : o;
60
61
  if (e.type === "number")
61
62
  if (r === "" || r === null || r === void 0)
62
63
  l[e.key] = "";
@@ -83,24 +84,28 @@ const U = { key: 0 }, z = {
83
84
  Object.keys(l).forEach((m) => {
84
85
  (l[m] === "" || l[m] === null || l[m] === void 0) && delete l[m];
85
86
  }), V("update:modelValue", l);
86
- }, s = ((i = b.value.find((o) => o.key === e.key)) == null ? void 0 : i.options) || [];
87
- return s != null && s.length ? c(p.FmSelect, {
87
+ }, n = ((i = y.value.find((o) => o.key === e.key)) == null ? void 0 : i.options) || [];
88
+ return n != null && n.length ? d(c.FmSelect, {
88
89
  modelValue: e.value,
89
90
  placeholder: u("portalshell.customAttributes.form.valuePlaceholder"),
90
- items: s.map((o) => ({ label: o, value: o })),
91
+ items: n.map((o) => ({ label: o, value: o })),
92
+ disabled: e.readonly,
91
93
  "onUpdate:modelValue": a
92
- }) : e.type === "boolean" ? c(p.FmCheckbox, {
94
+ }) : e.type === "boolean" ? d(c.FmCheckbox, {
93
95
  modelValue: e.value,
94
96
  value: !0,
97
+ disabled: e.readonly,
95
98
  "onUpdate:modelValue": a
96
- }) : e.type === "date" ? c(p.FmDatePicker, {
99
+ }) : e.type === "date" ? d(c.FmDatePicker, {
97
100
  modelValue: e.value,
98
101
  placeholder: u("portalshell.customAttributes.form.valuePlaceholder"),
102
+ disabled: e.readonly,
99
103
  "onUpdate:modelValue": a
100
- }) : c(p.FmTextField, {
104
+ }) : d(c.FmTextField, {
101
105
  modelValue: e.value,
102
106
  placeholder: u("portalshell.customAttributes.form.valuePlaceholder"),
103
107
  datalist: e.options,
108
+ disabled: e.readonly,
104
109
  rules: [
105
110
  (o) => e.type === "number" && isNaN(Number(o)) ? u("portalshell.customAttributes.form.attributeValueMustBeNumber") : !0
106
111
  ],
@@ -111,12 +116,12 @@ const U = { key: 0 }, z = {
111
116
  ];
112
117
  return (t, e) => {
113
118
  const a = N("FmTable");
114
- return d.value.length > 0 ? (h(), v("div", U, [
119
+ return p.value.length > 0 ? (h(), v("div", U, [
115
120
  S(a, {
116
121
  "column-defs": A,
117
- "row-data": d.value,
122
+ "row-data": p.value,
118
123
  "shrink-at": !1,
119
- "page-size": d.value.length,
124
+ "page-size": p.value.length,
120
125
  "hide-footer": ""
121
126
  }, null, 8, ["row-data", "page-size"])
122
127
  ])) : (h(), v("p", z, F(w(u)("portalshell.customAttributes.form.noCustomAttributes")), 1));
@@ -1,5 +1,5 @@
1
1
  import { ref as pr, computed as Ut, defineComponent as dd, onMounted as cd, watch as ks, resolveComponent as ii, openBlock as jt, createElementBlock as an, createElementVNode as At, toDisplayString as js, unref as Tt, createVNode as Kt, isRef as fd, createCommentVNode as Lr, Fragment as so, renderList as lo, createBlock as ui, withCtx as co, normalizeClass as Go, Transition as Ms } from "vue";
2
- import { c as gr, l as U, d as Me, e as Qe, f as $d, u as Ho, g as hd, a as pd, O as Ss, t as gd, b as bd } from "./app-7e617adf.js";
2
+ import { c as gr, l as U, d as Me, e as Qe, f as $d, u as Ho, g as hd, a as pd, O as Ss, t as gd, b as bd } from "./app-d5677e21.js";
3
3
  import { FmButtonVariant as Vr } from "@feedmepos/ui-library";
4
4
  import { defineStore as md } from "pinia";
5
5
  import { c as Hr } from "./object-27ce045b.js";
@@ -1,5 +1,5 @@
1
1
  import { ref as S, computed as o, defineComponent as ae, mergeModels as ne, useModel as ue, watch as j, resolveComponent as k, openBlock as i, createElementBlock as b, createElementVNode as C, createVNode as y, withCtx as L, normalizeClass as re, toDisplayString as oe, createCommentVNode as N, createBlock as O, withModifiers as K, unref as g, isRef as se, Fragment as Q, renderList as T, renderSlot as ie, nextTick as ce } from "vue";
2
- import { t as ve, u as de, a as fe, O as E, b as me } from "./app-7e617adf.js";
2
+ import { t as ve, u as de, a as fe, O as E, b as me } from "./app-d5677e21.js";
3
3
  import "@feedmepos/ui-library";
4
4
  import "pinia";
5
5
  import "vue-router";