@natoora-libs/core 0.1.4 → 0.1.5

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.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { ReactNode, ComponentType, MouseEvent, ChangeEvent, FC, ComponentProps, SVGProps } from 'react';
2
+ import React__default, { ReactNode, ComponentType, MouseEvent, ChangeEvent, FC, ComponentProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
5
5
  import { UseMutateAsyncFunction, UseQueryResult } from 'react-query';
@@ -72,7 +72,7 @@ interface IExtendedButton {
72
72
  subcopy?: string;
73
73
  tooltip?: string;
74
74
  component?: React.ElementType;
75
- type?: 'add' | 'apps' | 'childCare' | 'delete' | 'edit' | 'importExport' | 'notes' | 'print' | 'save' | 'upload' | 'refresh' | 'download' | 'publish' | 'compare';
75
+ type?: 'add' | 'apps' | 'childCare' | 'delete' | 'edit' | 'importExport' | 'notes' | 'print' | 'save' | 'upload' | 'refresh' | 'download' | 'publish';
76
76
  variant?: 'contained' | 'outlined' | 'text';
77
77
  copyColor?: string;
78
78
  }
@@ -863,6 +863,7 @@ type HeadCell = {
863
863
  label?: string;
864
864
  numeric?: boolean;
865
865
  disablePadding?: boolean;
866
+ width?: number | string;
866
867
  enabled?: boolean;
867
868
  renderHeader?: ReactNode;
868
869
  filterOptionsQuery?: UseQueryResult<unknown[], unknown>;
@@ -884,14 +885,17 @@ interface ITableDesktopProps {
884
885
  handleClickOnClearFiltersButton?: () => void;
885
886
  deleteItem?: (id: string) => void;
886
887
  keyField?: string;
888
+ tableLayout?: 'fixed' | 'auto';
887
889
  onApplyFilters?: (updatedFilters: HeaderFilters, shouldSave: boolean) => void;
890
+ shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
888
891
  }
889
- declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, onApplyFilters, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
892
+ declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, tableLayout, onApplyFilters, shouldShowCheckOnFilter, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
890
893
 
891
894
  interface SmartTableHeaderFilterMenuProps {
892
895
  headCell: HeadCell;
893
896
  headerFilters: HeaderFilters;
894
- hasActiveFilters: boolean;
897
+ numActiveFilters: number;
898
+ shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
895
899
  onApplyFilters?: (...args: unknown[]) => void;
896
900
  }
897
901
  declare const _default$4: React__default.NamedExoticComponent<SmartTableHeaderFilterMenuProps>;
@@ -907,6 +911,7 @@ interface SmartTableHeaderProps {
907
911
  onRequestSort: (event: MouseEvent<unknown>, property: string) => void;
908
912
  onSelectAllClick: (event: ChangeEvent<HTMLInputElement>) => void;
909
913
  onApplyFilters?: (...args: unknown[]) => void;
914
+ shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
910
915
  }
911
916
  declare const _default$3: React.NamedExoticComponent<SmartTableHeaderProps>;
912
917
 
@@ -1028,8 +1033,4 @@ type UserBustProps = {
1028
1033
  };
1029
1034
  declare const _default: React.MemoExoticComponent<({ user, avatarProps, typographyProps }: UserBustProps) => react_jsx_runtime.JSX.Element>;
1030
1035
 
1031
- declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1032
-
1033
- declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1034
-
1035
- export { AlertDialog, AlertDialogFullScreen, AppLabel, BackHeader, BottomBar, _default$n as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$f as DeleteSubstitutionDialogContent, _default$e as DeleteUserDialogContent, _default$m as ExtendedButton, FileCard, _default$l as FilledButton, _default$k as FilledButtonLg, _default$d as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$c as FixedFooter, type HeadCell, Header, type HeaderFilterObject, type HeaderFilterOptions, type HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$j as ImageButton, _default$b as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$a as NumpadInput, NumpadPlus, type Order, _default$i as OutlinedButton, _default$h as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$g as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$9 as SearchAndFilterHeaderForTable, _default$8 as SearchWithFilters, _default$7 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, _default$4 as SmartTableHeaderFilterMenu, SquareButton, _default$6 as SquareLabel, _default$5 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
1036
+ export { AlertDialog, AlertDialogFullScreen, AppLabel, BackHeader, BottomBar, _default$n as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$f as DeleteSubstitutionDialogContent, _default$e as DeleteUserDialogContent, _default$m as ExtendedButton, FileCard, _default$l as FilledButton, _default$k as FilledButtonLg, _default$d as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$c as FixedFooter, type HeadCell, Header, type HeaderFilterObject, type HeaderFilterOptions, type HeaderFilters, _default$j as ImageButton, _default$b as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$a as NumpadInput, NumpadPlus, type Order, _default$i as OutlinedButton, _default$h as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$g as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$9 as SearchAndFilterHeaderForTable, _default$8 as SearchWithFilters, _default$7 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, _default$4 as SmartTableHeaderFilterMenu, SquareButton, _default$6 as SquareLabel, _default$5 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { ReactNode, ComponentType, MouseEvent, ChangeEvent, FC, ComponentProps, SVGProps } from 'react';
2
+ import React__default, { ReactNode, ComponentType, MouseEvent, ChangeEvent, FC, ComponentProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
5
5
  import { UseMutateAsyncFunction, UseQueryResult } from 'react-query';
@@ -72,7 +72,7 @@ interface IExtendedButton {
72
72
  subcopy?: string;
73
73
  tooltip?: string;
74
74
  component?: React.ElementType;
75
- type?: 'add' | 'apps' | 'childCare' | 'delete' | 'edit' | 'importExport' | 'notes' | 'print' | 'save' | 'upload' | 'refresh' | 'download' | 'publish' | 'compare';
75
+ type?: 'add' | 'apps' | 'childCare' | 'delete' | 'edit' | 'importExport' | 'notes' | 'print' | 'save' | 'upload' | 'refresh' | 'download' | 'publish';
76
76
  variant?: 'contained' | 'outlined' | 'text';
77
77
  copyColor?: string;
78
78
  }
@@ -863,6 +863,7 @@ type HeadCell = {
863
863
  label?: string;
864
864
  numeric?: boolean;
865
865
  disablePadding?: boolean;
866
+ width?: number | string;
866
867
  enabled?: boolean;
867
868
  renderHeader?: ReactNode;
868
869
  filterOptionsQuery?: UseQueryResult<unknown[], unknown>;
@@ -884,14 +885,17 @@ interface ITableDesktopProps {
884
885
  handleClickOnClearFiltersButton?: () => void;
885
886
  deleteItem?: (id: string) => void;
886
887
  keyField?: string;
888
+ tableLayout?: 'fixed' | 'auto';
887
889
  onApplyFilters?: (updatedFilters: HeaderFilters, shouldSave: boolean) => void;
890
+ shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
888
891
  }
889
- declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, onApplyFilters, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
892
+ declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, tableLayout, onApplyFilters, shouldShowCheckOnFilter, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
890
893
 
891
894
  interface SmartTableHeaderFilterMenuProps {
892
895
  headCell: HeadCell;
893
896
  headerFilters: HeaderFilters;
894
- hasActiveFilters: boolean;
897
+ numActiveFilters: number;
898
+ shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
895
899
  onApplyFilters?: (...args: unknown[]) => void;
896
900
  }
897
901
  declare const _default$4: React__default.NamedExoticComponent<SmartTableHeaderFilterMenuProps>;
@@ -907,6 +911,7 @@ interface SmartTableHeaderProps {
907
911
  onRequestSort: (event: MouseEvent<unknown>, property: string) => void;
908
912
  onSelectAllClick: (event: ChangeEvent<HTMLInputElement>) => void;
909
913
  onApplyFilters?: (...args: unknown[]) => void;
914
+ shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
910
915
  }
911
916
  declare const _default$3: React.NamedExoticComponent<SmartTableHeaderProps>;
912
917
 
@@ -1028,8 +1033,4 @@ type UserBustProps = {
1028
1033
  };
1029
1034
  declare const _default: React.MemoExoticComponent<({ user, avatarProps, typographyProps }: UserBustProps) => react_jsx_runtime.JSX.Element>;
1030
1035
 
1031
- declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1032
-
1033
- declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1034
-
1035
- export { AlertDialog, AlertDialogFullScreen, AppLabel, BackHeader, BottomBar, _default$n as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$f as DeleteSubstitutionDialogContent, _default$e as DeleteUserDialogContent, _default$m as ExtendedButton, FileCard, _default$l as FilledButton, _default$k as FilledButtonLg, _default$d as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$c as FixedFooter, type HeadCell, Header, type HeaderFilterObject, type HeaderFilterOptions, type HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$j as ImageButton, _default$b as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$a as NumpadInput, NumpadPlus, type Order, _default$i as OutlinedButton, _default$h as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$g as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$9 as SearchAndFilterHeaderForTable, _default$8 as SearchWithFilters, _default$7 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, _default$4 as SmartTableHeaderFilterMenu, SquareButton, _default$6 as SquareLabel, _default$5 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
1036
+ export { AlertDialog, AlertDialogFullScreen, AppLabel, BackHeader, BottomBar, _default$n as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$f as DeleteSubstitutionDialogContent, _default$e as DeleteUserDialogContent, _default$m as ExtendedButton, FileCard, _default$l as FilledButton, _default$k as FilledButtonLg, _default$d as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$c as FixedFooter, type HeadCell, Header, type HeaderFilterObject, type HeaderFilterOptions, type HeaderFilters, _default$j as ImageButton, _default$b as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$a as NumpadInput, NumpadPlus, type Order, _default$i as OutlinedButton, _default$h as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$g as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$9 as SearchAndFilterHeaderForTable, _default$8 as SearchWithFilters, _default$7 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, _default$4 as SmartTableHeaderFilterMenu, SquareButton, _default$6 as SquareLabel, _default$5 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };