lkd-web-kit 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +118 -0
- package/dist/index.cjs10.js +16 -0
- package/dist/index.cjs11.js +16 -0
- package/dist/index.cjs12.js +16 -0
- package/dist/index.cjs13.js +16 -0
- package/dist/index.cjs14.js +118 -0
- package/dist/index.cjs15.js +16 -0
- package/dist/index.cjs16.js +18 -0
- package/dist/index.cjs17.js +70 -0
- package/dist/index.cjs18.js +14 -0
- package/dist/index.cjs19.js +66 -0
- package/dist/index.cjs2.js +43 -0
- package/dist/index.cjs20.js +21 -0
- package/dist/index.cjs21.js +30 -0
- package/dist/index.cjs22.js +23 -0
- package/dist/index.cjs23.js +15 -0
- package/dist/index.cjs24.js +16 -0
- package/dist/index.cjs25.js +16 -0
- package/dist/index.cjs26.js +18 -0
- package/dist/index.cjs27.js +17 -0
- package/dist/index.cjs28.js +17 -0
- package/dist/index.cjs29.js +17 -0
- package/dist/index.cjs3.js +12 -0
- package/dist/index.cjs30.js +17 -0
- package/dist/index.cjs31.js +17 -0
- package/dist/index.cjs32.js +17 -0
- package/dist/index.cjs33.js +17 -0
- package/dist/index.cjs34.js +17 -0
- package/dist/index.cjs35.js +29 -0
- package/dist/index.cjs36.js +17 -0
- package/dist/index.cjs37.js +17 -0
- package/dist/index.cjs38.js +51 -0
- package/dist/index.cjs39.js +38 -0
- package/dist/index.cjs4.js +40 -0
- package/dist/index.cjs40.js +15 -0
- package/dist/index.cjs41.js +23 -0
- package/dist/index.cjs42.js +39 -0
- package/dist/index.cjs43.js +24 -0
- package/dist/index.cjs44.js +14 -0
- package/dist/index.cjs45.js +19 -0
- package/dist/index.cjs46.js +43 -0
- package/dist/index.cjs47.js +14 -0
- package/dist/index.cjs48.js +20 -0
- package/dist/index.cjs49.js +11 -0
- package/dist/index.cjs5.js +54 -0
- package/dist/index.cjs50.js +45 -0
- package/dist/index.cjs51.js +19 -0
- package/dist/index.cjs52.js +24 -0
- package/dist/index.cjs53.js +7 -0
- package/dist/index.cjs54.js +65 -0
- package/dist/index.cjs6.js +18 -0
- package/dist/index.cjs7.js +18 -0
- package/dist/index.cjs8.js +17 -0
- package/dist/index.cjs9.js +16 -0
- package/dist/index.es.js +52 -0
- package/dist/index.es10.js +12 -0
- package/dist/index.es11.js +12 -0
- package/dist/index.es12.js +12 -0
- package/dist/index.es13.js +12 -0
- package/dist/index.es14.js +114 -0
- package/dist/index.es15.js +12 -0
- package/dist/index.es16.js +14 -0
- package/dist/index.es17.js +66 -0
- package/dist/index.es18.js +10 -0
- package/dist/index.es19.js +60 -0
- package/dist/index.es2.js +39 -0
- package/dist/index.es20.js +16 -0
- package/dist/index.es21.js +26 -0
- package/dist/index.es22.js +19 -0
- package/dist/index.es23.js +11 -0
- package/dist/index.es24.js +12 -0
- package/dist/index.es25.js +12 -0
- package/dist/index.es26.js +14 -0
- package/dist/index.es27.js +13 -0
- package/dist/index.es28.js +13 -0
- package/dist/index.es29.js +13 -0
- package/dist/index.es3.js +8 -0
- package/dist/index.es30.js +13 -0
- package/dist/index.es31.js +13 -0
- package/dist/index.es32.js +13 -0
- package/dist/index.es33.js +13 -0
- package/dist/index.es34.js +13 -0
- package/dist/index.es35.js +23 -0
- package/dist/index.es36.js +13 -0
- package/dist/index.es37.js +13 -0
- package/dist/index.es38.js +47 -0
- package/dist/index.es39.js +34 -0
- package/dist/index.es4.js +36 -0
- package/dist/index.es40.js +11 -0
- package/dist/index.es41.js +19 -0
- package/dist/index.es42.js +35 -0
- package/dist/index.es43.js +20 -0
- package/dist/{src/mantine/breakpoints-with-px.js → index.es44.js} +4 -5
- package/dist/index.es45.js +15 -0
- package/dist/index.es46.js +39 -0
- package/dist/index.es47.js +10 -0
- package/dist/index.es48.js +15 -0
- package/dist/index.es49.js +7 -0
- package/dist/index.es5.js +50 -0
- package/dist/index.es50.js +40 -0
- package/dist/index.es51.js +15 -0
- package/dist/index.es52.js +20 -0
- package/dist/index.es53.js +3 -0
- package/dist/index.es54.js +63 -0
- package/dist/index.es6.js +14 -0
- package/dist/index.es7.js +14 -0
- package/dist/index.es8.js +13 -0
- package/dist/index.es9.js +12 -0
- package/dist/node_modules/@mantine/notifications/styles.css +42 -0
- package/package.json +15 -5
- package/dist/lkd-web-kit.css +0 -1
- package/dist/src/components/EmptyState/index.js +0 -36
- package/dist/src/components/Icon.js +0 -47
- package/dist/src/components/InfinityLoader/index.js +0 -9
- package/dist/src/components/MyDatePickerInput/CalendarIcon.js +0 -61
- package/dist/src/components/MyDatePickerInput/index.js +0 -14
- package/dist/src/components/MyDateTimePicker/index.js +0 -14
- package/dist/src/components/MyMonthPickerInput/index.js +0 -14
- package/dist/src/components/MyMultiSelect/index.js +0 -12
- package/dist/src/components/MyNotifications/index.js +0 -13
- package/dist/src/components/MyNumberInput/index.js +0 -12
- package/dist/src/components/MySelect/index.js +0 -12
- package/dist/src/components/MyTextInput/index.js +0 -12
- package/dist/src/components/MyTextarea/index.js +0 -12
- package/dist/src/components/MyTimeInput/index.js +0 -12
- package/dist/src/components/NavItems.js +0 -36
- package/dist/src/components/SelectInfinity/index.js +0 -106
- package/dist/src/consts/http-status.js +0 -4
- package/dist/src/consts/revalidate.js +0 -4
- package/dist/src/contexts/NavigationHistoryContext/index.js +0 -47
- package/dist/src/contexts/PageDataContext/index.js +0 -15
- package/dist/src/form/Form.js +0 -23
- package/dist/src/form/FormButtonSubmit.js +0 -18
- package/dist/src/form/base/FormCheckbox.js +0 -15
- package/dist/src/form/base/FormDatePickerInput.js +0 -21
- package/dist/src/form/base/FormDateTimePicker.js +0 -21
- package/dist/src/form/base/FormMonthPickerInput.js +0 -21
- package/dist/src/form/base/FormMultiSelect.js +0 -21
- package/dist/src/form/base/FormNumberInput.js +0 -21
- package/dist/src/form/base/FormRadioGroup.js +0 -14
- package/dist/src/form/base/FormSelect.js +0 -21
- package/dist/src/form/base/FormSelectInfinity.js +0 -21
- package/dist/src/form/base/FormTextInput.js +0 -21
- package/dist/src/form/base/FormTextarea.js +0 -21
- package/dist/src/form/base/FormTimeInput.js +0 -29
- package/dist/src/form/utils/nullable-but-required.js +0 -10
- package/dist/src/form/utils/optional-but-required.js +0 -10
- package/dist/src/form/utils/zodValidator.js +0 -9
- package/dist/src/hocs/withForm.js +0 -59
- package/dist/src/hocs/withModalManager.js +0 -29
- package/dist/src/hooks/useBreakpoint.js +0 -8
- package/dist/src/hooks/useFetchNextPageOnScroll.js +0 -19
- package/dist/src/hooks/useOnScrollProgress.js +0 -25
- package/dist/src/hooks/useUpdateSearchParams.js +0 -19
- package/dist/src/main.js +0 -113
- package/dist/src/mantine/my-default-theme.js +0 -39
- package/dist/src/mantine/to-tailwind-colors.js +0 -10
- package/dist/src/utils/array/groupBy.js +0 -36
- package/dist/src/utils/array/shuffleArray.js +0 -13
- package/dist/src/utils/formatBytes.js +0 -8
- package/dist/src/utils/isInfinityEmpty.js +0 -4
- package/dist/src/utils/ky/addBodyJsonHook.js +0 -12
- package/dist/src/utils/ky/parseJson.js +0 -6
- package/dist/src/utils/newHref.js +0 -20
- /package/dist/{main.d.ts → index.d.ts} +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import { useCombobox as D, Combobox as r, InputBase as I, Input as N, ScrollArea as P } from "@mantine/core";
|
|
4
|
-
import { useRef as y } from "react";
|
|
5
|
-
import { useFetchNextPageOnScroll as A } from "../../hooks/useFetchNextPageOnScroll.js";
|
|
6
|
-
import { InfinityLoader as E } from "../InfinityLoader/index.js";
|
|
7
|
-
function F({
|
|
8
|
-
value: b,
|
|
9
|
-
onChange: s,
|
|
10
|
-
data: u = [],
|
|
11
|
-
searchValue: a,
|
|
12
|
-
onSearchChange: t,
|
|
13
|
-
renderOption: m,
|
|
14
|
-
onOptionSubmit: c,
|
|
15
|
-
nothingFoundMessage: x,
|
|
16
|
-
infinity: i,
|
|
17
|
-
placeholder: v,
|
|
18
|
-
...w
|
|
19
|
-
}) {
|
|
20
|
-
const l = D({
|
|
21
|
-
onDropdownClose: () => {
|
|
22
|
-
l.resetSelectedOption(), l.focusTarget(), t == null || t("");
|
|
23
|
-
},
|
|
24
|
-
onDropdownOpen: () => {
|
|
25
|
-
l.focusSearchInput();
|
|
26
|
-
}
|
|
27
|
-
}), d = u.map((o) => /* @__PURE__ */ e(
|
|
28
|
-
r.Option,
|
|
29
|
-
{
|
|
30
|
-
value: o.value,
|
|
31
|
-
children: m ? m({ option: o }) : o.label
|
|
32
|
-
},
|
|
33
|
-
o.value
|
|
34
|
-
)), p = u.find((o) => o.value === b), f = y(null);
|
|
35
|
-
return A({ infinity: i, scrollRef: f }), /* @__PURE__ */ n(
|
|
36
|
-
r,
|
|
37
|
-
{
|
|
38
|
-
store: l,
|
|
39
|
-
middlewares: {
|
|
40
|
-
shift: {
|
|
41
|
-
crossAxis: !0
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
onOptionSubmit: (o) => {
|
|
45
|
-
s == null || s(o), c == null || c(o), l.closeDropdown();
|
|
46
|
-
},
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ e(r.Target, { children: /* @__PURE__ */ e(
|
|
49
|
-
I,
|
|
50
|
-
{
|
|
51
|
-
component: "button",
|
|
52
|
-
type: "button",
|
|
53
|
-
pointer: !0,
|
|
54
|
-
rightSection: /* @__PURE__ */ e(r.Chevron, {}),
|
|
55
|
-
onClick: () => l.toggleDropdown(),
|
|
56
|
-
rightSectionPointerEvents: "none",
|
|
57
|
-
...w,
|
|
58
|
-
children: (p == null ? void 0 : p.label) || /* @__PURE__ */ e(N.Placeholder, { children: v })
|
|
59
|
-
}
|
|
60
|
-
) }),
|
|
61
|
-
/* @__PURE__ */ n(r.Dropdown, { children: [
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
r.Search,
|
|
64
|
-
{
|
|
65
|
-
value: a,
|
|
66
|
-
onChange: (o) => t == null ? void 0 : t(o.currentTarget.value),
|
|
67
|
-
placeholder: "Escribe para buscar"
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
/* @__PURE__ */ e(r.Options, { children: /* @__PURE__ */ n(
|
|
71
|
-
P.Autosize,
|
|
72
|
-
{
|
|
73
|
-
mah: 200,
|
|
74
|
-
type: "scroll",
|
|
75
|
-
viewportRef: f,
|
|
76
|
-
children: [
|
|
77
|
-
d.length > 0 ? d : i.isFetching ? null : /* @__PURE__ */ e(
|
|
78
|
-
r.Empty,
|
|
79
|
-
{
|
|
80
|
-
onClick: () => l.closeDropdown(),
|
|
81
|
-
className: "min-h-6",
|
|
82
|
-
children: x ?? "Sin resultados"
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ e(
|
|
86
|
-
E,
|
|
87
|
-
{
|
|
88
|
-
className: "text-sm",
|
|
89
|
-
infinity: i,
|
|
90
|
-
loaderProps: {
|
|
91
|
-
size: "sm",
|
|
92
|
-
className: "mt-1 mb-2"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
) })
|
|
99
|
-
] })
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
export {
|
|
105
|
-
F as SelectInfinity
|
|
106
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var o = /* @__PURE__ */ ((e) => (e[e.Continue = 100] = "Continue", e[e.SwitchingProtocols = 101] = "SwitchingProtocols", e[e.Processing = 102] = "Processing", e[e.EarlyHints = 103] = "EarlyHints", e[e.Ok = 200] = "Ok", e[e.Created = 201] = "Created", e[e.Accepted = 202] = "Accepted", e[e.NonAuthoritativeInformation = 203] = "NonAuthoritativeInformation", e[e.NoContent = 204] = "NoContent", e[e.ResetContent = 205] = "ResetContent", e[e.PartialContent = 206] = "PartialContent", e[e.MultiStatus = 207] = "MultiStatus", e[e.AlreadyReported = 208] = "AlreadyReported", e[e.ImUsed = 226] = "ImUsed", e[e.MultipleChoices = 300] = "MultipleChoices", e[e.MovedPermanently = 301] = "MovedPermanently", e[e.Found = 302] = "Found", e[e.SeeOther = 303] = "SeeOther", e[e.NotModified = 304] = "NotModified", e[e.UseProxy = 305] = "UseProxy", e[e.TemporaryRedirect = 307] = "TemporaryRedirect", e[e.PermanentRedirect = 308] = "PermanentRedirect", e[e.BadRequest = 400] = "BadRequest", e[e.Unauthorized = 401] = "Unauthorized", e[e.PaymentRequired = 402] = "PaymentRequired", e[e.Forbidden = 403] = "Forbidden", e[e.NotFound = 404] = "NotFound", e[e.MethodNotAllowed = 405] = "MethodNotAllowed", e[e.NotAcceptable = 406] = "NotAcceptable", e[e.ProxyAuthenticationRequired = 407] = "ProxyAuthenticationRequired", e[e.RequestTimeout = 408] = "RequestTimeout", e[e.Conflict = 409] = "Conflict", e[e.Gone = 410] = "Gone", e[e.LengthRequired = 411] = "LengthRequired", e[e.PreconditionFailed = 412] = "PreconditionFailed", e[e.PayloadTooLarge = 413] = "PayloadTooLarge", e[e.UriTooLong = 414] = "UriTooLong", e[e.UnsupportedMediaType = 415] = "UnsupportedMediaType", e[e.RangeNotSatisfiable = 416] = "RangeNotSatisfiable", e[e.ExpectationFailed = 417] = "ExpectationFailed", e[e.MisdirectedRequest = 421] = "MisdirectedRequest", e[e.UnprocessableEntity = 422] = "UnprocessableEntity", e[e.Locked = 423] = "Locked", e[e.FailedDependency = 424] = "FailedDependency", e[e.TooEarly = 425] = "TooEarly", e[e.UpgradeRequired = 426] = "UpgradeRequired", e[e.PreconditionRequired = 428] = "PreconditionRequired", e[e.TooManyRequests = 429] = "TooManyRequests", e[e.RequestHeaderFieldsTooLarge = 431] = "RequestHeaderFieldsTooLarge", e[e.UnavailableForLegalReasons = 451] = "UnavailableForLegalReasons", e[e.InternalServerError = 500] = "InternalServerError", e[e.NotImplemented = 501] = "NotImplemented", e[e.BadGateway = 502] = "BadGateway", e[e.ServiceUnavailable = 503] = "ServiceUnavailable", e[e.GatewayTimeout = 504] = "GatewayTimeout", e[e.HttpVersionNotSupported = 505] = "HttpVersionNotSupported", e[e.VariantAlsoNegotiates = 506] = "VariantAlsoNegotiates", e[e.InsufficientStorage = 507] = "InsufficientStorage", e[e.LoopDetected = 508] = "LoopDetected", e[e.NotExtended = 510] = "NotExtended", e[e.NetworkAuthenticationRequired = 511] = "NetworkAuthenticationRequired", e))(o || {});
|
|
2
|
-
export {
|
|
3
|
-
o as HttpStatus
|
|
4
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
3
|
-
import { usePathname as l, useSearchParams as i, useRouter as f } from "next/navigation";
|
|
4
|
-
import { createContext as m, useState as P, useEffect as v, useContext as y } from "react";
|
|
5
|
-
const c = m(null);
|
|
6
|
-
function H({ children: s }) {
|
|
7
|
-
const e = l(), o = i(), [t, u] = P([]);
|
|
8
|
-
return v(() => {
|
|
9
|
-
const r = o != null && o.size ? `${e}?${o.toString()}` : e;
|
|
10
|
-
r && u((n) => n.length > 0 && n[n.length - 1] === r ? n : [...n, r]);
|
|
11
|
-
}, [e, o]), /* @__PURE__ */ g(c.Provider, { value: { history: t }, children: s });
|
|
12
|
-
}
|
|
13
|
-
const R = "backUrl";
|
|
14
|
-
function N() {
|
|
15
|
-
const s = y(c), e = f();
|
|
16
|
-
if (!s)
|
|
17
|
-
throw new Error("useNavigationHistory debe usarse dentro de un NavigationHistoryProvider");
|
|
18
|
-
const o = i(), { history: t } = s;
|
|
19
|
-
return {
|
|
20
|
-
history: t,
|
|
21
|
-
goBack: (r) => {
|
|
22
|
-
const n = o.get(R);
|
|
23
|
-
if (n) {
|
|
24
|
-
e.push(n);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (t.length <= 1) {
|
|
28
|
-
e.push(r ?? "/");
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const a = t[t.length - 2], h = t[t.length - 1];
|
|
32
|
-
if (t.length >= 3 && t[t.length - 3] === h) {
|
|
33
|
-
e.push(r ?? "/");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
e.push(a ?? "/");
|
|
37
|
-
},
|
|
38
|
-
currentRoute: t.length > 0 ? t[t.length - 1] : null,
|
|
39
|
-
hasPreviousRoute: t.length > 1,
|
|
40
|
-
getPreviousRoute: () => t.length >= 2 ? t[t.length - 2] : null
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
H as NavigationHistoryProvider,
|
|
45
|
-
R as QP_BACK_URL_NAME,
|
|
46
|
-
N as useNavigationHistory
|
|
47
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as a, useContext as n } from "react";
|
|
4
|
-
const e = a(void 0), c = ({
|
|
5
|
-
value: t,
|
|
6
|
-
children: o
|
|
7
|
-
}) => /* @__PURE__ */ r(e.Provider, { value: t, children: o }), u = () => {
|
|
8
|
-
const t = n(e);
|
|
9
|
-
if (t === void 0) throw new Error("Out of context: usePageData");
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
c as PageDataProvider,
|
|
14
|
-
u as usePageData
|
|
15
|
-
};
|
package/dist/src/form/Form.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import { Box as p } from "@mantine/core";
|
|
4
|
-
import { FormProvider as e } from "react-hook-form";
|
|
5
|
-
const a = ({
|
|
6
|
-
methods: o,
|
|
7
|
-
onSubmit: t = () => {
|
|
8
|
-
},
|
|
9
|
-
onSubmitError: i,
|
|
10
|
-
...n
|
|
11
|
-
}) => /* @__PURE__ */ m(e, { ...o, children: /* @__PURE__ */ m(
|
|
12
|
-
p,
|
|
13
|
-
{
|
|
14
|
-
component: "form",
|
|
15
|
-
onSubmit: (r) => {
|
|
16
|
-
r.stopPropagation(), o.handleSubmit(t, i)(r);
|
|
17
|
-
},
|
|
18
|
-
...n
|
|
19
|
-
}
|
|
20
|
-
) });
|
|
21
|
-
export {
|
|
22
|
-
a as Form
|
|
23
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { Button as i } from "@mantine/core";
|
|
4
|
-
import { useFormContext as n } from "react-hook-form";
|
|
5
|
-
const p = (t) => {
|
|
6
|
-
const { formState: o } = n(), { isSubmitting: m } = o;
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
8
|
-
i,
|
|
9
|
-
{
|
|
10
|
-
loading: m,
|
|
11
|
-
type: "submit",
|
|
12
|
-
...t
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
p as FormButtonSubmit
|
|
18
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { Checkbox as t } from "@mantine/core";
|
|
3
|
-
import { withForm as c } from "../../hocs/withForm.js";
|
|
4
|
-
import "react";
|
|
5
|
-
const x = c(({ field: o, props: r }) => /* @__PURE__ */ m(
|
|
6
|
-
t,
|
|
7
|
-
{
|
|
8
|
-
...o,
|
|
9
|
-
checked: o.value,
|
|
10
|
-
...r
|
|
11
|
-
}
|
|
12
|
-
));
|
|
13
|
-
export {
|
|
14
|
-
x as FormCheckbox
|
|
15
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import { MyDatePickerInput as m } from "../../components/MyDatePickerInput/index.js";
|
|
7
|
-
import "@mantine/dates";
|
|
8
|
-
import "@mantine/notifications";
|
|
9
|
-
/* empty css */
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as i } from "../../hocs/withForm.js";
|
|
12
|
-
const F = i(({ field: r, props: o }) => /* @__PURE__ */ t(
|
|
13
|
-
m,
|
|
14
|
-
{
|
|
15
|
-
...r,
|
|
16
|
-
...o
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
F as FormDatePickerInput
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import { MyDateTimePicker as i } from "../../components/MyDateTimePicker/index.js";
|
|
8
|
-
import "@mantine/notifications";
|
|
9
|
-
/* empty css */
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as t } from "../../hocs/withForm.js";
|
|
12
|
-
const T = t(({ field: r, props: m }) => /* @__PURE__ */ o(
|
|
13
|
-
i,
|
|
14
|
-
{
|
|
15
|
-
...r,
|
|
16
|
-
...m
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
T as FormDateTimePicker
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import "react";
|
|
10
|
-
import { MyMonthPickerInput as m } from "../../components/MyMonthPickerInput/index.js";
|
|
11
|
-
import { withForm as i } from "../../hocs/withForm.js";
|
|
12
|
-
const F = i(({ field: o, props: r }) => /* @__PURE__ */ t(
|
|
13
|
-
m,
|
|
14
|
-
{
|
|
15
|
-
...o,
|
|
16
|
-
...r
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
F as FormMonthPickerInput
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import "react";
|
|
10
|
-
import { MyMultiSelect as m } from "../../components/MyMultiSelect/index.js";
|
|
11
|
-
import { withForm as i } from "../../hocs/withForm.js";
|
|
12
|
-
const h = i(({ field: o, props: t }) => /* @__PURE__ */ r(
|
|
13
|
-
m,
|
|
14
|
-
{
|
|
15
|
-
...o,
|
|
16
|
-
...t
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
h as FormMultiSelect
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { MyNumberInput as t } from "../../components/MyNumberInput/index.js";
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as p } from "../../hocs/withForm.js";
|
|
12
|
-
const c = p(({ field: r, props: m }) => /* @__PURE__ */ o(
|
|
13
|
-
t,
|
|
14
|
-
{
|
|
15
|
-
...r,
|
|
16
|
-
...m
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
c as FormNumberInput
|
|
21
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { Radio as i } from "@mantine/core";
|
|
3
|
-
import { withForm as p } from "../../hocs/withForm.js";
|
|
4
|
-
import "react";
|
|
5
|
-
const s = p(({ field: o, props: r }) => /* @__PURE__ */ m(
|
|
6
|
-
i.Group,
|
|
7
|
-
{
|
|
8
|
-
...o,
|
|
9
|
-
...r
|
|
10
|
-
}
|
|
11
|
-
));
|
|
12
|
-
export {
|
|
13
|
-
s as FormRadioGroup
|
|
14
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { MySelect as t } from "../../components/MySelect/index.js";
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as i } from "../../hocs/withForm.js";
|
|
12
|
-
const n = i(({ field: o, props: r }) => /* @__PURE__ */ m(
|
|
13
|
-
t,
|
|
14
|
-
{
|
|
15
|
-
...o,
|
|
16
|
-
...r
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
n as FormSelect
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { SelectInfinity as i } from "../../components/SelectInfinity/index.js";
|
|
10
|
-
import { withForm as m } from "../../hocs/withForm.js";
|
|
11
|
-
import "react";
|
|
12
|
-
const S = m(({ field: o, props: t }) => /* @__PURE__ */ r(
|
|
13
|
-
i,
|
|
14
|
-
{
|
|
15
|
-
...o,
|
|
16
|
-
...t
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
S as FormSelectInfinity
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { MyTextInput as m } from "../../components/MyTextInput/index.js";
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as p } from "../../hocs/withForm.js";
|
|
12
|
-
const h = p(({ field: o, props: t }) => /* @__PURE__ */ r(
|
|
13
|
-
m,
|
|
14
|
-
{
|
|
15
|
-
...o,
|
|
16
|
-
...t
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
h as FormTextInput
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { MyTextarea as t } from "../../components/MyTextarea/index.js";
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as i } from "../../hocs/withForm.js";
|
|
12
|
-
const n = i(({ field: r, props: o }) => /* @__PURE__ */ m(
|
|
13
|
-
t,
|
|
14
|
-
{
|
|
15
|
-
...r,
|
|
16
|
-
...o
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
export {
|
|
20
|
-
n as FormTextarea
|
|
21
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import "clsx";
|
|
3
|
-
import "@mantine/core";
|
|
4
|
-
import "next/link";
|
|
5
|
-
import "next/navigation";
|
|
6
|
-
import "@mantine/dates";
|
|
7
|
-
import "@mantine/notifications";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { MyTimeInput as p } from "../../components/MyTimeInput/index.js";
|
|
10
|
-
import "react";
|
|
11
|
-
import { withForm as n } from "../../hocs/withForm.js";
|
|
12
|
-
const b = n(({ field: t, props: o }) => /* @__PURE__ */ i(
|
|
13
|
-
p,
|
|
14
|
-
{
|
|
15
|
-
...t,
|
|
16
|
-
...o
|
|
17
|
-
}
|
|
18
|
-
)), l = (t) => {
|
|
19
|
-
const [o, r] = t.split(":").map(Number), m = o + r / 60;
|
|
20
|
-
return Number(m.toFixed(2));
|
|
21
|
-
}, x = (t) => {
|
|
22
|
-
const o = Math.floor(t), r = Math.round((t - o) * 60);
|
|
23
|
-
return `${o.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
b as FormTimeInput,
|
|
27
|
-
x as numberToTimeInput,
|
|
28
|
-
l as timeInputToNumber
|
|
29
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { Controller as n } from "react-hook-form";
|
|
4
|
-
import "@mantine/core";
|
|
5
|
-
import { zodValidator as v } from "../form/utils/zodValidator.js";
|
|
6
|
-
import "zod";
|
|
7
|
-
import "../form/base/FormCheckbox.js";
|
|
8
|
-
import "../form/base/FormDatePickerInput.js";
|
|
9
|
-
import "../form/base/FormDateTimePicker.js";
|
|
10
|
-
import "../form/base/FormNumberInput.js";
|
|
11
|
-
import "../form/base/FormRadioGroup.js";
|
|
12
|
-
import "../form/base/FormSelect.js";
|
|
13
|
-
import "../form/base/FormSelectInfinity.js";
|
|
14
|
-
import "../form/base/FormTextarea.js";
|
|
15
|
-
import "../form/base/FormTextInput.js";
|
|
16
|
-
import "../form/base/FormTimeInput.js";
|
|
17
|
-
import "../form/base/FormMultiSelect.js";
|
|
18
|
-
import "../form/base/FormMonthPickerInput.js";
|
|
19
|
-
const D = (d, t) => {
|
|
20
|
-
const o = (i) => {
|
|
21
|
-
const { validate: e, name: l = "", placeholder: s, label: p, description: c, ...f } = i;
|
|
22
|
-
return /* @__PURE__ */ r(
|
|
23
|
-
n,
|
|
24
|
-
{
|
|
25
|
-
name: l,
|
|
26
|
-
defaultValue: "",
|
|
27
|
-
rules: {
|
|
28
|
-
validate: e && !i.disabled ? v(e) : void 0
|
|
29
|
-
},
|
|
30
|
-
disabled: i.disabled,
|
|
31
|
-
...t == null ? void 0 : t(i),
|
|
32
|
-
render: (m) => {
|
|
33
|
-
const {
|
|
34
|
-
fieldState: { error: a }
|
|
35
|
-
} = m, u = {
|
|
36
|
-
...m,
|
|
37
|
-
props: {
|
|
38
|
-
...i,
|
|
39
|
-
validate: void 0
|
|
40
|
-
},
|
|
41
|
-
field: {
|
|
42
|
-
...m.field,
|
|
43
|
-
label: p,
|
|
44
|
-
placeholder: s,
|
|
45
|
-
description: c,
|
|
46
|
-
error: a == null ? void 0 : a.message
|
|
47
|
-
},
|
|
48
|
-
...f
|
|
49
|
-
};
|
|
50
|
-
return /* @__PURE__ */ r(d, { ...u });
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
return o.displayName = `WithForm(${d.displayName})`, o;
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
D as withForm
|
|
59
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
-
import { useState as f, useEffect as c } from "react";
|
|
4
|
-
const d = (t) => {
|
|
5
|
-
const s = ({
|
|
6
|
-
removeModal: l,
|
|
7
|
-
opened: n,
|
|
8
|
-
...e
|
|
9
|
-
}) => {
|
|
10
|
-
const [m, a] = f(!1), o = () => {
|
|
11
|
-
var i;
|
|
12
|
-
a(!1), setTimeout(() => l(), 200), (i = e.onClose) == null || i.call(e);
|
|
13
|
-
};
|
|
14
|
-
return c(() => {
|
|
15
|
-
n ? setTimeout(() => a(!0), 0) : o();
|
|
16
|
-
}, [n]), /* @__PURE__ */ u(
|
|
17
|
-
t,
|
|
18
|
-
{
|
|
19
|
-
...e,
|
|
20
|
-
opened: m,
|
|
21
|
-
onClose: o
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
return s.displayName = `WithModalManager(${t.displayName})`, s;
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
d as withModalManager
|
|
29
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useOnScrollProgress as c } from "./useOnScrollProgress.js";
|
|
3
|
-
const l = ({
|
|
4
|
-
infinity: e,
|
|
5
|
-
scrollRef: r,
|
|
6
|
-
disabled: t = !1
|
|
7
|
-
}) => {
|
|
8
|
-
c({
|
|
9
|
-
triggerPercentage: 0.9,
|
|
10
|
-
callback: () => {
|
|
11
|
-
e.hasNextPage && e.fetchNextPage();
|
|
12
|
-
},
|
|
13
|
-
scrollRef: r,
|
|
14
|
-
disabled: t
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
l as useFetchNextPageOnScroll
|
|
19
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useEffect as l } from "react";
|
|
3
|
-
const E = ({
|
|
4
|
-
triggerPercentage: n,
|
|
5
|
-
callback: r,
|
|
6
|
-
scrollRef: t,
|
|
7
|
-
disabled: s = !1
|
|
8
|
-
}) => {
|
|
9
|
-
if (n < 0 || n > 1)
|
|
10
|
-
throw new Error("El porcentaje debe estar entre 0 y 1");
|
|
11
|
-
l(() => {
|
|
12
|
-
if (s || t && t.current === null) return;
|
|
13
|
-
let u = !1;
|
|
14
|
-
const e = () => {
|
|
15
|
-
const i = t == null ? void 0 : t.current, o = i ?? document.documentElement, d = o.scrollHeight - o.clientHeight, h = i ? o.scrollTop : window.scrollY, m = d > 0 ? Math.min(1, h / d) : 0;
|
|
16
|
-
!u && m >= n && (r(), u = !0);
|
|
17
|
-
}, c = (t == null ? void 0 : t.current) ?? window;
|
|
18
|
-
return c.addEventListener("scroll", e), e(), () => {
|
|
19
|
-
c.removeEventListener("scroll", e);
|
|
20
|
-
};
|
|
21
|
-
}, [n, r, t, s]);
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
E as useOnScrollProgress
|
|
25
|
-
};
|