import type { Ref } from 'vue'; import { z } from 'zod'; import { KottiPopover } from '../../kotti-popover/types'; import type { KottiTable } from '../table/types'; export type FilterInfo = Pick; export declare namespace KottiStandardTable { enum FilterType { BOOLEAN = "BOOLEAN", DATE_RANGE = "DATE_RANGE", MULTI_SELECT = "MULTI_SELECT", NUMBER_RANGE = "NUMBER_RANGE", SINGLE_SELECT = "SINGLE_SELECT" } namespace FilterOperation { enum Boolean { EQUAL = "EQUAL" } enum DateRange { IN_RANGE = "IN_RANGE" } enum MultiEnum { ONE_OF = "ONE_OF" } enum NumberRange { IN_RANGE = "IN_RANGE" } enum SingleEnum { EQUAL = "EQUAL" } const schema: z.ZodUnion<[z.ZodNativeEnum, z.ZodNativeEnum, z.ZodNativeEnum, z.ZodNativeEnum, z.ZodNativeEnum]>; } const filterSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ dataTest: z.ZodOptional; label: z.ZodString; id: z.ZodString; displayInline: z.ZodDefault; defaultValue: z.ZodOptional>; operations: z.ZodDefault, "atleastone">>; slotLabels: z.ZodOptional>; type: z.ZodLiteral; }, "strip", z.ZodTypeAny, { type: FilterType.BOOLEAN; label: string; id: string; displayInline: boolean; operations: [FilterOperation.Boolean.EQUAL, ...FilterOperation.Boolean.EQUAL[]]; dataTest?: string | undefined; defaultValue?: boolean | null | undefined; slotLabels?: [string, string] | undefined; }, { type: FilterType.BOOLEAN; label: string; id: string; dataTest?: string | undefined; displayInline?: boolean | undefined; defaultValue?: boolean | null | undefined; operations?: [FilterOperation.Boolean.EQUAL, ...FilterOperation.Boolean.EQUAL[]] | undefined; slotLabels?: [string, string] | undefined; }>, z.ZodObject<{ dataTest: z.ZodOptional; label: z.ZodString; id: z.ZodString; displayInline: z.ZodDefault; defaultValue: z.ZodOptional, z.ZodNullable], null>>; operations: z.ZodDefault, "atleastone">>; type: z.ZodLiteral; }, "strip", z.ZodTypeAny, { type: FilterType.DATE_RANGE; label: string; id: string; displayInline: boolean; operations: [FilterOperation.DateRange.IN_RANGE, ...FilterOperation.DateRange.IN_RANGE[]]; dataTest?: string | undefined; defaultValue?: [string | null, string | null] | undefined; }, { type: FilterType.DATE_RANGE; label: string; id: string; dataTest?: string | undefined; displayInline?: boolean | undefined; defaultValue?: [string | null, string | null] | undefined; operations?: [FilterOperation.DateRange.IN_RANGE, ...FilterOperation.DateRange.IN_RANGE[]] | undefined; }>, z.ZodObject<{ dataTest: z.ZodOptional; options: z.ZodArray; groupId: z.ZodOptional>; isDisabled: z.ZodOptional; label: z.ZodString; value: z.ZodNullable>; }, "strip", z.ZodTypeAny, { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }, { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }>, "many">; label: z.ZodString; id: z.ZodString; isUnsorted: z.ZodDefault; displayInline: z.ZodDefault; defaultValue: z.ZodOptional>, "many">>; operations: z.ZodDefault, "atleastone">>; type: z.ZodLiteral; }, "strip", z.ZodTypeAny, { options: { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }[]; type: FilterType.MULTI_SELECT; label: string; id: string; isUnsorted: boolean; displayInline: boolean; operations: [FilterOperation.MultiEnum.ONE_OF, ...FilterOperation.MultiEnum.ONE_OF[]]; dataTest?: string | undefined; defaultValue?: (string | number | boolean | null)[] | undefined; }, { options: { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }[]; type: FilterType.MULTI_SELECT; label: string; id: string; dataTest?: string | undefined; isUnsorted?: boolean | undefined; displayInline?: boolean | undefined; defaultValue?: (string | number | boolean | null)[] | undefined; operations?: [FilterOperation.MultiEnum.ONE_OF, ...FilterOperation.MultiEnum.ONE_OF[]] | undefined; }>, z.ZodObject<{ dataTest: z.ZodOptional; label: z.ZodString; id: z.ZodString; decimalPlaces: z.ZodDefault; displayInline: z.ZodDefault; defaultValue: z.ZodOptional, z.ZodNullable], null>>; operations: z.ZodDefault, "atleastone">>; type: z.ZodLiteral; unit: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: FilterType.NUMBER_RANGE; label: string; id: string; decimalPlaces: number; displayInline: boolean; operations: [FilterOperation.NumberRange.IN_RANGE, ...FilterOperation.NumberRange.IN_RANGE[]]; unit: string | null; dataTest?: string | undefined; defaultValue?: [number | null, number | null] | undefined; }, { type: FilterType.NUMBER_RANGE; label: string; id: string; dataTest?: string | undefined; decimalPlaces?: number | undefined; displayInline?: boolean | undefined; defaultValue?: [number | null, number | null] | undefined; operations?: [FilterOperation.NumberRange.IN_RANGE, ...FilterOperation.NumberRange.IN_RANGE[]] | undefined; unit?: string | null | undefined; }>, z.ZodObject<{ dataTest: z.ZodOptional; options: z.ZodArray; groupId: z.ZodOptional>; isDisabled: z.ZodOptional; label: z.ZodString; value: z.ZodNullable>; }, "strip", z.ZodTypeAny, { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }, { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }>, "many">; label: z.ZodString; id: z.ZodString; isUnsorted: z.ZodDefault; displayInline: z.ZodDefault; defaultValue: z.ZodOptional>>; operations: z.ZodDefault, "atleastone">>; type: z.ZodLiteral; }, "strip", z.ZodTypeAny, { options: { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }[]; type: FilterType.SINGLE_SELECT; label: string; id: string; isUnsorted: boolean; displayInline: boolean; operations: [FilterOperation.SingleEnum.EQUAL, ...FilterOperation.SingleEnum.EQUAL[]]; dataTest?: string | undefined; defaultValue?: string | number | boolean | null | undefined; }, { options: { value: string | number | boolean | null; label: string; dataTest?: string | undefined; groupId?: string | number | undefined; isDisabled?: boolean | undefined; }[]; type: FilterType.SINGLE_SELECT; label: string; id: string; dataTest?: string | undefined; isUnsorted?: boolean | undefined; displayInline?: boolean | undefined; defaultValue?: string | number | boolean | null | undefined; operations?: [FilterOperation.SingleEnum.EQUAL, ...FilterOperation.SingleEnum.EQUAL[]] | undefined; }>]>; type Filter = z.input; type FilterInternal = z.output; const filterValueSchema: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodNullable, z.ZodNullable], null>, z.ZodArray>, "many">, z.ZodTuple<[z.ZodNullable, z.ZodNullable], null>, z.ZodNullable>]>; type FilterValue = z.output; const appliedBooleanSchema: z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodNullable; }, "strip", z.ZodTypeAny, { value: boolean | null; id: string; operation: FilterOperation.Boolean; }, { value: boolean | null; id: string; operation: FilterOperation.Boolean; }>; const appliedDateRangeSchema: z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodTuple<[z.ZodNullable, z.ZodNullable], null>; }, "strip", z.ZodTypeAny, { value: [string | null, string | null]; id: string; operation: FilterOperation.DateRange; }, { value: [string | null, string | null]; id: string; operation: FilterOperation.DateRange; }>; const appliedMultiEnumSchema: z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodArray>, "many">; }, "strip", z.ZodTypeAny, { value: (string | number | boolean | null)[]; id: string; operation: FilterOperation.MultiEnum; }, { value: (string | number | boolean | null)[]; id: string; operation: FilterOperation.MultiEnum; }>; const appliedNumberRangeSchema: z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodTuple<[z.ZodNullable, z.ZodNullable], null>; }, "strip", z.ZodTypeAny, { value: [number | null, number | null]; id: string; operation: FilterOperation.NumberRange; }, { value: [number | null, number | null]; id: string; operation: FilterOperation.NumberRange; }>; const appliedSingleEnumSchema: z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodNullable>; }, "strip", z.ZodTypeAny, { value: string | number | boolean | null; id: string; operation: FilterOperation.SingleEnum; }, { value: string | number | boolean | null; id: string; operation: FilterOperation.SingleEnum; }>; const appliedFilterSchema: z.ZodUnion<[z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodNullable; }, "strip", z.ZodTypeAny, { value: boolean | null; id: string; operation: FilterOperation.Boolean; }, { value: boolean | null; id: string; operation: FilterOperation.Boolean; }>, z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodTuple<[z.ZodNullable, z.ZodNullable], null>; }, "strip", z.ZodTypeAny, { value: [string | null, string | null]; id: string; operation: FilterOperation.DateRange; }, { value: [string | null, string | null]; id: string; operation: FilterOperation.DateRange; }>, z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodArray>, "many">; }, "strip", z.ZodTypeAny, { value: (string | number | boolean | null)[]; id: string; operation: FilterOperation.MultiEnum; }, { value: (string | number | boolean | null)[]; id: string; operation: FilterOperation.MultiEnum; }>, z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodTuple<[z.ZodNullable, z.ZodNullable], null>; }, "strip", z.ZodTypeAny, { value: [number | null, number | null]; id: string; operation: FilterOperation.NumberRange; }, { value: [number | null, number | null]; id: string; operation: FilterOperation.NumberRange; }>, z.ZodObject<{ id: z.ZodString; operation: z.ZodNativeEnum; value: z.ZodNullable>; }, "strip", z.ZodTypeAny, { value: string | number | boolean | null; id: string; operation: FilterOperation.SingleEnum; }, { value: string | number | boolean | null; id: string; operation: FilterOperation.SingleEnum; }>]>; type AppliedFilter = z.output; const optionsSchema: z.ZodObject<{ hideControls: z.ZodOptional; filters: z.ZodDefault; search: z.ZodDefault; }, "strip", z.ZodTypeAny, { search: boolean; columns: boolean; filters: boolean; }, { columns?: boolean | undefined; filters?: boolean | undefined; search?: boolean | undefined; }>>; popoversSize: z.ZodOptional, z.ZodNativeEnum]>>; filters: z.ZodDefault, z.ZodNativeEnum]>>; }, "strip", z.ZodTypeAny, { columns: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size; filters: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size; }, { columns?: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size | undefined; filters?: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size | undefined; }>>; searchPlaceholder: z.ZodOptional; }, "strip", z.ZodTypeAny, { hideControls?: { search: boolean; columns: boolean; filters: boolean; } | undefined; popoversSize?: { columns: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size; filters: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size; } | undefined; searchPlaceholder?: string | undefined; }, { hideControls?: { columns?: boolean | undefined; filters?: boolean | undefined; search?: boolean | undefined; } | undefined; popoversSize?: { columns?: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size | undefined; filters?: "lg" | "md" | "sm" | "xl" | "auto" | "sameAsTrigger" | KottiPopover.Size | undefined; } | undefined; searchPlaceholder?: string | undefined; }>; type Options = z.input; const paginationSchema: z.ZodDefault; pageSizeOptions: z.ZodDefault, number[], number[]>>; type: z.ZodLiteral<"local">; }, "strip", z.ZodTypeAny, { type: "local"; pageSize: number; pageSizeOptions: number[]; }, { type: "local"; pageSize?: number | undefined; pageSizeOptions?: number[] | undefined; }>, z.ZodObject<{ pageSize: z.ZodDefault; pageSizeOptions: z.ZodDefault, number[], number[]>>; rowCount: z.ZodNullable; type: z.ZodLiteral<"remote">; }, "strip", z.ZodTypeAny, { type: "remote"; pageSize: number; pageSizeOptions: number[]; rowCount: number | null; }, { type: "remote"; rowCount: number | null; pageSize?: number | undefined; pageSizeOptions?: number[] | undefined; }>]>>; type Pagination = z.input; const propsSchema: z.ZodObject<{ emptyText: z.ZodDefault>; tableId: z.ZodString; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { emptyText: string | null; tableId: string; title?: string | undefined; }, { tableId: string; emptyText?: string | null | undefined; title?: string | undefined; }>; type Props = z.input; namespace Events { type UpdateFetchData = { filters: AppliedFilter[]; ordering: { id: string; value: 'ascending' | 'descending'; }[]; pagination: { pageIndex: number; pageSize: number; }; search: string | null; }; } namespace Hook { type Returns = KottiTable.Hook.Returns & { appliedFilters: Ref; pagination: Ref<{ pageIndex: number; pageSize: number; }>; searchValue: Ref; }; } type Translations = { clearAll: string; endDate: string; filters: string; itemsPerPage: string; lastMonth: string; lastWeek: string; lastYear: string; max: string; min: string; moreThan: string; resultsCounter: string; search: string; selectionCount: string; showAll: string; startDate: string; today: string; upTo: string; }; }