@feedmepos/mf-order-setting 0.0.16-alpha.1 → 0.0.17
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/KioskDevicesView-DkDKK-o-.js +4 -0
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-uz5kCfDz.js +206 -0
- package/dist/KioskSettingView-6Q0qwSTl.js +345 -0
- package/dist/KioskView-dXsAOdRK.js +289 -0
- package/dist/OrderSettingsView-mw8PFd0W.js +70943 -0
- package/dist/app-BsFGRC2y.js +620 -0
- package/dist/app.js +1 -1
- package/dist/dayjs.min-vPr9KJUN.js +123632 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/index-B9mJLWE5.js +70 -0
- package/dist/index-CpFXjGaf.js +86 -0
- package/package.json +1 -1
- package/src/router/routes.ts +4 -8
- package/dist/KioskSettingView-CAHOimYR.js +0 -4
- package/dist/app-Bk_7VAuN.js +0 -196112
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ref as c } from "vue";
|
|
2
|
+
import { useSnackbar as u } from "@feedmepos/ui-library";
|
|
3
|
+
function l() {
|
|
4
|
+
const o = u();
|
|
5
|
+
function r(t) {
|
|
6
|
+
o.open({
|
|
7
|
+
type: "success",
|
|
8
|
+
message: t,
|
|
9
|
+
position: "bottom"
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function s(t) {
|
|
13
|
+
o.open({
|
|
14
|
+
type: "error",
|
|
15
|
+
message: t,
|
|
16
|
+
position: "bottom"
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
let n = null;
|
|
20
|
+
function a(t) {
|
|
21
|
+
return n = o.open({
|
|
22
|
+
type: "neutral",
|
|
23
|
+
spinner: !0,
|
|
24
|
+
message: t,
|
|
25
|
+
position: "bottom",
|
|
26
|
+
persistent: !0
|
|
27
|
+
// Ensure the snackbar stays visible until manually closed
|
|
28
|
+
}), n;
|
|
29
|
+
}
|
|
30
|
+
function e() {
|
|
31
|
+
n && (o.close(n), n = null);
|
|
32
|
+
}
|
|
33
|
+
return { showSuccess: r, showError: s, showLoading: a, closeLoadingSnackbar: e };
|
|
34
|
+
}
|
|
35
|
+
const y = () => {
|
|
36
|
+
const { showError: o } = l(), r = c(!1);
|
|
37
|
+
function s() {
|
|
38
|
+
r.value = !0;
|
|
39
|
+
}
|
|
40
|
+
function n() {
|
|
41
|
+
r.value = !1;
|
|
42
|
+
}
|
|
43
|
+
async function a(t) {
|
|
44
|
+
try {
|
|
45
|
+
return s(), await t();
|
|
46
|
+
} finally {
|
|
47
|
+
n();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async function e(t) {
|
|
51
|
+
try {
|
|
52
|
+
return s(), await t();
|
|
53
|
+
} catch (i) {
|
|
54
|
+
throw o(`${i}`), i;
|
|
55
|
+
} finally {
|
|
56
|
+
n();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
isLoading: r,
|
|
61
|
+
startLoading: s,
|
|
62
|
+
stopLoading: n,
|
|
63
|
+
startAsyncCall: a,
|
|
64
|
+
startAsyncCallWithErr: e
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
l as a,
|
|
69
|
+
y as u
|
|
70
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { g as i, s as _, S as C, r as g } from "./dayjs.min-vPr9KJUN.js";
|
|
2
|
+
async function R() {
|
|
3
|
+
const r = await g().get("/order-settings");
|
|
4
|
+
return i(r);
|
|
5
|
+
}
|
|
6
|
+
async function S(r) {
|
|
7
|
+
const e = await g().put("/order-settings", r);
|
|
8
|
+
return i(e);
|
|
9
|
+
}
|
|
10
|
+
const U = {
|
|
11
|
+
getOrderSetting: R,
|
|
12
|
+
updateOrderSetting: S
|
|
13
|
+
};
|
|
14
|
+
async function p() {
|
|
15
|
+
return i(await _().get(`balance/${C.getBusinessId()}`));
|
|
16
|
+
}
|
|
17
|
+
const y = {
|
|
18
|
+
read: p
|
|
19
|
+
}, A = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), w = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), m = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), I = /[^\p{L}\d]+/giu, f = "$1\0$2", d = "";
|
|
20
|
+
function o(r) {
|
|
21
|
+
let e = r.trim();
|
|
22
|
+
e = e.replace(A, f).replace(w, f), e = e.replace(I, "\0");
|
|
23
|
+
let t = 0, c = e.length;
|
|
24
|
+
for (; e.charAt(t) === "\0"; )
|
|
25
|
+
t++;
|
|
26
|
+
if (t === c)
|
|
27
|
+
return [];
|
|
28
|
+
for (; e.charAt(c - 1) === "\0"; )
|
|
29
|
+
c--;
|
|
30
|
+
return e.slice(t, c).split(/\0/g);
|
|
31
|
+
}
|
|
32
|
+
function T(r) {
|
|
33
|
+
const e = o(r);
|
|
34
|
+
for (let t = 0; t < e.length; t++) {
|
|
35
|
+
const c = e[t], s = m.exec(c);
|
|
36
|
+
if (s) {
|
|
37
|
+
const a = s.index + (s[1] ?? s[2]).length;
|
|
38
|
+
e.splice(t, 1, c.slice(0, a), c.slice(a));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return e;
|
|
42
|
+
}
|
|
43
|
+
function b(r, e) {
|
|
44
|
+
const [t, c, s] = x(r, e), a = h(e == null ? void 0 : e.locale), n = L(e == null ? void 0 : e.locale);
|
|
45
|
+
return t + c.map(E(a, n)).join(" ") + s;
|
|
46
|
+
}
|
|
47
|
+
function O(r, e) {
|
|
48
|
+
const [t, c, s] = x(r, e), a = h(e == null ? void 0 : e.locale), n = L(e == null ? void 0 : e.locale), l = E(a, n);
|
|
49
|
+
return t + c.map((u, P) => P === 0 ? l(u) : a(u)).join(" ") + s;
|
|
50
|
+
}
|
|
51
|
+
function h(r) {
|
|
52
|
+
return (e) => e.toLocaleLowerCase(r);
|
|
53
|
+
}
|
|
54
|
+
function L(r) {
|
|
55
|
+
return (e) => e.toLocaleUpperCase(r);
|
|
56
|
+
}
|
|
57
|
+
function E(r, e) {
|
|
58
|
+
return (t) => `${e(t[0])}${r(t.slice(1))}`;
|
|
59
|
+
}
|
|
60
|
+
function x(r, e = {}) {
|
|
61
|
+
const t = e.split ?? (e.separateNumbers ? T : o), c = e.prefixCharacters ?? d, s = e.suffixCharacters ?? d;
|
|
62
|
+
let a = 0, n = r.length;
|
|
63
|
+
for (; a < r.length; ) {
|
|
64
|
+
const l = r.charAt(a);
|
|
65
|
+
if (!c.includes(l))
|
|
66
|
+
break;
|
|
67
|
+
a++;
|
|
68
|
+
}
|
|
69
|
+
for (; n > a; ) {
|
|
70
|
+
const l = n - 1, u = r.charAt(l);
|
|
71
|
+
if (!s.includes(u))
|
|
72
|
+
break;
|
|
73
|
+
n = l;
|
|
74
|
+
}
|
|
75
|
+
return [
|
|
76
|
+
r.slice(0, a),
|
|
77
|
+
t(r.slice(a, n)),
|
|
78
|
+
r.slice(n)
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
U as O,
|
|
83
|
+
y as a,
|
|
84
|
+
b as c,
|
|
85
|
+
O as s
|
|
86
|
+
};
|
package/package.json
CHANGED
package/src/router/routes.ts
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
import { type RouteRecordRaw } from 'vue-router'
|
|
2
|
-
import KioskDevicesView from '@/views/kiosk/devices/KioskDevicesView.vue';
|
|
3
|
-
import KioskSettingView from '@/views/kiosk/settings/KioskSettingView.vue';
|
|
4
2
|
import { PortalRoute } from '@/utils/constants/route';
|
|
5
|
-
import KioskView from '@/views/kiosk/KioskView.vue';
|
|
6
|
-
import OrderSettingsView from '@/views/order-settings/OrderSettingsView.vue';
|
|
7
3
|
|
|
8
4
|
const routes: RouteRecordRaw[] = [
|
|
9
5
|
{
|
|
10
6
|
path: PortalRoute.KioskRoute,
|
|
11
7
|
name: 'Kiosk',
|
|
12
|
-
component: KioskView
|
|
8
|
+
component: () => import('@/views/kiosk/KioskView.vue')
|
|
13
9
|
},
|
|
14
10
|
{
|
|
15
11
|
path: PortalRoute.KioskDeviceRoute,
|
|
16
12
|
name: 'Kiosk Device',
|
|
17
|
-
component: KioskDevicesView
|
|
13
|
+
component: () => import('@/views/kiosk/devices/KioskDevicesView.vue')
|
|
18
14
|
},
|
|
19
15
|
{
|
|
20
16
|
path: PortalRoute.KioskOrderSettingRoute,
|
|
21
17
|
name: 'Kiosk Order Setting',
|
|
22
|
-
component: KioskSettingView
|
|
18
|
+
component: () => import('@/views/kiosk/settings/KioskSettingView.vue')
|
|
23
19
|
},
|
|
24
20
|
{
|
|
25
21
|
path: PortalRoute.OrderSettingView,
|
|
26
22
|
name: 'Order Setting View',
|
|
27
|
-
component: OrderSettingsView
|
|
23
|
+
component: () => import('@/views/order-settings/OrderSettingsView.vue')
|
|
28
24
|
},
|
|
29
25
|
];
|
|
30
26
|
|