@dazhicheng/ui 1.6.17 → 1.6.18
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/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +165 -159
- package/dist/components/tt-form/src/form-render/dependencies.d.ts +1 -1
- package/dist/components/tt-form/src/form-render/dependencies.js +53 -53
- package/dist/components/tt-form/src/form-render/form.vue2.js +68 -67
- package/dist/components/tt-form/src/form-render/helper.js +20 -16
- package/dist/components/tt-form/src/group-form/groupFormApi.js +42 -41
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/hooks/useBasicDataOptions.js +27 -26
- package/dist/hooks/useDataPermissionOptions.js +75 -92
- package/dist/hooks/userListCache.d.ts +12 -0
- package/dist/hooks/userListCache.js +17 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { unref as V, ref as n,
|
|
1
|
+
import { unref as V, ref as n, shallowRef as N, computed as O, watch as j, toRaw as k } from "vue";
|
|
2
2
|
import "axios";
|
|
3
3
|
import "element-plus";
|
|
4
|
-
import { isFunction as o, isBoolean as E, isString as
|
|
4
|
+
import { isFunction as o, isBoolean as E, isObject as A, isString as q } from "../../../../packages/utils/src/is.js";
|
|
5
5
|
import "dayjs";
|
|
6
6
|
import "numeral";
|
|
7
7
|
import "xe-utils";
|
|
@@ -13,76 +13,76 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/en
|
|
|
13
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
15
|
import "lodash-es";
|
|
16
|
-
import { get as
|
|
17
|
-
import { useFormValues as
|
|
18
|
-
import { injectFormProps as
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return
|
|
16
|
+
import { get as B } from "es-toolkit/compat";
|
|
17
|
+
import { useFormValues as C } from "vee-validate";
|
|
18
|
+
import { injectFormProps as K } from "../useFormContext.js";
|
|
19
|
+
const M = /* @__PURE__ */ new Set(["ElInput", "FormElInput", "ElInputNumber", "ElInputTag", "ElMention"]);
|
|
20
|
+
function ar(r) {
|
|
21
|
+
const t = q(r) ? r : (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.__name);
|
|
22
|
+
return q(t) && M.has(t) ? "required" : "selectRequired";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
return r[
|
|
24
|
+
function W(r, t) {
|
|
25
|
+
if (t.startsWith("[") && t.endsWith("]")) {
|
|
26
|
+
const p = t.slice(1, -1);
|
|
27
|
+
return r[p];
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return B(r, t);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function or(r) {
|
|
32
32
|
var x;
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
33
|
+
const t = C(), [p] = K(), s = V(p).formApi;
|
|
34
|
+
if (!t)
|
|
35
35
|
throw new Error("useDependencies should be used within <TtForm>");
|
|
36
|
-
const l = n(!0), f = n(!1), m = n(!0), g = n(!1), h = n({}), F =
|
|
36
|
+
const l = n(!0), f = n(!1), m = n(!0), g = n(!1), h = n({}), F = N(), S = O(() => {
|
|
37
37
|
var i;
|
|
38
|
-
return (((i = r()) == null ? void 0 : i.triggerFields) ?? []).map((d) =>
|
|
38
|
+
return (((i = r()) == null ? void 0 : i.triggerFields) ?? []).map((d) => W(t.value, d));
|
|
39
39
|
});
|
|
40
40
|
let I = 0;
|
|
41
|
-
return
|
|
42
|
-
[
|
|
43
|
-
async ([
|
|
44
|
-
var
|
|
45
|
-
if (!i || !((
|
|
41
|
+
return j(
|
|
42
|
+
[S, r],
|
|
43
|
+
async ([_, i]) => {
|
|
44
|
+
var b;
|
|
45
|
+
if (!i || !((b = i == null ? void 0 : i.triggerFields) != null && b.length))
|
|
46
46
|
return;
|
|
47
|
-
const d = ++I,
|
|
47
|
+
const d = ++I, u = () => d !== I, { componentProps: R, disabled: v, if: c, required: y, rules: P, show: w, trigger: T } = i, a = t.value;
|
|
48
48
|
if (o(c)) {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
49
|
+
const e = !!await c(a, s);
|
|
50
|
+
if (u() || (l.value = e, !l.value)) return;
|
|
51
51
|
} else if (E(c)) {
|
|
52
52
|
if (l.value = c, !l.value) return;
|
|
53
53
|
} else
|
|
54
54
|
l.value = !0;
|
|
55
|
-
if (o(
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
m.value =
|
|
59
|
-
} else E(
|
|
60
|
-
if (o(
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
h.value =
|
|
55
|
+
if (o(w)) {
|
|
56
|
+
const e = !!await w(a, s);
|
|
57
|
+
if (u()) return;
|
|
58
|
+
m.value = e;
|
|
59
|
+
} else E(w) ? m.value = w : m.value = !0;
|
|
60
|
+
if (o(R)) {
|
|
61
|
+
const e = await R(a, s);
|
|
62
|
+
if (u()) return;
|
|
63
|
+
h.value = e;
|
|
64
64
|
} else
|
|
65
65
|
h.value = {};
|
|
66
|
-
if (o(
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
F.value =
|
|
66
|
+
if (o(P)) {
|
|
67
|
+
const e = await P(a, s);
|
|
68
|
+
if (u()) return;
|
|
69
|
+
F.value = A(e) ? k(e) : e;
|
|
70
70
|
} else
|
|
71
71
|
F.value = void 0;
|
|
72
72
|
if (o(v)) {
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
f.value =
|
|
73
|
+
const e = !!await v(a, s);
|
|
74
|
+
if (u()) return;
|
|
75
|
+
f.value = e;
|
|
76
76
|
} else E(v) ? f.value = v : f.value = !1;
|
|
77
|
-
if (o(
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
g.value =
|
|
77
|
+
if (o(y)) {
|
|
78
|
+
const e = !!await y(a, s);
|
|
79
|
+
if (u()) return;
|
|
80
|
+
g.value = e;
|
|
81
81
|
} else
|
|
82
82
|
g.value = !1;
|
|
83
|
-
if (o(
|
|
84
|
-
if (
|
|
85
|
-
await
|
|
83
|
+
if (o(T)) {
|
|
84
|
+
if (u()) return;
|
|
85
|
+
await T(a, s);
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
{ deep: !0, immediate: ((x = r()) == null ? void 0 : x.immediate) ?? !0 }
|
|
@@ -96,7 +96,7 @@ function ur(r) {
|
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
or as default,
|
|
100
|
+
ar as resolveRequiredRuleName,
|
|
101
|
+
W as resolveValueByFieldName
|
|
102
102
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineComponent as ee, useSlots as oe, computed as n, createBlock as
|
|
1
|
+
import { defineComponent as ee, useSlots as oe, computed as n, toRaw as re, createBlock as v, openBlock as p, resolveDynamicComponent as D, normalizeProps as te, guardReactiveProps as le, withCtx as g, createElementVNode as se, normalizeClass as y, createElementBlock as d, renderSlot as c, Fragment as b, renderList as M, unref as R, mergeProps as w, createSlots as ne } from "vue";
|
|
2
2
|
import "../components/Slot.js";
|
|
3
3
|
import "axios";
|
|
4
4
|
import "element-plus";
|
|
5
|
-
import { isString as
|
|
5
|
+
import { isString as ae, isFunction as pe } from "../../../../packages/utils/src/is.js";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
import "numeral";
|
|
8
|
-
import { clnm as
|
|
9
|
-
import { mergeWithArrayOverride as
|
|
8
|
+
import { clnm as F } from "../../../../packages/utils/src/tool.js";
|
|
9
|
+
import { mergeWithArrayOverride as me } from "../../../../packages/utils/src/merge.js";
|
|
10
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
11
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
12
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
15
|
import "lodash-es";
|
|
16
|
-
import { Form as
|
|
16
|
+
import { Form as ie } from "vee-validate";
|
|
17
17
|
import "../../../tt-form-item-error-tooltip/index.js";
|
|
18
18
|
import "../../../tt-icon/index.js";
|
|
19
19
|
import "@vueuse/core";
|
|
20
20
|
/* empty css */
|
|
21
21
|
import "../form/RenderContent.vue.js";
|
|
22
|
-
import { provideFormRenderProps as
|
|
23
|
-
import { useExpandable as
|
|
24
|
-
import { FORM_RENDER_DEFAULT_WRAPPER_CLASS as
|
|
25
|
-
import { FieldRenderer as
|
|
26
|
-
import { getBaseRules as
|
|
22
|
+
import { provideFormRenderProps as ue } from "./context.js";
|
|
23
|
+
import { useExpandable as fe } from "./expandable.js";
|
|
24
|
+
import { FORM_RENDER_DEFAULT_WRAPPER_CLASS as de, getFormRootWrapperClass as ce } from "./rootWrapperClass.js";
|
|
25
|
+
import { FieldRenderer as Ce } from "./FormFieldContact.js";
|
|
26
|
+
import { getBaseRules as ve, getDefaultValueInZodStack as ge } from "./helper.js";
|
|
27
27
|
import "../../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
28
28
|
import { useDesign as ye } from "../../../../packages/hooks/src/useDesign.js";
|
|
29
29
|
import "vue-router";
|
|
30
|
-
const
|
|
30
|
+
const Je = /* @__PURE__ */ ee({
|
|
31
31
|
name: "FormRender",
|
|
32
32
|
__name: "form",
|
|
33
33
|
props: {
|
|
@@ -44,57 +44,58 @@ const He = /* @__PURE__ */ ee({
|
|
|
44
44
|
layout: {},
|
|
45
45
|
schema: {},
|
|
46
46
|
showCollapseButton: { type: Boolean, default: !1 },
|
|
47
|
-
wrapperClass: { default:
|
|
47
|
+
wrapperClass: { default: de },
|
|
48
48
|
globalCommonConfig: { default: () => ({}) }
|
|
49
49
|
},
|
|
50
50
|
emits: ["submit"],
|
|
51
51
|
setup(A, { expose: T, emit: W }) {
|
|
52
|
-
const r = A,
|
|
53
|
-
() =>
|
|
52
|
+
const r = A, P = W, z = oe(), V = n(
|
|
53
|
+
() => ce({
|
|
54
54
|
layout: r.layout,
|
|
55
55
|
compact: r.compact,
|
|
56
56
|
wrapperClass: r.wrapperClass
|
|
57
57
|
})
|
|
58
58
|
);
|
|
59
|
-
|
|
60
|
-
const { prefixCls:
|
|
59
|
+
ue(r);
|
|
60
|
+
const { prefixCls: _ } = ye("form-render"), f = r.form;
|
|
61
61
|
function i(e) {
|
|
62
62
|
return e && e.type === "slot";
|
|
63
63
|
}
|
|
64
64
|
function Z(e) {
|
|
65
65
|
return !i(e) && !e.useArraySchema;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
values: (
|
|
69
|
-
formActions:
|
|
70
|
-
})), { isCalculated: q, keepFormItemIndex:
|
|
67
|
+
const k = n(() => ({
|
|
68
|
+
values: (f == null ? void 0 : f.values) ?? {},
|
|
69
|
+
formActions: f
|
|
70
|
+
})), { isCalculated: q, keepFormItemIndex: j, wrapperRef: I } = fe(r), U = n(() => {
|
|
71
71
|
const e = [];
|
|
72
72
|
return (r.schema || []).forEach((a) => {
|
|
73
|
+
var u;
|
|
73
74
|
if (i(a)) return;
|
|
74
|
-
const { fieldName: o } = a,
|
|
75
|
+
const { fieldName: o } = a, t = a.rules ? re(a.rules) : void 0;
|
|
75
76
|
let s = "";
|
|
76
|
-
|
|
77
|
-
const m =
|
|
77
|
+
t && !ae(t) && (s = ((u = t.def) == null ? void 0 : u.type) ?? "");
|
|
78
|
+
const m = t ? ve(t) : null;
|
|
78
79
|
e.push({
|
|
79
|
-
default: ge(
|
|
80
|
+
default: t ? ge(t) : void 0,
|
|
80
81
|
fieldName: o,
|
|
81
82
|
required: !["ZodNullable", "ZodOptional"].includes(s),
|
|
82
83
|
rules: m
|
|
83
84
|
});
|
|
84
85
|
}), e;
|
|
85
|
-
}),
|
|
86
|
-
onSubmit: r.form.handleSubmit((e) =>
|
|
86
|
+
}), h = n(() => r.form ? "form" : ie), G = n(() => r.form ? {
|
|
87
|
+
onSubmit: r.form.handleSubmit((e) => P("submit", e))
|
|
87
88
|
} : {
|
|
88
|
-
onSubmit: (e) =>
|
|
89
|
+
onSubmit: (e) => P("submit", e)
|
|
89
90
|
}), H = n(() => r.collapsed && q.value), J = n(() => {
|
|
90
91
|
const {
|
|
91
92
|
colon: e = !1,
|
|
92
93
|
componentProps: a = {},
|
|
93
94
|
controlClass: o = "",
|
|
94
|
-
disabled:
|
|
95
|
+
disabled: t,
|
|
95
96
|
disabledOnChangeListener: s = !0,
|
|
96
97
|
disabledOnInputListener: m = !0,
|
|
97
|
-
emptyStateValue:
|
|
98
|
+
emptyStateValue: u = void 0,
|
|
98
99
|
formFieldProps: B = {},
|
|
99
100
|
formItemClass: Q = "",
|
|
100
101
|
hideLabel: S = !1,
|
|
@@ -103,17 +104,17 @@ const He = /* @__PURE__ */ ee({
|
|
|
103
104
|
labelWidth: $ = 70,
|
|
104
105
|
modelPropName: x = "",
|
|
105
106
|
wrapperClass: X = ""
|
|
106
|
-
} =
|
|
107
|
+
} = me(r.commonConfig, r.globalCommonConfig);
|
|
107
108
|
let L = 0;
|
|
108
|
-
return (r.schema || []).map((
|
|
109
|
-
if (i(
|
|
110
|
-
if (!Z(
|
|
109
|
+
return (r.schema || []).map((l) => {
|
|
110
|
+
if (i(l)) return l;
|
|
111
|
+
if (!Z(l))
|
|
111
112
|
return {
|
|
112
113
|
colon: e,
|
|
113
|
-
disabled:
|
|
114
|
+
disabled: t,
|
|
114
115
|
disabledOnChangeListener: s,
|
|
115
116
|
disabledOnInputListener: m,
|
|
116
|
-
emptyStateValue:
|
|
117
|
+
emptyStateValue: u,
|
|
117
118
|
hideLabel: S,
|
|
118
119
|
hideRequiredMark: E,
|
|
119
120
|
labelWidth: $,
|
|
@@ -122,82 +123,82 @@ const He = /* @__PURE__ */ ee({
|
|
|
122
123
|
controlClass: o,
|
|
123
124
|
formFieldProps: B,
|
|
124
125
|
labelClass: N,
|
|
125
|
-
...
|
|
126
|
+
...l
|
|
126
127
|
};
|
|
127
|
-
const O =
|
|
128
|
+
const O = j.value, Y = r.showCollapseButton && H.value && O ? O <= L : !1;
|
|
128
129
|
L++;
|
|
129
|
-
let
|
|
130
|
-
if (
|
|
130
|
+
let C = l.formItemClass;
|
|
131
|
+
if (pe(l.formItemClass))
|
|
131
132
|
try {
|
|
132
|
-
|
|
133
|
+
C = l.formItemClass();
|
|
133
134
|
} catch {
|
|
134
|
-
|
|
135
|
+
C = "";
|
|
135
136
|
}
|
|
136
137
|
return {
|
|
137
138
|
colon: e,
|
|
138
|
-
disabled:
|
|
139
|
+
disabled: t,
|
|
139
140
|
disabledOnChangeListener: s,
|
|
140
141
|
disabledOnInputListener: m,
|
|
141
|
-
emptyStateValue:
|
|
142
|
+
emptyStateValue: u,
|
|
142
143
|
hideLabel: S,
|
|
143
144
|
hideRequiredMark: E,
|
|
144
145
|
labelWidth: $,
|
|
145
146
|
modelPropName: x,
|
|
146
147
|
wrapperClass: X,
|
|
147
|
-
...
|
|
148
|
+
...l,
|
|
148
149
|
commonComponentProps: a,
|
|
149
|
-
componentProps:
|
|
150
|
-
controlClass:
|
|
150
|
+
componentProps: l.componentProps,
|
|
151
|
+
controlClass: F(o, l.controlClass),
|
|
151
152
|
formFieldProps: {
|
|
152
153
|
...B,
|
|
153
|
-
...
|
|
154
|
+
...l.formFieldProps
|
|
154
155
|
},
|
|
155
|
-
formItemClass:
|
|
156
|
-
labelClass:
|
|
156
|
+
formItemClass: F("flex-shrink-0", { hidden: Y }, Q, C),
|
|
157
|
+
labelClass: F(N, l.labelClass)
|
|
157
158
|
};
|
|
158
159
|
});
|
|
159
160
|
}), K = n(() => Object.keys(z).filter((e) => e !== "default"));
|
|
160
161
|
return T({
|
|
161
|
-
wrapperRef: n(() =>
|
|
162
|
-
}), (e, a) => (p(),
|
|
162
|
+
wrapperRef: n(() => I.value)
|
|
163
|
+
}), (e, a) => (p(), v(D(h.value), te(le(G.value)), {
|
|
163
164
|
default: g(() => [
|
|
164
|
-
|
|
165
|
+
se("div", {
|
|
165
166
|
ref_key: "wrapperRef",
|
|
166
|
-
ref:
|
|
167
|
+
ref: I,
|
|
167
168
|
class: y(V.value)
|
|
168
169
|
}, [
|
|
169
|
-
(p(!0),
|
|
170
|
-
key: i(o) ? `slot-${
|
|
170
|
+
(p(!0), d(b, null, M(J.value, (o, t) => (p(), d(b, {
|
|
171
|
+
key: i(o) ? `slot-${t}` : o.fieldName
|
|
171
172
|
}, [
|
|
172
|
-
i(o) ? (p(),
|
|
173
|
-
typeof o.content == "string" ? (p(),
|
|
173
|
+
i(o) ? (p(), d(b, { key: 0 }, [
|
|
174
|
+
typeof o.content == "string" ? (p(), d("div", {
|
|
174
175
|
key: 0,
|
|
175
|
-
class: y([`${
|
|
176
|
+
class: y([`${R(_)}__slot`, o.wrapperClass])
|
|
176
177
|
}, [
|
|
177
|
-
|
|
178
|
-
], 2)) : (p(),
|
|
178
|
+
c(e.$slots, o.content, w({ ref_for: !0 }, k.value))
|
|
179
|
+
], 2)) : (p(), v(D(o.content(k.value)), {
|
|
179
180
|
key: 1,
|
|
180
|
-
class: y([`${
|
|
181
|
+
class: y([`${R(_)}__slot`, o.wrapperClass])
|
|
181
182
|
}, null, 8, ["class"]))
|
|
182
|
-
], 64)) : (p(),
|
|
183
|
+
], 64)) : (p(), v(R(Ce), {
|
|
183
184
|
key: 1,
|
|
184
185
|
"field-config": o,
|
|
185
186
|
rules: o.rules
|
|
186
|
-
},
|
|
187
|
+
}, ne({
|
|
187
188
|
default: g((s) => [
|
|
188
|
-
|
|
189
|
+
c(e.$slots, o.fieldName, w({ ref_for: !0 }, s))
|
|
189
190
|
]),
|
|
190
191
|
_: 2
|
|
191
192
|
}, [
|
|
192
193
|
M(K.value, (s) => ({
|
|
193
194
|
name: s,
|
|
194
195
|
fn: g((m) => [
|
|
195
|
-
|
|
196
|
+
c(e.$slots, s, w({ ref_for: !0 }, m))
|
|
196
197
|
])
|
|
197
198
|
}))
|
|
198
199
|
]), 1032, ["field-config", "rules"]))
|
|
199
200
|
], 64))), 128)),
|
|
200
|
-
|
|
201
|
+
c(e.$slots, "default", { shapes: U.value })
|
|
201
202
|
], 2)
|
|
202
203
|
]),
|
|
203
204
|
_: 3
|
|
@@ -205,5 +206,5 @@ const He = /* @__PURE__ */ ee({
|
|
|
205
206
|
}
|
|
206
207
|
});
|
|
207
208
|
export {
|
|
208
|
-
|
|
209
|
+
Je as default
|
|
209
210
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { toRaw as i } from "vue";
|
|
1
2
|
import "axios";
|
|
2
3
|
import "element-plus";
|
|
3
|
-
import { isObject as
|
|
4
|
-
import "vue";
|
|
4
|
+
import { isObject as p, isString as o } from "../../../../packages/utils/src/is.js";
|
|
5
5
|
import "dayjs";
|
|
6
6
|
import "numeral";
|
|
7
7
|
import "xe-utils";
|
|
@@ -13,24 +13,28 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/en
|
|
|
13
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
15
|
import "lodash-es";
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
function n(e) {
|
|
17
|
+
if (!e || o(e)) return null;
|
|
18
|
+
const r = i(e);
|
|
19
|
+
return r.def ? "innerType" in r.def ? n(i(r.def.innerType)) : "schema" in r.def ? n(i(r.def.schema)) : r : r;
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
if (!
|
|
21
|
+
function f(e) {
|
|
22
|
+
if (!e || o(e))
|
|
21
23
|
return;
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
const t = i(e);
|
|
25
|
+
if (t.def) {
|
|
26
|
+
if (t.def.type === "default") return t.def.defaultValue;
|
|
27
|
+
if ("innerType" in t.def)
|
|
28
|
+
return f(i(t.def.innerType));
|
|
29
|
+
if ("schema" in t.def)
|
|
30
|
+
return f(i(t.def.schema));
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
|
-
function v(
|
|
30
|
-
return !
|
|
33
|
+
function v(e) {
|
|
34
|
+
return !e || !p(e) ? !1 : Reflect.has(e, "target") && Reflect.has(e, "stopPropagation");
|
|
31
35
|
}
|
|
32
36
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
n as getBaseRules,
|
|
38
|
+
f as getDefaultValueInZodStack,
|
|
35
39
|
v as isEventObjectLike
|
|
36
40
|
};
|