@sustaina/shared-ui 1.30.0 → 1.30.2

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.d.mts CHANGED
@@ -369,6 +369,10 @@ declare function booleanToSelectValue(value: boolean | undefined, options?: {
369
369
  fallbackUndefinedValue?: string;
370
370
  }): string;
371
371
  declare function selectValueToBoolean(value: string): boolean | undefined;
372
+ declare function resetVisibleTableState(payload: {
373
+ table: Table$1<any> | null;
374
+ visibility: Record<string, boolean>;
375
+ }): void;
372
376
 
373
377
  type SorterProps = {
374
378
  show?: boolean;
@@ -659,6 +663,16 @@ type TanstackTableInstance = {
659
663
  getAllColumns(): any[];
660
664
  getVisibleLeafColumns(): any[];
661
665
  };
666
+ type SyncColumnsStateOptions<TData> = {
667
+ excludeColumns?: KeyOrString<TData>[];
668
+ labelMap?: Partial<Record<KeyOrString<TData>, string>>;
669
+ visibility?: Partial<Record<KeyOrString<TData>, boolean>>;
670
+ ordering?: KeyOrString<TData>[];
671
+ pinning?: {
672
+ left?: KeyOrString<TData>[];
673
+ };
674
+ };
675
+ type SyncColumnsStateFn = <TData = RowData$1>(table: Table$1<TData>, options?: SyncColumnsStateOptions<TData>) => void;
662
676
  type UseGridSettingsStoreActions = {
663
677
  setAvailableColumns: (cols: Column[]) => void;
664
678
  setCurrentColumns: (cols: Column[]) => void;
@@ -668,11 +682,7 @@ type UseGridSettingsStoreActions = {
668
682
  availableColumns: Column[];
669
683
  currentColumns: Column[];
670
684
  };
671
- syncColumnsState: <TData = RowData$1>(table: Table$1<TData>, options?: {
672
- excludeColumns: KeyOrString<TData>[];
673
- labelMap?: Partial<Record<KeyOrString<TData>, string>>;
674
- visibility?: Record<keyof TData, boolean>;
675
- }) => void;
685
+ syncColumnsState: SyncColumnsStateFn;
676
686
  };
677
687
  type UseGridSettingsStoreState = {
678
688
  availableColumns: Column[];
@@ -1433,4 +1443,16 @@ type UseTruncatedOptions<T> = {
1433
1443
  type UseTruncatedResult = boolean;
1434
1444
  declare const useTruncated: <T extends HTMLElement = any>({ elementRef, onChange, resizeDetectDelay }: UseTruncatedOptions<T>) => UseTruncatedResult;
1435
1445
 
1436
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_SUBNAMESPACE, 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, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type EllipsisConfig, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, Truncated, type TruncatedProps, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, getDialogTemplates, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
1446
+ type ExtractObjects<T> = T extends infer U ? U extends object ? U : never : never;
1447
+ type BrowserNativeObject = Date | FileList | File | null;
1448
+ type EmptyObject = {
1449
+ [K in string | number]: never;
1450
+ };
1451
+ type DeepPartial<T> = T extends BrowserNativeObject ? T : {
1452
+ [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] : DeepPartial<T[K]>;
1453
+ };
1454
+ type DeepPartialNullish<T> = T extends BrowserNativeObject ? T | null : {
1455
+ [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] | null : DeepPartialNullish<T[K]> | null;
1456
+ };
1457
+
1458
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, type BrowserNativeObject, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_SUBNAMESPACE, 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, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, type DeepPartial, type DeepPartialNullish, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, Truncated, type TruncatedProps, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, getDialogTemplates, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
package/dist/index.d.ts CHANGED
@@ -369,6 +369,10 @@ declare function booleanToSelectValue(value: boolean | undefined, options?: {
369
369
  fallbackUndefinedValue?: string;
370
370
  }): string;
371
371
  declare function selectValueToBoolean(value: string): boolean | undefined;
372
+ declare function resetVisibleTableState(payload: {
373
+ table: Table$1<any> | null;
374
+ visibility: Record<string, boolean>;
375
+ }): void;
372
376
 
373
377
  type SorterProps = {
374
378
  show?: boolean;
@@ -659,6 +663,16 @@ type TanstackTableInstance = {
659
663
  getAllColumns(): any[];
660
664
  getVisibleLeafColumns(): any[];
661
665
  };
666
+ type SyncColumnsStateOptions<TData> = {
667
+ excludeColumns?: KeyOrString<TData>[];
668
+ labelMap?: Partial<Record<KeyOrString<TData>, string>>;
669
+ visibility?: Partial<Record<KeyOrString<TData>, boolean>>;
670
+ ordering?: KeyOrString<TData>[];
671
+ pinning?: {
672
+ left?: KeyOrString<TData>[];
673
+ };
674
+ };
675
+ type SyncColumnsStateFn = <TData = RowData$1>(table: Table$1<TData>, options?: SyncColumnsStateOptions<TData>) => void;
662
676
  type UseGridSettingsStoreActions = {
663
677
  setAvailableColumns: (cols: Column[]) => void;
664
678
  setCurrentColumns: (cols: Column[]) => void;
@@ -668,11 +682,7 @@ type UseGridSettingsStoreActions = {
668
682
  availableColumns: Column[];
669
683
  currentColumns: Column[];
670
684
  };
671
- syncColumnsState: <TData = RowData$1>(table: Table$1<TData>, options?: {
672
- excludeColumns: KeyOrString<TData>[];
673
- labelMap?: Partial<Record<KeyOrString<TData>, string>>;
674
- visibility?: Record<keyof TData, boolean>;
675
- }) => void;
685
+ syncColumnsState: SyncColumnsStateFn;
676
686
  };
677
687
  type UseGridSettingsStoreState = {
678
688
  availableColumns: Column[];
@@ -1433,4 +1443,16 @@ type UseTruncatedOptions<T> = {
1433
1443
  type UseTruncatedResult = boolean;
1434
1444
  declare const useTruncated: <T extends HTMLElement = any>({ elementRef, onChange, resizeDetectDelay }: UseTruncatedOptions<T>) => UseTruncatedResult;
1435
1445
 
1436
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_SUBNAMESPACE, 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, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type EllipsisConfig, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, Truncated, type TruncatedProps, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, getDialogTemplates, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
1446
+ type ExtractObjects<T> = T extends infer U ? U extends object ? U : never : never;
1447
+ type BrowserNativeObject = Date | FileList | File | null;
1448
+ type EmptyObject = {
1449
+ [K in string | number]: never;
1450
+ };
1451
+ type DeepPartial<T> = T extends BrowserNativeObject ? T : {
1452
+ [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] : DeepPartial<T[K]>;
1453
+ };
1454
+ type DeepPartialNullish<T> = T extends BrowserNativeObject ? T | null : {
1455
+ [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] | null : DeepPartialNullish<T[K]> | null;
1456
+ };
1457
+
1458
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, type BrowserNativeObject, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_SUBNAMESPACE, 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, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, type DeepPartial, type DeepPartialNullish, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, Truncated, type TruncatedProps, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, getDialogTemplates, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
package/dist/index.js CHANGED
@@ -3143,6 +3143,9 @@ var normalizeBetween = (startValue, endValue) => {
3143
3143
  };
3144
3144
  var DatetimeBuilder = class {
3145
3145
  build(row) {
3146
+ if (Array.isArray(row.value)) {
3147
+ return {};
3148
+ }
3146
3149
  try {
3147
3150
  const baseDate = new Date(row.value);
3148
3151
  if (Number.isNaN(baseDate.getTime())) return {};
@@ -3201,6 +3204,9 @@ var parseMonth = (value) => {
3201
3204
  var toMonthToken = (date) => dateFns.format(date, "yyyy-MM");
3202
3205
  var DateMonthBuilder = class {
3203
3206
  build(row) {
3207
+ if (Array.isArray(row.value)) {
3208
+ return {};
3209
+ }
3204
3210
  const month = parseMonth(row.value);
3205
3211
  const sharedOptions = { multiTableSearch: row.multiTableSearch };
3206
3212
  switch (row.operator) {
@@ -3371,7 +3377,7 @@ var TextBuilder = class {
3371
3377
  { equals: row.value },
3372
3378
  {
3373
3379
  multiTableSearch: row.multiTableSearch,
3374
- insensitive: true
3380
+ insensitive: false
3375
3381
  }
3376
3382
  )
3377
3383
  };
@@ -3401,7 +3407,7 @@ var TextBuilder = class {
3401
3407
  { not: row.value },
3402
3408
  {
3403
3409
  multiTableSearch: row.multiTableSearch,
3404
- insensitive: true
3410
+ insensitive: false
3405
3411
  }
3406
3412
  )
3407
3413
  };
@@ -3445,6 +3451,9 @@ var TextBuilder = class {
3445
3451
  var regex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
3446
3452
  var UUIDBuilder = class {
3447
3453
  build(row) {
3454
+ if (Array.isArray(row.value)) {
3455
+ return {};
3456
+ }
3448
3457
  if (!regex.test(row.value)) {
3449
3458
  return { [row.fieldName]: {} };
3450
3459
  }
@@ -3852,6 +3861,15 @@ function selectValueToBoolean(value) {
3852
3861
  if (value === "false") return false;
3853
3862
  return void 0;
3854
3863
  }
3864
+ function resetVisibleTableState(payload) {
3865
+ const { table, visibility } = payload;
3866
+ if (!table) return;
3867
+ table.setColumnVisibility(visibility);
3868
+ const isVisible = (id) => payload.visibility?.[id] === true;
3869
+ const prevState = table.getState();
3870
+ table.setColumnFilters(prevState.columnFilters.filter((f) => isVisible(f.id)));
3871
+ table.setSorting(prevState.sorting.filter((s) => isVisible(s.id)));
3872
+ }
3855
3873
  var useHover = () => {
3856
3874
  const [hovering, setHovering] = React4.useState(false);
3857
3875
  const prevRef = React4.useRef(null);
@@ -6898,8 +6916,15 @@ var useGridSettingsStore = zustand.create(
6898
6916
  return { availableColumns, currentColumns };
6899
6917
  },
6900
6918
  syncColumnsState: (table, options) => {
6919
+ const {
6920
+ excludeColumns = [],
6921
+ labelMap = {},
6922
+ visibility = {},
6923
+ ordering = [],
6924
+ pinning
6925
+ } = options || {};
6901
6926
  const { availableColumns, currentColumns } = get().extractColumns(table);
6902
- const { excludeColumns = [], labelMap = {}, visibility = {} } = options || {};
6927
+ const orderMap = new Map(ordering.map((columnId, index) => [columnId, index]));
6903
6928
  const filteredExcludeColumnFn = (column) => !excludeColumns.includes(column.id);
6904
6929
  const mapLabel = (col) => ({
6905
6930
  id: col.id,
@@ -6914,7 +6939,20 @@ var useGridSettingsStore = zustand.create(
6914
6939
  }
6915
6940
  }
6916
6941
  return true;
6917
- }).map(mapLabel)
6942
+ }).map(mapLabel).sort((a, b) => {
6943
+ const columnIdA = a.id;
6944
+ const columnIdB = b.id;
6945
+ const aOrder = orderMap.get(columnIdA) ?? Infinity;
6946
+ const bOrder = orderMap.get(columnIdB) ?? Infinity;
6947
+ return aOrder - bOrder;
6948
+ }),
6949
+ payload: {
6950
+ ordering,
6951
+ pinning: {
6952
+ left: pinning?.left || []
6953
+ },
6954
+ visibility
6955
+ }
6918
6956
  });
6919
6957
  }
6920
6958
  })
@@ -10245,6 +10283,7 @@ exports.isValidParentheses = isValidParentheses;
10245
10283
  exports.mapTokensToOutput = mapTokensToOutput;
10246
10284
  exports.parseFormula = parseFormula;
10247
10285
  exports.parseFormulaToToken = parseFormulaToToken;
10286
+ exports.resetVisibleTableState = resetVisibleTableState;
10248
10287
  exports.selectValueToBoolean = selectValueToBoolean;
10249
10288
  exports.spinnerVariants = spinnerVariants;
10250
10289
  exports.splitOperators = splitOperators;