lkd-web-kit 0.4.2 → 0.4.3
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.
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
message
|
|
5
|
+
const nullableButRequired = (schema, message = "Campo requerido") => schema.nullable().check((ctx) => {
|
|
6
|
+
if (ctx.value === null) {
|
|
7
|
+
ctx.issues.push({
|
|
8
|
+
code: "custom",
|
|
9
|
+
message,
|
|
10
|
+
input: ctx.value
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
13
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
message
|
|
1
|
+
const nullableButRequired = (schema, message = "Campo requerido") => schema.nullable().check((ctx) => {
|
|
2
|
+
if (ctx.value === null) {
|
|
3
|
+
ctx.issues.push({
|
|
4
|
+
code: "custom",
|
|
5
|
+
message,
|
|
6
|
+
input: ctx.value
|
|
8
7
|
});
|
|
9
8
|
}
|
|
10
9
|
});
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
message
|
|
5
|
+
const optionalButRequired = (schema, message = "Campo requerido") => schema.optional().check((ctx) => {
|
|
6
|
+
if (ctx.value === void 0) {
|
|
7
|
+
ctx.issues.push({
|
|
8
|
+
code: "custom",
|
|
9
|
+
message,
|
|
10
|
+
input: ctx.value
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
13
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
message
|
|
1
|
+
const optionalButRequired = (schema, message = "Campo requerido") => schema.optional().check((ctx) => {
|
|
2
|
+
if (ctx.value === void 0) {
|
|
3
|
+
ctx.issues.push({
|
|
4
|
+
code: "custom",
|
|
5
|
+
message,
|
|
6
|
+
input: ctx.value
|
|
8
7
|
});
|
|
9
8
|
}
|
|
10
9
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,8 @@ import { TextInputProps } from '@mantine/core';
|
|
|
45
45
|
import { TimeInputProps } from '@mantine/dates';
|
|
46
46
|
import { UseFormReturn } from 'react-hook-form';
|
|
47
47
|
import { VirtualItem } from '@tanstack/react-virtual';
|
|
48
|
-
import { z } from 'zod';
|
|
48
|
+
import { z } from 'zod/v4';
|
|
49
|
+
import { ZodType } from 'zod/v4';
|
|
49
50
|
import { ZodTypeAny } from 'zod';
|
|
50
51
|
|
|
51
52
|
export declare const addBodyJsonHook: BeforeErrorHook;
|
|
@@ -426,7 +427,7 @@ export declare const newRoute: {
|
|
|
426
427
|
<LocalQuery extends object = {}, PathParams extends Params = {}>(pathBuilder: (params: PathParams) => string, options?: RouteOptions<LocalQuery, PathParams> | undefined): (params?: RouteInput<PathParams, LocalQuery> | undefined) => string;
|
|
427
428
|
};
|
|
428
429
|
|
|
429
|
-
export declare const nullableButRequired: <T extends
|
|
430
|
+
export declare const nullableButRequired: <T extends ZodType>(schema: T, message?: string) => z.ZodNullable<T>;
|
|
430
431
|
|
|
431
432
|
export declare const numberToTimeInput: (number: number) => string;
|
|
432
433
|
|
|
@@ -437,7 +438,7 @@ export declare type OnScrollProgressOptions = {
|
|
|
437
438
|
disabled?: boolean;
|
|
438
439
|
};
|
|
439
440
|
|
|
440
|
-
export declare const optionalButRequired: <T extends
|
|
441
|
+
export declare const optionalButRequired: <T extends ZodType>(schema: T, message?: string) => z.ZodOptional<T>;
|
|
441
442
|
|
|
442
443
|
export declare const PageDataProvider: ({ value, children }: PageDataProviderProps) => JSX.Element;
|
|
443
444
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lkd-web-kit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "A template for creating React component libraries with Vite.",
|
|
5
5
|
"author": "LKD",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"@mantine/dates": "^8.1.2",
|
|
58
58
|
"@mantine/hooks": "^8.1.2",
|
|
59
59
|
"@mantine/notifications": "^8.1.2",
|
|
60
|
-
"@tanstack/react-query": "^5.81.
|
|
60
|
+
"@tanstack/react-query": "^5.81.5",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
62
|
"ky": "^1.8.1",
|
|
63
|
-
"next": "^15.3.
|
|
63
|
+
"next": "^15.3.5",
|
|
64
64
|
"react": "^19.1.0",
|
|
65
65
|
"react-dom": "^19.1.0",
|
|
66
|
-
"react-hook-form": "^7.
|
|
66
|
+
"react-hook-form": "^7.60.0",
|
|
67
67
|
"react-query-kit": "^3.3.1",
|
|
68
|
-
"zod": "^3.25.
|
|
68
|
+
"zod": "^3.25.74"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@tanstack/react-virtual": "^3.13.
|
|
71
|
+
"@tanstack/react-virtual": "^3.13.12"
|
|
72
72
|
}
|
|
73
73
|
}
|