@code0-tech/pictor 0.0.0-mvp.20 → 0.0.0-mvp.22
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/assets/components/alert/Alert.style.css +1 -1
- package/dist/assets/components/badge/Badge.style.css +1 -1
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -1
- package/dist/assets/components/card/Card.style.css +1 -1
- package/dist/assets/components/command/Command.style.css +1 -1
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -1
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -1
- package/dist/assets/components/d-layout/DLayout.style.css +1 -1
- package/dist/assets/components/dialog/Dialog.style.css +1 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/assets/components/toast/Toast.style.css +1 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
- package/dist/components/d-member/DNamespaceMember.service.js +6 -4
- package/dist/components/d-organization/DOrganizationCard.d.ts +3 -2
- package/dist/components/d-organization/DOrganizationList.d.ts +3 -4
- package/dist/components/d-organization/DOrganizationList.js +7 -7
- package/dist/components/d-organization/DOrganizatonContent.d.ts +5 -4
- package/dist/components/d-organization/DOrganizatonContent.js +24 -24
- package/dist/components/d-project/DNamespaceProjectCard.d.ts +5 -5
- package/dist/components/d-project/DNamespaceProjectCard.js +13 -11
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +2 -1
- package/dist/components/d-project/DNamespaceProjectContent.js +18 -18
- package/dist/components/d-project/DNamespaceProjectList.d.ts +3 -3
- package/dist/components/d-project/DNamespaceProjectList.js +8 -8
- package/dist/components/d-project/index.js +11 -17
- package/dist/components/d-runtime/DRuntimeCard.d.ts +2 -1
- package/dist/components/d-runtime/DRuntimeContent.d.ts +2 -1
- package/dist/components/d-runtime/DRuntimeContent.js +13 -13
- package/dist/components/d-runtime/DRuntimeList.d.ts +4 -3
- package/dist/components/d-runtime/DRuntimeList.js +16 -13
- package/dist/components/d-user/DUserCard.d.ts +2 -1
- package/dist/components/d-user/DUserContent.d.ts +2 -1
- package/dist/components/d-user/DUserContent.js +24 -24
- package/dist/components/d-user/DUserList.d.ts +2 -3
- package/dist/components/d-user/DUserList.js +4 -4
- package/dist/components/form/useForm.js +58 -33
- package/dist/index.js +119 -117
- package/package.json +5 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Runtime } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
+
import { DRuntimeView } from './DRuntime.view';
|
|
3
4
|
export interface DRuntimeContentProps {
|
|
4
5
|
runtimeId: Runtime['id'];
|
|
5
|
-
onSetting?: (
|
|
6
|
+
onSetting?: (runtime: DRuntimeView) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const DRuntimeContent: React.FC<DRuntimeContentProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { Text as n } from "../text/Text.js";
|
|
4
4
|
import { Flex as t } from "../flex/Flex.js";
|
|
@@ -10,28 +10,28 @@ import { DRuntimeReactiveService as c } from "./DRuntime.service.js";
|
|
|
10
10
|
import { Badge as s } from "../badge/Badge.js";
|
|
11
11
|
const v = (m) => {
|
|
12
12
|
const {
|
|
13
|
-
runtimeId:
|
|
13
|
+
runtimeId: o,
|
|
14
14
|
onSetting: l = () => {
|
|
15
15
|
}
|
|
16
|
-
} = m, a = g(c), p = y(c),
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
16
|
+
} = m, a = g(c), p = y(c), e = d.useMemo(() => a.getById(o), [p, o]);
|
|
17
|
+
return /* @__PURE__ */ i(t, { justify: "space-between", align: "center", children: [
|
|
18
|
+
/* @__PURE__ */ i(t, { style: {
|
|
19
19
|
flexDirection: "column",
|
|
20
20
|
gap: "0.35rem"
|
|
21
21
|
}, children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ r(n, { size: "lg", hierarchy: "primary", display: "block", children: e?.name }),
|
|
23
|
+
/* @__PURE__ */ r(n, { size: "sm", hierarchy: "tertiary", display: "block", children: e?.description })
|
|
24
24
|
] }),
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
26
26
|
gap: "1.3rem"
|
|
27
27
|
}, children: [
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ r(t, { align: "center", style: {
|
|
29
29
|
gap: "0.35rem",
|
|
30
30
|
flexWrap: "wrap"
|
|
31
|
-
}, children:
|
|
32
|
-
|
|
33
|
-
u.stopPropagation(), l(
|
|
34
|
-
}, children: /* @__PURE__ */
|
|
31
|
+
}, children: e?.status === "CONNECTED" ? /* @__PURE__ */ r(s, { color: "success", children: "CONNECTED" }) : /* @__PURE__ */ r(s, { color: "error", children: "DISCONNECTED" }) }),
|
|
32
|
+
e?.userAbilities?.deleteRuntime || e?.userAbilities?.updateRuntime || e?.userAbilities?.rotateRuntimeToken ? /* @__PURE__ */ r(f, { color: "secondary", onClick: (u) => {
|
|
33
|
+
u.stopPropagation(), l(e);
|
|
34
|
+
}, children: /* @__PURE__ */ r(h, { size: 16 }) }) : null
|
|
35
35
|
] })
|
|
36
36
|
] });
|
|
37
37
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Namespace } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
import { DRuntimeView } from './DRuntime.view';
|
|
3
3
|
import { Card } from '../card/Card';
|
|
4
4
|
import { default as React } from 'react';
|
|
5
5
|
export interface DRuntimeListProps extends Omit<Card, "children" | "onSelect"> {
|
|
6
|
+
namespaceId: Namespace["id"];
|
|
6
7
|
filter?: (runtime: DRuntimeView, index: number) => boolean;
|
|
7
|
-
onSelect?: (
|
|
8
|
-
onSetting?: (
|
|
8
|
+
onSelect?: (runtime: DRuntimeView) => void;
|
|
9
|
+
onSetting?: (runtime: DRuntimeView) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const DRuntimeList: React.FC<DRuntimeListProps>;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Card as f } from "../card/Card.js";
|
|
3
|
-
import
|
|
3
|
+
import a from "react";
|
|
4
4
|
import { useService as S, useStore as l } from "../../utils/contextStore.js";
|
|
5
5
|
import "merge-props";
|
|
6
|
-
import { DRuntimeReactiveService as
|
|
7
|
-
import
|
|
8
|
-
import { DRuntimeContent as
|
|
9
|
-
const k = (
|
|
6
|
+
import { DRuntimeReactiveService as i } from "./DRuntime.service.js";
|
|
7
|
+
import v from "../card/CardSection.js";
|
|
8
|
+
import { DRuntimeContent as R } from "./DRuntimeContent.js";
|
|
9
|
+
const k = (m) => {
|
|
10
10
|
const {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
11
|
+
namespaceId: t,
|
|
12
|
+
filter: n = () => !0,
|
|
13
|
+
onSetting: c,
|
|
14
|
+
onSelect: o,
|
|
15
|
+
...s
|
|
16
|
+
} = m, u = S(i), p = l(i), d = a.useMemo(() => u.values({
|
|
17
|
+
namespaceId: t
|
|
18
|
+
}), [p, t]);
|
|
19
|
+
return /* @__PURE__ */ r(f, { ...s, children: d.filter(n).map((e) => e.id && /* @__PURE__ */ r(v, { border: !0, hover: !0, onClick: () => {
|
|
20
|
+
o && o(e);
|
|
21
|
+
}, children: /* @__PURE__ */ r(R, { onSetting: c, runtimeId: e?.id }) }, e.id)) });
|
|
19
22
|
};
|
|
20
23
|
export {
|
|
21
24
|
k as DRuntimeList
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { User } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
+
import { DUserView } from './DUser.view';
|
|
3
4
|
export interface DUserCardProps {
|
|
4
5
|
userId: User['id'];
|
|
5
|
-
onRemove?: (
|
|
6
|
+
onRemove?: (user: DUserView) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const DUserCard: React.FC<DUserCardProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { User } from '@code0-tech/sagittarius-graphql-types';
|
|
3
|
+
import { DUserView } from './DUser.view';
|
|
3
4
|
export interface DUserContentProps {
|
|
4
5
|
userId: User['id'];
|
|
5
|
-
onRemove?: (
|
|
6
|
+
onRemove?: (user: DUserView) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const DUserContent: React.FC<DUserContentProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { c as V } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import B from "react";
|
|
4
|
-
import { Flex as
|
|
4
|
+
import { Flex as u } from "../flex/Flex.js";
|
|
5
5
|
import { Avatar as E } from "../avatar/Avatar.js";
|
|
6
6
|
import { useUserSession as k } from "./DUser.session.hook.js";
|
|
7
7
|
import { useService as w } from "../../utils/contextStore.js";
|
|
@@ -13,69 +13,69 @@ import { IconMailCheck as M } from "@tabler/icons-react";
|
|
|
13
13
|
import "../button/Button.js";
|
|
14
14
|
const Z = (D) => {
|
|
15
15
|
const e = V.c(37), {
|
|
16
|
-
userId:
|
|
16
|
+
userId: x,
|
|
17
17
|
onRemove: A
|
|
18
18
|
} = D, z = A === void 0 ? T : A, b = w(F), I = k(), [U, $] = B.useState(!1);
|
|
19
|
+
let h;
|
|
20
|
+
e[0] !== x || e[1] !== b ? (h = b.getById(x), e[0] = x, e[1] = b, e[2] = h) : h = e[2];
|
|
21
|
+
const t = h, j = I?.user?.id === t.id;
|
|
19
22
|
let y;
|
|
20
|
-
e[
|
|
21
|
-
const t = y, j = I?.user?.id === t.id;
|
|
22
|
-
let g;
|
|
23
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
23
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
24
24
|
gap: ".7rem"
|
|
25
|
-
}, e[3] =
|
|
25
|
+
}, e[3] = y) : y = e[3];
|
|
26
26
|
let r;
|
|
27
27
|
e[4] !== t.username ? (r = /* @__PURE__ */ d(E, { identifier: t.username, bg: "transparent" }), e[4] = t.username, e[5] = r) : r = e[5];
|
|
28
|
-
let
|
|
29
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
28
|
+
let g;
|
|
29
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
30
30
|
gap: ".35rem",
|
|
31
31
|
flexDirection: "column"
|
|
32
|
-
}, e[6] =
|
|
33
|
-
let
|
|
34
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
32
|
+
}, e[6] = g) : g = e[6];
|
|
33
|
+
let v;
|
|
34
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (v = {
|
|
35
35
|
gap: "0.35rem"
|
|
36
|
-
}, e[7] =
|
|
36
|
+
}, e[7] = v) : v = e[7];
|
|
37
37
|
let i;
|
|
38
38
|
e[8] !== t.username ? (i = /* @__PURE__ */ d(R, { size: "md", hierarchy: "primary", children: t.username }), e[8] = t.username, e[9] = i) : i = e[9];
|
|
39
39
|
let l;
|
|
40
40
|
e[10] !== t.admin ? (l = t.admin ? /* @__PURE__ */ d(C, { color: "secondary", children: "Admin" }) : null, e[10] = t.admin, e[11] = l) : l = e[11];
|
|
41
41
|
let s;
|
|
42
|
-
e[12] !== i || e[13] !== l ? (s = /* @__PURE__ */ p(
|
|
42
|
+
e[12] !== i || e[13] !== l ? (s = /* @__PURE__ */ p(u, { align: "center", style: v, children: [
|
|
43
43
|
i,
|
|
44
44
|
l
|
|
45
45
|
] }), e[12] = i, e[13] = l, e[14] = s) : s = e[14];
|
|
46
46
|
let n;
|
|
47
47
|
e[15] !== t.email ? (n = /* @__PURE__ */ d(R, { size: "md", hierarchy: "tertiary", children: t.email }), e[15] = t.email, e[16] = n) : n = e[16];
|
|
48
48
|
let m;
|
|
49
|
-
e[17] !== s || e[18] !== n ? (m = /* @__PURE__ */ p(
|
|
49
|
+
e[17] !== s || e[18] !== n ? (m = /* @__PURE__ */ p(u, { style: g, children: [
|
|
50
50
|
s,
|
|
51
51
|
n
|
|
52
52
|
] }), e[17] = s, e[18] = n, e[19] = m) : m = e[19];
|
|
53
53
|
let o;
|
|
54
|
-
e[20] !== m || e[21] !== r ? (o = /* @__PURE__ */ p(
|
|
54
|
+
e[20] !== m || e[21] !== r ? (o = /* @__PURE__ */ p(u, { style: y, align: "center", children: [
|
|
55
55
|
r,
|
|
56
56
|
m
|
|
57
57
|
] }), e[20] = m, e[21] = r, e[22] = o) : o = e[22];
|
|
58
|
-
let
|
|
59
|
-
e[23] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
58
|
+
let S;
|
|
59
|
+
e[23] === Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
60
60
|
gap: "1.3rem"
|
|
61
|
-
}, e[23] =
|
|
61
|
+
}, e[23] = S) : S = e[23];
|
|
62
62
|
let c;
|
|
63
63
|
e[24] !== t.emailVerifiedAt ? (c = t.emailVerifiedAt ? /* @__PURE__ */ p(C, { color: "secondary", children: [
|
|
64
64
|
/* @__PURE__ */ d(M, { size: 16 }),
|
|
65
65
|
/* @__PURE__ */ d(R, { size: "xs", children: "Email verified" })
|
|
66
66
|
] }) : null, e[24] = t.emailVerifiedAt, e[25] = c) : c = e[25];
|
|
67
67
|
let a;
|
|
68
|
-
e[26] !== j || e[27] !== z || e[28] !== U || e[29] !==
|
|
68
|
+
e[26] !== j || e[27] !== z || e[28] !== U || e[29] !== t ? (a = null, e[26] = j, e[27] = z, e[28] = U, e[29] = t, e[30] = a) : a = e[30];
|
|
69
69
|
let f;
|
|
70
|
-
e[31] !== c || e[32] !== a ? (f = /* @__PURE__ */ p(
|
|
70
|
+
e[31] !== c || e[32] !== a ? (f = /* @__PURE__ */ p(u, { style: S, align: "center", children: [
|
|
71
71
|
c,
|
|
72
72
|
a
|
|
73
73
|
] }), e[31] = c, e[32] = a, e[33] = f) : f = e[33];
|
|
74
|
-
let
|
|
75
|
-
return e[34] !== o || e[35] !== f ? (
|
|
74
|
+
let _;
|
|
75
|
+
return e[34] !== o || e[35] !== f ? (_ = /* @__PURE__ */ p(u, { justify: "space-between", align: "center", children: [
|
|
76
76
|
o,
|
|
77
77
|
f
|
|
78
|
-
] }), e[34] = o, e[35] = f, e[36] =
|
|
78
|
+
] }), e[34] = o, e[35] = f, e[36] = _) : _ = e[36], _;
|
|
79
79
|
};
|
|
80
80
|
function T() {
|
|
81
81
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { User } from '@code0-tech/sagittarius-graphql-types';
|
|
2
1
|
import { DUserView } from './DUser.view';
|
|
3
2
|
import { default as React } from 'react';
|
|
4
3
|
import { Card } from '../card/Card';
|
|
5
4
|
export interface DUserListProps extends Omit<Card, "children" | "onSelect"> {
|
|
6
5
|
filter?: (user: DUserView, index: number) => boolean;
|
|
7
|
-
onSelect?: (
|
|
8
|
-
onRemove?: (
|
|
6
|
+
onSelect?: (user: DUserView) => void;
|
|
7
|
+
onRemove?: (user: DUserView) => void;
|
|
9
8
|
}
|
|
10
9
|
export declare const DUserList: React.FC<DUserListProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import d from "react";
|
|
3
3
|
import { useService as u, useStore as l } from "../../utils/contextStore.js";
|
|
4
4
|
import "merge-props";
|
|
5
5
|
import { DUserReactiveService as t } from "./DUser.service.js";
|
|
@@ -12,9 +12,9 @@ const k = (i) => {
|
|
|
12
12
|
onRemove: s,
|
|
13
13
|
onSelect: o,
|
|
14
14
|
...c
|
|
15
|
-
} = i, n = u(t),
|
|
16
|
-
return /* @__PURE__ */ e(v, { ...c, children:
|
|
17
|
-
o && o(r
|
|
15
|
+
} = i, n = u(t), f = l(t), p = d.useMemo(() => n.values(), [f]);
|
|
16
|
+
return /* @__PURE__ */ e(v, { ...c, children: p.filter(m).map((r) => r && r.id && /* @__PURE__ */ e(S, { border: !0, hover: !0, onClick: () => {
|
|
17
|
+
o && o(r);
|
|
18
18
|
}, children: /* @__PURE__ */ e(a, { onRemove: s, userId: r?.id }) }, r.id)) });
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { c as j } from "../../_virtual/compiler-runtime.js";
|
|
2
|
+
import { useState as w, useEffect as E } from "react";
|
|
3
|
+
function h(i, t, e) {
|
|
4
|
+
return (t = x(t)) in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
var t =
|
|
6
|
+
function x(i) {
|
|
7
|
+
var t = N(i, "string");
|
|
7
8
|
return typeof t == "symbol" ? t : t + "";
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
if (typeof
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
var r =
|
|
10
|
+
function N(i, t) {
|
|
11
|
+
if (typeof i != "object" || !i) return i;
|
|
12
|
+
var e = i[Symbol.toPrimitive];
|
|
13
|
+
if (e !== void 0) {
|
|
14
|
+
var r = e.call(i, t);
|
|
14
15
|
if (typeof r != "object") return r;
|
|
15
16
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
16
17
|
}
|
|
17
|
-
return (t === "string" ? String : Number)(
|
|
18
|
+
return (t === "string" ? String : Number)(i);
|
|
18
19
|
}
|
|
19
|
-
class
|
|
20
|
-
constructor(t,
|
|
21
|
-
|
|
20
|
+
class _ {
|
|
21
|
+
constructor(t, e, r, s) {
|
|
22
|
+
h(this, "changeValue", void 0), h(this, "initialRender", void 0), h(this, "currentValues", void 0), h(this, "currentValidations", void 0), this.changeValue = t, this.currentValues = e, this.currentValidations = r, this.initialRender = s;
|
|
22
23
|
}
|
|
23
24
|
isValid() {
|
|
24
25
|
if (!this.currentValidations) return !0;
|
|
25
26
|
for (const t in this.currentValidations) {
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
27
|
+
const e = this.currentValidations[t];
|
|
28
|
+
if (e && e(this.currentValues[t], this.currentValues) !== null)
|
|
28
29
|
return !1;
|
|
29
30
|
}
|
|
30
31
|
return !0;
|
|
31
32
|
}
|
|
32
33
|
getInputProps(t) {
|
|
33
|
-
const
|
|
34
|
+
const e = this.currentValues[t], r = e ?? null, s = t, l = this.currentValidations && this.currentValidations[t] ? this.currentValidations[t] : (n) => null, a = this.initialRender ? null : l(e, this.currentValues);
|
|
34
35
|
return {
|
|
35
|
-
|
|
36
|
+
// @ts-ignore – z.B. wenn dein Input `defaultValue` kennt
|
|
37
|
+
defaultValue: r,
|
|
36
38
|
formValidation: {
|
|
37
|
-
setValue: (
|
|
38
|
-
this.changeValue(
|
|
39
|
+
setValue: (n) => {
|
|
40
|
+
this.changeValue(s, n);
|
|
39
41
|
},
|
|
40
42
|
...this.initialRender ? {
|
|
41
43
|
valid: !0
|
|
42
44
|
} : {
|
|
43
|
-
notValidMessage:
|
|
44
|
-
valid:
|
|
45
|
+
notValidMessage: a,
|
|
46
|
+
valid: a === null
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
49
|
...this.currentValidations && this.currentValidations[t] ? {
|
|
@@ -50,17 +52,40 @@ class d {
|
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
|
-
const
|
|
54
|
-
const {
|
|
55
|
-
initialValues:
|
|
56
|
-
validate:
|
|
57
|
-
onSubmit:
|
|
58
|
-
} =
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
const I = (i) => {
|
|
56
|
+
const t = j.c(17), {
|
|
57
|
+
initialValues: e,
|
|
58
|
+
validate: r,
|
|
59
|
+
onSubmit: s
|
|
60
|
+
} = i;
|
|
61
|
+
let l;
|
|
62
|
+
t[0] !== r ? (l = r === void 0 ? {} : r, t[0] = r, t[1] = l) : l = t[1];
|
|
63
|
+
const a = l, [n, b] = w(e), [R, y] = w(!1);
|
|
64
|
+
let u, o;
|
|
65
|
+
t[2] !== e ? (u = () => {
|
|
66
|
+
b(e), y(!1);
|
|
67
|
+
}, o = [e], t[2] = e, t[3] = u, t[4] = o) : (u = t[3], o = t[4]), E(u, o);
|
|
68
|
+
let c;
|
|
69
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (c = (g, S) => {
|
|
70
|
+
b((F) => ({
|
|
71
|
+
...F,
|
|
72
|
+
[g]: S
|
|
73
|
+
}));
|
|
74
|
+
}, t[5] = c) : c = t[5];
|
|
75
|
+
const P = c, m = !R;
|
|
76
|
+
let d;
|
|
77
|
+
t[6] !== m || t[7] !== a || t[8] !== n ? (d = new _(P, n, a, m), t[6] = m, t[7] = a, t[8] = n, t[9] = d) : d = t[9];
|
|
78
|
+
const v = d;
|
|
79
|
+
let f;
|
|
80
|
+
t[10] !== s || t[11] !== a || t[12] !== n ? (f = () => {
|
|
81
|
+
y(!0);
|
|
82
|
+
const g = new _(P, n, a, !1);
|
|
83
|
+
s && g.isValid() && s(n);
|
|
84
|
+
}, t[10] = s, t[11] = a, t[12] = n, t[13] = f) : f = t[13];
|
|
85
|
+
const p = f;
|
|
86
|
+
let V;
|
|
87
|
+
return t[14] !== p || t[15] !== v ? (V = [v, p], t[14] = p, t[15] = v, t[16] = V) : V = t[16], V;
|
|
63
88
|
};
|
|
64
89
|
export {
|
|
65
|
-
|
|
90
|
+
I as useForm
|
|
66
91
|
};
|