@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.
@@ -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> | z.ZodIntersection<ZodSchema, ZodSchema>, options?: ZodUtilsGetDefaultsOptions): Schema;
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-DXLhMM4P.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-DXLhMM4P.js";
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";