@framework-m/desk 0.17.0 → 0.18.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.
- package/dist/auth.d.ts +20 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/components/layout/Navigation/PrimaryRail.d.ts.map +1 -1
- package/dist/components/list/ListBodyLayout.d.ts.map +1 -1
- package/dist/index.js +1000 -824
- package/dist/index.js.map +1 -1
- package/dist/locales/en/desk.json +2 -0
- package/dist/locales/es/desk.json +2 -0
- package/dist/locales/fr/desk.json +2 -0
- package/dist/locales/hi/desk.json +2 -0
- package/dist/locales/mr/desk.json +2 -0
- package/dist/locales/ta/desk.json +2 -0
- package/dist/locales/ur/desk.json +2 -0
- package/dist/pages/LoginPage.d.ts.map +1 -1
- package/dist/providers/SystemConfigProvider.d.ts +1 -0
- package/dist/providers/SystemConfigProvider.d.ts.map +1 -1
- package/dist/views/TreeView.d.ts.map +1 -1
- package/locales/en/desk.json +2 -0
- package/locales/es/desk.json +2 -0
- package/locales/fr/desk.json +2 -0
- package/locales/hi/desk.json +2 -0
- package/locales/mr/desk.json +2 -0
- package/locales/ta/desk.json +2 -0
- package/locales/ur/desk.json +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,74 +5,74 @@ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
|
5
5
|
import E from "ajv";
|
|
6
6
|
import { JSONSchemaBridge as D } from "uniforms-bridge-json-schema";
|
|
7
7
|
import { BaseForm as O, connectField as k, filterDOMProps as A, useForm as j } from "uniforms";
|
|
8
|
-
import { Avatar as M, Button as N, Card as P, DatePicker as F, Drawer as I, Heading as L, Icon as R, Input as z, LocaleSwitcher as B, MProvider as V, MStack as H, MText as U, Modal as ee, Paragraph as W, Popover as te, Select as ne, Separator as
|
|
9
|
-
import { Authenticated as
|
|
10
|
-
import { Link as
|
|
11
|
-
import { I18nextProvider as
|
|
12
|
-
import { flexRender as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
8
|
+
import { Avatar as M, Button as N, Card as P, DatePicker as F, Drawer as I, Heading as L, Icon as R, Input as z, LocaleSwitcher as B, MProvider as V, MStack as H, MText as U, Modal as ee, Paragraph as W, Popover as te, Select as ne, Separator as re, Skeleton as G, ThemeProvider as ie, XStack as K, YStack as q, useTheme as J } from "@framework-m/ui";
|
|
9
|
+
import { Authenticated as ae, QS_PARSE_DEPTH as oe, Refine as se, ResourceContext as ce, matchResourceFromRoute as le, useBreadcrumb as ue, useCreate as de, useDelete as fe, useDeleteMany as pe, useGetIdentity as me, useGo as he, useInvalidate as ge, useList as _e, useLogin as ve, useLogout as ye, useMenu as be, useOne as xe, useUpdate as Se, useUpdateMany as Ce } from "@refinedev/core";
|
|
10
|
+
import { Link as we, NavLink as Y, Navigate as Te, Outlet as Ee, Route as X, RouterProvider as De, Routes as Oe, createBrowserRouter as ke, matchPath as Ae, useBlocker as je, useLocation as Me, useNavigate as Ne, useParams as Pe, useSearchParams as Fe } from "react-router";
|
|
11
|
+
import { I18nextProvider as Ie, initReactI18next as Le, useTranslation as Re } from "react-i18next";
|
|
12
|
+
import { flexRender as ze, getCoreRowModel as Be, getPaginationRowModel as Ve, getSortedRowModel as He, useReactTable as Ue } from "@tanstack/react-table";
|
|
13
|
+
import We from "i18next";
|
|
14
|
+
import Ge from "i18next-http-backend";
|
|
15
|
+
import Ke from "i18next-browser-languagedetector";
|
|
16
16
|
//#region \0rolldown/runtime.js
|
|
17
|
-
var
|
|
18
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
17
|
+
var qe = Object.create, Je = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, Xe = Object.getOwnPropertyNames, Ze = Object.getPrototypeOf, Qe = Object.prototype.hasOwnProperty, Z = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), $e = (e, t, n, r) => {
|
|
18
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = Xe(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Qe.call(e, s) && s !== n && Je(e, s, {
|
|
19
19
|
get: ((e) => t[e]).bind(null, s),
|
|
20
|
-
enumerable: !(r =
|
|
20
|
+
enumerable: !(r = Ye(t, s)) || r.enumerable
|
|
21
21
|
});
|
|
22
22
|
return e;
|
|
23
|
-
},
|
|
23
|
+
}, et = (e, t, n) => (n = e == null ? {} : qe(Ze(e)), $e(t || !e || !e.__esModule ? Je(n, "default", {
|
|
24
24
|
value: e,
|
|
25
25
|
enumerable: !0
|
|
26
|
-
}) : n, e)),
|
|
26
|
+
}) : n, e)), tt = (typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {}).basename || "", nt = (typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {}).apiVersion || "v1", rt = (() => {
|
|
27
27
|
let e = typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {};
|
|
28
28
|
return e.frameworkMode ? e.frameworkMode : (typeof process < "u" ? process.env.FRAMEWORK_MODE : void 0)?.toUpperCase() || "MONOLITH";
|
|
29
|
-
})(),
|
|
29
|
+
})(), Q = (() => {
|
|
30
30
|
let e = typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {}, t = typeof process < "u" ? process.env.FRAMEWORK_M_SERVICE_NAME : void 0;
|
|
31
31
|
if (e.apiBaseUrl) {
|
|
32
32
|
let n = e.apiBaseUrl;
|
|
33
33
|
if (!n.includes("/api/")) {
|
|
34
|
-
let e = t &&
|
|
34
|
+
let e = t && rt !== "MONOLITH" ? `/api/${t}/${nt}` : `/api/${nt}`;
|
|
35
35
|
return n.endsWith("/") ? `${n.slice(0, -1)}${e}` : `${n}${e}`;
|
|
36
36
|
}
|
|
37
37
|
return n;
|
|
38
38
|
}
|
|
39
|
-
return t &&
|
|
39
|
+
return t && rt !== "MONOLITH" ? `/api/${t}/${nt}` : `/api/${nt}`;
|
|
40
40
|
})(), it = (() => {
|
|
41
41
|
let e = typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {}, t = typeof process < "u" ? process.env.FRAMEWORK_M_SERVICE_NAME : void 0;
|
|
42
42
|
if (e.metaBaseUrl) return e.metaBaseUrl;
|
|
43
43
|
if (e.apiBaseUrl) {
|
|
44
44
|
let n = e.apiBaseUrl;
|
|
45
45
|
if (!n.includes("/api/")) {
|
|
46
|
-
let e = t &&
|
|
46
|
+
let e = t && rt !== "MONOLITH" ? `/api/${t}/meta` : "/api/meta";
|
|
47
47
|
return n.endsWith("/") ? `${n.slice(0, -1)}${e}` : `${n}${e}`;
|
|
48
48
|
}
|
|
49
|
-
return n.replace(`/${
|
|
49
|
+
return n.replace(`/${nt}`, "/meta");
|
|
50
50
|
}
|
|
51
|
-
return t &&
|
|
51
|
+
return t && rt !== "MONOLITH" ? `/api/${t}/meta` : "/api/meta";
|
|
52
52
|
})(), at = (() => {
|
|
53
53
|
let e = typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {}, t = typeof process < "u" ? process.env.FRAMEWORK_M_SERVICE_NAME : void 0;
|
|
54
54
|
if (e.openapiUrl) return e.openapiUrl;
|
|
55
55
|
if (e.apiBaseUrl) {
|
|
56
56
|
let n = e.apiBaseUrl;
|
|
57
57
|
if (!n.includes("/api/")) {
|
|
58
|
-
let e = t &&
|
|
58
|
+
let e = t && rt !== "MONOLITH" ? `/api/${t}/schema` : "/api/schema";
|
|
59
59
|
return n.endsWith("/") ? `${n.slice(0, -1)}${e}` : `${n}${e}`;
|
|
60
60
|
}
|
|
61
|
-
return n.replace(`/${
|
|
61
|
+
return n.replace(`/${nt}`, "/schema");
|
|
62
62
|
}
|
|
63
|
-
return t &&
|
|
63
|
+
return t && rt !== "MONOLITH" ? `/api/${t}/schema` : "/api/schema";
|
|
64
64
|
})(), ot = (() => {
|
|
65
65
|
let e = typeof globalThis < "u" && globalThis.__FRAMEWORK_CONFIG__ || {}, t = typeof process < "u" ? process.env.FRAMEWORK_M_SERVICE_NAME : void 0;
|
|
66
66
|
if (e.wsBaseUrl) return e.wsBaseUrl;
|
|
67
67
|
if (e.apiBaseUrl) {
|
|
68
68
|
let n = e.apiBaseUrl;
|
|
69
69
|
if (!n.includes("/api/")) {
|
|
70
|
-
let e = t &&
|
|
70
|
+
let e = t && rt !== "MONOLITH" ? `/api/${t}/${nt}/stream` : `/api/${nt}/stream`;
|
|
71
71
|
return n.endsWith("/") ? `${n.slice(0, -1)}${e}` : `${n}${e}`;
|
|
72
72
|
}
|
|
73
73
|
return n.endsWith("/") ? `${n.slice(0, -1)}/stream` : `${n}/stream`;
|
|
74
74
|
}
|
|
75
|
-
return t &&
|
|
75
|
+
return t && rt !== "MONOLITH" ? `/api/${t}/${nt}/stream` : `/api/${nt}/stream`;
|
|
76
76
|
})();
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/api.ts
|
|
@@ -167,7 +167,7 @@ function gt(e, n, r) {
|
|
|
167
167
|
let [t, ...n] = e.split("/");
|
|
168
168
|
o = t, s = n.join("/");
|
|
169
169
|
} else o = a.getOwner(e) || void 0;
|
|
170
|
-
return i = o &&
|
|
170
|
+
return i = o && rt !== "MONOLITH" ? `/api/${o}/${nt}/${s}` : `${Q}/${s}`, n !== void 0 && (i += `/${n}`), r && (i += `?${r}`), a.resolveApiUrl(i);
|
|
171
171
|
}
|
|
172
172
|
var _t = {
|
|
173
173
|
getList: async (e) => {
|
|
@@ -221,10 +221,10 @@ var _t = {
|
|
|
221
221
|
resource: t
|
|
222
222
|
}).catch(() => {}))), { data: n.map((e) => ({ id: e })) };
|
|
223
223
|
},
|
|
224
|
-
getApiUrl: () =>
|
|
224
|
+
getApiUrl: () => Q,
|
|
225
225
|
custom: async (e) => {
|
|
226
226
|
let { url: t, method: n, payload: r, headers: i } = e;
|
|
227
|
-
return { data: await ht(t.startsWith("http") ? t : `${
|
|
227
|
+
return { data: await ht(t.startsWith("http") ? t : `${Q}${t}`, {
|
|
228
228
|
method: n || "GET",
|
|
229
229
|
body: r ? JSON.stringify(r) : void 0,
|
|
230
230
|
headers: i
|
|
@@ -249,7 +249,7 @@ function vt() {
|
|
|
249
249
|
var yt = {
|
|
250
250
|
login: async ({ email: e, password: t }) => {
|
|
251
251
|
try {
|
|
252
|
-
let n = await st(`${
|
|
252
|
+
let n = await st(new URLSearchParams(globalThis.location?.search ?? "").get("add_account") === "true" ? `${Q}/auth/login?add_account=true` : `${Q}/auth/login`, {
|
|
253
253
|
method: "POST",
|
|
254
254
|
headers: { "Content-Type": "application/json" },
|
|
255
255
|
credentials: "include",
|
|
@@ -265,7 +265,7 @@ var yt = {
|
|
|
265
265
|
redirectTo: decodeURIComponent(e)
|
|
266
266
|
};
|
|
267
267
|
try {
|
|
268
|
-
let e = await st(`${
|
|
268
|
+
let e = await st(`${Q}/auth/landing`, { credentials: "include" });
|
|
269
269
|
if (e.ok) {
|
|
270
270
|
let { route: t } = await e.json();
|
|
271
271
|
return {
|
|
@@ -299,7 +299,7 @@ var yt = {
|
|
|
299
299
|
},
|
|
300
300
|
logout: async () => {
|
|
301
301
|
try {
|
|
302
|
-
await st(`${
|
|
302
|
+
await st(`${Q}/auth/logout`, {
|
|
303
303
|
method: "POST",
|
|
304
304
|
credentials: "include"
|
|
305
305
|
});
|
|
@@ -314,18 +314,20 @@ var yt = {
|
|
|
314
314
|
if (e.authenticated === !1) return !0;
|
|
315
315
|
let t = String(e.id ?? "").toLowerCase(), n = String(e.name ?? "").toLowerCase(), r = String(e.email ?? "").toLowerCase();
|
|
316
316
|
return t === "guest" || n === "guest user" || r === "guest";
|
|
317
|
-
}, t = () => st(`${
|
|
317
|
+
}, t = () => st(`${Q}/auth/me`, { credentials: "include" });
|
|
318
318
|
try {
|
|
319
|
-
let n =
|
|
320
|
-
if (n
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
let n = new URLSearchParams(globalThis.location?.search ?? "").get("add_account") === "true", r = globalThis.location?.pathname === "/login";
|
|
320
|
+
if (n && r) return { authenticated: !1 };
|
|
321
|
+
let i = await t();
|
|
322
|
+
if (i.ok) {
|
|
323
|
+
let n = await i.json();
|
|
324
|
+
if (e(n)) {
|
|
323
325
|
await new Promise((e) => setTimeout(e, 200));
|
|
324
326
|
try {
|
|
325
|
-
|
|
327
|
+
i = await t(), i.ok && (n = await i.json());
|
|
326
328
|
} catch {}
|
|
327
329
|
}
|
|
328
|
-
if (e(
|
|
330
|
+
if (e(n)) {
|
|
329
331
|
let { loginUrl: e } = vt();
|
|
330
332
|
return {
|
|
331
333
|
authenticated: !1,
|
|
@@ -334,10 +336,10 @@ var yt = {
|
|
|
334
336
|
}
|
|
335
337
|
return { authenticated: !0 };
|
|
336
338
|
}
|
|
337
|
-
let { loginUrl:
|
|
339
|
+
let { loginUrl: a } = vt();
|
|
338
340
|
return {
|
|
339
341
|
authenticated: !1,
|
|
340
|
-
redirectTo:
|
|
342
|
+
redirectTo: a ?? "/login"
|
|
341
343
|
};
|
|
342
344
|
} catch {
|
|
343
345
|
let { loginUrl: e } = vt();
|
|
@@ -349,7 +351,7 @@ var yt = {
|
|
|
349
351
|
},
|
|
350
352
|
getIdentity: async () => {
|
|
351
353
|
try {
|
|
352
|
-
let e = await st(`${
|
|
354
|
+
let e = await st(`${Q}/auth/me`, { credentials: "include" });
|
|
353
355
|
if (e.ok) {
|
|
354
356
|
let t = await e.json();
|
|
355
357
|
if (t.authenticated !== !0) return null;
|
|
@@ -370,7 +372,7 @@ var yt = {
|
|
|
370
372
|
},
|
|
371
373
|
getPermissions: async () => {
|
|
372
374
|
try {
|
|
373
|
-
let e = await st(`${
|
|
375
|
+
let e = await st(`${Q}/auth/me`, { credentials: "include" });
|
|
374
376
|
if (e.ok) {
|
|
375
377
|
let t = await e.json();
|
|
376
378
|
if (t.authenticated !== !0) return null;
|
|
@@ -392,11 +394,73 @@ var yt = {
|
|
|
392
394
|
};
|
|
393
395
|
}
|
|
394
396
|
return { error: e };
|
|
397
|
+
},
|
|
398
|
+
getSwitchableProfiles: async () => {
|
|
399
|
+
try {
|
|
400
|
+
let e = await st(`${Q}/auth/switchable-users`, { credentials: "include" });
|
|
401
|
+
return e.ok ? await e.json() : [];
|
|
402
|
+
} catch {
|
|
403
|
+
return [];
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
switchProfile: async (e) => {
|
|
407
|
+
try {
|
|
408
|
+
let t = await st(`${Q}/auth/switch-profile`, {
|
|
409
|
+
method: "POST",
|
|
410
|
+
headers: { "Content-Type": "application/json" },
|
|
411
|
+
credentials: "include",
|
|
412
|
+
body: JSON.stringify({ user_id: e })
|
|
413
|
+
});
|
|
414
|
+
if (t.ok) return {
|
|
415
|
+
success: !0,
|
|
416
|
+
redirectTo: "/app/dashboard"
|
|
417
|
+
};
|
|
418
|
+
let n = await t.json().catch(() => ({ detail: "Failed to switch profile" }));
|
|
419
|
+
return {
|
|
420
|
+
success: !1,
|
|
421
|
+
error: Error(n.detail || "Failed to switch profile")
|
|
422
|
+
};
|
|
423
|
+
} catch (e) {
|
|
424
|
+
return {
|
|
425
|
+
success: !1,
|
|
426
|
+
error: e instanceof Error ? e : /* @__PURE__ */ Error("Network error")
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
removeProfile: async (e) => {
|
|
431
|
+
try {
|
|
432
|
+
let t = await st(`${Q}/auth/remove-profile`, {
|
|
433
|
+
method: "POST",
|
|
434
|
+
headers: { "Content-Type": "application/json" },
|
|
435
|
+
credentials: "include",
|
|
436
|
+
body: JSON.stringify({ user_id: e })
|
|
437
|
+
});
|
|
438
|
+
if (t.ok) {
|
|
439
|
+
let e = await t.json();
|
|
440
|
+
return {
|
|
441
|
+
success: !0,
|
|
442
|
+
sessionTerminated: !!e.session_terminated,
|
|
443
|
+
redirectTo: e.redirectTo
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
let n = await t.json().catch(() => ({ detail: "Failed to remove profile" }));
|
|
447
|
+
return {
|
|
448
|
+
success: !1,
|
|
449
|
+
sessionTerminated: !1,
|
|
450
|
+
error: Error(n.detail || "Failed to remove profile")
|
|
451
|
+
};
|
|
452
|
+
} catch (e) {
|
|
453
|
+
return {
|
|
454
|
+
success: !1,
|
|
455
|
+
sessionTerminated: !1,
|
|
456
|
+
error: e instanceof Error ? e : /* @__PURE__ */ Error("Network error")
|
|
457
|
+
};
|
|
458
|
+
}
|
|
395
459
|
}
|
|
396
460
|
};
|
|
397
461
|
async function bt(e) {
|
|
398
462
|
try {
|
|
399
|
-
let t = await st(`${
|
|
463
|
+
let t = await st(`${Q}/authz/evaluate`, {
|
|
400
464
|
method: "POST",
|
|
401
465
|
headers: { "Content-Type": "application/json" },
|
|
402
466
|
credentials: "include",
|
|
@@ -516,7 +580,7 @@ var Dt = f(void 0), Ot = [
|
|
|
516
580
|
}
|
|
517
581
|
];
|
|
518
582
|
async function kt() {
|
|
519
|
-
let e = await st(`${
|
|
583
|
+
let e = await st(`${Q}/system/config`, { credentials: "include" });
|
|
520
584
|
if (!e.ok) throw Error(`Failed to fetch system settings: ${e.statusText}`);
|
|
521
585
|
return e.json();
|
|
522
586
|
}
|
|
@@ -702,7 +766,7 @@ function Kt({ tabs: e, doctype: t, children: n, defaultTabIndex: r = 0, onTabCha
|
|
|
702
766
|
return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
|
|
703
767
|
}, [e.length]), e.length === 0 ? null : /* @__PURE__ */ T(H, {
|
|
704
768
|
gap: "$0",
|
|
705
|
-
children: [/* @__PURE__ */ w(
|
|
769
|
+
children: [/* @__PURE__ */ w(K, {
|
|
706
770
|
borderBottomWidth: 1,
|
|
707
771
|
borderColor: "$borderColor",
|
|
708
772
|
gap: "$0",
|
|
@@ -747,7 +811,7 @@ function Kt({ tabs: e, doctype: t, children: n, defaultTabIndex: r = 0, onTabCha
|
|
|
747
811
|
//#endregion
|
|
748
812
|
//#region src/components/layout/SectionField.tsx
|
|
749
813
|
function qt({ label: e, collapsible: t = !1, defaultCollapsed: n = !1, columns: r = 1, children: i }) {
|
|
750
|
-
let [a, o] = v(n), s = d.toArray(i), c = r > 1 && s.length > 1 ? /* @__PURE__ */ w(
|
|
814
|
+
let [a, o] = v(n), s = d.toArray(i), c = r > 1 && s.length > 1 ? /* @__PURE__ */ w(K, {
|
|
751
815
|
flexWrap: "wrap",
|
|
752
816
|
gap: "$sm",
|
|
753
817
|
children: s.map((e, t) => /* @__PURE__ */ w(H, {
|
|
@@ -762,7 +826,7 @@ function qt({ label: e, collapsible: t = !1, defaultCollapsed: n = !1, columns:
|
|
|
762
826
|
padding: "$0",
|
|
763
827
|
overflow: "visible",
|
|
764
828
|
borderRadius: "$sm",
|
|
765
|
-
children: [e && /* @__PURE__ */ T(
|
|
829
|
+
children: [e && /* @__PURE__ */ T(K, {
|
|
766
830
|
paddingHorizontal: "$sm",
|
|
767
831
|
paddingVertical: "$2",
|
|
768
832
|
borderBottomWidth: +!a,
|
|
@@ -841,12 +905,12 @@ function Yt() {
|
|
|
841
905
|
//#endregion
|
|
842
906
|
//#region src/hooks/useWorkflowActions.ts
|
|
843
907
|
async function Xt(e, t) {
|
|
844
|
-
let n = await st(`${
|
|
908
|
+
let n = await st(`${Q}/workflow/${e}/${t}/actions`);
|
|
845
909
|
if (!n.ok) throw Error(`Failed to fetch workflow actions: ${n.statusText}`);
|
|
846
910
|
return n.json();
|
|
847
911
|
}
|
|
848
912
|
async function Zt(e, t, n) {
|
|
849
|
-
let r = await st(`${
|
|
913
|
+
let r = await st(`${Q}/workflow/${e}/${t}/transition`, {
|
|
850
914
|
method: "POST",
|
|
851
915
|
headers: { "Content-Type": "application/json" },
|
|
852
916
|
body: JSON.stringify({ action: n })
|
|
@@ -909,11 +973,11 @@ function $t(e) {
|
|
|
909
973
|
//#endregion
|
|
910
974
|
//#region src/hooks/useFormController.ts
|
|
911
975
|
function en({ doctype: e, id: t } = {}) {
|
|
912
|
-
let n =
|
|
976
|
+
let n = Pe(), r = e ?? n.doctype ?? "", i = t ?? n.id, { schema: a, isLoading: o, error: s, meta: c } = Lt(r), l = !!i, u = xe({
|
|
913
977
|
resource: r,
|
|
914
978
|
id: i ?? "",
|
|
915
979
|
queryOptions: { enabled: l }
|
|
916
|
-
}), d =
|
|
980
|
+
}), d = de(), f = Se(), { state: m } = Qt(r, i, { enabled: l }), [y] = Fe(), b = y.get("form"), x = _(b), S = _(i), C = _(r), [w, T] = v(() => {
|
|
917
981
|
if (!l && b) try {
|
|
918
982
|
return JSON.parse(b);
|
|
919
983
|
} catch (e) {
|
|
@@ -939,7 +1003,7 @@ function en({ doctype: e, id: t } = {}) {
|
|
|
939
1003
|
l,
|
|
940
1004
|
b
|
|
941
1005
|
]);
|
|
942
|
-
let j = u?.result ?? u?.query?.data?.data, M = Object.keys(w).length > 0 || !u?.query?.isSuccess ? w : j ?? {}, N = d.mutation.isPending || f.mutation.isPending, P = Number(M.docstatus), F = P === 1 || P === 2, I =
|
|
1006
|
+
let j = u?.result ?? u?.query?.data?.data, M = Object.keys(w).length > 0 || !u?.query?.isSuccess ? w : j ?? {}, N = d.mutation.isPending || f.mutation.isPending, P = Number(M.docstatus), F = P === 1 || P === 2, I = Ne(), L = $t("resolveListRoute"), R = $t("resolveEditRoute"), z = $t("resolveDetailRoute"), B = p(async (e) => {
|
|
943
1007
|
try {
|
|
944
1008
|
let { _is_new: t, ...n } = M || {}, a = {
|
|
945
1009
|
onSuccess: (t) => {
|
|
@@ -1061,7 +1125,7 @@ function en({ doctype: e, id: t } = {}) {
|
|
|
1061
1125
|
//#endregion
|
|
1062
1126
|
//#region src/hooks/useInlineEdit.ts
|
|
1063
1127
|
function tn({ resource: e, onSaveSuccess: t, onError: n }) {
|
|
1064
|
-
let [r, i] = v(null), [a, o] = v(null), s =
|
|
1128
|
+
let [r, i] = v(null), [a, o] = v(null), s = Se();
|
|
1065
1129
|
return {
|
|
1066
1130
|
editingCell: r,
|
|
1067
1131
|
startEdit: p((e, t, n) => {
|
|
@@ -1111,7 +1175,7 @@ function tn({ resource: e, onSaveSuccess: t, onError: n }) {
|
|
|
1111
1175
|
//#endregion
|
|
1112
1176
|
//#region src/hooks/useBulkActions.ts
|
|
1113
1177
|
function nn({ resource: e, items: t, onSuccess: n, onError: r }) {
|
|
1114
|
-
let [i, a] = v(/* @__PURE__ */ new Set()), o =
|
|
1178
|
+
let [i, a] = v(/* @__PURE__ */ new Set()), o = pe(), s = Ce(), c = g(() => t.filter((e) => i.has(e.id)), [t, i]), l = i.size, u = t.length > 0 && i.size === t.length, d = i.size > 0 && i.size < t.length, f = p((e) => {
|
|
1115
1179
|
a((t) => new Set(t).add(e));
|
|
1116
1180
|
}, []), m = p((e) => {
|
|
1117
1181
|
a((t) => {
|
|
@@ -1227,7 +1291,7 @@ function rn() {
|
|
|
1227
1291
|
//#endregion
|
|
1228
1292
|
//#region src/hooks/useTranslation.ts
|
|
1229
1293
|
function $(e = "common") {
|
|
1230
|
-
let { t, i18n: n, ready: r } =
|
|
1294
|
+
let { t, i18n: n, ready: r } = Re(e);
|
|
1231
1295
|
return {
|
|
1232
1296
|
t,
|
|
1233
1297
|
language: n.language,
|
|
@@ -1305,7 +1369,7 @@ function un(e) {
|
|
|
1305
1369
|
return e ? e instanceof Error ? e.message : String(e) : null;
|
|
1306
1370
|
}
|
|
1307
1371
|
function dn(e, t) {
|
|
1308
|
-
let n =
|
|
1372
|
+
let n = _e({
|
|
1309
1373
|
resource: "ActivityLog",
|
|
1310
1374
|
filters: [{
|
|
1311
1375
|
field: "document_id",
|
|
@@ -1408,7 +1472,7 @@ function _n(e) {
|
|
|
1408
1472
|
})));
|
|
1409
1473
|
}
|
|
1410
1474
|
function vn(e = []) {
|
|
1411
|
-
let [t, n] =
|
|
1475
|
+
let [t, n] = Fe(), r = t.get("search") || "", i = t.get("as_of") || void 0, a = g(() => {
|
|
1412
1476
|
let e = t.get("filters");
|
|
1413
1477
|
if (!e) return [];
|
|
1414
1478
|
try {
|
|
@@ -1589,7 +1653,7 @@ function yn({ doctype: e, id: n, frm: r, shell: i, apps: a }) {
|
|
|
1589
1653
|
//#region src/hooks/useListActions.ts
|
|
1590
1654
|
var bn = "m_list_columns_";
|
|
1591
1655
|
function xn({ doctype: e, propView: t, canKanban: n, canTree: r, canGantt: i, canCalendar: a, resolveDetailRoute: o }) {
|
|
1592
|
-
let s =
|
|
1656
|
+
let s = Ne(), c = Me(), [l, u] = v(!1), [d, f] = v(!1), [m, _] = v(!1), y = p(() => {
|
|
1593
1657
|
if (!e || typeof localStorage > "u") return { visibility: {} };
|
|
1594
1658
|
try {
|
|
1595
1659
|
let t = localStorage.getItem(`${bn}${e}`);
|
|
@@ -1838,7 +1902,7 @@ function Dn({ linkedDoctype: e, onCreated: t, onClose: n }) {
|
|
|
1838
1902
|
if (e) {
|
|
1839
1903
|
u(!0), f(null);
|
|
1840
1904
|
try {
|
|
1841
|
-
let n = await m(`${
|
|
1905
|
+
let n = await m(`${Q}/${e}`, {
|
|
1842
1906
|
method: "POST",
|
|
1843
1907
|
credentials: "include",
|
|
1844
1908
|
headers: { "Content-Type": "application/json" },
|
|
@@ -1862,13 +1926,13 @@ function Dn({ linkedDoctype: e, onCreated: t, onClose: n }) {
|
|
|
1862
1926
|
t,
|
|
1863
1927
|
m
|
|
1864
1928
|
]);
|
|
1865
|
-
return a ? /* @__PURE__ */ w(
|
|
1929
|
+
return a ? /* @__PURE__ */ w(q, {
|
|
1866
1930
|
padding: "$md",
|
|
1867
1931
|
children: /* @__PURE__ */ w(U, {
|
|
1868
1932
|
color: "$colorMuted",
|
|
1869
1933
|
children: r("Loading form...")
|
|
1870
1934
|
})
|
|
1871
|
-
}) : /* @__PURE__ */ T(
|
|
1935
|
+
}) : /* @__PURE__ */ T(q, {
|
|
1872
1936
|
gap: "$md",
|
|
1873
1937
|
children: [
|
|
1874
1938
|
d && /* @__PURE__ */ w(U, {
|
|
@@ -1886,7 +1950,7 @@ function Dn({ linkedDoctype: e, onCreated: t, onClose: n }) {
|
|
|
1886
1950
|
isLocked: l
|
|
1887
1951
|
}
|
|
1888
1952
|
}),
|
|
1889
|
-
/* @__PURE__ */ T(
|
|
1953
|
+
/* @__PURE__ */ T(K, {
|
|
1890
1954
|
gap: "$sm",
|
|
1891
1955
|
justifyContent: "flex-end",
|
|
1892
1956
|
children: [/* @__PURE__ */ w(N, {
|
|
@@ -1935,17 +1999,17 @@ var On = (e) => {
|
|
|
1935
1999
|
]), F = g(() => {
|
|
1936
2000
|
let t = e?.link_filters || b?.link_filters || b?.ui_meta?.link_filters;
|
|
1937
2001
|
return typeof t == "object" && t ? t : null;
|
|
1938
|
-
}, [e, b]), L = Mt(), B =
|
|
2002
|
+
}, [e, b]), L = Mt(), B = he(), [V, H] = v(!1), [ee, te] = v(""), [ne, re] = v(""), G = _(null), ie = p(async (e) => {
|
|
1939
2003
|
if (e && (e.preventDefault(), e.stopPropagation()), !(!i || !O)) {
|
|
1940
2004
|
H(!0);
|
|
1941
2005
|
try {
|
|
1942
|
-
let e = await L(`${
|
|
2006
|
+
let e = await L(`${Q}/${O}/${i}`, { credentials: "include" });
|
|
1943
2007
|
if (e.ok) {
|
|
1944
2008
|
let t = await e.json();
|
|
1945
|
-
|
|
2009
|
+
re(t?.title || t?.name || t?.id || String(i)), G.current = i;
|
|
1946
2010
|
}
|
|
1947
2011
|
} catch {
|
|
1948
|
-
|
|
2012
|
+
re(String(i));
|
|
1949
2013
|
} finally {
|
|
1950
2014
|
H(!1);
|
|
1951
2015
|
}
|
|
@@ -1956,76 +2020,76 @@ var On = (e) => {
|
|
|
1956
2020
|
L
|
|
1957
2021
|
]);
|
|
1958
2022
|
h(() => {
|
|
1959
|
-
i && O ? i !==
|
|
2023
|
+
i && O ? i !== G.current && (te(""), re(""), V || ie()) : i || (te(""), re(""), G.current = null);
|
|
1960
2024
|
}, [
|
|
1961
2025
|
i,
|
|
1962
2026
|
O,
|
|
1963
|
-
|
|
2027
|
+
ie,
|
|
1964
2028
|
V
|
|
1965
2029
|
]), h(() => {
|
|
1966
|
-
i && O && !V && !
|
|
2030
|
+
i && O && !V && !G.current && ie();
|
|
1967
2031
|
}, [
|
|
1968
2032
|
i,
|
|
1969
2033
|
O,
|
|
1970
2034
|
V,
|
|
1971
|
-
|
|
2035
|
+
ie
|
|
1972
2036
|
]);
|
|
1973
|
-
let
|
|
2037
|
+
let J = g(() => ee || ne || (i && !V ? String(i) : ""), [
|
|
1974
2038
|
ee,
|
|
1975
2039
|
ne,
|
|
1976
2040
|
i,
|
|
1977
2041
|
V
|
|
1978
|
-
]), [
|
|
2042
|
+
]), [ae, oe] = v([]), [se, ce] = v(!1), [le, ue] = v(!1), [de, fe] = v(!1), pe = _(null), me = _(O), ge = Nt(ee, 300), _e = p(async (e) => {
|
|
1979
2043
|
if (!O) {
|
|
1980
|
-
|
|
2044
|
+
oe([]);
|
|
1981
2045
|
return;
|
|
1982
2046
|
}
|
|
1983
|
-
|
|
2047
|
+
ue(!0);
|
|
1984
2048
|
try {
|
|
1985
2049
|
let t = new URLSearchParams();
|
|
1986
2050
|
e && t.set("q", e), t.set("limit", "10"), F && Object.entries(F).forEach(([e, n]) => {
|
|
1987
2051
|
t.append(e, String(n));
|
|
1988
2052
|
});
|
|
1989
|
-
let n = await L(`${
|
|
2053
|
+
let n = await L(`${Q}/${O}?${t}`, { credentials: "include" });
|
|
1990
2054
|
if (n.ok) {
|
|
1991
2055
|
let e = await n.json(), t = e?.data || e?.items || e;
|
|
1992
|
-
|
|
2056
|
+
oe((Array.isArray(t) ? t : []).map((e) => ({
|
|
1993
2057
|
value: String(e.id),
|
|
1994
2058
|
label: e.title || e.name || e.id
|
|
1995
2059
|
})));
|
|
1996
2060
|
}
|
|
1997
2061
|
} catch {
|
|
1998
|
-
|
|
2062
|
+
oe([]);
|
|
1999
2063
|
} finally {
|
|
2000
|
-
|
|
2064
|
+
ue(!1);
|
|
2001
2065
|
}
|
|
2002
2066
|
}, [O]);
|
|
2003
2067
|
h(() => {
|
|
2004
|
-
|
|
2068
|
+
se && _e(ge);
|
|
2005
2069
|
}, [
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2070
|
+
ge,
|
|
2071
|
+
se,
|
|
2072
|
+
_e
|
|
2009
2073
|
]), h(() => {
|
|
2010
2074
|
if (typeof window > "u") return;
|
|
2011
2075
|
function e(e) {
|
|
2012
|
-
!
|
|
2076
|
+
!pe.current || !(pe.current instanceof Element) || pe.current && !pe.current.contains(e.target) && ce(!1);
|
|
2013
2077
|
}
|
|
2014
2078
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2015
2079
|
}, []), h(() => {
|
|
2016
|
-
let e =
|
|
2017
|
-
e && e !== O && i && (o(void 0), te(""),
|
|
2080
|
+
let e = me.current;
|
|
2081
|
+
e && e !== O && i && (o(void 0), te(""), oe([]), ce(!1)), me.current = O;
|
|
2018
2082
|
}, [
|
|
2019
2083
|
O,
|
|
2020
2084
|
o,
|
|
2021
2085
|
i
|
|
2022
2086
|
]);
|
|
2023
|
-
let
|
|
2024
|
-
|
|
2025
|
-
},
|
|
2026
|
-
|
|
2027
|
-
}, [o]),
|
|
2028
|
-
return /* @__PURE__ */ T(
|
|
2087
|
+
let ve = (e) => {
|
|
2088
|
+
G.current = e.value, te(e.label), re(e.label), o(e.value), ce(!1);
|
|
2089
|
+
}, ye = p((e, t) => {
|
|
2090
|
+
G.current = e, te(t), re(t), o(e), fe(!1);
|
|
2091
|
+
}, [o]), be = a || D && !O;
|
|
2092
|
+
return /* @__PURE__ */ T(q, {
|
|
2029
2093
|
gap: "$1",
|
|
2030
2094
|
marginBottom: m ? 0 : "$3",
|
|
2031
2095
|
position: "relative",
|
|
@@ -2046,26 +2110,26 @@ var On = (e) => {
|
|
|
2046
2110
|
})
|
|
2047
2111
|
]
|
|
2048
2112
|
}),
|
|
2049
|
-
/* @__PURE__ */ T(
|
|
2113
|
+
/* @__PURE__ */ T(K, {
|
|
2050
2114
|
position: "relative",
|
|
2051
2115
|
alignItems: "center",
|
|
2052
2116
|
width: "100%",
|
|
2053
2117
|
gap: "$sm",
|
|
2054
|
-
children: [/* @__PURE__ */ T(
|
|
2118
|
+
children: [/* @__PURE__ */ T(K, {
|
|
2055
2119
|
flex: 1,
|
|
2056
2120
|
position: "relative",
|
|
2057
2121
|
alignItems: "center",
|
|
2058
2122
|
children: [
|
|
2059
2123
|
/* @__PURE__ */ w(z, {
|
|
2060
2124
|
id: n,
|
|
2061
|
-
value:
|
|
2062
|
-
disabled:
|
|
2125
|
+
value: J,
|
|
2126
|
+
disabled: be,
|
|
2063
2127
|
placeholder: k,
|
|
2064
2128
|
onChangeText: (e) => {
|
|
2065
|
-
te(e),
|
|
2129
|
+
te(e), re(""), !(D && !O) && (ce(!0), e || o(void 0));
|
|
2066
2130
|
},
|
|
2067
2131
|
onFocus: () => {
|
|
2068
|
-
D && !O || (
|
|
2132
|
+
D && !O || (ce(!0), _e(ee));
|
|
2069
2133
|
},
|
|
2070
2134
|
flex: 1,
|
|
2071
2135
|
error: !!u || V && !i,
|
|
@@ -2082,7 +2146,7 @@ var On = (e) => {
|
|
|
2082
2146
|
} : { borderColor: "$primary" },
|
|
2083
2147
|
minHeight: m ? 32 : 44
|
|
2084
2148
|
}),
|
|
2085
|
-
/* @__PURE__ */ w(
|
|
2149
|
+
/* @__PURE__ */ w(K, {
|
|
2086
2150
|
position: "absolute",
|
|
2087
2151
|
right: 12,
|
|
2088
2152
|
top: 0,
|
|
@@ -2098,7 +2162,7 @@ var On = (e) => {
|
|
|
2098
2162
|
})
|
|
2099
2163
|
})
|
|
2100
2164
|
}),
|
|
2101
|
-
i && /* @__PURE__ */ T(
|
|
2165
|
+
i && /* @__PURE__ */ T(K, {
|
|
2102
2166
|
position: "absolute",
|
|
2103
2167
|
right: 8,
|
|
2104
2168
|
top: 0,
|
|
@@ -2113,8 +2177,8 @@ var On = (e) => {
|
|
|
2113
2177
|
padding: 0,
|
|
2114
2178
|
width: 24,
|
|
2115
2179
|
height: 24,
|
|
2116
|
-
onPress:
|
|
2117
|
-
disabled: V ||
|
|
2180
|
+
onPress: ie,
|
|
2181
|
+
disabled: V || be,
|
|
2118
2182
|
title: "Fetch record name",
|
|
2119
2183
|
children: /* @__PURE__ */ w(R, {
|
|
2120
2184
|
name: "refresh-cw",
|
|
@@ -2157,7 +2221,7 @@ var On = (e) => {
|
|
|
2157
2221
|
}), O && M && !a && !m && /* @__PURE__ */ w(N, {
|
|
2158
2222
|
variant: "ghost",
|
|
2159
2223
|
size: "sm",
|
|
2160
|
-
onPress: () =>
|
|
2224
|
+
onPress: () => fe(!0),
|
|
2161
2225
|
title: `Create new ${O}`,
|
|
2162
2226
|
borderWidth: 1,
|
|
2163
2227
|
borderColor: "$borderColorMuted",
|
|
@@ -2180,8 +2244,8 @@ var On = (e) => {
|
|
|
2180
2244
|
t("first to load link options.")
|
|
2181
2245
|
]
|
|
2182
2246
|
}),
|
|
2183
|
-
|
|
2184
|
-
ref:
|
|
2247
|
+
se && /* @__PURE__ */ w(q, {
|
|
2248
|
+
ref: pe,
|
|
2185
2249
|
position: "absolute",
|
|
2186
2250
|
top: "100%",
|
|
2187
2251
|
left: 0,
|
|
@@ -2192,16 +2256,16 @@ var On = (e) => {
|
|
|
2192
2256
|
backgroundColor: "$background",
|
|
2193
2257
|
marginTop: "$1",
|
|
2194
2258
|
padding: "$2",
|
|
2195
|
-
children: [
|
|
2259
|
+
children: [le ? /* @__PURE__ */ w(W, {
|
|
2196
2260
|
size: "sm",
|
|
2197
2261
|
padding: "$2",
|
|
2198
2262
|
children: t("Loading...")
|
|
2199
|
-
}) :
|
|
2263
|
+
}) : ae.length === 0 ? /* @__PURE__ */ w(W, {
|
|
2200
2264
|
size: "sm",
|
|
2201
2265
|
padding: "$2",
|
|
2202
2266
|
children: t("No results found")
|
|
2203
|
-
}) :
|
|
2204
|
-
onPress: () =>
|
|
2267
|
+
}) : ae.map((e) => /* @__PURE__ */ w(N, {
|
|
2268
|
+
onPress: () => ve(e),
|
|
2205
2269
|
variant: "ghost",
|
|
2206
2270
|
size: "sm",
|
|
2207
2271
|
justifyContent: "flex-start",
|
|
@@ -2211,21 +2275,21 @@ var On = (e) => {
|
|
|
2211
2275
|
children: e.label
|
|
2212
2276
|
}, e.value)), /* @__PURE__ */ w(N, {
|
|
2213
2277
|
size: "sm",
|
|
2214
|
-
onPress: () =>
|
|
2278
|
+
onPress: () => ce(!1),
|
|
2215
2279
|
marginTop: "$2",
|
|
2216
2280
|
children: t("Close")
|
|
2217
2281
|
})]
|
|
2218
2282
|
})
|
|
2219
2283
|
}),
|
|
2220
2284
|
O && M && /* @__PURE__ */ w(I, {
|
|
2221
|
-
isOpen:
|
|
2222
|
-
onClose: () =>
|
|
2285
|
+
isOpen: de,
|
|
2286
|
+
onClose: () => fe(!1),
|
|
2223
2287
|
title: `New ${O}`,
|
|
2224
2288
|
width: 480,
|
|
2225
2289
|
children: /* @__PURE__ */ w(Dn, {
|
|
2226
2290
|
linkedDoctype: O,
|
|
2227
|
-
onCreated:
|
|
2228
|
-
onClose: () =>
|
|
2291
|
+
onCreated: ye,
|
|
2292
|
+
onClose: () => fe(!1)
|
|
2229
2293
|
})
|
|
2230
2294
|
})
|
|
2231
2295
|
]
|
|
@@ -2243,7 +2307,7 @@ var On = (e) => {
|
|
|
2243
2307
|
return e;
|
|
2244
2308
|
}, jn = (e) => {
|
|
2245
2309
|
let { id: t, label: n, onChange: r, value: i, placeholder: a, disabled: o, error: s, showInlineError: c, type: l, name: u, required: d, compact: f, min: p, max: m, step: h } = e, g = (e.field ?? {}).ui_meta ?? {}, _ = g.validation ?? {}, v = a ?? g.placeholder ?? (e.schema?.description, void 0), y = g.hint, b = p ?? _.minimum ?? _.exclusiveMinimum, x = m ?? _.maximum ?? _.exclusiveMaximum, S = h ?? _.multipleOf, C = _.minLength, E = _.maxLength, D = _.pattern;
|
|
2246
|
-
return /* @__PURE__ */ T(
|
|
2310
|
+
return /* @__PURE__ */ T(q, {
|
|
2247
2311
|
gap: "$1",
|
|
2248
2312
|
marginBottom: f ? 0 : "$2",
|
|
2249
2313
|
flex: f ? 1 : void 0,
|
|
@@ -2315,7 +2379,7 @@ k(jn);
|
|
|
2315
2379
|
//#region src/components/form/fields/BooleanField.tsx
|
|
2316
2380
|
var Mn = (e) => {
|
|
2317
2381
|
let { label: t, onChange: n, value: r, disabled: i, required: a, compact: o } = e;
|
|
2318
|
-
return /* @__PURE__ */ T(
|
|
2382
|
+
return /* @__PURE__ */ T(K, {
|
|
2319
2383
|
gap: "$sm",
|
|
2320
2384
|
alignItems: "center",
|
|
2321
2385
|
justifyContent: o ? "center" : "flex-start",
|
|
@@ -2336,7 +2400,7 @@ var Mn = (e) => {
|
|
|
2336
2400
|
},
|
|
2337
2401
|
focusStyle: { backgroundColor: "$backgroundHover" },
|
|
2338
2402
|
group: !0,
|
|
2339
|
-
children: [/* @__PURE__ */ w(
|
|
2403
|
+
children: [/* @__PURE__ */ w(q, {
|
|
2340
2404
|
width: 18,
|
|
2341
2405
|
height: 18,
|
|
2342
2406
|
borderRadius: 4,
|
|
@@ -2401,7 +2465,7 @@ var Nn = (e) => {
|
|
|
2401
2465
|
d,
|
|
2402
2466
|
f
|
|
2403
2467
|
]), C = c ?? p.ui_meta?.placeholder ?? "Select...";
|
|
2404
|
-
return /* @__PURE__ */ T(
|
|
2468
|
+
return /* @__PURE__ */ T(q, {
|
|
2405
2469
|
gap: "$1",
|
|
2406
2470
|
marginBottom: u ? 0 : "$2",
|
|
2407
2471
|
flex: u ? 1 : void 0,
|
|
@@ -2529,7 +2593,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2529
2593
|
flexBasis: 0,
|
|
2530
2594
|
minWidth: 120
|
|
2531
2595
|
}, [S]), ne = g(() => V.reduce((e, t) => e + (I(t) === "boolean" ? 80 : 150), 160), [V, S]);
|
|
2532
|
-
return /* @__PURE__ */ T(
|
|
2596
|
+
return /* @__PURE__ */ T(q, {
|
|
2533
2597
|
gap: "$2",
|
|
2534
2598
|
marginTop: "$4",
|
|
2535
2599
|
marginBottom: "$2",
|
|
@@ -2540,7 +2604,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2540
2604
|
onClose: () => x(null),
|
|
2541
2605
|
title: `Edit Row ${b === null ? "" : b + 1}`,
|
|
2542
2606
|
size: "lg",
|
|
2543
|
-
footer: /* @__PURE__ */ T(
|
|
2607
|
+
footer: /* @__PURE__ */ T(K, {
|
|
2544
2608
|
gap: "$2",
|
|
2545
2609
|
justifyContent: "flex-end",
|
|
2546
2610
|
width: "100%",
|
|
@@ -2558,7 +2622,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2558
2622
|
children: t("Done")
|
|
2559
2623
|
})]
|
|
2560
2624
|
}),
|
|
2561
|
-
children: /* @__PURE__ */ T(
|
|
2625
|
+
children: /* @__PURE__ */ T(q, {
|
|
2562
2626
|
gap: "$4",
|
|
2563
2627
|
overflow: "scroll",
|
|
2564
2628
|
padding: "$4",
|
|
@@ -2568,7 +2632,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2568
2632
|
children: [H.length === 0 && /* @__PURE__ */ w(U, {
|
|
2569
2633
|
color: "$colorMuted",
|
|
2570
2634
|
children: t("No editable properties found in schema.")
|
|
2571
|
-
}), H.map((e) => /* @__PURE__ */ w(
|
|
2635
|
+
}), H.map((e) => /* @__PURE__ */ w(q, {
|
|
2572
2636
|
gap: "$1",
|
|
2573
2637
|
paddingVertical: "$2",
|
|
2574
2638
|
borderBottomWidth: 1,
|
|
@@ -2581,7 +2645,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2581
2645
|
}, e))]
|
|
2582
2646
|
})
|
|
2583
2647
|
}),
|
|
2584
|
-
/* @__PURE__ */ T(
|
|
2648
|
+
/* @__PURE__ */ T(K, {
|
|
2585
2649
|
justifyContent: "space-between",
|
|
2586
2650
|
alignItems: "center",
|
|
2587
2651
|
paddingHorizontal: "$1",
|
|
@@ -2606,7 +2670,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2606
2670
|
children: t("+ Add Row")
|
|
2607
2671
|
})]
|
|
2608
2672
|
}),
|
|
2609
|
-
/* @__PURE__ */ T(
|
|
2673
|
+
/* @__PURE__ */ T(q, {
|
|
2610
2674
|
borderWidth: 1,
|
|
2611
2675
|
borderColor: "$borderColor",
|
|
2612
2676
|
borderRadius: "$3",
|
|
@@ -2616,13 +2680,13 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2616
2680
|
borderCollapse: "collapse",
|
|
2617
2681
|
borderSpacing: 0
|
|
2618
2682
|
},
|
|
2619
|
-
children: [/* @__PURE__ */ T(
|
|
2683
|
+
children: [/* @__PURE__ */ T(K, {
|
|
2620
2684
|
backgroundColor: "$backgroundStrong",
|
|
2621
2685
|
borderBottomWidth: 1,
|
|
2622
2686
|
borderBottomColor: "$borderColor",
|
|
2623
2687
|
minWidth: ne,
|
|
2624
2688
|
children: [
|
|
2625
|
-
/* @__PURE__ */ w(
|
|
2689
|
+
/* @__PURE__ */ w(K, {
|
|
2626
2690
|
width: 40,
|
|
2627
2691
|
minHeight: Vn,
|
|
2628
2692
|
paddingHorizontal: zn,
|
|
@@ -2640,7 +2704,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2640
2704
|
}),
|
|
2641
2705
|
V.map((e) => {
|
|
2642
2706
|
let t = I(e), n = t === "number" || t === "integer";
|
|
2643
|
-
return /* @__PURE__ */ w(
|
|
2707
|
+
return /* @__PURE__ */ w(K, {
|
|
2644
2708
|
...te(e),
|
|
2645
2709
|
minHeight: Vn,
|
|
2646
2710
|
paddingHorizontal: zn,
|
|
@@ -2658,7 +2722,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2658
2722
|
})
|
|
2659
2723
|
}, e);
|
|
2660
2724
|
}),
|
|
2661
|
-
/* @__PURE__ */ w(
|
|
2725
|
+
/* @__PURE__ */ w(K, {
|
|
2662
2726
|
marginLeft: "auto",
|
|
2663
2727
|
width: 120,
|
|
2664
2728
|
minHeight: Vn,
|
|
@@ -2668,7 +2732,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2668
2732
|
alignItems: "center"
|
|
2669
2733
|
})
|
|
2670
2734
|
]
|
|
2671
|
-
}), f.length === 0 ? /* @__PURE__ */ w(
|
|
2735
|
+
}), f.length === 0 ? /* @__PURE__ */ w(q, {
|
|
2672
2736
|
alignItems: "center",
|
|
2673
2737
|
justifyContent: "center",
|
|
2674
2738
|
padding: "$6",
|
|
@@ -2678,7 +2742,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2678
2742
|
})
|
|
2679
2743
|
}) : P.map((e, t) => {
|
|
2680
2744
|
let n = M + t;
|
|
2681
|
-
return /* @__PURE__ */ w(
|
|
2745
|
+
return /* @__PURE__ */ w(q, { children: /* @__PURE__ */ T(K, {
|
|
2682
2746
|
borderBottomWidth: t === P.length - 1 ? 0 : 1,
|
|
2683
2747
|
borderBottomColor: "$borderColor",
|
|
2684
2748
|
hoverStyle: { backgroundColor: "$backgroundHover" },
|
|
@@ -2686,7 +2750,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2686
2750
|
minHeight: Vn,
|
|
2687
2751
|
minWidth: ne,
|
|
2688
2752
|
children: [
|
|
2689
|
-
/* @__PURE__ */ w(
|
|
2753
|
+
/* @__PURE__ */ w(K, {
|
|
2690
2754
|
width: 40,
|
|
2691
2755
|
minHeight: Vn,
|
|
2692
2756
|
paddingHorizontal: zn,
|
|
@@ -2705,7 +2769,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2705
2769
|
}),
|
|
2706
2770
|
V.map((e) => {
|
|
2707
2771
|
let t = I(e), r = t === "number" || t === "integer";
|
|
2708
|
-
return /* @__PURE__ */ w(
|
|
2772
|
+
return /* @__PURE__ */ w(K, {
|
|
2709
2773
|
...te(e),
|
|
2710
2774
|
minHeight: Vn,
|
|
2711
2775
|
borderRightWidth: 1,
|
|
@@ -2720,7 +2784,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2720
2784
|
})
|
|
2721
2785
|
}, e);
|
|
2722
2786
|
}),
|
|
2723
|
-
/* @__PURE__ */ T(
|
|
2787
|
+
/* @__PURE__ */ T(K, {
|
|
2724
2788
|
marginLeft: "auto",
|
|
2725
2789
|
width: 120,
|
|
2726
2790
|
minHeight: Vn,
|
|
@@ -2762,7 +2826,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
|
|
|
2762
2826
|
}) }, n);
|
|
2763
2827
|
})]
|
|
2764
2828
|
}),
|
|
2765
|
-
f.length > m && /* @__PURE__ */ T(
|
|
2829
|
+
f.length > m && /* @__PURE__ */ T(K, {
|
|
2766
2830
|
justifyContent: "flex-end",
|
|
2767
2831
|
alignItems: "center",
|
|
2768
2832
|
paddingHorizontal: "$1",
|
|
@@ -2863,7 +2927,7 @@ var Wn = (e) => {
|
|
|
2863
2927
|
}));
|
|
2864
2928
|
}).catch((e) => console.warn("[MultiSelect] Failed to load remote options", e));
|
|
2865
2929
|
}, [_?.source_url]);
|
|
2866
|
-
let y = g(() => Wn(e), [e]), b = g(() => f.length > 0 ? f : y, [y, f]), x = Gn(r), S = g(() => new Set(x), [x]), { model: C } = j(), { data: E } =
|
|
2930
|
+
let y = g(() => Wn(e), [e]), b = g(() => f.length > 0 ? f : y, [y, f]), x = Gn(r), S = g(() => new Set(x), [x]), { model: C } = j(), { data: E } = me(), D = _?.guard?.prevent_self_remove ?? [], O = (e) => D.includes(e) && !!E?.id && !!C?.id && E.id === C.id, k = g(() => {
|
|
2867
2931
|
let e = u.trim().toLowerCase();
|
|
2868
2932
|
return e ? b.filter((t) => t.label.toLowerCase().includes(e) || t.value.toLowerCase().includes(e)) : b;
|
|
2869
2933
|
}, [b, u]), A = (e) => {
|
|
@@ -2871,7 +2935,7 @@ var Wn = (e) => {
|
|
|
2871
2935
|
let t = S.has(e);
|
|
2872
2936
|
t && O(e) || i(t ? x.filter((t) => t !== e) : [...x, e]);
|
|
2873
2937
|
}, M = k.filter((e) => !S.has(e.value));
|
|
2874
|
-
return /* @__PURE__ */ T(
|
|
2938
|
+
return /* @__PURE__ */ T(q, {
|
|
2875
2939
|
gap: "$3",
|
|
2876
2940
|
marginBottom: l ? 0 : "$4",
|
|
2877
2941
|
children: [
|
|
@@ -2884,7 +2948,7 @@ var Wn = (e) => {
|
|
|
2884
2948
|
size: "sm",
|
|
2885
2949
|
error: !!o
|
|
2886
2950
|
}),
|
|
2887
|
-
x.length > 0 && /* @__PURE__ */ T(
|
|
2951
|
+
x.length > 0 && /* @__PURE__ */ T(q, {
|
|
2888
2952
|
gap: "$2",
|
|
2889
2953
|
style: {
|
|
2890
2954
|
marginTop: 12,
|
|
@@ -2895,7 +2959,7 @@ var Wn = (e) => {
|
|
|
2895
2959
|
color: "$colorMuted",
|
|
2896
2960
|
fontWeight: "600",
|
|
2897
2961
|
children: t("Assigned")
|
|
2898
|
-
}), /* @__PURE__ */ w(
|
|
2962
|
+
}), /* @__PURE__ */ w(K, {
|
|
2899
2963
|
flexWrap: "wrap",
|
|
2900
2964
|
children: x.map((e) => {
|
|
2901
2965
|
let t = b.find((t) => t.value === e)?.label ?? e, n = O(e);
|
|
@@ -2918,7 +2982,7 @@ var Wn = (e) => {
|
|
|
2918
2982
|
})
|
|
2919
2983
|
})]
|
|
2920
2984
|
}),
|
|
2921
|
-
M.length > 0 && /* @__PURE__ */ T(
|
|
2985
|
+
M.length > 0 && /* @__PURE__ */ T(q, {
|
|
2922
2986
|
gap: "$2",
|
|
2923
2987
|
style: { marginBottom: 8 },
|
|
2924
2988
|
children: [/* @__PURE__ */ w(U, {
|
|
@@ -2926,7 +2990,7 @@ var Wn = (e) => {
|
|
|
2926
2990
|
color: "$colorMuted",
|
|
2927
2991
|
fontWeight: "600",
|
|
2928
2992
|
children: t("Available")
|
|
2929
|
-
}), /* @__PURE__ */ w(
|
|
2993
|
+
}), /* @__PURE__ */ w(K, {
|
|
2930
2994
|
flexWrap: "wrap",
|
|
2931
2995
|
children: M.map((e) => /* @__PURE__ */ w(N, {
|
|
2932
2996
|
variant: "default",
|
|
@@ -2989,7 +3053,7 @@ function qn(e) {
|
|
|
2989
3053
|
i,
|
|
2990
3054
|
h
|
|
2991
3055
|
]);
|
|
2992
|
-
return /* @__PURE__ */ T(
|
|
3056
|
+
return /* @__PURE__ */ T(q, {
|
|
2993
3057
|
gap: "$1",
|
|
2994
3058
|
marginBottom: s ? 0 : "$2",
|
|
2995
3059
|
flex: s ? 1 : void 0,
|
|
@@ -3012,7 +3076,7 @@ function qn(e) {
|
|
|
3012
3076
|
})
|
|
3013
3077
|
]
|
|
3014
3078
|
}),
|
|
3015
|
-
/* @__PURE__ */ w(
|
|
3079
|
+
/* @__PURE__ */ w(K, {
|
|
3016
3080
|
flexWrap: "wrap",
|
|
3017
3081
|
gap: "$2",
|
|
3018
3082
|
children: i.map((e, t) => {
|
|
@@ -3041,7 +3105,7 @@ function qn(e) {
|
|
|
3041
3105
|
}, `${n}-${t}`);
|
|
3042
3106
|
})
|
|
3043
3107
|
}),
|
|
3044
|
-
/* @__PURE__ */ T(
|
|
3108
|
+
/* @__PURE__ */ T(K, {
|
|
3045
3109
|
gap: "$2",
|
|
3046
3110
|
alignItems: "center",
|
|
3047
3111
|
children: [
|
|
@@ -3168,7 +3232,7 @@ var Jn = new class {
|
|
|
3168
3232
|
let { t: e } = $("desk"), { error: t } = j();
|
|
3169
3233
|
if (!t) return null;
|
|
3170
3234
|
let n = t.details || [];
|
|
3171
|
-
return /* @__PURE__ */ T(
|
|
3235
|
+
return /* @__PURE__ */ T(q, {
|
|
3172
3236
|
backgroundColor: "$errorBg",
|
|
3173
3237
|
padding: "$3",
|
|
3174
3238
|
borderRadius: "$4",
|
|
@@ -3236,14 +3300,14 @@ function $n({ schema: e, formData: t, onChange: n, onSubmit: r, error: i, readon
|
|
|
3236
3300
|
},
|
|
3237
3301
|
onSubmit: (e) => r?.(e),
|
|
3238
3302
|
disabled: o || a,
|
|
3239
|
-
children: /* @__PURE__ */ T(
|
|
3303
|
+
children: /* @__PURE__ */ T(q, {
|
|
3240
3304
|
gap: "$1",
|
|
3241
3305
|
children: [
|
|
3242
3306
|
/* @__PURE__ */ w(Xn, {}),
|
|
3243
|
-
l > 1 ? /* @__PURE__ */ w(
|
|
3307
|
+
l > 1 ? /* @__PURE__ */ w(K, {
|
|
3244
3308
|
flexWrap: "wrap",
|
|
3245
3309
|
marginHorizontal: "$-1.5",
|
|
3246
|
-
children: Object.keys(e.properties || {}).map((e) => /* @__PURE__ */ w(
|
|
3310
|
+
children: Object.keys(e.properties || {}).map((e) => /* @__PURE__ */ w(q, {
|
|
3247
3311
|
flexBasis: `${100 / l}%`,
|
|
3248
3312
|
paddingHorizontal: "$1.5",
|
|
3249
3313
|
children: /* @__PURE__ */ w(Yn, { name: e })
|
|
@@ -3301,7 +3365,7 @@ function ir(e, t) {
|
|
|
3301
3365
|
accessorKey: "modified",
|
|
3302
3366
|
cell: ({ row: e }) => {
|
|
3303
3367
|
let t = e.original, n = t.id, r = typeof n == "string" || typeof n == "number" ? String(n) : "No ID", i = t.modified, a = typeof i == "string" && i.trim() ? i : void 0, o = t.modified_by ?? t.owner, s = typeof o == "string" && o.trim() ? o : "system", c = a ? Ln(a) : "Unknown", l = Fn(s), u = s && !s.includes("-") && s !== "system", d = u ? s.charAt(0).toUpperCase() : "ⓘ", f = `ID: ${r}\nBy: ${s}\nModified: ${a ? In(a).toLocaleString() : "Unknown"}`;
|
|
3304
|
-
return /* @__PURE__ */ T(
|
|
3368
|
+
return /* @__PURE__ */ T(K, {
|
|
3305
3369
|
alignItems: "center",
|
|
3306
3370
|
gap: "$xs",
|
|
3307
3371
|
cursor: "help",
|
|
@@ -3309,7 +3373,7 @@ function ir(e, t) {
|
|
|
3309
3373
|
"aria-label": f,
|
|
3310
3374
|
opacity: .6,
|
|
3311
3375
|
hoverStyle: { opacity: 1 },
|
|
3312
|
-
children: [/* @__PURE__ */ w(
|
|
3376
|
+
children: [/* @__PURE__ */ w(q, {
|
|
3313
3377
|
width: 18,
|
|
3314
3378
|
height: 18,
|
|
3315
3379
|
borderRadius: "$xs",
|
|
@@ -3346,14 +3410,14 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3346
3410
|
h(() => {
|
|
3347
3411
|
o && o.length === 0 && p((e) => Object.keys(e).length > 0 ? {} : e);
|
|
3348
3412
|
}, [o]);
|
|
3349
|
-
let S =
|
|
3413
|
+
let S = J().borderColorMuted?.get?.() || "rgba(226, 232, 240, 0.4)", C = g(() => {
|
|
3350
3414
|
if (u.length === 0) return;
|
|
3351
3415
|
let e = u[0];
|
|
3352
3416
|
return [{
|
|
3353
3417
|
field: e.id,
|
|
3354
3418
|
order: e.desc ? "desc" : "asc"
|
|
3355
3419
|
}];
|
|
3356
|
-
}, [u]), { result: E, query: D } =
|
|
3420
|
+
}, [u]), { result: E, query: D } = _e({
|
|
3357
3421
|
resource: e,
|
|
3358
3422
|
pagination: {
|
|
3359
3423
|
currentPage: m.pageIndex + 1,
|
|
@@ -3382,7 +3446,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3382
3446
|
r,
|
|
3383
3447
|
t,
|
|
3384
3448
|
l
|
|
3385
|
-
]), B =
|
|
3449
|
+
]), B = Ue({
|
|
3386
3450
|
data: O,
|
|
3387
3451
|
columns: g(() => i ? [{
|
|
3388
3452
|
id: "select",
|
|
@@ -3446,9 +3510,9 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3446
3510
|
}
|
|
3447
3511
|
},
|
|
3448
3512
|
onPaginationChange: y,
|
|
3449
|
-
getCoreRowModel:
|
|
3450
|
-
getSortedRowModel:
|
|
3451
|
-
getPaginationRowModel:
|
|
3513
|
+
getCoreRowModel: Be(),
|
|
3514
|
+
getSortedRowModel: He(),
|
|
3515
|
+
getPaginationRowModel: Ve(),
|
|
3452
3516
|
manualPagination: !0,
|
|
3453
3517
|
manualSorting: !0,
|
|
3454
3518
|
enableRowSelection: i,
|
|
@@ -3463,7 +3527,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3463
3527
|
return A ? /* @__PURE__ */ w(H, {
|
|
3464
3528
|
padding: "$md",
|
|
3465
3529
|
gap: "$sm",
|
|
3466
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ w(
|
|
3530
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ w(G, {
|
|
3467
3531
|
height: 32,
|
|
3468
3532
|
width: "100%"
|
|
3469
3533
|
}, t))
|
|
@@ -3476,7 +3540,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3476
3540
|
color: "#fff",
|
|
3477
3541
|
children: M.message || `Failed to load ${e}.`
|
|
3478
3542
|
})
|
|
3479
|
-
}) : /* @__PURE__ */ T(
|
|
3543
|
+
}) : /* @__PURE__ */ T(q, {
|
|
3480
3544
|
className: c,
|
|
3481
3545
|
width: "100%",
|
|
3482
3546
|
flex: 1,
|
|
@@ -3486,24 +3550,24 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3486
3550
|
overflow: "hidden",
|
|
3487
3551
|
opacity: j ? .6 : 1,
|
|
3488
3552
|
style: { transition: "opacity 0.2s ease" },
|
|
3489
|
-
children: [/* @__PURE__ */ T(
|
|
3553
|
+
children: [/* @__PURE__ */ T(q, {
|
|
3490
3554
|
flex: 1,
|
|
3491
3555
|
overflowX: "auto",
|
|
3492
3556
|
overflowY: "hidden",
|
|
3493
|
-
children: [/* @__PURE__ */ w(
|
|
3557
|
+
children: [/* @__PURE__ */ w(q, {
|
|
3494
3558
|
borderBottomWidth: 1,
|
|
3495
3559
|
borderColor: S,
|
|
3496
3560
|
backgroundColor: "$backgroundSecondary",
|
|
3497
3561
|
role: "rowgroup",
|
|
3498
3562
|
marginBottom: "$xs",
|
|
3499
3563
|
minWidth: "fit-content",
|
|
3500
|
-
children: B.getHeaderGroups().map((e) => /* @__PURE__ */ w(
|
|
3564
|
+
children: B.getHeaderGroups().map((e) => /* @__PURE__ */ w(K, {
|
|
3501
3565
|
width: "100%",
|
|
3502
3566
|
minWidth: "fit-content",
|
|
3503
3567
|
role: "row",
|
|
3504
3568
|
children: e.headers.map((e) => {
|
|
3505
3569
|
let t = e.column.id === "select" ? 36 : e.getSize() === 180 ? void 0 : e.getSize();
|
|
3506
|
-
return /* @__PURE__ */ T(
|
|
3570
|
+
return /* @__PURE__ */ T(K, {
|
|
3507
3571
|
...t === void 0 ? { flex: 1 } : {
|
|
3508
3572
|
width: t,
|
|
3509
3573
|
flexShrink: 0
|
|
@@ -3515,7 +3579,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3515
3579
|
borderRightWidth: 1,
|
|
3516
3580
|
borderColor: "transparent",
|
|
3517
3581
|
hoverStyle: { borderColor: S },
|
|
3518
|
-
children: [/* @__PURE__ */ T(
|
|
3582
|
+
children: [/* @__PURE__ */ T(K, {
|
|
3519
3583
|
gap: "$xs",
|
|
3520
3584
|
alignItems: "center",
|
|
3521
3585
|
flex: 1,
|
|
@@ -3528,14 +3592,14 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3528
3592
|
fontWeight: "700",
|
|
3529
3593
|
fontSize: "$sm",
|
|
3530
3594
|
numberOfLines: 1,
|
|
3531
|
-
children:
|
|
3595
|
+
children: ze(e.column.columnDef.header, e.getContext())
|
|
3532
3596
|
}), e.column.getIsSorted() && /* @__PURE__ */ w(R, {
|
|
3533
3597
|
name: e.column.getIsSorted() === "asc" ? "chevron-up" : "chevron-down",
|
|
3534
3598
|
size: 14,
|
|
3535
3599
|
color: "$primary",
|
|
3536
3600
|
"aria-label": e.column.getIsSorted() === "asc" ? "Sorted ascending" : "Sorted descending"
|
|
3537
3601
|
})]
|
|
3538
|
-
}), e.column.getCanResize() && e.column.id !== "select" ? /* @__PURE__ */ w(
|
|
3602
|
+
}), e.column.getCanResize() && e.column.id !== "select" ? /* @__PURE__ */ w(K, {
|
|
3539
3603
|
"aria-label": `Resize ${String(e.column.columnDef.header ?? e.column.id)} column`,
|
|
3540
3604
|
role: "separator",
|
|
3541
3605
|
cursor: "col-resize",
|
|
@@ -3552,7 +3616,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3552
3616
|
onPress: (e) => e.stopPropagation(),
|
|
3553
3617
|
onClick: (e) => e.stopPropagation(),
|
|
3554
3618
|
hoverStyle: { backgroundColor: "rgba(0,0,0,0.05)" },
|
|
3555
|
-
children: /* @__PURE__ */ w(
|
|
3619
|
+
children: /* @__PURE__ */ w(q, {
|
|
3556
3620
|
width: 2,
|
|
3557
3621
|
height: "50%",
|
|
3558
3622
|
borderRadius: "$round",
|
|
@@ -3563,17 +3627,17 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3563
3627
|
}, e.id);
|
|
3564
3628
|
})
|
|
3565
3629
|
}, e.id))
|
|
3566
|
-
}), /* @__PURE__ */ w(
|
|
3630
|
+
}), /* @__PURE__ */ w(q, {
|
|
3567
3631
|
role: "rowgroup",
|
|
3568
3632
|
flex: 1,
|
|
3569
3633
|
minHeight: 0,
|
|
3570
3634
|
minWidth: "fit-content",
|
|
3571
3635
|
style: { overflowY: "auto" },
|
|
3572
|
-
children: B.getRowModel().rows.length === 0 ? /* @__PURE__ */ w(
|
|
3636
|
+
children: B.getRowModel().rows.length === 0 ? /* @__PURE__ */ w(q, {
|
|
3573
3637
|
flex: 1,
|
|
3574
3638
|
minHeight: 360,
|
|
3575
3639
|
backgroundColor: "$background"
|
|
3576
|
-
}) : B.getRowModel().rows.map((e) => /* @__PURE__ */ w(
|
|
3640
|
+
}) : B.getRowModel().rows.map((e) => /* @__PURE__ */ w(K, {
|
|
3577
3641
|
width: "100%",
|
|
3578
3642
|
minWidth: "fit-content",
|
|
3579
3643
|
borderBottomWidth: 1,
|
|
@@ -3590,7 +3654,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3590
3654
|
role: "row",
|
|
3591
3655
|
children: e.getVisibleCells().map((e) => {
|
|
3592
3656
|
let t = e.column.id === "select", n = e.column.getSize() !== 180;
|
|
3593
|
-
return /* @__PURE__ */ w(
|
|
3657
|
+
return /* @__PURE__ */ w(K, {
|
|
3594
3658
|
...t ? {
|
|
3595
3659
|
width: 36,
|
|
3596
3660
|
flexShrink: 0
|
|
@@ -3606,13 +3670,13 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3606
3670
|
children: /* @__PURE__ */ w(U, {
|
|
3607
3671
|
fontSize: "$sm",
|
|
3608
3672
|
numberOfLines: 1,
|
|
3609
|
-
children:
|
|
3673
|
+
children: ze(e.column.columnDef.cell, e.getContext())
|
|
3610
3674
|
})
|
|
3611
3675
|
}, e.id);
|
|
3612
3676
|
})
|
|
3613
3677
|
}, e.id))
|
|
3614
3678
|
})]
|
|
3615
|
-
}), /* @__PURE__ */ T(
|
|
3679
|
+
}), /* @__PURE__ */ T(K, {
|
|
3616
3680
|
justifyContent: "space-between",
|
|
3617
3681
|
alignItems: "center",
|
|
3618
3682
|
borderTopWidth: B.getRowModel().rows.length === 0 ? 0 : 1,
|
|
@@ -3636,7 +3700,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3636
3700
|
" ",
|
|
3637
3701
|
k
|
|
3638
3702
|
]
|
|
3639
|
-
}), /* @__PURE__ */ T(
|
|
3703
|
+
}), /* @__PURE__ */ T(K, {
|
|
3640
3704
|
gap: "$sm",
|
|
3641
3705
|
children: [/* @__PURE__ */ w(N, {
|
|
3642
3706
|
size: "sm",
|
|
@@ -3662,7 +3726,7 @@ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
|
|
|
3662
3726
|
//#endregion
|
|
3663
3727
|
//#region src/components/table/EditableCell.tsx
|
|
3664
3728
|
function or({ resource: e, id: t, field: n, value: r, type: i = "text", options: a, disabled: o = !1, onSaveSuccess: s, renderValue: c }) {
|
|
3665
|
-
let [l, u] = v(!1), [d, f] = v(r), [m, g] = v(null), y = _(null), b =
|
|
3729
|
+
let [l, u] = v(!1), [d, f] = v(r), [m, g] = v(null), y = _(null), b = Se();
|
|
3666
3730
|
h(() => {
|
|
3667
3731
|
l && y.current && (y.current.focus(), y.current instanceof HTMLInputElement && y.current.select());
|
|
3668
3732
|
}, [l]), h(() => {
|
|
@@ -3702,7 +3766,7 @@ function or({ resource: e, id: t, field: n, value: r, type: i = "text", options:
|
|
|
3702
3766
|
}, [C, S]), D = p((e) => {
|
|
3703
3767
|
f(i === "checkbox" ? e.target.checked : i === "number" ? Number(e.target.value) : e.target.value), g(null);
|
|
3704
3768
|
}, [i]), O = b.mutation.isPending;
|
|
3705
|
-
return l ? /* @__PURE__ */ T(
|
|
3769
|
+
return l ? /* @__PURE__ */ T(q, {
|
|
3706
3770
|
position: "relative",
|
|
3707
3771
|
children: [
|
|
3708
3772
|
i === "select" ? /* @__PURE__ */ w(ne, {
|
|
@@ -3736,7 +3800,7 @@ function or({ resource: e, id: t, field: n, value: r, type: i = "text", options:
|
|
|
3736
3800
|
borderColor: m ? "$error" : "$primary",
|
|
3737
3801
|
width: "100%"
|
|
3738
3802
|
}),
|
|
3739
|
-
m && /* @__PURE__ */ w(
|
|
3803
|
+
m && /* @__PURE__ */ w(q, {
|
|
3740
3804
|
position: "absolute",
|
|
3741
3805
|
top: "100%",
|
|
3742
3806
|
left: 0,
|
|
@@ -3753,7 +3817,7 @@ function or({ resource: e, id: t, field: n, value: r, type: i = "text", options:
|
|
|
3753
3817
|
children: m
|
|
3754
3818
|
})
|
|
3755
3819
|
}),
|
|
3756
|
-
O && /* @__PURE__ */ w(
|
|
3820
|
+
O && /* @__PURE__ */ w(q, {
|
|
3757
3821
|
position: "absolute",
|
|
3758
3822
|
right: "$sm",
|
|
3759
3823
|
top: "50%",
|
|
@@ -3765,7 +3829,7 @@ function or({ resource: e, id: t, field: n, value: r, type: i = "text", options:
|
|
|
3765
3829
|
})
|
|
3766
3830
|
})
|
|
3767
3831
|
]
|
|
3768
|
-
}) : /* @__PURE__ */ w(
|
|
3832
|
+
}) : /* @__PURE__ */ w(K, {
|
|
3769
3833
|
onPress: x,
|
|
3770
3834
|
paddingVertical: "$xs",
|
|
3771
3835
|
paddingHorizontal: "$sm",
|
|
@@ -3787,7 +3851,7 @@ function sr({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
3787
3851
|
e.key === "Escape" && s();
|
|
3788
3852
|
};
|
|
3789
3853
|
return globalThis.addEventListener("keydown", t), () => globalThis.removeEventListener("keydown", t);
|
|
3790
|
-
}, [e, s]), e ? /* @__PURE__ */ w(
|
|
3854
|
+
}, [e, s]), e ? /* @__PURE__ */ w(q, {
|
|
3791
3855
|
role: "dialog",
|
|
3792
3856
|
"aria-modal": !0,
|
|
3793
3857
|
"aria-labelledby": c,
|
|
@@ -3817,7 +3881,7 @@ function sr({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
3817
3881
|
marginBottom: "$lg",
|
|
3818
3882
|
children: n
|
|
3819
3883
|
}),
|
|
3820
|
-
/* @__PURE__ */ T(
|
|
3884
|
+
/* @__PURE__ */ T(K, {
|
|
3821
3885
|
justifyContent: "flex-end",
|
|
3822
3886
|
gap: "$sm",
|
|
3823
3887
|
children: [/* @__PURE__ */ w(N, {
|
|
@@ -3862,7 +3926,7 @@ function lr({ message: e, variant: t = "info", onDismiss: n }) {
|
|
|
3862
3926
|
borderWidth: 1,
|
|
3863
3927
|
marginBottom: "$md",
|
|
3864
3928
|
padding: "$md",
|
|
3865
|
-
children: /* @__PURE__ */ T(
|
|
3929
|
+
children: /* @__PURE__ */ T(K, {
|
|
3866
3930
|
alignItems: "center",
|
|
3867
3931
|
justifyContent: "space-between",
|
|
3868
3932
|
gap: "$sm",
|
|
@@ -3925,7 +3989,7 @@ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
|
|
|
3925
3989
|
]), b = p(() => {
|
|
3926
3990
|
_(!0);
|
|
3927
3991
|
}, []);
|
|
3928
|
-
return e === 0 ? null : /* @__PURE__ */ T(
|
|
3992
|
+
return e === 0 ? null : /* @__PURE__ */ T(K, {
|
|
3929
3993
|
alignItems: "center",
|
|
3930
3994
|
gap: "$md",
|
|
3931
3995
|
paddingHorizontal: "$md",
|
|
@@ -3946,7 +4010,7 @@ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
|
|
|
3946
4010
|
c("selected")
|
|
3947
4011
|
]
|
|
3948
4012
|
}),
|
|
3949
|
-
/* @__PURE__ */ T(
|
|
4013
|
+
/* @__PURE__ */ T(K, {
|
|
3950
4014
|
gap: "$xs",
|
|
3951
4015
|
flexWrap: "wrap",
|
|
3952
4016
|
children: [
|
|
@@ -3972,7 +4036,7 @@ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
|
|
|
3972
4036
|
disabled: t,
|
|
3973
4037
|
children: c("Export CSV")
|
|
3974
4038
|
}),
|
|
3975
|
-
a && o.length > 0 && /* @__PURE__ */ T(
|
|
4039
|
+
a && o.length > 0 && /* @__PURE__ */ T(q, {
|
|
3976
4040
|
position: "relative",
|
|
3977
4041
|
zIndex: 100,
|
|
3978
4042
|
children: [/* @__PURE__ */ w(N, {
|
|
@@ -3993,10 +4057,10 @@ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
|
|
|
3993
4057
|
backgroundColor: "$background",
|
|
3994
4058
|
borderColor: "$borderColor",
|
|
3995
4059
|
borderWidth: 1,
|
|
3996
|
-
children: /* @__PURE__ */ T(
|
|
4060
|
+
children: /* @__PURE__ */ T(q, {
|
|
3997
4061
|
gap: "$md",
|
|
3998
4062
|
children: [
|
|
3999
|
-
/* @__PURE__ */ T(
|
|
4063
|
+
/* @__PURE__ */ T(q, {
|
|
4000
4064
|
gap: "$xs",
|
|
4001
4065
|
children: [/* @__PURE__ */ w(U, {
|
|
4002
4066
|
fontSize: "$xs",
|
|
@@ -4013,7 +4077,7 @@ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
|
|
|
4013
4077
|
}))
|
|
4014
4078
|
})]
|
|
4015
4079
|
}),
|
|
4016
|
-
d && /* @__PURE__ */ T(
|
|
4080
|
+
d && /* @__PURE__ */ T(q, {
|
|
4017
4081
|
gap: "$xs",
|
|
4018
4082
|
children: [/* @__PURE__ */ w(U, {
|
|
4019
4083
|
fontSize: "$xs",
|
|
@@ -4031,7 +4095,7 @@ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
|
|
|
4031
4095
|
placeholder: "Enter new value..."
|
|
4032
4096
|
})]
|
|
4033
4097
|
}),
|
|
4034
|
-
/* @__PURE__ */ T(
|
|
4098
|
+
/* @__PURE__ */ T(K, {
|
|
4035
4099
|
gap: "$xs",
|
|
4036
4100
|
justifyContent: "flex-end",
|
|
4037
4101
|
children: [/* @__PURE__ */ w(N, {
|
|
@@ -4122,7 +4186,7 @@ function mr({ state: e, docstatus: t, className: n, style: r }) {
|
|
|
4122
4186
|
let i = e ?? (t === 0 ? "Draft" : t === 1 ? "Submitted" : t === 2 ? "Cancelled" : void 0);
|
|
4123
4187
|
if (!i) return null;
|
|
4124
4188
|
let a = pr(i);
|
|
4125
|
-
return /* @__PURE__ */ w(
|
|
4189
|
+
return /* @__PURE__ */ w(K, {
|
|
4126
4190
|
className: n,
|
|
4127
4191
|
alignSelf: "flex-start",
|
|
4128
4192
|
paddingVertical: 4,
|
|
@@ -4191,7 +4255,7 @@ function _r({ doctype: e, id: t, showState: n = !0, onActionComplete: r, classNa
|
|
|
4191
4255
|
});
|
|
4192
4256
|
if (!s) return null;
|
|
4193
4257
|
let p = c.filter((e) => e.allowed);
|
|
4194
|
-
return /* @__PURE__ */ T(
|
|
4258
|
+
return /* @__PURE__ */ T(K, {
|
|
4195
4259
|
className: i,
|
|
4196
4260
|
alignItems: "center",
|
|
4197
4261
|
gap: "$md",
|
|
@@ -4280,7 +4344,7 @@ function wr({ diff: e }) {
|
|
|
4280
4344
|
marginTop: "$xs",
|
|
4281
4345
|
gap: "$xs",
|
|
4282
4346
|
width: "100%",
|
|
4283
|
-
children: [/* @__PURE__ */ T(
|
|
4347
|
+
children: [/* @__PURE__ */ T(K, {
|
|
4284
4348
|
borderBottomWidth: 1,
|
|
4285
4349
|
borderBottomColor: "$borderColor",
|
|
4286
4350
|
paddingVertical: "$xs",
|
|
@@ -4306,7 +4370,7 @@ function wr({ diff: e }) {
|
|
|
4306
4370
|
]
|
|
4307
4371
|
}), n.map(([e, t]) => {
|
|
4308
4372
|
let n = Cr(t.old), r = Cr(t.new);
|
|
4309
|
-
return /* @__PURE__ */ T(
|
|
4373
|
+
return /* @__PURE__ */ T(K, {
|
|
4310
4374
|
paddingVertical: "$xs",
|
|
4311
4375
|
alignItems: "flex-start",
|
|
4312
4376
|
children: [
|
|
@@ -4371,7 +4435,7 @@ function Er({ doctype: e, id: t }) {
|
|
|
4371
4435
|
children: /* @__PURE__ */ T(H, {
|
|
4372
4436
|
gap: "$xs",
|
|
4373
4437
|
children: [
|
|
4374
|
-
/* @__PURE__ */ T(
|
|
4438
|
+
/* @__PURE__ */ T(K, {
|
|
4375
4439
|
justifyContent: "space-between",
|
|
4376
4440
|
gap: "$sm",
|
|
4377
4441
|
flexWrap: "wrap",
|
|
@@ -4425,7 +4489,7 @@ function jr({ doctype: e, asOf: t, onAsOfChange: n, onError: r }) {
|
|
|
4425
4489
|
let { t: i } = $("desk"), { meta: a } = Lt(e ?? ""), [o, s] = v(!1), [c, l] = v(""), u = g(() => Ar(a), [a]);
|
|
4426
4490
|
return h(() => {
|
|
4427
4491
|
l(kr(t));
|
|
4428
|
-
}, [t]), e ? /* @__PURE__ */ T(
|
|
4492
|
+
}, [t]), e ? /* @__PURE__ */ T(K, {
|
|
4429
4493
|
gap: "$sm",
|
|
4430
4494
|
alignItems: "center",
|
|
4431
4495
|
children: [/* @__PURE__ */ w(N, {
|
|
@@ -4433,7 +4497,7 @@ function jr({ doctype: e, asOf: t, onAsOfChange: n, onError: r }) {
|
|
|
4433
4497
|
size: "sm",
|
|
4434
4498
|
onPress: () => s((e) => !e),
|
|
4435
4499
|
children: i("View as of date")
|
|
4436
|
-
}), o && /* @__PURE__ */ T(
|
|
4500
|
+
}), o && /* @__PURE__ */ T(K, {
|
|
4437
4501
|
gap: "$sm",
|
|
4438
4502
|
alignItems: "center",
|
|
4439
4503
|
children: [/* @__PURE__ */ w(z, {
|
|
@@ -4464,28 +4528,28 @@ function jr({ doctype: e, asOf: t, onAsOfChange: n, onError: r }) {
|
|
|
4464
4528
|
}
|
|
4465
4529
|
//#endregion
|
|
4466
4530
|
//#region src/components/layout/ShellSkeleton.tsx
|
|
4467
|
-
var Mr = () => /* @__PURE__ */ w(
|
|
4531
|
+
var Mr = () => /* @__PURE__ */ w(K, {
|
|
4468
4532
|
flex: 1,
|
|
4469
4533
|
backgroundColor: "$background",
|
|
4470
|
-
children: /* @__PURE__ */ T(
|
|
4534
|
+
children: /* @__PURE__ */ T(q, {
|
|
4471
4535
|
flex: 1,
|
|
4472
4536
|
padding: "$lg",
|
|
4473
4537
|
overflow: "hidden",
|
|
4474
|
-
children: [/* @__PURE__ */ w(
|
|
4538
|
+
children: [/* @__PURE__ */ w(q, {
|
|
4475
4539
|
marginBottom: 24,
|
|
4476
|
-
children: /* @__PURE__ */ w(
|
|
4540
|
+
children: /* @__PURE__ */ w(G, {
|
|
4477
4541
|
variant: "heading",
|
|
4478
4542
|
width: "30%",
|
|
4479
4543
|
height: 32
|
|
4480
4544
|
})
|
|
4481
|
-
}), /* @__PURE__ */ w(
|
|
4545
|
+
}), /* @__PURE__ */ w(K, {
|
|
4482
4546
|
flexWrap: "wrap",
|
|
4483
4547
|
gap: "$lg",
|
|
4484
4548
|
children: [
|
|
4485
4549
|
"section-a",
|
|
4486
4550
|
"section-b",
|
|
4487
4551
|
"section-c"
|
|
4488
|
-
].map((e) => /* @__PURE__ */ T(
|
|
4552
|
+
].map((e) => /* @__PURE__ */ T(q, {
|
|
4489
4553
|
height: 200,
|
|
4490
4554
|
minWidth: 300,
|
|
4491
4555
|
flex: 1,
|
|
@@ -4494,31 +4558,31 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4494
4558
|
borderColor: "$borderColor",
|
|
4495
4559
|
borderRadius: "$lg",
|
|
4496
4560
|
padding: "$lg",
|
|
4497
|
-
children: [/* @__PURE__ */ w(
|
|
4561
|
+
children: [/* @__PURE__ */ w(q, {
|
|
4498
4562
|
marginBottom: 16,
|
|
4499
|
-
children: /* @__PURE__ */ w(
|
|
4563
|
+
children: /* @__PURE__ */ w(G, {
|
|
4500
4564
|
variant: "heading",
|
|
4501
4565
|
width: "40%"
|
|
4502
4566
|
})
|
|
4503
|
-
}), /* @__PURE__ */ w(
|
|
4567
|
+
}), /* @__PURE__ */ w(G, {
|
|
4504
4568
|
variant: "text",
|
|
4505
4569
|
count: 3
|
|
4506
4570
|
})]
|
|
4507
4571
|
}, e))
|
|
4508
4572
|
})]
|
|
4509
4573
|
})
|
|
4510
|
-
}), Nr = () => /* @__PURE__ */ T(
|
|
4574
|
+
}), Nr = () => /* @__PURE__ */ T(q, {
|
|
4511
4575
|
padding: "$lg",
|
|
4512
4576
|
gap: "$md",
|
|
4513
4577
|
backgroundColor: "$background",
|
|
4514
|
-
children: [/* @__PURE__ */ T(
|
|
4578
|
+
children: [/* @__PURE__ */ T(K, {
|
|
4515
4579
|
justifyContent: "space-between",
|
|
4516
4580
|
marginBottom: "$lg",
|
|
4517
|
-
children: [/* @__PURE__ */ w(
|
|
4581
|
+
children: [/* @__PURE__ */ w(G, {
|
|
4518
4582
|
variant: "heading",
|
|
4519
4583
|
width: "20%"
|
|
4520
|
-
}), /* @__PURE__ */ w(
|
|
4521
|
-
}), /* @__PURE__ */ w(
|
|
4584
|
+
}), /* @__PURE__ */ w(G, { variant: "button" })]
|
|
4585
|
+
}), /* @__PURE__ */ w(q, {
|
|
4522
4586
|
gap: "$sm",
|
|
4523
4587
|
children: [
|
|
4524
4588
|
"row-1",
|
|
@@ -4531,28 +4595,28 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4531
4595
|
"row-8",
|
|
4532
4596
|
"row-9",
|
|
4533
4597
|
"row-10"
|
|
4534
|
-
].map((e) => /* @__PURE__ */ T(
|
|
4598
|
+
].map((e) => /* @__PURE__ */ T(K, {
|
|
4535
4599
|
gap: "$md",
|
|
4536
4600
|
padding: "$sm",
|
|
4537
4601
|
borderBottomWidth: 1,
|
|
4538
4602
|
borderColor: "$borderColor",
|
|
4539
4603
|
children: [
|
|
4540
|
-
/* @__PURE__ */ w(
|
|
4604
|
+
/* @__PURE__ */ w(G, {
|
|
4541
4605
|
variant: "text",
|
|
4542
4606
|
width: "5%"
|
|
4543
4607
|
}),
|
|
4544
|
-
/* @__PURE__ */ w(
|
|
4608
|
+
/* @__PURE__ */ w(G, {
|
|
4545
4609
|
variant: "text",
|
|
4546
4610
|
width: "60%"
|
|
4547
4611
|
}),
|
|
4548
|
-
/* @__PURE__ */ w(
|
|
4612
|
+
/* @__PURE__ */ w(G, {
|
|
4549
4613
|
variant: "text",
|
|
4550
4614
|
width: "20%"
|
|
4551
4615
|
})
|
|
4552
4616
|
]
|
|
4553
4617
|
}, e))
|
|
4554
4618
|
})]
|
|
4555
|
-
}), Pr = () => /* @__PURE__ */ T(
|
|
4619
|
+
}), Pr = () => /* @__PURE__ */ T(K, {
|
|
4556
4620
|
className: "skeleton-layout",
|
|
4557
4621
|
height: "100vh",
|
|
4558
4622
|
width: "100%",
|
|
@@ -4560,7 +4624,7 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4560
4624
|
backgroundColor: "$background",
|
|
4561
4625
|
$sm: { flexDirection: "column-reverse" },
|
|
4562
4626
|
children: [
|
|
4563
|
-
/* @__PURE__ */ T(
|
|
4627
|
+
/* @__PURE__ */ T(q, {
|
|
4564
4628
|
width: 64,
|
|
4565
4629
|
backgroundColor: "$backgroundSecondary",
|
|
4566
4630
|
paddingBottom: "$lg",
|
|
@@ -4580,12 +4644,12 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4580
4644
|
paddingBottom: 0,
|
|
4581
4645
|
paddingHorizontal: "$lg"
|
|
4582
4646
|
},
|
|
4583
|
-
children: [/* @__PURE__ */ w(
|
|
4647
|
+
children: [/* @__PURE__ */ w(G, {
|
|
4584
4648
|
variant: "avatar",
|
|
4585
4649
|
width: 32,
|
|
4586
4650
|
height: 32,
|
|
4587
4651
|
opacity: .5
|
|
4588
|
-
}), /* @__PURE__ */ w(
|
|
4652
|
+
}), /* @__PURE__ */ w(q, {
|
|
4589
4653
|
gap: "$lg",
|
|
4590
4654
|
marginTop: "$xl",
|
|
4591
4655
|
opacity: .2,
|
|
@@ -4598,14 +4662,14 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4598
4662
|
2,
|
|
4599
4663
|
3,
|
|
4600
4664
|
4
|
|
4601
|
-
].map((e) => /* @__PURE__ */ w(
|
|
4665
|
+
].map((e) => /* @__PURE__ */ w(G, {
|
|
4602
4666
|
variant: "avatar",
|
|
4603
4667
|
width: 32,
|
|
4604
4668
|
height: 32
|
|
4605
4669
|
}, e))
|
|
4606
4670
|
})]
|
|
4607
4671
|
}),
|
|
4608
|
-
/* @__PURE__ */ T(
|
|
4672
|
+
/* @__PURE__ */ T(q, {
|
|
4609
4673
|
width: 240,
|
|
4610
4674
|
backgroundColor: "$background",
|
|
4611
4675
|
padding: "$md",
|
|
@@ -4614,15 +4678,15 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4614
4678
|
$gtSm: { display: "flex" },
|
|
4615
4679
|
borderRightWidth: 1,
|
|
4616
4680
|
borderColor: "$borderColor",
|
|
4617
|
-
children: [/* @__PURE__ */ w(
|
|
4681
|
+
children: [/* @__PURE__ */ w(q, {
|
|
4618
4682
|
opacity: .1,
|
|
4619
4683
|
padding: "$sm",
|
|
4620
|
-
children: /* @__PURE__ */ w(
|
|
4684
|
+
children: /* @__PURE__ */ w(G, {
|
|
4621
4685
|
variant: "heading",
|
|
4622
4686
|
width: "60%",
|
|
4623
4687
|
height: 24
|
|
4624
4688
|
})
|
|
4625
|
-
}), /* @__PURE__ */ w(
|
|
4689
|
+
}), /* @__PURE__ */ w(q, {
|
|
4626
4690
|
gap: "$md",
|
|
4627
4691
|
opacity: .1,
|
|
4628
4692
|
children: [
|
|
@@ -4632,11 +4696,11 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4632
4696
|
4,
|
|
4633
4697
|
5,
|
|
4634
4698
|
6
|
|
4635
|
-
].map((e) => /* @__PURE__ */ w(
|
|
4699
|
+
].map((e) => /* @__PURE__ */ w(K, {
|
|
4636
4700
|
alignItems: "center",
|
|
4637
4701
|
gap: "$sm",
|
|
4638
4702
|
paddingLeft: "$sm",
|
|
4639
|
-
children: /* @__PURE__ */ w(
|
|
4703
|
+
children: /* @__PURE__ */ w(G, {
|
|
4640
4704
|
variant: "text",
|
|
4641
4705
|
width: "70%",
|
|
4642
4706
|
height: 16
|
|
@@ -4644,11 +4708,11 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4644
4708
|
}, e))
|
|
4645
4709
|
})]
|
|
4646
4710
|
}),
|
|
4647
|
-
/* @__PURE__ */ T(
|
|
4711
|
+
/* @__PURE__ */ T(q, {
|
|
4648
4712
|
flex: 1,
|
|
4649
4713
|
minWidth: 0,
|
|
4650
4714
|
overflow: "hidden",
|
|
4651
|
-
children: [/* @__PURE__ */ w(
|
|
4715
|
+
children: [/* @__PURE__ */ w(K, {
|
|
4652
4716
|
height: 56,
|
|
4653
4717
|
alignItems: "center",
|
|
4654
4718
|
paddingHorizontal: "$lg",
|
|
@@ -4657,7 +4721,7 @@ var Mr = () => /* @__PURE__ */ w(q, {
|
|
|
4657
4721
|
borderColor: "$borderColor",
|
|
4658
4722
|
gap: "$md",
|
|
4659
4723
|
display: "none",
|
|
4660
|
-
children: /* @__PURE__ */ w(
|
|
4724
|
+
children: /* @__PURE__ */ w(G, {
|
|
4661
4725
|
variant: "text",
|
|
4662
4726
|
width: "40%",
|
|
4663
4727
|
height: 24
|
|
@@ -4690,7 +4754,7 @@ function Ur(e, t) {
|
|
|
4690
4754
|
//#endregion
|
|
4691
4755
|
//#region src/components/feedback/QuickEditModal.tsx
|
|
4692
4756
|
function Wr({ item: e, resource: t, titleField: n, descField: r, groupField: i, columns: a, onClose: o, onSaved: s }) {
|
|
4693
|
-
let { t: c } = $("desk"), [l, u] = v(String(e[n] ?? e.name)), [d, f] = v(r ? String(e[r] ?? "") : ""), [m, h] = v(String(e[i] ?? a[0]?.id ?? "")), [g, _] = v(!1), { mutate: y } =
|
|
4757
|
+
let { t: c } = $("desk"), [l, u] = v(String(e[n] ?? e.name)), [d, f] = v(r ? String(e[r] ?? "") : ""), [m, h] = v(String(e[i] ?? a[0]?.id ?? "")), [g, _] = v(!1), { mutate: y } = Se(), b = p(() => {
|
|
4694
4758
|
_(!0);
|
|
4695
4759
|
let a = {
|
|
4696
4760
|
[n]: l,
|
|
@@ -4721,7 +4785,7 @@ function Wr({ item: e, resource: t, titleField: n, descField: r, groupField: i,
|
|
|
4721
4785
|
]), x = p((e) => {
|
|
4722
4786
|
e.key === "Escape" && o();
|
|
4723
4787
|
}, [o]);
|
|
4724
|
-
return /* @__PURE__ */ w(
|
|
4788
|
+
return /* @__PURE__ */ w(q, {
|
|
4725
4789
|
role: "dialog",
|
|
4726
4790
|
"aria-modal": !0,
|
|
4727
4791
|
"aria-label": `Edit ${String(e[n] ?? e.name)}`,
|
|
@@ -4741,7 +4805,7 @@ function Wr({ item: e, resource: t, titleField: n, descField: r, groupField: i,
|
|
|
4741
4805
|
maxWidth: "90vw",
|
|
4742
4806
|
elevated: !0,
|
|
4743
4807
|
children: [
|
|
4744
|
-
/* @__PURE__ */ T(
|
|
4808
|
+
/* @__PURE__ */ T(K, {
|
|
4745
4809
|
justifyContent: "space-between",
|
|
4746
4810
|
alignItems: "center",
|
|
4747
4811
|
marginBottom: "$md",
|
|
@@ -4796,7 +4860,7 @@ function Wr({ item: e, resource: t, titleField: n, descField: r, groupField: i,
|
|
|
4796
4860
|
rows: 3,
|
|
4797
4861
|
marginBottom: "$md"
|
|
4798
4862
|
})] }),
|
|
4799
|
-
/* @__PURE__ */ T(
|
|
4863
|
+
/* @__PURE__ */ T(K, {
|
|
4800
4864
|
gap: "$sm",
|
|
4801
4865
|
justifyContent: "flex-end",
|
|
4802
4866
|
marginTop: "$sm",
|
|
@@ -4873,11 +4937,11 @@ function Yr(e) {
|
|
|
4873
4937
|
return w(an(e.resource, "KanbanView") || Xr, { ...e });
|
|
4874
4938
|
}
|
|
4875
4939
|
function Xr({ resource: e, config: t, filters: n }) {
|
|
4876
|
-
let { t: r } = $("desk"), i = Gr(t), a = Kr(t), o = qr(t), [s, c] = v(null), [l, u] = v(null), [d, f] = v(null), { result: m, query: h } =
|
|
4940
|
+
let { t: r } = $("desk"), i = Gr(t), a = Kr(t), o = qr(t), [s, c] = v(null), [l, u] = v(null), [d, f] = v(null), { result: m, query: h } = _e({
|
|
4877
4941
|
resource: e,
|
|
4878
4942
|
pagination: { pageSize: 200 },
|
|
4879
4943
|
filters: n
|
|
4880
|
-
}), _ = m?.data ?? [], y = h?.isLoading ?? !1, { mutate: b } =
|
|
4944
|
+
}), _ = m?.data ?? [], y = h?.isLoading ?? !1, { mutate: b } = Se(), x = g(() => Jr(t, _, i), [
|
|
4881
4945
|
t,
|
|
4882
4946
|
_,
|
|
4883
4947
|
i
|
|
@@ -4916,25 +4980,25 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
4916
4980
|
b,
|
|
4917
4981
|
h
|
|
4918
4982
|
]);
|
|
4919
|
-
return y ? /* @__PURE__ */ T(
|
|
4983
|
+
return y ? /* @__PURE__ */ T(q, {
|
|
4920
4984
|
padding: "$xl",
|
|
4921
4985
|
alignItems: "center",
|
|
4922
4986
|
children: [/* @__PURE__ */ w(U, {
|
|
4923
4987
|
color: "$colorMuted",
|
|
4924
4988
|
children: r("Loading Kanban...")
|
|
4925
|
-
}), /* @__PURE__ */ w(
|
|
4989
|
+
}), /* @__PURE__ */ w(K, {
|
|
4926
4990
|
gap: "$md",
|
|
4927
4991
|
padding: "$md",
|
|
4928
4992
|
children: [
|
|
4929
4993
|
1,
|
|
4930
4994
|
2,
|
|
4931
4995
|
3
|
|
4932
|
-
].map((e) => /* @__PURE__ */ w(
|
|
4996
|
+
].map((e) => /* @__PURE__ */ w(q, {
|
|
4933
4997
|
width: 280,
|
|
4934
4998
|
backgroundColor: "$backgroundSecondary",
|
|
4935
4999
|
borderRadius: "$lg",
|
|
4936
5000
|
padding: "$md",
|
|
4937
|
-
children: [1, 2].map((e) => /* @__PURE__ */ w(
|
|
5001
|
+
children: [1, 2].map((e) => /* @__PURE__ */ w(q, {
|
|
4938
5002
|
height: 72,
|
|
4939
5003
|
marginBottom: "$sm",
|
|
4940
5004
|
borderRadius: "$md",
|
|
@@ -4953,7 +5017,7 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
4953
5017
|
onSaved: () => {
|
|
4954
5018
|
h?.refetch?.();
|
|
4955
5019
|
}
|
|
4956
|
-
}), /* @__PURE__ */ w(
|
|
5020
|
+
}), /* @__PURE__ */ w(K, {
|
|
4957
5021
|
role: "region",
|
|
4958
5022
|
"aria-label": "Kanban board",
|
|
4959
5023
|
gap: "$md",
|
|
@@ -4965,7 +5029,7 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
4965
5029
|
width: "100%",
|
|
4966
5030
|
children: x.map((e) => {
|
|
4967
5031
|
let t = l === e.id;
|
|
4968
|
-
return /* @__PURE__ */ T(
|
|
5032
|
+
return /* @__PURE__ */ T(q, {
|
|
4969
5033
|
role: "group",
|
|
4970
5034
|
"aria-label": `${e.title} column`,
|
|
4971
5035
|
onDragOver: (t) => {
|
|
@@ -4979,7 +5043,7 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
4979
5043
|
borderRadius: "$lg",
|
|
4980
5044
|
borderWidth: 2,
|
|
4981
5045
|
borderColor: t ? "$primary" : "transparent",
|
|
4982
|
-
children: [/* @__PURE__ */ T(
|
|
5046
|
+
children: [/* @__PURE__ */ T(K, {
|
|
4983
5047
|
paddingHorizontal: "$md",
|
|
4984
5048
|
paddingVertical: "$sm",
|
|
4985
5049
|
borderBottomWidth: 3,
|
|
@@ -4989,7 +5053,7 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
4989
5053
|
children: [/* @__PURE__ */ w(U, {
|
|
4990
5054
|
fontWeight: "600",
|
|
4991
5055
|
children: e.title
|
|
4992
|
-
}), /* @__PURE__ */ w(
|
|
5056
|
+
}), /* @__PURE__ */ w(q, {
|
|
4993
5057
|
backgroundColor: "rgba(0,0,0,0.05)",
|
|
4994
5058
|
borderRadius: 100,
|
|
4995
5059
|
paddingHorizontal: "$sm",
|
|
@@ -5001,7 +5065,7 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
5001
5065
|
children: S[e.id]?.length ?? 0
|
|
5002
5066
|
})
|
|
5003
5067
|
})]
|
|
5004
|
-
}), /* @__PURE__ */ T(
|
|
5068
|
+
}), /* @__PURE__ */ T(q, {
|
|
5005
5069
|
flex: 1,
|
|
5006
5070
|
padding: "$sm",
|
|
5007
5071
|
overflow: "scroll",
|
|
@@ -5041,7 +5105,7 @@ function Xr({ resource: e, config: t, filters: n }) {
|
|
|
5041
5105
|
children: [String(t[o]).slice(0, 80), String(t[o]).length > 80 ? "…" : ""]
|
|
5042
5106
|
})]
|
|
5043
5107
|
}, t.id);
|
|
5044
|
-
}), S[e.id]?.length === 0 && /* @__PURE__ */ w(
|
|
5108
|
+
}), S[e.id]?.length === 0 && /* @__PURE__ */ w(q, {
|
|
5045
5109
|
padding: "$lg",
|
|
5046
5110
|
alignItems: "center",
|
|
5047
5111
|
borderWidth: 2,
|
|
@@ -5068,7 +5132,7 @@ function Qr(e) {
|
|
|
5068
5132
|
return w(an(e.resource, "CalendarView") || $r, { ...e });
|
|
5069
5133
|
}
|
|
5070
5134
|
function $r({ resource: e, config: t, filters: n }) {
|
|
5071
|
-
let { t: r } = $("desk"), i = t.startField, a = t.titleField, o =
|
|
5135
|
+
let { t: r } = $("desk"), i = t.startField, a = t.titleField, o = he(), s = $t("resolveDetailRoute"), [c, l] = v("month"), [u, d] = v(/* @__PURE__ */ new Date()), f = u.getFullYear(), p = u.getMonth(), m = u.getDate(), h = u.getDay(), { startDate: _, endDate: y } = g(() => {
|
|
5072
5136
|
let e, t;
|
|
5073
5137
|
return c === "month" ? (e = new Date(f, p, 1), t = new Date(f, p + 1, 0)) : c === "week" ? (e = new Date(f, p, m - h), t = new Date(f, p, m + (6 - h))) : (e = new Date(f, p, m), t = new Date(f, p, m)), e.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), {
|
|
5074
5138
|
startDate: e,
|
|
@@ -5080,7 +5144,7 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5080
5144
|
m,
|
|
5081
5145
|
h,
|
|
5082
5146
|
c
|
|
5083
|
-
]), { result: b, query: x } =
|
|
5147
|
+
]), { result: b, query: x } = _e({
|
|
5084
5148
|
resource: e,
|
|
5085
5149
|
filters: [
|
|
5086
5150
|
...n || [],
|
|
@@ -5144,23 +5208,23 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5144
5208
|
"Fri",
|
|
5145
5209
|
"Sat"
|
|
5146
5210
|
], j = c === "month" ? new Date(f, p, 1).getDay() : 0, M = c === "day" ? "100%" : `${100 / 7}%`, P = c === "month" ? 3 : 10;
|
|
5147
|
-
return x?.isLoading ? /* @__PURE__ */ w(
|
|
5211
|
+
return x?.isLoading ? /* @__PURE__ */ w(q, {
|
|
5148
5212
|
padding: "$xl",
|
|
5149
5213
|
children: /* @__PURE__ */ w(U, {
|
|
5150
5214
|
color: "$colorMuted",
|
|
5151
5215
|
children: r("Loading...")
|
|
5152
5216
|
})
|
|
5153
|
-
}) : /* @__PURE__ */ T(
|
|
5217
|
+
}) : /* @__PURE__ */ T(q, {
|
|
5154
5218
|
padding: "$md",
|
|
5155
5219
|
flex: 1,
|
|
5156
|
-
children: [/* @__PURE__ */ T(
|
|
5220
|
+
children: [/* @__PURE__ */ T(K, {
|
|
5157
5221
|
justifyContent: "space-between",
|
|
5158
5222
|
alignItems: "center",
|
|
5159
5223
|
marginBottom: "$md",
|
|
5160
5224
|
flexWrap: "wrap",
|
|
5161
5225
|
gap: "$sm",
|
|
5162
5226
|
children: [
|
|
5163
|
-
/* @__PURE__ */ T(
|
|
5227
|
+
/* @__PURE__ */ T(K, {
|
|
5164
5228
|
gap: "$sm",
|
|
5165
5229
|
children: [
|
|
5166
5230
|
/* @__PURE__ */ w(N, {
|
|
@@ -5188,7 +5252,7 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5188
5252
|
margin: 0,
|
|
5189
5253
|
children: k
|
|
5190
5254
|
}),
|
|
5191
|
-
/* @__PURE__ */ T(
|
|
5255
|
+
/* @__PURE__ */ T(K, {
|
|
5192
5256
|
gap: 0,
|
|
5193
5257
|
backgroundColor: "$backgroundSecondary",
|
|
5194
5258
|
borderRadius: "$sm",
|
|
@@ -5223,7 +5287,7 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5223
5287
|
]
|
|
5224
5288
|
})
|
|
5225
5289
|
]
|
|
5226
|
-
}), /* @__PURE__ */ T(
|
|
5290
|
+
}), /* @__PURE__ */ T(K, {
|
|
5227
5291
|
flexWrap: "wrap",
|
|
5228
5292
|
backgroundColor: "$borderColorMuted",
|
|
5229
5293
|
borderColor: "$borderColorMuted",
|
|
@@ -5232,7 +5296,7 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5232
5296
|
overflow: "hidden",
|
|
5233
5297
|
gap: 1,
|
|
5234
5298
|
children: [
|
|
5235
|
-
c !== "day" && A.map((e) => /* @__PURE__ */ w(
|
|
5299
|
+
c !== "day" && A.map((e) => /* @__PURE__ */ w(q, {
|
|
5236
5300
|
width: M,
|
|
5237
5301
|
padding: "$sm",
|
|
5238
5302
|
backgroundColor: "$backgroundSecondary",
|
|
@@ -5243,14 +5307,14 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5243
5307
|
children: e
|
|
5244
5308
|
})
|
|
5245
5309
|
}, e)),
|
|
5246
|
-
c === "month" && Array.from({ length: j }).map((e, t) => /* @__PURE__ */ w(
|
|
5310
|
+
c === "month" && Array.from({ length: j }).map((e, t) => /* @__PURE__ */ w(q, {
|
|
5247
5311
|
width: M,
|
|
5248
5312
|
backgroundColor: "rgba(0,0,0,0.02)",
|
|
5249
5313
|
minHeight: 80
|
|
5250
5314
|
}, `empty-${t}`)),
|
|
5251
5315
|
S.map((t) => {
|
|
5252
5316
|
let n = Zr(t), i = C[n] ?? [], l = n === Zr(/* @__PURE__ */ new Date());
|
|
5253
|
-
return /* @__PURE__ */ T(
|
|
5317
|
+
return /* @__PURE__ */ T(q, {
|
|
5254
5318
|
width: M,
|
|
5255
5319
|
backgroundColor: "$background",
|
|
5256
5320
|
minHeight: c === "month" ? 80 : 200,
|
|
@@ -5263,7 +5327,7 @@ function $r({ resource: e, config: t, filters: n }) {
|
|
|
5263
5327
|
marginBottom: "$xs",
|
|
5264
5328
|
children: t.getDate()
|
|
5265
5329
|
}),
|
|
5266
|
-
i.slice(0, P).map((t) => /* @__PURE__ */ w(
|
|
5330
|
+
i.slice(0, P).map((t) => /* @__PURE__ */ w(q, {
|
|
5267
5331
|
onPress: () => {
|
|
5268
5332
|
let n = s ? s(e, t.id, t) : null;
|
|
5269
5333
|
o(typeof n == "string" ? { to: n } : { to: `/app/${e}/detail/${t.id}` });
|
|
@@ -5327,7 +5391,7 @@ function ni(e) {
|
|
|
5327
5391
|
return w(an(e.resource, "GanttView") || ri, { ...e });
|
|
5328
5392
|
}
|
|
5329
5393
|
function ri({ resource: e, config: t, filters: n }) {
|
|
5330
|
-
let { t: r } = $("desk"), i = t.nameField ?? "name", a = t.startField, o = t.endField, s = t.progressField, c =
|
|
5394
|
+
let { t: r } = $("desk"), i = t.nameField ?? "name", a = t.startField, o = t.endField, s = t.progressField, c = he(), l = $t("resolveDetailRoute"), { result: u, query: d } = _e({
|
|
5331
5395
|
resource: e,
|
|
5332
5396
|
pagination: { pageSize: 100 },
|
|
5333
5397
|
sorters: [{
|
|
@@ -5385,31 +5449,31 @@ function ri({ resource: e, config: t, filters: n }) {
|
|
|
5385
5449
|
}
|
|
5386
5450
|
return e;
|
|
5387
5451
|
}, [_]);
|
|
5388
|
-
return d?.isLoading ? /* @__PURE__ */ w(
|
|
5452
|
+
return d?.isLoading ? /* @__PURE__ */ w(q, {
|
|
5389
5453
|
padding: "$xl",
|
|
5390
5454
|
children: /* @__PURE__ */ w(U, {
|
|
5391
5455
|
color: "$colorMuted",
|
|
5392
5456
|
children: r("Loading...")
|
|
5393
5457
|
})
|
|
5394
|
-
}) : f.length === 0 ? /* @__PURE__ */ w(
|
|
5458
|
+
}) : f.length === 0 ? /* @__PURE__ */ w(q, {
|
|
5395
5459
|
padding: "$xl",
|
|
5396
5460
|
children: /* @__PURE__ */ w(U, {
|
|
5397
5461
|
color: "$colorMuted",
|
|
5398
5462
|
children: r("No tasks to display")
|
|
5399
5463
|
})
|
|
5400
|
-
}) : /* @__PURE__ */ w(
|
|
5464
|
+
}) : /* @__PURE__ */ w(K, {
|
|
5401
5465
|
padding: "$md",
|
|
5402
5466
|
overflow: "scroll",
|
|
5403
5467
|
flex: 1,
|
|
5404
5468
|
width: "100%",
|
|
5405
|
-
children: /* @__PURE__ */ T(
|
|
5469
|
+
children: /* @__PURE__ */ T(K, {
|
|
5406
5470
|
minWidth: h * 30 + 200,
|
|
5407
|
-
children: [/* @__PURE__ */ T(
|
|
5471
|
+
children: [/* @__PURE__ */ T(q, {
|
|
5408
5472
|
width: 200,
|
|
5409
5473
|
flexShrink: 0,
|
|
5410
5474
|
borderRightWidth: 1,
|
|
5411
5475
|
borderColor: "$borderColor",
|
|
5412
|
-
children: [/* @__PURE__ */ w(
|
|
5476
|
+
children: [/* @__PURE__ */ w(q, {
|
|
5413
5477
|
height: 54,
|
|
5414
5478
|
padding: "$sm",
|
|
5415
5479
|
borderBottomWidth: 1,
|
|
@@ -5421,7 +5485,7 @@ function ri({ resource: e, config: t, filters: n }) {
|
|
|
5421
5485
|
fontSize: "$sm",
|
|
5422
5486
|
children: r("Task")
|
|
5423
5487
|
})
|
|
5424
|
-
}), f.map((t) => /* @__PURE__ */ w(
|
|
5488
|
+
}), f.map((t) => /* @__PURE__ */ w(q, {
|
|
5425
5489
|
onPress: () => {
|
|
5426
5490
|
let n = l ? l(e, t.id, t) : null;
|
|
5427
5491
|
c(typeof n == "string" ? { to: n } : { to: `/app/${e}/detail/${t.id}` });
|
|
@@ -5439,16 +5503,16 @@ function ri({ resource: e, config: t, filters: n }) {
|
|
|
5439
5503
|
children: String(t[i] ?? t.name)
|
|
5440
5504
|
})
|
|
5441
5505
|
}, t.id))]
|
|
5442
|
-
}), /* @__PURE__ */ T(
|
|
5506
|
+
}), /* @__PURE__ */ T(q, {
|
|
5443
5507
|
flex: 1,
|
|
5444
5508
|
overflow: "hidden",
|
|
5445
5509
|
children: [
|
|
5446
|
-
/* @__PURE__ */ w(
|
|
5510
|
+
/* @__PURE__ */ w(K, {
|
|
5447
5511
|
height: 24,
|
|
5448
5512
|
backgroundColor: "$backgroundSecondary",
|
|
5449
5513
|
borderBottomWidth: 1,
|
|
5450
5514
|
borderColor: "$borderColor",
|
|
5451
|
-
children: v.map((e, t) => /* @__PURE__ */ w(
|
|
5515
|
+
children: v.map((e, t) => /* @__PURE__ */ w(q, {
|
|
5452
5516
|
width: e.colSpan * 30,
|
|
5453
5517
|
flexShrink: 0,
|
|
5454
5518
|
borderRightWidth: 1,
|
|
@@ -5462,10 +5526,10 @@ function ri({ resource: e, config: t, filters: n }) {
|
|
|
5462
5526
|
})
|
|
5463
5527
|
}, t))
|
|
5464
5528
|
}),
|
|
5465
|
-
/* @__PURE__ */ w(
|
|
5529
|
+
/* @__PURE__ */ w(K, {
|
|
5466
5530
|
height: 30,
|
|
5467
5531
|
backgroundColor: "$backgroundSecondary",
|
|
5468
|
-
children: _.map((e, t) => /* @__PURE__ */ w(
|
|
5532
|
+
children: _.map((e, t) => /* @__PURE__ */ w(q, {
|
|
5469
5533
|
width: 30,
|
|
5470
5534
|
flexShrink: 0,
|
|
5471
5535
|
borderRightWidth: 1,
|
|
@@ -5481,21 +5545,21 @@ function ri({ resource: e, config: t, filters: n }) {
|
|
|
5481
5545
|
}),
|
|
5482
5546
|
f.map((e) => {
|
|
5483
5547
|
let t = new Date(String(e[a] ?? "")), n = new Date(String(e[o] ?? "")), r = ti(p, t), i = ti(t, n), c = s ? Number(e[s] ?? 0) : 0;
|
|
5484
|
-
return /* @__PURE__ */ T(
|
|
5548
|
+
return /* @__PURE__ */ T(q, {
|
|
5485
5549
|
height: 36,
|
|
5486
5550
|
position: "relative",
|
|
5487
5551
|
borderBottomWidth: 1,
|
|
5488
5552
|
borderColor: "rgba(0,0,0,0.05)",
|
|
5489
|
-
children: [/* @__PURE__ */ w(
|
|
5553
|
+
children: [/* @__PURE__ */ w(K, {
|
|
5490
5554
|
position: "absolute",
|
|
5491
5555
|
inset: 0,
|
|
5492
|
-
children: _.map((e, t) => /* @__PURE__ */ w(
|
|
5556
|
+
children: _.map((e, t) => /* @__PURE__ */ w(q, {
|
|
5493
5557
|
width: 30,
|
|
5494
5558
|
flexShrink: 0,
|
|
5495
5559
|
borderRightWidth: 1,
|
|
5496
5560
|
borderColor: "rgba(0,0,0,0.05)"
|
|
5497
5561
|
}, t))
|
|
5498
|
-
}), /* @__PURE__ */ w(
|
|
5562
|
+
}), /* @__PURE__ */ w(q, {
|
|
5499
5563
|
position: "absolute",
|
|
5500
5564
|
left: r * 30,
|
|
5501
5565
|
width: Math.max(i, 1) * 30,
|
|
@@ -5506,7 +5570,7 @@ function ri({ resource: e, config: t, filters: n }) {
|
|
|
5506
5570
|
borderColor: "$primary",
|
|
5507
5571
|
borderRadius: "$sm",
|
|
5508
5572
|
overflow: "hidden",
|
|
5509
|
-
children: s && /* @__PURE__ */ w(
|
|
5573
|
+
children: s && /* @__PURE__ */ w(q, {
|
|
5510
5574
|
height: "100%",
|
|
5511
5575
|
width: `${c}%`,
|
|
5512
5576
|
backgroundColor: "$primary",
|
|
@@ -5543,10 +5607,10 @@ function ai({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
|
|
|
5543
5607
|
let { t: c } = $("desk"), [l, u] = v(!1), [d, f] = v(!1), [m, h] = v(!1), g = i === e.id, _ = p((t) => {
|
|
5544
5608
|
f(!1), t !== e.label && n(e, t);
|
|
5545
5609
|
}, [e, n]), y = e.children.length > 0, b = "•";
|
|
5546
|
-
return y && (b = l ? "▶" : "▼"), /* @__PURE__ */ T(
|
|
5610
|
+
return y && (b = l ? "▶" : "▼"), /* @__PURE__ */ T(q, {
|
|
5547
5611
|
role: "treeitem",
|
|
5548
5612
|
"aria-expanded": y ? !l : void 0,
|
|
5549
|
-
children: [/* @__PURE__ */ T(
|
|
5613
|
+
children: [/* @__PURE__ */ T(K, {
|
|
5550
5614
|
draggable: !0,
|
|
5551
5615
|
onDragStart: (t) => {
|
|
5552
5616
|
t.stopPropagation(), a(e.id);
|
|
@@ -5613,7 +5677,7 @@ function ai({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
|
|
|
5613
5677
|
},
|
|
5614
5678
|
children: e.label
|
|
5615
5679
|
}),
|
|
5616
|
-
/* @__PURE__ */ T(
|
|
5680
|
+
/* @__PURE__ */ T(K, {
|
|
5617
5681
|
className: "tree-node-actions",
|
|
5618
5682
|
gap: "$xs",
|
|
5619
5683
|
children: [/* @__PURE__ */ w(N, {
|
|
@@ -5643,7 +5707,7 @@ function ai({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
|
|
|
5643
5707
|
})]
|
|
5644
5708
|
})
|
|
5645
5709
|
]
|
|
5646
|
-
}), !l && y && /* @__PURE__ */ w(
|
|
5710
|
+
}), !l && y && /* @__PURE__ */ w(q, {
|
|
5647
5711
|
role: "group",
|
|
5648
5712
|
children: e.children.map((e) => /* @__PURE__ */ w(ai, {
|
|
5649
5713
|
node: e,
|
|
@@ -5661,103 +5725,105 @@ function ai({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
|
|
|
5661
5725
|
function oi(e) {
|
|
5662
5726
|
return w(an(e.resource, "TreeView") || si, { ...e });
|
|
5663
5727
|
}
|
|
5664
|
-
function si({ resource: e, config: t,
|
|
5665
|
-
let { t:
|
|
5728
|
+
function si({ resource: e, config: t, schema: n, filters: r, onNodeClick: i }) {
|
|
5729
|
+
let { t: a } = $("desk"), o = t?.titleField || "title", s = t?.parentField || "parent_value", [c, l] = v(null), [u, d] = v(!1), f = he(), m = "name";
|
|
5730
|
+
t.orderField ? m = t.orderField : n?.properties && "lft" in n.properties && (m = "lft");
|
|
5731
|
+
let { result: h, query: _ } = _e({
|
|
5666
5732
|
resource: e,
|
|
5667
5733
|
pagination: { pageSize: 1e3 },
|
|
5668
5734
|
sorters: [{
|
|
5669
|
-
field:
|
|
5735
|
+
field: m,
|
|
5670
5736
|
order: "asc"
|
|
5671
5737
|
}],
|
|
5672
|
-
filters:
|
|
5673
|
-
}),
|
|
5738
|
+
filters: r
|
|
5739
|
+
}), y = h?.data ?? [], b = _?.isLoading ?? !1, x = _?.isError ?? !1, S = _?.refetch ?? (() => {}), { mutate: C } = Se(), { mutate: E } = de(), D = g(() => {
|
|
5674
5740
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
5675
|
-
return
|
|
5741
|
+
return y.forEach((t) => {
|
|
5676
5742
|
e.set(t.id, {
|
|
5677
5743
|
id: t.id,
|
|
5678
5744
|
name: t.name,
|
|
5679
|
-
label: String(t[
|
|
5745
|
+
label: String(t[o] || t.name || "Untitled"),
|
|
5680
5746
|
children: [],
|
|
5681
5747
|
raw: t
|
|
5682
5748
|
});
|
|
5683
|
-
}),
|
|
5684
|
-
let r = e.get(n.id), i = n[
|
|
5749
|
+
}), y.forEach((n) => {
|
|
5750
|
+
let r = e.get(n.id), i = n[s];
|
|
5685
5751
|
i && e.has(i) ? e.get(i).children.push(r) : t.push(r);
|
|
5686
5752
|
}), t;
|
|
5687
|
-
}, [
|
|
5688
|
-
if (!
|
|
5689
|
-
|
|
5753
|
+
}, [y, o]), O = p((t) => {
|
|
5754
|
+
if (!c || c === t?.id) {
|
|
5755
|
+
l(null);
|
|
5690
5756
|
return;
|
|
5691
5757
|
}
|
|
5692
|
-
|
|
5758
|
+
C({
|
|
5693
5759
|
resource: e,
|
|
5694
|
-
id:
|
|
5695
|
-
values: { [
|
|
5696
|
-
}, { onSuccess: () =>
|
|
5760
|
+
id: c,
|
|
5761
|
+
values: { [s]: t ? t.id : null }
|
|
5762
|
+
}, { onSuccess: () => S() }), l(null);
|
|
5697
5763
|
}, [
|
|
5698
|
-
|
|
5764
|
+
c,
|
|
5699
5765
|
e,
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
]),
|
|
5703
|
-
|
|
5766
|
+
C,
|
|
5767
|
+
S
|
|
5768
|
+
]), k = p((t) => {
|
|
5769
|
+
d(!1), t.trim() && E({
|
|
5704
5770
|
resource: e,
|
|
5705
5771
|
values: {
|
|
5706
|
-
[
|
|
5707
|
-
[
|
|
5772
|
+
[o]: t,
|
|
5773
|
+
[s]: null
|
|
5708
5774
|
}
|
|
5709
|
-
}, { onSuccess: () =>
|
|
5775
|
+
}, { onSuccess: () => S() });
|
|
5710
5776
|
}, [
|
|
5711
|
-
|
|
5777
|
+
E,
|
|
5712
5778
|
e,
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
]),
|
|
5716
|
-
|
|
5779
|
+
o,
|
|
5780
|
+
S
|
|
5781
|
+
]), A = p((t, n) => {
|
|
5782
|
+
C({
|
|
5717
5783
|
resource: e,
|
|
5718
5784
|
id: t.id,
|
|
5719
|
-
values: { [
|
|
5720
|
-
}, { onSuccess: () =>
|
|
5785
|
+
values: { [o]: n }
|
|
5786
|
+
}, { onSuccess: () => S() });
|
|
5721
5787
|
}, [
|
|
5722
|
-
|
|
5788
|
+
C,
|
|
5723
5789
|
e,
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
]),
|
|
5727
|
-
let n = JSON.stringify({ [
|
|
5728
|
-
|
|
5790
|
+
o,
|
|
5791
|
+
S
|
|
5792
|
+
]), j = p((t) => {
|
|
5793
|
+
let n = JSON.stringify({ [s]: t.id });
|
|
5794
|
+
f({
|
|
5729
5795
|
to: `/app/${e}/new`,
|
|
5730
5796
|
query: { form: n }
|
|
5731
5797
|
});
|
|
5732
5798
|
}, [
|
|
5733
|
-
|
|
5799
|
+
f,
|
|
5734
5800
|
e,
|
|
5735
|
-
|
|
5801
|
+
s
|
|
5736
5802
|
]);
|
|
5737
|
-
return
|
|
5803
|
+
return b ? /* @__PURE__ */ w(q, {
|
|
5738
5804
|
padding: "$lg",
|
|
5739
5805
|
children: /* @__PURE__ */ w(U, {
|
|
5740
5806
|
color: "$colorMuted",
|
|
5741
|
-
children:
|
|
5807
|
+
children: a("Loading tree...")
|
|
5742
5808
|
})
|
|
5743
|
-
}) :
|
|
5809
|
+
}) : x ? /* @__PURE__ */ T(q, {
|
|
5744
5810
|
padding: "$xl",
|
|
5745
5811
|
alignItems: "center",
|
|
5746
5812
|
children: [/* @__PURE__ */ w(U, {
|
|
5747
5813
|
color: "$error",
|
|
5748
|
-
children:
|
|
5814
|
+
children: a("Failed to load tree")
|
|
5749
5815
|
}), /* @__PURE__ */ w(N, {
|
|
5750
5816
|
variant: "ghost",
|
|
5751
|
-
onPress: () => void
|
|
5817
|
+
onPress: () => void S(),
|
|
5752
5818
|
marginTop: "$sm",
|
|
5753
|
-
children:
|
|
5819
|
+
children: a("Retry")
|
|
5754
5820
|
})]
|
|
5755
|
-
}) : /* @__PURE__ */ T(
|
|
5821
|
+
}) : /* @__PURE__ */ T(q, {
|
|
5756
5822
|
padding: "$md",
|
|
5757
5823
|
flex: 1,
|
|
5758
5824
|
width: "100%",
|
|
5759
5825
|
children: [
|
|
5760
|
-
/* @__PURE__ */ T(
|
|
5826
|
+
/* @__PURE__ */ T(K, {
|
|
5761
5827
|
alignItems: "center",
|
|
5762
5828
|
gap: "$sm",
|
|
5763
5829
|
marginBottom: "$sm",
|
|
@@ -5769,31 +5835,31 @@ function si({ resource: e, config: t, filters: n, onNodeClick: r }) {
|
|
|
5769
5835
|
children: e
|
|
5770
5836
|
}),
|
|
5771
5837
|
/* @__PURE__ */ w(N, {
|
|
5772
|
-
onPress: () =>
|
|
5838
|
+
onPress: () => d(!0),
|
|
5773
5839
|
size: "sm",
|
|
5774
|
-
children:
|
|
5840
|
+
children: a("+ Add Root Node")
|
|
5775
5841
|
}),
|
|
5776
5842
|
/* @__PURE__ */ w(N, {
|
|
5777
5843
|
variant: "ghost",
|
|
5778
|
-
onPress: () => void
|
|
5844
|
+
onPress: () => void S(),
|
|
5779
5845
|
size: "sm",
|
|
5780
5846
|
"aria-label": "Refresh tree",
|
|
5781
5847
|
children: "↺"
|
|
5782
5848
|
})
|
|
5783
5849
|
]
|
|
5784
5850
|
}),
|
|
5785
|
-
|
|
5851
|
+
u && /* @__PURE__ */ w(q, {
|
|
5786
5852
|
marginBottom: "$sm",
|
|
5787
5853
|
children: /* @__PURE__ */ w(ii, {
|
|
5788
5854
|
initialValue: "",
|
|
5789
|
-
onConfirm:
|
|
5790
|
-
onCancel: () =>
|
|
5855
|
+
onConfirm: k,
|
|
5856
|
+
onCancel: () => d(!1)
|
|
5791
5857
|
})
|
|
5792
5858
|
}),
|
|
5793
|
-
|
|
5859
|
+
c && /* @__PURE__ */ w(q, {
|
|
5794
5860
|
onDragOver: (e) => e.preventDefault(),
|
|
5795
5861
|
onDrop: () => {
|
|
5796
|
-
|
|
5862
|
+
O(null);
|
|
5797
5863
|
},
|
|
5798
5864
|
padding: "$sm",
|
|
5799
5865
|
marginBottom: "$sm",
|
|
@@ -5805,10 +5871,10 @@ function si({ resource: e, config: t, filters: n, onNodeClick: r }) {
|
|
|
5805
5871
|
children: /* @__PURE__ */ w(U, {
|
|
5806
5872
|
fontSize: "$xs",
|
|
5807
5873
|
color: "$primary",
|
|
5808
|
-
children:
|
|
5874
|
+
children: a("Drop here to make root-level")
|
|
5809
5875
|
})
|
|
5810
5876
|
}),
|
|
5811
|
-
|
|
5877
|
+
D.length === 0 ? /* @__PURE__ */ T(q, {
|
|
5812
5878
|
alignItems: "center",
|
|
5813
5879
|
padding: "$xl",
|
|
5814
5880
|
children: [/* @__PURE__ */ w(U, {
|
|
@@ -5817,20 +5883,20 @@ function si({ resource: e, config: t, filters: n, onNodeClick: r }) {
|
|
|
5817
5883
|
children: "🌳"
|
|
5818
5884
|
}), /* @__PURE__ */ w(U, {
|
|
5819
5885
|
color: "$colorMuted",
|
|
5820
|
-
children:
|
|
5886
|
+
children: a("No items yet. Click \"+ Add Root Node\" to get started.")
|
|
5821
5887
|
})]
|
|
5822
|
-
}) : /* @__PURE__ */ w(
|
|
5888
|
+
}) : /* @__PURE__ */ w(q, {
|
|
5823
5889
|
role: "tree",
|
|
5824
5890
|
"aria-label": `${e} tree`,
|
|
5825
|
-
children:
|
|
5891
|
+
children: D.map((e) => /* @__PURE__ */ w(ai, {
|
|
5826
5892
|
node: e,
|
|
5827
5893
|
depth: 0,
|
|
5828
|
-
onRename:
|
|
5829
|
-
onAddChild:
|
|
5830
|
-
dragNodeId:
|
|
5831
|
-
onDragStart:
|
|
5832
|
-
onDrop:
|
|
5833
|
-
onNodeClick:
|
|
5894
|
+
onRename: A,
|
|
5895
|
+
onAddChild: j,
|
|
5896
|
+
dragNodeId: c,
|
|
5897
|
+
onDragStart: l,
|
|
5898
|
+
onDrop: O,
|
|
5899
|
+
onNodeClick: i
|
|
5834
5900
|
}, e.id))
|
|
5835
5901
|
}),
|
|
5836
5902
|
/* @__PURE__ */ w("style", { children: "\n [draggable]:hover .tree-node-actions {\n opacity: 1 !important;\n }\n " })
|
|
@@ -5919,37 +5985,37 @@ function gi(e) {
|
|
|
5919
5985
|
default: return "text";
|
|
5920
5986
|
}
|
|
5921
5987
|
}
|
|
5922
|
-
function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows: i, setSelectedRows: a, searchQuery: o, setSearchQuery: s, appliedSearchQuery: c, applySearch: l, clearSearch: u, hasPendingSearchChanges: d, filterRows: f, appliedFilterRows: p, filterableFields: m, filterFieldMap: h, addFilterRow: _, removeFilterRow: y, removeAppliedFilterRow: b, clearFilterRows: x, clearAppliedFilters: S, applyFilters: E, hasPendingFilterChanges: D, updateFilterRow: O, listFilterSlotData: k, uiError: A, timeTravelError: j, isDeleteConfirmOpen: M, setIsDeleteConfirmOpen: F, isColumnsMenuOpen: I, setIsColumnsMenuOpen: B, isMobile: V, columnPreferences: W, toggleColumnVisibility:
|
|
5923
|
-
let { t:
|
|
5988
|
+
function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows: i, setSelectedRows: a, searchQuery: o, setSearchQuery: s, appliedSearchQuery: c, applySearch: l, clearSearch: u, hasPendingSearchChanges: d, filterRows: f, appliedFilterRows: p, filterableFields: m, filterFieldMap: h, addFilterRow: _, removeFilterRow: y, removeAppliedFilterRow: b, clearFilterRows: x, clearAppliedFilters: S, applyFilters: E, hasPendingFilterChanges: D, updateFilterRow: O, listFilterSlotData: k, uiError: A, timeTravelError: j, isDeleteConfirmOpen: M, setIsDeleteConfirmOpen: F, isColumnsMenuOpen: I, setIsColumnsMenuOpen: B, isMobile: V, columnPreferences: W, toggleColumnVisibility: re, activeView: G, setActiveView: ie, handleRowClick: J, canKanban: ae, canTree: oe, canGantt: se, title: ce, listColumns: le, tableColumns: ue, tableFilters: de, kanbanGroupField: fe, kanbanColumns: pe, kanbanTitleField: me, kanbanDescriptionField: he, detectedParentField: ge, detectedLabelField: _e, ganttConfig: ve, canCalendar: ye, calendarConfig: be, confirmBulkDelete: xe, handleBulkDelete: Se, hasLockedSelection: Ce, handleNew: we }) {
|
|
5989
|
+
let { t: Y } = $("desk"), Te = A ?? j, [Ee, X] = v(!1), [De, Oe] = v(!1), ke = o.trim().length > 0, Ae = c.trim().length > 0, je = g(() => p.filter((e) => fi(e)), [p]), Me = je.slice(0, 3), Ne = je.slice(3), Pe = [
|
|
5924
5990
|
{
|
|
5925
5991
|
key: "list",
|
|
5926
|
-
label:
|
|
5992
|
+
label: Y("List"),
|
|
5927
5993
|
enabled: !0
|
|
5928
5994
|
},
|
|
5929
5995
|
{
|
|
5930
5996
|
key: "kanban",
|
|
5931
|
-
label:
|
|
5932
|
-
enabled:
|
|
5997
|
+
label: Y("Kanban"),
|
|
5998
|
+
enabled: ae
|
|
5933
5999
|
},
|
|
5934
6000
|
{
|
|
5935
6001
|
key: "tree",
|
|
5936
|
-
label:
|
|
5937
|
-
enabled:
|
|
6002
|
+
label: Y("Tree"),
|
|
6003
|
+
enabled: oe
|
|
5938
6004
|
},
|
|
5939
6005
|
{
|
|
5940
6006
|
key: "gantt",
|
|
5941
|
-
label:
|
|
5942
|
-
enabled:
|
|
6007
|
+
label: Y("Gantt"),
|
|
6008
|
+
enabled: se
|
|
5943
6009
|
},
|
|
5944
6010
|
{
|
|
5945
6011
|
key: "calendar",
|
|
5946
|
-
label:
|
|
5947
|
-
enabled:
|
|
6012
|
+
label: Y("Calendar"),
|
|
6013
|
+
enabled: ye
|
|
5948
6014
|
}
|
|
5949
|
-
].filter((e) => e.enabled),
|
|
5950
|
-
value:
|
|
5951
|
-
onValueChange: (e) =>
|
|
5952
|
-
options:
|
|
6015
|
+
].filter((e) => e.enabled), Fe = /* @__PURE__ */ T(C, { children: [Pe.length > 1 && /* @__PURE__ */ w(ne, {
|
|
6016
|
+
value: G,
|
|
6017
|
+
onValueChange: (e) => ie(e),
|
|
6018
|
+
options: Pe.map((e) => ({
|
|
5953
6019
|
label: e.label,
|
|
5954
6020
|
value: e.key
|
|
5955
6021
|
})),
|
|
@@ -5960,14 +6026,14 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
5960
6026
|
variant: "primary",
|
|
5961
6027
|
size: "sm",
|
|
5962
6028
|
borderRadius: "$sm",
|
|
5963
|
-
onPress:
|
|
6029
|
+
onPress: we,
|
|
5964
6030
|
paddingHorizontal: V ? "$sm" : "$md",
|
|
5965
6031
|
children: [/* @__PURE__ */ w(R, {
|
|
5966
6032
|
name: "plus",
|
|
5967
6033
|
size: 14,
|
|
5968
6034
|
color: "#fff",
|
|
5969
6035
|
strokeWidth: 2.4
|
|
5970
|
-
}),
|
|
6036
|
+
}), Y("New")]
|
|
5971
6037
|
})] });
|
|
5972
6038
|
return t ? /* @__PURE__ */ w(Nr, {}) : n ? /* @__PURE__ */ w(H, {
|
|
5973
6039
|
padding: "$xl",
|
|
@@ -5976,7 +6042,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
5976
6042
|
children: /* @__PURE__ */ T(U, {
|
|
5977
6043
|
color: "$error",
|
|
5978
6044
|
children: [
|
|
5979
|
-
|
|
6045
|
+
Y("Error loading"),
|
|
5980
6046
|
" ",
|
|
5981
6047
|
e,
|
|
5982
6048
|
": ",
|
|
@@ -5993,12 +6059,12 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
5993
6059
|
/* @__PURE__ */ w(H, {
|
|
5994
6060
|
marginBottom: "$sm",
|
|
5995
6061
|
gap: "$sm",
|
|
5996
|
-
children: /* @__PURE__ */ T(
|
|
6062
|
+
children: /* @__PURE__ */ T(K, {
|
|
5997
6063
|
justifyContent: "space-between",
|
|
5998
6064
|
alignItems: V ? "flex-start" : "center",
|
|
5999
6065
|
gap: "$md",
|
|
6000
6066
|
flexDirection: V ? "column" : "row",
|
|
6001
|
-
children: [/* @__PURE__ */ T(
|
|
6067
|
+
children: [/* @__PURE__ */ T(K, {
|
|
6002
6068
|
gap: "$sm",
|
|
6003
6069
|
flex: 1,
|
|
6004
6070
|
minWidth: 0,
|
|
@@ -6006,7 +6072,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6006
6072
|
justifyContent: "space-between",
|
|
6007
6073
|
alignItems: "center",
|
|
6008
6074
|
overflow: "visible",
|
|
6009
|
-
children: [/* @__PURE__ */ w(
|
|
6075
|
+
children: [/* @__PURE__ */ w(q, {
|
|
6010
6076
|
flex: 1,
|
|
6011
6077
|
minWidth: 0,
|
|
6012
6078
|
flexShrink: 1,
|
|
@@ -6015,15 +6081,15 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6015
6081
|
margin: 0,
|
|
6016
6082
|
color: "$color",
|
|
6017
6083
|
numberOfLines: 1,
|
|
6018
|
-
children:
|
|
6084
|
+
children: ce
|
|
6019
6085
|
})
|
|
6020
|
-
}), V && /* @__PURE__ */ w(
|
|
6086
|
+
}), V && /* @__PURE__ */ w(K, {
|
|
6021
6087
|
gap: "$xs",
|
|
6022
6088
|
alignItems: "center",
|
|
6023
6089
|
flexShrink: 0,
|
|
6024
|
-
children:
|
|
6090
|
+
children: Fe
|
|
6025
6091
|
})]
|
|
6026
|
-
}), /* @__PURE__ */ T(
|
|
6092
|
+
}), /* @__PURE__ */ T(K, {
|
|
6027
6093
|
gap: "$sm",
|
|
6028
6094
|
alignItems: "center",
|
|
6029
6095
|
flexWrap: "wrap",
|
|
@@ -6032,11 +6098,11 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6032
6098
|
children: [/* @__PURE__ */ w(Sr, {
|
|
6033
6099
|
name: "list-header-actions",
|
|
6034
6100
|
doctype: e
|
|
6035
|
-
}), !V &&
|
|
6101
|
+
}), !V && Fe]
|
|
6036
6102
|
})]
|
|
6037
6103
|
})
|
|
6038
6104
|
}),
|
|
6039
|
-
|
|
6105
|
+
Te && /* @__PURE__ */ w(P, {
|
|
6040
6106
|
marginBottom: "$md",
|
|
6041
6107
|
padding: "$md",
|
|
6042
6108
|
backgroundColor: "$backgroundSecondary",
|
|
@@ -6045,7 +6111,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6045
6111
|
borderColor: "$error",
|
|
6046
6112
|
children: /* @__PURE__ */ w(U, {
|
|
6047
6113
|
color: "$error",
|
|
6048
|
-
children:
|
|
6114
|
+
children: Te
|
|
6049
6115
|
})
|
|
6050
6116
|
}),
|
|
6051
6117
|
/* @__PURE__ */ w(P, {
|
|
@@ -6059,18 +6125,18 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6059
6125
|
children: /* @__PURE__ */ T(H, {
|
|
6060
6126
|
gap: "$sm",
|
|
6061
6127
|
children: [
|
|
6062
|
-
/* @__PURE__ */ T(
|
|
6128
|
+
/* @__PURE__ */ T(K, {
|
|
6063
6129
|
gap: "$sm",
|
|
6064
6130
|
alignItems: "center",
|
|
6065
6131
|
flexWrap: "wrap",
|
|
6066
6132
|
justifyContent: "space-between",
|
|
6067
|
-
children: [/* @__PURE__ */ T(
|
|
6133
|
+
children: [/* @__PURE__ */ T(K, {
|
|
6068
6134
|
position: "relative",
|
|
6069
6135
|
alignItems: "center",
|
|
6070
6136
|
flex: 1,
|
|
6071
6137
|
width: V ? "100%" : void 0,
|
|
6072
6138
|
children: [
|
|
6073
|
-
/* @__PURE__ */ w(
|
|
6139
|
+
/* @__PURE__ */ w(K, {
|
|
6074
6140
|
position: "absolute",
|
|
6075
6141
|
left: 10,
|
|
6076
6142
|
zIndex: 10,
|
|
@@ -6082,8 +6148,8 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6082
6148
|
})
|
|
6083
6149
|
}),
|
|
6084
6150
|
/* @__PURE__ */ w(z, {
|
|
6085
|
-
"aria-label": `${
|
|
6086
|
-
placeholder: `Search ${(
|
|
6151
|
+
"aria-label": `${ce} search`,
|
|
6152
|
+
placeholder: `Search ${(ce || "").toLowerCase()}...`,
|
|
6087
6153
|
value: o,
|
|
6088
6154
|
onChangeText: s,
|
|
6089
6155
|
onKeyDown: (e) => {
|
|
@@ -6095,13 +6161,13 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6095
6161
|
paddingLeft: 36,
|
|
6096
6162
|
paddingRight: 72
|
|
6097
6163
|
}),
|
|
6098
|
-
/* @__PURE__ */ T(
|
|
6164
|
+
/* @__PURE__ */ T(K, {
|
|
6099
6165
|
position: "absolute",
|
|
6100
6166
|
right: 4,
|
|
6101
6167
|
zIndex: 10,
|
|
6102
6168
|
alignItems: "center",
|
|
6103
6169
|
gap: "$1",
|
|
6104
|
-
children: [(
|
|
6170
|
+
children: [(ke || Ae) && /* @__PURE__ */ w(N, {
|
|
6105
6171
|
variant: "ghost",
|
|
6106
6172
|
size: "sm",
|
|
6107
6173
|
borderRadius: "$round",
|
|
@@ -6134,36 +6200,36 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6134
6200
|
})]
|
|
6135
6201
|
})
|
|
6136
6202
|
]
|
|
6137
|
-
}), /* @__PURE__ */ T(
|
|
6203
|
+
}), /* @__PURE__ */ T(K, {
|
|
6138
6204
|
gap: "$sm",
|
|
6139
6205
|
alignItems: "center",
|
|
6140
6206
|
flexWrap: "wrap",
|
|
6141
6207
|
width: V ? "100%" : void 0,
|
|
6142
6208
|
children: [
|
|
6143
6209
|
/* @__PURE__ */ T(N, {
|
|
6144
|
-
variant:
|
|
6210
|
+
variant: Ee || je.length > 0 ? "primary" : "ghost",
|
|
6145
6211
|
size: "sm",
|
|
6146
6212
|
borderWidth: 1,
|
|
6147
|
-
borderColor:
|
|
6213
|
+
borderColor: Ee ? "$primary" : "$borderColorMuted",
|
|
6148
6214
|
borderRadius: V ? "$sm" : "$md",
|
|
6149
6215
|
flex: V ? 1 : void 0,
|
|
6150
6216
|
onPress: () => {
|
|
6151
|
-
!
|
|
6217
|
+
!Ee && f.length === 0 && _(), X((e) => !e);
|
|
6152
6218
|
},
|
|
6153
6219
|
children: [
|
|
6154
6220
|
/* @__PURE__ */ w(R, {
|
|
6155
6221
|
name: "filter",
|
|
6156
6222
|
size: 14,
|
|
6157
|
-
color:
|
|
6223
|
+
color: Ee || je.length > 0 ? "#fff" : "$color"
|
|
6158
6224
|
}),
|
|
6159
|
-
!V &&
|
|
6160
|
-
|
|
6225
|
+
!V && Y("Filter"),
|
|
6226
|
+
je.length > 0 ? ` (${je.length})` : "",
|
|
6161
6227
|
/* @__PURE__ */ w(R, {
|
|
6162
|
-
name:
|
|
6228
|
+
name: Ee ? "x" : "chevron-down",
|
|
6163
6229
|
size: 13,
|
|
6164
|
-
color:
|
|
6230
|
+
color: Ee || je.length > 0 ? "#fff" : "$colorMuted"
|
|
6165
6231
|
}),
|
|
6166
|
-
V ? "" : ` (${
|
|
6232
|
+
V ? "" : ` (${je.length})`
|
|
6167
6233
|
]
|
|
6168
6234
|
}),
|
|
6169
6235
|
/* @__PURE__ */ w(H, {
|
|
@@ -6184,14 +6250,14 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6184
6250
|
name: "columns-3",
|
|
6185
6251
|
size: 14,
|
|
6186
6252
|
color: "$color"
|
|
6187
|
-
}), !V &&
|
|
6253
|
+
}), !V && Y("Columns")]
|
|
6188
6254
|
}),
|
|
6189
6255
|
content: /* @__PURE__ */ w(H, {
|
|
6190
6256
|
gap: "$sm",
|
|
6191
6257
|
minWidth: 180,
|
|
6192
|
-
children:
|
|
6258
|
+
children: le.map((e) => {
|
|
6193
6259
|
let t = W.visibility[e.field] !== !1, n = e.label ?? e.title ?? e.field;
|
|
6194
|
-
return /* @__PURE__ */ T(
|
|
6260
|
+
return /* @__PURE__ */ T(K, {
|
|
6195
6261
|
gap: "$sm",
|
|
6196
6262
|
alignItems: "center",
|
|
6197
6263
|
children: [/* @__PURE__ */ w(z, {
|
|
@@ -6207,7 +6273,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6207
6273
|
cursor: "pointer",
|
|
6208
6274
|
accentColor: "#8b5cf6"
|
|
6209
6275
|
},
|
|
6210
|
-
onChange: () =>
|
|
6276
|
+
onChange: () => re(e.field)
|
|
6211
6277
|
}), /* @__PURE__ */ w(U, {
|
|
6212
6278
|
fontWeight: "600",
|
|
6213
6279
|
fontSize: "$sm",
|
|
@@ -6226,14 +6292,14 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6226
6292
|
borderRadius: V ? "$sm" : "$md",
|
|
6227
6293
|
flex: V ? 1 : void 0,
|
|
6228
6294
|
onPress: () => {
|
|
6229
|
-
u(), S(),
|
|
6295
|
+
u(), S(), X(!1), B(!1);
|
|
6230
6296
|
},
|
|
6231
|
-
disabled: f.length === 0 && p.length === 0 && !
|
|
6297
|
+
disabled: f.length === 0 && p.length === 0 && !ke && !Ae,
|
|
6232
6298
|
children: [/* @__PURE__ */ w(R, {
|
|
6233
6299
|
name: "rotate-ccw",
|
|
6234
6300
|
size: 13,
|
|
6235
6301
|
color: "$colorMuted"
|
|
6236
|
-
}), !V &&
|
|
6302
|
+
}), !V && Y("Reset")]
|
|
6237
6303
|
}),
|
|
6238
6304
|
/* @__PURE__ */ w(Sr, {
|
|
6239
6305
|
name: "list-filters",
|
|
@@ -6243,7 +6309,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6243
6309
|
]
|
|
6244
6310
|
})]
|
|
6245
6311
|
}),
|
|
6246
|
-
|
|
6312
|
+
Ee && /* @__PURE__ */ w(H, {
|
|
6247
6313
|
marginTop: "$xs",
|
|
6248
6314
|
paddingTop: "$sm",
|
|
6249
6315
|
borderTopWidth: 1,
|
|
@@ -6260,30 +6326,30 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6260
6326
|
children: /* @__PURE__ */ w(U, {
|
|
6261
6327
|
color: "$colorMuted",
|
|
6262
6328
|
fontSize: "$sm",
|
|
6263
|
-
children:
|
|
6329
|
+
children: Y("No filters added.")
|
|
6264
6330
|
})
|
|
6265
|
-
}) : /* @__PURE__ */ w(
|
|
6331
|
+
}) : /* @__PURE__ */ w(q, {
|
|
6266
6332
|
paddingRight: "$xs",
|
|
6267
6333
|
gap: "$sm",
|
|
6268
6334
|
children: f.map((e, t) => {
|
|
6269
6335
|
let n = h[e.field], r = n?.type === "boolean" ? [
|
|
6270
6336
|
{
|
|
6271
|
-
label:
|
|
6337
|
+
label: Y("Choose value"),
|
|
6272
6338
|
value: ""
|
|
6273
6339
|
},
|
|
6274
6340
|
{
|
|
6275
|
-
label:
|
|
6341
|
+
label: Y("True"),
|
|
6276
6342
|
value: "true"
|
|
6277
6343
|
},
|
|
6278
6344
|
{
|
|
6279
|
-
label:
|
|
6345
|
+
label: Y("False"),
|
|
6280
6346
|
value: "false"
|
|
6281
6347
|
}
|
|
6282
6348
|
] : [{
|
|
6283
|
-
label:
|
|
6349
|
+
label: Y("Choose value"),
|
|
6284
6350
|
value: ""
|
|
6285
6351
|
}, ...n?.options ?? []], i = li(n?.type), a = ci.filter((e) => i.includes(e.value));
|
|
6286
|
-
return /* @__PURE__ */ T(
|
|
6352
|
+
return /* @__PURE__ */ T(K, {
|
|
6287
6353
|
gap: "$sm",
|
|
6288
6354
|
alignItems: "center",
|
|
6289
6355
|
flexDirection: V ? "column" : "row",
|
|
@@ -6322,7 +6388,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6322
6388
|
onChange: (t) => O(e.id, { value: ui(t) ?? "" })
|
|
6323
6389
|
}) : /* @__PURE__ */ w(z, {
|
|
6324
6390
|
"aria-label": `Filter value ${t + 1}`,
|
|
6325
|
-
placeholder:
|
|
6391
|
+
placeholder: Y("Value"),
|
|
6326
6392
|
type: gi(n),
|
|
6327
6393
|
value: e.value,
|
|
6328
6394
|
onChangeText: (t) => O(e.id, { value: t }),
|
|
@@ -6352,7 +6418,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6352
6418
|
height: 1,
|
|
6353
6419
|
backgroundColor: "$borderColorMuted"
|
|
6354
6420
|
}),
|
|
6355
|
-
/* @__PURE__ */ T(
|
|
6421
|
+
/* @__PURE__ */ T(K, {
|
|
6356
6422
|
gap: "$sm",
|
|
6357
6423
|
alignItems: "center",
|
|
6358
6424
|
justifyContent: "space-between",
|
|
@@ -6361,8 +6427,8 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6361
6427
|
variant: "ghost",
|
|
6362
6428
|
size: "sm",
|
|
6363
6429
|
onPress: _,
|
|
6364
|
-
children:
|
|
6365
|
-
}), /* @__PURE__ */ T(
|
|
6430
|
+
children: Y("+ Add a Filter")
|
|
6431
|
+
}), /* @__PURE__ */ T(K, {
|
|
6366
6432
|
gap: "$sm",
|
|
6367
6433
|
flexWrap: "wrap",
|
|
6368
6434
|
justifyContent: "flex-end",
|
|
@@ -6374,39 +6440,39 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6374
6440
|
borderRadius: "$sm",
|
|
6375
6441
|
onPress: x,
|
|
6376
6442
|
disabled: f.length === 0,
|
|
6377
|
-
children:
|
|
6443
|
+
children: Y("Clear Filters")
|
|
6378
6444
|
}), /* @__PURE__ */ w(N, {
|
|
6379
6445
|
variant: "primary",
|
|
6380
6446
|
size: "sm",
|
|
6381
6447
|
borderRadius: "$sm",
|
|
6382
6448
|
onPress: () => {
|
|
6383
|
-
E(),
|
|
6449
|
+
E(), X(!1);
|
|
6384
6450
|
},
|
|
6385
6451
|
disabled: !D,
|
|
6386
|
-
children:
|
|
6452
|
+
children: Y("Apply Filters")
|
|
6387
6453
|
})]
|
|
6388
6454
|
})]
|
|
6389
6455
|
})
|
|
6390
6456
|
]
|
|
6391
6457
|
})
|
|
6392
6458
|
}),
|
|
6393
|
-
(
|
|
6459
|
+
(Ae || je.length > 0) && /* @__PURE__ */ T(K, {
|
|
6394
6460
|
gap: "$sm",
|
|
6395
6461
|
alignItems: "center",
|
|
6396
6462
|
flexWrap: "wrap",
|
|
6397
6463
|
children: [
|
|
6398
|
-
|
|
6464
|
+
Ae && /* @__PURE__ */ w(P, {
|
|
6399
6465
|
padding: "$sm",
|
|
6400
6466
|
borderWidth: 1,
|
|
6401
6467
|
borderColor: "$borderColorMuted",
|
|
6402
6468
|
backgroundColor: "$background",
|
|
6403
|
-
children: /* @__PURE__ */ T(
|
|
6469
|
+
children: /* @__PURE__ */ T(K, {
|
|
6404
6470
|
gap: "$sm",
|
|
6405
6471
|
alignItems: "center",
|
|
6406
6472
|
children: [/* @__PURE__ */ T(U, {
|
|
6407
6473
|
fontSize: "$sm",
|
|
6408
6474
|
children: [
|
|
6409
|
-
|
|
6475
|
+
Y("Search:"),
|
|
6410
6476
|
" ",
|
|
6411
6477
|
c.trim()
|
|
6412
6478
|
]
|
|
@@ -6419,12 +6485,12 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6419
6485
|
})]
|
|
6420
6486
|
})
|
|
6421
6487
|
}),
|
|
6422
|
-
|
|
6488
|
+
Me.map((e) => /* @__PURE__ */ w(P, {
|
|
6423
6489
|
padding: "$sm",
|
|
6424
6490
|
borderWidth: 1,
|
|
6425
6491
|
borderColor: "$borderColorMuted",
|
|
6426
6492
|
backgroundColor: "$background",
|
|
6427
|
-
children: /* @__PURE__ */ T(
|
|
6493
|
+
children: /* @__PURE__ */ T(K, {
|
|
6428
6494
|
gap: "$sm",
|
|
6429
6495
|
alignItems: "center",
|
|
6430
6496
|
children: [/* @__PURE__ */ w(U, {
|
|
@@ -6439,17 +6505,17 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6439
6505
|
})]
|
|
6440
6506
|
})
|
|
6441
6507
|
}, `filter-pill-${e.id}`)),
|
|
6442
|
-
|
|
6508
|
+
Ne.length > 0 && /* @__PURE__ */ T(N, {
|
|
6443
6509
|
variant: "ghost",
|
|
6444
6510
|
size: "sm",
|
|
6445
6511
|
borderWidth: 1,
|
|
6446
6512
|
borderColor: "$borderColorMuted",
|
|
6447
|
-
onPress: () =>
|
|
6513
|
+
onPress: () => Oe(!0),
|
|
6448
6514
|
children: [
|
|
6449
6515
|
"+",
|
|
6450
|
-
|
|
6516
|
+
Ne.length,
|
|
6451
6517
|
" ",
|
|
6452
|
-
|
|
6518
|
+
Y("more")
|
|
6453
6519
|
]
|
|
6454
6520
|
})
|
|
6455
6521
|
]
|
|
@@ -6457,7 +6523,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6457
6523
|
]
|
|
6458
6524
|
})
|
|
6459
6525
|
}),
|
|
6460
|
-
|
|
6526
|
+
G === "list" && /* @__PURE__ */ T(C, { children: [
|
|
6461
6527
|
/* @__PURE__ */ w(Sr, {
|
|
6462
6528
|
name: "list-above-table",
|
|
6463
6529
|
doctype: e
|
|
@@ -6473,7 +6539,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6473
6539
|
children: /* @__PURE__ */ T(H, {
|
|
6474
6540
|
gap: "$sm",
|
|
6475
6541
|
flex: 1,
|
|
6476
|
-
children: [i.length > 0 && /* @__PURE__ */ w(
|
|
6542
|
+
children: [i.length > 0 && /* @__PURE__ */ w(K, {
|
|
6477
6543
|
justifyContent: "flex-end",
|
|
6478
6544
|
children: /* @__PURE__ */ w(P, {
|
|
6479
6545
|
padding: "$sm",
|
|
@@ -6481,7 +6547,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6481
6547
|
borderColor: "$primary",
|
|
6482
6548
|
backgroundColor: "$backgroundSecondary",
|
|
6483
6549
|
minWidth: V ? "100%" : 240,
|
|
6484
|
-
children: /* @__PURE__ */ T(
|
|
6550
|
+
children: /* @__PURE__ */ T(K, {
|
|
6485
6551
|
gap: "$sm",
|
|
6486
6552
|
alignItems: V ? "flex-start" : "center",
|
|
6487
6553
|
flexDirection: V ? "column" : "row",
|
|
@@ -6491,29 +6557,29 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6491
6557
|
children: [
|
|
6492
6558
|
i.length,
|
|
6493
6559
|
" ",
|
|
6494
|
-
|
|
6560
|
+
Y("selected")
|
|
6495
6561
|
]
|
|
6496
|
-
}), /* @__PURE__ */ T(
|
|
6562
|
+
}), /* @__PURE__ */ T(K, {
|
|
6497
6563
|
gap: "$sm",
|
|
6498
6564
|
flexWrap: "wrap",
|
|
6499
6565
|
children: [/* @__PURE__ */ w(N, {
|
|
6500
6566
|
variant: "primary",
|
|
6501
6567
|
size: "sm",
|
|
6502
6568
|
backgroundColor: "$error",
|
|
6503
|
-
onPress:
|
|
6504
|
-
disabled:
|
|
6505
|
-
opacity:
|
|
6506
|
-
children:
|
|
6569
|
+
onPress: Se,
|
|
6570
|
+
disabled: Ce,
|
|
6571
|
+
opacity: Ce ? .5 : 1,
|
|
6572
|
+
children: Y(Ce ? "Cannot Delete Locked" : "Delete")
|
|
6507
6573
|
}), /* @__PURE__ */ w(N, {
|
|
6508
6574
|
variant: "ghost",
|
|
6509
6575
|
size: "sm",
|
|
6510
6576
|
onPress: () => a([]),
|
|
6511
|
-
children:
|
|
6577
|
+
children: Y("Clear")
|
|
6512
6578
|
})]
|
|
6513
6579
|
})]
|
|
6514
6580
|
})
|
|
6515
6581
|
})
|
|
6516
|
-
}), /* @__PURE__ */ w(
|
|
6582
|
+
}), /* @__PURE__ */ w(K, {
|
|
6517
6583
|
width: "100%",
|
|
6518
6584
|
flex: 1,
|
|
6519
6585
|
alignItems: "stretch",
|
|
@@ -6521,12 +6587,12 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6521
6587
|
children: /* @__PURE__ */ w(ar, {
|
|
6522
6588
|
resource: e,
|
|
6523
6589
|
schema: r,
|
|
6524
|
-
columns:
|
|
6525
|
-
filters:
|
|
6590
|
+
columns: ue,
|
|
6591
|
+
filters: de,
|
|
6526
6592
|
enableSelection: !0,
|
|
6527
6593
|
onSelectionChange: a,
|
|
6528
6594
|
selectedRows: i,
|
|
6529
|
-
onRowClick:
|
|
6595
|
+
onRowClick: J
|
|
6530
6596
|
})
|
|
6531
6597
|
})]
|
|
6532
6598
|
})
|
|
@@ -6537,31 +6603,31 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6537
6603
|
})
|
|
6538
6604
|
] }),
|
|
6539
6605
|
/* @__PURE__ */ w(ee, {
|
|
6540
|
-
isOpen:
|
|
6541
|
-
onClose: () =>
|
|
6606
|
+
isOpen: De,
|
|
6607
|
+
onClose: () => Oe(!1),
|
|
6542
6608
|
title: "Active filters",
|
|
6543
6609
|
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(N, {
|
|
6544
6610
|
variant: "ghost",
|
|
6545
6611
|
onPress: () => {
|
|
6546
|
-
S(),
|
|
6612
|
+
S(), Oe(!1), X(!1);
|
|
6547
6613
|
},
|
|
6548
|
-
children:
|
|
6614
|
+
children: Y("Clear filters")
|
|
6549
6615
|
}), /* @__PURE__ */ w(N, {
|
|
6550
6616
|
variant: "primary",
|
|
6551
6617
|
onPress: () => {
|
|
6552
|
-
|
|
6618
|
+
Oe(!1), X(!0);
|
|
6553
6619
|
},
|
|
6554
|
-
children:
|
|
6620
|
+
children: Y("Manage filters")
|
|
6555
6621
|
})] }),
|
|
6556
6622
|
children: /* @__PURE__ */ w(H, {
|
|
6557
6623
|
gap: "$sm",
|
|
6558
6624
|
padding: "$md",
|
|
6559
|
-
children:
|
|
6625
|
+
children: je.map((e) => /* @__PURE__ */ w(P, {
|
|
6560
6626
|
padding: "$sm",
|
|
6561
6627
|
borderWidth: 1,
|
|
6562
6628
|
borderColor: "$borderColor",
|
|
6563
6629
|
backgroundColor: "$background",
|
|
6564
|
-
children: /* @__PURE__ */ T(
|
|
6630
|
+
children: /* @__PURE__ */ T(K, {
|
|
6565
6631
|
justifyContent: "space-between",
|
|
6566
6632
|
alignItems: "center",
|
|
6567
6633
|
gap: "$sm",
|
|
@@ -6576,37 +6642,38 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6576
6642
|
}, `overflow-filter-${e.id}`))
|
|
6577
6643
|
})
|
|
6578
6644
|
}),
|
|
6579
|
-
|
|
6645
|
+
G === "kanban" && ae && fe && /* @__PURE__ */ w(Yr, {
|
|
6580
6646
|
resource: e,
|
|
6581
6647
|
config: {
|
|
6582
|
-
groupField:
|
|
6583
|
-
columns:
|
|
6584
|
-
titleField:
|
|
6585
|
-
descriptionField:
|
|
6648
|
+
groupField: fe,
|
|
6649
|
+
columns: pe,
|
|
6650
|
+
titleField: me,
|
|
6651
|
+
descriptionField: he
|
|
6586
6652
|
},
|
|
6587
|
-
filters:
|
|
6653
|
+
filters: de
|
|
6588
6654
|
}),
|
|
6589
|
-
|
|
6655
|
+
G === "tree" && oe && ge && /* @__PURE__ */ w(oi, {
|
|
6590
6656
|
resource: e,
|
|
6657
|
+
schema: r,
|
|
6591
6658
|
config: {
|
|
6592
|
-
parentField:
|
|
6593
|
-
labelField:
|
|
6659
|
+
parentField: ge,
|
|
6660
|
+
labelField: _e,
|
|
6594
6661
|
allowReparent: !0,
|
|
6595
6662
|
allowAddChild: !0,
|
|
6596
6663
|
allowRename: !0
|
|
6597
6664
|
},
|
|
6598
|
-
filters:
|
|
6599
|
-
onNodeClick:
|
|
6665
|
+
filters: de,
|
|
6666
|
+
onNodeClick: J
|
|
6600
6667
|
}),
|
|
6601
|
-
|
|
6668
|
+
G === "gantt" && se && ve && /* @__PURE__ */ w(ni, {
|
|
6602
6669
|
resource: e,
|
|
6603
|
-
config:
|
|
6604
|
-
filters:
|
|
6670
|
+
config: ve,
|
|
6671
|
+
filters: de
|
|
6605
6672
|
}),
|
|
6606
|
-
|
|
6673
|
+
G === "calendar" && ye && be && /* @__PURE__ */ w(Qr, {
|
|
6607
6674
|
resource: e,
|
|
6608
|
-
config:
|
|
6609
|
-
filters:
|
|
6675
|
+
config: be,
|
|
6676
|
+
filters: de
|
|
6610
6677
|
}),
|
|
6611
6678
|
/* @__PURE__ */ w(sr, {
|
|
6612
6679
|
open: M,
|
|
@@ -6616,7 +6683,7 @@ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
|
|
|
6616
6683
|
cancelLabel: "Cancel",
|
|
6617
6684
|
destructive: !0,
|
|
6618
6685
|
onConfirm: () => {
|
|
6619
|
-
|
|
6686
|
+
xe().catch(() => void 0);
|
|
6620
6687
|
},
|
|
6621
6688
|
onCancel: () => F(!1)
|
|
6622
6689
|
})
|
|
@@ -6689,7 +6756,7 @@ function yi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsIn
|
|
|
6689
6756
|
children: [/* @__PURE__ */ w(U, {
|
|
6690
6757
|
size: "$sm",
|
|
6691
6758
|
children: o("Correction Strategy")
|
|
6692
|
-
}), /* @__PURE__ */ w(
|
|
6759
|
+
}), /* @__PURE__ */ w(K, {
|
|
6693
6760
|
gap: "$sm",
|
|
6694
6761
|
flexWrap: "wrap",
|
|
6695
6762
|
children: b.map((e) => {
|
|
@@ -6734,7 +6801,7 @@ function yi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsIn
|
|
|
6734
6801
|
size: "$sm",
|
|
6735
6802
|
children: y
|
|
6736
6803
|
}),
|
|
6737
|
-
/* @__PURE__ */ T(
|
|
6804
|
+
/* @__PURE__ */ T(K, {
|
|
6738
6805
|
justifyContent: "flex-end",
|
|
6739
6806
|
gap: "$sm",
|
|
6740
6807
|
marginTop: "$sm",
|
|
@@ -6758,7 +6825,7 @@ function yi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsIn
|
|
|
6758
6825
|
//#endregion
|
|
6759
6826
|
//#region src/components/correction/CorrectButton.tsx
|
|
6760
6827
|
function bi({ doctype: e, id: t, docstatus: n, supportsInPlaceEdit: r }) {
|
|
6761
|
-
let { t: i } = $("desk"), [a, o] = v(!1), s =
|
|
6828
|
+
let { t: i } = $("desk"), [a, o] = v(!1), s = Ne(), c = p((t) => {
|
|
6762
6829
|
let n = t.id;
|
|
6763
6830
|
(typeof n == "string" || typeof n == "number") && s(`/app/${e}/detail/${n}`), o(!1);
|
|
6764
6831
|
}, [e, s]);
|
|
@@ -6781,7 +6848,7 @@ function xi(e) {
|
|
|
6781
6848
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
6782
6849
|
}
|
|
6783
6850
|
function Si({ sibling: e, parentId: t, onSaved: n }) {
|
|
6784
|
-
let { t: r } = $("desk"), i =
|
|
6851
|
+
let { t: r } = $("desk"), i = de(), a = Se(), { schema: o } = Lt(e.doctype), [s, c] = v(() => xi(e.initial_data));
|
|
6785
6852
|
return /* @__PURE__ */ T(P, {
|
|
6786
6853
|
padding: "$md",
|
|
6787
6854
|
borderWidth: 1,
|
|
@@ -6900,7 +6967,7 @@ var wi = [
|
|
|
6900
6967
|
}
|
|
6901
6968
|
];
|
|
6902
6969
|
function Ti({ open: e, onClose: t }) {
|
|
6903
|
-
let { t: n } = $("desk"), [r, i] = v(""), [a, o] = v(0), [s, c] = v([]), l = _(null), u =
|
|
6970
|
+
let { t: n } = $("desk"), [r, i] = v(""), [a, o] = v(0), [s, c] = v([]), l = _(null), u = he(), d = Mt();
|
|
6904
6971
|
h(() => {
|
|
6905
6972
|
async function t() {
|
|
6906
6973
|
try {
|
|
@@ -6926,7 +6993,7 @@ function Ti({ open: e, onClose: t }) {
|
|
|
6926
6993
|
}
|
|
6927
6994
|
e && t();
|
|
6928
6995
|
}, [e]);
|
|
6929
|
-
let { result: f } =
|
|
6996
|
+
let { result: f } = _e({
|
|
6930
6997
|
resource: "search",
|
|
6931
6998
|
filters: r.length >= 2 ? [{
|
|
6932
6999
|
field: "q",
|
|
@@ -6987,13 +7054,13 @@ function Ti({ open: e, onClose: t }) {
|
|
|
6987
7054
|
x,
|
|
6988
7055
|
t
|
|
6989
7056
|
]);
|
|
6990
|
-
return e ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
7057
|
+
return e ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(q, {
|
|
6991
7058
|
position: "fixed",
|
|
6992
7059
|
inset: 0,
|
|
6993
7060
|
backgroundColor: "rgba(0,0,0,0.7)",
|
|
6994
7061
|
zIndex: 1e3,
|
|
6995
7062
|
onPress: t
|
|
6996
|
-
}), /* @__PURE__ */ T(
|
|
7063
|
+
}), /* @__PURE__ */ T(q, {
|
|
6997
7064
|
position: "fixed",
|
|
6998
7065
|
top: "15%",
|
|
6999
7066
|
left: "50%",
|
|
@@ -7008,7 +7075,7 @@ function Ti({ open: e, onClose: t }) {
|
|
|
7008
7075
|
overflow: "hidden",
|
|
7009
7076
|
elevation: "$4",
|
|
7010
7077
|
children: [
|
|
7011
|
-
/* @__PURE__ */ w(
|
|
7078
|
+
/* @__PURE__ */ w(q, {
|
|
7012
7079
|
padding: "$sm",
|
|
7013
7080
|
borderBottomWidth: 1,
|
|
7014
7081
|
borderBottomColor: "$borderColor",
|
|
@@ -7028,17 +7095,17 @@ function Ti({ open: e, onClose: t }) {
|
|
|
7028
7095
|
fontSize: "$md"
|
|
7029
7096
|
})
|
|
7030
7097
|
}),
|
|
7031
|
-
/* @__PURE__ */ T(
|
|
7098
|
+
/* @__PURE__ */ T(q, {
|
|
7032
7099
|
maxHeight: 300,
|
|
7033
7100
|
overflow: "scroll",
|
|
7034
|
-
children: [b.length === 0 && r && /* @__PURE__ */ w(
|
|
7101
|
+
children: [b.length === 0 && r && /* @__PURE__ */ w(q, {
|
|
7035
7102
|
padding: "$md",
|
|
7036
7103
|
alignItems: "center",
|
|
7037
7104
|
children: /* @__PURE__ */ w(U, {
|
|
7038
7105
|
color: "$colorMuted",
|
|
7039
7106
|
children: n("No results found")
|
|
7040
7107
|
})
|
|
7041
|
-
}), b.map((e, t) => /* @__PURE__ */ T(
|
|
7108
|
+
}), b.map((e, t) => /* @__PURE__ */ T(K, {
|
|
7042
7109
|
onPress: () => x(e),
|
|
7043
7110
|
onMouseEnter: () => o(t),
|
|
7044
7111
|
paddingHorizontal: "$md",
|
|
@@ -7052,7 +7119,7 @@ function Ti({ open: e, onClose: t }) {
|
|
|
7052
7119
|
fontSize: "$xl",
|
|
7053
7120
|
children: e.icon
|
|
7054
7121
|
}),
|
|
7055
|
-
/* @__PURE__ */ T(
|
|
7122
|
+
/* @__PURE__ */ T(q, {
|
|
7056
7123
|
flex: 1,
|
|
7057
7124
|
children: [/* @__PURE__ */ w(U, {
|
|
7058
7125
|
fontWeight: "500",
|
|
@@ -7064,7 +7131,7 @@ function Ti({ open: e, onClose: t }) {
|
|
|
7064
7131
|
children: e.description
|
|
7065
7132
|
})]
|
|
7066
7133
|
}),
|
|
7067
|
-
/* @__PURE__ */ w(
|
|
7134
|
+
/* @__PURE__ */ w(q, {
|
|
7068
7135
|
backgroundColor: "rgba(0,0,0,0.05)",
|
|
7069
7136
|
paddingHorizontal: "$xs",
|
|
7070
7137
|
paddingVertical: 2,
|
|
@@ -7078,7 +7145,7 @@ function Ti({ open: e, onClose: t }) {
|
|
|
7078
7145
|
]
|
|
7079
7146
|
}, e.id))]
|
|
7080
7147
|
}),
|
|
7081
|
-
/* @__PURE__ */ T(
|
|
7148
|
+
/* @__PURE__ */ T(K, {
|
|
7082
7149
|
paddingHorizontal: "$md",
|
|
7083
7150
|
paddingVertical: "$sm",
|
|
7084
7151
|
borderTopWidth: 1,
|
|
@@ -7108,26 +7175,26 @@ function Ti({ open: e, onClose: t }) {
|
|
|
7108
7175
|
//#endregion
|
|
7109
7176
|
//#region src/components/menu/index.tsx
|
|
7110
7177
|
var Ei = () => {
|
|
7111
|
-
let { t: e } = $("desk"), { mutate: t } =
|
|
7112
|
-
return /* @__PURE__ */ T(
|
|
7178
|
+
let { t: e } = $("desk"), { mutate: t } = ye(), { menuItems: n } = be();
|
|
7179
|
+
return /* @__PURE__ */ T(q, {
|
|
7113
7180
|
tag: "nav",
|
|
7114
7181
|
className: "menu",
|
|
7115
7182
|
gap: "$md",
|
|
7116
|
-
children: [/* @__PURE__ */ w(
|
|
7183
|
+
children: [/* @__PURE__ */ w(q, {
|
|
7117
7184
|
tag: "ul",
|
|
7118
7185
|
padding: 0,
|
|
7119
7186
|
margin: 0,
|
|
7120
7187
|
gap: "$xs",
|
|
7121
7188
|
style: { listStyle: "none" },
|
|
7122
|
-
children: n.map((e) => /* @__PURE__ */ w(
|
|
7189
|
+
children: n.map((e) => /* @__PURE__ */ w(q, {
|
|
7123
7190
|
tag: "li",
|
|
7124
|
-
children: /* @__PURE__ */ w(
|
|
7191
|
+
children: /* @__PURE__ */ w(Y, {
|
|
7125
7192
|
to: e.route ?? "/",
|
|
7126
7193
|
style: {
|
|
7127
7194
|
textDecoration: "none",
|
|
7128
7195
|
display: "block"
|
|
7129
7196
|
},
|
|
7130
|
-
children: /* @__PURE__ */ w(
|
|
7197
|
+
children: /* @__PURE__ */ w(q, {
|
|
7131
7198
|
paddingVertical: "$sm",
|
|
7132
7199
|
paddingHorizontal: "$md",
|
|
7133
7200
|
borderRadius: "$sm",
|
|
@@ -7146,17 +7213,17 @@ var Ei = () => {
|
|
|
7146
7213
|
})]
|
|
7147
7214
|
});
|
|
7148
7215
|
}, Di = () => {
|
|
7149
|
-
let { breadcrumbs: e } =
|
|
7150
|
-
return !e || e.length === 0 ? null : /* @__PURE__ */ w(
|
|
7216
|
+
let { breadcrumbs: e } = ue();
|
|
7217
|
+
return !e || e.length === 0 ? null : /* @__PURE__ */ w(K, {
|
|
7151
7218
|
alignItems: "center",
|
|
7152
7219
|
flexWrap: "wrap",
|
|
7153
7220
|
gap: "$sm",
|
|
7154
7221
|
children: e.map((t, n) => {
|
|
7155
7222
|
let r = n === e.length - 1;
|
|
7156
|
-
return /* @__PURE__ */ T(
|
|
7223
|
+
return /* @__PURE__ */ T(K, {
|
|
7157
7224
|
alignItems: "center",
|
|
7158
7225
|
gap: "$sm",
|
|
7159
|
-
children: [t.href ? /* @__PURE__ */ w(
|
|
7226
|
+
children: [t.href ? /* @__PURE__ */ w(we, {
|
|
7160
7227
|
to: t.href,
|
|
7161
7228
|
style: { textDecoration: "none" },
|
|
7162
7229
|
children: /* @__PURE__ */ w(U, {
|
|
@@ -7195,7 +7262,7 @@ function Ai({ width: e, children: t }) {
|
|
|
7195
7262
|
});
|
|
7196
7263
|
}
|
|
7197
7264
|
function ji({ columns: e, equalColumns: t = 1, children: n }) {
|
|
7198
|
-
return e && e.length > 0 ? /* @__PURE__ */ w(
|
|
7265
|
+
return e && e.length > 0 ? /* @__PURE__ */ w(K, {
|
|
7199
7266
|
gap: "$md",
|
|
7200
7267
|
flexWrap: "wrap",
|
|
7201
7268
|
flex: 1,
|
|
@@ -7206,7 +7273,7 @@ function ji({ columns: e, equalColumns: t = 1, children: n }) {
|
|
|
7206
7273
|
}) : t === 1 || !n ? /* @__PURE__ */ w(H, {
|
|
7207
7274
|
gap: "$sm",
|
|
7208
7275
|
children: n
|
|
7209
|
-
}) : /* @__PURE__ */ T(
|
|
7276
|
+
}) : /* @__PURE__ */ T(K, {
|
|
7210
7277
|
gap: "$md",
|
|
7211
7278
|
flexWrap: "wrap",
|
|
7212
7279
|
flex: 1,
|
|
@@ -7219,11 +7286,11 @@ function ji({ columns: e, equalColumns: t = 1, children: n }) {
|
|
|
7219
7286
|
//#endregion
|
|
7220
7287
|
//#region src/components/layout/PageHeader.tsx
|
|
7221
7288
|
function Mi({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
|
|
7222
|
-
return /* @__PURE__ */ T(
|
|
7289
|
+
return /* @__PURE__ */ T(q, {
|
|
7223
7290
|
marginBottom: "$lg",
|
|
7224
7291
|
gap: "$sm",
|
|
7225
7292
|
children: [
|
|
7226
|
-
t && /* @__PURE__ */ T(
|
|
7293
|
+
t && /* @__PURE__ */ T(K, {
|
|
7227
7294
|
alignItems: "center",
|
|
7228
7295
|
gap: "$xs",
|
|
7229
7296
|
children: [/* @__PURE__ */ w(U, {
|
|
@@ -7240,7 +7307,7 @@ function Mi({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
|
|
|
7240
7307
|
children: t.view
|
|
7241
7308
|
})] })]
|
|
7242
7309
|
}),
|
|
7243
|
-
/* @__PURE__ */ T(
|
|
7310
|
+
/* @__PURE__ */ T(K, {
|
|
7244
7311
|
justifyContent: "space-between",
|
|
7245
7312
|
alignItems: "center",
|
|
7246
7313
|
flexDirection: i ? "column" : "row",
|
|
@@ -7249,7 +7316,7 @@ function Mi({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
|
|
|
7249
7316
|
size: "$sm",
|
|
7250
7317
|
margin: 0,
|
|
7251
7318
|
children: e
|
|
7252
|
-
}), /* @__PURE__ */ w(
|
|
7319
|
+
}), /* @__PURE__ */ w(K, {
|
|
7253
7320
|
gap: "$sm",
|
|
7254
7321
|
alignItems: "center",
|
|
7255
7322
|
children: n
|
|
@@ -7261,19 +7328,19 @@ function Mi({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
|
|
|
7261
7328
|
}
|
|
7262
7329
|
//#endregion
|
|
7263
7330
|
//#region src/components/layout/index.tsx
|
|
7264
|
-
var Ni = ({ sidebar: e, navbar: t, children: n, isMobile: r = !1 }) => /* @__PURE__ */ T(
|
|
7331
|
+
var Ni = ({ sidebar: e, navbar: t, children: n, isMobile: r = !1 }) => /* @__PURE__ */ T(K, {
|
|
7265
7332
|
className: "shell-layout",
|
|
7266
7333
|
flexDirection: r ? "column-reverse" : "row",
|
|
7267
7334
|
height: "100vh",
|
|
7268
7335
|
width: "100%",
|
|
7269
7336
|
maxWidth: "100vw",
|
|
7270
7337
|
overflow: "hidden",
|
|
7271
|
-
children: [e, /* @__PURE__ */ T(
|
|
7338
|
+
children: [e, /* @__PURE__ */ T(q, {
|
|
7272
7339
|
className: "shell-main",
|
|
7273
7340
|
flex: 1,
|
|
7274
7341
|
minWidth: 0,
|
|
7275
7342
|
overflow: "hidden",
|
|
7276
|
-
children: [t, /* @__PURE__ */ w(
|
|
7343
|
+
children: [t, /* @__PURE__ */ w(q, {
|
|
7277
7344
|
tag: "main",
|
|
7278
7345
|
className: "shell-content",
|
|
7279
7346
|
flex: 1,
|
|
@@ -7287,7 +7354,7 @@ var Ni = ({ sidebar: e, navbar: t, children: n, isMobile: r = !1 }) => /* @__PUR
|
|
|
7287
7354
|
//#endregion
|
|
7288
7355
|
//#region src/workspace/WorkspaceSection.tsx
|
|
7289
7356
|
function Pi({ workspace: e, collapsed: t = !1 }) {
|
|
7290
|
-
let [n, r] = v(!0), i =
|
|
7357
|
+
let [n, r] = v(!0), i = he(), a = (e) => {
|
|
7291
7358
|
e.type === "shortcut" ? i({ to: `/app/${e.doctype}/list` }) : e.type === "link" && (e.newTab ? window.open(e.url, "_blank") : e.url.startsWith("/") ? i({ to: e.url }) : window.location.href = e.url);
|
|
7292
7359
|
};
|
|
7293
7360
|
return /* @__PURE__ */ T(H, {
|
|
@@ -7306,7 +7373,7 @@ function Pi({ workspace: e, collapsed: t = !1 }) {
|
|
|
7306
7373
|
color: "rgba(255,255,255,0.7)",
|
|
7307
7374
|
fontSize: "$sm",
|
|
7308
7375
|
children: e.icon
|
|
7309
|
-
}), !t && /* @__PURE__ */ T(
|
|
7376
|
+
}), !t && /* @__PURE__ */ T(K, {
|
|
7310
7377
|
flex: 1,
|
|
7311
7378
|
alignItems: "center",
|
|
7312
7379
|
gap: "$xs",
|
|
@@ -7324,7 +7391,7 @@ function Pi({ workspace: e, collapsed: t = !1 }) {
|
|
|
7324
7391
|
children: n ? "▼" : "▶"
|
|
7325
7392
|
})]
|
|
7326
7393
|
})]
|
|
7327
|
-
}), n && !t && /* @__PURE__ */ w(
|
|
7394
|
+
}), n && !t && /* @__PURE__ */ w(q, {
|
|
7328
7395
|
paddingLeft: "$md",
|
|
7329
7396
|
children: e.items.filter((e) => e.type !== "chart").map((e, t) => /* @__PURE__ */ T(N, {
|
|
7330
7397
|
variant: "ghost",
|
|
@@ -7407,7 +7474,7 @@ function Ui(e, t) {
|
|
|
7407
7474
|
return String(t);
|
|
7408
7475
|
}
|
|
7409
7476
|
function Wi({ doctype: e, view: t }) {
|
|
7410
|
-
let n =
|
|
7477
|
+
let n = Pe(), r = Ne(), i = e ?? n.doctype ?? "Task", { data: a } = me(), o = !!a, s = l(), { schema: c, permissions: u, isLoading: d, error: f } = Lt(i), { uiMeta: m } = Vt(i), [h, _] = v(null), [y, b] = v(null), [x, S] = v([]), C = g(() => Ii(c), [c]), T = g(() => {
|
|
7411
7478
|
let e = Object.entries(C).filter(([e, t]) => !Fi.has(e) && !Hi(t)).map(([e, t]) => ({
|
|
7412
7479
|
label: typeof t.title == "string" && t.title.trim() ? t.title : Vi(e),
|
|
7413
7480
|
value: e,
|
|
@@ -7425,34 +7492,34 @@ function Wi({ doctype: e, view: t }) {
|
|
|
7425
7492
|
}, [C]), E = g(() => T.reduce((e, t) => (e[t.value] = t, e), {}), [T]), { searchQuery: D, setSearchQuery: O, appliedSearchQuery: k, applySearch: A, clearSearch: j, hasPendingSearchChanges: M, filterRows: N, appliedFilterRows: P, asOfFilter: F, setAsOfFilter: I, tableFilters: L, hasPendingFilterChanges: R, addFilterRow: z, applyFilters: B, updateFilterRow: V, removeFilterRow: H, removeAppliedFilterRow: U, clearFilterRows: ee, clearAppliedFilters: W } = vn(T), te = g(() => {
|
|
7426
7493
|
let e = m?.additional_views?.tree;
|
|
7427
7494
|
return e?.parentField ? e.parentField : C.parent_doctype ? "parent_doctype" : C.parent ? "parent" : Object.keys(C).find((e) => e.startsWith("parent_") || e.endsWith("_parent"));
|
|
7428
|
-
}, [m, C]), ne = g(() => Object.entries(C).filter(([, e]) => Ri(e)).map(([e]) => e), [C]),
|
|
7429
|
-
|
|
7495
|
+
}, [m, C]), ne = g(() => Object.entries(C).filter(([, e]) => Ri(e)).map(([e]) => e), [C]), re = m?.additional_views?.kanban, G = m?.additional_views?.gantt, ie = m?.additional_views?.calendar, K = g(() => Bi(re?.groupByField, C.status ? "status" : void 0, C.workflow_state ? "workflow_state" : void 0, ne[0]), [
|
|
7496
|
+
re,
|
|
7430
7497
|
C,
|
|
7431
7498
|
ne
|
|
7432
|
-
]),
|
|
7433
|
-
if (!(!
|
|
7434
|
-
nameField: Bi(
|
|
7435
|
-
startField:
|
|
7436
|
-
endField:
|
|
7437
|
-
progressField: Bi(
|
|
7438
|
-
parentField: Bi(
|
|
7499
|
+
]), q = !!K, J = !!te, ae = g(() => Bi(G?.startField, C.start_date ? "start_date" : void 0, C.start ? "start" : void 0), [G, C]), oe = g(() => Bi(G?.endField, C.due_date ? "due_date" : void 0, C.end_date ? "end_date" : void 0, C.end ? "end" : void 0), [G, C]), se = g(() => {
|
|
7500
|
+
if (!(!ae || !oe)) return {
|
|
7501
|
+
nameField: Bi(G?.nameField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.name ? "name" : void 0) ?? "name",
|
|
7502
|
+
startField: ae,
|
|
7503
|
+
endField: oe,
|
|
7504
|
+
progressField: Bi(G?.progressField, C.progress ? "progress" : void 0),
|
|
7505
|
+
parentField: Bi(G?.parentField, te)
|
|
7439
7506
|
};
|
|
7440
7507
|
}, [
|
|
7441
|
-
|
|
7508
|
+
G,
|
|
7442
7509
|
C,
|
|
7443
|
-
ie,
|
|
7444
7510
|
ae,
|
|
7511
|
+
oe,
|
|
7445
7512
|
te
|
|
7446
|
-
]),
|
|
7447
|
-
if (
|
|
7448
|
-
startField:
|
|
7449
|
-
titleField: Bi(
|
|
7513
|
+
]), ce = !!se, le = g(() => Bi(ie?.startField, C.date ? "date" : void 0, C.start_date ? "start_date" : void 0), [ie, C]), ue = g(() => {
|
|
7514
|
+
if (le) return {
|
|
7515
|
+
startField: le,
|
|
7516
|
+
titleField: Bi(ie?.titleField, C.title ? "title" : void 0, C.name ? "name" : void 0) ?? "name"
|
|
7450
7517
|
};
|
|
7451
7518
|
}, [
|
|
7452
|
-
|
|
7519
|
+
ie,
|
|
7453
7520
|
C,
|
|
7454
|
-
|
|
7455
|
-
]),
|
|
7521
|
+
le
|
|
7522
|
+
]), de = !!ue, fe = g(() => {
|
|
7456
7523
|
let e = m?.list?.columns || m?.list_columns;
|
|
7457
7524
|
return Array.isArray(e) && e.length > 0 ? e.map((e) => ({
|
|
7458
7525
|
field: typeof e == "string" ? e : String(e.field ?? ""),
|
|
@@ -7468,28 +7535,28 @@ function Wi({ doctype: e, view: t }) {
|
|
|
7468
7535
|
sortable: !0
|
|
7469
7536
|
};
|
|
7470
7537
|
});
|
|
7471
|
-
}, [m, C]), { isDeleteConfirmOpen:
|
|
7538
|
+
}, [m, C]), { isDeleteConfirmOpen: he, setIsDeleteConfirmOpen: _e, isColumnsMenuOpen: ve, setIsColumnsMenuOpen: ye, isMobile: be, columnPreferences: xe, toggleColumnVisibility: Se, activeView: Ce, setActiveView: we, handleRowClick: Y } = xn({
|
|
7472
7539
|
doctype: i,
|
|
7473
7540
|
propView: t,
|
|
7474
|
-
canKanban:
|
|
7475
|
-
canTree:
|
|
7476
|
-
canGantt:
|
|
7477
|
-
canCalendar:
|
|
7541
|
+
canKanban: q,
|
|
7542
|
+
canTree: J,
|
|
7543
|
+
canGantt: ce,
|
|
7544
|
+
canCalendar: de,
|
|
7478
7545
|
resolveDetailRoute: $t("resolveDetailRoute")
|
|
7479
|
-
}),
|
|
7546
|
+
}), Te = g(() => fe.filter((e) => xe.visibility[e.field] !== !1), [fe, xe.visibility]), Ee = g(() => Te.map((e) => ({
|
|
7480
7547
|
id: e.field,
|
|
7481
7548
|
accessorKey: e.field,
|
|
7482
7549
|
header: e.label,
|
|
7483
7550
|
size: e.width,
|
|
7484
7551
|
enableSorting: e.sortable ?? !0,
|
|
7485
7552
|
cell: ({ getValue: t }) => Ui(C[e.field], t())
|
|
7486
|
-
})), [
|
|
7553
|
+
})), [Te, C]), X = g(() => {
|
|
7487
7554
|
let e = m?.additional_views?.tree;
|
|
7488
7555
|
return Bi(e?.labelField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.label ? "label" : void 0, C.name ? "name" : void 0) ?? "name";
|
|
7489
|
-
}, [m, C]),
|
|
7556
|
+
}, [m, C]), De = g(() => K ? Li(C[K]).map((e) => ({
|
|
7490
7557
|
id: e,
|
|
7491
7558
|
title: e.charAt(0).toUpperCase() + e.slice(1).replaceAll("_", " ")
|
|
7492
|
-
})) : [], [
|
|
7559
|
+
})) : [], [K, C]), Oe = Bi(re?.cardTitleField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.name ? "name" : void 0, "name"), ke = Bi(re?.cardSubtitleField, C.description ? "description" : void 0, C.notes ? "notes" : void 0), Ae = p(() => {
|
|
7493
7560
|
if (!o) {
|
|
7494
7561
|
_("Authentication required. Please login first."), r("/login");
|
|
7495
7562
|
return;
|
|
@@ -7499,35 +7566,35 @@ function Wi({ doctype: e, view: t }) {
|
|
|
7499
7566
|
o,
|
|
7500
7567
|
r,
|
|
7501
7568
|
i
|
|
7502
|
-
]),
|
|
7503
|
-
x.length !== 0 &&
|
|
7504
|
-
}, [x]),
|
|
7569
|
+
]), je = pe(), Me = ge(), Fe = p(async () => {
|
|
7570
|
+
x.length !== 0 && _e(!0);
|
|
7571
|
+
}, [x]), Ie = p(async () => {
|
|
7505
7572
|
if (x.length === 0) {
|
|
7506
|
-
|
|
7573
|
+
_e(!1);
|
|
7507
7574
|
return;
|
|
7508
7575
|
}
|
|
7509
7576
|
try {
|
|
7510
7577
|
let e = x.map((e) => String(e.id ?? e.name ?? ""));
|
|
7511
|
-
await
|
|
7578
|
+
await je.mutateAsync({
|
|
7512
7579
|
resource: i,
|
|
7513
7580
|
ids: e
|
|
7514
|
-
}), S([]),
|
|
7581
|
+
}), S([]), _e(!1), _(null), Me({
|
|
7515
7582
|
resource: i,
|
|
7516
7583
|
invalidates: ["list"]
|
|
7517
7584
|
});
|
|
7518
7585
|
} catch (e) {
|
|
7519
|
-
|
|
7586
|
+
_e(!1), _(e.message || `Failed to delete selected ${i}.`);
|
|
7520
7587
|
}
|
|
7521
7588
|
}, [
|
|
7522
7589
|
x,
|
|
7523
|
-
|
|
7590
|
+
je,
|
|
7524
7591
|
i,
|
|
7525
|
-
|
|
7526
|
-
]),
|
|
7592
|
+
Me
|
|
7593
|
+
]), Le = g(() => Vi(i), [i]), Re = g(() => {
|
|
7527
7594
|
let e = s;
|
|
7528
7595
|
for (let t of e || []) if (t.resources?.some((e) => e.name === i)) return t.label || t.app_id || "App";
|
|
7529
7596
|
return "App";
|
|
7530
|
-
}, [s, i]),
|
|
7597
|
+
}, [s, i]), ze = g(() => x.some((e) => {
|
|
7531
7598
|
let t = Number(e.docstatus);
|
|
7532
7599
|
return t === 1 || t === 2;
|
|
7533
7600
|
}), [x]);
|
|
@@ -7570,37 +7637,37 @@ function Wi({ doctype: e, view: t }) {
|
|
|
7570
7637
|
}), [F, I]),
|
|
7571
7638
|
uiError: h,
|
|
7572
7639
|
timeTravelError: y,
|
|
7573
|
-
isDeleteConfirmOpen:
|
|
7574
|
-
setIsDeleteConfirmOpen:
|
|
7575
|
-
isColumnsMenuOpen:
|
|
7576
|
-
setIsColumnsMenuOpen:
|
|
7577
|
-
isMobile:
|
|
7578
|
-
columnPreferences:
|
|
7579
|
-
toggleColumnVisibility:
|
|
7580
|
-
activeView:
|
|
7581
|
-
setActiveView:
|
|
7582
|
-
handleRowClick:
|
|
7583
|
-
canKanban:
|
|
7584
|
-
canTree:
|
|
7585
|
-
canGantt:
|
|
7586
|
-
appName:
|
|
7587
|
-
title:
|
|
7588
|
-
listColumns:
|
|
7589
|
-
tableColumns:
|
|
7640
|
+
isDeleteConfirmOpen: he,
|
|
7641
|
+
setIsDeleteConfirmOpen: _e,
|
|
7642
|
+
isColumnsMenuOpen: ve,
|
|
7643
|
+
setIsColumnsMenuOpen: ye,
|
|
7644
|
+
isMobile: be,
|
|
7645
|
+
columnPreferences: xe,
|
|
7646
|
+
toggleColumnVisibility: Se,
|
|
7647
|
+
activeView: Ce,
|
|
7648
|
+
setActiveView: we,
|
|
7649
|
+
handleRowClick: Y,
|
|
7650
|
+
canKanban: q,
|
|
7651
|
+
canTree: J,
|
|
7652
|
+
canGantt: ce,
|
|
7653
|
+
appName: Re,
|
|
7654
|
+
title: Le,
|
|
7655
|
+
listColumns: fe,
|
|
7656
|
+
tableColumns: Ee,
|
|
7590
7657
|
tableFilters: L,
|
|
7591
|
-
kanbanGroupField:
|
|
7592
|
-
kanbanColumns:
|
|
7593
|
-
kanbanTitleField:
|
|
7594
|
-
kanbanDescriptionField:
|
|
7658
|
+
kanbanGroupField: K,
|
|
7659
|
+
kanbanColumns: De,
|
|
7660
|
+
kanbanTitleField: Oe,
|
|
7661
|
+
kanbanDescriptionField: ke,
|
|
7595
7662
|
detectedParentField: te,
|
|
7596
|
-
detectedLabelField:
|
|
7597
|
-
ganttConfig:
|
|
7598
|
-
canCalendar:
|
|
7599
|
-
calendarConfig:
|
|
7600
|
-
confirmBulkDelete:
|
|
7601
|
-
handleBulkDelete:
|
|
7602
|
-
hasLockedSelection:
|
|
7603
|
-
handleNew:
|
|
7663
|
+
detectedLabelField: X,
|
|
7664
|
+
ganttConfig: se,
|
|
7665
|
+
canCalendar: de,
|
|
7666
|
+
calendarConfig: ue,
|
|
7667
|
+
confirmBulkDelete: Ie,
|
|
7668
|
+
handleBulkDelete: Fe,
|
|
7669
|
+
hasLockedSelection: ze,
|
|
7670
|
+
handleNew: Ae
|
|
7604
7671
|
});
|
|
7605
7672
|
}
|
|
7606
7673
|
//#endregion
|
|
@@ -7620,7 +7687,7 @@ function Gi({ frm: e, submitLabel: t, docstatus: n }) {
|
|
|
7620
7687
|
backgroundColor: "$background",
|
|
7621
7688
|
borderRadius: "$md",
|
|
7622
7689
|
elevated: !0,
|
|
7623
|
-
children: /* @__PURE__ */ w(
|
|
7690
|
+
children: /* @__PURE__ */ w(K, {
|
|
7624
7691
|
gap: "$sm",
|
|
7625
7692
|
justifyContent: "space-between",
|
|
7626
7693
|
children: i ? n === 1 ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(N, {
|
|
@@ -7676,7 +7743,7 @@ var Ji = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, display
|
|
|
7676
7743
|
return /* @__PURE__ */ T(H, {
|
|
7677
7744
|
marginBottom: "$lg",
|
|
7678
7745
|
children: [
|
|
7679
|
-
/* @__PURE__ */ T(
|
|
7746
|
+
/* @__PURE__ */ T(K, {
|
|
7680
7747
|
alignItems: "center",
|
|
7681
7748
|
gap: "$xs",
|
|
7682
7749
|
marginBottom: "$sm",
|
|
@@ -7717,18 +7784,18 @@ var Ji = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, display
|
|
|
7717
7784
|
] })
|
|
7718
7785
|
]
|
|
7719
7786
|
}),
|
|
7720
|
-
/* @__PURE__ */ T(
|
|
7787
|
+
/* @__PURE__ */ T(K, {
|
|
7721
7788
|
justifyContent: "space-between",
|
|
7722
7789
|
alignItems: "center",
|
|
7723
7790
|
children: [/* @__PURE__ */ w(L, {
|
|
7724
7791
|
size: "$sm",
|
|
7725
7792
|
margin: 0,
|
|
7726
7793
|
children: o
|
|
7727
|
-
}), /* @__PURE__ */ T(
|
|
7794
|
+
}), /* @__PURE__ */ T(K, {
|
|
7728
7795
|
gap: "$sm",
|
|
7729
7796
|
alignItems: "center",
|
|
7730
7797
|
children: [
|
|
7731
|
-
!v && /* @__PURE__ */ w(
|
|
7798
|
+
!v && /* @__PURE__ */ w(K, {
|
|
7732
7799
|
gap: "$sm",
|
|
7733
7800
|
alignItems: "center",
|
|
7734
7801
|
marginRight: "$sm",
|
|
@@ -7779,7 +7846,7 @@ var Ji = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, display
|
|
|
7779
7846
|
color: "$color"
|
|
7780
7847
|
})
|
|
7781
7848
|
}),
|
|
7782
|
-
content: /* @__PURE__ */ T(
|
|
7849
|
+
content: /* @__PURE__ */ T(q, {
|
|
7783
7850
|
gap: "$xs",
|
|
7784
7851
|
minWidth: 180,
|
|
7785
7852
|
children: [
|
|
@@ -7919,9 +7986,9 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
7919
7986
|
frm: n,
|
|
7920
7987
|
shell: f,
|
|
7921
7988
|
apps: p
|
|
7922
|
-
}), { mutateAsync: W } =
|
|
7989
|
+
}), { mutateAsync: W } = fe(), te = Ne(), [ne] = Fe(), re = _(null), G = _(null), [ie, q] = v(!1), J = _(!1);
|
|
7923
7990
|
h(() => {
|
|
7924
|
-
|
|
7991
|
+
re.current = null, G.current = null;
|
|
7925
7992
|
}, [
|
|
7926
7993
|
t,
|
|
7927
7994
|
e,
|
|
@@ -7929,10 +7996,10 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
7929
7996
|
]), h(() => {
|
|
7930
7997
|
if (s) {
|
|
7931
7998
|
let e = JSON.stringify(s);
|
|
7932
|
-
|
|
7933
|
-
} else n.doc &&
|
|
7999
|
+
G.current !== e && (G.current = e, re.current = e);
|
|
8000
|
+
} else n.doc && re.current === null && (re.current = JSON.stringify(n.doc));
|
|
7934
8001
|
}, [s, n.doc]), h(() => {
|
|
7935
|
-
|
|
8002
|
+
re.current && n.doc && !n.isSaving && q(JSON.stringify(n.doc) !== re.current);
|
|
7936
8003
|
}, [n.doc, n.isSaving]), h(() => {
|
|
7937
8004
|
let e = ne.get("lng");
|
|
7938
8005
|
e && u && d !== e && u(e).catch(() => void 0);
|
|
@@ -7941,23 +8008,23 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
7941
8008
|
u,
|
|
7942
8009
|
d
|
|
7943
8010
|
]), h(() => {
|
|
7944
|
-
if (!
|
|
8011
|
+
if (!ie || n.isSaving || typeof window > "u" || !window.addEventListener) return;
|
|
7945
8012
|
let e = (e) => {
|
|
7946
8013
|
e.preventDefault(), e.returnValue = "";
|
|
7947
8014
|
};
|
|
7948
8015
|
return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
|
|
7949
|
-
}, [
|
|
7950
|
-
let
|
|
8016
|
+
}, [ie, n.isSaving]);
|
|
8017
|
+
let ae = je(({ currentLocation: e, nextLocation: t }) => J.current || t.state?.bypassBlocker ? !1 : ie && !n.isSaving && e.pathname !== t.pathname);
|
|
7951
8018
|
h(() => {
|
|
7952
|
-
|
|
7953
|
-
}, [
|
|
8019
|
+
ae.state === "blocked" && E(!0);
|
|
8020
|
+
}, [ae.state]), h(() => {
|
|
7954
8021
|
if (typeof window > "u" || !window.addEventListener) return;
|
|
7955
8022
|
let e = (e) => {
|
|
7956
8023
|
(e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" && (e.preventDefault(), !n.isLocked && !n.isSaving && n.save({ preventNavigation: !!k?.auto_save }));
|
|
7957
8024
|
};
|
|
7958
8025
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
7959
8026
|
}, [n, k?.auto_save]), h(() => {
|
|
7960
|
-
if (k?.auto_save && I &&
|
|
8027
|
+
if (k?.auto_save && I && ie && !n.isSaving && !n.isLocked && (!s || s.docstatus === 0 || s.docstatus === void 0)) {
|
|
7961
8028
|
let e = setTimeout(() => {
|
|
7962
8029
|
n.save({ preventNavigation: !0 });
|
|
7963
8030
|
}, 1500);
|
|
@@ -7966,23 +8033,23 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
7966
8033
|
}, [
|
|
7967
8034
|
k?.auto_save,
|
|
7968
8035
|
I,
|
|
7969
|
-
|
|
8036
|
+
ie,
|
|
7970
8037
|
n.doc,
|
|
7971
8038
|
n.isSaving,
|
|
7972
8039
|
n.isLocked,
|
|
7973
8040
|
s?.docstatus,
|
|
7974
8041
|
n
|
|
7975
8042
|
]);
|
|
7976
|
-
let
|
|
8043
|
+
let oe = async () => {
|
|
7977
8044
|
if (t) {
|
|
7978
|
-
|
|
8045
|
+
J.current = !0, q(!1);
|
|
7979
8046
|
try {
|
|
7980
8047
|
await W({
|
|
7981
8048
|
resource: e,
|
|
7982
8049
|
id: t
|
|
7983
8050
|
}), x(!1), te(`/app/${e}/list`, { state: { bypassBlocker: !0 } });
|
|
7984
8051
|
} catch (t) {
|
|
7985
|
-
|
|
8052
|
+
J.current = !1, x(!1), O(t.message || `Failed to delete ${e}.`);
|
|
7986
8053
|
}
|
|
7987
8054
|
}
|
|
7988
8055
|
};
|
|
@@ -8033,11 +8100,11 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8033
8100
|
submitLabel: ee,
|
|
8034
8101
|
onSave: () => n.save({ preventNavigation: !!k?.auto_save }),
|
|
8035
8102
|
onDiscard: () => {
|
|
8036
|
-
if (
|
|
8103
|
+
if (ie) {
|
|
8037
8104
|
E(!0);
|
|
8038
8105
|
return;
|
|
8039
8106
|
}
|
|
8040
|
-
|
|
8107
|
+
J.current = !0, q(!1), n.cancel();
|
|
8041
8108
|
},
|
|
8042
8109
|
isSaving: n.isSaving,
|
|
8043
8110
|
isLocked: n.isLocked,
|
|
@@ -8056,7 +8123,7 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8056
8123
|
isMobile: f.isMobile,
|
|
8057
8124
|
onDelete: I && !L ? () => x(!0) : void 0
|
|
8058
8125
|
}),
|
|
8059
|
-
k?.auto_save && I && /* @__PURE__ */ w(
|
|
8126
|
+
k?.auto_save && I && /* @__PURE__ */ w(K, {
|
|
8060
8127
|
paddingHorizontal: f.isMobile ? "$sm" : "$lg",
|
|
8061
8128
|
paddingTop: "$sm",
|
|
8062
8129
|
justifyContent: "flex-end",
|
|
@@ -8065,7 +8132,7 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8065
8132
|
fontSize: "$xs",
|
|
8066
8133
|
color: "$colorMuted",
|
|
8067
8134
|
fontWeight: "500",
|
|
8068
|
-
children: n.isSaving ? c("Auto-saving...") : c(
|
|
8135
|
+
children: n.isSaving ? c("Auto-saving...") : c(ie ? "Unsaved changes" : "Saved")
|
|
8069
8136
|
})
|
|
8070
8137
|
}),
|
|
8071
8138
|
D && /* @__PURE__ */ w(P, {
|
|
@@ -8086,7 +8153,7 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8086
8153
|
data: n.doc,
|
|
8087
8154
|
id: t
|
|
8088
8155
|
}),
|
|
8089
|
-
/* @__PURE__ */ T(
|
|
8156
|
+
/* @__PURE__ */ T(K, {
|
|
8090
8157
|
width: "100%",
|
|
8091
8158
|
gap: "$lg",
|
|
8092
8159
|
alignItems: "flex-start",
|
|
@@ -8124,7 +8191,7 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8124
8191
|
elevation: 20,
|
|
8125
8192
|
shadowColor: "$shadow",
|
|
8126
8193
|
shadowRadius: 20,
|
|
8127
|
-
children: [/* @__PURE__ */ T(
|
|
8194
|
+
children: [/* @__PURE__ */ T(K, {
|
|
8128
8195
|
justifyContent: "flex-end",
|
|
8129
8196
|
paddingRight: "$lg",
|
|
8130
8197
|
children: [/* @__PURE__ */ w(U, {
|
|
@@ -8166,7 +8233,7 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8166
8233
|
cancelLabel: c("Cancel"),
|
|
8167
8234
|
destructive: !0,
|
|
8168
8235
|
onConfirm: () => {
|
|
8169
|
-
|
|
8236
|
+
oe().catch(() => void 0);
|
|
8170
8237
|
},
|
|
8171
8238
|
onCancel: () => x(!1)
|
|
8172
8239
|
}),
|
|
@@ -8178,10 +8245,10 @@ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
|
|
|
8178
8245
|
cancelLabel: c("Cancel"),
|
|
8179
8246
|
destructive: !0,
|
|
8180
8247
|
onConfirm: () => {
|
|
8181
|
-
E(!1),
|
|
8248
|
+
E(!1), J.current = !0, q(!1), ae.state === "blocked" ? ae.proceed() : n.cancel();
|
|
8182
8249
|
},
|
|
8183
8250
|
onCancel: () => {
|
|
8184
|
-
E(!1),
|
|
8251
|
+
E(!1), ae.state === "blocked" && ae.reset();
|
|
8185
8252
|
}
|
|
8186
8253
|
})
|
|
8187
8254
|
]
|
|
@@ -8221,7 +8288,7 @@ function $i({ logo: e }) {
|
|
|
8221
8288
|
src: e,
|
|
8222
8289
|
alt: "Logo",
|
|
8223
8290
|
style: { maxHeight: 48 }
|
|
8224
|
-
}) : /* @__PURE__ */ w(C, { children: e }) : /* @__PURE__ */ w(
|
|
8291
|
+
}) : /* @__PURE__ */ w(C, { children: e }) : /* @__PURE__ */ w(q, {
|
|
8225
8292
|
width: 48,
|
|
8226
8293
|
height: 48,
|
|
8227
8294
|
borderRadius: "$lg",
|
|
@@ -8241,7 +8308,7 @@ function ea({ ...e }) {
|
|
|
8241
8308
|
return w(on("LoginPage") || ta, { ...e });
|
|
8242
8309
|
}
|
|
8243
8310
|
function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
8244
|
-
let { t: r } = $("desk"), [i] =
|
|
8311
|
+
let { t: r } = $("desk"), [i] = Fe(), a = n ?? i.get("to") ?? void 0, { mutate: o, status: s } = ve(), [c, l] = v(null), [u, d] = v(null), [f, p] = v(""), [m, g] = v(""), [_, y] = v(!1), [b, x] = v(!1), [S, C] = v(!1), { theme: E, toggleTheme: D } = J(), O = Mt(), k = s === "pending", A = k || S, [j, M] = v(Qi()), F = b ? r("Reset Password") : e === "Welcome back" ? r("Welcome back") : e, I = r(b ? "Enter your email to receive a reset link" : "Sign in to your account");
|
|
8245
8312
|
h(() => {
|
|
8246
8313
|
(async () => {
|
|
8247
8314
|
try {
|
|
@@ -8303,7 +8370,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8303
8370
|
}, H = (e) => {
|
|
8304
8371
|
e.key === "Enter" && V();
|
|
8305
8372
|
};
|
|
8306
|
-
return /* @__PURE__ */ T(
|
|
8373
|
+
return /* @__PURE__ */ T(q, {
|
|
8307
8374
|
fullscreen: !0,
|
|
8308
8375
|
minHeight: "100vh",
|
|
8309
8376
|
justifyContent: "center",
|
|
@@ -8315,7 +8382,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8315
8382
|
className: "shell-login-container",
|
|
8316
8383
|
position: "relative",
|
|
8317
8384
|
style: { background: E === "dark" ? "radial-gradient(circle at top right, var(--color-sidebar-hover), transparent), radial-gradient(circle at bottom left, var(--color-focus-ring), transparent)" : "radial-gradient(circle at top right, #f3f4f6, transparent), radial-gradient(circle at bottom left, #e5e7eb, transparent)" },
|
|
8318
|
-
children: [/* @__PURE__ */ w(
|
|
8385
|
+
children: [/* @__PURE__ */ w(K, {
|
|
8319
8386
|
position: "absolute",
|
|
8320
8387
|
top: "$lg",
|
|
8321
8388
|
right: "$lg",
|
|
@@ -8340,11 +8407,11 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8340
8407
|
elevated: !0,
|
|
8341
8408
|
backgroundColor: "$bg",
|
|
8342
8409
|
children: [
|
|
8343
|
-
/* @__PURE__ */ T(
|
|
8410
|
+
/* @__PURE__ */ T(q, {
|
|
8344
8411
|
alignItems: "center",
|
|
8345
8412
|
marginBottom: "$xl",
|
|
8346
8413
|
gap: "$md",
|
|
8347
|
-
children: [/* @__PURE__ */ w($i, { logo: t }), /* @__PURE__ */ T(
|
|
8414
|
+
children: [/* @__PURE__ */ w($i, { logo: t }), /* @__PURE__ */ T(q, {
|
|
8348
8415
|
alignItems: "center",
|
|
8349
8416
|
gap: "$xs",
|
|
8350
8417
|
children: [/* @__PURE__ */ w(L, {
|
|
@@ -8357,15 +8424,18 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8357
8424
|
})]
|
|
8358
8425
|
})]
|
|
8359
8426
|
}),
|
|
8360
|
-
!b && j.length > 0 && /* @__PURE__ */ T(
|
|
8427
|
+
!b && j.length > 0 && /* @__PURE__ */ T(q, {
|
|
8361
8428
|
gap: "$sm",
|
|
8362
8429
|
marginBottom: "$lg",
|
|
8363
8430
|
children: [j.map((e) => /* @__PURE__ */ w(N, {
|
|
8364
8431
|
variant: "default",
|
|
8365
|
-
onClick: () =>
|
|
8432
|
+
onClick: () => {
|
|
8433
|
+
let t = new URLSearchParams(globalThis.location?.search ?? "").get("add_account") === "true" ? `/api/v1/auth/oauth/${e}/start?add_account=true` : `/api/v1/auth/oauth/${e}/start`;
|
|
8434
|
+
globalThis.location.href = t;
|
|
8435
|
+
},
|
|
8366
8436
|
disabled: A,
|
|
8367
8437
|
width: "100%",
|
|
8368
|
-
children: /* @__PURE__ */ T(
|
|
8438
|
+
children: /* @__PURE__ */ T(K, {
|
|
8369
8439
|
gap: "$sm",
|
|
8370
8440
|
alignItems: "center",
|
|
8371
8441
|
children: [/* @__PURE__ */ w(L, {
|
|
@@ -8377,12 +8447,12 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8377
8447
|
children: Zi[e]?.label || r("Continue with {{provider}}", { provider: e })
|
|
8378
8448
|
})]
|
|
8379
8449
|
})
|
|
8380
|
-
}, e)), /* @__PURE__ */ T(
|
|
8450
|
+
}, e)), /* @__PURE__ */ T(K, {
|
|
8381
8451
|
alignItems: "center",
|
|
8382
8452
|
gap: "$sm",
|
|
8383
8453
|
marginVertical: "$sm",
|
|
8384
8454
|
children: [
|
|
8385
|
-
/* @__PURE__ */ w(
|
|
8455
|
+
/* @__PURE__ */ w(q, {
|
|
8386
8456
|
height: 1,
|
|
8387
8457
|
flex: 1,
|
|
8388
8458
|
backgroundColor: "$border"
|
|
@@ -8392,7 +8462,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8392
8462
|
color: "$text-muted",
|
|
8393
8463
|
children: r("or")
|
|
8394
8464
|
}),
|
|
8395
|
-
/* @__PURE__ */ w(
|
|
8465
|
+
/* @__PURE__ */ w(q, {
|
|
8396
8466
|
height: 1,
|
|
8397
8467
|
flex: 1,
|
|
8398
8468
|
backgroundColor: "$border"
|
|
@@ -8400,7 +8470,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8400
8470
|
]
|
|
8401
8471
|
})]
|
|
8402
8472
|
}),
|
|
8403
|
-
c && /* @__PURE__ */ w(
|
|
8473
|
+
c && /* @__PURE__ */ w(q, {
|
|
8404
8474
|
backgroundColor: "$error-bg",
|
|
8405
8475
|
borderColor: "$error",
|
|
8406
8476
|
borderWidth: 1,
|
|
@@ -8413,7 +8483,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8413
8483
|
children: c
|
|
8414
8484
|
})
|
|
8415
8485
|
}),
|
|
8416
|
-
u && /* @__PURE__ */ w(
|
|
8486
|
+
u && /* @__PURE__ */ w(q, {
|
|
8417
8487
|
backgroundColor: "$backgroundSecondary",
|
|
8418
8488
|
borderColor: "$borderColor",
|
|
8419
8489
|
borderWidth: 1,
|
|
@@ -8426,10 +8496,10 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8426
8496
|
children: u
|
|
8427
8497
|
})
|
|
8428
8498
|
}),
|
|
8429
|
-
/* @__PURE__ */ T(
|
|
8499
|
+
/* @__PURE__ */ T(q, {
|
|
8430
8500
|
gap: "$lg",
|
|
8431
8501
|
children: [
|
|
8432
|
-
/* @__PURE__ */ T(
|
|
8502
|
+
/* @__PURE__ */ T(q, {
|
|
8433
8503
|
gap: "$xs",
|
|
8434
8504
|
children: [/* @__PURE__ */ w(W, {
|
|
8435
8505
|
fontSize: "$xs",
|
|
@@ -8447,13 +8517,13 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8447
8517
|
disabled: A
|
|
8448
8518
|
})]
|
|
8449
8519
|
}),
|
|
8450
|
-
!b && /* @__PURE__ */ T(
|
|
8520
|
+
!b && /* @__PURE__ */ T(q, {
|
|
8451
8521
|
gap: "$xs",
|
|
8452
8522
|
children: [/* @__PURE__ */ w(W, {
|
|
8453
8523
|
fontSize: "$xs",
|
|
8454
8524
|
fontWeight: "500",
|
|
8455
8525
|
children: r("Password")
|
|
8456
|
-
}), /* @__PURE__ */ T(
|
|
8526
|
+
}), /* @__PURE__ */ T(K, {
|
|
8457
8527
|
position: "relative",
|
|
8458
8528
|
alignItems: "center",
|
|
8459
8529
|
width: "100%",
|
|
@@ -8469,7 +8539,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8469
8539
|
disabled: A,
|
|
8470
8540
|
flex: 1,
|
|
8471
8541
|
paddingRight: 44
|
|
8472
|
-
}), /* @__PURE__ */ w(
|
|
8542
|
+
}), /* @__PURE__ */ w(K, {
|
|
8473
8543
|
position: "absolute",
|
|
8474
8544
|
right: 6,
|
|
8475
8545
|
zIndex: 10,
|
|
@@ -8504,7 +8574,7 @@ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
|
|
|
8504
8574
|
})
|
|
8505
8575
|
]
|
|
8506
8576
|
}),
|
|
8507
|
-
/* @__PURE__ */ w(
|
|
8577
|
+
/* @__PURE__ */ w(q, {
|
|
8508
8578
|
marginTop: "$xl",
|
|
8509
8579
|
alignItems: "center",
|
|
8510
8580
|
children: b ? /* @__PURE__ */ w(N, {
|
|
@@ -8761,11 +8831,11 @@ function da(e) {
|
|
|
8761
8831
|
}
|
|
8762
8832
|
//#endregion
|
|
8763
8833
|
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
|
|
8764
|
-
var fa = /* @__PURE__ */
|
|
8834
|
+
var fa = /* @__PURE__ */ Z(((e, t) => {
|
|
8765
8835
|
t.exports = TypeError;
|
|
8766
|
-
})), pa = /* @__PURE__ */
|
|
8836
|
+
})), pa = /* @__PURE__ */ Z(((e, t) => {
|
|
8767
8837
|
t.exports = {};
|
|
8768
|
-
})), ma = /* @__PURE__ */
|
|
8838
|
+
})), ma = /* @__PURE__ */ Z(((e, t) => {
|
|
8769
8839
|
var n = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = n && r && typeof r.get == "function" ? r.get : null, a = n && Map.prototype.forEach, o = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, c = o && s && typeof s.get == "function" ? s.get : null, l = o && Set.prototype.forEach, u = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet.prototype.has : null, f = typeof WeakRef == "function" && WeakRef.prototype ? WeakRef.prototype.deref : null, p = Boolean.prototype.valueOf, m = Object.prototype.toString, h = Function.prototype.toString, g = String.prototype.match, _ = String.prototype.slice, v = String.prototype.replace, y = String.prototype.toUpperCase, b = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, C = Array.prototype.join, w = Array.prototype.slice, T = Math.floor, E = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, D = Object.getOwnPropertySymbols, O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", A = typeof Symbol == "function" && Symbol.toStringTag ? Symbol.toStringTag : null, j = Object.prototype.propertyIsEnumerable, M = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
8770
8840
|
return e.__proto__;
|
|
8771
8841
|
} : null);
|
|
@@ -8781,7 +8851,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8781
8851
|
}
|
|
8782
8852
|
return v.call(t, n, "$&_");
|
|
8783
8853
|
}
|
|
8784
|
-
var P = pa(), F = P.custom, I =
|
|
8854
|
+
var P = pa(), F = P.custom, I = G(F) ? F : null, L = {
|
|
8785
8855
|
__proto__: null,
|
|
8786
8856
|
double: "\"",
|
|
8787
8857
|
single: "'"
|
|
@@ -8792,17 +8862,17 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8792
8862
|
};
|
|
8793
8863
|
t.exports = function e(t, n, r, o) {
|
|
8794
8864
|
var s = n || {};
|
|
8795
|
-
if (
|
|
8796
|
-
if (
|
|
8797
|
-
var u =
|
|
8865
|
+
if (q(s, "quoteStyle") && !q(L, s.quoteStyle)) throw TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
|
|
8866
|
+
if (q(s, "maxStringLength") && (typeof s.maxStringLength == "number" ? s.maxStringLength < 0 && s.maxStringLength !== Infinity : s.maxStringLength !== null)) throw TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
|
|
8867
|
+
var u = q(s, "customInspect") ? s.customInspect : !0;
|
|
8798
8868
|
if (typeof u != "boolean" && u !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
8799
|
-
if (
|
|
8800
|
-
if (
|
|
8869
|
+
if (q(s, "indent") && s.indent !== null && s.indent !== " " && !(parseInt(s.indent, 10) === s.indent && s.indent > 0)) throw TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`");
|
|
8870
|
+
if (q(s, "numericSeparator") && typeof s.numericSeparator != "boolean") throw TypeError("option \"numericSeparator\", if provided, must be `true` or `false`");
|
|
8801
8871
|
var d = s.numericSeparator;
|
|
8802
8872
|
if (t === void 0) return "undefined";
|
|
8803
8873
|
if (t === null) return "null";
|
|
8804
8874
|
if (typeof t == "boolean") return t ? "true" : "false";
|
|
8805
|
-
if (typeof t == "string") return
|
|
8875
|
+
if (typeof t == "string") return pe(t, s);
|
|
8806
8876
|
if (typeof t == "number") {
|
|
8807
8877
|
if (t === 0) return Infinity / t > 0 ? "0" : "-0";
|
|
8808
8878
|
var f = String(t);
|
|
@@ -8814,65 +8884,65 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8814
8884
|
}
|
|
8815
8885
|
var h = s.depth === void 0 ? 5 : s.depth;
|
|
8816
8886
|
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return H(t) ? "[Array]" : "[Object]";
|
|
8817
|
-
var g =
|
|
8887
|
+
var g = ye(s, r);
|
|
8818
8888
|
if (o === void 0) o = [];
|
|
8819
|
-
else if (
|
|
8889
|
+
else if (oe(o, t) >= 0) return "[Circular]";
|
|
8820
8890
|
function y(t, n, i) {
|
|
8821
8891
|
if (n && (o = w.call(o), o.push(n)), i) {
|
|
8822
8892
|
var a = { depth: s.depth };
|
|
8823
|
-
return
|
|
8893
|
+
return q(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, o);
|
|
8824
8894
|
}
|
|
8825
8895
|
return e(t, s, r + 1, o);
|
|
8826
8896
|
}
|
|
8827
8897
|
if (typeof t == "function" && !ee(t)) {
|
|
8828
|
-
var x =
|
|
8898
|
+
var x = ae(t), T = xe(t, y);
|
|
8829
8899
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (T.length > 0 ? " { " + C.call(T, ", ") + " }" : "");
|
|
8830
8900
|
}
|
|
8831
|
-
if (
|
|
8901
|
+
if (G(t)) {
|
|
8832
8902
|
var D = k ? v.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : O.call(t);
|
|
8833
|
-
return typeof t == "object" && !k ?
|
|
8903
|
+
return typeof t == "object" && !k ? he(D) : D;
|
|
8834
8904
|
}
|
|
8835
|
-
if (
|
|
8905
|
+
if (fe(t)) {
|
|
8836
8906
|
for (var F = "<" + b.call(String(t.nodeName)), R = t.attributes || [], V = 0; V < R.length; V++) F += " " + R[V].name + "=" + z(B(R[V].value), "double", s);
|
|
8837
8907
|
return F += ">", t.childNodes && t.childNodes.length && (F += "..."), F += "</" + b.call(String(t.nodeName)) + ">", F;
|
|
8838
8908
|
}
|
|
8839
8909
|
if (H(t)) {
|
|
8840
8910
|
if (t.length === 0) return "[]";
|
|
8841
|
-
var
|
|
8842
|
-
return g && !
|
|
8911
|
+
var K = xe(t, y);
|
|
8912
|
+
return g && !ve(K) ? "[" + be(K, g) + "]" : "[ " + C.call(K, ", ") + " ]";
|
|
8843
8913
|
}
|
|
8844
8914
|
if (W(t)) {
|
|
8845
|
-
var
|
|
8846
|
-
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause),
|
|
8915
|
+
var me = xe(t, y);
|
|
8916
|
+
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause), me), ", ") + " }" : me.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + C.call(me, ", ") + " }";
|
|
8847
8917
|
}
|
|
8848
8918
|
if (typeof t == "object" && u) {
|
|
8849
8919
|
if (I && typeof t[I] == "function" && P) return P(t, { depth: h - r });
|
|
8850
8920
|
if (u !== "symbol" && typeof t.inspect == "function") return t.inspect();
|
|
8851
8921
|
}
|
|
8852
|
-
if (
|
|
8853
|
-
var
|
|
8922
|
+
if (se(t)) {
|
|
8923
|
+
var Se = [];
|
|
8854
8924
|
return a && a.call(t, function(e, n) {
|
|
8855
|
-
|
|
8856
|
-
}),
|
|
8925
|
+
Se.push(y(n, t, !0) + " => " + y(e, t));
|
|
8926
|
+
}), _e("Map", i.call(t), Se, g);
|
|
8857
8927
|
}
|
|
8858
|
-
if (
|
|
8859
|
-
var
|
|
8928
|
+
if (ue(t)) {
|
|
8929
|
+
var Ce = [];
|
|
8860
8930
|
return l && l.call(t, function(e) {
|
|
8861
|
-
|
|
8862
|
-
}),
|
|
8931
|
+
Ce.push(y(e, t));
|
|
8932
|
+
}), _e("Set", c.call(t), Ce, g);
|
|
8863
8933
|
}
|
|
8864
|
-
if (
|
|
8865
|
-
if (
|
|
8866
|
-
if (
|
|
8867
|
-
if (ne(t)) return
|
|
8868
|
-
if (
|
|
8869
|
-
if (
|
|
8870
|
-
if (te(t)) return
|
|
8934
|
+
if (ce(t)) return ge("WeakMap");
|
|
8935
|
+
if (de(t)) return ge("WeakSet");
|
|
8936
|
+
if (le(t)) return ge("WeakRef");
|
|
8937
|
+
if (ne(t)) return he(y(Number(t)));
|
|
8938
|
+
if (ie(t)) return he(y(E.call(t)));
|
|
8939
|
+
if (re(t)) return he(p.call(t));
|
|
8940
|
+
if (te(t)) return he(y(String(t)));
|
|
8871
8941
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
8872
8942
|
if (typeof globalThis < "u" && t === globalThis || typeof global < "u" && t === global) return "{ [object globalThis] }";
|
|
8873
8943
|
if (!U(t) && !ee(t)) {
|
|
8874
|
-
var
|
|
8875
|
-
return
|
|
8944
|
+
var we = xe(t, y), Y = M ? M(t) === Object.prototype : t instanceof Object || t.constructor === Object, Te = t instanceof Object ? "" : "null prototype", Ee = !Y && A && Object(t) === t && A in t ? _.call(J(t), 8, -1) : Te ? "Object" : "", X = (Y || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "") + (Ee || Te ? "[" + C.call(S.call([], Ee || [], Te || []), ": ") + "] " : "");
|
|
8945
|
+
return we.length === 0 ? X + "{}" : g ? X + "{" + be(we, g) + "}" : X + "{ " + C.call(we, ", ") + " }";
|
|
8876
8946
|
}
|
|
8877
8947
|
return String(t);
|
|
8878
8948
|
};
|
|
@@ -8887,27 +8957,27 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8887
8957
|
return !A || !(typeof e == "object" && (A in e || e[A] !== void 0));
|
|
8888
8958
|
}
|
|
8889
8959
|
function H(e) {
|
|
8890
|
-
return
|
|
8960
|
+
return J(e) === "[object Array]" && V(e);
|
|
8891
8961
|
}
|
|
8892
8962
|
function U(e) {
|
|
8893
|
-
return
|
|
8963
|
+
return J(e) === "[object Date]" && V(e);
|
|
8894
8964
|
}
|
|
8895
8965
|
function ee(e) {
|
|
8896
|
-
return
|
|
8966
|
+
return J(e) === "[object RegExp]" && V(e);
|
|
8897
8967
|
}
|
|
8898
8968
|
function W(e) {
|
|
8899
|
-
return
|
|
8969
|
+
return J(e) === "[object Error]" && V(e);
|
|
8900
8970
|
}
|
|
8901
8971
|
function te(e) {
|
|
8902
|
-
return
|
|
8972
|
+
return J(e) === "[object String]" && V(e);
|
|
8903
8973
|
}
|
|
8904
8974
|
function ne(e) {
|
|
8905
|
-
return
|
|
8975
|
+
return J(e) === "[object Number]" && V(e);
|
|
8906
8976
|
}
|
|
8907
|
-
function
|
|
8908
|
-
return
|
|
8977
|
+
function re(e) {
|
|
8978
|
+
return J(e) === "[object Boolean]" && V(e);
|
|
8909
8979
|
}
|
|
8910
|
-
function
|
|
8980
|
+
function G(e) {
|
|
8911
8981
|
if (k) return e && typeof e == "object" && e instanceof Symbol;
|
|
8912
8982
|
if (typeof e == "symbol") return !0;
|
|
8913
8983
|
if (!e || typeof e != "object" || !O) return !1;
|
|
@@ -8916,33 +8986,33 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8916
8986
|
} catch {}
|
|
8917
8987
|
return !1;
|
|
8918
8988
|
}
|
|
8919
|
-
function
|
|
8989
|
+
function ie(e) {
|
|
8920
8990
|
if (!e || typeof e != "object" || !E) return !1;
|
|
8921
8991
|
try {
|
|
8922
8992
|
return E.call(e), !0;
|
|
8923
8993
|
} catch {}
|
|
8924
8994
|
return !1;
|
|
8925
8995
|
}
|
|
8926
|
-
var
|
|
8996
|
+
var K = Object.prototype.hasOwnProperty || function(e) {
|
|
8927
8997
|
return e in this;
|
|
8928
8998
|
};
|
|
8929
|
-
function
|
|
8930
|
-
return
|
|
8999
|
+
function q(e, t) {
|
|
9000
|
+
return K.call(e, t);
|
|
8931
9001
|
}
|
|
8932
|
-
function
|
|
9002
|
+
function J(e) {
|
|
8933
9003
|
return m.call(e);
|
|
8934
9004
|
}
|
|
8935
|
-
function
|
|
9005
|
+
function ae(e) {
|
|
8936
9006
|
if (e.name) return e.name;
|
|
8937
9007
|
var t = g.call(h.call(e), /^function\s*([\w$]+)/);
|
|
8938
9008
|
return t ? t[1] : null;
|
|
8939
9009
|
}
|
|
8940
|
-
function
|
|
9010
|
+
function oe(e, t) {
|
|
8941
9011
|
if (e.indexOf) return e.indexOf(t);
|
|
8942
9012
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
8943
9013
|
return -1;
|
|
8944
9014
|
}
|
|
8945
|
-
function
|
|
9015
|
+
function se(e) {
|
|
8946
9016
|
if (!i || !e || typeof e != "object") return !1;
|
|
8947
9017
|
try {
|
|
8948
9018
|
i.call(e);
|
|
@@ -8955,7 +9025,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8955
9025
|
} catch {}
|
|
8956
9026
|
return !1;
|
|
8957
9027
|
}
|
|
8958
|
-
function
|
|
9028
|
+
function ce(e) {
|
|
8959
9029
|
if (!u || !e || typeof e != "object") return !1;
|
|
8960
9030
|
try {
|
|
8961
9031
|
u.call(e, u);
|
|
@@ -8968,14 +9038,14 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8968
9038
|
} catch {}
|
|
8969
9039
|
return !1;
|
|
8970
9040
|
}
|
|
8971
|
-
function
|
|
9041
|
+
function le(e) {
|
|
8972
9042
|
if (!f || !e || typeof e != "object") return !1;
|
|
8973
9043
|
try {
|
|
8974
9044
|
return f.call(e), !0;
|
|
8975
9045
|
} catch {}
|
|
8976
9046
|
return !1;
|
|
8977
9047
|
}
|
|
8978
|
-
function
|
|
9048
|
+
function ue(e) {
|
|
8979
9049
|
if (!c || !e || typeof e != "object") return !1;
|
|
8980
9050
|
try {
|
|
8981
9051
|
c.call(e);
|
|
@@ -8988,7 +9058,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
8988
9058
|
} catch {}
|
|
8989
9059
|
return !1;
|
|
8990
9060
|
}
|
|
8991
|
-
function
|
|
9061
|
+
function de(e) {
|
|
8992
9062
|
if (!d || !e || typeof e != "object") return !1;
|
|
8993
9063
|
try {
|
|
8994
9064
|
d.call(e, d);
|
|
@@ -9001,18 +9071,18 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9001
9071
|
} catch {}
|
|
9002
9072
|
return !1;
|
|
9003
9073
|
}
|
|
9004
|
-
function
|
|
9074
|
+
function fe(e) {
|
|
9005
9075
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
9006
9076
|
}
|
|
9007
|
-
function
|
|
9077
|
+
function pe(e, t) {
|
|
9008
9078
|
if (e.length > t.maxStringLength) {
|
|
9009
9079
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
9010
|
-
return
|
|
9080
|
+
return pe(_.call(e, 0, t.maxStringLength), t) + r;
|
|
9011
9081
|
}
|
|
9012
9082
|
var i = R[t.quoteStyle || "single"];
|
|
9013
|
-
return i.lastIndex = 0, z(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g,
|
|
9083
|
+
return i.lastIndex = 0, z(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g, me), "single", t);
|
|
9014
9084
|
}
|
|
9015
|
-
function
|
|
9085
|
+
function me(e) {
|
|
9016
9086
|
var t = e.charCodeAt(0), n = {
|
|
9017
9087
|
8: "b",
|
|
9018
9088
|
9: "t",
|
|
@@ -9022,21 +9092,21 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9022
9092
|
}[t];
|
|
9023
9093
|
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + y.call(t.toString(16));
|
|
9024
9094
|
}
|
|
9025
|
-
function
|
|
9095
|
+
function he(e) {
|
|
9026
9096
|
return "Object(" + e + ")";
|
|
9027
9097
|
}
|
|
9028
|
-
function
|
|
9098
|
+
function ge(e) {
|
|
9029
9099
|
return e + " { ? }";
|
|
9030
9100
|
}
|
|
9031
|
-
function
|
|
9032
|
-
var i = r ?
|
|
9101
|
+
function _e(e, t, n, r) {
|
|
9102
|
+
var i = r ? be(n, r) : C.call(n, ", ");
|
|
9033
9103
|
return e + " (" + t + ") {" + i + "}";
|
|
9034
9104
|
}
|
|
9035
|
-
function
|
|
9036
|
-
for (var t = 0; t < e.length; t++) if (
|
|
9105
|
+
function ve(e) {
|
|
9106
|
+
for (var t = 0; t < e.length; t++) if (oe(e[t], "\n") >= 0) return !1;
|
|
9037
9107
|
return !0;
|
|
9038
9108
|
}
|
|
9039
|
-
function
|
|
9109
|
+
function ye(e, t) {
|
|
9040
9110
|
var n;
|
|
9041
9111
|
if (e.indent === " ") n = " ";
|
|
9042
9112
|
else if (typeof e.indent == "number" && e.indent > 0) n = C.call(Array(e.indent + 1), " ");
|
|
@@ -9046,27 +9116,27 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9046
9116
|
prev: C.call(Array(t + 1), n)
|
|
9047
9117
|
};
|
|
9048
9118
|
}
|
|
9049
|
-
function
|
|
9119
|
+
function be(e, t) {
|
|
9050
9120
|
if (e.length === 0) return "";
|
|
9051
9121
|
var n = "\n" + t.prev + t.base;
|
|
9052
9122
|
return n + C.call(e, "," + n) + "\n" + t.prev;
|
|
9053
9123
|
}
|
|
9054
|
-
function
|
|
9124
|
+
function xe(e, t) {
|
|
9055
9125
|
var n = H(e), r = [];
|
|
9056
9126
|
if (n) {
|
|
9057
9127
|
r.length = e.length;
|
|
9058
|
-
for (var i = 0; i < e.length; i++) r[i] =
|
|
9128
|
+
for (var i = 0; i < e.length; i++) r[i] = q(e, i) ? t(e[i], e) : "";
|
|
9059
9129
|
}
|
|
9060
9130
|
var a = typeof D == "function" ? D(e) : [], o;
|
|
9061
9131
|
if (k) {
|
|
9062
9132
|
o = {};
|
|
9063
9133
|
for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s];
|
|
9064
9134
|
}
|
|
9065
|
-
for (var c in e)
|
|
9135
|
+
for (var c in e) q(e, c) && (n && String(Number(c)) === c && c < e.length || k && o["$" + c] instanceof Symbol || (x.call(/[^\w$]/, c) ? r.push(t(c, e) + ": " + t(e[c], e)) : r.push(c + ": " + t(e[c], e))));
|
|
9066
9136
|
if (typeof D == "function") for (var l = 0; l < a.length; l++) j.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
|
|
9067
9137
|
return r;
|
|
9068
9138
|
}
|
|
9069
|
-
})), ha = /* @__PURE__ */
|
|
9139
|
+
})), ha = /* @__PURE__ */ Z(((e, t) => {
|
|
9070
9140
|
var n = ma(), r = fa(), i = function(e, t, n) {
|
|
9071
9141
|
for (var r = e, i; (i = r.next) != null; r = i) if (i.key === t) return r.next = i.next, n || (i.next = e.next, e.next = i), i;
|
|
9072
9142
|
}, a = function(e, t) {
|
|
@@ -9107,44 +9177,44 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9107
9177
|
};
|
|
9108
9178
|
return t;
|
|
9109
9179
|
};
|
|
9110
|
-
})), ga = /* @__PURE__ */
|
|
9180
|
+
})), ga = /* @__PURE__ */ Z(((e, t) => {
|
|
9111
9181
|
t.exports = Object;
|
|
9112
|
-
})), _a = /* @__PURE__ */
|
|
9182
|
+
})), _a = /* @__PURE__ */ Z(((e, t) => {
|
|
9113
9183
|
t.exports = Error;
|
|
9114
|
-
})), va = /* @__PURE__ */
|
|
9184
|
+
})), va = /* @__PURE__ */ Z(((e, t) => {
|
|
9115
9185
|
t.exports = EvalError;
|
|
9116
|
-
})), ya = /* @__PURE__ */
|
|
9186
|
+
})), ya = /* @__PURE__ */ Z(((e, t) => {
|
|
9117
9187
|
t.exports = RangeError;
|
|
9118
|
-
})), ba = /* @__PURE__ */
|
|
9188
|
+
})), ba = /* @__PURE__ */ Z(((e, t) => {
|
|
9119
9189
|
t.exports = ReferenceError;
|
|
9120
|
-
})), xa = /* @__PURE__ */
|
|
9190
|
+
})), xa = /* @__PURE__ */ Z(((e, t) => {
|
|
9121
9191
|
t.exports = SyntaxError;
|
|
9122
|
-
})), Sa = /* @__PURE__ */
|
|
9192
|
+
})), Sa = /* @__PURE__ */ Z(((e, t) => {
|
|
9123
9193
|
t.exports = URIError;
|
|
9124
|
-
})), Ca = /* @__PURE__ */
|
|
9194
|
+
})), Ca = /* @__PURE__ */ Z(((e, t) => {
|
|
9125
9195
|
t.exports = Math.abs;
|
|
9126
|
-
})), wa = /* @__PURE__ */
|
|
9196
|
+
})), wa = /* @__PURE__ */ Z(((e, t) => {
|
|
9127
9197
|
t.exports = Math.floor;
|
|
9128
|
-
})), Ta = /* @__PURE__ */
|
|
9198
|
+
})), Ta = /* @__PURE__ */ Z(((e, t) => {
|
|
9129
9199
|
t.exports = Math.max;
|
|
9130
|
-
})), Ea = /* @__PURE__ */
|
|
9200
|
+
})), Ea = /* @__PURE__ */ Z(((e, t) => {
|
|
9131
9201
|
t.exports = Math.min;
|
|
9132
|
-
})), Da = /* @__PURE__ */
|
|
9202
|
+
})), Da = /* @__PURE__ */ Z(((e, t) => {
|
|
9133
9203
|
t.exports = Math.pow;
|
|
9134
|
-
})), Oa = /* @__PURE__ */
|
|
9204
|
+
})), Oa = /* @__PURE__ */ Z(((e, t) => {
|
|
9135
9205
|
t.exports = Math.round;
|
|
9136
|
-
})), ka = /* @__PURE__ */
|
|
9206
|
+
})), ka = /* @__PURE__ */ Z(((e, t) => {
|
|
9137
9207
|
t.exports = Number.isNaN || function(e) {
|
|
9138
9208
|
return e !== e;
|
|
9139
9209
|
};
|
|
9140
|
-
})), Aa = /* @__PURE__ */
|
|
9210
|
+
})), Aa = /* @__PURE__ */ Z(((e, t) => {
|
|
9141
9211
|
var n = ka();
|
|
9142
9212
|
t.exports = function(e) {
|
|
9143
9213
|
return n(e) || e === 0 ? e : e < 0 ? -1 : 1;
|
|
9144
9214
|
};
|
|
9145
|
-
})), ja = /* @__PURE__ */
|
|
9215
|
+
})), ja = /* @__PURE__ */ Z(((e, t) => {
|
|
9146
9216
|
t.exports = Object.getOwnPropertyDescriptor;
|
|
9147
|
-
})), Ma = /* @__PURE__ */
|
|
9217
|
+
})), Ma = /* @__PURE__ */ Z(((e, t) => {
|
|
9148
9218
|
var n = ja();
|
|
9149
9219
|
if (n) try {
|
|
9150
9220
|
n([], "length");
|
|
@@ -9152,7 +9222,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9152
9222
|
n = null;
|
|
9153
9223
|
}
|
|
9154
9224
|
t.exports = n;
|
|
9155
|
-
})), Na = /* @__PURE__ */
|
|
9225
|
+
})), Na = /* @__PURE__ */ Z(((e, t) => {
|
|
9156
9226
|
var n = Object.defineProperty || !1;
|
|
9157
9227
|
if (n) try {
|
|
9158
9228
|
n({}, "a", { value: 1 });
|
|
@@ -9160,7 +9230,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9160
9230
|
n = !1;
|
|
9161
9231
|
}
|
|
9162
9232
|
t.exports = n;
|
|
9163
|
-
})), Pa = /* @__PURE__ */
|
|
9233
|
+
})), Pa = /* @__PURE__ */ Z(((e, t) => {
|
|
9164
9234
|
t.exports = function() {
|
|
9165
9235
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
|
|
9166
9236
|
if (typeof Symbol.iterator == "symbol") return !0;
|
|
@@ -9177,16 +9247,16 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9177
9247
|
}
|
|
9178
9248
|
return !0;
|
|
9179
9249
|
};
|
|
9180
|
-
})), Fa = /* @__PURE__ */
|
|
9250
|
+
})), Fa = /* @__PURE__ */ Z(((e, t) => {
|
|
9181
9251
|
var n = typeof Symbol < "u" && Symbol, r = Pa();
|
|
9182
9252
|
t.exports = function() {
|
|
9183
9253
|
return typeof n != "function" || typeof Symbol != "function" || typeof n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
9184
9254
|
};
|
|
9185
|
-
})), Ia = /* @__PURE__ */
|
|
9255
|
+
})), Ia = /* @__PURE__ */ Z(((e, t) => {
|
|
9186
9256
|
t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
9187
|
-
})), La = /* @__PURE__ */
|
|
9257
|
+
})), La = /* @__PURE__ */ Z(((e, t) => {
|
|
9188
9258
|
t.exports = ga().getPrototypeOf || null;
|
|
9189
|
-
})), Ra = /* @__PURE__ */
|
|
9259
|
+
})), Ra = /* @__PURE__ */ Z(((e, t) => {
|
|
9190
9260
|
var n = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, a = "[object Function]", o = function(e, t) {
|
|
9191
9261
|
for (var n = [], r = 0; r < e.length; r += 1) n[r] = e[r];
|
|
9192
9262
|
for (var i = 0; i < t.length; i += 1) n[i + e.length] = t[i];
|
|
@@ -9214,25 +9284,25 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9214
9284
|
}
|
|
9215
9285
|
return u;
|
|
9216
9286
|
};
|
|
9217
|
-
})), za = /* @__PURE__ */
|
|
9287
|
+
})), za = /* @__PURE__ */ Z(((e, t) => {
|
|
9218
9288
|
var n = Ra();
|
|
9219
9289
|
t.exports = Function.prototype.bind || n;
|
|
9220
|
-
})), Ba = /* @__PURE__ */
|
|
9290
|
+
})), Ba = /* @__PURE__ */ Z(((e, t) => {
|
|
9221
9291
|
t.exports = Function.prototype.call;
|
|
9222
|
-
})), Va = /* @__PURE__ */
|
|
9292
|
+
})), Va = /* @__PURE__ */ Z(((e, t) => {
|
|
9223
9293
|
t.exports = Function.prototype.apply;
|
|
9224
|
-
})), Ha = /* @__PURE__ */
|
|
9294
|
+
})), Ha = /* @__PURE__ */ Z(((e, t) => {
|
|
9225
9295
|
t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
9226
|
-
})), Ua = /* @__PURE__ */
|
|
9296
|
+
})), Ua = /* @__PURE__ */ Z(((e, t) => {
|
|
9227
9297
|
var n = za(), r = Va(), i = Ba();
|
|
9228
9298
|
t.exports = Ha() || n.call(i, r);
|
|
9229
|
-
})), Wa = /* @__PURE__ */
|
|
9299
|
+
})), Wa = /* @__PURE__ */ Z(((e, t) => {
|
|
9230
9300
|
var n = za(), r = fa(), i = Ba(), a = Ua();
|
|
9231
9301
|
t.exports = function(e) {
|
|
9232
9302
|
if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
|
|
9233
9303
|
return a(n, i, e);
|
|
9234
9304
|
};
|
|
9235
|
-
})), Ga = /* @__PURE__ */
|
|
9305
|
+
})), Ga = /* @__PURE__ */ Z(((e, t) => {
|
|
9236
9306
|
var n = Wa(), r = Ma(), i;
|
|
9237
9307
|
try {
|
|
9238
9308
|
i = [].__proto__ === Array.prototype;
|
|
@@ -9243,7 +9313,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9243
9313
|
t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" ? function(e) {
|
|
9244
9314
|
return s(e == null ? e : o(e));
|
|
9245
9315
|
} : !1;
|
|
9246
|
-
})), Ka = /* @__PURE__ */
|
|
9316
|
+
})), Ka = /* @__PURE__ */ Z(((e, t) => {
|
|
9247
9317
|
var n = Ia(), r = La(), i = Ga();
|
|
9248
9318
|
t.exports = n ? function(e) {
|
|
9249
9319
|
return n(e);
|
|
@@ -9253,10 +9323,10 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9253
9323
|
} : i ? function(e) {
|
|
9254
9324
|
return i(e);
|
|
9255
9325
|
} : null;
|
|
9256
|
-
})), qa = /* @__PURE__ */
|
|
9326
|
+
})), qa = /* @__PURE__ */ Z(((e, t) => {
|
|
9257
9327
|
var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
|
|
9258
9328
|
t.exports = za().call(n, r);
|
|
9259
|
-
})), Ja = /* @__PURE__ */
|
|
9329
|
+
})), Ja = /* @__PURE__ */ Z(((e, t) => {
|
|
9260
9330
|
var n, r = ga(), i = _a(), a = va(), o = ya(), s = ba(), c = xa(), l = fa(), u = Sa(), d = Ca(), f = wa(), p = Ta(), m = Ea(), h = Da(), g = Oa(), _ = Aa(), v = Function, y = function(e) {
|
|
9261
9331
|
try {
|
|
9262
9332
|
return v("\"use strict\"; return (" + e + ").constructor;")();
|
|
@@ -9508,13 +9578,13 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9508
9578
|
}
|
|
9509
9579
|
return o;
|
|
9510
9580
|
};
|
|
9511
|
-
})), Ya = /* @__PURE__ */
|
|
9581
|
+
})), Ya = /* @__PURE__ */ Z(((e, t) => {
|
|
9512
9582
|
var n = Ja(), r = Wa(), i = r([n("%String.prototype.indexOf%")]);
|
|
9513
9583
|
t.exports = function(e, t) {
|
|
9514
9584
|
var a = n(e, !!t);
|
|
9515
9585
|
return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
|
|
9516
9586
|
};
|
|
9517
|
-
})), Xa = /* @__PURE__ */
|
|
9587
|
+
})), Xa = /* @__PURE__ */ Z(((e, t) => {
|
|
9518
9588
|
var n = Ja(), r = Ya(), i = ma(), a = fa(), o = n("%Map%", !0), s = r("Map.prototype.get", !0), c = r("Map.prototype.set", !0), l = r("Map.prototype.has", !0), u = r("Map.prototype.delete", !0), d = r("Map.prototype.size", !0);
|
|
9519
9589
|
t.exports = !!o && function() {
|
|
9520
9590
|
var e, t = {
|
|
@@ -9540,7 +9610,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9540
9610
|
};
|
|
9541
9611
|
return t;
|
|
9542
9612
|
};
|
|
9543
|
-
})), Za = /* @__PURE__ */
|
|
9613
|
+
})), Za = /* @__PURE__ */ Z(((e, t) => {
|
|
9544
9614
|
var n = Ja(), r = Ya(), i = ma(), a = Xa(), o = fa(), s = n("%WeakMap%", !0), c = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), u = r("WeakMap.prototype.has", !0), d = r("WeakMap.prototype.delete", !0);
|
|
9545
9615
|
t.exports = s ? function() {
|
|
9546
9616
|
var e, t, n = {
|
|
@@ -9565,7 +9635,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9565
9635
|
};
|
|
9566
9636
|
return n;
|
|
9567
9637
|
} : a;
|
|
9568
|
-
})), Qa = /* @__PURE__ */
|
|
9638
|
+
})), Qa = /* @__PURE__ */ Z(((e, t) => {
|
|
9569
9639
|
var n = fa(), r = ma(), i = ha(), a = Xa(), o = Za() || a || i;
|
|
9570
9640
|
t.exports = function() {
|
|
9571
9641
|
var e, t = {
|
|
@@ -9587,7 +9657,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9587
9657
|
};
|
|
9588
9658
|
return t;
|
|
9589
9659
|
};
|
|
9590
|
-
})), $a = /* @__PURE__ */
|
|
9660
|
+
})), $a = /* @__PURE__ */ Z(((e, t) => {
|
|
9591
9661
|
var n = String.prototype.replace, r = /%20/g, i = {
|
|
9592
9662
|
RFC1738: "RFC1738",
|
|
9593
9663
|
RFC3986: "RFC3986"
|
|
@@ -9605,7 +9675,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9605
9675
|
RFC1738: i.RFC1738,
|
|
9606
9676
|
RFC3986: i.RFC3986
|
|
9607
9677
|
};
|
|
9608
|
-
})), eo = /* @__PURE__ */
|
|
9678
|
+
})), eo = /* @__PURE__ */ Z(((e, t) => {
|
|
9609
9679
|
var n = $a(), r = Qa(), i = Object.prototype.hasOwnProperty, a = Array.isArray, o = r(), s = function(e, t) {
|
|
9610
9680
|
return o.set(e, t), e;
|
|
9611
9681
|
}, c = function(e) {
|
|
@@ -9757,7 +9827,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9757
9827
|
},
|
|
9758
9828
|
merge: m
|
|
9759
9829
|
};
|
|
9760
|
-
})), to = /* @__PURE__ */
|
|
9830
|
+
})), to = /* @__PURE__ */ Z(((e, t) => {
|
|
9761
9831
|
var n = Qa(), r = eo(), i = $a(), a = Object.prototype.hasOwnProperty, o = {
|
|
9762
9832
|
brackets: function(e) {
|
|
9763
9833
|
return e + "[]";
|
|
@@ -9890,7 +9960,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
9890
9960
|
var y = u.join(i.delimiter), b = i.addQueryPrefix === !0 ? "?" : "";
|
|
9891
9961
|
return i.charsetSentinel && (i.charset === "iso-8859-1" ? b += "utf8=%26%2310003%3B" + i.delimiter : b += "utf8=%E2%9C%93" + i.delimiter), y.length > 0 ? b + y : "";
|
|
9892
9962
|
};
|
|
9893
|
-
})), no = /* @__PURE__ */
|
|
9963
|
+
})), no = /* @__PURE__ */ Z(((e, t) => {
|
|
9894
9964
|
var n = eo(), r = Object.prototype.hasOwnProperty, i = Array.isArray, a = {
|
|
9895
9965
|
allowDots: !1,
|
|
9896
9966
|
allowEmptyArrays: !1,
|
|
@@ -10034,7 +10104,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
10034
10104
|
}
|
|
10035
10105
|
return r.allowSparse === !0 ? a : n.compact(a);
|
|
10036
10106
|
};
|
|
10037
|
-
})), ro = /* @__PURE__ */
|
|
10107
|
+
})), ro = /* @__PURE__ */ et((/* @__PURE__ */ Z(((e, t) => {
|
|
10038
10108
|
var n = to(), r = no();
|
|
10039
10109
|
t.exports = {
|
|
10040
10110
|
formats: $a(),
|
|
@@ -10053,12 +10123,12 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
10053
10123
|
encodeValuesOnly: !0
|
|
10054
10124
|
}, oo = {
|
|
10055
10125
|
go: () => {
|
|
10056
|
-
let { search: e, hash: t } =
|
|
10126
|
+
let { search: e, hash: t } = Me(), n = Ne();
|
|
10057
10127
|
return p(({ to: r, type: i, query: a, hash: o, options: { keepQuery: s, keepHash: c } = {} }) => {
|
|
10058
10128
|
let l = {
|
|
10059
10129
|
...s && e && ro.default.parse(e, {
|
|
10060
10130
|
ignoreQueryPrefix: !0,
|
|
10061
|
-
depth:
|
|
10131
|
+
depth: oe
|
|
10062
10132
|
}),
|
|
10063
10133
|
...a
|
|
10064
10134
|
};
|
|
@@ -10073,17 +10143,17 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
10073
10143
|
]);
|
|
10074
10144
|
},
|
|
10075
10145
|
back: () => {
|
|
10076
|
-
let e =
|
|
10146
|
+
let e = Ne();
|
|
10077
10147
|
return p(() => {
|
|
10078
10148
|
e(-1);
|
|
10079
10149
|
}, [e]);
|
|
10080
10150
|
},
|
|
10081
10151
|
parse: () => {
|
|
10082
|
-
let e =
|
|
10083
|
-
return Object.entries(e).length === 0 && o && (e =
|
|
10152
|
+
let e = Pe(), { pathname: t, search: n } = Me(), { resources: r } = m(ce), { resource: i, action: a, matchedRoute: o } = u.useMemo(() => le(t, r), [r, t]);
|
|
10153
|
+
return Object.entries(e).length === 0 && o && (e = Ae(o, t)?.params || {}), p(() => {
|
|
10084
10154
|
let r = ro.default.parse(n, {
|
|
10085
10155
|
ignoreQueryPrefix: !0,
|
|
10086
|
-
depth:
|
|
10156
|
+
depth: oe
|
|
10087
10157
|
}), o = {
|
|
10088
10158
|
...e,
|
|
10089
10159
|
...r
|
|
@@ -10109,7 +10179,7 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
10109
10179
|
]);
|
|
10110
10180
|
},
|
|
10111
10181
|
Link: u.forwardRef(function(e, t) {
|
|
10112
|
-
return /* @__PURE__ */ u.createElement(
|
|
10182
|
+
return /* @__PURE__ */ u.createElement(we, {
|
|
10113
10183
|
to: e.to,
|
|
10114
10184
|
...e,
|
|
10115
10185
|
ref: t
|
|
@@ -10119,7 +10189,11 @@ var fa = /* @__PURE__ */ Q(((e, t) => {
|
|
|
10119
10189
|
//#endregion
|
|
10120
10190
|
//#region src/components/layout/Navigation/PrimaryRail.tsx
|
|
10121
10191
|
function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
10122
|
-
let { t: i, language: a, changeLanguage: o } = $("desk"), { data: s } =
|
|
10192
|
+
let { t: i, language: a, changeLanguage: o } = $("desk"), { data: s } = me(), { mutate: c } = ye(), l = S(), { theme: u, setTheme: d } = J(), { supportedLocales: f, config: p } = jt(), { data: m = [] } = x({
|
|
10193
|
+
queryKey: ["switchable-profiles"],
|
|
10194
|
+
queryFn: () => yt.getSwitchableProfiles(),
|
|
10195
|
+
enabled: !!s && p?.enable_profile_switcher === !0
|
|
10196
|
+
}), h = (e) => {
|
|
10123
10197
|
let t = {
|
|
10124
10198
|
en: "English",
|
|
10125
10199
|
hi: "हिन्दी",
|
|
@@ -10135,12 +10209,12 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10135
10209
|
} catch {
|
|
10136
10210
|
return e;
|
|
10137
10211
|
}
|
|
10138
|
-
},
|
|
10212
|
+
}, _ = g(() => f.map((e) => ({
|
|
10139
10213
|
code: e.code,
|
|
10140
|
-
label: e.label ||
|
|
10141
|
-
})), [
|
|
10214
|
+
label: e.label || h(e.code)
|
|
10215
|
+
})), [f]), v = async (e) => {
|
|
10142
10216
|
if (await o(e), s?.id) try {
|
|
10143
|
-
let t = await st(`${
|
|
10217
|
+
let t = await st(`${Q}/UserPreferences?filters=${encodeURIComponent(JSON.stringify([{
|
|
10144
10218
|
field: "user_id",
|
|
10145
10219
|
operator: "eq",
|
|
10146
10220
|
value: s.id
|
|
@@ -10149,7 +10223,7 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10149
10223
|
let n = await t.json();
|
|
10150
10224
|
if (n.items && n.items.length > 0) {
|
|
10151
10225
|
let t = n.items[0];
|
|
10152
|
-
await st(`${
|
|
10226
|
+
await st(`${Q}/UserPreferences/${t.id}`, {
|
|
10153
10227
|
method: "PUT",
|
|
10154
10228
|
headers: { "Content-Type": "application/json" },
|
|
10155
10229
|
body: JSON.stringify({
|
|
@@ -10160,7 +10234,7 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10160
10234
|
}
|
|
10161
10235
|
})
|
|
10162
10236
|
});
|
|
10163
|
-
} else await st(`${
|
|
10237
|
+
} else await st(`${Q}/UserPreferences`, {
|
|
10164
10238
|
method: "POST",
|
|
10165
10239
|
headers: { "Content-Type": "application/json" },
|
|
10166
10240
|
body: JSON.stringify({
|
|
@@ -10172,10 +10246,10 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10172
10246
|
} catch (e) {
|
|
10173
10247
|
console.error("Failed to sync locale preference to backend:", e);
|
|
10174
10248
|
}
|
|
10175
|
-
},
|
|
10249
|
+
}, y = g(() => s?.name ? s.name.split(" ").map((e) => e[0]).join("").substring(0, 2).toUpperCase() : null, [s]), b = !!s, C = typeof document < "u" && document.documentElement.dir === "rtl", E = /* @__PURE__ */ T(q, {
|
|
10176
10250
|
maxWidth: 280,
|
|
10177
10251
|
children: [
|
|
10178
|
-
/* @__PURE__ */ T(
|
|
10252
|
+
m.length === 0 ? /* @__PURE__ */ T(q, {
|
|
10179
10253
|
padding: "$md",
|
|
10180
10254
|
gap: "$xs",
|
|
10181
10255
|
children: [/* @__PURE__ */ w(W, {
|
|
@@ -10189,13 +10263,115 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10189
10263
|
numberOfLines: 1,
|
|
10190
10264
|
children: s?.email || "Not signed in"
|
|
10191
10265
|
})]
|
|
10266
|
+
}) : /* @__PURE__ */ T(q, {
|
|
10267
|
+
padding: "$xs",
|
|
10268
|
+
gap: "$xs",
|
|
10269
|
+
children: [
|
|
10270
|
+
/* @__PURE__ */ w(W, {
|
|
10271
|
+
size: "$xs",
|
|
10272
|
+
color: "$colorMuted",
|
|
10273
|
+
paddingHorizontal: 8,
|
|
10274
|
+
paddingVertical: 4,
|
|
10275
|
+
children: i("Accounts")
|
|
10276
|
+
}),
|
|
10277
|
+
m.map((e) => {
|
|
10278
|
+
let t = e.id === s?.id, n = e.name ? e.name.split(" ").map((e) => e[0]).join("").substring(0, 2).toUpperCase() : "";
|
|
10279
|
+
return /* @__PURE__ */ T(K, {
|
|
10280
|
+
padding: 8,
|
|
10281
|
+
borderRadius: "$sm",
|
|
10282
|
+
hoverStyle: t ? void 0 : { backgroundColor: "$backgroundHover" },
|
|
10283
|
+
cursor: t ? "default" : "pointer",
|
|
10284
|
+
alignItems: "center",
|
|
10285
|
+
justifyContent: "space-between",
|
|
10286
|
+
gap: "$sm",
|
|
10287
|
+
onPress: t ? void 0 : async () => {
|
|
10288
|
+
let t = await yt.switchProfile(e.id);
|
|
10289
|
+
t.success && (window.location.href = t.redirectTo || "/app/dashboard");
|
|
10290
|
+
},
|
|
10291
|
+
children: [/* @__PURE__ */ T(K, {
|
|
10292
|
+
gap: "$sm",
|
|
10293
|
+
alignItems: "center",
|
|
10294
|
+
flex: 1,
|
|
10295
|
+
children: [/* @__PURE__ */ w(M, {
|
|
10296
|
+
fallback: n || /* @__PURE__ */ w(R, {
|
|
10297
|
+
name: "user",
|
|
10298
|
+
size: 14,
|
|
10299
|
+
color: "$colorMuted"
|
|
10300
|
+
}),
|
|
10301
|
+
size: 24,
|
|
10302
|
+
circular: !0
|
|
10303
|
+
}), /* @__PURE__ */ T(q, {
|
|
10304
|
+
flex: 1,
|
|
10305
|
+
minWidth: 0,
|
|
10306
|
+
children: [/* @__PURE__ */ w(W, {
|
|
10307
|
+
size: "$sm",
|
|
10308
|
+
fontWeight: t ? "bold" : "normal",
|
|
10309
|
+
numberOfLines: 1,
|
|
10310
|
+
children: e.name || e.email
|
|
10311
|
+
}), e.name && /* @__PURE__ */ w(W, {
|
|
10312
|
+
size: "$xs",
|
|
10313
|
+
color: "$colorMuted",
|
|
10314
|
+
numberOfLines: 1,
|
|
10315
|
+
children: e.email
|
|
10316
|
+
})]
|
|
10317
|
+
})]
|
|
10318
|
+
}), /* @__PURE__ */ T(K, {
|
|
10319
|
+
gap: "$xs",
|
|
10320
|
+
alignItems: "center",
|
|
10321
|
+
children: [t ? /* @__PURE__ */ w(R, {
|
|
10322
|
+
name: "check",
|
|
10323
|
+
size: 16,
|
|
10324
|
+
color: "var(--color-primary)"
|
|
10325
|
+
}) : null, /* @__PURE__ */ w(N, {
|
|
10326
|
+
className: "remove-profile-btn",
|
|
10327
|
+
variant: "ghost",
|
|
10328
|
+
size: "sm",
|
|
10329
|
+
padding: 0,
|
|
10330
|
+
width: 24,
|
|
10331
|
+
height: 24,
|
|
10332
|
+
style: { minWidth: 24 },
|
|
10333
|
+
onPress: async (n) => {
|
|
10334
|
+
n.stopPropagation();
|
|
10335
|
+
let r = await yt.removeProfile(e.id);
|
|
10336
|
+
r.success && (r.sessionTerminated ? window.location.href = r.redirectTo || "/login" : t ? window.location.href = r.redirectTo || "/app/dashboard" : l.invalidateQueries({ queryKey: ["switchable-profiles"] }));
|
|
10337
|
+
},
|
|
10338
|
+
"aria-label": `Remove profile ${e.name || e.email}`,
|
|
10339
|
+
children: /* @__PURE__ */ w(R, {
|
|
10340
|
+
name: "x",
|
|
10341
|
+
size: 14,
|
|
10342
|
+
color: "$colorMuted"
|
|
10343
|
+
})
|
|
10344
|
+
})]
|
|
10345
|
+
})]
|
|
10346
|
+
}, e.id);
|
|
10347
|
+
}),
|
|
10348
|
+
/* @__PURE__ */ T(N, {
|
|
10349
|
+
variant: "ghost",
|
|
10350
|
+
size: "sm",
|
|
10351
|
+
onPress: () => {
|
|
10352
|
+
let e = encodeURIComponent(window.location.pathname + window.location.search);
|
|
10353
|
+
window.location.href = `/login?add_account=true&to=${e}`;
|
|
10354
|
+
},
|
|
10355
|
+
style: {
|
|
10356
|
+
justifyContent: "flex-start",
|
|
10357
|
+
paddingHorizontal: 8
|
|
10358
|
+
},
|
|
10359
|
+
children: [/* @__PURE__ */ w(R, {
|
|
10360
|
+
name: "plus",
|
|
10361
|
+
size: 16
|
|
10362
|
+
}), /* @__PURE__ */ w(U, {
|
|
10363
|
+
size: "$sm",
|
|
10364
|
+
children: i("Add Account")
|
|
10365
|
+
})]
|
|
10366
|
+
})
|
|
10367
|
+
]
|
|
10192
10368
|
}),
|
|
10193
|
-
/* @__PURE__ */ w(
|
|
10194
|
-
/* @__PURE__ */ T(
|
|
10369
|
+
/* @__PURE__ */ w(re, {}),
|
|
10370
|
+
/* @__PURE__ */ T(q, {
|
|
10195
10371
|
padding: "$sm",
|
|
10196
10372
|
gap: "$sm",
|
|
10197
10373
|
children: [
|
|
10198
|
-
/* @__PURE__ */ T(
|
|
10374
|
+
/* @__PURE__ */ T(K, {
|
|
10199
10375
|
paddingHorizontal: 8,
|
|
10200
10376
|
paddingVertical: 4,
|
|
10201
10377
|
alignItems: "center",
|
|
@@ -10207,29 +10383,29 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10207
10383
|
children: i("Language")
|
|
10208
10384
|
}), /* @__PURE__ */ w(B, {
|
|
10209
10385
|
language: a,
|
|
10210
|
-
onChangeLanguage:
|
|
10211
|
-
locales:
|
|
10212
|
-
placement:
|
|
10386
|
+
onChangeLanguage: v,
|
|
10387
|
+
locales: _,
|
|
10388
|
+
placement: C ? "top-start" : "top-end"
|
|
10213
10389
|
})]
|
|
10214
10390
|
}),
|
|
10215
|
-
/* @__PURE__ */ w(
|
|
10391
|
+
/* @__PURE__ */ w(re, {}),
|
|
10216
10392
|
/* @__PURE__ */ T(N, {
|
|
10217
10393
|
variant: "ghost",
|
|
10218
10394
|
size: "sm",
|
|
10219
|
-
onPress: () => u
|
|
10395
|
+
onPress: () => d(u === "light" ? "dark" : "light"),
|
|
10220
10396
|
style: {
|
|
10221
10397
|
justifyContent: "flex-start",
|
|
10222
10398
|
paddingHorizontal: 8
|
|
10223
10399
|
},
|
|
10224
10400
|
children: [/* @__PURE__ */ w(R, {
|
|
10225
|
-
name:
|
|
10401
|
+
name: u === "light" ? "moon" : "sun",
|
|
10226
10402
|
size: 16
|
|
10227
10403
|
}), /* @__PURE__ */ w(U, {
|
|
10228
10404
|
size: "$sm",
|
|
10229
|
-
children:
|
|
10405
|
+
children: u === "light" ? "Dark Mode" : "Light Mode"
|
|
10230
10406
|
})]
|
|
10231
10407
|
}),
|
|
10232
|
-
|
|
10408
|
+
b ? /* @__PURE__ */ T(N, {
|
|
10233
10409
|
variant: "ghost",
|
|
10234
10410
|
size: "sm",
|
|
10235
10411
|
onPress: () => c(),
|
|
@@ -10268,10 +10444,10 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10268
10444
|
]
|
|
10269
10445
|
})
|
|
10270
10446
|
]
|
|
10271
|
-
}),
|
|
10272
|
-
placement: r ?
|
|
10447
|
+
}), D = /* @__PURE__ */ w(te, {
|
|
10448
|
+
placement: r ? C ? "top-start" : "top-end" : C ? "left-end" : "right-end",
|
|
10273
10449
|
trigger: /* @__PURE__ */ w(M, {
|
|
10274
|
-
fallback:
|
|
10450
|
+
fallback: y || /* @__PURE__ */ w(R, {
|
|
10275
10451
|
name: "user",
|
|
10276
10452
|
size: 20,
|
|
10277
10453
|
color: "$colorMuted"
|
|
@@ -10281,7 +10457,7 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10281
10457
|
borderWidth: 1,
|
|
10282
10458
|
borderColor: "$borderColor"
|
|
10283
10459
|
}),
|
|
10284
|
-
content:
|
|
10460
|
+
content: E
|
|
10285
10461
|
});
|
|
10286
10462
|
return /* @__PURE__ */ T(H, {
|
|
10287
10463
|
flexDirection: r ? "row" : "column",
|
|
@@ -10331,7 +10507,7 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10331
10507
|
flexDirection: r ? "row" : "column",
|
|
10332
10508
|
alignItems: "center",
|
|
10333
10509
|
gap: "$sm",
|
|
10334
|
-
children:
|
|
10510
|
+
children: D
|
|
10335
10511
|
})]
|
|
10336
10512
|
});
|
|
10337
10513
|
}
|
|
@@ -10339,7 +10515,7 @@ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
|
|
|
10339
10515
|
//#region src/components/layout/Navigation/ContextualDrawer.tsx
|
|
10340
10516
|
function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i }) {
|
|
10341
10517
|
let [a, o] = v({});
|
|
10342
|
-
if (!e || t) return /* @__PURE__ */ w(
|
|
10518
|
+
if (!e || t) return /* @__PURE__ */ w(q, {
|
|
10343
10519
|
width: 0,
|
|
10344
10520
|
backgroundColor: "$background",
|
|
10345
10521
|
overflow: "hidden",
|
|
@@ -10352,22 +10528,22 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10352
10528
|
}));
|
|
10353
10529
|
}, c = (e, t = 0) => {
|
|
10354
10530
|
let r = e.children && e.children.length > 0, i = a[e.name];
|
|
10355
|
-
return /* @__PURE__ */ T(
|
|
10531
|
+
return /* @__PURE__ */ T(q, {
|
|
10356
10532
|
width: "100%",
|
|
10357
|
-
children: [/* @__PURE__ */ w(
|
|
10533
|
+
children: [/* @__PURE__ */ w(K, {
|
|
10358
10534
|
width: "100%",
|
|
10359
10535
|
alignItems: "center",
|
|
10360
10536
|
paddingLeft: 16 + t * 16,
|
|
10361
10537
|
paddingRight: "$md",
|
|
10362
10538
|
minHeight: 37,
|
|
10363
10539
|
hoverStyle: { backgroundColor: "$backgroundHover" },
|
|
10364
|
-
children: /* @__PURE__ */ T(
|
|
10540
|
+
children: /* @__PURE__ */ T(K, {
|
|
10365
10541
|
flex: 1,
|
|
10366
10542
|
justifyContent: "space-between",
|
|
10367
10543
|
alignItems: "center",
|
|
10368
|
-
children: [/* @__PURE__ */ w(
|
|
10544
|
+
children: [/* @__PURE__ */ w(K, {
|
|
10369
10545
|
alignItems: "center",
|
|
10370
|
-
children: /* @__PURE__ */ w(
|
|
10546
|
+
children: /* @__PURE__ */ w(K, {
|
|
10371
10547
|
cursor: "pointer",
|
|
10372
10548
|
onPress: () => {
|
|
10373
10549
|
r ? s(e.name) : e.route && n(e.route);
|
|
@@ -10385,11 +10561,11 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10385
10561
|
children: e.label
|
|
10386
10562
|
})
|
|
10387
10563
|
})
|
|
10388
|
-
}), /* @__PURE__ */ T(
|
|
10564
|
+
}), /* @__PURE__ */ T(K, {
|
|
10389
10565
|
alignItems: "center",
|
|
10390
10566
|
gap: "$sm",
|
|
10391
10567
|
children: [
|
|
10392
|
-
e.type === "DocType" && !r && /* @__PURE__ */ w(
|
|
10568
|
+
e.type === "DocType" && !r && /* @__PURE__ */ w(K, {
|
|
10393
10569
|
cursor: "pointer",
|
|
10394
10570
|
alignItems: "center",
|
|
10395
10571
|
paddingVertical: "$2",
|
|
@@ -10410,7 +10586,7 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10410
10586
|
color: "$colorMuted"
|
|
10411
10587
|
})
|
|
10412
10588
|
}),
|
|
10413
|
-
e.badge && !r && /* @__PURE__ */ w(
|
|
10589
|
+
e.badge && !r && /* @__PURE__ */ w(q, {
|
|
10414
10590
|
backgroundColor: "$primary",
|
|
10415
10591
|
borderRadius: "$full",
|
|
10416
10592
|
paddingHorizontal: "$sm",
|
|
@@ -10420,7 +10596,7 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10420
10596
|
children: e.badge
|
|
10421
10597
|
})
|
|
10422
10598
|
}),
|
|
10423
|
-
r && /* @__PURE__ */ w(
|
|
10599
|
+
r && /* @__PURE__ */ w(K, {
|
|
10424
10600
|
cursor: "pointer",
|
|
10425
10601
|
onPress: () => s(e.name),
|
|
10426
10602
|
padding: "$1",
|
|
@@ -10434,10 +10610,10 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10434
10610
|
]
|
|
10435
10611
|
})]
|
|
10436
10612
|
})
|
|
10437
|
-
}), r && i && /* @__PURE__ */ w(
|
|
10613
|
+
}), r && i && /* @__PURE__ */ w(q, { children: e.children.map((e) => c(e, t + 1)) })]
|
|
10438
10614
|
}, e.name);
|
|
10439
10615
|
};
|
|
10440
|
-
return /* @__PURE__ */ T(
|
|
10616
|
+
return /* @__PURE__ */ T(q, {
|
|
10441
10617
|
width: r ? "100%" : 240,
|
|
10442
10618
|
position: r ? "fixed" : "relative",
|
|
10443
10619
|
top: r ? 0 : void 0,
|
|
@@ -10454,7 +10630,7 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10454
10630
|
transition: "width 0.2s ease",
|
|
10455
10631
|
boxShadow: r ? "0 -10px 40px rgba(0,0,0,0.1)" : "none"
|
|
10456
10632
|
},
|
|
10457
|
-
children: [/* @__PURE__ */ T(
|
|
10633
|
+
children: [/* @__PURE__ */ T(K, {
|
|
10458
10634
|
padding: "$md",
|
|
10459
10635
|
minHeight: 58,
|
|
10460
10636
|
borderBottomWidth: 1,
|
|
@@ -10479,7 +10655,7 @@ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
|
|
|
10479
10655
|
color: "$colorMuted"
|
|
10480
10656
|
})
|
|
10481
10657
|
})]
|
|
10482
|
-
}), /* @__PURE__ */ w(
|
|
10658
|
+
}), /* @__PURE__ */ w(q, {
|
|
10483
10659
|
flex: 1,
|
|
10484
10660
|
overflowX: "auto",
|
|
10485
10661
|
paddingVertical: "$sm",
|
|
@@ -10497,7 +10673,7 @@ function lo({ apps: e, defaultAppId: t, collapsed: n = !1, onNavigate: r, isMobi
|
|
|
10497
10673
|
!o && e.length > 0 && s(e[0].app_id);
|
|
10498
10674
|
}, [e, o]);
|
|
10499
10675
|
let f = e.find((e) => e.app_id === o) || e[0];
|
|
10500
|
-
return /* @__PURE__ */ T(
|
|
10676
|
+
return /* @__PURE__ */ T(K, {
|
|
10501
10677
|
height: i ? "auto" : "100%",
|
|
10502
10678
|
flexDirection: i ? "column-reverse" : "row",
|
|
10503
10679
|
overflow: "visible",
|
|
@@ -10522,15 +10698,15 @@ function lo({ apps: e, defaultAppId: t, collapsed: n = !1, onNavigate: r, isMobi
|
|
|
10522
10698
|
//#endregion
|
|
10523
10699
|
//#region src/components/layout/DefaultLandingPage.tsx
|
|
10524
10700
|
function uo({ title: e = "Welcome" }) {
|
|
10525
|
-
let t =
|
|
10526
|
-
return /* @__PURE__ */ T(
|
|
10701
|
+
let t = Ne(), { theme: n, toggleTheme: r } = J(), { t: i } = Re("desk");
|
|
10702
|
+
return /* @__PURE__ */ T(q, {
|
|
10527
10703
|
minHeight: "100vh",
|
|
10528
10704
|
justifyContent: "center",
|
|
10529
10705
|
alignItems: "center",
|
|
10530
10706
|
position: "relative",
|
|
10531
10707
|
padding: "$xl",
|
|
10532
10708
|
style: { background: n === "dark" ? "radial-gradient(ellipse at top, #1e1b4b 0%, #0f0f1a 60%)" : "radial-gradient(ellipse at top, #ede9fe 0%, #f8fafc 60%)" },
|
|
10533
|
-
children: [/* @__PURE__ */ w(
|
|
10709
|
+
children: [/* @__PURE__ */ w(K, {
|
|
10534
10710
|
position: "absolute",
|
|
10535
10711
|
top: "$lg",
|
|
10536
10712
|
right: "$lg",
|
|
@@ -10546,11 +10722,11 @@ function uo({ title: e = "Welcome" }) {
|
|
|
10546
10722
|
size: 20
|
|
10547
10723
|
})
|
|
10548
10724
|
})
|
|
10549
|
-
}), /* @__PURE__ */ T(
|
|
10725
|
+
}), /* @__PURE__ */ T(q, {
|
|
10550
10726
|
alignItems: "center",
|
|
10551
10727
|
gap: "$lg",
|
|
10552
10728
|
maxWidth: 600,
|
|
10553
|
-
children: [/* @__PURE__ */ T(
|
|
10729
|
+
children: [/* @__PURE__ */ T(q, {
|
|
10554
10730
|
alignItems: "center",
|
|
10555
10731
|
gap: "$sm",
|
|
10556
10732
|
children: [/* @__PURE__ */ w(L, {
|
|
@@ -10569,7 +10745,7 @@ function uo({ title: e = "Welcome" }) {
|
|
|
10569
10745
|
maxWidth: 440,
|
|
10570
10746
|
children: i("A modern, modular business platform. Built for teams that move fast.")
|
|
10571
10747
|
})]
|
|
10572
|
-
}), /* @__PURE__ */ w(
|
|
10748
|
+
}), /* @__PURE__ */ w(K, {
|
|
10573
10749
|
gap: "$md",
|
|
10574
10750
|
flexWrap: "wrap",
|
|
10575
10751
|
justifyContent: "center",
|
|
@@ -10583,7 +10759,7 @@ function uo({ title: e = "Welcome" }) {
|
|
|
10583
10759
|
})]
|
|
10584
10760
|
});
|
|
10585
10761
|
}
|
|
10586
|
-
|
|
10762
|
+
We.isInitialized || We.use(Ge).use(Ke).use(Le).init({
|
|
10587
10763
|
fallbackLng: "en",
|
|
10588
10764
|
ns: [
|
|
10589
10765
|
"common",
|
|
@@ -10609,7 +10785,7 @@ Ue.isInitialized || Ue.use(We).use(Ge).use(Ie).init({
|
|
|
10609
10785
|
nsSeparator: !1,
|
|
10610
10786
|
interpolation: { escapeValue: !1 },
|
|
10611
10787
|
react: { useSuspense: !0 }
|
|
10612
|
-
}), typeof document < "u" &&
|
|
10788
|
+
}), typeof document < "u" && We.on("languageChanged", (e) => {
|
|
10613
10789
|
document.documentElement.lang = e;
|
|
10614
10790
|
let t = [
|
|
10615
10791
|
"ur",
|
|
@@ -10620,8 +10796,8 @@ Ue.isInitialized || Ue.use(We).use(Ge).use(Ie).init({
|
|
|
10620
10796
|
].includes(e.split("-")[0]);
|
|
10621
10797
|
document.documentElement.dir = t ? "rtl" : "ltr";
|
|
10622
10798
|
});
|
|
10623
|
-
var fo =
|
|
10624
|
-
let t =
|
|
10799
|
+
var fo = We, po = ({ isMobile: e }) => {
|
|
10800
|
+
let t = Ne(), { data: n } = me(), r = l(n?.roles ?? []), i = _(!1);
|
|
10625
10801
|
u.useEffect(() => {
|
|
10626
10802
|
n?.locale && !i.current && (i.current = !0, fo.language !== n.locale && fo.changeLanguage(n.locale));
|
|
10627
10803
|
}, [n]);
|
|
@@ -10631,7 +10807,7 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10631
10807
|
installed: e || "(all)",
|
|
10632
10808
|
result: i.map((e) => e.app_id).join(", ")
|
|
10633
10809
|
}), i;
|
|
10634
|
-
}, [r]), o = /* @__PURE__ */ w(
|
|
10810
|
+
}, [r]), o = /* @__PURE__ */ w(q, {
|
|
10635
10811
|
tag: "main",
|
|
10636
10812
|
flex: 1,
|
|
10637
10813
|
minWidth: 0,
|
|
@@ -10640,26 +10816,26 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10640
10816
|
paddingHorizontal: e ? "$md" : "$lg",
|
|
10641
10817
|
paddingVertical: "$lg",
|
|
10642
10818
|
backgroundColor: "$background",
|
|
10643
|
-
children: /* @__PURE__ */ w(
|
|
10819
|
+
children: /* @__PURE__ */ w(Ee, {})
|
|
10644
10820
|
}), s = /* @__PURE__ */ w(lo, {
|
|
10645
10821
|
apps: a,
|
|
10646
10822
|
isMobile: e,
|
|
10647
10823
|
onNavigate: (e) => t(e)
|
|
10648
10824
|
});
|
|
10649
|
-
return e ? /* @__PURE__ */ T(
|
|
10825
|
+
return e ? /* @__PURE__ */ T(q, {
|
|
10650
10826
|
flex: 1,
|
|
10651
10827
|
height: "100vh",
|
|
10652
10828
|
overflow: "hidden",
|
|
10653
10829
|
children: [o, s]
|
|
10654
|
-
}) : /* @__PURE__ */ T(
|
|
10830
|
+
}) : /* @__PURE__ */ T(K, {
|
|
10655
10831
|
flex: 1,
|
|
10656
10832
|
height: "100vh",
|
|
10657
10833
|
overflow: "hidden",
|
|
10658
10834
|
children: [s, o]
|
|
10659
10835
|
});
|
|
10660
10836
|
}, mo = () => {
|
|
10661
|
-
let { pathname: e, search: t } =
|
|
10662
|
-
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Pr, {}), /* @__PURE__ */ w(
|
|
10837
|
+
let { pathname: e, search: t } = Me(), n = encodeURIComponent(`${e}${t}`);
|
|
10838
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Pr, {}), /* @__PURE__ */ w(Te, {
|
|
10663
10839
|
to: `/login?to=${n}`,
|
|
10664
10840
|
replace: !0
|
|
10665
10841
|
})] });
|
|
@@ -10667,69 +10843,69 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10667
10843
|
let e = u.useContext(go);
|
|
10668
10844
|
if (!e) return null;
|
|
10669
10845
|
let { title: t, loginPage: n, children: r, isMobile: i, publicPluginRoutes: a, authenticatedPluginRoutes: o, hasPluginRootRoute: s } = e;
|
|
10670
|
-
return /* @__PURE__ */ T(
|
|
10846
|
+
return /* @__PURE__ */ T(Oe, { children: [
|
|
10671
10847
|
a,
|
|
10672
|
-
!s && /* @__PURE__ */ w(
|
|
10848
|
+
!s && /* @__PURE__ */ w(X, {
|
|
10673
10849
|
path: "/",
|
|
10674
10850
|
element: /* @__PURE__ */ w(uo, { title: t })
|
|
10675
10851
|
}),
|
|
10676
|
-
/* @__PURE__ */ w(
|
|
10852
|
+
/* @__PURE__ */ w(X, {
|
|
10677
10853
|
path: "/login",
|
|
10678
10854
|
element: n ?? /* @__PURE__ */ w(ea, { title: t })
|
|
10679
10855
|
}),
|
|
10680
|
-
/* @__PURE__ */ T(
|
|
10681
|
-
element: /* @__PURE__ */ w(
|
|
10856
|
+
/* @__PURE__ */ T(X, {
|
|
10857
|
+
element: /* @__PURE__ */ w(ae, {
|
|
10682
10858
|
fallback: /* @__PURE__ */ w(mo, {}),
|
|
10683
10859
|
loading: /* @__PURE__ */ w(Pr, {}),
|
|
10684
10860
|
children: /* @__PURE__ */ w(po, { isMobile: i })
|
|
10685
10861
|
}, "authenticated-routes"),
|
|
10686
|
-
children: [o, /* @__PURE__ */ T(
|
|
10862
|
+
children: [o, /* @__PURE__ */ T(X, {
|
|
10687
10863
|
path: "/app",
|
|
10688
10864
|
children: [
|
|
10689
|
-
/* @__PURE__ */ w(
|
|
10865
|
+
/* @__PURE__ */ w(X, {
|
|
10690
10866
|
index: !0,
|
|
10691
|
-
element: /* @__PURE__ */ w(
|
|
10867
|
+
element: /* @__PURE__ */ w(Te, { to: "/app/dashboard" })
|
|
10692
10868
|
}),
|
|
10693
|
-
/* @__PURE__ */ w(
|
|
10869
|
+
/* @__PURE__ */ w(X, {
|
|
10694
10870
|
path: "dashboard",
|
|
10695
10871
|
element: r
|
|
10696
10872
|
}),
|
|
10697
|
-
/* @__PURE__ */ T(
|
|
10873
|
+
/* @__PURE__ */ T(X, {
|
|
10698
10874
|
path: ":doctype",
|
|
10699
10875
|
children: [
|
|
10700
|
-
/* @__PURE__ */ w(
|
|
10876
|
+
/* @__PURE__ */ w(X, {
|
|
10701
10877
|
index: !0,
|
|
10702
|
-
element: /* @__PURE__ */ w(
|
|
10878
|
+
element: /* @__PURE__ */ w(Te, { to: "list" })
|
|
10703
10879
|
}),
|
|
10704
|
-
/* @__PURE__ */ w(
|
|
10880
|
+
/* @__PURE__ */ w(X, {
|
|
10705
10881
|
path: "list",
|
|
10706
10882
|
element: /* @__PURE__ */ w(Wi, {})
|
|
10707
10883
|
}),
|
|
10708
|
-
/* @__PURE__ */ w(
|
|
10884
|
+
/* @__PURE__ */ w(X, {
|
|
10709
10885
|
path: "kanban",
|
|
10710
10886
|
element: /* @__PURE__ */ w(Wi, { view: "kanban" })
|
|
10711
10887
|
}),
|
|
10712
|
-
/* @__PURE__ */ w(
|
|
10888
|
+
/* @__PURE__ */ w(X, {
|
|
10713
10889
|
path: "tree",
|
|
10714
10890
|
element: /* @__PURE__ */ w(Wi, { view: "tree" })
|
|
10715
10891
|
}),
|
|
10716
|
-
/* @__PURE__ */ w(
|
|
10892
|
+
/* @__PURE__ */ w(X, {
|
|
10717
10893
|
path: "gantt",
|
|
10718
10894
|
element: /* @__PURE__ */ w(Wi, { view: "gantt" })
|
|
10719
10895
|
}),
|
|
10720
|
-
/* @__PURE__ */ w(
|
|
10896
|
+
/* @__PURE__ */ w(X, {
|
|
10721
10897
|
path: "calendar",
|
|
10722
10898
|
element: /* @__PURE__ */ w(Wi, { view: "calendar" })
|
|
10723
10899
|
}),
|
|
10724
|
-
/* @__PURE__ */ w(
|
|
10900
|
+
/* @__PURE__ */ w(X, {
|
|
10725
10901
|
path: "new",
|
|
10726
10902
|
element: /* @__PURE__ */ w(Yi, {})
|
|
10727
10903
|
}),
|
|
10728
|
-
/* @__PURE__ */ w(
|
|
10904
|
+
/* @__PURE__ */ w(X, {
|
|
10729
10905
|
path: "detail/:id",
|
|
10730
10906
|
element: /* @__PURE__ */ w(Yi, {})
|
|
10731
10907
|
}),
|
|
10732
|
-
/* @__PURE__ */ w(
|
|
10908
|
+
/* @__PURE__ */ w(X, {
|
|
10733
10909
|
path: "edit/:id",
|
|
10734
10910
|
element: /* @__PURE__ */ w(Yi, {})
|
|
10735
10911
|
})
|
|
@@ -10738,12 +10914,12 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10738
10914
|
]
|
|
10739
10915
|
})]
|
|
10740
10916
|
}),
|
|
10741
|
-
/* @__PURE__ */ w(
|
|
10917
|
+
/* @__PURE__ */ w(X, {
|
|
10742
10918
|
path: "*",
|
|
10743
|
-
element: /* @__PURE__ */ w(
|
|
10919
|
+
element: /* @__PURE__ */ w(Te, { to: "/" })
|
|
10744
10920
|
})
|
|
10745
10921
|
] });
|
|
10746
|
-
}, vo = () => /* @__PURE__ */ w(
|
|
10922
|
+
}, vo = () => /* @__PURE__ */ w(se, {
|
|
10747
10923
|
dataProvider: _t,
|
|
10748
10924
|
authProvider: yt,
|
|
10749
10925
|
routerProvider: oo,
|
|
@@ -10764,7 +10940,7 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10764
10940
|
let D = g(() => {
|
|
10765
10941
|
let n = t.getInstance();
|
|
10766
10942
|
n.setContext({
|
|
10767
|
-
frameworkMode:
|
|
10943
|
+
frameworkMode: rt,
|
|
10768
10944
|
serviceName: f || "core"
|
|
10769
10945
|
}), n.setPermissionChecker(async (e) => {
|
|
10770
10946
|
if (e.length === 0) return !0;
|
|
@@ -10846,7 +11022,7 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10846
11022
|
for (let i of e) {
|
|
10847
11023
|
let e = i.path.startsWith("/") ? i.path : `/${i.path}`, a = !!i.isPublic;
|
|
10848
11024
|
a && e === "/" && (r = !0);
|
|
10849
|
-
let o = typeof i.element == "function" && !i.element.$$typeof ? u.lazy(i.element) : null, s = /* @__PURE__ */ w(
|
|
11025
|
+
let o = typeof i.element == "function" && !i.element.$$typeof ? u.lazy(i.element) : null, s = /* @__PURE__ */ w(X, {
|
|
10850
11026
|
path: e,
|
|
10851
11027
|
element: o ? /* @__PURE__ */ w(o, {}) : typeof i.element == "function" ? i.element() : i.element
|
|
10852
11028
|
}, e);
|
|
@@ -10857,10 +11033,10 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10857
11033
|
authenticatedPluginRoutes: n,
|
|
10858
11034
|
hasPluginRootRoute: r
|
|
10859
11035
|
};
|
|
10860
|
-
}, [D, O]), P = `${globalThis.location?.protocol === "https:" ? "wss:" : "ws:"}//${globalThis.location?.host}/api/v1/stream`, F = g(() =>
|
|
11036
|
+
}, [D, O]), P = `${globalThis.location?.protocol === "https:" ? "wss:" : "ws:"}//${globalThis.location?.host}/api/v1/stream`, F = g(() => ke([{
|
|
10861
11037
|
path: "*",
|
|
10862
11038
|
element: /* @__PURE__ */ w(vo, {})
|
|
10863
|
-
}], { basename:
|
|
11039
|
+
}], { basename: tt }), []);
|
|
10864
11040
|
return /* @__PURE__ */ w(go.Provider, {
|
|
10865
11041
|
value: {
|
|
10866
11042
|
title: n,
|
|
@@ -10871,11 +11047,11 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10871
11047
|
authenticatedPluginRoutes: M,
|
|
10872
11048
|
hasPluginRootRoute: N
|
|
10873
11049
|
},
|
|
10874
|
-
children: /* @__PURE__ */ w(
|
|
11050
|
+
children: /* @__PURE__ */ w(Ie, {
|
|
10875
11051
|
i18n: fo,
|
|
10876
11052
|
children: /* @__PURE__ */ w(r, {
|
|
10877
11053
|
registry: D,
|
|
10878
|
-
children: /* @__PURE__ */ w(
|
|
11054
|
+
children: /* @__PURE__ */ w(ie, { children: /* @__PURE__ */ w(V, { children: /* @__PURE__ */ w(u.Suspense, {
|
|
10879
11055
|
fallback: /* @__PURE__ */ w(Pr, {}),
|
|
10880
11056
|
children: /* @__PURE__ */ w(b, {
|
|
10881
11057
|
client: m,
|
|
@@ -10887,7 +11063,7 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10887
11063
|
initialPlugins: l,
|
|
10888
11064
|
focusMode: h,
|
|
10889
11065
|
setFocusMode: x,
|
|
10890
|
-
children: /* @__PURE__ */ w(
|
|
11066
|
+
children: /* @__PURE__ */ w(De, { router: F })
|
|
10891
11067
|
})
|
|
10892
11068
|
})
|
|
10893
11069
|
}) }) })
|
|
@@ -10896,6 +11072,6 @@ var fo = Ue, po = ({ isMobile: e }) => {
|
|
|
10896
11072
|
});
|
|
10897
11073
|
};
|
|
10898
11074
|
//#endregion
|
|
10899
|
-
export {
|
|
11075
|
+
export { Q as API_URL, lr as AlertBanner, jr as AsOfDatePicker, Er as AuditTimeline, $n as AutoForm, ar as AutoTable, Di as Breadcrumb, dr as BulkActionsBar, Qr as CalendarView, ji as ColumnGrid, Ti as CommandPalette, sr as ConfirmDialog, bi as CorrectButton, yi as CorrectionWizard, wr as DiffViewer, or as EditableCell, Jn as FieldRegistry, Yi as FormView, yo as FrameworkMShell, ni as GanttView, Yr as KanbanView, Ni as Layout, kn as LinkField, Wi as ListView, ea as LoginPage, it as META_URL, Ei as Menu, Mi as PageHeader, qt as SectionField, Ki as ShellContext, ua as ShellProvider, Pr as ShellSkeleton, Ci as SiblingPanel, Sr as Slot, mr as StateBadge, ur as SubmittedBanner, At as SystemConfigProvider, Kt as TabContainer, oi as TreeView, ot as WS_URL, _r as WorkflowActions, Pi as WorkspaceSection, yt as authProvider, Et as closeAllConnections, da as createWebSocketRealtimeAdapter, _t as frameworkMDataProvider, vt as getAuthConfig, Hr as getDocTypeViews, zr as getRegisteredViews, Rr as getViewComponent, Br as getViewRegistration, Ur as isViewAvailable, Tt as liveProvider, yr as registerSlot, Lr as registerView, Vr as setDocTypeViews, dn as useAuditTimeline, nn as useBulkActions, rn as useCommandPalette, cn as useCorrectionAction, Lt as useDocTypeMeta, Yt as useDocTypes, tn as useInlineEdit, Rt as usePrefetchDocTypeMeta, qi as useShell, pn as useSiblingDocTypes, jt as useSystemConfig, $ as useTranslation, Qt as useWorkflowActions };
|
|
10900
11076
|
|
|
10901
11077
|
//# sourceMappingURL=index.js.map
|