2024-09-04 05:38:24 +05:30
|
|
|
import React, { useState, useCallback } from 'react';
|
2024-08-06 02:33:39 +05:30
|
|
|
import { Button, Paper, Box, TextField } from "@mui/material";
|
2024-08-06 06:04:22 +05:30
|
|
|
import EditIcon from '@mui/icons-material/Edit';
|
|
|
|
|
import TextFieldsIcon from '@mui/icons-material/TextFields';
|
2024-08-06 06:13:13 +05:30
|
|
|
import DocumentScannerIcon from '@mui/icons-material/DocumentScanner';
|
2024-06-24 22:42:22 +05:30
|
|
|
import { SimpleBox } from "../atoms/Box";
|
|
|
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
|
import { useGlobalInfoStore } from "../../context/globalInfo";
|
2024-07-24 20:25:22 +05:30
|
|
|
import { useActionContext } from '../../context/browserActions';
|
2024-09-04 05:38:48 +05:30
|
|
|
import { useBrowserSteps } from '../../context/browserSteps';
|
2024-07-31 04:47:00 +05:30
|
|
|
import { useSocketStore } from '../../context/socket';
|
2024-08-05 23:17:11 +05:30
|
|
|
import { ScreenshotSettings } from '../../shared/types';
|
2024-08-06 06:04:22 +05:30
|
|
|
import InputAdornment from '@mui/material/InputAdornment';
|
|
|
|
|
|
2024-08-11 08:46:48 +05:30
|
|
|
// TODO:
|
|
|
|
|
// 1. Handle field label update
|
|
|
|
|
// 2. Handle field deletion | confirmation
|
|
|
|
|
// 3. Add description for each browser step
|
|
|
|
|
// 4. Handle non custom action steps
|
2024-06-24 22:42:22 +05:30
|
|
|
|
2024-08-06 02:31:36 +05:30
|
|
|
export const RightSidePanel = () => {
|
2024-08-06 02:26:22 +05:30
|
|
|
const [textLabels, setTextLabels] = useState<{ [id: number]: string }>({});
|
2024-07-26 23:24:41 +05:30
|
|
|
const [errors, setErrors] = useState<{ [id: number]: string }>({});
|
2024-08-06 02:30:07 +05:30
|
|
|
const [confirmedTextSteps, setConfirmedTextSteps] = useState<{ [id: number]: boolean }>({});
|
2024-08-30 23:57:01 +05:30
|
|
|
const [showPaginationOptions, setShowPaginationOptions] = useState(false);
|
2024-08-30 23:57:57 +05:30
|
|
|
const [selectedPaginationSetting, setSelectedPaginationSetting] = useState<string | null>(null);
|
2024-09-01 22:42:34 +05:30
|
|
|
|
2024-08-06 05:16:12 +05:30
|
|
|
const { lastAction, notify } = useGlobalInfoStore();
|
2024-09-05 22:44:25 +05:30
|
|
|
const { getText, startGetText, stopGetText, getScreenshot, startGetScreenshot, stopGetScreenshot, paginationMode, getList, startGetList, stopGetList, startPaginationMode } = useActionContext();
|
2024-08-06 03:16:09 +05:30
|
|
|
const { browserSteps, updateBrowserTextStepLabel, deleteBrowserStep, addScreenshotStep } = useBrowserSteps();
|
2024-07-31 04:47:00 +05:30
|
|
|
const { socket } = useSocketStore();
|
2024-06-24 22:42:22 +05:30
|
|
|
|
2024-08-06 02:30:07 +05:30
|
|
|
const handleTextLabelChange = (id: number, label: string) => {
|
2024-08-06 02:26:22 +05:30
|
|
|
setTextLabels(prevLabels => ({ ...prevLabels, [id]: label }));
|
2024-08-06 05:05:50 +05:30
|
|
|
if (!label.trim()) {
|
|
|
|
|
setErrors(prevErrors => ({ ...prevErrors, [id]: 'Label cannot be empty' }));
|
|
|
|
|
} else {
|
|
|
|
|
setErrors(prevErrors => ({ ...prevErrors, [id]: '' }));
|
|
|
|
|
}
|
2024-07-26 23:25:03 +05:30
|
|
|
};
|
2024-07-26 23:07:54 +05:30
|
|
|
|
2024-08-06 02:30:07 +05:30
|
|
|
const handleTextStepConfirm = (id: number) => {
|
2024-08-06 02:26:22 +05:30
|
|
|
const label = textLabels[id]?.trim();
|
2024-07-26 23:24:41 +05:30
|
|
|
if (label) {
|
2024-08-06 03:12:07 +05:30
|
|
|
updateBrowserTextStepLabel(id, label);
|
2024-08-06 02:30:07 +05:30
|
|
|
setConfirmedTextSteps(prev => ({ ...prev, [id]: true }));
|
2024-07-26 23:24:41 +05:30
|
|
|
} else {
|
2024-07-26 23:25:03 +05:30
|
|
|
setErrors(prevErrors => ({ ...prevErrors, [id]: 'Label cannot be empty' }));
|
2024-07-26 23:07:54 +05:30
|
|
|
}
|
2024-07-26 23:25:03 +05:30
|
|
|
};
|
2024-07-26 23:07:54 +05:30
|
|
|
|
2024-08-06 02:30:07 +05:30
|
|
|
const handleTextStepDiscard = (id: number) => {
|
2024-07-26 23:07:54 +05:30
|
|
|
deleteBrowserStep(id);
|
2024-08-06 02:26:22 +05:30
|
|
|
setTextLabels(prevLabels => {
|
2024-07-26 23:25:03 +05:30
|
|
|
const { [id]: _, ...rest } = prevLabels;
|
|
|
|
|
return rest;
|
2024-07-26 23:24:41 +05:30
|
|
|
});
|
|
|
|
|
setErrors(prevErrors => {
|
2024-07-26 23:25:03 +05:30
|
|
|
const { [id]: _, ...rest } = prevErrors;
|
|
|
|
|
return rest;
|
2024-07-26 23:24:41 +05:30
|
|
|
});
|
2024-07-26 23:25:03 +05:30
|
|
|
};
|
2024-07-26 23:07:54 +05:30
|
|
|
|
2024-08-06 02:30:07 +05:30
|
|
|
const getTextSettingsObject = useCallback(() => {
|
2024-08-06 05:05:50 +05:30
|
|
|
const settings: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};
|
2024-07-31 04:47:00 +05:30
|
|
|
browserSteps.forEach(step => {
|
2024-08-06 03:25:52 +05:30
|
|
|
if (step.type === 'text' && step.label && step.selectorObj?.selector) {
|
|
|
|
|
settings[step.label] = step.selectorObj;
|
|
|
|
|
}
|
2024-07-31 04:47:00 +05:30
|
|
|
});
|
|
|
|
|
return settings;
|
2024-08-06 03:25:52 +05:30
|
|
|
}, [browserSteps]);
|
2024-08-06 03:12:07 +05:30
|
|
|
|
2024-08-06 05:05:50 +05:30
|
|
|
|
2024-08-06 03:25:52 +05:30
|
|
|
const stopCaptureAndEmitGetTextSettings = useCallback(() => {
|
2024-08-06 05:12:08 +05:30
|
|
|
const hasUnconfirmedTextSteps = browserSteps.some(step => step.type === 'text' && !confirmedTextSteps[step.id]);
|
|
|
|
|
if (hasUnconfirmedTextSteps) {
|
2024-08-06 05:16:12 +05:30
|
|
|
notify('error', 'Please confirm no labels are empty');
|
2024-08-06 05:12:08 +05:30
|
|
|
return;
|
|
|
|
|
}
|
2024-08-06 03:25:52 +05:30
|
|
|
stopGetText();
|
|
|
|
|
const settings = getTextSettingsObject();
|
|
|
|
|
const hasTextSteps = browserSteps.some(step => step.type === 'text');
|
|
|
|
|
if (hasTextSteps) {
|
2024-08-04 20:57:40 +05:30
|
|
|
socket?.emit('action', { action: 'scrapeSchema', settings });
|
2024-08-06 03:25:52 +05:30
|
|
|
}
|
2024-08-06 05:12:08 +05:30
|
|
|
}, [stopGetText, getTextSettingsObject, socket, browserSteps, confirmedTextSteps]);
|
|
|
|
|
|
2024-08-09 10:32:48 +05:30
|
|
|
|
|
|
|
|
const getListSettingsObject = useCallback(() => {
|
2024-08-31 03:32:43 +05:30
|
|
|
let settings: {
|
|
|
|
|
listSelector?: string;
|
2024-08-31 22:45:51 +05:30
|
|
|
fields?: Record<string, { selector: string; tag?: string;[key: string]: any }>;
|
2024-08-31 03:32:43 +05:30
|
|
|
pagination?: { type: string; selector?: string }
|
2024-08-31 03:31:20 +05:30
|
|
|
} = {};
|
2024-08-10 04:46:09 +05:30
|
|
|
|
|
|
|
|
browserSteps.forEach(step => {
|
2024-08-10 05:06:43 +05:30
|
|
|
if (step.type === 'list' && step.listSelector && Object.keys(step.fields).length > 0) {
|
|
|
|
|
const fields: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};
|
|
|
|
|
Object.entries(step.fields).forEach(([label, field]) => {
|
|
|
|
|
if (field.selectorObj?.selector) {
|
|
|
|
|
fields[label] = {
|
|
|
|
|
selector: field.selectorObj.selector,
|
|
|
|
|
tag: field.selectorObj.tag,
|
|
|
|
|
attribute: field.selectorObj.attribute
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2024-08-10 21:00:27 +05:30
|
|
|
settings = {
|
2024-08-10 05:06:43 +05:30
|
|
|
listSelector: step.listSelector,
|
2024-08-31 03:33:34 +05:30
|
|
|
fields: fields,
|
2024-08-31 03:33:19 +05:30
|
|
|
pagination: {
|
2024-09-01 01:05:11 +05:30
|
|
|
type: selectedPaginationSetting || '',
|
2024-08-31 03:33:19 +05:30
|
|
|
}
|
2024-08-10 21:25:17 +05:30
|
|
|
};
|
2024-08-10 21:00:27 +05:30
|
|
|
|
2024-08-10 05:06:43 +05:30
|
|
|
}
|
2024-08-10 04:46:09 +05:30
|
|
|
});
|
2024-08-09 10:32:48 +05:30
|
|
|
|
2024-08-10 04:46:09 +05:30
|
|
|
return settings;
|
2024-09-03 22:25:54 +05:30
|
|
|
}, [browserSteps, selectedPaginationSetting]);
|
2024-08-10 04:46:09 +05:30
|
|
|
|
2024-09-04 05:32:39 +05:30
|
|
|
const resetListState = useCallback(() => {
|
2024-09-04 05:34:56 +05:30
|
|
|
setShowPaginationOptions(false);
|
|
|
|
|
setSelectedPaginationSetting(null);
|
2024-09-04 05:35:16 +05:30
|
|
|
}, []);
|
2024-09-04 05:32:39 +05:30
|
|
|
|
2024-09-04 05:35:16 +05:30
|
|
|
const handleStopGetList = useCallback(() => {
|
2024-09-04 05:34:56 +05:30
|
|
|
stopGetList();
|
|
|
|
|
resetListState();
|
2024-09-04 05:35:16 +05:30
|
|
|
}, [stopGetList, resetListState]);
|
2024-09-04 05:32:39 +05:30
|
|
|
|
2024-08-10 05:04:50 +05:30
|
|
|
const stopCaptureAndEmitGetListSettings = useCallback(() => {
|
2024-08-10 05:06:43 +05:30
|
|
|
stopGetList();
|
|
|
|
|
const settings = getListSettingsObject();
|
|
|
|
|
if (settings) {
|
|
|
|
|
socket?.emit('action', { action: 'scrapeList', settings });
|
2024-08-10 05:04:50 +05:30
|
|
|
} else {
|
2024-08-10 05:06:43 +05:30
|
|
|
notify('error', 'Unable to create list settings. Make sure you have defined a field for the list.');
|
|
|
|
|
}
|
2024-09-04 05:34:56 +05:30
|
|
|
handleStopGetList();
|
|
|
|
|
}, [stopGetList, getListSettingsObject, socket, notify, handleStopGetList]);
|
2024-08-09 10:32:48 +05:30
|
|
|
|
2024-08-30 23:59:41 +05:30
|
|
|
const handleConfirmListCapture = useCallback(() => {
|
2024-09-05 22:44:25 +05:30
|
|
|
if (!paginationMode) {
|
|
|
|
|
startPaginationMode();
|
|
|
|
|
}
|
2024-08-31 00:01:23 +05:30
|
|
|
if (!selectedPaginationSetting) {
|
2024-08-31 00:57:45 +05:30
|
|
|
setShowPaginationOptions(true);
|
2024-08-30 23:59:41 +05:30
|
|
|
return;
|
|
|
|
|
}
|
2024-09-03 22:25:54 +05:30
|
|
|
if (['clickNext', 'clickLoadMore'].includes(selectedPaginationSetting)) {
|
2024-09-01 01:13:29 +05:30
|
|
|
notify('error', 'Please select the pagination element first.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-08-30 23:59:41 +05:30
|
|
|
stopCaptureAndEmitGetListSettings();
|
2024-08-31 22:44:46 +05:30
|
|
|
setShowPaginationOptions(false);
|
2024-08-31 22:45:51 +05:30
|
|
|
setSelectedPaginationSetting(null);
|
2024-09-03 22:25:54 +05:30
|
|
|
}, [selectedPaginationSetting, stopCaptureAndEmitGetListSettings, notify]);
|
2024-08-30 23:59:41 +05:30
|
|
|
|
2024-08-31 00:59:46 +05:30
|
|
|
const handlePaginationSettingSelect = (option: string) => {
|
|
|
|
|
setSelectedPaginationSetting(option);
|
2024-09-01 01:10:09 +05:30
|
|
|
if (['clickNext', 'clickLoadMore'].includes(option)) {
|
2024-09-03 22:26:40 +05:30
|
|
|
}
|
2024-08-31 00:59:46 +05:30
|
|
|
};
|
|
|
|
|
|
2024-08-05 23:17:11 +05:30
|
|
|
const captureScreenshot = (fullPage: boolean) => {
|
|
|
|
|
const screenshotSettings: ScreenshotSettings = {
|
|
|
|
|
fullPage,
|
2024-08-05 23:24:11 +05:30
|
|
|
type: 'png',
|
|
|
|
|
timeout: 30000,
|
|
|
|
|
animations: 'allow',
|
|
|
|
|
caret: 'hide',
|
|
|
|
|
scale: 'device',
|
2024-08-05 23:17:11 +05:30
|
|
|
};
|
2024-08-05 23:24:11 +05:30
|
|
|
socket?.emit('action', { action: 'screenshot', settings: screenshotSettings });
|
2024-08-06 03:16:09 +05:30
|
|
|
addScreenshotStep(fullPage);
|
2024-08-06 05:32:05 +05:30
|
|
|
stopGetScreenshot();
|
2024-08-05 23:02:01 +05:30
|
|
|
};
|
|
|
|
|
|
2024-06-24 22:42:22 +05:30
|
|
|
return (
|
2024-07-31 04:47:00 +05:30
|
|
|
<Paper variant="outlined" sx={{ height: '100%', width: '100%', backgroundColor: 'white', alignItems: "center" }}>
|
2024-06-24 22:42:22 +05:30
|
|
|
<SimpleBox height={60} width='100%' background='lightGray' radius='0%'>
|
2024-07-31 04:47:00 +05:30
|
|
|
<Typography sx={{ padding: '10px' }}>Last action: {` ${lastAction}`}</Typography>
|
2024-06-24 22:42:22 +05:30
|
|
|
</SimpleBox>
|
|
|
|
|
|
2024-07-25 01:56:45 +05:30
|
|
|
<Box display="flex" flexDirection="column" gap={2} style={{ margin: '15px' }}>
|
2024-08-09 19:19:44 +05:30
|
|
|
{!getText && !getScreenshot && !getList && <Button variant="contained" onClick={startGetList}>Capture List</Button>}
|
|
|
|
|
{getList &&
|
2024-08-08 02:19:38 +05:30
|
|
|
<>
|
|
|
|
|
<Box display="flex" justifyContent="space-between" gap={2} style={{ margin: '15px' }}>
|
2024-08-31 01:05:19 +05:30
|
|
|
<Button variant="outlined" onClick={handleConfirmListCapture}>Confirm</Button>
|
2024-09-04 05:37:10 +05:30
|
|
|
<Button variant="outlined" color="error" onClick={handleStopGetList}>Discard</Button>
|
2024-08-08 02:19:38 +05:30
|
|
|
</Box>
|
|
|
|
|
</>
|
|
|
|
|
}
|
2024-08-08 02:18:39 +05:30
|
|
|
|
2024-08-31 01:19:34 +05:30
|
|
|
{showPaginationOptions && (
|
2024-08-31 01:19:24 +05:30
|
|
|
<Box display="flex" flexDirection="column" gap={2} style={{ margin: '15px' }}>
|
2024-08-31 01:28:13 +05:30
|
|
|
<Typography>How can we find the next list item on the page?</Typography>
|
2024-08-31 02:04:32 +05:30
|
|
|
<Button variant={selectedPaginationSetting === 'clickNext' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('clickNext')}>Click on next to navigate to the next page</Button>
|
2024-08-31 02:05:29 +05:30
|
|
|
<Button variant={selectedPaginationSetting === 'clickLoadMore' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('clickLoadMore')}>Click on load more to load more items</Button>
|
2024-08-31 02:05:53 +05:30
|
|
|
<Button variant={selectedPaginationSetting === 'scrollDown' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('scrollDown')}>Scroll down to load more items</Button>
|
2024-08-31 02:06:14 +05:30
|
|
|
<Button variant={selectedPaginationSetting === 'scrollUp' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('scrollUp')}>Scroll up to load more items</Button>
|
2024-08-31 02:06:43 +05:30
|
|
|
<Button variant={selectedPaginationSetting === 'none' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('none')}>No more items to load</Button>
|
2024-08-31 01:19:24 +05:30
|
|
|
</Box>
|
|
|
|
|
)}
|
2024-09-03 22:26:40 +05:30
|
|
|
|
2024-08-08 02:14:39 +05:30
|
|
|
{!getText && !getScreenshot && !getList && <Button variant="contained" onClick={startGetText}>Capture Text</Button>}
|
2024-08-06 06:04:22 +05:30
|
|
|
{getText &&
|
|
|
|
|
<>
|
|
|
|
|
<Box display="flex" justifyContent="space-between" gap={2} style={{ margin: '15px' }}>
|
2024-09-03 22:25:54 +05:30
|
|
|
<Button variant="outlined" onClick={stopCaptureAndEmitGetTextSettings} >Confirm</Button>
|
|
|
|
|
<Button variant="outlined" color="error" onClick={stopGetText} >Discard</Button>
|
2024-08-06 06:04:22 +05:30
|
|
|
</Box>
|
|
|
|
|
</>
|
2024-08-06 05:22:47 +05:30
|
|
|
}
|
|
|
|
|
|
2024-08-08 02:14:39 +05:30
|
|
|
{!getText && !getScreenshot && !getList && <Button variant="contained" onClick={startGetScreenshot}>Capture Screenshot</Button>}
|
2024-08-05 23:02:01 +05:30
|
|
|
{getScreenshot && (
|
|
|
|
|
<Box display="flex" flexDirection="column" gap={2}>
|
2024-08-05 23:24:11 +05:30
|
|
|
<Button variant="contained" onClick={() => captureScreenshot(true)}>Capture Fullpage</Button>
|
|
|
|
|
<Button variant="contained" onClick={() => captureScreenshot(false)}>Capture Visible Part</Button>
|
2024-08-06 05:05:50 +05:30
|
|
|
<Button variant="outlined" color="error" onClick={stopGetScreenshot}>Discard</Button>
|
2024-08-05 23:02:01 +05:30
|
|
|
</Box>
|
|
|
|
|
)}
|
2024-07-25 01:56:31 +05:30
|
|
|
</Box>
|
2024-08-06 02:23:33 +05:30
|
|
|
|
2024-08-06 05:06:04 +05:30
|
|
|
<Box>
|
|
|
|
|
{browserSteps.map(step => (
|
|
|
|
|
<Box key={step.id} sx={{ boxShadow: 5, padding: '10px', margin: '10px', borderRadius: '4px' }}>
|
|
|
|
|
{
|
2024-08-10 07:07:49 +05:30
|
|
|
step.type === 'text' && (
|
2024-08-06 05:06:04 +05:30
|
|
|
<>
|
|
|
|
|
<TextField
|
|
|
|
|
label="Label"
|
|
|
|
|
value={textLabels[step.id] || step.label || ''}
|
|
|
|
|
onChange={(e) => handleTextLabelChange(step.id, e.target.value)}
|
|
|
|
|
fullWidth
|
|
|
|
|
margin="normal"
|
|
|
|
|
error={!!errors[step.id]}
|
|
|
|
|
helperText={errors[step.id]}
|
2024-08-06 06:13:24 +05:30
|
|
|
InputProps={{
|
2024-08-06 06:04:22 +05:30
|
|
|
readOnly: confirmedTextSteps[step.id],
|
|
|
|
|
startAdornment: (
|
|
|
|
|
<InputAdornment position="start">
|
|
|
|
|
<EditIcon />
|
|
|
|
|
</InputAdornment>
|
|
|
|
|
)
|
|
|
|
|
}}
|
2024-08-06 05:06:04 +05:30
|
|
|
/>
|
|
|
|
|
<TextField
|
|
|
|
|
label="Data"
|
|
|
|
|
value={step.data}
|
|
|
|
|
fullWidth
|
|
|
|
|
margin="normal"
|
2024-08-06 06:13:24 +05:30
|
|
|
InputProps={{
|
2024-08-06 06:04:22 +05:30
|
|
|
readOnly: confirmedTextSteps[step.id],
|
|
|
|
|
startAdornment: (
|
|
|
|
|
<InputAdornment position="start">
|
|
|
|
|
<TextFieldsIcon />
|
|
|
|
|
</InputAdornment>
|
|
|
|
|
)
|
|
|
|
|
}}
|
2024-08-06 05:06:04 +05:30
|
|
|
/>
|
|
|
|
|
{!confirmedTextSteps[step.id] && (
|
|
|
|
|
<Box display="flex" justifyContent="space-between" gap={2}>
|
|
|
|
|
<Button variant="contained" onClick={() => handleTextStepConfirm(step.id)} disabled={!textLabels[step.id]?.trim()}>Confirm</Button>
|
|
|
|
|
<Button variant="contained" onClick={() => handleTextStepDiscard(step.id)}>Discard</Button>
|
|
|
|
|
</Box>
|
|
|
|
|
)}
|
|
|
|
|
</>
|
2024-08-10 07:07:49 +05:30
|
|
|
)}
|
2024-08-10 07:42:41 +05:30
|
|
|
{step.type === 'screenshot' && (
|
2024-08-10 07:07:49 +05:30
|
|
|
<Box display="flex" alignItems="center">
|
|
|
|
|
<DocumentScannerIcon sx={{ mr: 1 }} />
|
|
|
|
|
<Typography>
|
|
|
|
|
{`Take ${step.fullPage ? 'Fullpage' : 'Visible Part'} Screenshot`}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
2024-08-10 07:42:41 +05:30
|
|
|
)}
|
|
|
|
|
{step.type === 'list' && (
|
2024-08-10 07:07:49 +05:30
|
|
|
<>
|
|
|
|
|
<Typography>List Selected Successfully</Typography>
|
|
|
|
|
{Object.entries(step.fields).map(([key, field]) => (
|
|
|
|
|
<Box key={key}>
|
|
|
|
|
<TextField
|
|
|
|
|
label="Field Label"
|
|
|
|
|
value={field.label || ''}
|
2024-08-10 07:42:41 +05:30
|
|
|
onChange={() => { }}
|
2024-08-10 07:07:49 +05:30
|
|
|
fullWidth
|
|
|
|
|
margin="normal"
|
|
|
|
|
InputProps={{
|
|
|
|
|
startAdornment: (
|
|
|
|
|
<InputAdornment position="start">
|
|
|
|
|
<EditIcon />
|
|
|
|
|
</InputAdornment>
|
|
|
|
|
)
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<TextField
|
|
|
|
|
label="Field Data"
|
|
|
|
|
value={field.data || ''}
|
|
|
|
|
fullWidth
|
|
|
|
|
margin="normal"
|
|
|
|
|
InputProps={{
|
|
|
|
|
readOnly: true,
|
|
|
|
|
startAdornment: (
|
|
|
|
|
<InputAdornment position="start">
|
|
|
|
|
<TextFieldsIcon />
|
|
|
|
|
</InputAdornment>
|
|
|
|
|
)
|
|
|
|
|
}}
|
|
|
|
|
/>
|
2024-08-06 06:13:24 +05:30
|
|
|
</Box>
|
2024-08-10 07:07:49 +05:30
|
|
|
))}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2024-07-26 23:25:03 +05:30
|
|
|
</Box>
|
2024-08-06 05:06:04 +05:30
|
|
|
))}
|
|
|
|
|
</Box>
|
2024-06-24 22:42:22 +05:30
|
|
|
</Paper>
|
|
|
|
|
);
|
2024-08-10 07:07:49 +05:30
|
|
|
};
|