@scbt-ecom/ui 0.50.1 → 0.51.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/{index-DXLhMM4P.js → index-714cNgOF.js} +2 -2
- package/dist/{index-DXLhMM4P.js.map → index-714cNgOF.js.map} +1 -1
- package/dist/shared/validation/utils/zodUtils.d.ts +27 -1
- package/dist/ui.js +2 -2
- package/dist/validation.js +244 -213
- package/dist/validation.js.map +1 -1
- package/dist/widget.js +1 -1
- package/package.json +1 -1
|
@@ -36,6 +36,32 @@ export declare class ZodUtils {
|
|
|
36
36
|
* // }
|
|
37
37
|
* // }
|
|
38
38
|
*/
|
|
39
|
-
static getZodDefaults<ZodSchema extends z.AnyZodObject, Schema = z.TypeOf<ZodSchema>>(zodSchema: ZodSchema | z.ZodEffects<ZodSchema
|
|
39
|
+
static getZodDefaults<ZodSchema extends z.AnyZodObject, Schema = z.TypeOf<ZodSchema>>(zodSchema: ZodSchema | z.ZodEffects<ZodSchema>, options?: ZodUtilsGetDefaultsOptions): Schema;
|
|
40
|
+
/**
|
|
41
|
+
* Функция для объединения zod схождений
|
|
42
|
+
* @param {ZodIntersection} zodSchema
|
|
43
|
+
* @returns объединенная схема двух схождений
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* let schema = z.object({
|
|
47
|
+
* foo: z.string()
|
|
48
|
+
* })
|
|
49
|
+
* // this will return intersection and we need
|
|
50
|
+
* // to merge its left to right schema's
|
|
51
|
+
* .and(
|
|
52
|
+
* z.object({
|
|
53
|
+
* bar: z.string()
|
|
54
|
+
* })
|
|
55
|
+
* )
|
|
56
|
+
*
|
|
57
|
+
* schema = ZodUtils.zodMergeIntersection(schema)
|
|
58
|
+
*
|
|
59
|
+
* // schema will be
|
|
60
|
+
* z.object({
|
|
61
|
+
* foo: z.string(),
|
|
62
|
+
* bar: z.string()
|
|
63
|
+
* })
|
|
64
|
+
*/
|
|
65
|
+
static zodMergeIntersection<ZodLeft extends z.ZodTypeAny, ZodRight extends z.ZodTypeAny>(zodSchema: z.ZodIntersection<ZodLeft, ZodRight>): z.ZodObject<z.objectUtil.MergeShapes<z.TypeOf<ZodLeft>, z.TypeOf<ZodRight>>>;
|
|
40
66
|
}
|
|
41
67
|
export {};
|
package/dist/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as p, c as We, R as Ye, B as E, u as Je, f as Qe, g as Ze, h as et, i as k, k as ve, l as tt, m as nt, n as U, o as ot, A as rt, H as it, I as N, p as lt, q as me, D as ut, V as st, O as at } from "./index-
|
|
2
|
-
import { d as Kn, r as Xn, e as Wn, C as Yn, s as Jn, K as Qn, L as Zn, N as eo, P as to, a as no, S as oo, t as ro, U as io, b as lo } from "./index-
|
|
1
|
+
import { j as p, c as We, R as Ye, B as E, u as Je, f as Qe, g as Ze, h as et, i as k, k as ve, l as tt, m as nt, n as U, o as ot, A as rt, H as it, I as N, p as lt, q as me, D as ut, V as st, O as at } from "./index-714cNgOF.js";
|
|
2
|
+
import { d as Kn, r as Xn, e as Wn, C as Yn, s as Jn, K as Qn, L as Zn, N as eo, P as to, a as no, S as oo, t as ro, U as io, b as lo } from "./index-714cNgOF.js";
|
|
3
3
|
import * as P from "react";
|
|
4
4
|
import { forwardRef as D, useState as he, useEffect as gt } from "react";
|
|
5
5
|
import { c as w, T as Se } from "./typeGuards-BigW-JS1.js";
|