@mittwald/flow-react-components 0.2.0-alpha.643 → 0.2.0-alpha.645
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/CHANGELOG.md +8 -0
- package/dist/assets/doc-properties.json +6928 -4940
- package/dist/js/components/src/components/Action/Action.mjs +0 -1
- package/dist/js/components/src/components/Action/Action.mjs.map +1 -1
- package/dist/js/components/src/components/Action/models/ActionState.mjs +5 -1
- package/dist/js/components/src/components/Action/models/ActionState.mjs.map +1 -1
- package/dist/js/components/src/components/propTypes/index.mjs +0 -2
- package/dist/js/components/src/components/propTypes/index.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs +1 -15
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs +19 -36
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Form/useHotkeySubmit.mjs +19 -0
- package/dist/js/components/src/integrations/react-hook-form/components/Form/useHotkeySubmit.mjs.map +1 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.mjs +42 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.mjs.map +1 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.mjs +37 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.mjs.map +1 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormSubmitAction/FormSubmitAction.mjs +17 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormSubmitAction/FormSubmitAction.mjs.map +1 -0
- package/dist/js/components/src/integrations/react-hook-form/components/ResetButton/ResetButton.mjs +16 -34
- package/dist/js/components/src/integrations/react-hook-form/components/ResetButton/ResetButton.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/SubmitButton/SubmitButton.mjs +19 -56
- package/dist/js/components/src/integrations/react-hook-form/components/SubmitButton/SubmitButton.mjs.map +1 -1
- package/dist/js/react-hook-form.mjs +1 -1
- package/dist/types/components/Action/Action.d.ts.map +1 -1
- package/dist/types/components/Action/models/ActionState.d.ts +1 -0
- package/dist/types/components/Action/models/ActionState.d.ts.map +1 -1
- package/dist/types/components/Button/stories/lib.d.ts +3 -0
- package/dist/types/components/Button/stories/lib.d.ts.map +1 -1
- package/dist/types/components/List/typedList.d.ts +1 -1
- package/dist/types/components/propTypes/index.d.ts +0 -4
- package/dist/types/components/propTypes/index.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/stories/Form.stories.d.ts +4 -0
- package/dist/types/integrations/react-hook-form/components/Form/stories/Form.stories.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/useHotkeySubmit.d.ts +8 -0
- package/dist/types/integrations/react-hook-form/components/Form/useHotkeySubmit.d.ts.map +1 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.d.ts +21 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.d.ts.map +1 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/index.d.ts +3 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/index.d.ts.map +1 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.d.ts +9 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.d.ts.map +1 -0
- package/dist/types/integrations/react-hook-form/components/FormSubmitAction/FormSubmitAction.d.ts +4 -0
- package/dist/types/integrations/react-hook-form/components/FormSubmitAction/FormSubmitAction.d.ts.map +1 -0
- package/dist/types/integrations/react-hook-form/components/FormSubmitAction/index.d.ts +2 -0
- package/dist/types/integrations/react-hook-form/components/FormSubmitAction/index.d.ts.map +1 -0
- package/dist/types/integrations/react-hook-form/components/ResetButton/ResetButton.d.ts +1 -6
- package/dist/types/integrations/react-hook-form/components/ResetButton/ResetButton.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/ResetButton/index.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/ResetButton/index.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/SubmitButton/SubmitButton.d.ts +1 -6
- package/dist/types/integrations/react-hook-form/components/SubmitButton/SubmitButton.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/SubmitButton/index.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/SubmitButton/index.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/js/components/src/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext.mjs +0 -77
- package/dist/js/components/src/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext.mjs.map +0 -1
- package/dist/js/components/src/integrations/react-hook-form/components/context/formContext.mjs +0 -19
- package/dist/js/components/src/integrations/react-hook-form/components/context/formContext.mjs.map +0 -1
- package/dist/types/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext.d.ts +0 -7
- package/dist/types/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext.d.ts.map +0 -1
- package/dist/types/integrations/react-hook-form/components/context/formContext.d.ts +0 -19
- package/dist/types/integrations/react-hook-form/components/context/formContext.d.ts.map +0 -1
package/dist/js/components/src/integrations/react-hook-form/components/SubmitButton/SubmitButton.mjs
CHANGED
|
@@ -1,63 +1,26 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import '../../../../
|
|
8
|
-
import '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
|
-
import { useMemo } from 'react';
|
|
10
|
-
import 'react-hook-form';
|
|
11
|
-
import 'react-hotkeys-hook';
|
|
12
|
-
import 'react-aria';
|
|
13
|
-
import '../../../../views/FieldErrorView.mjs';
|
|
14
|
-
import { useObjectRef } from '@react-aria/utils';
|
|
15
|
-
import 'mobx';
|
|
16
|
-
import '../../../../lib/controller/overlay/context.mjs';
|
|
17
|
-
import 'invariant';
|
|
18
|
-
import '../../../../components/Action/context.mjs';
|
|
19
|
-
import '../../../../components/Action/models/ActionStateContext.mjs';
|
|
20
|
-
import 'remeda';
|
|
21
|
-
import '../ResetButton/ResetButton.mjs';
|
|
22
|
-
import { Action } from '../../../../components/Action/Action.mjs';
|
|
23
|
-
import '@react-aria/live-announcer';
|
|
24
|
-
import { useMergeRefs } from 'use-callback-ref';
|
|
4
|
+
import '../../../../components/Button/Button.mjs';
|
|
5
|
+
import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
|
|
6
|
+
import { FormSubmitAction } from '../FormSubmitAction/FormSubmitAction.mjs';
|
|
7
|
+
import ButtonView from '../../../../views/ButtonView.mjs';
|
|
25
8
|
|
|
26
|
-
const SubmitButton =
|
|
27
|
-
|
|
28
|
-
(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...rest
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const submitButtonRefFromProps = useObjectRef(ref);
|
|
42
|
-
const submitButtonRef = useMergeRefs([
|
|
43
|
-
submitButtonRefFromProps,
|
|
44
|
-
submitButtonRefFromFormContext
|
|
45
|
-
]);
|
|
46
|
-
return /* @__PURE__ */ jsx(Action, { actionModel: formActionModel, children: /* @__PURE__ */ jsx(
|
|
47
|
-
ButtonViewComponent,
|
|
48
|
-
{
|
|
49
|
-
...rest,
|
|
50
|
-
ref: submitButtonRef,
|
|
51
|
-
type: "submit",
|
|
52
|
-
form: formId,
|
|
53
|
-
children
|
|
54
|
-
}
|
|
55
|
-
) });
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
type: "provider"
|
|
59
|
-
}
|
|
60
|
-
);
|
|
9
|
+
const SubmitButton = (props) => {
|
|
10
|
+
const { children, isReadOnly: isReadOnlyProp, ...rest } = props;
|
|
11
|
+
const formContext = useFormContext();
|
|
12
|
+
const isReadOnly = isReadOnlyProp || formContext.isReadOnly;
|
|
13
|
+
return /* @__PURE__ */ jsx(FormSubmitAction, { children: /* @__PURE__ */ jsx(
|
|
14
|
+
ButtonView,
|
|
15
|
+
{
|
|
16
|
+
...rest,
|
|
17
|
+
type: "submit",
|
|
18
|
+
form: formContext.id,
|
|
19
|
+
isReadOnly,
|
|
20
|
+
children
|
|
21
|
+
}
|
|
22
|
+
) });
|
|
23
|
+
};
|
|
61
24
|
|
|
62
25
|
export { SubmitButton, SubmitButton as default };
|
|
63
26
|
//# sourceMappingURL=SubmitButton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitButton.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/SubmitButton/SubmitButton.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"SubmitButton.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/SubmitButton/SubmitButton.tsx"],"sourcesContent":["import { type ButtonProps } from \"@/components/Button\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport FormSubmitAction from \"@/integrations/react-hook-form/components/FormSubmitAction\";\nimport ButtonView from \"@/views/ButtonView\";\nimport type { FC } from \"react\";\n\nexport const SubmitButton: FC<ButtonProps> = (props) => {\n const { children, isReadOnly: isReadOnlyProp, ...rest } = props;\n\n const formContext = useFormContext();\n\n const isReadOnly = isReadOnlyProp || formContext.isReadOnly;\n\n return (\n <FormSubmitAction>\n <ButtonView\n {...rest}\n type=\"submit\"\n form={formContext.id}\n isReadOnly={isReadOnly}\n >\n {children}\n </ButtonView>\n </FormSubmitAction>\n );\n};\n\nexport default SubmitButton;\n"],"names":[],"mappings":";;;;;;AAMO,MAAM,YAAA,GAAgC,CAAC,KAAA,KAAU;AACtD,EAAA,MAAM,EAAE,QAAA,EAAU,UAAA,EAAY,cAAA,EAAgB,GAAG,MAAK,GAAI,KAAA;AAE1D,EAAA,MAAM,cAAc,cAAA,EAAe;AAEnC,EAAA,MAAM,UAAA,GAAa,kBAAkB,WAAA,CAAY,UAAA;AAEjD,EAAA,2BACG,gBAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,IAAA,EAAK,QAAA;AAAA,MACL,MAAM,WAAA,CAAY,EAAA;AAAA,MAClB,UAAA;AAAA,MAEC;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -4,5 +4,5 @@ export { Field, typedField } from './components/src/integrations/react-hook-form
|
|
|
4
4
|
export { Form } from './components/src/integrations/react-hook-form/components/Form/Form.mjs';
|
|
5
5
|
export { SubmitButton } from './components/src/integrations/react-hook-form/components/SubmitButton/SubmitButton.mjs';
|
|
6
6
|
export { ResetButton } from './components/src/integrations/react-hook-form/components/ResetButton/ResetButton.mjs';
|
|
7
|
-
export { useFormContext, useOptionalFormContext } from './components/src/integrations/react-hook-form/components/
|
|
7
|
+
export { useFormContext, useOptionalFormContext } from './components/src/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.mjs';
|
|
8
8
|
//# sourceMappingURL=react-hook-form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/Action.tsx"],"names":[],"mappings":"AAgDA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/Action.tsx"],"names":[],"mappings":"AAgDA,eAAO,MAAM,MAAM,kHA2DlB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionState.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/models/ActionState.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,aAAa,GACb,WAAW,GACX,aAAa,GACb,UAAU,CAAC;AAEf,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAC,CAAU;IACxB,KAAK,EAAE,gBAAgB,CAAY;IAC1C,OAAO,CAAC,iBAAiB,CAAqB;IACvC,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,OAAO,CAAS;;WAUV,MAAM,IAAI,WAAW;IAI5B,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAI7C,QAAQ,IAAI,gBAAgB;IAI5B,SAAS,IAAI,OAAO;IAI3B,IAAW,MAAM,IAAI,OAAO,CAE3B;IAEM,YAAY,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"ActionState.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/models/ActionState.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,aAAa,GACb,WAAW,GACX,aAAa,GACb,UAAU,CAAC;AAEf,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAC,CAAU;IACxB,KAAK,EAAE,gBAAgB,CAAY;IAC1C,OAAO,CAAC,iBAAiB,CAAqB;IACvC,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,OAAO,CAAS;;WAUV,MAAM,IAAI,WAAW;IAI5B,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAI7C,QAAQ,IAAI,gBAAgB;IAI5B,SAAS,IAAI,OAAO;IAI3B,IAAW,MAAM,IAAI,OAAO,CAE3B;IAEM,YAAY,IAAI,IAAI;IAUd,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9C,YAAY,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,WAAW;YAKtC,mBAAmB;YAMnB,sBAAsB;IAMpC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,mBAAmB;YAMb,MAAM;IAcpB,OAAO,CAAC,YAAY;CAGrB"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const syncFunction: import('storybook/actions').HandlerFunction;
|
|
2
|
+
export declare const syncFunctionWithError: () => never;
|
|
2
3
|
export declare const asyncFunction: (...args: unknown[]) => Promise<void>;
|
|
3
4
|
export declare const asyncLongFunction: (...args: unknown[]) => Promise<void>;
|
|
5
|
+
export declare const asyncLongFunctionWithError: (...args: unknown[]) => Promise<never>;
|
|
6
|
+
export declare const asyncFunctionWithError: (...args: unknown[]) => Promise<never>;
|
|
4
7
|
export declare const button: import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/stories/lib.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/stories/lib.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,6CAAiB,CAAC;AAC3C,eAAO,MAAM,qBAAqB,aAGjC,CAAC;AAKF,eAAO,MAAM,aAAa,GAAU,GAAG,MAAM,OAAO,EAAE,kBAIrD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,GAAG,MAAM,OAAO,EAAE,kBAMzD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,GAAG,MAAM,OAAO,EAAE,mBAGlE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAU,GAAG,MAAM,OAAO,EAAE,mBAG9D,CAAC;AAEF,eAAO,MAAM,MAAM,yCAAkD,CAAC"}
|
|
@@ -99,8 +99,8 @@ export declare const typedList: <T, TMeta = unknown>() => {
|
|
|
99
99
|
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLTableRowElement> | undefined;
|
|
100
100
|
id?: import('react-aria').Key | undefined;
|
|
101
101
|
rel?: string | undefined;
|
|
102
|
-
href?: import('@react-types/shared').Href | undefined;
|
|
103
102
|
target?: import('react').HTMLAttributeAnchorTarget | undefined;
|
|
103
|
+
href?: import('@react-types/shared').Href | undefined;
|
|
104
104
|
isDisabled?: boolean | undefined;
|
|
105
105
|
onPress?: ((e: import('react-aria').PressEvent) => void) | undefined;
|
|
106
106
|
onPressStart?: ((e: import('react-aria').PressEvent) => void) | undefined;
|
|
@@ -67,8 +67,6 @@ import { NavigationGroupProps } from '../Navigation/components/NavigationGroup';
|
|
|
67
67
|
import { AutocompleteProps } from '../Autocomplete/Autocomplete';
|
|
68
68
|
import { OptionsProps } from '../Options/Options';
|
|
69
69
|
import { MarkdownEditorProps } from '../MarkdownEditor';
|
|
70
|
-
import { SubmitButtonProps } from '../../integrations/react-hook-form/components/SubmitButton/SubmitButton';
|
|
71
|
-
import { ResetButtonProps } from '../../integrations/react-hook-form/components/ResetButton/ResetButton';
|
|
72
70
|
import { AlertTextProps } from '../AlertText';
|
|
73
71
|
import { IllustratedMessageProps } from '../IllustratedMessage';
|
|
74
72
|
import type * as Aria from "react-aria-components";
|
|
@@ -144,8 +142,6 @@ export interface FlowComponentPropsTypes {
|
|
|
144
142
|
SegmentedControl: SegmentedControlProps;
|
|
145
143
|
Select: SelectProps;
|
|
146
144
|
Slider: SliderProps;
|
|
147
|
-
SubmitButton: SubmitButtonProps;
|
|
148
|
-
ResetButton: ResetButtonProps;
|
|
149
145
|
Switch: SwitchProps;
|
|
150
146
|
Tabs: TabsProps;
|
|
151
147
|
TabTitle: TabsProps;
|
|
@@ -1 +1 @@
|
|
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,EAAE,cAAc,CAAC;CAC3B;AAsFD,eAAO,MAAM,gCAAgC,EAExC,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;AAKzB,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,CAC/C,SAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACxC,iBAAiB;CAAG;AAExB,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,2CAgIhE;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,EAC9C,aAAa,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAC1D,OAAO,KAAK,CAAC,CAAC,CAAU,CAAC;AAE5B,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,EAAE,EAEP,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAGT,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;AAE1E,KAAK,iBAAiB,GAAG,EAAE,CACzB,iBAAiB,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACzD,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B,CAAC,CACH,CAAC;AAEF,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAC9C,SAAQ,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC9C,iBAAiB;IACnB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAID,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,2CA6C9D;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -5,4 +5,8 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof Form>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const ReadOnly: Story;
|
|
8
|
+
export declare const WithHandledSubmitError: Story;
|
|
9
|
+
export declare const WithUnhandledSubmitError: Story;
|
|
10
|
+
export declare const WithUnhandledSubmitErrorSync: Story;
|
|
11
|
+
export declare const WithValidationError: Story;
|
|
8
12
|
//# sourceMappingURL=Form.stories.d.ts.map
|
package/dist/types/integrations/react-hook-form/components/Form/stories/Form.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/integrations/react-hook-form/components/Form/stories/Form.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/integrations/react-hook-form/components/Form/stories/Form.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAE3E,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqBvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA2B3B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,sBAAsB,EAAE,KAgCpC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAwBtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAwB1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAgCjC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
interface Options {
|
|
3
|
+
ref: Ref<HTMLFormElement> | undefined;
|
|
4
|
+
handleSubmit: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useHotkeySubmit: (options: Options) => import('react').MutableRefObject<HTMLFormElement | null>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=useHotkeySubmit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHotkeySubmit.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/useHotkeySubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,UAAU,OAAO;IACf,GAAG,EAAE,GAAG,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC;IACtC,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,6DAU/C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
3
|
+
import { ActionModel } from '../../../../components/Action/models/ActionModel';
|
|
4
|
+
interface FormContext {
|
|
5
|
+
form: UseFormReturn;
|
|
6
|
+
id: string;
|
|
7
|
+
isReadOnly: boolean;
|
|
8
|
+
setReadOnly: Dispatch<SetStateAction<boolean>>;
|
|
9
|
+
formSubmitAction: ActionModel;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormContext: import('react').Context<FormContext | undefined>;
|
|
12
|
+
export interface FormContextProviderProps extends PropsWithChildren {
|
|
13
|
+
form: UseFormReturn;
|
|
14
|
+
id: string;
|
|
15
|
+
isReadOnly?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const FormContextProvider: (props: FormContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const useFormContext: () => FormContext;
|
|
19
|
+
export declare const useOptionalFormContext: () => FormContext | undefined;
|
|
20
|
+
export default FormContextProvider;
|
|
21
|
+
//# sourceMappingURL=FormContextProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContextProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAI1E,UAAU,WAAW;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,gBAAgB,EAAE,WAAW,CAAC;CAC/B;AAED,eAAO,MAAM,WAAW,kDAAoD,CAAC;AAE7E,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,IAAI,EAAE,aAAa,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB,4CAwBlE,CAAC;AAEF,eAAO,MAAM,cAAc,mBAO1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,+BAAgC,CAAC;AAEpE,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormContextProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mFAAmF,CAAC;AAC5G,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,cAAc,EACd,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionModel } from '../../../../components/Action/models/ActionModel';
|
|
2
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
+
interface Options {
|
|
4
|
+
form: UseFormReturn;
|
|
5
|
+
setReadOnly: (isReadOnly: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useFormSubmitAction: (options: Options) => ActionModel;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useFormSubmitAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormSubmitAction.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,OAAO;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,mBAAmB,GAAI,SAAS,OAAO,gBAiCnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSubmitAction.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormSubmitAction/FormSubmitAction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAIlD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormSubmitAction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '../../../../components/Button';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
export
|
|
4
|
-
buttonComponent?: FC<Omit<ButtonProps, "ref">>;
|
|
5
|
-
};
|
|
6
|
-
export declare const ResetButton: import('react').FunctionComponent<Omit<ButtonProps, "isFailed" | "isSucceeded" | "isPending" | "isReadOnly" | "type"> & {
|
|
7
|
-
buttonComponent?: FC<Omit<ButtonProps, "ref">>;
|
|
8
|
-
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
3
|
+
export declare const ResetButton: FC<ButtonProps>;
|
|
9
4
|
export default ResetButton;
|
|
10
5
|
//# sourceMappingURL=ResetButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetButton.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/ResetButton/ResetButton.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ResetButton.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/ResetButton/ResetButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,CAwBvC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/ResetButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mEAAmE,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/ResetButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mEAAmE,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '../../../../components/Button';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
export
|
|
4
|
-
buttonComponent?: FC<Omit<ButtonProps, "ref">>;
|
|
5
|
-
};
|
|
6
|
-
export declare const SubmitButton: import('react').FunctionComponent<Omit<ButtonProps, "isFailed" | "isSucceeded" | "isPending" | "isReadOnly" | "type"> & {
|
|
7
|
-
buttonComponent?: FC<Omit<ButtonProps, "ref">>;
|
|
8
|
-
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
3
|
+
export declare const SubmitButton: FC<ButtonProps>;
|
|
9
4
|
export default SubmitButton;
|
|
10
5
|
//# sourceMappingURL=SubmitButton.d.ts.map
|
package/dist/types/integrations/react-hook-form/components/SubmitButton/SubmitButton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/SubmitButton/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/SubmitButton/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,WAAW,CAmBxC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/SubmitButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qEAAqE,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/SubmitButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qEAAqE,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -2,5 +2,5 @@ export * from './components/Field';
|
|
|
2
2
|
export * from './components/Form';
|
|
3
3
|
export * from './components/SubmitButton';
|
|
4
4
|
export * from './components/ResetButton';
|
|
5
|
-
export { useFormContext, useOptionalFormContext, } from './components/
|
|
5
|
+
export { useFormContext, useOptionalFormContext, } from './components/FormContextProvider';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.645",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
60
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
61
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.645",
|
|
62
62
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
63
63
|
"@react-aria/form": "^3.1.2",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@faker-js/faker": "^10.1.0",
|
|
104
104
|
"@internationalized/date": "^3.10.0",
|
|
105
105
|
"@mittwald/flow-core": "",
|
|
106
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
106
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.645",
|
|
107
107
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
108
108
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
109
109
|
"@mittwald/typescript-config": "",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"optional": true
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "45bc30dd2956b76387f35a50d6e550f40586181f"
|
|
176
176
|
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { ActionModel } from '../../../../../components/Action/models/ActionModel.mjs';
|
|
4
|
-
import { useRef, useEffect } from 'react';
|
|
5
|
-
import { isPromise } from 'remeda';
|
|
6
|
-
|
|
7
|
-
const callAfterSubmitFunction = (result) => {
|
|
8
|
-
const callFn = (something) => {
|
|
9
|
-
if (typeof something === "function") {
|
|
10
|
-
something();
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
if (result instanceof Promise) {
|
|
14
|
-
result.then(callFn);
|
|
15
|
-
} else {
|
|
16
|
-
callFn(result);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const useRegisterActionStateContext = (form) => {
|
|
20
|
-
const action = ActionModel.useNew({});
|
|
21
|
-
const trackedSubmitCount = useRef(0);
|
|
22
|
-
const submitHandlerResultRef = useRef(null);
|
|
23
|
-
const currentActionState = action.state.useValue();
|
|
24
|
-
const lastActionState = useRef(currentActionState);
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (currentActionState === "isIdle" && lastActionState.current === "isSucceeded") {
|
|
27
|
-
callAfterSubmitFunction(submitHandlerResultRef.current);
|
|
28
|
-
}
|
|
29
|
-
lastActionState.current = currentActionState;
|
|
30
|
-
}, [currentActionState]);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
return form.subscribe({
|
|
33
|
-
formState: {
|
|
34
|
-
errors: true
|
|
35
|
-
},
|
|
36
|
-
callback: ({
|
|
37
|
-
isSubmitted = false,
|
|
38
|
-
isSubmitSuccessful = false,
|
|
39
|
-
submitCount = 0,
|
|
40
|
-
errors
|
|
41
|
-
}) => {
|
|
42
|
-
if (submitCount === 0 && trackedSubmitCount.current > 0) {
|
|
43
|
-
trackedSubmitCount.current = 0;
|
|
44
|
-
}
|
|
45
|
-
if (trackedSubmitCount.current === submitCount) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
trackedSubmitCount.current = submitCount;
|
|
49
|
-
if (isSubmitted) {
|
|
50
|
-
if (isSubmitSuccessful) {
|
|
51
|
-
void action.state.onSucceeded();
|
|
52
|
-
} else {
|
|
53
|
-
const hasFailedWithError = isSubmitted && errors && Object.entries(errors).length > 0 ? errors : void 0;
|
|
54
|
-
void action.state.onFailed(hasFailedWithError);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}, [form.subscribe]);
|
|
60
|
-
const registerSubmitResult = (result) => {
|
|
61
|
-
if (isPromise(result)) {
|
|
62
|
-
void action.state.onAsyncStart();
|
|
63
|
-
result.then((submitResult) => {
|
|
64
|
-
submitHandlerResultRef.current = submitResult;
|
|
65
|
-
});
|
|
66
|
-
} else {
|
|
67
|
-
submitHandlerResultRef.current = result;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
return {
|
|
71
|
-
action,
|
|
72
|
-
registerSubmitResult
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export { useRegisterActionStateContext };
|
|
77
|
-
//# sourceMappingURL=useRegisterActionStateContext.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRegisterActionStateContext.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext.ts"],"sourcesContent":["import { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { useEffect, useRef } from \"react\";\nimport { isPromise } from \"remeda\";\nimport type { FieldValues, UseFormReturn } from \"react-hook-form\";\n\nconst callAfterSubmitFunction = (result: unknown) => {\n const callFn = (something: unknown) => {\n if (typeof something === \"function\") {\n something();\n }\n };\n\n if (result instanceof Promise) {\n result.then(callFn);\n } else {\n callFn(result);\n }\n};\n\nexport const useRegisterActionStateContext = <T extends FieldValues>(\n form: UseFormReturn<T>,\n) => {\n const action = ActionModel.useNew({});\n const trackedSubmitCount = useRef(0);\n const submitHandlerResultRef = useRef<unknown>(null);\n\n const currentActionState = action.state.useValue();\n const lastActionState = useRef<string>(currentActionState);\n\n useEffect(() => {\n if (\n currentActionState === \"isIdle\" &&\n lastActionState.current === \"isSucceeded\"\n ) {\n callAfterSubmitFunction(submitHandlerResultRef.current);\n }\n lastActionState.current = currentActionState;\n }, [currentActionState]);\n\n useEffect(() => {\n return form.subscribe({\n formState: {\n errors: true,\n },\n callback: ({\n isSubmitted = false,\n isSubmitSuccessful = false,\n submitCount = 0,\n errors,\n }) => {\n if (submitCount === 0 && trackedSubmitCount.current > 0) {\n trackedSubmitCount.current = 0;\n }\n\n if (trackedSubmitCount.current === submitCount) {\n return;\n }\n trackedSubmitCount.current = submitCount;\n\n if (isSubmitted) {\n if (isSubmitSuccessful) {\n void action.state.onSucceeded();\n } else {\n const hasFailedWithError =\n isSubmitted && errors && Object.entries(errors).length > 0\n ? errors\n : undefined;\n\n void action.state.onFailed(hasFailedWithError);\n }\n }\n },\n });\n }, [form.subscribe]);\n\n const registerSubmitResult = (result: unknown) => {\n if (isPromise(result)) {\n void action.state.onAsyncStart();\n result.then((submitResult) => {\n submitHandlerResultRef.current = submitResult;\n });\n } else {\n submitHandlerResultRef.current = result;\n }\n };\n\n return {\n action,\n registerSubmitResult,\n } as const;\n};\n"],"names":[],"mappings":";;;;AAKA,MAAM,uBAAA,GAA0B,CAAC,MAAA,KAAoB;AACnD,EAAA,MAAM,MAAA,GAAS,CAAC,SAAA,KAAuB;AACrC,IAAA,IAAI,OAAO,cAAc,UAAA,EAAY;AACnC,MAAA,SAAA,EAAU;AAAA,IACZ;AAAA,EACF,CAAA;AAEA,EA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AACA,QAAA,kBAAA,CAAmB,OAAA,GAAU,WAAA;AAE7B,QAAA,IAAI,WAAA,EAAa;AACf,UAAA,IAAI,kBAAA,EAAoB;AACtB,YAAA,KAAK,MAAA,CAAO,MAAM,WAAA,EAAY;AAAA,UAChC,CAAA,MAAO;AACL,YAAA,MAAM,kBAAA,GACJ,eAAe,MAAA,IAAU,MAAA,CAAO,QAAQ,MAAM,CAAA,CAAE,MAAA,GAAS,CAAA,GACrD,MAAA,GACA,MAAA;AAEN,YAAA,KAAK,MAAA,CAAO,KAAA,CAAM,QAAA,CAAS,kBAAkB,CAAA;AAAA,UAC/C;AAAA,QACF;AAAA,MACF;AAAA,KACD,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,IAAA,CAAK,SAAS,CAAC,CAAA;AAEnB,EAAA,MAAM,oBAAA,GAAuB,CAAC,MAAA,KAAoB;AAChD,IAAA,IAAI,SAAA,CAAU,MAAM,CAAA,EAAG;AACrB,MAAA,KAAK,MAAA,CAAO,MAAM,YAAA,EAAa;AAC/B,MAAA,MAAA,CAAO,IAAA,CAAK,CAAC,YAAA,KAAiB;AAC5B,QAAA,sBAAA,CAAuB,OAAA,GAAU,YAAA;AAAA,MACnC,CAAC,CAAA;AAAA,IACH,CAAA,MAAO;AACL,MAAA,sBAAA,CAAuB,OAAA,GAAU,MAAA;AAAA,IACnC;AAAA,EACF,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,MAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
package/dist/js/components/src/integrations/react-hook-form/components/context/formContext.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { createContext, useContext } from 'react';
|
|
4
|
-
import invariant from 'invariant';
|
|
5
|
-
|
|
6
|
-
const formContext = createContext(void 0);
|
|
7
|
-
const FormContextProvider = formContext.Provider;
|
|
8
|
-
const useFormContext = () => {
|
|
9
|
-
const ctx = useContext(formContext);
|
|
10
|
-
invariant(
|
|
11
|
-
!!ctx,
|
|
12
|
-
"Could not useFormContext() outside a Form, or multiple versions of Flow installed."
|
|
13
|
-
);
|
|
14
|
-
return ctx;
|
|
15
|
-
};
|
|
16
|
-
const useOptionalFormContext = () => useContext(formContext);
|
|
17
|
-
|
|
18
|
-
export { FormContextProvider, formContext, useFormContext, useOptionalFormContext };
|
|
19
|
-
//# sourceMappingURL=formContext.mjs.map
|
package/dist/js/components/src/integrations/react-hook-form/components/context/formContext.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formContext.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/context/formContext.ts"],"sourcesContent":["import type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport {\n createContext,\n useContext,\n type Dispatch,\n type FormEvent,\n type RefObject,\n type SetStateAction,\n} from \"react\";\nimport invariant from \"invariant\";\nimport type { ActionModel } from \"@/components/Action/models/ActionModel\";\n\ninterface FormContext<F extends FieldValues> {\n form: UseFormReturn<F>;\n id: string;\n isReadOnly: boolean;\n setReadOnly: Dispatch<SetStateAction<boolean>>;\n submitButtonRef: RefObject<HTMLButtonElement | null>;\n submit: (e?: FormEvent<HTMLFormElement> | F) => void;\n formActionModel: ActionModel;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyFormContext = FormContext<any>;\n\nexport const formContext = createContext<AnyFormContext | undefined>(undefined);\n\nexport const FormContextProvider = formContext.Provider;\n\nexport const useFormContext = <F extends FieldValues>(): FormContext<F> => {\n const ctx = useContext(formContext);\n invariant(\n !!ctx,\n \"Could not useFormContext() outside a Form, or multiple versions of Flow installed.\",\n );\n return ctx;\n};\n\nexport const useOptionalFormContext = <F extends FieldValues>() =>\n useContext(formContext) as FormContext<F> | undefined;\n"],"names":[],"mappings":";;;AAyBO,MAAM,WAAA,GAAc,cAA0C,MAAS;AAEvE,MAAM,sBAAsB,WAAA,CAAY;AAExC,MAAM,iBAAiB,MAA6C;AACzE,EAAA,MAAM,GAAA,GAAM,WAAW,WAAW,CAAA;AAClC,EAAA,SAAA;AAAA,IACE,CAAC,CAAC,GAAA;AAAA,IACF;AAAA,GACF;AACA,EAAA,OAAO,GAAA;AACT;AAEO,MAAM,sBAAA,GAAyB,MACpC,UAAA,CAAW,WAAW;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionModel } from '../../../../../components/Action/models/ActionModel';
|
|
2
|
-
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
|
-
export declare const useRegisterActionStateContext: <T extends FieldValues>(form: UseFormReturn<T>) => {
|
|
4
|
-
readonly action: ActionModel;
|
|
5
|
-
readonly registerSubmitResult: (result: unknown) => void;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=useRegisterActionStateContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRegisterActionStateContext.d.ts","sourceRoot":"","sources":["../../../../../../../src/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgBlE,eAAO,MAAM,6BAA6B,GAAI,CAAC,SAAS,WAAW,EACjE,MAAM,aAAa,CAAC,CAAC,CAAC;;4CAuDgB,OAAO;CAe9C,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
|
-
import { Dispatch, FormEvent, RefObject, SetStateAction } from 'react';
|
|
3
|
-
import { ActionModel } from '../../../../components/Action/models/ActionModel';
|
|
4
|
-
interface FormContext<F extends FieldValues> {
|
|
5
|
-
form: UseFormReturn<F>;
|
|
6
|
-
id: string;
|
|
7
|
-
isReadOnly: boolean;
|
|
8
|
-
setReadOnly: Dispatch<SetStateAction<boolean>>;
|
|
9
|
-
submitButtonRef: RefObject<HTMLButtonElement | null>;
|
|
10
|
-
submit: (e?: FormEvent<HTMLFormElement> | F) => void;
|
|
11
|
-
formActionModel: ActionModel;
|
|
12
|
-
}
|
|
13
|
-
type AnyFormContext = FormContext<any>;
|
|
14
|
-
export declare const formContext: import('react').Context<AnyFormContext | undefined>;
|
|
15
|
-
export declare const FormContextProvider: import('react').Provider<AnyFormContext | undefined>;
|
|
16
|
-
export declare const useFormContext: <F extends FieldValues>() => FormContext<F>;
|
|
17
|
-
export declare const useOptionalFormContext: <F extends FieldValues>() => FormContext<F> | undefined;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=formContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formContext.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/context/formContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAE1E,UAAU,WAAW,CAAC,CAAC,SAAS,WAAW;IACzC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,eAAe,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACrD,eAAe,EAAE,WAAW,CAAC;CAC9B;AAGD,KAAK,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAEvC,eAAO,MAAM,WAAW,qDAAuD,CAAC;AAEhF,eAAO,MAAM,mBAAmB,sDAAuB,CAAC;AAExD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,OAAK,WAAW,CAAC,CAAC,CAOrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,WAAW,OAC/B,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"}
|