@natoora-libs/core 0.0.42 → 0.0.44

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,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { ReactNode, ComponentType, FC, ComponentProps, SVGProps } from 'react';
2
+ import { ReactNode, ComponentType, FC, ComponentProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { RefetchOptions, RefetchQueryFilters, QueryObserverResult, UseMutateAsyncFunction } from 'react-query';
5
4
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
5
+ import { UseMutateAsyncFunction } from 'react-query';
6
6
  import { MenuProps, Typography } from '@mui/material';
7
7
  import { DateRangePickerShape } from 'react-dates';
8
8
 
@@ -38,93 +38,6 @@ interface IAppLabel {
38
38
  }
39
39
  declare const AppLabel: ({ appName }: IAppLabel) => react_jsx_runtime.JSX.Element;
40
40
 
41
- /**
42
- * Base type for autocomplete options. Requires an id and name property.
43
- */
44
- type DefaultOption = {
45
- id: number;
46
- name: string;
47
- };
48
- interface AutocompleteProps<Option = DefaultOption> {
49
- /**
50
- * The currently selected value in the autocomplete.
51
- * Can be undefined if no value is selected.
52
- */
53
- value?: Option;
54
- /**
55
- * The initial value to display in the autocomplete when first rendered.
56
- */
57
- defaultValue?: Option;
58
- /**
59
- * An array of options to display in the dropdown list.
60
- */
61
- options?: Option[];
62
- /**
63
- * The minimum number of characters required in the input
64
- * before triggering a search. Defaults to 3.
65
- */
66
- minInputLength?: number;
67
- /**
68
- * A boolean indicating whether the component is currently fetching data.
69
- * When true, displays a loading spinner.
70
- */
71
- isFetching?: boolean;
72
- /**
73
- * The label text displayed above the input field.
74
- */
75
- inputLabel?: string;
76
- /**
77
- * Helper text displayed below the input field.
78
- */
79
- helperText?: string;
80
- /**
81
- * The data-testid attribute used for testing purposes.
82
- */
83
- 'data-testid'?: string;
84
- /**
85
- * A boolean indicating whether the autocomplete is disabled.
86
- */
87
- disabled?: boolean;
88
- /**
89
- * A boolean indicating whether the field can receive empty (null) values.
90
- * This allows the field to be cleared and grants behavior control for null values.
91
- */
92
- allowEmpty?: boolean;
93
- /**
94
- * A function to fetch options from an API or other data source.
95
- * Returns a Promise with QueryObserverResult.
96
- */
97
- fetchOptions?: <TPageData>(options?: (RefetchOptions & RefetchQueryFilters<TPageData>) | undefined) => Promise<QueryObserverResult<any, unknown>>;
98
- /**
99
- * Callback function called when the input loses focus.
100
- * Receives the current selected value as an argument.
101
- */
102
- submitOnBlur?: (value: Option) => void;
103
- /**
104
- * Callback function called when the selected value changes.
105
- * Receives the new selected value or null as an argument.
106
- */
107
- onChange: (value: Option | null) => void;
108
- /**
109
- * The current value of the search input field.
110
- */
111
- searchInputValue: string;
112
- /**
113
- * State setter function for updating the search input value.
114
- */
115
- setSearchInputValue: React.Dispatch<React.SetStateAction<string>>;
116
- /**
117
- * Optional function to customize how options are displayed in the dropdown.
118
- * If not provided, defaults to using the option's name property.
119
- */
120
- getOptionLabel?: ((option: Option) => string) | undefined;
121
- error?: boolean;
122
- disableClearable?: boolean;
123
- }
124
- declare const _default$n: <Option extends any>(props: AutocompleteProps<Option> & {
125
- ref?: React.Ref<any>;
126
- }) => React.JSX.Element;
127
-
128
41
  interface BackHeaderProps {
129
42
  appName: string;
130
43
  onGoBackClick?: () => void;
@@ -159,7 +72,7 @@ interface IExtendedButton {
159
72
  subcopy?: string;
160
73
  tooltip?: string;
161
74
  component?: React.ElementType;
162
- 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';
163
76
  variant?: 'contained' | 'outlined' | 'text';
164
77
  copyColor?: string;
165
78
  }
@@ -1028,8 +941,9 @@ type Props = {
1028
941
  imageLogoLightSmall: string;
1029
942
  handleOpen: () => void;
1030
943
  LeftDrawer: ReactNode;
944
+ rightSection?: ReactNode;
1031
945
  };
1032
- declare const _default$1: React.MemoExoticComponent<({ imageLogoDarkSmall, imageLogoLightSmall, handleOpen, LeftDrawer, }: Props) => react_jsx_runtime.JSX.Element>;
946
+ declare const _default$1: React.MemoExoticComponent<({ imageLogoDarkSmall, imageLogoLightSmall, handleOpen, LeftDrawer, rightSection, }: Props) => react_jsx_runtime.JSX.Element>;
1033
947
 
1034
948
  type IToastMessage = {
1035
949
  toastType: 'success' | 'info' | 'warning' | 'error';
@@ -1083,8 +997,4 @@ type UserBustProps = {
1083
997
  };
1084
998
  declare const _default: React.MemoExoticComponent<({ user, avatarProps, typographyProps }: UserBustProps) => react_jsx_runtime.JSX.Element>;
1085
999
 
1086
- declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1087
-
1088
- declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1089
-
1090
- export { AlertDialog, AlertDialogFullScreen, AppLabel, _default$n as Autocomplete, BackHeader, BottomBar, _default$m as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$e as DeleteSubstitutionDialogContent, _default$d as DeleteUserDialogContent, _default$l as ExtendedButton, FileCard, _default$k as FilledButton, _default$j as FilledButtonLg, _default$c as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$b as FixedFooter, Header, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$i as ImageButton, _default$a as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$9 as NumpadInput, NumpadPlus, _default$h as OutlinedButton, _default$g as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$f as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$8 as SearchAndFilterHeaderForTable, _default$7 as SearchWithFilters, _default$6 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, SquareButton, _default$5 as SquareLabel, _default$4 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
1000
+ export { AlertDialog, AlertDialogFullScreen, AppLabel, BackHeader, BottomBar, _default$m as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$e as DeleteSubstitutionDialogContent, _default$d as DeleteUserDialogContent, _default$l as ExtendedButton, FileCard, _default$k as FilledButton, _default$j as FilledButtonLg, _default$c as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$b as FixedFooter, Header, _default$i as ImageButton, _default$a as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$9 as NumpadInput, NumpadPlus, _default$h as OutlinedButton, _default$g as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$f as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$8 as SearchAndFilterHeaderForTable, _default$7 as SearchWithFilters, _default$6 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, SquareButton, _default$5 as SquareLabel, _default$4 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { ReactNode, ComponentType, FC, ComponentProps, SVGProps } from 'react';
2
+ import { ReactNode, ComponentType, FC, ComponentProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { RefetchOptions, RefetchQueryFilters, QueryObserverResult, UseMutateAsyncFunction } from 'react-query';
5
4
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
5
+ import { UseMutateAsyncFunction } from 'react-query';
6
6
  import { MenuProps, Typography } from '@mui/material';
7
7
  import { DateRangePickerShape } from 'react-dates';
8
8
 
@@ -38,93 +38,6 @@ interface IAppLabel {
38
38
  }
39
39
  declare const AppLabel: ({ appName }: IAppLabel) => react_jsx_runtime.JSX.Element;
40
40
 
41
- /**
42
- * Base type for autocomplete options. Requires an id and name property.
43
- */
44
- type DefaultOption = {
45
- id: number;
46
- name: string;
47
- };
48
- interface AutocompleteProps<Option = DefaultOption> {
49
- /**
50
- * The currently selected value in the autocomplete.
51
- * Can be undefined if no value is selected.
52
- */
53
- value?: Option;
54
- /**
55
- * The initial value to display in the autocomplete when first rendered.
56
- */
57
- defaultValue?: Option;
58
- /**
59
- * An array of options to display in the dropdown list.
60
- */
61
- options?: Option[];
62
- /**
63
- * The minimum number of characters required in the input
64
- * before triggering a search. Defaults to 3.
65
- */
66
- minInputLength?: number;
67
- /**
68
- * A boolean indicating whether the component is currently fetching data.
69
- * When true, displays a loading spinner.
70
- */
71
- isFetching?: boolean;
72
- /**
73
- * The label text displayed above the input field.
74
- */
75
- inputLabel?: string;
76
- /**
77
- * Helper text displayed below the input field.
78
- */
79
- helperText?: string;
80
- /**
81
- * The data-testid attribute used for testing purposes.
82
- */
83
- 'data-testid'?: string;
84
- /**
85
- * A boolean indicating whether the autocomplete is disabled.
86
- */
87
- disabled?: boolean;
88
- /**
89
- * A boolean indicating whether the field can receive empty (null) values.
90
- * This allows the field to be cleared and grants behavior control for null values.
91
- */
92
- allowEmpty?: boolean;
93
- /**
94
- * A function to fetch options from an API or other data source.
95
- * Returns a Promise with QueryObserverResult.
96
- */
97
- fetchOptions?: <TPageData>(options?: (RefetchOptions & RefetchQueryFilters<TPageData>) | undefined) => Promise<QueryObserverResult<any, unknown>>;
98
- /**
99
- * Callback function called when the input loses focus.
100
- * Receives the current selected value as an argument.
101
- */
102
- submitOnBlur?: (value: Option) => void;
103
- /**
104
- * Callback function called when the selected value changes.
105
- * Receives the new selected value or null as an argument.
106
- */
107
- onChange: (value: Option | null) => void;
108
- /**
109
- * The current value of the search input field.
110
- */
111
- searchInputValue: string;
112
- /**
113
- * State setter function for updating the search input value.
114
- */
115
- setSearchInputValue: React.Dispatch<React.SetStateAction<string>>;
116
- /**
117
- * Optional function to customize how options are displayed in the dropdown.
118
- * If not provided, defaults to using the option's name property.
119
- */
120
- getOptionLabel?: ((option: Option) => string) | undefined;
121
- error?: boolean;
122
- disableClearable?: boolean;
123
- }
124
- declare const _default$n: <Option extends any>(props: AutocompleteProps<Option> & {
125
- ref?: React.Ref<any>;
126
- }) => React.JSX.Element;
127
-
128
41
  interface BackHeaderProps {
129
42
  appName: string;
130
43
  onGoBackClick?: () => void;
@@ -159,7 +72,7 @@ interface IExtendedButton {
159
72
  subcopy?: string;
160
73
  tooltip?: string;
161
74
  component?: React.ElementType;
162
- 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';
163
76
  variant?: 'contained' | 'outlined' | 'text';
164
77
  copyColor?: string;
165
78
  }
@@ -1028,8 +941,9 @@ type Props = {
1028
941
  imageLogoLightSmall: string;
1029
942
  handleOpen: () => void;
1030
943
  LeftDrawer: ReactNode;
944
+ rightSection?: ReactNode;
1031
945
  };
1032
- declare const _default$1: React.MemoExoticComponent<({ imageLogoDarkSmall, imageLogoLightSmall, handleOpen, LeftDrawer, }: Props) => react_jsx_runtime.JSX.Element>;
946
+ declare const _default$1: React.MemoExoticComponent<({ imageLogoDarkSmall, imageLogoLightSmall, handleOpen, LeftDrawer, rightSection, }: Props) => react_jsx_runtime.JSX.Element>;
1033
947
 
1034
948
  type IToastMessage = {
1035
949
  toastType: 'success' | 'info' | 'warning' | 'error';
@@ -1083,8 +997,4 @@ type UserBustProps = {
1083
997
  };
1084
998
  declare const _default: React.MemoExoticComponent<({ user, avatarProps, typographyProps }: UserBustProps) => react_jsx_runtime.JSX.Element>;
1085
999
 
1086
- declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1087
-
1088
- declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1089
-
1090
- export { AlertDialog, AlertDialogFullScreen, AppLabel, _default$n as Autocomplete, BackHeader, BottomBar, _default$m as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$e as DeleteSubstitutionDialogContent, _default$d as DeleteUserDialogContent, _default$l as ExtendedButton, FileCard, _default$k as FilledButton, _default$j as FilledButtonLg, _default$c as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$b as FixedFooter, Header, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$i as ImageButton, _default$a as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$9 as NumpadInput, NumpadPlus, _default$h as OutlinedButton, _default$g as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$f as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$8 as SearchAndFilterHeaderForTable, _default$7 as SearchWithFilters, _default$6 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, SquareButton, _default$5 as SquareLabel, _default$4 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
1000
+ export { AlertDialog, AlertDialogFullScreen, AppLabel, BackHeader, BottomBar, _default$m as BoxButton, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$e as DeleteSubstitutionDialogContent, _default$d as DeleteUserDialogContent, _default$l as ExtendedButton, FileCard, _default$k as FilledButton, _default$j as FilledButtonLg, _default$c as FilledLabel, FilterGroupSelector, FilterSimpleSelector, _default$b as FixedFooter, Header, _default$i as ImageButton, _default$a as LeftDrawer, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$9 as NumpadInput, NumpadPlus, _default$h as OutlinedButton, _default$g as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$f as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$8 as SearchAndFilterHeaderForTable, _default$7 as SearchWithFilters, _default$6 as SearchWithFiltersForTable, SectionName, SmartSelect, _default$3 as SmartTableHeader, SquareButton, _default$5 as SquareLabel, _default$4 as Switch, Table, TableDesktop, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };