@mittwald/flow-remote-react-renderer 0.2.0-alpha.567 → 0.2.0-alpha.569
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/js/remote-react-renderer/src/components/Form.mjs.map +1 -1
- package/dist/js/remote-react-renderer/src/integrations/react-hook-form/Form.mjs.map +1 -1
- package/dist/types/components/Form.d.ts +2 -2
- package/dist/types/components/Form.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/Form.d.ts +2 -5
- package/dist/types/integrations/react-hook-form/Form.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","sources":["../../../../../src/components/Form.tsx"],"sourcesContent":["import {\n type FC,\n type FormEvent,\n type PropsWithChildren,\n type
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../../../src/components/Form.tsx"],"sourcesContent":["import {\n type FC,\n type FormEvent,\n type PropsWithChildren,\n type Ref,\n} from \"react\";\nimport { prepareFormData } from \"@/components/lib/prepareFormData\";\n\ntype FormProps = {\n action?: (data: FormData) => void | Promise<void>;\n onSubmit?: (data: FormData) => void | Promise<void>;\n ref?: Ref<HTMLFormElement>;\n} & PropsWithChildren;\n\nexport const Form: FC<FormProps> = (props) => {\n const {\n action: onActionFromProps,\n onSubmit: onSubmitFromProps,\n ref,\n ...rest\n } = props;\n\n const onSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const resolvedData = await prepareFormData(\n new FormData(event.currentTarget),\n );\n await onSubmitFromProps?.(resolvedData);\n };\n\n const onAction = async (formData: FormData) => {\n const resolvedFormData = await prepareFormData(formData);\n await onActionFromProps?.(resolvedFormData);\n };\n\n return (\n <form\n {...rest}\n ref={ref}\n action={onActionFromProps ? onAction : undefined}\n onSubmit={onSubmitFromProps ? onSubmit : undefined}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAcO,MAAM,IAAA,GAAsB,CAAC,KAAA,KAAU;AAC5C,EAAA,MAAM;AAAA,IACJ,MAAA,EAAQ,iBAAA;AAAA,IACR,QAAA,EAAU,iBAAA;AAAA,IACV,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,QAAA,GAAW,OAAO,KAAA,KAAsC;AAC5D,IAAA,KAAA,CAAM,cAAA,EAAe;AACrB,IAAA,MAAM,eAAe,MAAM,eAAA;AAAA,MACzB,IAAI,QAAA,CAAS,KAAA,CAAM,aAAa;AAAA,KAClC;AACA,IAAA,MAAM,oBAAoB,YAAY,CAAA;AAAA,EACxC,CAAA;AAEA,EAAA,MAAM,QAAA,GAAW,OAAO,QAAA,KAAuB;AAC7C,IAAA,MAAM,gBAAA,GAAmB,MAAM,eAAA,CAAgB,QAAQ,CAAA;AACvD,IAAA,MAAM,oBAAoB,gBAAgB,CAAA;AAAA,EAC5C,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,MAAA,EAAQ,oBAAoB,QAAA,GAAW,MAAA;AAAA,MACvC,QAAA,EAAU,oBAAoB,QAAA,GAAW;AAAA;AAAA,GAC3C;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","sources":["../../../../../../src/integrations/react-hook-form/Form.tsx"],"sourcesContent":["import {\n type FC,\n type FormEvent,\n type PropsWithChildren,\n type
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../../../../src/integrations/react-hook-form/Form.tsx"],"sourcesContent":["import {\n type FC,\n type FormEvent,\n type PropsWithChildren,\n type Ref,\n} from \"react\";\n\ntype FormProps = {\n onSubmit?: () => void | Promise<void>;\n ref?: Ref<HTMLFormElement>;\n} & PropsWithChildren;\n\n/**\n * ReactHookForm won't send the data over onSubmit, the form state is\n * transferred over onChange. To avoid sending unnecessary data, this RemoteForm\n * sends only the onSubmit without any formData.\n */\nexport const Form: FC<FormProps> = (props) => {\n const { onSubmit: onSubmitFromProps, ref, ...rest } = props;\n\n const onSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n await onSubmitFromProps?.();\n };\n\n return <form {...rest} ref={ref} onSubmit={onSubmit} />;\n};\n"],"names":[],"mappings":";;;AAiBO,MAAM,IAAA,GAAsB,CAAC,KAAA,KAAU;AAC5C,EAAA,MAAM,EAAE,QAAA,EAAU,iBAAA,EAAmB,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAEtD,EAAA,MAAM,QAAA,GAAW,OAAO,KAAA,KAAsC;AAC5D,IAAA,KAAA,CAAM,cAAA,EAAe;AACrB,IAAA,MAAM,iBAAA,IAAoB;AAAA,EAC5B,CAAA;AAEA,EAAA,uBAAO,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,IAAA,EAAM,KAAU,QAAA,EAAoB,CAAA;AACvD;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC, PropsWithChildren,
|
|
1
|
+
import { FC, PropsWithChildren, Ref } from 'react';
|
|
2
2
|
type FormProps = {
|
|
3
3
|
action?: (data: FormData) => void | Promise<void>;
|
|
4
4
|
onSubmit?: (data: FormData) => void | Promise<void>;
|
|
5
|
-
ref?:
|
|
5
|
+
ref?: Ref<HTMLFormElement>;
|
|
6
6
|
} & PropsWithChildren;
|
|
7
7
|
export declare const Form: FC<FormProps>;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAGf,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B,GAAG,iBAAiB,CAAC;AAEtB,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA6B9B,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { FC, PropsWithChildren,
|
|
1
|
+
import { FC, PropsWithChildren, Ref } from 'react';
|
|
2
2
|
type FormProps = {
|
|
3
3
|
onSubmit?: () => void | Promise<void>;
|
|
4
|
-
ref?:
|
|
4
|
+
ref?: Ref<HTMLFormElement>;
|
|
5
5
|
} & PropsWithChildren;
|
|
6
6
|
/**
|
|
7
7
|
* ReactHookForm won't send the data over onSubmit, the form state is
|
|
8
8
|
* transferred over onChange. To avoid sending unnecessary data, this RemoteForm
|
|
9
9
|
* sends only the onSubmit without any formData.
|
|
10
|
-
*
|
|
11
|
-
* @class
|
|
12
|
-
* @param props
|
|
13
10
|
*/
|
|
14
11
|
export declare const Form: FC<FormProps>;
|
|
15
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../src/integrations/react-hook-form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../src/integrations/react-hook-form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAEf,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B,GAAG,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAS9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-react-renderer",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.569",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React rendering for Flow Remote Elements",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"test:compile": "tsc --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
32
|
-
"@mittwald/flow-remote-core": "0.2.0-alpha.
|
|
33
|
-
"@mittwald/flow-remote-elements": "0.2.0-alpha.
|
|
31
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.569",
|
|
32
|
+
"@mittwald/flow-remote-core": "0.2.0-alpha.569",
|
|
33
|
+
"@mittwald/flow-remote-elements": "0.2.0-alpha.569",
|
|
34
34
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
35
35
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
36
36
|
"@types/react": "^19.2.2",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@mittwald/flow-core": "",
|
|
43
|
-
"@mittwald/flow-react-components": "0.2.0-alpha.
|
|
43
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.569",
|
|
44
44
|
"@mittwald/typescript-config": "",
|
|
45
45
|
"@types/node": "^24.9.1",
|
|
46
46
|
"nx": "^21.6.5",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"vite-plugin-externalize-deps": "^0.10.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@mittwald/flow-react-components": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.568",
|
|
62
62
|
"react": "^19",
|
|
63
63
|
"react-dom": "^19",
|
|
64
64
|
"react-hook-form": "*"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"optional": true
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "b3cc64583d628802ab78e5cc3a726f8e8537dff4"
|
|
72
72
|
}
|