@feedmepos/mf-common 1.27.5 → 1.27.7
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-a4f037ad.js → CustomAttributesForm-9af4a917.js} +1 -1
- package/dist/ItemSelector-7f86b7a1.js +49597 -0
- package/dist/RestaurantSelector-1d17c411.js +244 -0
- package/dist/{app-42fbc6b2.js → app-d45aa4b4.js} +188 -42
- package/dist/app.js +26 -25
- package/dist/components/RestaurantSelector.vue.d.ts.map +1 -1
- package/dist/permission/permission.d.ts +7 -1
- package/dist/permission/permission.d.ts.map +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.d.ts.map +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/ItemSelector-b751ecbd.js +0 -25170
- package/dist/RestaurantSelector-7fa74f07.js +0 -242
|
@@ -0,0 +1,244 @@
|
|
|
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-d45aa4b4.js";
|
|
3
|
+
import "@feedmepos/ui-library";
|
|
4
|
+
import "pinia";
|
|
5
|
+
import "vue-router";
|
|
6
|
+
function pe(f, t, c = f) {
|
|
7
|
+
const a = S(!0), v = o(() => {
|
|
8
|
+
if (!a.value && !t.value)
|
|
9
|
+
return !0;
|
|
10
|
+
if (t.value && t.value.length > 0) {
|
|
11
|
+
const u = new Set(c.value.map((n) => n.value));
|
|
12
|
+
return t.value.length === c.value.length && t.value.every((n) => u.has(n));
|
|
13
|
+
}
|
|
14
|
+
return !1;
|
|
15
|
+
}), x = o(() => {
|
|
16
|
+
var u, n, h, m;
|
|
17
|
+
return !!((u = t.value) != null && u.length && ((n = t.value) == null ? void 0 : n.length) > 0 && ((h = t.value) == null ? void 0 : h.length) < ((m = f.value) == null ? void 0 : m.length));
|
|
18
|
+
});
|
|
19
|
+
return { allCleared: a, allSelected: v, indeterminate: x, toggleAll: () => {
|
|
20
|
+
if (v.value) {
|
|
21
|
+
t.value = void 0, a.value = !0;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const u = c.value.map((n) => n.value);
|
|
25
|
+
u.length === f.value.length ? (t.value = void 0, a.value = !1) : (t.value = u, a.value = !1);
|
|
26
|
+
}, toggleOption: (u) => {
|
|
27
|
+
var h, m, w;
|
|
28
|
+
let n;
|
|
29
|
+
t.value === void 0 && a.value ? n = [u] : t.value === void 0 && !a.value ? n = (h = f.value.map((p) => p.value)) == null ? void 0 : h.filter((p) => p !== u) : (m = t.value) != null && m.includes(u) ? n = (w = t.value) == null ? void 0 : w.filter((p) => p !== u) : n = [...t.value || [], u], n.length === 0 ? (t.value = void 0, a.value = !0) : n.length === f.value.length ? (t.value = void 0, a.value = !1) : t.value = n;
|
|
30
|
+
} };
|
|
31
|
+
}
|
|
32
|
+
const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-center gap-8" }, be = { class: "inline-flex items-center" }, ye = { class: "flex flex-col w-[360px] min-h-0 gap-8" }, _e = { class: "flex gap-4 px-[6px]" }, ke = { class: "flex-1" }, Ce = { class: "flex-1 overflow-y-auto min-h-0" }, Se = { key: 0 }, Me = /* @__PURE__ */ ae({
|
|
33
|
+
__name: "RestaurantSelector",
|
|
34
|
+
props: /* @__PURE__ */ ne({
|
|
35
|
+
multiple: { type: Boolean, default: !1 },
|
|
36
|
+
excludeRestaurants: {},
|
|
37
|
+
managableOnly: { type: Boolean, default: !0 },
|
|
38
|
+
disabled: { type: Boolean, default: !1 },
|
|
39
|
+
variant: { default: "default" },
|
|
40
|
+
autoSelectFirst: { type: Boolean, default: !1 }
|
|
41
|
+
}, {
|
|
42
|
+
modelValue: {},
|
|
43
|
+
modelModifiers: {}
|
|
44
|
+
}),
|
|
45
|
+
emits: ["update:modelValue"],
|
|
46
|
+
setup(f) {
|
|
47
|
+
const t = f, { t: c } = ve(), a = ue(f, "modelValue"), { restaurants: v, restaurantAttributeSettings: x } = de(), R = o(() => v.value.length === 0);
|
|
48
|
+
function P(e) {
|
|
49
|
+
const l = v.value.map((_) => {
|
|
50
|
+
var A;
|
|
51
|
+
return (A = _.customAttributes) == null ? void 0 : A[e];
|
|
52
|
+
}).filter((_) => typeof _ == "string" && !!_);
|
|
53
|
+
return [...new Set(l)];
|
|
54
|
+
}
|
|
55
|
+
const u = o(() => x.value.map((e) => {
|
|
56
|
+
const l = P(e.key);
|
|
57
|
+
return {
|
|
58
|
+
...e,
|
|
59
|
+
values: l
|
|
60
|
+
};
|
|
61
|
+
})), { searchKey: n, filter: h } = fe(), m = S(null);
|
|
62
|
+
function w(e) {
|
|
63
|
+
var l;
|
|
64
|
+
if (t.multiple)
|
|
65
|
+
throw new Error("Single selection is not supported for multiple selection");
|
|
66
|
+
a.value = e, (l = m.value) == null || l.toggleMenu(!1);
|
|
67
|
+
}
|
|
68
|
+
const p = (e) => {
|
|
69
|
+
const { name: l, code: r } = e.profile;
|
|
70
|
+
return {
|
|
71
|
+
label: `${l} (${r ?? "--"})`,
|
|
72
|
+
value: e._id
|
|
73
|
+
};
|
|
74
|
+
}, M = o(() => v.value.map(p)), F = o(
|
|
75
|
+
() => v.value.filter((e) => t.managableOnly ? e.managable : !0).filter((e) => t.multiple ? !0 : E(e.customAttributes || {}, d.value)).map(p).filter(({ label: e }) => h([e])).filter((e) => {
|
|
76
|
+
var l;
|
|
77
|
+
return !((l = t.excludeRestaurants) != null && l.includes(e.value));
|
|
78
|
+
})
|
|
79
|
+
), W = o(() => {
|
|
80
|
+
var e;
|
|
81
|
+
return a.value ? a.value.length === 1 ? (e = M.value.find((l) => {
|
|
82
|
+
var r;
|
|
83
|
+
return l.value === ((r = a.value) == null ? void 0 : r[0]);
|
|
84
|
+
})) == null ? void 0 : e.label : c("portalshell.components.restaurantSelector.restaurantCount", {
|
|
85
|
+
count: a.value.length
|
|
86
|
+
}) : c("portalshell.components.restaurantSelector.allRestaurants");
|
|
87
|
+
}), q = o(() => {
|
|
88
|
+
var e;
|
|
89
|
+
return a.value ? ((e = M.value.find((l) => l.value === a.value)) == null ? void 0 : e.label) || c("portalshell.components.restaurantSelector.unknownRestaurant") : c("portalshell.components.restaurantSelector.selectRestaurant");
|
|
90
|
+
}), D = o(() => t.multiple ? W.value : q.value), B = o(() => t.disabled ? "neutral-gray-200" : t.variant === "dark" ? "neutral-black" : "neutral-gray-400"), G = o(() => t.disabled ? "text-fm-color-neutral-gray-200" : t.variant === "dark" ? "text-fm-color-neutral-black" : "text-fm-color-neutral-gray-400"), { allSelected: U, toggleAll: H, toggleOption: J, indeterminate: X } = pe(
|
|
91
|
+
M,
|
|
92
|
+
a,
|
|
93
|
+
F
|
|
94
|
+
), V = S(!1), Y = o(() => x.value.length > 0), z = S(null);
|
|
95
|
+
async function Z() {
|
|
96
|
+
t.disabled || (V.value ? V.value = !1 : (V.value = !0, await ce(), z.value && z.value.toggleProperty(!0)));
|
|
97
|
+
}
|
|
98
|
+
const d = S((() => ({
|
|
99
|
+
logic: "AND",
|
|
100
|
+
rules: []
|
|
101
|
+
}))()), ee = o(() => {
|
|
102
|
+
var e, l;
|
|
103
|
+
return ((l = (e = d.value) == null ? void 0 : e.rules) == null ? void 0 : l.length) || 0;
|
|
104
|
+
});
|
|
105
|
+
return j(
|
|
106
|
+
d,
|
|
107
|
+
() => {
|
|
108
|
+
var e;
|
|
109
|
+
if (t.multiple) {
|
|
110
|
+
if (!d.value || d.value.rules.length === 0) {
|
|
111
|
+
a.value = null;
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const l = v.value.filter((r) => E(r.customAttributes || {}, d.value));
|
|
115
|
+
a.value = l.map((r) => r._id);
|
|
116
|
+
} else {
|
|
117
|
+
const l = v.value.filter((r) => E(r.customAttributes || {}, d.value));
|
|
118
|
+
l.length === 0 ? a.value = null : a.value = (e = l[0]) == null ? void 0 : e._id;
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
deep: !0
|
|
123
|
+
}
|
|
124
|
+
), j(
|
|
125
|
+
[() => t.autoSelectFirst, F],
|
|
126
|
+
([e, l]) => {
|
|
127
|
+
e && l.length > 0 && !a.value && (a.value = l[0].value);
|
|
128
|
+
},
|
|
129
|
+
{ immediate: !0 }
|
|
130
|
+
), (e, l) => {
|
|
131
|
+
const r = k("FmIcon"), _ = k("FmCircularProgress"), A = k("FmChip"), le = k("FmSearch"), $ = k("FmMenuItem"), te = k("FmMenu");
|
|
132
|
+
return i(), b("div", ge, [
|
|
133
|
+
C("div", he, [
|
|
134
|
+
y(te, {
|
|
135
|
+
"close-on-click": !1,
|
|
136
|
+
disabled: e.disabled || R.value,
|
|
137
|
+
ref_key: "menuRef",
|
|
138
|
+
ref: m,
|
|
139
|
+
"z-index": 50,
|
|
140
|
+
"selector-for-dismiss-away-event-exclusion": ".fm-dialog, .fm-select__menu__wrapper"
|
|
141
|
+
}, {
|
|
142
|
+
"menu-button": L(() => [
|
|
143
|
+
C("div", be, [
|
|
144
|
+
y(A, { disabled: e.disabled }, {
|
|
145
|
+
default: L(() => [
|
|
146
|
+
y(r, {
|
|
147
|
+
color: B.value,
|
|
148
|
+
name: "storefront",
|
|
149
|
+
outline: "",
|
|
150
|
+
size: "sm"
|
|
151
|
+
}, null, 8, ["color"]),
|
|
152
|
+
D.value ? (i(), b("div", {
|
|
153
|
+
key: 0,
|
|
154
|
+
class: re([
|
|
155
|
+
"fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
|
|
156
|
+
G.value
|
|
157
|
+
])
|
|
158
|
+
}, oe(D.value), 3)) : N("", !0),
|
|
159
|
+
R.value ? (i(), O(_, {
|
|
160
|
+
key: 1,
|
|
161
|
+
size: "md"
|
|
162
|
+
})) : (i(), O(r, {
|
|
163
|
+
key: 2,
|
|
164
|
+
color: B.value,
|
|
165
|
+
name: "keyboard_arrow_down",
|
|
166
|
+
size: "sm"
|
|
167
|
+
}, null, 8, ["color"])),
|
|
168
|
+
Y.value ? (i(), b("div", {
|
|
169
|
+
key: 3,
|
|
170
|
+
class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
|
|
171
|
+
onClick: K(Z, ["stop"])
|
|
172
|
+
}, [
|
|
173
|
+
y(r, {
|
|
174
|
+
name: "filter_alt",
|
|
175
|
+
size: "sm",
|
|
176
|
+
outline: ee.value === 0,
|
|
177
|
+
color: B.value,
|
|
178
|
+
onClick: l[0] || (l[0] = K(() => {
|
|
179
|
+
}, ["prevent"]))
|
|
180
|
+
}, null, 8, ["outline", "color"])
|
|
181
|
+
])) : N("", !0)
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
}, 8, ["disabled"])
|
|
185
|
+
])
|
|
186
|
+
]),
|
|
187
|
+
default: L(() => [
|
|
188
|
+
C("div", ye, [
|
|
189
|
+
C("div", _e, [
|
|
190
|
+
C("div", ke, [
|
|
191
|
+
y(le, {
|
|
192
|
+
modelValue: g(n),
|
|
193
|
+
"onUpdate:modelValue": l[1] || (l[1] = (s) => se(n) ? n.value = s : null),
|
|
194
|
+
placeholder: g(c)("common.search")
|
|
195
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
196
|
+
])
|
|
197
|
+
]),
|
|
198
|
+
C("div", Ce, [
|
|
199
|
+
e.multiple ? (i(), b(Q, { key: 0 }, [
|
|
200
|
+
y($, {
|
|
201
|
+
label: "All",
|
|
202
|
+
"has-checkbox": "",
|
|
203
|
+
"model-value": g(U),
|
|
204
|
+
indeterminate: g(X),
|
|
205
|
+
onClick: g(H)
|
|
206
|
+
}, null, 8, ["model-value", "indeterminate", "onClick"]),
|
|
207
|
+
(i(!0), b(Q, null, T(F.value, (s) => {
|
|
208
|
+
var I;
|
|
209
|
+
return i(), O($, {
|
|
210
|
+
key: s.value,
|
|
211
|
+
label: s.label,
|
|
212
|
+
"has-checkbox": "",
|
|
213
|
+
"model-value": g(U) || ((I = a.value) == null ? void 0 : I.includes(s.value)),
|
|
214
|
+
onClick: (we) => g(J)(s.value)
|
|
215
|
+
}, null, 8, ["label", "model-value", "onClick"]);
|
|
216
|
+
}), 128))
|
|
217
|
+
], 64)) : (i(!0), b(Q, { key: 1 }, T(F.value, (s) => (i(), O($, {
|
|
218
|
+
key: s.value,
|
|
219
|
+
label: s.label,
|
|
220
|
+
onClick: (I) => w(s.value)
|
|
221
|
+
}, null, 8, ["label", "onClick"]))), 128))
|
|
222
|
+
])
|
|
223
|
+
])
|
|
224
|
+
]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 8, ["disabled"]),
|
|
227
|
+
ie(e.$slots, "append-right")
|
|
228
|
+
]),
|
|
229
|
+
V.value ? (i(), b("div", Se, [
|
|
230
|
+
y(g(me), {
|
|
231
|
+
ref_key: "filterRef",
|
|
232
|
+
ref: z,
|
|
233
|
+
attributes: u.value,
|
|
234
|
+
modelValue: d.value,
|
|
235
|
+
"onUpdate:modelValue": l[2] || (l[2] = (s) => d.value = s)
|
|
236
|
+
}, null, 8, ["attributes", "modelValue"])
|
|
237
|
+
])) : N("", !0)
|
|
238
|
+
]);
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
export {
|
|
243
|
+
Me as default
|
|
244
|
+
};
|
|
@@ -47006,12 +47006,158 @@ var yu;
|
|
|
47006
47006
|
})(o.Feedme || (o.Feedme = {})), ((i) => {
|
|
47007
47007
|
i.quota = "quota", i.owner = "owner";
|
|
47008
47008
|
})(o.FeedmeBusinessField || (o.FeedmeBusinessField = {})), ((i) => {
|
|
47009
|
-
i.profile = "business::profile", i.restaurant = "business::restaurant", i.menu = "business::menu", i.promotion = "business::promotion", i.voucher = "business::voucher", i.membership = "business::membership", i.stock = "business::stock", i.permission = "business::permission", i.role = "business::role", i.wastageTemplate = "business::wastageTemplate", i.closingTemplate = "business::closingTemplate", i.orderTemplate = "business::orderTemplate", i.ingredient = "business::ingredient";
|
|
47009
|
+
i.profile = "business::profile", i.restaurant = "business::restaurant", i.menu = "business::menu", i.promotion = "business::promotion", i.voucher = "business::voucher", i.membership = "business::membership", i.stock = "business::stock", i.permission = "business::permission", i.role = "business::role", i.wastageTemplate = "business::wastageTemplate", i.closingTemplate = "business::closingTemplate", i.orderTemplate = "business::orderTemplate", i.ingredient = "business::ingredient", i.recipe = "business::recipe", i.unit = "business::unit", i.supplier = "business::supplier", i.warehouse = "business::warehouse", i.publish = "business::publish", i.integration = "business::integration";
|
|
47010
47010
|
})(o.Business || (o.Business = {})), ((i) => {
|
|
47011
47011
|
i.restaurant = "restaurant";
|
|
47012
47012
|
})(o.Restaurant || (o.Restaurant = {}));
|
|
47013
47013
|
})(l.Subject || (l.Subject = {}));
|
|
47014
47014
|
})(yu || (yu = {}));
|
|
47015
|
+
const fx = {
|
|
47016
|
+
menu: {
|
|
47017
|
+
label: "Menu Management",
|
|
47018
|
+
subject: "business::menu",
|
|
47019
|
+
actions: [
|
|
47020
|
+
"manage"
|
|
47021
|
+
/* manage */
|
|
47022
|
+
]
|
|
47023
|
+
},
|
|
47024
|
+
stock: {
|
|
47025
|
+
label: "Stock Management",
|
|
47026
|
+
subject: "business::stock",
|
|
47027
|
+
actions: [
|
|
47028
|
+
"manage"
|
|
47029
|
+
/* manage */
|
|
47030
|
+
]
|
|
47031
|
+
},
|
|
47032
|
+
promotion: {
|
|
47033
|
+
label: "Promotion Management",
|
|
47034
|
+
subject: "business::promotion",
|
|
47035
|
+
actions: [
|
|
47036
|
+
"manage"
|
|
47037
|
+
/* manage */
|
|
47038
|
+
]
|
|
47039
|
+
},
|
|
47040
|
+
voucher: {
|
|
47041
|
+
label: "Voucher Management",
|
|
47042
|
+
subject: "business::voucher",
|
|
47043
|
+
actions: [
|
|
47044
|
+
"manage"
|
|
47045
|
+
/* manage */
|
|
47046
|
+
]
|
|
47047
|
+
},
|
|
47048
|
+
membership: {
|
|
47049
|
+
label: "Membership Management",
|
|
47050
|
+
subject: "business::membership",
|
|
47051
|
+
actions: [
|
|
47052
|
+
"manage"
|
|
47053
|
+
/* manage */
|
|
47054
|
+
]
|
|
47055
|
+
},
|
|
47056
|
+
permission: {
|
|
47057
|
+
label: "Team Management",
|
|
47058
|
+
subject: "business::permission",
|
|
47059
|
+
actions: [
|
|
47060
|
+
"manage"
|
|
47061
|
+
/* manage */
|
|
47062
|
+
]
|
|
47063
|
+
},
|
|
47064
|
+
restaurant: {
|
|
47065
|
+
label: "Restaurant Owner",
|
|
47066
|
+
subject: "business::restaurant",
|
|
47067
|
+
actions: [
|
|
47068
|
+
"manage"
|
|
47069
|
+
/* manage */
|
|
47070
|
+
]
|
|
47071
|
+
},
|
|
47072
|
+
role: {
|
|
47073
|
+
label: "Role Management",
|
|
47074
|
+
subject: "business::role",
|
|
47075
|
+
actions: [
|
|
47076
|
+
"manage"
|
|
47077
|
+
/* manage */
|
|
47078
|
+
]
|
|
47079
|
+
},
|
|
47080
|
+
wastageTemplate: {
|
|
47081
|
+
label: "Wastage Template Management",
|
|
47082
|
+
subject: "business::wastageTemplate",
|
|
47083
|
+
actions: [
|
|
47084
|
+
"manage"
|
|
47085
|
+
/* manage */
|
|
47086
|
+
]
|
|
47087
|
+
},
|
|
47088
|
+
closingTemplate: {
|
|
47089
|
+
label: "Closing Template Management",
|
|
47090
|
+
subject: "business::closingTemplate",
|
|
47091
|
+
actions: [
|
|
47092
|
+
"manage"
|
|
47093
|
+
/* manage */
|
|
47094
|
+
]
|
|
47095
|
+
},
|
|
47096
|
+
orderTemplate: {
|
|
47097
|
+
label: "Order Template Management",
|
|
47098
|
+
subject: "business::orderTemplate",
|
|
47099
|
+
actions: [
|
|
47100
|
+
"manage"
|
|
47101
|
+
/* manage */
|
|
47102
|
+
]
|
|
47103
|
+
},
|
|
47104
|
+
ingredient: {
|
|
47105
|
+
label: "Ingredient Management",
|
|
47106
|
+
subject: "business::ingredient",
|
|
47107
|
+
actions: [
|
|
47108
|
+
"manage"
|
|
47109
|
+
/* manage */
|
|
47110
|
+
]
|
|
47111
|
+
},
|
|
47112
|
+
recipe: {
|
|
47113
|
+
label: "Recipe Management",
|
|
47114
|
+
subject: "business::recipe",
|
|
47115
|
+
actions: [
|
|
47116
|
+
"manage"
|
|
47117
|
+
/* manage */
|
|
47118
|
+
]
|
|
47119
|
+
},
|
|
47120
|
+
unit: {
|
|
47121
|
+
label: "Unit Management",
|
|
47122
|
+
subject: "business::unit",
|
|
47123
|
+
actions: [
|
|
47124
|
+
"manage"
|
|
47125
|
+
/* manage */
|
|
47126
|
+
]
|
|
47127
|
+
},
|
|
47128
|
+
supplier: {
|
|
47129
|
+
label: "Supplier Management",
|
|
47130
|
+
subject: "business::supplier",
|
|
47131
|
+
actions: [
|
|
47132
|
+
"manage"
|
|
47133
|
+
/* manage */
|
|
47134
|
+
]
|
|
47135
|
+
},
|
|
47136
|
+
warehouse: {
|
|
47137
|
+
label: "Warehouse Management",
|
|
47138
|
+
subject: "business::warehouse",
|
|
47139
|
+
actions: [
|
|
47140
|
+
"manage"
|
|
47141
|
+
/* manage */
|
|
47142
|
+
]
|
|
47143
|
+
},
|
|
47144
|
+
publish: {
|
|
47145
|
+
label: "Publish Management",
|
|
47146
|
+
subject: "business::publish",
|
|
47147
|
+
actions: [
|
|
47148
|
+
"manage"
|
|
47149
|
+
/* manage */
|
|
47150
|
+
]
|
|
47151
|
+
},
|
|
47152
|
+
integration: {
|
|
47153
|
+
label: "Integration Management",
|
|
47154
|
+
subject: "business::integration",
|
|
47155
|
+
actions: [
|
|
47156
|
+
"manage"
|
|
47157
|
+
/* manage */
|
|
47158
|
+
]
|
|
47159
|
+
}
|
|
47160
|
+
};
|
|
47015
47161
|
async function $B(l) {
|
|
47016
47162
|
const { sessionUser: o, validationManifest: i } = l, { requiredRoles: u, requiredCaslPermissions: R, customValidationFunction: m } = i;
|
|
47017
47163
|
if (!o)
|
|
@@ -47057,9 +47203,9 @@ async function _B(l) {
|
|
|
47057
47203
|
canAccess: !0
|
|
47058
47204
|
};
|
|
47059
47205
|
}
|
|
47060
|
-
function fx(l) {
|
|
47061
|
-
}
|
|
47062
47206
|
function yx(l) {
|
|
47207
|
+
}
|
|
47208
|
+
function zx(l) {
|
|
47063
47209
|
return {
|
|
47064
47210
|
render: () => du(KB, {}, { default: () => du(l) })
|
|
47065
47211
|
};
|
|
@@ -49418,7 +49564,7 @@ const kO = /* @__PURE__ */ Ad(SO, [["__scopeId", "data-v-318fbbc5"]]), fO = { cl
|
|
|
49418
49564
|
])
|
|
49419
49565
|
], 64));
|
|
49420
49566
|
}
|
|
49421
|
-
}),
|
|
49567
|
+
}), Qx = /* @__PURE__ */ Pt({
|
|
49422
49568
|
__name: "App",
|
|
49423
49569
|
props: {
|
|
49424
49570
|
hideAppDrawer: { type: Boolean }
|
|
@@ -49484,11 +49630,11 @@ const kO = /* @__PURE__ */ Ad(SO, [["__scopeId", "data-v-318fbbc5"]]), fO = { cl
|
|
|
49484
49630
|
_: 3
|
|
49485
49631
|
}, 8, ["dropdown-opened", "apps", "businesses", "countries", "current-app", "current-business", "current-country", "user", "embedded", "hide-app-drawer"]));
|
|
49486
49632
|
}
|
|
49487
|
-
}),
|
|
49488
|
-
() => import("./CustomAttributesForm-
|
|
49489
|
-
),
|
|
49490
|
-
() => import("./RestaurantSelector-
|
|
49491
|
-
),
|
|
49633
|
+
}), gx = JN(
|
|
49634
|
+
() => import("./CustomAttributesForm-9af4a917.js")
|
|
49635
|
+
), vx = JN(
|
|
49636
|
+
() => import("./RestaurantSelector-1d17c411.js")
|
|
49637
|
+
), Yx = JN(() => import("./ItemSelector-7f86b7a1.js")), zO = {
|
|
49492
49638
|
yes: "Yes",
|
|
49493
49639
|
no: "No",
|
|
49494
49640
|
ok: "OK",
|
|
@@ -50354,7 +50500,7 @@ const kO = /* @__PURE__ */ Ad(SO, [["__scopeId", "data-v-318fbbc5"]]), fO = { cl
|
|
|
50354
50500
|
"th-TH": { ...XO, ...vO },
|
|
50355
50501
|
"zh-Hant": { ...PO, ...jO }
|
|
50356
50502
|
};
|
|
50357
|
-
function
|
|
50503
|
+
function Jx(l) {
|
|
50358
50504
|
if (l.messages)
|
|
50359
50505
|
for (const o of KO) {
|
|
50360
50506
|
const i = l.messages[o] || {};
|
|
@@ -50365,7 +50511,7 @@ function Yx(l) {
|
|
|
50365
50511
|
}
|
|
50366
50512
|
return _g(l);
|
|
50367
50513
|
}
|
|
50368
|
-
function
|
|
50514
|
+
function Gx(l, o, i) {
|
|
50369
50515
|
l && o && i && /^GTM-[0-9A-Z]+$/.test(i.id) ? l.use(
|
|
50370
50516
|
sv({
|
|
50371
50517
|
id: i.id,
|
|
@@ -50378,7 +50524,7 @@ function Jx(l, o, i) {
|
|
|
50378
50524
|
})
|
|
50379
50525
|
) : console.log("skipped init vue client monitoring");
|
|
50380
50526
|
}
|
|
50381
|
-
function
|
|
50527
|
+
function jx(l) {
|
|
50382
50528
|
l.beforeEach((o, i) => {
|
|
50383
50529
|
const u = i.query.country || o.query.country || ua.getCountry(), R = i.query.businessId || o.query.businessId || ua.getBusinessId(), m = i.query.restaurantId || o.query.restaurantId || ua.getRestaurantId();
|
|
50384
50530
|
if (R || u) {
|
|
@@ -50399,7 +50545,7 @@ function Gx(l) {
|
|
|
50399
50545
|
});
|
|
50400
50546
|
}
|
|
50401
50547
|
const QT = "fm-post-message-request", zN = "fm-post-message-response";
|
|
50402
|
-
function
|
|
50548
|
+
function Bx({
|
|
50403
50549
|
targetWindow: l,
|
|
50404
50550
|
methodName: o,
|
|
50405
50551
|
params: i = [],
|
|
@@ -50452,59 +50598,59 @@ async function vT(l) {
|
|
|
50452
50598
|
});
|
|
50453
50599
|
}
|
|
50454
50600
|
}
|
|
50455
|
-
function
|
|
50601
|
+
function Dx(l, o) {
|
|
50456
50602
|
gT[l] = o;
|
|
50457
50603
|
}
|
|
50458
50604
|
let QN = !1;
|
|
50459
|
-
function
|
|
50605
|
+
function wx() {
|
|
50460
50606
|
QN || (window.addEventListener("message", vT), QN = !0);
|
|
50461
50607
|
}
|
|
50462
|
-
function
|
|
50608
|
+
function Ox() {
|
|
50463
50609
|
window.removeEventListener("message", vT), QN = !1;
|
|
50464
50610
|
}
|
|
50465
50611
|
export {
|
|
50466
50612
|
$O as A,
|
|
50467
|
-
|
|
50468
|
-
|
|
50613
|
+
Jx as B,
|
|
50614
|
+
gx as C,
|
|
50469
50615
|
eD as D,
|
|
50470
50616
|
WB as E,
|
|
50471
50617
|
Tn as F,
|
|
50472
50618
|
IV as G,
|
|
50473
50619
|
QT as H,
|
|
50474
|
-
|
|
50620
|
+
Yx as I,
|
|
50475
50621
|
zN as J,
|
|
50476
|
-
|
|
50477
|
-
|
|
50478
|
-
|
|
50479
|
-
|
|
50622
|
+
Bx as K,
|
|
50623
|
+
Dx as L,
|
|
50624
|
+
wx as M,
|
|
50625
|
+
Ox as N,
|
|
50480
50626
|
bx as O,
|
|
50481
50627
|
yu as P,
|
|
50482
|
-
|
|
50628
|
+
vx as R,
|
|
50483
50629
|
KB as _,
|
|
50484
50630
|
B9 as a,
|
|
50485
50631
|
Ex as b,
|
|
50486
50632
|
a0 as c,
|
|
50487
|
-
|
|
50488
|
-
|
|
50489
|
-
|
|
50490
|
-
|
|
50491
|
-
|
|
50492
|
-
|
|
50493
|
-
|
|
50494
|
-
|
|
50633
|
+
_e as d,
|
|
50634
|
+
Qt as e,
|
|
50635
|
+
_n as f,
|
|
50636
|
+
hr as g,
|
|
50637
|
+
VG as h,
|
|
50638
|
+
Tx as i,
|
|
50639
|
+
sT as j,
|
|
50640
|
+
Gx as k,
|
|
50495
50641
|
pe as l,
|
|
50496
|
-
|
|
50497
|
-
|
|
50642
|
+
UG as m,
|
|
50643
|
+
jx as n,
|
|
50498
50644
|
Wx as o,
|
|
50499
|
-
|
|
50500
|
-
|
|
50501
|
-
|
|
50502
|
-
|
|
50645
|
+
Q0 as p,
|
|
50646
|
+
Mx as q,
|
|
50647
|
+
WT as r,
|
|
50648
|
+
Sx as s,
|
|
50503
50649
|
gn as t,
|
|
50504
50650
|
Sn as u,
|
|
50505
|
-
|
|
50506
|
-
|
|
50651
|
+
kx as v,
|
|
50652
|
+
yx as w,
|
|
50507
50653
|
fx as x,
|
|
50508
|
-
|
|
50509
|
-
|
|
50654
|
+
zx as y,
|
|
50655
|
+
Qx as z
|
|
50510
50656
|
};
|
package/dist/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as u, E as
|
|
1
|
+
import { p as s } from "./app-d45aa4b4.js";
|
|
2
|
+
import { C as u, E as m, r as M, H as E, J as P, F as S, z as p, h as c, I as d, P as g, _ as C, R as _, g as h, K as F, B as R, m as A, x as y, A as O, k as I, i as L, n as T, M as b, w as G, s as N, v as Q, o as U, L as f, D as w, N as x, u as B, j as D, q as Y, t as v, G as z, y as V } from "./app-d45aa4b4.js";
|
|
3
3
|
import "pinia";
|
|
4
4
|
import "vue";
|
|
5
5
|
import "vue-router";
|
|
@@ -8,37 +8,38 @@ const r = s.Dinero;
|
|
|
8
8
|
export {
|
|
9
9
|
u as CustomAttributesForm,
|
|
10
10
|
r as Dinero,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
m as EMPTY_MONGO_QUERY,
|
|
12
|
+
M as EMPTY_RULE,
|
|
13
13
|
E as FM_POST_MESSAGE_REQUEST,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
P as FM_POST_MESSAGE_RESPONSE,
|
|
15
|
+
S as FeedMeAuth,
|
|
16
|
+
p as FmNavBar,
|
|
17
|
+
c as FmpUser,
|
|
18
|
+
d as ItemSelector,
|
|
19
|
+
g as Permission,
|
|
20
|
+
C as PermissionWrapper,
|
|
21
|
+
_ as RestaurantSelector,
|
|
22
22
|
h as baseClientInstance,
|
|
23
23
|
F as callMethodOnWindow,
|
|
24
24
|
R as createFeedMeI18n,
|
|
25
25
|
A as detectLocale,
|
|
26
|
-
y as
|
|
27
|
-
O as
|
|
28
|
-
I as
|
|
29
|
-
L as
|
|
30
|
-
T as
|
|
31
|
-
b as
|
|
32
|
-
G as
|
|
33
|
-
N as
|
|
34
|
-
Q as
|
|
35
|
-
U as
|
|
26
|
+
y as fullPermission,
|
|
27
|
+
O as i18nMessages,
|
|
28
|
+
I as initVueClientMonitoring,
|
|
29
|
+
L as initialize,
|
|
30
|
+
T as installBusinessQueryStatePlugin,
|
|
31
|
+
b as installPostMessageMethodCall,
|
|
32
|
+
G as installRouteValidation,
|
|
33
|
+
N as isEmptyMongoQuery,
|
|
34
|
+
Q as isEmptyRule,
|
|
35
|
+
U as onAuthStateChanged,
|
|
36
|
+
f as registerPostMessageMethod,
|
|
36
37
|
w as setEnabledLocales,
|
|
37
38
|
x as uninstallPostMessageMethodCall,
|
|
38
39
|
B as useCoreStore,
|
|
39
40
|
D as useCountry,
|
|
40
41
|
Y as useCustomAttributes,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
v as useI18n,
|
|
43
|
+
z as useLocale,
|
|
44
|
+
V as withPermission
|
|
44
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestaurantSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RestaurantSelector.vue.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"RestaurantSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RestaurantSelector.vue.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmlBD,wBAAwG;AAUxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -41,7 +41,13 @@ export declare namespace Permission.Subject {
|
|
|
41
41
|
wastageTemplate = "business::wastageTemplate",
|
|
42
42
|
closingTemplate = "business::closingTemplate",
|
|
43
43
|
orderTemplate = "business::orderTemplate",
|
|
44
|
-
ingredient = "business::ingredient"
|
|
44
|
+
ingredient = "business::ingredient",
|
|
45
|
+
recipe = "business::recipe",
|
|
46
|
+
unit = "business::unit",
|
|
47
|
+
supplier = "business::supplier",
|
|
48
|
+
warehouse = "business::warehouse",
|
|
49
|
+
publish = "business::publish",
|
|
50
|
+
integration = "business::integration"
|
|
45
51
|
}
|
|
46
52
|
enum Restaurant {
|
|
47
53
|
restaurant = "restaurant"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../../src/permission/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGtC,yBAAiB,UAAU,CAAC;IAC1B,KAAY,KAAK;QACf,MAAM,IAAI;QACV,QAAQ,IAAI;QACZ,UAAU,IAAI;KACf;IAED,KAAY,MAAM;QAChB,MAAM,WAAW;QACjB,MAAM,WAAW;QACjB,IAAI,SAAS;QACb,MAAM,WAAW;QACjB,MAAM,WAAW;KAClB;CACF;AAED,yBAAiB,UAAU,CAAC,OAAO,CAAC;IAClC,KAAY,MAAM;QAChB,GAAG,QAAQ;QACX,UAAU,eAAe;QACzB,QAAQ,aAAa;QACrB,QAAQ,aAAa;QACrB,KAAK,UAAU;KAChB;IAED,KAAY,mBAAmB;QAC7B,KAAK,UAAU;QACf,KAAK,UAAU;KAChB;IAED,KAAY,QAAQ;QAClB,OAAO,sBAAsB;QAC7B,UAAU,yBAAyB;QACnC,IAAI,mBAAmB;QACvB,SAAS,wBAAwB;QACjC,OAAO,sBAAsB;QAC7B,UAAU,yBAAyB;QACnC,KAAK,oBAAoB;QACzB,UAAU,yBAAyB;QACnC,IAAI,mBAAmB;QACvB,eAAe,8BAA8B;QAC7C,eAAe,8BAA8B;QAC7C,aAAa,4BAA4B;QACzC,UAAU,yBAAyB;
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../../src/permission/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,MA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CAAA;CACvC;AAED,wBAAsB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAwClF;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,OAAO,QAAQ,YAAY,CAAC;IAC1B,UAAU,SAAS;QACjB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;KACxC;CACF;AAID,wBAAsB,aAAa,CACjC,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAmBhC;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,QAEpD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS;;;;EAI7C"}
|
package/dist/permissions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { installRouteValidation, Permission, type ValidationManifest, type RouteValidationResult
|
|
1
|
+
export { installRouteValidation, Permission, fullPermission, withPermission, type IFdtoPortalPermission, type IPermissionUser, type PermissionLevelDetail, type AbilityConstructOption, type ValidationManifest, type RouteValidationResult } from "./permission/permission";
|
|
2
2
|
export { default as PermissionWrapper } from "./components/PermissionWrapper.vue";
|
|
3
3
|
//# sourceMappingURL=permissions.d.ts.map
|