@bsol-oss/react-datatable5 13.0.1-beta.9 → 13.0.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.
Files changed (51) hide show
  1. package/README.md +8 -323
  2. package/dist/index.d.ts +492 -419
  3. package/dist/index.js +1727 -4118
  4. package/dist/index.mjs +1720 -4116
  5. package/dist/types/components/DataTable/context/DataTableContext.d.ts +3 -0
  6. package/dist/types/components/DataTable/controls/ColumnFilterMenu.d.ts +20 -0
  7. package/dist/types/components/DataTable/controls/MobileTableControls.d.ts +1 -1
  8. package/dist/types/components/DataTable/controls/TableControls.d.ts +1 -3
  9. package/dist/types/components/DataTable/controls/TableFilterTags.d.ts +10 -1
  10. package/dist/types/components/DataTable/display/DataDisplay.d.ts +1 -1
  11. package/dist/types/components/DataTable/display/TableCardContainer.d.ts +5 -5
  12. package/dist/types/components/DataTable/hooks/useResponsiveColumnVisibility.d.ts +1 -1
  13. package/dist/types/components/DataTable/useDataTableServer.d.ts +1 -1
  14. package/dist/types/components/DataTable/utils/selectors.d.ts +1 -1
  15. package/dist/types/components/DatePicker/Calendar.d.ts +2 -0
  16. package/dist/types/components/DatePicker/DatePicker.d.ts +7 -47
  17. package/dist/types/components/DatePicker/DateTimePicker.d.ts +4 -1
  18. package/dist/types/components/DatePicker/RangeDatePicker.d.ts +4 -40
  19. package/dist/types/components/DatePicker/TimeRangeZoom.d.ts +255 -0
  20. package/dist/types/components/DatePicker/datePickerContext.d.ts +5 -0
  21. package/dist/types/components/DatePicker/datePickerTypes.d.ts +39 -0
  22. package/dist/types/components/DatePicker/dateValueUtils.d.ts +10 -0
  23. package/dist/types/components/DatePicker/index.d.ts +2 -0
  24. package/dist/types/components/Form/SchemaFormContext.d.ts +6 -40
  25. package/dist/types/components/Form/components/MediaLibraryBrowser.d.ts +1 -1
  26. package/dist/types/components/Form/components/core/DefaultForm.d.ts +3 -4
  27. package/dist/types/components/Form/components/core/FormRoot.d.ts +32 -34
  28. package/dist/types/components/Form/components/fields/StringInputField.d.ts +0 -25
  29. package/dist/types/components/Form/components/fields/useIdPickerData.d.ts +3 -4
  30. package/dist/types/components/Form/components/types/CustomJSONSchema7.d.ts +143 -34
  31. package/dist/types/components/Form/components/viewers/FileViewer.d.ts +7 -5
  32. package/dist/types/components/Form/useForm.d.ts +8 -16
  33. package/dist/types/components/Form/utils/ajvResolver.d.ts +4 -0
  34. package/dist/types/components/Form/utils/getNestedError.d.ts +12 -0
  35. package/dist/types/components/Form/utils/getTableData.d.ts +1 -2
  36. package/dist/types/components/Form/utils/useFormLabel.d.ts +12 -0
  37. package/dist/types/components/TextArea/TextArea.d.ts +4 -19
  38. package/dist/types/components/TimePicker/TimePicker.d.ts +13 -41
  39. package/dist/types/index.d.ts +11 -3
  40. package/package.json +11 -2
  41. package/dist/types/components/DataTable/utils/getColumns.d.ts +0 -14
  42. package/dist/types/components/DatePicker/PickerDemo.d.ts +0 -1
  43. package/dist/types/components/Form/components/core/FormTitle.d.ts +0 -1
  44. package/dist/types/components/Form/components/core/SubmitButton.d.ts +0 -1
  45. package/dist/types/components/Form/components/fields/TagPicker.d.ts +0 -25
  46. package/dist/types/components/Form/components/viewers/TagViewer.d.ts +0 -30
  47. package/dist/types/components/Form/utils/buildErrorMessages.d.ts +0 -223
  48. package/dist/types/components/Form/utils/getFieldError.d.ts +0 -6
  49. package/dist/types/components/Form/utils/idListSanityCheck.d.ts +0 -1
  50. package/dist/types/components/Form/utils/useFormI18n.d.ts +0 -41
  51. package/dist/types/components/ui/number-input.d.ts +0 -8
package/dist/index.d.ts CHANGED
@@ -3,15 +3,14 @@ import { Row, Table as Table$1, RowData, OnChangeFn, Updater, SortingState, Colu
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ReactNode, Dispatch, SetStateAction } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { TableHeaderProps as TableHeaderProps$1, TableRowProps, GridProps, TableRootProps, BoxProps, FlexProps, CardBodyProps, TextProps, ImageProps } from '@chakra-ui/react';
6
+ import { TableHeaderProps as TableHeaderProps$1, TableRowProps, GridProps, TableRootProps, FlexProps, CardBodyProps, TextProps, ImageProps, BoxProps } from '@chakra-ui/react';
7
7
  import { IconType } from 'react-icons';
8
8
  import { UseQueryResult } from '@tanstack/react-query';
9
9
  import { RankingInfo } from '@tanstack/match-sorter-utils';
10
10
  import { JSONSchema7 } from 'json-schema';
11
- import { ForeignKeyProps as ForeignKeyProps$1 } from '@/components/Form/components/fields/StringInputField';
12
- import { AxiosRequestConfig } from 'axios';
13
11
  import * as react_hook_form from 'react-hook-form';
14
- import { FieldValues, UseFormReturn, SubmitHandler } from 'react-hook-form';
12
+ import { UseFormReturn, FieldValues } from 'react-hook-form';
13
+ import dayjs from 'dayjs';
15
14
 
16
15
  interface TableHeaderTexts {
17
16
  pinColumn?: string;
@@ -130,8 +129,6 @@ interface TableControlsProps {
130
129
  children?: ReactNode;
131
130
  showGlobalFilter?: boolean;
132
131
  showFilter?: boolean;
133
- showFilterName?: boolean;
134
- showFilterTags?: boolean;
135
132
  showReload?: boolean;
136
133
  showPagination?: boolean;
137
134
  showPageSizeControl?: boolean;
@@ -149,11 +146,20 @@ interface TableControlsProps {
149
146
  hasError?: boolean;
150
147
  gridProps?: GridProps;
151
148
  }
152
- declare const TableControls: ({ fitTableWidth, fitTableHeight, children, showGlobalFilter, showFilter, showFilterName, showFilterTags, showReload, showPagination, showPageSizeControl, showPageCountText, showView, filterTagsOptions, extraItems, loading, hasError, gridProps, }: TableControlsProps) => react_jsx_runtime.JSX.Element;
149
+ declare const TableControls: ({ fitTableWidth, fitTableHeight, children, showGlobalFilter, showFilter, showReload, showPagination, showPageSizeControl, showPageCountText, showView, filterTagsOptions, extraItems, loading, hasError, gridProps, }: TableControlsProps) => react_jsx_runtime.JSX.Element;
153
150
 
154
151
  declare const TableFilter: () => react_jsx_runtime.JSX.Element;
155
152
 
156
- declare const TableFilterTags: () => react_jsx_runtime.JSX.Element;
153
+ interface TableFilterTagsProps {
154
+ filterTagsOptions?: {
155
+ column: string;
156
+ options: {
157
+ label: string;
158
+ value: string;
159
+ }[];
160
+ }[];
161
+ }
162
+ declare const TableFilterTags: ({ filterTagsOptions, }?: TableFilterTagsProps) => react_jsx_runtime.JSX.Element | null;
157
163
 
158
164
  interface TableProps extends TableRootProps {
159
165
  showLoading?: boolean;
@@ -185,12 +191,12 @@ interface TableRowSelectorProps<TData> {
185
191
  }
186
192
  declare const TableBody: ({ showSelector, canResize, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
187
193
 
188
- interface TableCardContainerProps extends BoxProps {
194
+ interface TableCardContainerProps extends Omit<GridProps, 'direction'> {
189
195
  children: ReactNode;
190
- variant?: "carousel" | "";
196
+ variant?: 'carousel' | '';
191
197
  gap?: string;
192
198
  gridTemplateColumns?: string;
193
- direction?: FlexProps["direction"];
199
+ direction?: FlexProps['direction'];
194
200
  }
195
201
  declare const TableCardContainer: ({ children, variant, gap, gridTemplateColumns, direction, ...props }: TableCardContainerProps) => react_jsx_runtime.JSX.Element;
196
202
 
@@ -313,7 +319,7 @@ interface UseDataTableReturn {
313
319
  }
314
320
  declare const useDataTable: ({ default: { sorting: defaultSorting, pagination: defaultPagination, rowSelection: defaultRowSelection, columnFilters: defaultColumnFilters, columnOrder: defaultColumnOrder, columnVisibility: defaultColumnVisibility, globalFilter: defaultGlobalFilter, density: defaultDensity, }, }?: UseDataTableProps) => UseDataTableReturn;
315
321
 
316
- interface UseDataTableServerProps<TData> extends Omit<UseDataTableProps, 'keyPrefix'> {
322
+ interface UseDataTableServerProps<TData> extends UseDataTableProps {
317
323
  /**
318
324
  * Delay to send the request if the `refreshData` called multiple times
319
325
  *
@@ -468,6 +474,9 @@ interface DataTableLabel {
468
474
  globalFilterPlaceholder: string;
469
475
  trueLabel: string;
470
476
  falseLabel: string;
477
+ noFiltersMatchText: string;
478
+ filterByLabel: string;
479
+ filterLabelsPlaceholder: string;
471
480
  }
472
481
  interface DataTableContextProps<TData = unknown> extends Omit<DataTableProps, 'translate'> {
473
482
  table: Table$1<TData>;
@@ -479,292 +488,19 @@ interface DataTableContextProps<TData = unknown> extends Omit<DataTableProps, 't
479
488
 
480
489
  declare const useDataTableContext: <TData>() => DataTableContextProps<TData>;
481
490
 
482
- interface GetColumnsConfigs<K extends RowData> {
483
- schema: JSONSchema7;
484
- include?: K[];
485
- ignore?: K[];
486
- width?: number[];
487
- meta?: {
488
- [key in K as string]?: object;
489
- };
490
- defaultWidth?: number;
491
- }
492
- declare const widthSanityCheck: <K extends unknown>(widthList: number[], ignoreList: K[], properties: { [key in K as string]?: object | undefined; }) => void;
493
- declare const getColumns: <TData extends unknown>({ schema, include, ignore, width, meta, defaultWidth, }: GetColumnsConfigs<TData>) => ColumnDef<TData>[];
494
-
495
- interface Translate {
496
- t: (key: string, options?: any) => string;
497
- i18n?: any;
498
- ready?: boolean;
499
- }
500
- interface UseFormProps {
501
- preLoadedValues?: FieldValues | undefined;
502
- keyPrefix?: string;
503
- namespace?: string;
504
- schema?: JSONSchema7;
505
- }
506
- declare const useForm: ({ preLoadedValues, keyPrefix: _keyPrefix, namespace: _namespace, schema, }: UseFormProps) => {
507
- form: react_hook_form.UseFormReturn<FieldValues, any, undefined>;
508
- idMap: Record<string, object>;
509
- setIdMap: React$1.Dispatch<React$1.SetStateAction<Record<string, object>>>;
510
- translate: Translate;
511
- };
512
-
513
- interface CustomQueryFnResponse {
514
- /**
515
- * The data of the query
516
- */
517
- data: any;
518
- /**
519
- * The id map of the data
520
- */
521
- idMap: Record<string, any>;
522
- }
523
- interface CustomQueryFnParams {
524
- searching: string;
525
- limit: number;
526
- offset: number;
527
- where?: Array<{
528
- id: string;
529
- value: string | string[];
530
- }>;
531
- }
532
- type CustomQueryFn = (params: CustomQueryFnParams) => Promise<CustomQueryFnResponse>;
533
- interface ForeignKeyProps {
534
- column: string;
535
- table: string;
536
- customQueryFn?: CustomQueryFn;
537
- }
538
-
539
- /**
540
- * Type definitions for error message configuration
541
- */
542
- /**
543
- * Common validation error types that can be customized
544
- */
545
491
  type ValidationErrorType = 'minLength' | 'maxLength' | 'pattern' | 'minimum' | 'maximum' | 'multipleOf' | 'format' | 'type' | 'enum' | 'required' | 'minItems' | 'maxItems' | 'uniqueItems' | 'minProperties' | 'maxProperties' | 'anyOf' | 'oneOf' | 'allOf' | 'const' | 'additionalProperties' | 'dependencies';
546
- /**
547
- * Configuration for field-specific validation errors
548
- */
549
- type FieldErrorConfig = Partial<Record<ValidationErrorType, string>>;
550
- /**
551
- * Configuration for building error messages
552
- */
553
- interface ErrorMessageConfig {
554
- /**
555
- * Required field error messages
556
- * Maps field names to their required error messages
557
- * Supports both plain strings and i18n translation keys
558
- *
559
- * @example
560
- * ```typescript
561
- * required: {
562
- * username: "Username is required", // plain string
563
- * email: "user.email.field_required" // i18n key
564
- * }
565
- * ```
566
- */
567
- required?: Record<string, string>;
568
- /**
569
- * Field-specific validation error messages
570
- * Maps field names to their validation error configurations
571
- *
572
- * @example
573
- * ```typescript
574
- * properties: {
575
- * username: {
576
- * minLength: "Username must be at least 3 characters",
577
- * pattern: "Username can only contain letters and numbers"
578
- * },
579
- * age: {
580
- * minimum: "Age must be at least 18",
581
- * maximum: "Age cannot exceed 120"
582
- * }
583
- * }
584
- * ```
585
- */
586
- properties?: Record<string, FieldErrorConfig>;
587
- /**
588
- * Global fallback error messages for validation types
589
- * These are used when no field-specific message is provided
590
- *
591
- * @example
592
- * ```typescript
593
- * {
594
- * minLength: "This field is too short",
595
- * minimum: "Value is too small"
596
- * }
597
- * ```
598
- */
599
- [key: string]: any;
600
- }
601
- /**
602
- * Result of buildErrorMessages that follows ajv-errors format
603
- */
604
- interface ErrorMessageResult {
605
- required?: Record<string, string>;
606
- properties?: Record<string, FieldErrorConfig>;
607
- [key: string]: any;
608
- }
609
- /**
610
- * Schema-level error message builder
611
- *
612
- * Builds a complete errorMessage object compatible with ajv-errors plugin.
613
- * Supports both i18n translation keys and plain string messages.
614
- *
615
- * @param config - Error message configuration
616
- * @returns Complete errorMessage object for JSON Schema
617
- *
618
- * @example
619
- * ```typescript
620
- * // Simple required field errors
621
- * const errorMessage = buildErrorMessages({
622
- * required: {
623
- * username: "Username is required",
624
- * email: "user.email.field_required" // i18n key
625
- * }
626
- * });
627
- *
628
- * // With validation rules
629
- * const errorMessage = buildErrorMessages({
630
- * required: {
631
- * password: "Password is required"
632
- * },
633
- * properties: {
634
- * password: {
635
- * minLength: "Password must be at least 8 characters",
636
- * pattern: "Password must contain letters and numbers"
637
- * },
638
- * age: {
639
- * minimum: "Must be 18 or older",
640
- * maximum: "Must be under 120"
641
- * }
642
- * }
643
- * });
644
- *
645
- * // With global fallbacks
646
- * const errorMessage = buildErrorMessages({
647
- * required: {
648
- * email: "Email is required"
649
- * },
650
- * minLength: "This field is too short", // applies to all fields
651
- * minimum: "Value is too small"
652
- * });
653
- * ```
654
- */
655
- declare const buildErrorMessages: (config: ErrorMessageConfig) => ErrorMessageResult;
656
- /**
657
- * Converts buildErrorMessages result to ajv-errors compatible format
658
- */
659
- declare const convertToAjvErrorsFormat: (errorMessages: ErrorMessageResult) => Record<string, any>;
660
- /**
661
- * Helper function to build required field errors
662
- *
663
- * Simplifies creating required field error messages, especially useful
664
- * for generating i18n translation keys following a pattern.
665
- *
666
- * @param fields - Array of required field names
667
- * @param messageOrGenerator - Either a string template or function to generate messages
668
- * @returns Required field error configuration
669
- *
670
- * @example
671
- * ```typescript
672
- * // Plain string messages
673
- * const required = buildRequiredErrors(
674
- * ["username", "email", "password"],
675
- * (field) => `${field} is required`
676
- * );
677
- * // Result: { username: "username is required", email: "email is required", ... }
678
- *
679
- * // i18n translation keys
680
- * const required = buildRequiredErrors(
681
- * ["username", "email"],
682
- * (field) => `user.${field}.field_required`
683
- * );
684
- * // Result: { username: "user.username.field_required", email: "user.email.field_required" }
685
- *
686
- * // Same message for all fields
687
- * const required = buildRequiredErrors(
688
- * ["username", "email"],
689
- * "This field is required"
690
- * );
691
- * // Result: { username: "This field is required", email: "This field is required" }
692
- *
693
- * // With keyPrefix for i18n
694
- * const required = buildRequiredErrors(
695
- * ["username", "email"],
696
- * (field) => `${field}.field_required`,
697
- * "user"
698
- * );
699
- * // Result: { username: "user.username.field_required", email: "user.email.field_required" }
700
- * ```
701
- */
702
- declare const buildRequiredErrors: (fields: string[], messageOrGenerator: string | ((field: string) => string), keyPrefix?: string) => Record<string, string>;
703
- /**
704
- * Helper function to build field-specific validation errors
705
- *
706
- * Creates property-specific error messages for multiple fields at once.
707
- *
708
- * @param config - Maps field names to their validation error configurations
709
- * @returns Properties error configuration
710
- *
711
- * @example
712
- * ```typescript
713
- * const properties = buildFieldErrors({
714
- * username: {
715
- * minLength: "Username must be at least 3 characters",
716
- * pattern: "Username can only contain letters and numbers"
717
- * },
718
- * age: {
719
- * minimum: "Must be 18 or older",
720
- * maximum: "Must be under 120"
721
- * },
722
- * email: {
723
- * format: "Please enter a valid email address"
724
- * }
725
- * });
726
- * ```
727
- */
728
- declare const buildFieldErrors: (config: Record<string, FieldErrorConfig>) => Record<string, FieldErrorConfig>;
729
- /**
730
- * Helper function to create a complete error message configuration in one call
731
- *
732
- * Convenient wrapper that combines required and validation errors.
733
- *
734
- * @param required - Required field error messages
735
- * @param properties - Field-specific validation error messages
736
- * @param globalFallbacks - Global fallback error messages
737
- * @returns Complete error message configuration
738
- *
739
- * @example
740
- * ```typescript
741
- * const errorMessage = createErrorMessage(
742
- * {
743
- * username: "Username is required",
744
- * email: "Email is required"
745
- * },
746
- * {
747
- * username: {
748
- * minLength: "Username must be at least 3 characters"
749
- * },
750
- * email: {
751
- * format: "Please enter a valid email"
752
- * }
753
- * },
754
- * {
755
- * minLength: "This field is too short",
756
- * format: "Invalid format"
757
- * }
758
- * );
759
- * ```
760
- */
761
- declare const createErrorMessage: (required?: Record<string, string>, properties?: Record<string, FieldErrorConfig>, globalFallbacks?: Partial<Record<ValidationErrorType, string>>) => ErrorMessageResult;
762
-
763
492
  interface DateTimePickerLabels {
764
493
  monthNamesShort?: string[];
765
494
  weekdayNamesShort?: string[];
766
495
  backButtonLabel?: string;
767
496
  forwardButtonLabel?: string;
497
+ selectDateLabel?: string;
498
+ quickActionLabels?: {
499
+ yesterday?: string;
500
+ today?: string;
501
+ tomorrow?: string;
502
+ plus7Days?: string;
503
+ };
768
504
  }
769
505
  interface IdPickerLabels {
770
506
  undefined?: string;
@@ -816,24 +552,25 @@ interface FormButtonLabels {
816
552
  interface TimePickerLabels {
817
553
  placeholder?: string;
818
554
  emptyMessage?: string;
555
+ selectTimeLabel?: string;
819
556
  }
820
- interface LoadInitialValuesParams {
557
+ interface LoadInitialValuesParams<TRecord = unknown> {
821
558
  ids: string[];
822
- foreign_key: ForeignKeyProps;
823
- setIdMap: React__default.Dispatch<React__default.SetStateAction<Record<string, object>>>;
559
+ customQueryFn: CustomQueryFn<TRecord>;
560
+ setIdMap: React__default.Dispatch<React__default.SetStateAction<Record<string, TRecord>>>;
824
561
  }
825
- interface LoadInitialValuesResult {
562
+ interface LoadInitialValuesResult<TRecord = unknown> {
826
563
  data: {
827
- data: Record<string, any>[];
564
+ data: TRecord[];
828
565
  count: number;
829
566
  };
830
- idMap: Record<string, object>;
567
+ idMap: Record<string, TRecord>;
831
568
  }
832
- interface CustomJSONSchema7 extends JSONSchema7 {
569
+ interface CustomJSONSchema7 extends Omit<JSONSchema7, 'items' | 'additionalItems' | 'properties' | 'additionalProperties' | 'definitions' | 'patternProperties' | 'dependencies' | 'allOf' | 'anyOf' | 'oneOf' | 'not' | 'if' | 'then' | 'else' | 'contains'> {
833
570
  gridColumn?: string;
834
571
  gridRow?: string;
835
- foreign_key?: ForeignKeyProps;
836
- variant?: string;
572
+ customQueryFn?: CustomQueryFn;
573
+ variant?: 'custom-input' | 'id-picker' | 'text-area' | 'media-library-browser' | 'file-picker' | 'date-range' | 'enum-picker' | 'radio';
837
574
  renderDisplay?: (item: unknown) => ReactNode;
838
575
  itemToValue?: (item: unknown) => string;
839
576
  loadInitialValues?: (params: LoadInitialValuesParams) => Promise<LoadInitialValuesResult>;
@@ -856,73 +593,182 @@ interface CustomJSONSchema7 extends JSONSchema7 {
856
593
  showLabel?: boolean;
857
594
  formatOptions?: Intl.NumberFormatOptions;
858
595
  numberStorageType?: 'string' | 'number';
859
- errorMessages?: Partial<Record<ValidationErrorType | string, string>>;
596
+ errorMessage?: Record<Partial<ValidationErrorType> | string, string | Record<string, string>>;
860
597
  filePicker?: FilePickerProps;
861
- tagPicker?: {
862
- queryFn?: (params: {
863
- in_table: string;
864
- where?: {
865
- id: string;
866
- value: string[];
867
- }[];
868
- limit?: number;
869
- offset?: number;
870
- searching?: string;
871
- }) => Promise<{
872
- data: {
873
- data: any[];
874
- count: number;
875
- };
876
- idMap?: Record<string, object>;
877
- }>;
598
+ dateTimePicker?: {
599
+ showQuickActions?: boolean;
600
+ quickActionLabels?: {
601
+ yesterday?: string;
602
+ today?: string;
603
+ tomorrow?: string;
604
+ plus7Days?: string;
605
+ };
606
+ showTimezoneSelector?: boolean;
607
+ };
608
+ items?: CustomJSONSchema7 | CustomJSONSchema7[];
609
+ additionalItems?: CustomJSONSchema7;
610
+ properties?: {
611
+ [key: string]: CustomJSONSchema7;
878
612
  };
613
+ additionalProperties?: boolean | CustomJSONSchema7;
614
+ definitions?: {
615
+ [key: string]: CustomJSONSchema7;
616
+ };
617
+ patternProperties?: {
618
+ [key: string]: CustomJSONSchema7;
619
+ };
620
+ dependencies?: {
621
+ [key: string]: CustomJSONSchema7 | string[];
622
+ };
623
+ allOf?: CustomJSONSchema7[];
624
+ anyOf?: CustomJSONSchema7[];
625
+ oneOf?: CustomJSONSchema7[];
626
+ not?: CustomJSONSchema7;
627
+ if?: CustomJSONSchema7;
628
+ then?: CustomJSONSchema7;
629
+ else?: CustomJSONSchema7;
630
+ contains?: CustomJSONSchema7;
879
631
  }
880
632
  declare const defaultRenderDisplay: (item: unknown) => ReactNode;
881
- interface TagPickerProps {
882
- column: string;
883
- schema: CustomJSONSchema7;
884
- prefix: string;
885
- }
633
+ /**
634
+ * Expected shape of a media file returned by `onFetchFiles` and used by
635
+ * the Media Library Browser and File Picker components.
636
+ *
637
+ * @example
638
+ * ```ts
639
+ * {
640
+ * id: 'file-1',
641
+ * name: 'photo.jpg',
642
+ * url: 'https://cdn.example.com/photo.jpg',
643
+ * size: 102400,
644
+ * comment: 'Profile photo',
645
+ * type: 'image/jpeg',
646
+ * }
647
+ * ```
648
+ */
886
649
  interface FilePickerMediaFile {
650
+ /** Unique identifier for the file (required) */
887
651
  id: string;
652
+ /** Display name of the file (required) */
888
653
  name: string;
654
+ /** URL for image preview; required for thumbnails in media library */
889
655
  url?: string;
656
+ /** File size in bytes (number) or human-readable string (e.g. "1.2 MB") */
890
657
  size?: string | number;
658
+ /** Optional description or metadata */
891
659
  comment?: string;
660
+ /** MIME type (e.g. "image/jpeg", "application/pdf") */
892
661
  type?: string;
893
662
  }
663
+ /**
664
+ * JSON Schema definition for FilePickerMediaFile.
665
+ * Use this to document or validate the expected structure in your API/schema.
666
+ */
667
+ declare const FilePickerMediaFileSchema: {
668
+ readonly type: "object";
669
+ readonly required: readonly ["id", "name"];
670
+ readonly properties: {
671
+ readonly id: {
672
+ readonly type: "string";
673
+ readonly description: "Unique identifier for the file";
674
+ };
675
+ readonly name: {
676
+ readonly type: "string";
677
+ readonly description: "Display name of the file";
678
+ };
679
+ readonly url: {
680
+ readonly type: "string";
681
+ readonly format: "uri";
682
+ readonly description: "URL for image preview; required for thumbnails in media library";
683
+ };
684
+ readonly size: {
685
+ readonly oneOf: readonly [{
686
+ readonly type: "number";
687
+ }, {
688
+ readonly type: "string";
689
+ }];
690
+ readonly description: "File size in bytes (number) or human-readable string";
691
+ };
692
+ readonly comment: {
693
+ readonly type: "string";
694
+ readonly description: "Optional description or metadata";
695
+ };
696
+ readonly type: {
697
+ readonly type: "string";
698
+ readonly description: "MIME type (e.g. \"image/jpeg\", \"application/pdf\")";
699
+ };
700
+ };
701
+ };
894
702
  interface FilePickerProps {
703
+ /**
704
+ * Fetches files from your media library/API. Must return FilePickerMediaFile[].
705
+ * The search string can be used to filter results.
706
+ */
895
707
  onFetchFiles?: (search: string) => Promise<FilePickerMediaFile[]>;
708
+ /** When true, adds a "Browse Library" button to the file picker (file-picker variant only) */
896
709
  enableMediaLibrary?: boolean;
710
+ /** When true, only shows image files (jpg, jpeg, png, gif, bmp, webp, svg) */
897
711
  filterImageOnly?: boolean;
712
+ /** When true, shows an upload tab in the media library dialog */
898
713
  enableUpload?: boolean;
714
+ /** Upload handler; must return the new file's ID string */
899
715
  onUploadFile?: (file: File) => Promise<string>;
900
716
  }
717
+ interface CustomQueryFnResponse<TRecord = unknown> {
718
+ /**
719
+ * The data of the query
720
+ */
721
+ data: {
722
+ data: TRecord[];
723
+ count: number;
724
+ };
725
+ /**
726
+ * The id map of the data
727
+ */
728
+ idMap: Record<string, TRecord>;
729
+ }
730
+ interface CustomQueryFnParams {
731
+ searching: string;
732
+ limit: number;
733
+ offset: number;
734
+ where?: Array<{
735
+ id: string;
736
+ value: string | string[];
737
+ }>;
738
+ }
739
+ type CustomQueryFn<TRecord = unknown> = (params: CustomQueryFnParams) => Promise<CustomQueryFnResponse<TRecord>>;
901
740
 
902
741
  interface FormRootProps<TData extends FieldValues> {
742
+ /**
743
+ * JSON Schema with support for errorMessages in properties.
744
+ * Each property can define errorMessages object with keys like:
745
+ * - required: Error message when field is required but missing
746
+ * - minLength, maxLength: Error messages for string length validation
747
+ * - minimum, maximum: Error messages for number range validation
748
+ * - format: Error message for format validation (email, date, etc.)
749
+ * - pattern: Error message for pattern validation
750
+ * - type: Error message for type validation
751
+ *
752
+ * @example
753
+ * {
754
+ * type: 'object',
755
+ * properties: {
756
+ * username: {
757
+ * type: 'string',
758
+ * minLength: 3,
759
+ * errorMessages: {
760
+ * required: 'Username is required',
761
+ * minLength: 'Username must be at least 3 characters'
762
+ * }
763
+ * }
764
+ * }
765
+ * }
766
+ */
903
767
  schema: CustomJSONSchema7;
904
- requestUrl?: string;
905
- idMap: Record<string, object>;
906
- setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
907
- form: UseFormReturn;
908
- /** Translate object for fallback text (components prefer label objects) */
909
- translate: Translate;
768
+ idMap: Record<string, unknown>;
769
+ setIdMap: Dispatch<SetStateAction<Record<string, unknown>>>;
770
+ form: UseFormReturn<TData, any, TData>;
910
771
  children: ReactNode;
911
- order?: string[];
912
- ignore?: string[];
913
- include?: string[];
914
- onSubmit?: SubmitHandler<TData>;
915
- rowNumber?: number | string;
916
- requestOptions?: AxiosRequestConfig;
917
- getUpdatedData?: () => TData | Promise<TData> | void;
918
- customErrorRenderer?: (error: unknown) => ReactNode;
919
- customSuccessRenderer?: (resetHandler: () => void | Promise<void>) => ReactNode;
920
- displayConfig?: {
921
- showSubmitButton?: boolean;
922
- showResetButton?: boolean;
923
- showTitle?: boolean;
924
- };
925
- requireConfirmation?: boolean;
926
772
  dateTimePickerLabels?: DateTimePickerLabels;
927
773
  idPickerLabels?: IdPickerLabels;
928
774
  enumPickerLabels?: EnumPickerLabels;
@@ -933,27 +779,18 @@ interface FormRootProps<TData extends FieldValues> {
933
779
  }
934
780
  interface CustomJSONSchema7Definition extends JSONSchema7 {
935
781
  variant: string;
936
- in_table: string;
937
- column_ref: string;
938
782
  gridColumn: string;
939
783
  gridRow: string;
940
- foreign_key: ForeignKeyProps$1;
784
+ customQueryFn: any;
941
785
  children: ReactNode;
942
786
  }
943
- declare const idPickerSanityCheck: (column: string, foreign_key?: {
944
- table?: string | undefined;
945
- column?: string | undefined;
946
- } | undefined) => void;
947
- declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, translate, children, order, ignore, include, onSubmit, rowNumber, requestOptions, getUpdatedData, customErrorRenderer, customSuccessRenderer, displayConfig, requireConfirmation, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog, }: FormRootProps<TData>) => react_jsx_runtime.JSX.Element;
787
+ declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, children, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog, }: FormRootProps<TData>) => react_jsx_runtime.JSX.Element;
948
788
 
949
789
  interface DefaultFormProps<TData extends FieldValues> {
950
- formConfig: Omit<FormRootProps<TData>, "children">;
951
- showTitle?: boolean;
790
+ formConfig: Omit<FormRootProps<TData>, 'children'>;
952
791
  }
953
792
  declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultFormProps<TData>) => react_jsx_runtime.JSX.Element;
954
793
 
955
- declare const FormTitle: () => react_jsx_runtime.JSX.Element;
956
-
957
794
  declare const FormBody: () => react_jsx_runtime.JSX.Element;
958
795
 
959
796
  type MediaLibraryBrowserPropsBase = {
@@ -975,7 +812,17 @@ type MediaLibraryBrowserPropsMultiple = MediaLibraryBrowserPropsBase & {
975
812
  onSelectedFileChange?: (files: FilePickerMediaFile[]) => void;
976
813
  };
977
814
  type MediaLibraryBrowserProps = MediaLibraryBrowserPropsSingle | MediaLibraryBrowserPropsMultiple;
978
- declare const MediaLibraryBrowser: ({ onFetchFiles, filterImageOnly, labels, enabled, multiple, onFileSelect, selectedFile: controlledSelectedFile, onSelectedFileChange, }: MediaLibraryBrowserProps) => react_jsx_runtime.JSX.Element | null;
815
+ declare const MediaLibraryBrowser: ({ onFetchFiles, filterImageOnly, labels, enabled, multiple, onFileSelect, selectedFile: controlledSelectedFile, onSelectedFileChange, }: MediaLibraryBrowserProps) => react_jsx_runtime.JSX.Element;
816
+
817
+ interface UseFormProps<T> {
818
+ preLoadedValues?: T | undefined;
819
+ schema: CustomJSONSchema7;
820
+ }
821
+ declare function useForm<T extends FieldValues = any>({ preLoadedValues, schema, }: UseFormProps<T>): {
822
+ form: react_hook_form.UseFormReturn<T, any, T>;
823
+ idMap: Record<string, unknown>;
824
+ setIdMap: React$1.Dispatch<React$1.SetStateAction<Record<string, unknown>>>;
825
+ };
979
826
 
980
827
  interface CalendarDate {
981
828
  date: Date;
@@ -1025,6 +872,15 @@ interface GetVariantProps {
1025
872
  selected: boolean;
1026
873
  selectable: boolean;
1027
874
  }
875
+ interface DatePickerLabels {
876
+ monthNamesShort: string[];
877
+ weekdayNamesShort: string[];
878
+ backButtonLabel?: string;
879
+ forwardButtonLabel?: string;
880
+ todayLabel?: string;
881
+ yesterdayLabel?: string;
882
+ tomorrowLabel?: string;
883
+ }
1028
884
  interface DatePickerProps {
1029
885
  onDateSelected?: (obj: {
1030
886
  date: Date;
@@ -1032,31 +888,20 @@ interface DatePickerProps {
1032
888
  }) => void;
1033
889
  selected: Date | Date[];
1034
890
  firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
891
+ /** @deprecated No-op; kept for story compatibility */
1035
892
  showOutsideDays?: boolean;
893
+ /** @deprecated No-op; kept for story compatibility */
1036
894
  date?: Date;
1037
895
  minDate?: Date;
1038
896
  maxDate?: Date;
1039
897
  monthsToDisplay?: number;
1040
- labels?: {
1041
- monthNamesShort: string[];
1042
- weekdayNamesShort: string[];
1043
- backButtonLabel?: string;
1044
- forwardButtonLabel?: string;
1045
- todayLabel?: string;
1046
- yesterdayLabel?: string;
1047
- tomorrowLabel?: string;
1048
- };
1049
- render?: (calendarData: CalendarRenderProps) => React__default.ReactNode;
1050
- }
1051
- interface DatePickerLabels {
1052
- monthNamesShort: string[];
1053
- weekdayNamesShort: string[];
1054
- backButtonLabel?: string;
1055
- forwardButtonLabel?: string;
1056
- todayLabel?: string;
1057
- yesterdayLabel?: string;
1058
- tomorrowLabel?: string;
898
+ labels?: DatePickerLabels;
1059
899
  }
900
+
901
+ declare const DatePickerContext: React$1.Context<{
902
+ labels: DatePickerLabels;
903
+ }>;
904
+
1060
905
  interface DatePickerInputProps {
1061
906
  value?: string | Date;
1062
907
  onChange?: (date?: string) => void;
@@ -1074,7 +919,7 @@ interface DatePickerInputProps {
1074
919
  readOnly?: boolean;
1075
920
  showHelperButtons?: boolean;
1076
921
  }
1077
- declare function DatePickerInput({ value, onChange, placeholder, dateFormat, displayFormat, labels, timezone, minDate, maxDate, firstDayOfWeek, showOutsideDays, monthsToDisplay, insideDialog, readOnly, showHelperButtons, }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
922
+ declare function DatePickerInput({ value, onChange, placeholder, dateFormat, displayFormat, timezone, minDate, maxDate, insideDialog, readOnly, }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
1078
923
 
1079
924
  interface GetMultiDatesProps {
1080
925
  selected: boolean;
@@ -1091,16 +936,6 @@ interface GetRangeDatesProps {
1091
936
  }
1092
937
  declare const getRangeDates: ({ selectable, date, selectedDates, }: GetRangeDatesProps) => Date[] | undefined;
1093
938
 
1094
- interface RangeCalendarProps extends CalendarRenderProps {
1095
- firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1096
- selected?: Date[];
1097
- }
1098
- interface GetStyleProps {
1099
- today: boolean;
1100
- selected: boolean;
1101
- unavailable: boolean;
1102
- isInRange: boolean;
1103
- }
1104
939
  interface RangeDatePickerLabels {
1105
940
  monthNamesFull: string[];
1106
941
  weekdayNamesShort: string[];
@@ -1115,53 +950,281 @@ interface RangeDatePickerProps {
1115
950
  }) => void;
1116
951
  selected?: Date[];
1117
952
  firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
953
+ /** @deprecated No-op; kept for story compatibility */
1118
954
  showOutsideDays?: boolean;
955
+ /** @deprecated No-op; kept for story compatibility */
1119
956
  date?: Date;
1120
957
  minDate?: Date;
1121
958
  maxDate?: Date;
1122
959
  monthsToDisplay?: number;
1123
960
  labels?: RangeDatePickerLabels;
1124
- /**
1125
- * Whether to render the calendar in a popover with a trigger button.
1126
- * @default true
1127
- */
1128
961
  withPopover?: boolean;
1129
- /**
1130
- * Controlled open state for the popover.
1131
- */
1132
962
  open?: boolean;
1133
- /**
1134
- * Callback when the popover open state changes.
1135
- */
1136
963
  onOpenChange?: (details: {
1137
964
  open: boolean;
1138
965
  }) => void;
1139
- /**
1140
- * The trigger button element. If not provided, a default button will be rendered.
1141
- */
1142
966
  trigger?: React__default.ReactNode;
1143
- /**
1144
- * Format string for displaying the selected date range in the trigger button.
1145
- * @default "YYYY-MM-DD"
1146
- */
1147
967
  displayFormat?: string;
1148
- /**
1149
- * Placeholder text for the trigger button when no dates are selected.
1150
- */
1151
968
  placeholder?: string;
1152
- /**
1153
- * Whether to close the popover when clicking outside.
1154
- * @default true
1155
- */
1156
969
  closeOnInteractOutside?: boolean;
1157
- /**
1158
- * Whether to portal the popover content.
1159
- * @default true
1160
- */
1161
970
  portalled?: boolean;
1162
- render?: (calendarData: CalendarRenderProps) => React__default.ReactNode;
971
+ /** IANA timezone for wall dates */
972
+ timezone?: string;
1163
973
  }
1164
974
 
975
+ type TimeInput = Date | string | number;
976
+ interface ViewableTimeRange {
977
+ start: TimeInput;
978
+ end: TimeInput;
979
+ }
980
+ interface TimeRangeZoomLabels {
981
+ zoomIn?: string;
982
+ zoomOut?: string;
983
+ reset?: string;
984
+ visibleRange?: string;
985
+ duration?: string;
986
+ daysShort?: string;
987
+ hoursShort?: string;
988
+ minutesShort?: string;
989
+ secondsShort?: string;
990
+ invalidRange?: string;
991
+ dateTimeFormat?: string;
992
+ }
993
+ interface TimeRangeZoomProps {
994
+ range: ViewableTimeRange;
995
+ onRangeChange: (range: {
996
+ start: Date;
997
+ end: Date;
998
+ }) => void;
999
+ minDurationMs?: number;
1000
+ maxDurationMs?: number;
1001
+ zoomFactor?: number;
1002
+ resetDurationMs?: number;
1003
+ showResetButton?: boolean;
1004
+ disabled?: boolean;
1005
+ labels?: TimeRangeZoomLabels;
1006
+ }
1007
+ interface TimeViewportBlockProps {
1008
+ start: TimeInput;
1009
+ end: TimeInput;
1010
+ viewportStart?: TimeInput;
1011
+ viewportEnd?: TimeInput;
1012
+ height?: string | number;
1013
+ minWidthPx?: number;
1014
+ borderRadius?: string | number;
1015
+ colorPalette?: string;
1016
+ background?: string;
1017
+ label?: string;
1018
+ showLabel?: boolean;
1019
+ hideWhenOutOfView?: boolean;
1020
+ onClick?: () => void;
1021
+ }
1022
+ interface TimeViewportBlockItem {
1023
+ id: string;
1024
+ start?: TimeInput;
1025
+ end?: TimeInput;
1026
+ label?: string;
1027
+ colorPalette?: string;
1028
+ background?: string;
1029
+ track?: string | number;
1030
+ children?: TimeViewportBlockItem[];
1031
+ onClick?: (block: TimeViewportBlockItem) => void;
1032
+ }
1033
+ interface TimeViewportMarkerLineProps {
1034
+ timestamp: TimeInput;
1035
+ viewportStart?: TimeInput;
1036
+ viewportEnd?: TimeInput;
1037
+ height?: string | number;
1038
+ colorPalette?: string;
1039
+ color?: string;
1040
+ lineWidthPx?: number;
1041
+ label?: string;
1042
+ showLabel?: boolean;
1043
+ hideWhenOutOfView?: boolean;
1044
+ }
1045
+ interface TimeViewportHeaderProps {
1046
+ viewportStart?: TimeInput;
1047
+ viewportEnd?: TimeInput;
1048
+ tickCount?: number;
1049
+ tickStrategy?: 'count' | 'timeUnit';
1050
+ tickUnit?: 'minute' | 'hour' | 'day';
1051
+ tickStep?: number;
1052
+ format?: string;
1053
+ height?: string | number;
1054
+ color?: string;
1055
+ borderColor?: string;
1056
+ showBottomBorder?: boolean;
1057
+ animationDurationMs?: number;
1058
+ animationEasing?: string;
1059
+ }
1060
+ interface TimeViewportHeaderTick {
1061
+ index: number;
1062
+ percent: number;
1063
+ label: string;
1064
+ }
1065
+ interface UseTimeViewportTicksResult {
1066
+ isValidViewport: boolean;
1067
+ getTicksByCount: (tickCount?: number) => TimeViewportHeaderTick[];
1068
+ getTicksByTimeUnit: (tickUnit?: TimeViewportHeaderProps['tickUnit'], tickStep?: number) => TimeViewportHeaderTick[];
1069
+ getTicks: (options?: {
1070
+ tickStrategy?: TimeViewportHeaderProps['tickStrategy'];
1071
+ tickCount?: number;
1072
+ tickUnit?: TimeViewportHeaderProps['tickUnit'];
1073
+ tickStep?: number;
1074
+ }) => TimeViewportHeaderTick[];
1075
+ }
1076
+ interface TimeViewportGridProps {
1077
+ viewportStart?: TimeInput;
1078
+ viewportEnd?: TimeInput;
1079
+ tickCount?: number;
1080
+ tickStrategy?: 'count' | 'timeUnit';
1081
+ tickUnit?: 'minute' | 'hour' | 'day';
1082
+ tickStep?: number;
1083
+ format?: string;
1084
+ minorDivisions?: number;
1085
+ majorLineColor?: string;
1086
+ minorLineColor?: string;
1087
+ showMinorLines?: boolean;
1088
+ zIndex?: number;
1089
+ animationDurationMs?: number;
1090
+ animationEasing?: string;
1091
+ }
1092
+ interface TimeViewportBlockRenderArgs {
1093
+ block: TimeViewportBlockItem;
1094
+ geometry: {
1095
+ leftPercent: number;
1096
+ widthPercent: number;
1097
+ };
1098
+ index: number;
1099
+ }
1100
+ interface TimeViewportTrackRenderArgs {
1101
+ trackIndex: number;
1102
+ trackKey?: string | number;
1103
+ trackBlocks: TimeViewportBlockItem[];
1104
+ defaultContent: ReactNode;
1105
+ }
1106
+ interface TimeViewportBlocksProps {
1107
+ blocks: TimeViewportBlockItem[];
1108
+ viewportStart?: TimeInput;
1109
+ viewportEnd?: TimeInput;
1110
+ height?: string | number;
1111
+ minWidthPx?: number;
1112
+ borderRadius?: string | number;
1113
+ defaultColorPalette?: string;
1114
+ showLabel?: boolean;
1115
+ hideWhenOutOfView?: boolean;
1116
+ hideEmptyTracks?: boolean;
1117
+ gap?: number;
1118
+ allowOverlap?: boolean;
1119
+ overlapOpacity?: number;
1120
+ renderTrackPrefix?: (args: {
1121
+ trackIndex: number;
1122
+ trackBlocks: TimeViewportBlockItem[];
1123
+ trackKey?: string | number;
1124
+ }) => ReactNode;
1125
+ renderTrackSuffix?: (args: {
1126
+ trackIndex: number;
1127
+ trackBlocks: TimeViewportBlockItem[];
1128
+ trackKey?: string | number;
1129
+ }) => ReactNode;
1130
+ /** Custom render function for block content. The returned node is placed inside a positioning wrapper that handles translateX and transitions. */
1131
+ renderBlock?: (args: TimeViewportBlockRenderArgs) => ReactNode;
1132
+ /** Custom render function for an entire track row. Receives the default rendered content so you can wrap or replace it. */
1133
+ renderTrack?: (args: TimeViewportTrackRenderArgs) => ReactNode;
1134
+ onBlockClick?: (block: TimeViewportBlockItem) => void;
1135
+ /** Enable virtual scrolling for large track lists. */
1136
+ virtualize?: boolean;
1137
+ /** Fixed pixel height of the scroll container when virtualize is true. Defaults to 400. */
1138
+ virtualHeight?: number;
1139
+ /** Number of off-screen rows to render above/below the visible area. Defaults to 5. */
1140
+ overscan?: number;
1141
+ }
1142
+ interface TimeViewportRootProps {
1143
+ viewportStart: TimeInput;
1144
+ viewportEnd: TimeInput;
1145
+ children: ReactNode;
1146
+ onViewportChange?: (range: {
1147
+ start: Date;
1148
+ end: Date;
1149
+ }) => void;
1150
+ enableDragPan?: boolean;
1151
+ enableCtrlWheelZoom?: boolean;
1152
+ wheelZoomFactor?: number;
1153
+ minDurationMs?: number;
1154
+ maxDurationMs?: number;
1155
+ }
1156
+ declare function TimeViewportRoot({ viewportStart, viewportEnd, children, onViewportChange, enableDragPan, enableCtrlWheelZoom, wheelZoomFactor, minDurationMs, maxDurationMs, }: TimeViewportRootProps): react_jsx_runtime.JSX.Element;
1157
+ interface UseTimeRangeZoomResult {
1158
+ labels: Required<TimeRangeZoomLabels>;
1159
+ start: dayjs.Dayjs;
1160
+ end: dayjs.Dayjs;
1161
+ durationMs: number;
1162
+ canZoomIn: boolean;
1163
+ canZoomOut: boolean;
1164
+ hasValidDisplayRange: boolean;
1165
+ visibleRangeText: string;
1166
+ durationText: string;
1167
+ zoomIn: () => void;
1168
+ zoomOut: () => void;
1169
+ reset: () => void;
1170
+ }
1171
+ interface UseTimeViewportBlockGeometryResult {
1172
+ hasValidViewport: boolean;
1173
+ getGeometry: (start?: TimeInput, end?: TimeInput) => {
1174
+ valid: boolean;
1175
+ leftPercent: number;
1176
+ widthPercent: number;
1177
+ };
1178
+ toTimeMs: (value?: TimeInput) => number | null;
1179
+ }
1180
+ interface UseTimeViewportDerivedResult {
1181
+ isValidViewport: boolean;
1182
+ toTimeMs: (value?: TimeInput) => number | null;
1183
+ getGeometry: (start?: TimeInput, end?: TimeInput) => {
1184
+ valid: boolean;
1185
+ leftPercent: number;
1186
+ widthPercent: number;
1187
+ };
1188
+ getTimestampPercent: (timestamp?: TimeInput) => {
1189
+ valid: boolean;
1190
+ percent: number;
1191
+ inView: boolean;
1192
+ };
1193
+ getTicksByCount: (tickCount?: number) => TimeViewportHeaderTick[];
1194
+ getTicksByTimeUnit: (tickUnit?: TimeViewportHeaderProps['tickUnit'], tickStep?: number) => TimeViewportHeaderTick[];
1195
+ getTicks: (options?: {
1196
+ tickStrategy?: TimeViewportHeaderProps['tickStrategy'];
1197
+ tickCount?: number;
1198
+ tickUnit?: TimeViewportHeaderProps['tickUnit'];
1199
+ tickStep?: number;
1200
+ }) => TimeViewportHeaderTick[];
1201
+ }
1202
+ declare function useTimeViewport(viewportStart?: TimeInput, viewportEnd?: TimeInput, format?: string): UseTimeViewportDerivedResult;
1203
+ declare function useTimeViewportBlockGeometry(viewportStart?: TimeInput, viewportEnd?: TimeInput): UseTimeViewportBlockGeometryResult;
1204
+ declare function useTimeViewportTicks({ viewportStart, viewportEnd, format, }: Pick<TimeViewportHeaderProps, 'viewportStart' | 'viewportEnd' | 'format'>): UseTimeViewportTicksResult;
1205
+ declare const useTimeViewportHeader: typeof useTimeViewportTicks;
1206
+ /**
1207
+ * A resizable timeline block based on block time range and viewport time range.
1208
+ * Width and offset are automatically derived from datetime overlap.
1209
+ */
1210
+ declare function TimeViewportBlock({ start, end, viewportStart, viewportEnd, height, minWidthPx, borderRadius, colorPalette, background, label, showLabel, hideWhenOutOfView, onClick, }: TimeViewportBlockProps): react_jsx_runtime.JSX.Element | null;
1211
+ /**
1212
+ * Vertical marker line for a timestamp in the current viewport.
1213
+ */
1214
+ declare function TimeViewportMarkerLine({ timestamp, viewportStart, viewportEnd, height, colorPalette, color, lineWidthPx, label, showLabel, hideWhenOutOfView, }: TimeViewportMarkerLineProps): react_jsx_runtime.JSX.Element | null;
1215
+ /**
1216
+ * Header labels for timeline viewport time scale.
1217
+ */
1218
+ declare function TimeViewportHeader({ viewportStart, viewportEnd, tickCount, tickStrategy, tickUnit, tickStep, format, height, color, borderColor, showBottomBorder, animationDurationMs, animationEasing, }: TimeViewportHeaderProps): react_jsx_runtime.JSX.Element | null;
1219
+ /**
1220
+ * Vertical grid lines for measuring block positions in the viewport.
1221
+ * Render inside a relative container that also contains blocks.
1222
+ */
1223
+ declare function TimeViewportGrid({ viewportStart, viewportEnd, tickCount, tickStrategy, tickUnit, tickStep, format, minorDivisions, majorLineColor, minorLineColor, showMinorLines, zIndex, animationDurationMs, animationEasing, }: TimeViewportGridProps): react_jsx_runtime.JSX.Element | null;
1224
+ declare function TimeViewportBlocks({ blocks, viewportStart, viewportEnd, height, minWidthPx, borderRadius, defaultColorPalette, showLabel, hideWhenOutOfView, hideEmptyTracks, gap, allowOverlap, overlapOpacity, renderTrackPrefix, renderTrackSuffix, renderBlock, renderTrack, onBlockClick, virtualize, virtualHeight, overscan, }: TimeViewportBlocksProps): react_jsx_runtime.JSX.Element;
1225
+ declare function TimeRangeZoom({ range, onRangeChange, minDurationMs, maxDurationMs, zoomFactor, resetDurationMs, showResetButton, disabled, labels, }: TimeRangeZoomProps): react_jsx_runtime.JSX.Element;
1226
+ declare function useTimeRangeZoom({ range, onRangeChange, minDurationMs, maxDurationMs, zoomFactor, resetDurationMs, disabled, labels, }: TimeRangeZoomProps): UseTimeRangeZoomResult;
1227
+
1165
1228
  interface RecordDisplayProps {
1166
1229
  object: object | null;
1167
1230
  boxProps?: BoxProps;
@@ -1214,7 +1277,7 @@ declare const DefaultTableServer: ({ isLoading: isLoadingOverride, ...props }: D
1214
1277
  interface DataDisplayProps {
1215
1278
  variant?: 'horizontal' | 'stats' | '';
1216
1279
  }
1217
- declare const DataDisplay: ({ variant }: DataDisplayProps) => react_jsx_runtime.JSX.Element;
1280
+ declare const DataDisplay: ({}: DataDisplayProps) => react_jsx_runtime.JSX.Element;
1218
1281
 
1219
1282
  interface CalendarEvent<TData = unknown> {
1220
1283
  data: TData;
@@ -1422,7 +1485,17 @@ declare module '@tanstack/react-table' {
1422
1485
  * Only applies when canResize={false}.
1423
1486
  */
1424
1487
  responsivePriority?: number;
1488
+ /**
1489
+ * Grid column span for data display layout.
1490
+ * Used in DataDisplay component.
1491
+ */
1492
+ gridColumn?: string | string[];
1493
+ /**
1494
+ * Grid row span for data display layout.
1495
+ * Used in DataDisplay component.
1496
+ */
1497
+ gridRow?: string | object;
1425
1498
  }
1426
1499
  }
1427
1500
 
1428
- export { CalendarDisplay, type CalendarDisplayProps, type CalendarEvent, type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7, type CustomJSONSchema7Definition, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, DatePickerInput, type DatePickerInputProps, type DatePickerLabels, type DatePickerProps, type DateTimePickerLabels, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DefaultTableServer, type DefaultTableServerProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, type EnumPickerLabels, ErrorAlert, type ErrorAlertProps, type ErrorMessageConfig, type ErrorMessageResult, type FieldErrorConfig, type FilePickerLabels, type FilePickerMediaFile, type FilePickerProps, FilterDialog, FormBody, type FormButtonLabels, FormRoot, type FormRootProps, FormTitle, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, type IdPickerLabels, type LoadInitialValuesParams, type LoadInitialValuesResult, MediaLibraryBrowser, type MediaLibraryBrowserProps, PageSizeControl, type PageSizeControlProps, Pagination, type QueryParams, type RangeCalendarProps, type RangeDatePickerLabels, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, type Result, RowCountText, SelectAllRowsToggle, type SelectAllRowsToggleProps, Table, TableBody, type TableBodyProps, TableCardContainer, type TableCardContainerProps, TableCards, type TableCardsProps, TableComponent, TableControls, type TableControlsProps, TableDataDisplay, type TableDataDisplayProps, TableFilter, TableFilterTags, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, type TableHeaderTexts, TableLoadingComponent, type TableLoadingComponentProps, type TableProps, type TableRendererProps, type TableRowSelectorProps, TableSelector, TableSorter, TableViewer, type TagPickerProps, TextCell, type TextCellProps, type TimePickerLabels, type Translate, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, type UseFormProps, type ValidationErrorType, ViewDialog, buildErrorMessages, buildFieldErrors, buildRequiredErrors, convertToAjvErrorsFormat, createErrorMessage, defaultRenderDisplay, getColumns, getMultiDates, getRangeDates, idPickerSanityCheck, useDataTable, useDataTableContext, useDataTableServer, useForm, widthSanityCheck };
1501
+ export { CalendarDisplay, type CalendarDisplayProps, type CalendarEvent, type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7, type CustomJSONSchema7Definition, type CustomQueryFn, type CustomQueryFnParams, type CustomQueryFnResponse, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, DatePickerContext, DatePickerInput, type DatePickerInputProps, type DatePickerLabels, type DatePickerProps, type DateTimePickerLabels, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DefaultTableServer, type DefaultTableServerProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, type EnumPickerLabels, ErrorAlert, type ErrorAlertProps, type FilePickerLabels, type FilePickerMediaFile, FilePickerMediaFileSchema, type FilePickerProps, FilterDialog, FormBody, type FormButtonLabels, FormRoot, type FormRootProps, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetVariantProps, GlobalFilter, type IdPickerLabels, type LoadInitialValuesParams, type LoadInitialValuesResult, MediaLibraryBrowser, type MediaLibraryBrowserProps, PageSizeControl, type PageSizeControlProps, Pagination, type QueryParams, type RangeDatePickerLabels, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, type Result, RowCountText, SelectAllRowsToggle, type SelectAllRowsToggleProps, Table, TableBody, type TableBodyProps, TableCardContainer, type TableCardContainerProps, TableCards, type TableCardsProps, TableComponent, TableControls, type TableControlsProps, TableDataDisplay, type TableDataDisplayProps, TableFilter, TableFilterTags, type TableFilterTagsProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, type TableHeaderTexts, TableLoadingComponent, type TableLoadingComponentProps, type TableProps, type TableRendererProps, type TableRowSelectorProps, TableSelector, TableSorter, TableViewer, TextCell, type TextCellProps, type TimePickerLabels, TimeRangeZoom, type TimeRangeZoomLabels, type TimeRangeZoomProps, TimeViewportBlock, type TimeViewportBlockItem, type TimeViewportBlockProps, type TimeViewportBlockRenderArgs, TimeViewportBlocks, type TimeViewportBlocksProps, TimeViewportGrid, type TimeViewportGridProps, TimeViewportHeader, type TimeViewportHeaderProps, type TimeViewportHeaderTick, TimeViewportMarkerLine, type TimeViewportMarkerLineProps, TimeViewportRoot, type TimeViewportRootProps, type TimeViewportTrackRenderArgs, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, type UseFormProps, type UseTimeRangeZoomResult, type UseTimeViewportBlockGeometryResult, type UseTimeViewportDerivedResult, type UseTimeViewportTicksResult, type ValidationErrorType, ViewDialog, type ViewableTimeRange, defaultRenderDisplay, getMultiDates, getRangeDates, useDataTable, useDataTableContext, useDataTableServer, useForm, useTimeRangeZoom, useTimeViewport, useTimeViewportBlockGeometry, useTimeViewportHeader, useTimeViewportTicks };