|
|
@ -1,8 +1,7 @@ |
|
|
|
import { ColumnReqType, ColumnType, TableType } from './Api'; |
|
|
|
import { ColumnReqType, ColumnType, TableType } from './Api'; |
|
|
|
import { FormulaDataTypes } from './formulaHelpers'; |
|
|
|
import { FormulaDataTypes } from './formulaHelpers'; |
|
|
|
import { LongTextAiMetaProp, RelationTypes } from '~/lib/globals'; |
|
|
|
import { LongTextAiMetaProp, RelationTypes } from '~/lib/globals'; |
|
|
|
import { parseHelper } from './helperFunctions'; |
|
|
|
import { parseHelper, ncParseProp } from './helperFunctions'; |
|
|
|
import { ncParseProp } from './helperFunctions'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum UITypes { |
|
|
|
enum UITypes { |
|
|
|
ID = 'ID', |
|
|
|
ID = 'ID', |
|
|
@ -217,12 +216,11 @@ export function isVirtualCol( |
|
|
|
].includes(<UITypes>(typeof col === 'object' ? col?.uidt : col)); |
|
|
|
].includes(<UITypes>(typeof col === 'object' ? col?.uidt : col)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function isAIPromptCol( |
|
|
|
export function isAIPromptCol(col: ColumnReqType | ColumnType) { |
|
|
|
col: |
|
|
|
return ( |
|
|
|
| ColumnReqType |
|
|
|
col.uidt === UITypes.LongText && |
|
|
|
| ColumnType |
|
|
|
parseHelper((col as any)?.meta)?.[LongTextAiMetaProp] |
|
|
|
) { |
|
|
|
); |
|
|
|
return col.uidt === UITypes.LongText && parseHelper((col as any)?.meta)?.[LongTextAiMetaProp]; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function isCreatedOrLastModifiedTimeCol( |
|
|
|
export function isCreatedOrLastModifiedTimeCol( |
|
|
@ -381,10 +379,12 @@ export const isSupportedDisplayValueColumn = (column: ColumnType) => { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
case UITypes.LongText: { |
|
|
|
case UITypes.LongText: { |
|
|
|
if (ncParseProp(column.meta)?.richMode) { |
|
|
|
if ( |
|
|
|
|
|
|
|
ncParseProp(column.meta)?.richMode || |
|
|
|
|
|
|
|
ncParseProp(column.meta)[LongTextAiMetaProp] |
|
|
|
|
|
|
|
) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
//Todo: prevent AI Prompt field once it get merged in develop
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|