@feedmepos/mf-settings 0.0.47-beta.4 → 0.0.48-beta.0

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,395 +0,0 @@
1
- import { c as it, g as ot } from "./app-2e7e8646.js";
2
- import { defineComponent as K, mergeModels as ut, useModel as ct, computed as N, watchEffect as lt, resolveComponent as z, openBlock as j, createBlock as P, withCtx as G, createVNode as X, createElementBlock as tt, Fragment as ft, renderList as dt, normalizeProps as ht, mergeProps as Q } from "vue";
3
- import { useCoreStore as mt } from "@feedmepos/mf-common";
4
- import { useSnackbar as $t, useBreakpoints as pt } from "@feedmepos/ui-library";
5
- var et = { exports: {} };
6
- (function(S, M) {
7
- (function(v, y) {
8
- S.exports = y();
9
- })(it, function() {
10
- var v = 1e3, y = 6e4, D = 36e5, g = "millisecond", l = "second", m = "minute", w = "hour", _ = "day", T = "week", $ = "month", E = "quarter", k = "year", B = "date", R = "Invalid Date", nt = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, rt = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, at = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
11
- var n = ["th", "st", "nd", "rd"], t = a % 100;
12
- return "[" + a + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
13
- } }, U = function(a, n, t) {
14
- var r = String(a);
15
- return !r || r.length >= n ? a : "" + Array(n + 1 - r.length).join(t) + a;
16
- }, st = { s: U, z: function(a) {
17
- var n = -a.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
18
- return (n <= 0 ? "+" : "-") + U(r, 2, "0") + ":" + U(e, 2, "0");
19
- }, m: function a(n, t) {
20
- if (n.date() < t.date())
21
- return -a(t, n);
22
- var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, $), s = t - e < 0, i = n.clone().add(r + (s ? -1 : 1), $);
23
- return +(-(r + (t - e) / (s ? e - i : i - e)) || 0);
24
- }, a: function(a) {
25
- return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
26
- }, p: function(a) {
27
- return { M: $, y: k, w: T, d: _, D: B, h: w, m, s: l, ms: g, Q: E }[a] || String(a || "").toLowerCase().replace(/s$/, "");
28
- }, u: function(a) {
29
- return a === void 0;
30
- } }, Y = "en", C = {};
31
- C[Y] = at;
32
- var Z = "$isDayjsObject", J = function(a) {
33
- return a instanceof A || !(!a || !a[Z]);
34
- }, W = function a(n, t, r) {
35
- var e;
36
- if (!n)
37
- return Y;
38
- if (typeof n == "string") {
39
- var s = n.toLowerCase();
40
- C[s] && (e = s), t && (C[s] = t, e = s);
41
- var i = n.split("-");
42
- if (!e && i.length > 1)
43
- return a(i[0]);
44
- } else {
45
- var u = n.name;
46
- C[u] = n, e = u;
47
- }
48
- return !r && e && (Y = e), e || !r && Y;
49
- }, f = function(a, n) {
50
- if (J(a))
51
- return a.clone();
52
- var t = typeof n == "object" ? n : {};
53
- return t.date = a, t.args = arguments, new A(t);
54
- }, o = st;
55
- o.l = W, o.i = J, o.w = function(a, n) {
56
- return f(a, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
57
- };
58
- var A = function() {
59
- function a(t) {
60
- this.$L = W(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
61
- }
62
- var n = a.prototype;
63
- return n.parse = function(t) {
64
- this.$d = function(r) {
65
- var e = r.date, s = r.utc;
66
- if (e === null)
67
- return /* @__PURE__ */ new Date(NaN);
68
- if (o.u(e))
69
- return /* @__PURE__ */ new Date();
70
- if (e instanceof Date)
71
- return new Date(e);
72
- if (typeof e == "string" && !/Z$/i.test(e)) {
73
- var i = e.match(nt);
74
- if (i) {
75
- var u = i[2] - 1 || 0, c = (i[7] || "0").substring(0, 3);
76
- return s ? new Date(Date.UTC(i[1], u, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, c)) : new Date(i[1], u, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, c);
77
- }
78
- }
79
- return new Date(e);
80
- }(t), this.init();
81
- }, n.init = function() {
82
- var t = this.$d;
83
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
84
- }, n.$utils = function() {
85
- return o;
86
- }, n.isValid = function() {
87
- return this.$d.toString() !== R;
88
- }, n.isSame = function(t, r) {
89
- var e = f(t);
90
- return this.startOf(r) <= e && e <= this.endOf(r);
91
- }, n.isAfter = function(t, r) {
92
- return f(t) < this.startOf(r);
93
- }, n.isBefore = function(t, r) {
94
- return this.endOf(r) < f(t);
95
- }, n.$g = function(t, r, e) {
96
- return o.u(t) ? this[r] : this.set(e, t);
97
- }, n.unix = function() {
98
- return Math.floor(this.valueOf() / 1e3);
99
- }, n.valueOf = function() {
100
- return this.$d.getTime();
101
- }, n.startOf = function(t, r) {
102
- var e = this, s = !!o.u(r) || r, i = o.p(t), u = function(F, p) {
103
- var O = o.w(e.$u ? Date.UTC(e.$y, p, F) : new Date(e.$y, p, F), e);
104
- return s ? O : O.endOf(_);
105
- }, c = function(F, p) {
106
- return o.w(e.toDate()[F].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(p)), e);
107
- }, d = this.$W, h = this.$M, b = this.$D, I = "set" + (this.$u ? "UTC" : "");
108
- switch (i) {
109
- case k:
110
- return s ? u(1, 0) : u(31, 11);
111
- case $:
112
- return s ? u(1, h) : u(0, h + 1);
113
- case T:
114
- var x = this.$locale().weekStart || 0, H = (d < x ? d + 7 : d) - x;
115
- return u(s ? b - H : b + (6 - H), h);
116
- case _:
117
- case B:
118
- return c(I + "Hours", 0);
119
- case w:
120
- return c(I + "Minutes", 1);
121
- case m:
122
- return c(I + "Seconds", 2);
123
- case l:
124
- return c(I + "Milliseconds", 3);
125
- default:
126
- return this.clone();
127
- }
128
- }, n.endOf = function(t) {
129
- return this.startOf(t, !1);
130
- }, n.$set = function(t, r) {
131
- var e, s = o.p(t), i = "set" + (this.$u ? "UTC" : ""), u = (e = {}, e[_] = i + "Date", e[B] = i + "Date", e[$] = i + "Month", e[k] = i + "FullYear", e[w] = i + "Hours", e[m] = i + "Minutes", e[l] = i + "Seconds", e[g] = i + "Milliseconds", e)[s], c = s === _ ? this.$D + (r - this.$W) : r;
132
- if (s === $ || s === k) {
133
- var d = this.clone().set(B, 1);
134
- d.$d[u](c), d.init(), this.$d = d.set(B, Math.min(this.$D, d.daysInMonth())).$d;
135
- } else
136
- u && this.$d[u](c);
137
- return this.init(), this;
138
- }, n.set = function(t, r) {
139
- return this.clone().$set(t, r);
140
- }, n.get = function(t) {
141
- return this[o.p(t)]();
142
- }, n.add = function(t, r) {
143
- var e, s = this;
144
- t = Number(t);
145
- var i = o.p(r), u = function(h) {
146
- var b = f(s);
147
- return o.w(b.date(b.date() + Math.round(h * t)), s);
148
- };
149
- if (i === $)
150
- return this.set($, this.$M + t);
151
- if (i === k)
152
- return this.set(k, this.$y + t);
153
- if (i === _)
154
- return u(1);
155
- if (i === T)
156
- return u(7);
157
- var c = (e = {}, e[m] = y, e[w] = D, e[l] = v, e)[i] || 1, d = this.$d.getTime() + t * c;
158
- return o.w(d, this);
159
- }, n.subtract = function(t, r) {
160
- return this.add(-1 * t, r);
161
- }, n.format = function(t) {
162
- var r = this, e = this.$locale();
163
- if (!this.isValid())
164
- return e.invalidDate || R;
165
- var s = t || "YYYY-MM-DDTHH:mm:ssZ", i = o.z(this), u = this.$H, c = this.$m, d = this.$M, h = e.weekdays, b = e.months, I = e.meridiem, x = function(p, O, L, V) {
166
- return p && (p[O] || p(r, s)) || L[O].slice(0, V);
167
- }, H = function(p) {
168
- return o.s(u % 12 || 12, p, "0");
169
- }, F = I || function(p, O, L) {
170
- var V = p < 12 ? "AM" : "PM";
171
- return L ? V.toLowerCase() : V;
172
- };
173
- return s.replace(rt, function(p, O) {
174
- return O || function(L) {
175
- switch (L) {
176
- case "YY":
177
- return String(r.$y).slice(-2);
178
- case "YYYY":
179
- return o.s(r.$y, 4, "0");
180
- case "M":
181
- return d + 1;
182
- case "MM":
183
- return o.s(d + 1, 2, "0");
184
- case "MMM":
185
- return x(e.monthsShort, d, b, 3);
186
- case "MMMM":
187
- return x(b, d);
188
- case "D":
189
- return r.$D;
190
- case "DD":
191
- return o.s(r.$D, 2, "0");
192
- case "d":
193
- return String(r.$W);
194
- case "dd":
195
- return x(e.weekdaysMin, r.$W, h, 2);
196
- case "ddd":
197
- return x(e.weekdaysShort, r.$W, h, 3);
198
- case "dddd":
199
- return h[r.$W];
200
- case "H":
201
- return String(u);
202
- case "HH":
203
- return o.s(u, 2, "0");
204
- case "h":
205
- return H(1);
206
- case "hh":
207
- return H(2);
208
- case "a":
209
- return F(u, c, !0);
210
- case "A":
211
- return F(u, c, !1);
212
- case "m":
213
- return String(c);
214
- case "mm":
215
- return o.s(c, 2, "0");
216
- case "s":
217
- return String(r.$s);
218
- case "ss":
219
- return o.s(r.$s, 2, "0");
220
- case "SSS":
221
- return o.s(r.$ms, 3, "0");
222
- case "Z":
223
- return i;
224
- }
225
- return null;
226
- }(p) || i.replace(":", "");
227
- });
228
- }, n.utcOffset = function() {
229
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
230
- }, n.diff = function(t, r, e) {
231
- var s, i = this, u = o.p(r), c = f(t), d = (c.utcOffset() - this.utcOffset()) * y, h = this - c, b = function() {
232
- return o.m(i, c);
233
- };
234
- switch (u) {
235
- case k:
236
- s = b() / 12;
237
- break;
238
- case $:
239
- s = b();
240
- break;
241
- case E:
242
- s = b() / 3;
243
- break;
244
- case T:
245
- s = (h - d) / 6048e5;
246
- break;
247
- case _:
248
- s = (h - d) / 864e5;
249
- break;
250
- case w:
251
- s = h / D;
252
- break;
253
- case m:
254
- s = h / y;
255
- break;
256
- case l:
257
- s = h / v;
258
- break;
259
- default:
260
- s = h;
261
- }
262
- return e ? s : o.a(s);
263
- }, n.daysInMonth = function() {
264
- return this.endOf($).$D;
265
- }, n.$locale = function() {
266
- return C[this.$L];
267
- }, n.locale = function(t, r) {
268
- if (!t)
269
- return this.$L;
270
- var e = this.clone(), s = W(t, r, !0);
271
- return s && (e.$L = s), e;
272
- }, n.clone = function() {
273
- return o.w(this.$d, this);
274
- }, n.toDate = function() {
275
- return new Date(this.valueOf());
276
- }, n.toJSON = function() {
277
- return this.isValid() ? this.toISOString() : null;
278
- }, n.toISOString = function() {
279
- return this.$d.toISOString();
280
- }, n.toString = function() {
281
- return this.$d.toUTCString();
282
- }, a;
283
- }(), q = A.prototype;
284
- return f.prototype = q, [["$ms", g], ["$s", l], ["$m", m], ["$H", w], ["$W", _], ["$M", $], ["$y", k], ["$D", B]].forEach(function(a) {
285
- q[a[1]] = function(n) {
286
- return this.$g(n, a[0], a[1]);
287
- };
288
- }), f.extend = function(a, n) {
289
- return a.$i || (a(n, A, f), a.$i = !0), f;
290
- }, f.locale = W, f.isDayjs = J, f.unix = function(a) {
291
- return f(1e3 * a);
292
- }, f.en = C[Y], f.Ls = C, f.p = {}, f;
293
- });
294
- })(et);
295
- var vt = et.exports;
296
- const Dt = /* @__PURE__ */ ot(vt), St = /* @__PURE__ */ K({
297
- __name: "RestaurantSelector",
298
- props: /* @__PURE__ */ ut({
299
- managableOnly: { type: Boolean, default: !1 },
300
- excludeRestaurants: {},
301
- label: {},
302
- autoSelectFirst: { type: Boolean, default: !1 }
303
- }, {
304
- modelValue: {},
305
- modelModifiers: {}
306
- }),
307
- emits: ["update:modelValue"],
308
- setup(S) {
309
- const M = S, v = ct(S, "modelValue"), { restaurants: y } = mt(), D = N(() => {
310
- var l;
311
- return ((l = g.value.find((m) => m.value === v.value)) == null ? void 0 : l.label) || "Select restaurant";
312
- }), g = N(
313
- () => y.value.filter((l) => M.managableOnly ? l.managable : !0).map((l) => ({
314
- label: l.profile.name,
315
- value: l._id
316
- })).filter((l) => {
317
- var m;
318
- return !((m = M.excludeRestaurants) != null && m.includes(l.value));
319
- })
320
- );
321
- return lt(() => {
322
- M.autoSelectFirst && g.value.length > 0 && (v.value = g.value[0].value);
323
- }), (l, m) => {
324
- const w = z("FmChip"), _ = z("FmMenuItem"), T = z("FmMenu");
325
- return j(), P(T, null, {
326
- "menu-button": G(() => [
327
- X(w, {
328
- icon: "storefront",
329
- label: D.value,
330
- "right-icon": "keyboard_arrow_down"
331
- }, null, 8, ["label"])
332
- ]),
333
- default: G(() => [
334
- (j(!0), tt(ft, null, dt(g.value, ($) => (j(), P(_, {
335
- key: $.value,
336
- label: $.label,
337
- onClick: (E) => v.value = $.value
338
- }, null, 8, ["label", "onClick"]))), 128))
339
- ]),
340
- _: 1
341
- });
342
- };
343
- }
344
- });
345
- function wt() {
346
- const S = $t();
347
- return { copyTextToClipboard: async (v, y = "Copied") => {
348
- const D = "text/plain", g = new Blob([v], { type: D }), l = [new ClipboardItem({ [D]: g })];
349
- await navigator.clipboard.write(l), y && S.open({
350
- title: y,
351
- message: v,
352
- type: "success"
353
- });
354
- } };
355
- }
356
- const yt = {
357
- key: 1,
358
- class: "z-10 fixed bottom-72 right-16"
359
- }, kt = /* @__PURE__ */ K({
360
- __name: "ResponsiveFabButton",
361
- props: {
362
- variant: {},
363
- label: {},
364
- icon: {},
365
- size: {},
366
- disabled: { type: Boolean },
367
- iconColor: {},
368
- borderColor: {},
369
- textColor: {},
370
- bgColor: {},
371
- type: {},
372
- iconPosition: {},
373
- prependIcon: {},
374
- appendIcon: {},
375
- loading: { type: Boolean },
376
- disableIconStatus: { type: Boolean },
377
- overwriteIconOutline: {}
378
- },
379
- setup(S) {
380
- const M = S, v = N(() => M.variant === "primary" || !M.variant ? "fab" : M.variant), y = pt(), D = N(() => y.breakpoints.value.xs);
381
- return (g, l) => {
382
- const m = z("FmButton");
383
- return D.value ? (j(), tt("div", yt, [
384
- X(m, Q(M, { variant: v.value }), null, 16, ["variant"])
385
- ])) : (j(), P(m, ht(Q({ key: 0 }, M)), null, 16));
386
- };
387
- }
388
- });
389
- export {
390
- Dt as D,
391
- St as _,
392
- kt as a,
393
- vt as d,
394
- wt as u
395
- };