@homefile/components-v2 2.14.25 → 2.14.26
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.
|
@@ -10,6 +10,7 @@ export const AIGridField = ({ children, onAISend, onRemove, onUpload, }) => {
|
|
|
10
10
|
const [file, setFile] = useState(undefined);
|
|
11
11
|
const { watch } = useFormContext();
|
|
12
12
|
const textChild = children === null || children === void 0 ? void 0 : children.find(({ type }) => type === 'text' || type === 'string');
|
|
13
|
+
console.log('text', textChild);
|
|
13
14
|
const textProps = {
|
|
14
15
|
id: (_a = textChild === null || textChild === void 0 ? void 0 : textChild.id) !== null && _a !== void 0 ? _a : '',
|
|
15
16
|
value: (_b = textChild === null || textChild === void 0 ? void 0 : textChild.value) !== null && _b !== void 0 ? _b : '',
|
|
@@ -19,7 +20,6 @@ export const AIGridField = ({ children, onAISend, onRemove, onUpload, }) => {
|
|
|
19
20
|
: undefined,
|
|
20
21
|
};
|
|
21
22
|
const imageField = children === null || children === void 0 ? void 0 : children.find(({ type }) => type === 'ai-image');
|
|
22
|
-
console.log('image field', imageField);
|
|
23
23
|
const imageProps = {
|
|
24
24
|
id: (_d = imageField === null || imageField === void 0 ? void 0 : imageField.id) !== null && _d !== void 0 ? _d : '',
|
|
25
25
|
value: (_e = imageField === null || imageField === void 0 ? void 0 : imageField.value) !== null && _e !== void 0 ? _e : '',
|
|
@@ -6,8 +6,13 @@ export const useDynamicForm = ({ fields, onUpload }) => {
|
|
|
6
6
|
const visibleFields = stateFields.filter((field) => field.visible || field.visible === undefined);
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
console.log('fields', fields);
|
|
9
|
+
}, [fields]);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
console.log('state fields', stateFields);
|
|
12
|
+
}, [stateFields]);
|
|
13
|
+
useEffect(() => {
|
|
9
14
|
console.log('visible', visibleFields);
|
|
10
|
-
}, [visibleFields
|
|
15
|
+
}, [visibleFields]);
|
|
11
16
|
const hiddenFields = stateFields.filter((field) => field.visible === false);
|
|
12
17
|
const form = useForm();
|
|
13
18
|
const { watch, setValue } = form;
|
package/package.json
CHANGED
|
@@ -19,6 +19,8 @@ export const AIGridField = ({
|
|
|
19
19
|
({ type }) => type === 'text' || type === 'string'
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
+
console.log('text', textChild)
|
|
23
|
+
|
|
22
24
|
const textProps = {
|
|
23
25
|
id: textChild?.id ?? '',
|
|
24
26
|
value: textChild?.value ?? '',
|
|
@@ -29,7 +31,6 @@ export const AIGridField = ({
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
const imageField = children?.find(({ type }) => type === 'ai-image')
|
|
32
|
-
console.log('image field', imageField)
|
|
33
34
|
const imageProps = {
|
|
34
35
|
id: imageField?.id ?? '',
|
|
35
36
|
value: imageField?.value ?? '',
|
|
@@ -20,8 +20,13 @@ export const useDynamicForm = ({ fields, onUpload }: UseDynamicFormI) => {
|
|
|
20
20
|
)
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
console.log('fields', fields)
|
|
23
|
+
}, [fields])
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
console.log('state fields', stateFields)
|
|
26
|
+
}, [stateFields])
|
|
27
|
+
useEffect(() => {
|
|
23
28
|
console.log('visible', visibleFields)
|
|
24
|
-
}, [visibleFields
|
|
29
|
+
}, [visibleFields])
|
|
25
30
|
const hiddenFields = stateFields.filter((field) => field.visible === false)
|
|
26
31
|
|
|
27
32
|
const form = useForm()
|