@feedmepos/mf-payment 1.10.7 → 1.10.8-dev
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/{Actions.vue_vue_type_script_setup_true_lang-Cb4w7Its.js → Actions.vue_vue_type_script_setup_true_lang-DRF8W4tg.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-B_-olj-A.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-4ApEVDHf.js} +3 -3
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-C4xRm0d0.js +135 -0
- package/dist/{Chargeback-B5MXERko.js → Chargeback-pnoHxJba.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DNrsl1TX.js → DocumentViewer.vue_vue_type_script_setup_true_lang-B4nIdf5-.js} +1 -1
- package/dist/{ExternalTerminal-bjMJ7qr-.js → ExternalTerminal-CqrRcbsp.js} +6 -6
- package/dist/{OnboardForm-BwFlXqV5.js → OnboardForm-BDv2pxL9.js} +6 -6
- package/dist/{OnboardForm-CE0weADC.js → OnboardForm-CYO3vK_8.js} +6 -6
- package/dist/{OnboardSubmission-C60-dPdV.js → OnboardSubmission-BUJZydpX.js} +6 -6
- package/dist/{OnboardSubmission-2s5PtLcm.js → OnboardSubmission-Cx_sPOVH.js} +3 -3
- package/dist/PaymentCheckout-DQM_kppH.js +1939 -0
- package/dist/{PayoutAccount-PGN4vUiE.js → PayoutAccount-DKWtIoTX.js} +7 -7
- package/dist/{PayoutAccount-DnE00Tpx.js → PayoutAccount-dwMtm1PL.js} +5 -5
- package/dist/{PayoutAccountSetting-UxgmC_It.js → PayoutAccountSetting-CWZD3Kwa.js} +6 -6
- package/dist/{Restaurant-DWs8l6IN.js → Restaurant-CV5n8389.js} +4 -4
- package/dist/{RestaurantSetting-CghN3Qij.js → RestaurantSetting-DsP4kGjM.js} +3 -3
- package/dist/{Settlement-DSAWgf1q.js → Settlement-58-ie3T1.js} +3 -3
- package/dist/{Settlement-BZG0nEhU.js → Settlement-Bt18kRNt.js} +4 -4
- package/dist/{SettlementTransactions-dSH6mKX9.js → SettlementTransactions-C7GhMTLQ.js} +5 -5
- package/dist/{SettlementTransactions-5l9xe_rQ.js → SettlementTransactions-Db1f9lYu.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-CSz0sfMv.js → Status.vue_vue_type_script_setup_true_lang-B9j6CfzS.js} +1 -1
- package/dist/{Terminal-CU70aAqI.js → Terminal-BuMIcbhv.js} +6 -6
- package/dist/TerminalSetting-2kwSwfKt.js +2779 -0
- package/dist/TerminalTemplate-aBZAYAKp.js +322 -0
- package/dist/TerminalTemplateSetting-BZlX7Xll.js +262 -0
- package/dist/{Transaction-9yHZiRAp.js → Transaction-Cy03QV60.js} +10 -10
- package/dist/{Transaction-CHL7HVtl.js → Transaction-lRZITPtN.js} +20 -19
- package/dist/{TransactionOld-Dk_5TVXm.js → TransactionOld-CmLbZyaP.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-D4A7Hfk7.js → TransactionStatus.vue_vue_type_script_setup_true_lang-DSzil-ib.js} +1 -1
- package/dist/api/terminal/index.d.ts +1 -0
- package/dist/api/terminal-template/index.d.ts +15 -0
- package/dist/{app-WOQvK6eu.js → app-DKD_4d44.js} +389 -353
- package/dist/app.js +1 -1
- package/dist/assets-VX0DqpvG.js +96 -0
- package/dist/{grafana-BqnbcwyU.js → grafana-B_uCjmFj.js} +1 -1
- package/dist/{index-BRCt0Wjb.js → index-BpAx8sXI.js} +3073 -3030
- package/dist/{index-DiYIJH8n.js → index-C3AnskZH.js} +2 -2
- package/dist/index-CGmA3Z9Z.js +71 -0
- package/dist/{index-Jo4g2Fvl.js → index-Cf9xnlvp.js} +1 -1
- package/dist/{index-Cwbpxr-3.js → index-CnTRiFh5.js} +1 -1
- package/dist/{index-BSUOKl_R.js → index-DFNUFV3R.js} +1 -1
- package/dist/index-DFZ1vkMO.js +43 -0
- package/dist/{index-XucAJsGV.js → index-DO72hNKP.js} +1 -1
- package/dist/{index-BPTPINow.js → index-DZJaOOKJ.js} +1 -1
- package/dist/{index--Svzj_Uq.js → index-DbJwyim8.js} +1 -1
- package/dist/{index-Cc7BGx40.js → index-FScngz5X.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CQwRJloj.js → index.vue_vue_type_script_setup_true_lang-CH17wzq0.js} +1 -1
- package/dist/{onboard-submission-B7IRbUGm.js → onboard-submission-Cjp6Mugk.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-v0EWhJ79.js → payout-account-CzCmFwEa.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useQuery-Cn_nXHMC.js +375 -0
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -6
- package/dist/views/admin/terminal/TerminalApplyTemplateDialog.vue.d.ts +6 -0
- package/dist/views/admin/terminal/TerminalSaveTemplateDialog.vue.d.ts +2 -0
- package/dist/views/admin/terminal-template/TerminalTemplate.vue.d.ts +2 -0
- package/dist/views/admin/terminal-template/TerminalTemplateSetting.vue.d.ts +12 -0
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +174 -0
- package/dist/views/admin/terminal-template/cell/Actions.vue.d.ts +12 -0
- package/dist/views/admin/terminal-template/cell/Default.vue.d.ts +5 -0
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +104 -0
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +95 -0
- package/package.json +2 -2
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-KddyORH2.js +0 -505
- package/dist/TerminalSetting-Bc6HJqCW.js +0 -4521
- package/dist/assets-B_Ilda1K.js +0 -96
- package/dist/index-BR7n0dkV.js +0 -63
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
var Se = (i) => {
|
|
2
|
-
throw TypeError(i);
|
|
3
|
-
};
|
|
4
|
-
var le = (i, e, t) => e.has(i) || Se("Cannot " + t);
|
|
5
|
-
var s = (i, e, t) => (le(i, e, "read from private field"), t ? t.call(i) : e.get(i)), m = (i, e, t) => e.has(i) ? Se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), d = (i, e, t, n) => (le(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), f = (i, e, t) => (le(i, e, "access private method"), t);
|
|
6
|
-
import { hasInjectionContext as Ve, inject as je, getCurrentScope as ze, computed as _, shallowReactive as Ae, reactive as Be, watch as $, onScopeDispose as Ne, shallowReadonly as We, readonly as Ke, toRefs as $e, defineComponent as Ge, useModel as He, toRef as qe, ref as Fe, resolveComponent as K, openBlock as V, createBlock as Y, withCtx as ue, createVNode as ce, createElementVNode as re, unref as he, createElementBlock as Ie, Fragment as Je, renderList as Xe, toDisplayString as _e, createCommentVNode as Ye, withModifiers as Ze, mergeModels as et } from "vue";
|
|
7
|
-
import { r as de } from "./index-BSUOKl_R.js";
|
|
8
|
-
import { useI18n as tt } from "@feedmepos/mf-common";
|
|
9
|
-
import { S as st, p as ke, r as S, s as pe, a as ee, n as it, e as xe, i as Ee, t as nt, b as oe, f as at, c as rt, d as Qe, g as ot, j as lt, l as ut, u as De, m as Me, k as ct } from "./app-WOQvK6eu.js";
|
|
10
|
-
var R, o, te, y, j, G, Q, P, se, H, q, z, A, T, J, u, Z, me, ve, be, ye, ge, Re, Ce, Ue, Le, ht = (Le = class extends st {
|
|
11
|
-
constructor(e, t) {
|
|
12
|
-
super();
|
|
13
|
-
m(this, u);
|
|
14
|
-
m(this, R);
|
|
15
|
-
m(this, o);
|
|
16
|
-
m(this, te);
|
|
17
|
-
m(this, y);
|
|
18
|
-
m(this, j);
|
|
19
|
-
m(this, G);
|
|
20
|
-
m(this, Q);
|
|
21
|
-
m(this, P);
|
|
22
|
-
m(this, se);
|
|
23
|
-
m(this, H);
|
|
24
|
-
// This property keeps track of the last query with defined data.
|
|
25
|
-
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
26
|
-
m(this, q);
|
|
27
|
-
m(this, z);
|
|
28
|
-
m(this, A);
|
|
29
|
-
m(this, T);
|
|
30
|
-
m(this, J, /* @__PURE__ */ new Set());
|
|
31
|
-
this.options = t, d(this, R, e), d(this, P, null), d(this, Q, ke()), this.bindMethods(), this.setOptions(t);
|
|
32
|
-
}
|
|
33
|
-
bindMethods() {
|
|
34
|
-
this.refetch = this.refetch.bind(this);
|
|
35
|
-
}
|
|
36
|
-
onSubscribe() {
|
|
37
|
-
this.listeners.size === 1 && (s(this, o).addObserver(this), Pe(s(this, o), this.options) ? f(this, u, Z).call(this) : this.updateResult(), f(this, u, ye).call(this));
|
|
38
|
-
}
|
|
39
|
-
onUnsubscribe() {
|
|
40
|
-
this.hasListeners() || this.destroy();
|
|
41
|
-
}
|
|
42
|
-
shouldFetchOnReconnect() {
|
|
43
|
-
return Oe(
|
|
44
|
-
s(this, o),
|
|
45
|
-
this.options,
|
|
46
|
-
this.options.refetchOnReconnect
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
shouldFetchOnWindowFocus() {
|
|
50
|
-
return Oe(
|
|
51
|
-
s(this, o),
|
|
52
|
-
this.options,
|
|
53
|
-
this.options.refetchOnWindowFocus
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
destroy() {
|
|
57
|
-
this.listeners = /* @__PURE__ */ new Set(), f(this, u, ge).call(this), f(this, u, Re).call(this), s(this, o).removeObserver(this);
|
|
58
|
-
}
|
|
59
|
-
setOptions(e) {
|
|
60
|
-
const t = this.options, n = s(this, o);
|
|
61
|
-
if (this.options = s(this, R).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof S(this.options.enabled, s(this, o)) != "boolean")
|
|
62
|
-
throw new Error(
|
|
63
|
-
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
64
|
-
);
|
|
65
|
-
f(this, u, Ce).call(this), s(this, o).setOptions(this.options), t._defaulted && !pe(this.options, t) && s(this, R).getQueryCache().notify({
|
|
66
|
-
type: "observerOptionsUpdated",
|
|
67
|
-
query: s(this, o),
|
|
68
|
-
observer: this
|
|
69
|
-
});
|
|
70
|
-
const l = this.hasListeners();
|
|
71
|
-
l && Te(
|
|
72
|
-
s(this, o),
|
|
73
|
-
n,
|
|
74
|
-
this.options,
|
|
75
|
-
t
|
|
76
|
-
) && f(this, u, Z).call(this), this.updateResult(), l && (s(this, o) !== n || S(this.options.enabled, s(this, o)) !== S(t.enabled, s(this, o)) || ee(this.options.staleTime, s(this, o)) !== ee(t.staleTime, s(this, o))) && f(this, u, me).call(this);
|
|
77
|
-
const a = f(this, u, ve).call(this);
|
|
78
|
-
l && (s(this, o) !== n || S(this.options.enabled, s(this, o)) !== S(t.enabled, s(this, o)) || a !== s(this, T)) && f(this, u, be).call(this, a);
|
|
79
|
-
}
|
|
80
|
-
getOptimisticResult(e) {
|
|
81
|
-
const t = s(this, R).getQueryCache().build(s(this, R), e), n = this.createResult(t, e);
|
|
82
|
-
return ft(this, n) && (d(this, y, n), d(this, G, this.options), d(this, j, s(this, o).state)), n;
|
|
83
|
-
}
|
|
84
|
-
getCurrentResult() {
|
|
85
|
-
return s(this, y);
|
|
86
|
-
}
|
|
87
|
-
trackResult(e, t) {
|
|
88
|
-
return new Proxy(e, {
|
|
89
|
-
get: (n, l) => (this.trackProp(l), t == null || t(l), l === "promise" && (this.trackProp("data"), !this.options.experimental_prefetchInRender && s(this, Q).status === "pending" && s(this, Q).reject(
|
|
90
|
-
new Error(
|
|
91
|
-
"experimental_prefetchInRender feature flag is not enabled"
|
|
92
|
-
)
|
|
93
|
-
)), Reflect.get(n, l))
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
trackProp(e) {
|
|
97
|
-
s(this, J).add(e);
|
|
98
|
-
}
|
|
99
|
-
getCurrentQuery() {
|
|
100
|
-
return s(this, o);
|
|
101
|
-
}
|
|
102
|
-
refetch({ ...e } = {}) {
|
|
103
|
-
return this.fetch({
|
|
104
|
-
...e
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
fetchOptimistic(e) {
|
|
108
|
-
const t = s(this, R).defaultQueryOptions(e), n = s(this, R).getQueryCache().build(s(this, R), t);
|
|
109
|
-
return n.fetch().then(() => this.createResult(n, t));
|
|
110
|
-
}
|
|
111
|
-
fetch(e) {
|
|
112
|
-
return f(this, u, Z).call(this, {
|
|
113
|
-
...e,
|
|
114
|
-
cancelRefetch: e.cancelRefetch ?? !0
|
|
115
|
-
}).then(() => (this.updateResult(), s(this, y)));
|
|
116
|
-
}
|
|
117
|
-
createResult(e, t) {
|
|
118
|
-
var ne;
|
|
119
|
-
const n = s(this, o), l = this.options, a = s(this, y), h = s(this, j), C = s(this, G), D = e !== n ? e.state : s(this, te), { state: L } = e;
|
|
120
|
-
let p = { ...L }, x = !1, r;
|
|
121
|
-
if (t._optimisticResults) {
|
|
122
|
-
const g = this.hasListeners(), U = !g && Pe(e, t), N = g && Te(e, n, t, l);
|
|
123
|
-
(U || N) && (p = {
|
|
124
|
-
...p,
|
|
125
|
-
...rt(L.data, e.options)
|
|
126
|
-
}), t._optimisticResults === "isRestoring" && (p.fetchStatus = "idle");
|
|
127
|
-
}
|
|
128
|
-
let { error: O, errorUpdatedAt: I, status: v } = p;
|
|
129
|
-
r = p.data;
|
|
130
|
-
let M = !1;
|
|
131
|
-
if (t.placeholderData !== void 0 && r === void 0 && v === "pending") {
|
|
132
|
-
let g;
|
|
133
|
-
a != null && a.isPlaceholderData && t.placeholderData === (C == null ? void 0 : C.placeholderData) ? (g = a.data, M = !0) : g = typeof t.placeholderData == "function" ? t.placeholderData(
|
|
134
|
-
(ne = s(this, q)) == null ? void 0 : ne.state.data,
|
|
135
|
-
s(this, q)
|
|
136
|
-
) : t.placeholderData, g !== void 0 && (v = "success", r = Qe(
|
|
137
|
-
a == null ? void 0 : a.data,
|
|
138
|
-
g,
|
|
139
|
-
t
|
|
140
|
-
), x = !0);
|
|
141
|
-
}
|
|
142
|
-
if (t.select && r !== void 0 && !M)
|
|
143
|
-
if (a && r === (h == null ? void 0 : h.data) && t.select === s(this, se))
|
|
144
|
-
r = s(this, H);
|
|
145
|
-
else
|
|
146
|
-
try {
|
|
147
|
-
d(this, se, t.select), r = t.select(r), r = Qe(a == null ? void 0 : a.data, r, t), d(this, H, r), d(this, P, null);
|
|
148
|
-
} catch (g) {
|
|
149
|
-
d(this, P, g);
|
|
150
|
-
}
|
|
151
|
-
s(this, P) && (O = s(this, P), r = s(this, H), I = Date.now(), v = "error");
|
|
152
|
-
const E = p.fetchStatus === "fetching", B = v === "pending", X = v === "error", ie = B && E, c = r !== void 0, w = {
|
|
153
|
-
status: v,
|
|
154
|
-
fetchStatus: p.fetchStatus,
|
|
155
|
-
isPending: B,
|
|
156
|
-
isSuccess: v === "success",
|
|
157
|
-
isError: X,
|
|
158
|
-
isInitialLoading: ie,
|
|
159
|
-
isLoading: ie,
|
|
160
|
-
data: r,
|
|
161
|
-
dataUpdatedAt: p.dataUpdatedAt,
|
|
162
|
-
error: O,
|
|
163
|
-
errorUpdatedAt: I,
|
|
164
|
-
failureCount: p.fetchFailureCount,
|
|
165
|
-
failureReason: p.fetchFailureReason,
|
|
166
|
-
errorUpdateCount: p.errorUpdateCount,
|
|
167
|
-
isFetched: e.isFetched(),
|
|
168
|
-
isFetchedAfterMount: p.dataUpdateCount > D.dataUpdateCount || p.errorUpdateCount > D.errorUpdateCount,
|
|
169
|
-
isFetching: E,
|
|
170
|
-
isRefetching: E && !B,
|
|
171
|
-
isLoadingError: X && !c,
|
|
172
|
-
isPaused: p.fetchStatus === "paused",
|
|
173
|
-
isPlaceholderData: x,
|
|
174
|
-
isRefetchError: X && c,
|
|
175
|
-
isStale: we(e, t),
|
|
176
|
-
refetch: this.refetch,
|
|
177
|
-
promise: s(this, Q),
|
|
178
|
-
isEnabled: S(t.enabled, e) !== !1
|
|
179
|
-
};
|
|
180
|
-
if (this.options.experimental_prefetchInRender) {
|
|
181
|
-
const g = w.data !== void 0, U = w.status === "error" && !g, N = (W) => {
|
|
182
|
-
U ? W.reject(w.error) : g && W.resolve(w.data);
|
|
183
|
-
}, ae = () => {
|
|
184
|
-
const W = d(this, Q, w.promise = ke());
|
|
185
|
-
N(W);
|
|
186
|
-
}, b = s(this, Q);
|
|
187
|
-
switch (b.status) {
|
|
188
|
-
case "pending":
|
|
189
|
-
e.queryHash === n.queryHash && N(b);
|
|
190
|
-
break;
|
|
191
|
-
case "fulfilled":
|
|
192
|
-
(U || w.data !== b.value) && ae();
|
|
193
|
-
break;
|
|
194
|
-
case "rejected":
|
|
195
|
-
(!U || w.error !== b.reason) && ae();
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return w;
|
|
200
|
-
}
|
|
201
|
-
updateResult() {
|
|
202
|
-
const e = s(this, y), t = this.createResult(s(this, o), this.options);
|
|
203
|
-
if (d(this, j, s(this, o).state), d(this, G, this.options), s(this, j).data !== void 0 && d(this, q, s(this, o)), pe(t, e))
|
|
204
|
-
return;
|
|
205
|
-
d(this, y, t);
|
|
206
|
-
const n = () => {
|
|
207
|
-
if (!e)
|
|
208
|
-
return !0;
|
|
209
|
-
const { notifyOnChangeProps: l } = this.options, a = typeof l == "function" ? l() : l;
|
|
210
|
-
if (a === "all" || !a && !s(this, J).size)
|
|
211
|
-
return !0;
|
|
212
|
-
const h = new Set(
|
|
213
|
-
a ?? s(this, J)
|
|
214
|
-
);
|
|
215
|
-
return this.options.throwOnError && h.add("error"), Object.keys(s(this, y)).some((C) => {
|
|
216
|
-
const F = C;
|
|
217
|
-
return s(this, y)[F] !== e[F] && h.has(F);
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
f(this, u, Ue).call(this, { listeners: n() });
|
|
221
|
-
}
|
|
222
|
-
onQueryUpdate() {
|
|
223
|
-
this.updateResult(), this.hasListeners() && f(this, u, ye).call(this);
|
|
224
|
-
}
|
|
225
|
-
}, R = new WeakMap(), o = new WeakMap(), te = new WeakMap(), y = new WeakMap(), j = new WeakMap(), G = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), se = new WeakMap(), H = new WeakMap(), q = new WeakMap(), z = new WeakMap(), A = new WeakMap(), T = new WeakMap(), J = new WeakMap(), u = new WeakSet(), Z = function(e) {
|
|
226
|
-
f(this, u, Ce).call(this);
|
|
227
|
-
let t = s(this, o).fetch(
|
|
228
|
-
this.options,
|
|
229
|
-
e
|
|
230
|
-
);
|
|
231
|
-
return e != null && e.throwOnError || (t = t.catch(it)), t;
|
|
232
|
-
}, me = function() {
|
|
233
|
-
f(this, u, ge).call(this);
|
|
234
|
-
const e = ee(
|
|
235
|
-
this.options.staleTime,
|
|
236
|
-
s(this, o)
|
|
237
|
-
);
|
|
238
|
-
if (xe.isServer() || s(this, y).isStale || !Ee(e))
|
|
239
|
-
return;
|
|
240
|
-
const n = nt(s(this, y).dataUpdatedAt, e) + 1;
|
|
241
|
-
d(this, z, oe.setTimeout(() => {
|
|
242
|
-
s(this, y).isStale || this.updateResult();
|
|
243
|
-
}, n));
|
|
244
|
-
}, ve = function() {
|
|
245
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(s(this, o)) : this.options.refetchInterval) ?? !1;
|
|
246
|
-
}, be = function(e) {
|
|
247
|
-
f(this, u, Re).call(this), d(this, T, e), !(xe.isServer() || S(this.options.enabled, s(this, o)) === !1 || !Ee(s(this, T)) || s(this, T) === 0) && d(this, A, oe.setInterval(() => {
|
|
248
|
-
(this.options.refetchIntervalInBackground || at.isFocused()) && f(this, u, Z).call(this);
|
|
249
|
-
}, s(this, T)));
|
|
250
|
-
}, ye = function() {
|
|
251
|
-
f(this, u, me).call(this), f(this, u, be).call(this, f(this, u, ve).call(this));
|
|
252
|
-
}, ge = function() {
|
|
253
|
-
s(this, z) !== void 0 && (oe.clearTimeout(s(this, z)), d(this, z, void 0));
|
|
254
|
-
}, Re = function() {
|
|
255
|
-
s(this, A) !== void 0 && (oe.clearInterval(s(this, A)), d(this, A, void 0));
|
|
256
|
-
}, Ce = function() {
|
|
257
|
-
const e = s(this, R).getQueryCache().build(s(this, R), this.options);
|
|
258
|
-
if (e === s(this, o))
|
|
259
|
-
return;
|
|
260
|
-
const t = s(this, o);
|
|
261
|
-
d(this, o, e), d(this, te, e.state), this.hasListeners() && (t == null || t.removeObserver(this), e.addObserver(this));
|
|
262
|
-
}, Ue = function(e) {
|
|
263
|
-
ot.batch(() => {
|
|
264
|
-
e.listeners && this.listeners.forEach((t) => {
|
|
265
|
-
t(s(this, y));
|
|
266
|
-
}), s(this, R).getQueryCache().notify({
|
|
267
|
-
query: s(this, o),
|
|
268
|
-
type: "observerResultsUpdated"
|
|
269
|
-
});
|
|
270
|
-
});
|
|
271
|
-
}, Le);
|
|
272
|
-
function dt(i, e) {
|
|
273
|
-
return S(e.enabled, i) !== !1 && i.state.data === void 0 && !(i.state.status === "error" && S(e.retryOnMount, i) === !1);
|
|
274
|
-
}
|
|
275
|
-
function Pe(i, e) {
|
|
276
|
-
return dt(i, e) || i.state.data !== void 0 && Oe(i, e, e.refetchOnMount);
|
|
277
|
-
}
|
|
278
|
-
function Oe(i, e, t) {
|
|
279
|
-
if (S(e.enabled, i) !== !1 && ee(e.staleTime, i) !== "static") {
|
|
280
|
-
const n = typeof t == "function" ? t(i) : t;
|
|
281
|
-
return n === "always" || n !== !1 && we(i, e);
|
|
282
|
-
}
|
|
283
|
-
return !1;
|
|
284
|
-
}
|
|
285
|
-
function Te(i, e, t, n) {
|
|
286
|
-
return (i !== e || S(n.enabled, i) === !1) && (!t.suspense || i.state.status !== "error") && we(i, t);
|
|
287
|
-
}
|
|
288
|
-
function we(i, e) {
|
|
289
|
-
return S(e.enabled, i) !== !1 && i.isStaleByTime(ee(e.staleTime, i));
|
|
290
|
-
}
|
|
291
|
-
function ft(i, e) {
|
|
292
|
-
return !pe(i.getCurrentResult(), e);
|
|
293
|
-
}
|
|
294
|
-
function pt(i = "") {
|
|
295
|
-
if (!Ve())
|
|
296
|
-
throw new Error(
|
|
297
|
-
"vue-query hooks can only be used inside setup() function or functions that support injection context."
|
|
298
|
-
);
|
|
299
|
-
const e = lt(i), t = je(e);
|
|
300
|
-
if (!t)
|
|
301
|
-
throw new Error(
|
|
302
|
-
"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library."
|
|
303
|
-
);
|
|
304
|
-
return t;
|
|
305
|
-
}
|
|
306
|
-
function mt(i, e, t) {
|
|
307
|
-
process.env.NODE_ENV === "development" && (ze() || console.warn(
|
|
308
|
-
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
309
|
-
));
|
|
310
|
-
const n = pt(), l = _(() => {
|
|
311
|
-
var v;
|
|
312
|
-
let r = e;
|
|
313
|
-
typeof r == "function" && (r = r());
|
|
314
|
-
const O = ut(r);
|
|
315
|
-
typeof O.enabled == "function" && (O.enabled = O.enabled());
|
|
316
|
-
const I = n.defaultQueryOptions(O);
|
|
317
|
-
return I._optimisticResults = (v = n.isRestoring) != null && v.value ? "isRestoring" : "optimistic", I;
|
|
318
|
-
}), a = new i(n, l.value), h = l.value.shallow ? Ae(a.getCurrentResult()) : Be(a.getCurrentResult());
|
|
319
|
-
let C = () => {
|
|
320
|
-
};
|
|
321
|
-
n.isRestoring && $(
|
|
322
|
-
n.isRestoring,
|
|
323
|
-
(r) => {
|
|
324
|
-
r || (C(), C = a.subscribe((O) => {
|
|
325
|
-
De(h, O);
|
|
326
|
-
}));
|
|
327
|
-
},
|
|
328
|
-
{ immediate: !0 }
|
|
329
|
-
);
|
|
330
|
-
const F = () => {
|
|
331
|
-
a.setOptions(l.value), De(h, a.getCurrentResult());
|
|
332
|
-
};
|
|
333
|
-
$(l, F), Ne(() => {
|
|
334
|
-
C();
|
|
335
|
-
});
|
|
336
|
-
const D = (...r) => (F(), h.refetch(...r)), L = () => new Promise(
|
|
337
|
-
(r, O) => {
|
|
338
|
-
let I = () => {
|
|
339
|
-
};
|
|
340
|
-
const v = () => {
|
|
341
|
-
if (l.value.enabled !== !1) {
|
|
342
|
-
a.setOptions(l.value);
|
|
343
|
-
const M = a.getOptimisticResult(
|
|
344
|
-
l.value
|
|
345
|
-
);
|
|
346
|
-
M.isStale ? (I(), a.fetchOptimistic(l.value).then(r, (E) => {
|
|
347
|
-
Me(l.value.throwOnError, [
|
|
348
|
-
E,
|
|
349
|
-
a.getCurrentQuery()
|
|
350
|
-
]) ? O(E) : r(a.getCurrentResult());
|
|
351
|
-
})) : (I(), r(M));
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
v(), I = $(l, v);
|
|
355
|
-
}
|
|
356
|
-
);
|
|
357
|
-
$(
|
|
358
|
-
() => h.error,
|
|
359
|
-
(r) => {
|
|
360
|
-
if (h.isError && !h.isFetching && Me(l.value.throwOnError, [
|
|
361
|
-
r,
|
|
362
|
-
a.getCurrentQuery()
|
|
363
|
-
]))
|
|
364
|
-
throw r;
|
|
365
|
-
}
|
|
366
|
-
);
|
|
367
|
-
const p = l.value.shallow ? We(h) : Ke(h), x = $e(p);
|
|
368
|
-
for (const r in h)
|
|
369
|
-
typeof h[r] == "function" && (x[r] = h[r]);
|
|
370
|
-
return x.suspense = L, x.refetch = D, x;
|
|
371
|
-
}
|
|
372
|
-
function fe(i, e) {
|
|
373
|
-
return mt(ht, i);
|
|
374
|
-
}
|
|
375
|
-
const vt = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer" }, bt = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, yt = { class: "relative min-w-[280px]" }, gt = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, Rt = {
|
|
376
|
-
key: 0,
|
|
377
|
-
class: "px-8 py-12 text-center fm-typo-en-body-md-400 text-fm-color-neutral-gray-500"
|
|
378
|
-
}, It = /* @__PURE__ */ Ge({
|
|
379
|
-
__name: "AdminRestaurantSelector",
|
|
380
|
-
props: /* @__PURE__ */ et({
|
|
381
|
-
label: {},
|
|
382
|
-
labelMark: {},
|
|
383
|
-
placeholder: {},
|
|
384
|
-
searchPlaceholder: {},
|
|
385
|
-
rules: {},
|
|
386
|
-
businessId: {}
|
|
387
|
-
}, {
|
|
388
|
-
modelValue: { default: "" },
|
|
389
|
-
modelModifiers: {}
|
|
390
|
-
}),
|
|
391
|
-
emits: ["update:modelValue"],
|
|
392
|
-
setup(i) {
|
|
393
|
-
const e = i, t = He(i, "modelValue"), { t: n } = tt(), l = qe(e, "businessId"), a = Fe(""), h = Fe("");
|
|
394
|
-
let C = null;
|
|
395
|
-
$(a, (c) => {
|
|
396
|
-
C && clearTimeout(C), C = setTimeout(() => h.value = c, 300);
|
|
397
|
-
}), $(l, () => {
|
|
398
|
-
t.value = "";
|
|
399
|
-
});
|
|
400
|
-
const F = (c) => {
|
|
401
|
-
const k = c.profile.code;
|
|
402
|
-
return {
|
|
403
|
-
label: k ? `${c.profile.name} (${k})` : c.profile.name,
|
|
404
|
-
sublabel: "Restaurant",
|
|
405
|
-
value: c._id
|
|
406
|
-
};
|
|
407
|
-
}, D = _(
|
|
408
|
-
() => l.value ? ["admin-restaurants", "business", l.value] : ["admin-restaurants"]
|
|
409
|
-
), { data: L, isLoading: p } = fe({
|
|
410
|
-
queryKey: D,
|
|
411
|
-
queryFn: () => de.readPaymentRestaurantsWithPagination({ limit: 20, businessId: l.value }).then((c) => c.data),
|
|
412
|
-
select: (c) => c.map(F)
|
|
413
|
-
}), { data: x, isLoading: r } = fe({
|
|
414
|
-
queryKey: _(() => [...D.value, "search", h.value]),
|
|
415
|
-
queryFn: () => de.readPaymentRestaurantsWithPagination({
|
|
416
|
-
limit: 20,
|
|
417
|
-
search: h.value,
|
|
418
|
-
businessId: l.value
|
|
419
|
-
}).then((c) => c.data),
|
|
420
|
-
select: (c) => c.map(F),
|
|
421
|
-
enabled: _(() => h.value.length > 0),
|
|
422
|
-
placeholderData: ct
|
|
423
|
-
}), { data: O, isLoading: I } = fe({
|
|
424
|
-
queryKey: _(() => ["admin-restaurants", t.value]),
|
|
425
|
-
queryFn: () => de.readRestaurantById(t.value).then((c) => c ? F(c) : null),
|
|
426
|
-
enabled: _(
|
|
427
|
-
() => !!t.value && !(L.value ?? []).some((c) => c.value === t.value)
|
|
428
|
-
)
|
|
429
|
-
}), v = _(() => L.value ?? []), M = _(
|
|
430
|
-
() => a.value ? x.value ?? [] : v.value
|
|
431
|
-
), E = _(
|
|
432
|
-
() => p.value || r.value || I.value
|
|
433
|
-
), B = _(
|
|
434
|
-
() => v.value.find((c) => c.value === t.value) ?? O.value ?? void 0
|
|
435
|
-
), X = _(
|
|
436
|
-
() => a.value && !E.value && M.value.length === 0
|
|
437
|
-
), ie = (c) => {
|
|
438
|
-
t.value = c, a.value = "";
|
|
439
|
-
};
|
|
440
|
-
return (c, k) => {
|
|
441
|
-
const w = K("FmIcon"), ne = K("FmCircularProgress"), g = K("FmSearch"), U = K("FmMenuItem"), N = K("FmMenu"), ae = K("FmFormGroup");
|
|
442
|
-
return V(), Y(ae, {
|
|
443
|
-
modelValue: t.value,
|
|
444
|
-
"onUpdate:modelValue": k[2] || (k[2] = (b) => t.value = b),
|
|
445
|
-
label: e.label,
|
|
446
|
-
"label-mark": e.labelMark,
|
|
447
|
-
rules: e.rules
|
|
448
|
-
}, {
|
|
449
|
-
default: ue(() => [
|
|
450
|
-
ce(N, { "close-on-click": !0 }, {
|
|
451
|
-
"menu-button": ue(() => {
|
|
452
|
-
var b;
|
|
453
|
-
return [
|
|
454
|
-
re("div", vt, [
|
|
455
|
-
ce(w, {
|
|
456
|
-
name: "store",
|
|
457
|
-
size: "sm"
|
|
458
|
-
}),
|
|
459
|
-
re("div", bt, _e(((b = B.value) == null ? void 0 : b.label) ?? e.placeholder ?? he(n)("payment.components.select")), 1),
|
|
460
|
-
E.value ? (V(), Y(ne, {
|
|
461
|
-
key: 0,
|
|
462
|
-
size: "md"
|
|
463
|
-
})) : B.value ? (V(), Y(w, {
|
|
464
|
-
key: 1,
|
|
465
|
-
name: "close",
|
|
466
|
-
size: "sm",
|
|
467
|
-
onClick: k[0] || (k[0] = Ze((W) => t.value = "", ["stop"]))
|
|
468
|
-
})) : (V(), Y(w, {
|
|
469
|
-
key: 2,
|
|
470
|
-
name: "expand_more",
|
|
471
|
-
size: "sm"
|
|
472
|
-
}))
|
|
473
|
-
])
|
|
474
|
-
];
|
|
475
|
-
}),
|
|
476
|
-
default: ue(() => [
|
|
477
|
-
re("div", yt, [
|
|
478
|
-
re("div", gt, [
|
|
479
|
-
ce(g, {
|
|
480
|
-
"model-value": a.value,
|
|
481
|
-
"onUpdate:modelValue": k[1] || (k[1] = (b) => a.value = b),
|
|
482
|
-
placeholder: e.searchPlaceholder ?? e.placeholder ?? he(n)("payment.components.select")
|
|
483
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
484
|
-
]),
|
|
485
|
-
(V(!0), Ie(Je, null, Xe(M.value, (b) => (V(), Y(U, {
|
|
486
|
-
key: b.value,
|
|
487
|
-
label: b.label,
|
|
488
|
-
sublabel: b.sublabel,
|
|
489
|
-
onClick: (W) => ie(b.value)
|
|
490
|
-
}, null, 8, ["label", "sublabel", "onClick"]))), 128)),
|
|
491
|
-
X.value ? (V(), Ie("div", Rt, _e(he(n)("payment.components.no_results")), 1)) : Ye("", !0)
|
|
492
|
-
])
|
|
493
|
-
]),
|
|
494
|
-
_: 1
|
|
495
|
-
})
|
|
496
|
-
]),
|
|
497
|
-
_: 1
|
|
498
|
-
}, 8, ["modelValue", "label", "label-mark", "rules"]);
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
export {
|
|
503
|
-
It as _,
|
|
504
|
-
fe as u
|
|
505
|
-
};
|