|
|
|
@ -85,7 +85,7 @@ export default class CSVTemplateAdapter {
|
|
|
|
|
detectInitialUidt(v: string) { |
|
|
|
|
if (!isNaN(Number(v)) && !isNaN(parseFloat(v))) return UITypes.Number |
|
|
|
|
if (validateDateWithUnknownFormat(v)) return UITypes.DateTime |
|
|
|
|
if (['true', 'True', 'false', 'False', '1', '0', 'T', 'F', 'Y', 'N'].includes(v)) return UITypes.Checkbox |
|
|
|
|
if (isCheckboxType(v)) return UITypes.Checkbox |
|
|
|
|
return UITypes.SingleLineText |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -105,8 +105,7 @@ export default class CSVTemplateAdapter {
|
|
|
|
|
if (isUrlType(colData)) { |
|
|
|
|
colProps.uidt = UITypes.URL |
|
|
|
|
} else { |
|
|
|
|
const checkboxType = isCheckboxType(colData) |
|
|
|
|
if (checkboxType.length === 1) { |
|
|
|
|
if (isCheckboxType(colData)) { |
|
|
|
|
colProps.uidt = UITypes.Checkbox |
|
|
|
|
} else { |
|
|
|
|
if (data[columnIdx] && columnIdx < this.config.maxRowsToParse) { |
|
|
|
|