2
0

feat(results): Brand new Results table

- Resizable columns
- Hide / Show columns
- Reorganize columns
- Expand result
This commit is contained in:
Baptiste Arnaud
2022-07-01 17:08:35 +02:00
parent cf6e8a21be
commit d84f99074d
34 changed files with 1427 additions and 738 deletions

View File

@ -15,6 +15,7 @@ export type ResultValues = Pick<
>
export type ResultHeaderCell = {
id: string
label: string
blockId?: string
blockType?: InputBlockType

View File

@ -31,6 +31,12 @@ const edgeSchema = z.object({
to: targetSchema,
})
const resultsTablePreferencesSchema = z.object({
columnsOrder: z.array(z.string()),
columnsVisibility: z.record(z.string(), z.boolean()),
columnsWidth: z.record(z.string(), z.number()),
})
const typebotSchema = z.object({
version: z.enum(['2']).optional(),
id: z.string(),
@ -48,6 +54,7 @@ const typebotSchema = z.object({
publicId: z.string().nullable(),
customDomain: z.string().nullable(),
workspaceId: z.string(),
resultsTablePreferences: resultsTablePreferencesSchema.optional(),
})
export type Typebot = z.infer<typeof typebotSchema>
@ -55,3 +62,6 @@ export type Target = z.infer<typeof targetSchema>
export type Source = z.infer<typeof sourceSchema>
export type Edge = z.infer<typeof edgeSchema>
export type Group = z.infer<typeof groupSchema>
export type ResultsTablePreferences = z.infer<
typeof resultsTablePreferencesSchema
>