1mpacto-react-ui 0.0.38 → 0.0.40

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,4 +1,4 @@
1
1
  import { IFilterContainer } from '../../interfaces/components/FilterContainer';
2
2
 
3
- declare const FilterContainer: ({ children, onChange, prefixNativeValue, defaultNativeValue, defaultValue, mountedExecuteChange, }: IFilterContainer) => import("react/jsx-runtime").JSX.Element;
3
+ declare const FilterContainer: ({ children, onChange, prefixNativeValue, defaultNativeValue, defaultValue, mountedExecuteChange, syncMultiFilterContainer, }: IFilterContainer) => import("react/jsx-runtime").JSX.Element;
4
4
  export default FilterContainer;
@@ -2,6 +2,6 @@ import { ForwardedRef } from 'react';
2
2
  import { IRefSelectDropdownContainer, ISelectDropdownContainer } from '../../interfaces/components/SelectDropdownContainer';
3
3
 
4
4
  declare const SelectDropdownContainer: <T>(props: ISelectDropdownContainer<T> & {
5
- ref?: ForwardedRef<IRefSelectDropdownContainer>;
5
+ ref?: ForwardedRef<IRefSelectDropdownContainer<T>>;
6
6
  }) => JSX.Element;
7
7
  export default SelectDropdownContainer;
@@ -21,4 +21,5 @@ export interface IFilterContainer {
21
21
  defaultValue?: IMergeState;
22
22
  defaultNativeValue?: IMergeState;
23
23
  mountedExecuteChange?: boolean;
24
+ syncMultiFilterContainer?: boolean;
24
25
  }
@@ -4,15 +4,15 @@ import { AutoPlacementOptions, FlipOptions, OffsetOptions, UseFloatingOptions }
4
4
 
5
5
  export interface ISelectDropdownContainer<T> extends Omit<SelectProps<T, boolean, GroupBase<T>>, 'onChange' | 'getOptionLabel'> {
6
6
  width?: number | string;
7
- children: ((params: IChildrenSelectDropdownContainer) => ReactNode) | ((params: IChildrenSelectDropdownContainer) => ReactNode[]);
7
+ children: ((params: IChildrenSelectDropdownContainer<T>) => ReactNode) | ((params: IChildrenSelectDropdownContainer<T>) => ReactNode[]);
8
8
  classNameContainer?: string;
9
9
  classNameContainerShowSelect?: string;
10
10
  classNameContainerSelect?: string;
11
11
  classNameLabelError?: string;
12
12
  error?: string;
13
- onChange?: (newValue: MultiValue<T> | SingleValue<T>, actionMeta: ActionMeta<T>) => void;
13
+ onChange?: (newValue: MultiValue<T> | SingleValue<T> | T | T[] | object, actionMeta: ActionMeta<T>) => void;
14
14
  externalValue?: boolean;
15
- defaultValueButtonDropdown?: object | unknown[];
15
+ defaultValueButtonDropdown?: object | T | T[];
16
16
  autoClose?: boolean;
17
17
  onMenuOpen?: () => void;
18
18
  autoCloseOutside?: boolean;
@@ -31,19 +31,19 @@ export interface ISelectDropdownContainer<T> extends Omit<SelectProps<T, boolean
31
31
  selectProps?: object;
32
32
  offsetPopover?: OffsetOptions;
33
33
  }
34
- export interface IChildrenSelectDropdownContainer {
35
- selectValue: unknown;
36
- setSelectValue: React.Dispatch<unknown>;
34
+ export interface IChildrenSelectDropdownContainer<T> {
35
+ selectValue: T | T[] | object;
36
+ setSelectValue: React.Dispatch<React.SetStateAction<T>>;
37
37
  handlerClose: () => void;
38
- handlerShow: <T extends HTMLElement>(e: React.MouseEvent<T, unknown>) => void;
38
+ handlerShow: <U extends HTMLElement>(e: React.MouseEvent<U, unknown>) => void;
39
39
  show: boolean;
40
40
  setShow: React.Dispatch<React.SetStateAction<boolean>>;
41
41
  }
42
- export interface IRefSelectDropdownContainer {
43
- selectValue: unknown;
44
- setSelectValue: React.Dispatch<React.SetStateAction<object | unknown[]>>;
42
+ export interface IRefSelectDropdownContainer<T> {
43
+ selectValue: T | T[] | object;
44
+ setSelectValue: React.Dispatch<React.SetStateAction<T>>;
45
45
  handlerClose: () => void;
46
- handlerShow: <T extends HTMLElement>(e: React.MouseEvent<T, unknown>) => void;
46
+ handlerShow: <U extends HTMLElement>(e: React.MouseEvent<U, unknown>) => void;
47
47
  show: boolean;
48
48
  setShow: React.Dispatch<React.SetStateAction<boolean>>;
49
49
  }
@@ -1,4 +1,4 @@
1
- import { Table as ITableTanstack, Row, RowData, ColumnDef } from '@tanstack/react-table';
1
+ import { Table as ITableTanstack, Row, ColumnDef } from '@tanstack/react-table';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
3
  import { ITableVirtualization, IWrapperProps } from '../Virtualization/TableVirtualization';
4
4
 
@@ -8,7 +8,7 @@ export interface ITable<T = unknown> {
8
8
  classNameWrapperTable?: string;
9
9
  classNameTable?: string;
10
10
  collapseAll?: boolean;
11
- handlerRowClick?: (original: RowData, row: Row<T>) => void;
11
+ handlerRowClick?: (original: T, row: Row<T>) => void;
12
12
  privillageRowClick?: boolean;
13
13
  virtualization?: boolean;
14
14
  virtualizationProps?: IVirtualizationProps;
@@ -25,7 +25,7 @@ export interface INonVirtualization<T = unknown> {
25
25
  tableInstance: ITableTanstack<T>;
26
26
  classNameWrapperTable?: string;
27
27
  classNameTable?: string;
28
- handlerRowClick?: (original: RowData, row: Row<T>) => void;
28
+ handlerRowClick?: (original: T, row: Row<T>) => void;
29
29
  privillageRowClick?: boolean;
30
30
  headerId?: string;
31
31
  tbodyTrId: (row: Row<T>) => string | undefined;
@@ -43,7 +43,7 @@ export interface IVirtualizationProps extends Omit<ITableVirtualization, 'typeHi
43
43
  export interface IVirtualization<T = unknown> {
44
44
  tableInstance: ITableTanstack<T>;
45
45
  classNameWrapperTable?: string;
46
- handlerRowClick?: (original: RowData, row: Row<T>) => void;
46
+ handlerRowClick?: (original: T, row: Row<T>) => void;
47
47
  privillageRowClick?: boolean;
48
48
  virtualizationProps?: IVirtualizationProps;
49
49
  headerId?: string;
@@ -1,4 +1,5 @@
1
1
  import { TDateType } from '../interfaces/components/Calendar';
2
+ import { IMergeState } from '../interfaces/components/FilterContainer';
2
3
 
3
4
  export declare function formatNumber(number: number, style?: 'currency' | 'decimal', options?: {
4
5
  minimumFractionDigits: number;
@@ -13,3 +14,4 @@ export declare const transformDataHistory: <T extends {
13
14
  date: string | Date;
14
15
  }>(value: T[], key: string, format?: string) => Record<string, T[]>;
15
16
  export declare const parseDecimal: (value: number | string, decimals?: number) => number;
17
+ export declare const removeKeyObjectEmptyValue: (data: IMergeState) => IMergeState;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "0.0.38",
4
+ "version": "0.0.40",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",