@sustaina/shared-ui 1.7.3 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -26,6 +26,32 @@
26
26
  --color-sus-primary-3-hover: #eff5f1;
27
27
  --color-sus-primary-1-active: #dfeae3;
28
28
  --color-sus-secondary-hover: #907b46;
29
+
30
+ /* animate */
31
+ --animate-sus-spinner: sus-spinner 1s linear infinite;
32
+ @keyframes sus-spinner {
33
+ 0% {
34
+ opacity: 1;
35
+ }
36
+ 10% {
37
+ opacity: 0.7;
38
+ }
39
+ 20% {
40
+ opacity: 0.3;
41
+ }
42
+ 35% {
43
+ opacity: 0.2;
44
+ }
45
+ 50% {
46
+ opacity: 0.1;
47
+ }
48
+ 75% {
49
+ opacity: 0.05;
50
+ }
51
+ 100% {
52
+ opacity: 0;
53
+ }
54
+ }
29
55
  }
30
56
 
31
57
  /* src/components/advanceSearch/styles/index.css */
package/dist/index.d.mts CHANGED
@@ -65,6 +65,18 @@ type ColumnResizerProps = {
65
65
  style?: CSSProperties;
66
66
  };
67
67
 
68
+ type ColumnSeparatorProps = {
69
+ show?: boolean;
70
+ className?: string;
71
+ style?: React__default.CSSProperties;
72
+ };
73
+
74
+ type ContentSlot = {
75
+ content?: React__default.ReactNode;
76
+ icon?: React__default.ReactNode;
77
+ wrapperProps?: React__default.ComponentProps<"div">;
78
+ };
79
+
68
80
  type DataTableColumnFilterProps<TData extends RowData$1> = {
69
81
  column: Column$1<TData>;
70
82
  table: Table$1<TData>;
@@ -152,7 +164,6 @@ type DataTableRowClickHandler<TData extends RowData$1> = (rowData: TData, info:
152
164
  table: Table$1<TData>;
153
165
  clickType: RowClickType;
154
166
  }) => void;
155
- type DataTableRowClickMode = "native" | "timeout";
156
167
  type DataTableRowIdKeyHandler<TData extends RowData$1> = (originalRow: TData, index: number, parent?: Row<TData>) => string;
157
168
  type DataTableHeaderCell<TData extends RowData$1> = {
158
169
  id: string;
@@ -183,6 +194,9 @@ type DatatableColumnResizing = {
183
194
  enabled: boolean;
184
195
  resizeMode?: ColumnResizeMode;
185
196
  };
197
+ type DataTableColumnSeparatorProps = {
198
+ headerCell?: ColumnSeparatorProps;
199
+ };
186
200
  type DataTableComponentProps<TData> = {
187
201
  containerProps?: React.ComponentProps<typeof TableContainer>;
188
202
  tableProps?: React.ComponentProps<typeof Table>;
@@ -206,10 +220,7 @@ type DataTableComponentProps<TData> = {
206
220
  table: Table$1<TData>;
207
221
  }) => React.ComponentProps<typeof TableCell>);
208
222
  columnResizerProps?: Omit<ColumnResizerProps, "header">;
209
- };
210
- type ContentSlot = {
211
- content: React.ReactNode;
212
- wrapperProps?: React.ComponentProps<"div">;
223
+ columnSeparatorProps?: DataTableColumnSeparatorProps;
213
224
  };
214
225
  type DataTableStatusContent = {
215
226
  initialLoading?: ContentSlot;
@@ -265,6 +276,7 @@ declare module "@tanstack/react-table" {
265
276
  cellProps?: React.ComponentProps<"td">;
266
277
  filterCellProps?: React.ComponentProps<"td">;
267
278
  useColumnSizing?: boolean;
279
+ columnSeparatorProps?: ColumnSeparatorProps;
268
280
  renderColumnFilter?: (props: DataTableColumnFilterProps<TData>) => ReactNode;
269
281
  }
270
282
  }
@@ -275,7 +287,6 @@ declare function booleanToSelectValue(value: boolean | undefined, options?: {
275
287
  fallbackUndefinedValue?: string;
276
288
  }): string;
277
289
  declare function selectValueToBoolean(value: string): boolean | undefined;
278
- declare function renderContentSlot(slot: ContentSlot, defaultWrapperProps?: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element | null;
279
290
 
280
291
  type SorterProps = {
281
292
  show?: boolean;
@@ -286,8 +297,9 @@ type HeaderCellProps<TData = any, TValue = any> = {
286
297
  rootClassName?: string;
287
298
  labelClassName?: string;
288
299
  sorterProps?: SorterProps;
300
+ align?: "left" | "center" | "right";
289
301
  };
290
- declare const HeaderCell: ({ rootClassName, labelClassName, context, label, sorterProps }: HeaderCellProps) => react_jsx_runtime.JSX.Element;
302
+ declare const HeaderCell: ({ rootClassName, labelClassName, context, label, sorterProps, align }: HeaderCellProps) => react_jsx_runtime.JSX.Element;
291
303
 
292
304
  declare const PreventPageLeave: ({ children }: React__default.PropsWithChildren) => React__default.ReactNode;
293
305
 
@@ -357,7 +369,7 @@ type UseGridSettingsStoreState = {
357
369
  declare const useGridSettingsStore: zustand.UseBoundStore<zustand.StoreApi<UseGridSettingsStoreState & UseGridSettingsStoreActions>>;
358
370
 
359
371
  declare const buttonVariants: (props?: ({
360
- variant?: "link" | "default" | "outline" | "cancel" | "destructive" | "secondary" | "ghost" | "defaultSelect" | "defaultOutline" | null | undefined;
372
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "cancel" | "ghost" | "defaultSelect" | "defaultOutline" | null | undefined;
361
373
  size?: "default" | "option" | "icon" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
362
374
  active?: boolean | null | undefined;
363
375
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -394,7 +406,7 @@ type NavbarBaseProps = {
394
406
  type NavbarProps = RequireAtLeastOne<NavbarBaseProps, "title">;
395
407
  declare const _default: React__default.MemoExoticComponent<({ className, title, subTitle, headImageURL, headImageURLClassName, tooltipContentClassName, tooltipTitle, tooltipIcon, tooltipdescription, tooltipDescriptionWrapperClassName, mainButtonText, mainButtonClassName, mainButtonDisable, subButtonText, subButtonClassName, subButtonDisable, onMainButtonClick, onSubButtonClick, separatorDisable, searchButton }: NavbarProps) => react_jsx_runtime.JSX.Element>;
396
408
 
397
- type FieldType = "text" | "number" | "date" | "datetime" | "checkbox" | "dropdown" | "lookup" | "uuid";
409
+ type FieldType = "text" | "number" | "date" | "datetime" | "checkbox" | "dropdown" | "lookup" | "uuid" | "json";
398
410
  type Option = {
399
411
  value: string;
400
412
  label: string;
@@ -404,6 +416,7 @@ interface FieldSchemaBase<T extends FieldType> {
404
416
  type: T;
405
417
  label?: string;
406
418
  multiTableSearch?: boolean;
419
+ jsonPath?: string[];
407
420
  }
408
421
  interface DropdownFieldSchema extends FieldSchemaBase<"dropdown"> {
409
422
  options: Option[];
@@ -414,14 +427,38 @@ type DateFieldSchema = FieldSchemaBase<"date">;
414
427
  type DateTimeFieldSchema = FieldSchemaBase<"datetime">;
415
428
  type CheckboxFieldSchema = FieldSchemaBase<"checkbox">;
416
429
  type LookupFieldSchema = FieldSchemaBase<"lookup">;
417
- type UUIDFiledSchema = FieldSchemaBase<"uuid">;
418
- type FieldSchema = DropdownFieldSchema | TextFieldSchema | NumberFieldSchema | DateFieldSchema | DateTimeFieldSchema | CheckboxFieldSchema | LookupFieldSchema | UUIDFiledSchema;
430
+ type UUIDFieldSchema = FieldSchemaBase<"uuid">;
431
+ type JSONFieldSchema = FieldSchemaBase<"json">;
432
+ type FieldSchema = DropdownFieldSchema | TextFieldSchema | NumberFieldSchema | DateFieldSchema | DateTimeFieldSchema | CheckboxFieldSchema | LookupFieldSchema | UUIDFieldSchema | JSONFieldSchema;
433
+ type OperatorValue = "contains" | "equals" | "beginsWith" | "endsWith" | "notEquals" | "notBeginsWith" | "notEndsWith" | "notContains" | "gt" | "gte" | "lt" | "lte" | "on" | "after" | "before" | "between" | "is" | "isNot" | "containsAny" | "containsOnly" | "containsAll";
434
+ type RowState = {
435
+ id: string;
436
+ fieldName: string;
437
+ fieldType: FieldType;
438
+ operator: Exclude<OperatorValue, "between">;
439
+ value: string;
440
+ value2?: undefined;
441
+ multiTableSearch?: boolean;
442
+ jsonPath?: string[];
443
+ } | {
444
+ id: string;
445
+ fieldName: string;
446
+ fieldType: FieldType;
447
+ operator: "between";
448
+ value: string;
449
+ value2: string;
450
+ multiTableSearch?: boolean;
451
+ jsonPath?: string[];
452
+ };
453
+ interface Params {
454
+ AND: Record<string, unknown>[];
455
+ }
419
456
  interface AdvanceSearchProps {
420
457
  fields: FieldSchema[];
421
458
  portalId: string;
422
459
  limitRows?: number;
423
460
  iconColor?: string;
424
- onSearch?: (param: Record<string, unknown>) => void;
461
+ onSearch?: (param: Params, rows: RowState[]) => void;
425
462
  onClear?: () => void;
426
463
  }
427
464
 
@@ -447,7 +484,18 @@ declare function DialogAlert({ open, onOpenChange, title, description, variant,
447
484
 
448
485
  declare function isDefined(value: any): boolean;
449
486
  declare function isEmptyObject(value: any): boolean;
450
- declare function debounce<T extends (...args: any[]) => void>(fn: T, delay?: number): (...args: Parameters<T>) => void;
487
+ type DebounceOptions = {
488
+ leading?: boolean;
489
+ trailing?: boolean;
490
+ maxWait?: number;
491
+ };
492
+ type DebouncedFunction<T extends (...args: any[]) => any> = {
493
+ (...args: Parameters<T>): ReturnType<T> | undefined;
494
+ cancel: () => void;
495
+ flush: () => ReturnType<T> | undefined;
496
+ };
497
+ declare function debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: DebounceOptions): DebouncedFunction<T>;
498
+ declare function throttle<T extends (...args: any[]) => any>(func: T, wait: number, options?: Pick<DebounceOptions, "leading" | "trailing">): DebouncedFunction<T>;
451
499
 
452
500
  declare function stripNullishObject<T extends Record<string, any>>(value: Partial<T>): {
453
501
  [k: string]: any;
@@ -531,4 +579,4 @@ type UseTruncatedOptions<T> = {
531
579
  type UseTruncatedResult = boolean;
532
580
  declare const useTruncated: <T extends HTMLElement = any>({ elementRef, onChange, resizeDetectDelay }: UseTruncatedOptions<T>) => UseTruncatedResult;
533
581
 
534
- export { AdvanceSearch, type Breakpoints, Button, type Column, type ContentSlot, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowClickMode, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, DialogAlert, type DialogAlertProps, type DialogVariant, type FieldSchema, FormErrorMessage, type FormErrorMessageProps, FormField, FormFieldContext, type FormFieldContextValue, type FormFieldProps, FormItem, FormItemContext, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, _default as Navbar, type NavbarProps, NumberInput, type NumberInputProps, PreventPageLeave, type RowClickType, type ScrollInfo, type SorterProps, TextInput, type TextInputProps, type UseFormFieldOptions, type UseFormFieldReturn, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, isDefined, isEmptyObject, renderContentSlot, selectValueToBoolean, stripNullishObject, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useTruncated };
582
+ export { AdvanceSearch, type Breakpoints, Button, type Column, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, type DebounceOptions, type DebouncedFunction, DialogAlert, type DialogAlertProps, type DialogVariant, type FieldSchema, FormErrorMessage, type FormErrorMessageProps, FormField, FormFieldContext, type FormFieldContextValue, type FormFieldProps, FormItem, FormItemContext, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, _default as Navbar, type NavbarProps, NumberInput, type NumberInputProps, type Params, PreventPageLeave, type RowClickType, type RowState, type ScrollInfo, type SorterProps, TextInput, type TextInputProps, type UseFormFieldOptions, type UseFormFieldReturn, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, isDefined, isEmptyObject, selectValueToBoolean, stripNullishObject, throttle, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useTruncated };
package/dist/index.d.ts CHANGED
@@ -65,6 +65,18 @@ type ColumnResizerProps = {
65
65
  style?: CSSProperties;
66
66
  };
67
67
 
68
+ type ColumnSeparatorProps = {
69
+ show?: boolean;
70
+ className?: string;
71
+ style?: React__default.CSSProperties;
72
+ };
73
+
74
+ type ContentSlot = {
75
+ content?: React__default.ReactNode;
76
+ icon?: React__default.ReactNode;
77
+ wrapperProps?: React__default.ComponentProps<"div">;
78
+ };
79
+
68
80
  type DataTableColumnFilterProps<TData extends RowData$1> = {
69
81
  column: Column$1<TData>;
70
82
  table: Table$1<TData>;
@@ -152,7 +164,6 @@ type DataTableRowClickHandler<TData extends RowData$1> = (rowData: TData, info:
152
164
  table: Table$1<TData>;
153
165
  clickType: RowClickType;
154
166
  }) => void;
155
- type DataTableRowClickMode = "native" | "timeout";
156
167
  type DataTableRowIdKeyHandler<TData extends RowData$1> = (originalRow: TData, index: number, parent?: Row<TData>) => string;
157
168
  type DataTableHeaderCell<TData extends RowData$1> = {
158
169
  id: string;
@@ -183,6 +194,9 @@ type DatatableColumnResizing = {
183
194
  enabled: boolean;
184
195
  resizeMode?: ColumnResizeMode;
185
196
  };
197
+ type DataTableColumnSeparatorProps = {
198
+ headerCell?: ColumnSeparatorProps;
199
+ };
186
200
  type DataTableComponentProps<TData> = {
187
201
  containerProps?: React.ComponentProps<typeof TableContainer>;
188
202
  tableProps?: React.ComponentProps<typeof Table>;
@@ -206,10 +220,7 @@ type DataTableComponentProps<TData> = {
206
220
  table: Table$1<TData>;
207
221
  }) => React.ComponentProps<typeof TableCell>);
208
222
  columnResizerProps?: Omit<ColumnResizerProps, "header">;
209
- };
210
- type ContentSlot = {
211
- content: React.ReactNode;
212
- wrapperProps?: React.ComponentProps<"div">;
223
+ columnSeparatorProps?: DataTableColumnSeparatorProps;
213
224
  };
214
225
  type DataTableStatusContent = {
215
226
  initialLoading?: ContentSlot;
@@ -265,6 +276,7 @@ declare module "@tanstack/react-table" {
265
276
  cellProps?: React.ComponentProps<"td">;
266
277
  filterCellProps?: React.ComponentProps<"td">;
267
278
  useColumnSizing?: boolean;
279
+ columnSeparatorProps?: ColumnSeparatorProps;
268
280
  renderColumnFilter?: (props: DataTableColumnFilterProps<TData>) => ReactNode;
269
281
  }
270
282
  }
@@ -275,7 +287,6 @@ declare function booleanToSelectValue(value: boolean | undefined, options?: {
275
287
  fallbackUndefinedValue?: string;
276
288
  }): string;
277
289
  declare function selectValueToBoolean(value: string): boolean | undefined;
278
- declare function renderContentSlot(slot: ContentSlot, defaultWrapperProps?: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element | null;
279
290
 
280
291
  type SorterProps = {
281
292
  show?: boolean;
@@ -286,8 +297,9 @@ type HeaderCellProps<TData = any, TValue = any> = {
286
297
  rootClassName?: string;
287
298
  labelClassName?: string;
288
299
  sorterProps?: SorterProps;
300
+ align?: "left" | "center" | "right";
289
301
  };
290
- declare const HeaderCell: ({ rootClassName, labelClassName, context, label, sorterProps }: HeaderCellProps) => react_jsx_runtime.JSX.Element;
302
+ declare const HeaderCell: ({ rootClassName, labelClassName, context, label, sorterProps, align }: HeaderCellProps) => react_jsx_runtime.JSX.Element;
291
303
 
292
304
  declare const PreventPageLeave: ({ children }: React__default.PropsWithChildren) => React__default.ReactNode;
293
305
 
@@ -357,7 +369,7 @@ type UseGridSettingsStoreState = {
357
369
  declare const useGridSettingsStore: zustand.UseBoundStore<zustand.StoreApi<UseGridSettingsStoreState & UseGridSettingsStoreActions>>;
358
370
 
359
371
  declare const buttonVariants: (props?: ({
360
- variant?: "link" | "default" | "outline" | "cancel" | "destructive" | "secondary" | "ghost" | "defaultSelect" | "defaultOutline" | null | undefined;
372
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "cancel" | "ghost" | "defaultSelect" | "defaultOutline" | null | undefined;
361
373
  size?: "default" | "option" | "icon" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
362
374
  active?: boolean | null | undefined;
363
375
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -394,7 +406,7 @@ type NavbarBaseProps = {
394
406
  type NavbarProps = RequireAtLeastOne<NavbarBaseProps, "title">;
395
407
  declare const _default: React__default.MemoExoticComponent<({ className, title, subTitle, headImageURL, headImageURLClassName, tooltipContentClassName, tooltipTitle, tooltipIcon, tooltipdescription, tooltipDescriptionWrapperClassName, mainButtonText, mainButtonClassName, mainButtonDisable, subButtonText, subButtonClassName, subButtonDisable, onMainButtonClick, onSubButtonClick, separatorDisable, searchButton }: NavbarProps) => react_jsx_runtime.JSX.Element>;
396
408
 
397
- type FieldType = "text" | "number" | "date" | "datetime" | "checkbox" | "dropdown" | "lookup" | "uuid";
409
+ type FieldType = "text" | "number" | "date" | "datetime" | "checkbox" | "dropdown" | "lookup" | "uuid" | "json";
398
410
  type Option = {
399
411
  value: string;
400
412
  label: string;
@@ -404,6 +416,7 @@ interface FieldSchemaBase<T extends FieldType> {
404
416
  type: T;
405
417
  label?: string;
406
418
  multiTableSearch?: boolean;
419
+ jsonPath?: string[];
407
420
  }
408
421
  interface DropdownFieldSchema extends FieldSchemaBase<"dropdown"> {
409
422
  options: Option[];
@@ -414,14 +427,38 @@ type DateFieldSchema = FieldSchemaBase<"date">;
414
427
  type DateTimeFieldSchema = FieldSchemaBase<"datetime">;
415
428
  type CheckboxFieldSchema = FieldSchemaBase<"checkbox">;
416
429
  type LookupFieldSchema = FieldSchemaBase<"lookup">;
417
- type UUIDFiledSchema = FieldSchemaBase<"uuid">;
418
- type FieldSchema = DropdownFieldSchema | TextFieldSchema | NumberFieldSchema | DateFieldSchema | DateTimeFieldSchema | CheckboxFieldSchema | LookupFieldSchema | UUIDFiledSchema;
430
+ type UUIDFieldSchema = FieldSchemaBase<"uuid">;
431
+ type JSONFieldSchema = FieldSchemaBase<"json">;
432
+ type FieldSchema = DropdownFieldSchema | TextFieldSchema | NumberFieldSchema | DateFieldSchema | DateTimeFieldSchema | CheckboxFieldSchema | LookupFieldSchema | UUIDFieldSchema | JSONFieldSchema;
433
+ type OperatorValue = "contains" | "equals" | "beginsWith" | "endsWith" | "notEquals" | "notBeginsWith" | "notEndsWith" | "notContains" | "gt" | "gte" | "lt" | "lte" | "on" | "after" | "before" | "between" | "is" | "isNot" | "containsAny" | "containsOnly" | "containsAll";
434
+ type RowState = {
435
+ id: string;
436
+ fieldName: string;
437
+ fieldType: FieldType;
438
+ operator: Exclude<OperatorValue, "between">;
439
+ value: string;
440
+ value2?: undefined;
441
+ multiTableSearch?: boolean;
442
+ jsonPath?: string[];
443
+ } | {
444
+ id: string;
445
+ fieldName: string;
446
+ fieldType: FieldType;
447
+ operator: "between";
448
+ value: string;
449
+ value2: string;
450
+ multiTableSearch?: boolean;
451
+ jsonPath?: string[];
452
+ };
453
+ interface Params {
454
+ AND: Record<string, unknown>[];
455
+ }
419
456
  interface AdvanceSearchProps {
420
457
  fields: FieldSchema[];
421
458
  portalId: string;
422
459
  limitRows?: number;
423
460
  iconColor?: string;
424
- onSearch?: (param: Record<string, unknown>) => void;
461
+ onSearch?: (param: Params, rows: RowState[]) => void;
425
462
  onClear?: () => void;
426
463
  }
427
464
 
@@ -447,7 +484,18 @@ declare function DialogAlert({ open, onOpenChange, title, description, variant,
447
484
 
448
485
  declare function isDefined(value: any): boolean;
449
486
  declare function isEmptyObject(value: any): boolean;
450
- declare function debounce<T extends (...args: any[]) => void>(fn: T, delay?: number): (...args: Parameters<T>) => void;
487
+ type DebounceOptions = {
488
+ leading?: boolean;
489
+ trailing?: boolean;
490
+ maxWait?: number;
491
+ };
492
+ type DebouncedFunction<T extends (...args: any[]) => any> = {
493
+ (...args: Parameters<T>): ReturnType<T> | undefined;
494
+ cancel: () => void;
495
+ flush: () => ReturnType<T> | undefined;
496
+ };
497
+ declare function debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: DebounceOptions): DebouncedFunction<T>;
498
+ declare function throttle<T extends (...args: any[]) => any>(func: T, wait: number, options?: Pick<DebounceOptions, "leading" | "trailing">): DebouncedFunction<T>;
451
499
 
452
500
  declare function stripNullishObject<T extends Record<string, any>>(value: Partial<T>): {
453
501
  [k: string]: any;
@@ -531,4 +579,4 @@ type UseTruncatedOptions<T> = {
531
579
  type UseTruncatedResult = boolean;
532
580
  declare const useTruncated: <T extends HTMLElement = any>({ elementRef, onChange, resizeDetectDelay }: UseTruncatedOptions<T>) => UseTruncatedResult;
533
581
 
534
- export { AdvanceSearch, type Breakpoints, Button, type Column, type ContentSlot, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowClickMode, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, DialogAlert, type DialogAlertProps, type DialogVariant, type FieldSchema, FormErrorMessage, type FormErrorMessageProps, FormField, FormFieldContext, type FormFieldContextValue, type FormFieldProps, FormItem, FormItemContext, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, _default as Navbar, type NavbarProps, NumberInput, type NumberInputProps, PreventPageLeave, type RowClickType, type ScrollInfo, type SorterProps, TextInput, type TextInputProps, type UseFormFieldOptions, type UseFormFieldReturn, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, isDefined, isEmptyObject, renderContentSlot, selectValueToBoolean, stripNullishObject, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useTruncated };
582
+ export { AdvanceSearch, type Breakpoints, Button, type Column, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, type DebounceOptions, type DebouncedFunction, DialogAlert, type DialogAlertProps, type DialogVariant, type FieldSchema, FormErrorMessage, type FormErrorMessageProps, FormField, FormFieldContext, type FormFieldContextValue, type FormFieldProps, FormItem, FormItemContext, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, _default as Navbar, type NavbarProps, NumberInput, type NumberInputProps, type Params, PreventPageLeave, type RowClickType, type RowState, type ScrollInfo, type SorterProps, TextInput, type TextInputProps, type UseFormFieldOptions, type UseFormFieldReturn, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, isDefined, isEmptyObject, selectValueToBoolean, stripNullishObject, throttle, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useTruncated };