1mpacto-react-ui 0.0.40 → 0.0.41
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.cjs +37 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4430 -4392
- package/dist/index.mjs.map +1 -1
- package/dist/src/components/FilterContainer/FilterContainer.d.ts +1 -1
- package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.d.ts +2 -2
- package/dist/src/components/Table/Table.d.ts +2 -1
- package/dist/src/hooks/index.d.ts +2 -1
- package/dist/src/hooks/useDeepCompareEffect.d.ts +4 -0
- package/dist/src/interfaces/components/FilterContainer/index.d.ts +3 -3
- package/dist/src/interfaces/components/SelectDropdownContainer/index.d.ts +5 -5
- package/dist/src/interfaces/components/Table/index.d.ts +15 -15
- package/dist/src/utils/common.d.ts +12 -0
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
1
|
import { IFilterContainer } from '../../interfaces/components/FilterContainer';
|
2
2
|
|
3
|
-
declare const FilterContainer: ({ children, onChange, prefixNativeValue, defaultNativeValue, defaultValue, mountedExecuteChange,
|
3
|
+
declare const FilterContainer: ({ children, onChange, prefixNativeValue, defaultNativeValue, defaultValue, mountedExecuteChange, keepKeys, }: IFilterContainer) => import("react/jsx-runtime").JSX.Element;
|
4
4
|
export default FilterContainer;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { default as React } 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<T>>;
|
5
|
+
ref?: React.ForwardedRef<IRefSelectDropdownContainer<T>>;
|
6
6
|
}) => JSX.Element;
|
7
7
|
export default SelectDropdownContainer;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { default as React } from 'react';
|
1
2
|
import { ITable, IVirtualizationHead, IVirtualizationTable, ITableConfig } from '../../interfaces/components/Table';
|
2
3
|
|
3
4
|
export declare const ConfigTable: () => ITableConfig;
|
4
|
-
export declare const VirtualizationHead:
|
5
|
+
export declare const VirtualizationHead: React.ForwardRefExoticComponent<Omit<IVirtualizationHead, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
5
6
|
export declare const VirtualizationTable: ({ style, context, ...props }: IVirtualizationTable) => import("react/jsx-runtime").JSX.Element;
|
6
7
|
declare const Table: <T>({ tableInstance, classNameWrapperTable, classNameTable, collapseAll, handlerRowClick, privillageRowClick, virtualization, virtualizationProps, headerId, tbodyTrId, maxHeight, idCalculateHeight, kind, componentSortASC, componentSortDESC, scrollTop, }: ITable<T>) => import("react/jsx-runtime").JSX.Element;
|
7
8
|
export default Table;
|
@@ -3,5 +3,6 @@ import { default as useCountdown } from './useCountdown';
|
|
3
3
|
import { default as useAsyncDebounce } from './useAsyncDebounce';
|
4
4
|
import { default as useCombinedResizeObserver } from './useCombinedResizeObserver';
|
5
5
|
import { default as useStateRef } from './useStateRef';
|
6
|
+
import { useDeepCompareEffect, useDeepCompareMemoize } from './useDeepCompareEffect';
|
6
7
|
|
7
|
-
export { useElementOrWindowMediaQuery, useCountdown, useAsyncDebounce, useCombinedResizeObserver, useStateRef };
|
8
|
+
export { useElementOrWindowMediaQuery, useCountdown, useAsyncDebounce, useCombinedResizeObserver, useStateRef, useDeepCompareEffect, useDeepCompareMemoize, };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { default as React } from 'react';
|
2
2
|
|
3
3
|
export interface IChildFilterContainer {
|
4
4
|
handlerOnChange: THandlerOnChangeFilterContainer;
|
@@ -15,11 +15,11 @@ export interface IMergeState {
|
|
15
15
|
export type THandlerOnChangeFilterContainer = (value: object | string | boolean | string[] | IArrayOfObjectFilterContainer, key: string, transform: 'array-to-string' | 'array-of-object-to-array' | 'array-of-object-to-string' | '', keyTransform: string) => void;
|
16
16
|
export type THandlerOnChangeNative = (value: IMergeState, nativeValue?: IMergeState) => void;
|
17
17
|
export interface IFilterContainer {
|
18
|
-
children: ((params: IChildFilterContainer) => ReactNode) | ((params: IChildFilterContainer) => ReactNode[]);
|
18
|
+
children: ((params: IChildFilterContainer) => React.ReactNode) | ((params: IChildFilterContainer) => React.ReactNode[]);
|
19
19
|
onChange?: (value: IMergeState, nativeValue: IMergeState) => void;
|
20
20
|
prefixNativeValue?: string;
|
21
21
|
defaultValue?: IMergeState;
|
22
22
|
defaultNativeValue?: IMergeState;
|
23
23
|
mountedExecuteChange?: boolean;
|
24
|
-
|
24
|
+
keepKeys?: string[];
|
25
25
|
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { default as React } from 'react';
|
2
2
|
import { Props as SelectProps, ActionMeta, GroupBase, SelectComponentsConfig, MultiValue, SingleValue } from 'react-select';
|
3
3
|
import { AutoPlacementOptions, FlipOptions, OffsetOptions, UseFloatingOptions } from '@floating-ui/react';
|
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<T>) => ReactNode) | ((params: IChildrenSelectDropdownContainer<T>) => ReactNode[]);
|
7
|
+
children: ((params: IChildrenSelectDropdownContainer<T>) => React.ReactNode) | ((params: IChildrenSelectDropdownContainer<T>) => React.ReactNode[]);
|
8
8
|
classNameContainer?: string;
|
9
9
|
classNameContainerShowSelect?: string;
|
10
10
|
classNameContainerSelect?: string;
|
@@ -27,7 +27,7 @@ export interface ISelectDropdownContainer<T> extends Omit<SelectProps<T, boolean
|
|
27
27
|
floatingOptions?: UseFloatingOptions;
|
28
28
|
withSearch?: boolean;
|
29
29
|
components?: SelectComponentsConfig<T, boolean, GroupBase<T>>;
|
30
|
-
getOptionLabel?: (option: T) => ReactNode | Element | string;
|
30
|
+
getOptionLabel?: (option: T) => React.ReactNode | Element | string;
|
31
31
|
selectProps?: object;
|
32
32
|
offsetPopover?: OffsetOptions;
|
33
33
|
}
|
@@ -37,7 +37,7 @@ export interface IChildrenSelectDropdownContainer<T> {
|
|
37
37
|
handlerClose: () => void;
|
38
38
|
handlerShow: <U extends HTMLElement>(e: React.MouseEvent<U, unknown>) => void;
|
39
39
|
show: boolean;
|
40
|
-
setShow:
|
40
|
+
setShow: (v: boolean) => void;
|
41
41
|
}
|
42
42
|
export interface IRefSelectDropdownContainer<T> {
|
43
43
|
selectValue: T | T[] | object;
|
@@ -45,5 +45,5 @@ export interface IRefSelectDropdownContainer<T> {
|
|
45
45
|
handlerClose: () => void;
|
46
46
|
handlerShow: <U extends HTMLElement>(e: React.MouseEvent<U, unknown>) => void;
|
47
47
|
show: boolean;
|
48
|
-
setShow:
|
48
|
+
setShow: (v: boolean) => void;
|
49
49
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Table as ITableTanstack, Row, ColumnDef } from '@tanstack/react-table';
|
2
|
-
import {
|
2
|
+
import { default as React } from 'react';
|
3
3
|
import { ITableVirtualization, IWrapperProps } from '../Virtualization/TableVirtualization';
|
4
4
|
|
5
5
|
export type ITableColumnDef<T = unknown> = ColumnDef<T>;
|
@@ -17,8 +17,8 @@ export interface ITable<T = unknown> {
|
|
17
17
|
maxHeight?: number;
|
18
18
|
idCalculateHeight?: string;
|
19
19
|
kind?: 'laba-reguler' | 'payhere-reguler';
|
20
|
-
componentSortASC?: Element | ReactNode | ReactNode[];
|
21
|
-
componentSortDESC?: Element | ReactNode | ReactNode[];
|
20
|
+
componentSortASC?: Element | React.ReactNode | React.ReactNode[];
|
21
|
+
componentSortDESC?: Element | React.ReactNode | React.ReactNode[];
|
22
22
|
scrollTop?: boolean;
|
23
23
|
}
|
24
24
|
export interface INonVirtualization<T = unknown> {
|
@@ -31,14 +31,14 @@ export interface INonVirtualization<T = unknown> {
|
|
31
31
|
tbodyTrId: (row: Row<T>) => string | undefined;
|
32
32
|
maxHeight?: number;
|
33
33
|
idCalculateHeight?: string;
|
34
|
-
componentSortASC: Element | ReactNode | ReactNode[];
|
35
|
-
componentSortDESC: Element | ReactNode | ReactNode[];
|
34
|
+
componentSortASC: Element | React.ReactNode | React.ReactNode[];
|
35
|
+
componentSortDESC: Element | React.ReactNode | React.ReactNode[];
|
36
36
|
classNamePointer: string;
|
37
37
|
}
|
38
38
|
export interface IVirtualizationProps extends Omit<ITableVirtualization, 'typeHight' | 'itemContent' | 'fixedHeaderContent'> {
|
39
39
|
typeHight?: 'min-max' | 'container';
|
40
|
-
itemContent?: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => ReactNode;
|
41
|
-
fixedHeaderContent?: (() => ReactNode) | (() => ReactNode[]);
|
40
|
+
itemContent?: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => React.ReactNode;
|
41
|
+
fixedHeaderContent?: (() => React.ReactNode) | (() => React.ReactNode[]);
|
42
42
|
}
|
43
43
|
export interface IVirtualization<T = unknown> {
|
44
44
|
tableInstance: ITableTanstack<T>;
|
@@ -49,18 +49,18 @@ export interface IVirtualization<T = unknown> {
|
|
49
49
|
headerId?: string;
|
50
50
|
tbodyTrId: (row: Row<T>) => string | undefined;
|
51
51
|
classNameTable?: string;
|
52
|
-
componentSortASC: Element | ReactNode | ReactNode[];
|
53
|
-
componentSortDESC: Element | ReactNode | ReactNode[];
|
52
|
+
componentSortASC: Element | React.ReactNode | React.ReactNode[];
|
53
|
+
componentSortDESC: Element | React.ReactNode | React.ReactNode[];
|
54
54
|
classNamePointer: string;
|
55
55
|
}
|
56
|
-
export interface IVirtualizationHead extends HTMLAttributes<HTMLTableSectionElement> {
|
56
|
+
export interface IVirtualizationHead extends React.HTMLAttributes<HTMLTableSectionElement> {
|
57
57
|
context?: {
|
58
58
|
headerId?: string;
|
59
59
|
[key: string]: unknown;
|
60
60
|
};
|
61
61
|
[key: string]: unknown;
|
62
62
|
}
|
63
|
-
export interface IVirtualizationTable extends HTMLAttributes<HTMLTableElement> {
|
63
|
+
export interface IVirtualizationTable extends React.HTMLAttributes<HTMLTableElement> {
|
64
64
|
context?: {
|
65
65
|
classNameTable?: string;
|
66
66
|
[key: string]: unknown;
|
@@ -81,12 +81,12 @@ export interface ITableConfig {
|
|
81
81
|
};
|
82
82
|
sortingIcon: {
|
83
83
|
'payhere-reguler': {
|
84
|
-
asc: Element | ReactNode | ReactNode[];
|
85
|
-
desc: Element | ReactNode | ReactNode[];
|
84
|
+
asc: Element | React.ReactNode | React.ReactNode[];
|
85
|
+
desc: Element | React.ReactNode | React.ReactNode[];
|
86
86
|
};
|
87
87
|
'laba-reguler': {
|
88
|
-
asc: Element | ReactNode | ReactNode[];
|
89
|
-
desc: Element | ReactNode | ReactNode[];
|
88
|
+
asc: Element | React.ReactNode | React.ReactNode[];
|
89
|
+
desc: Element | React.ReactNode | React.ReactNode[];
|
90
90
|
};
|
91
91
|
};
|
92
92
|
}
|
@@ -15,3 +15,15 @@ export declare const transformDataHistory: <T extends {
|
|
15
15
|
}>(value: T[], key: string, format?: string) => Record<string, T[]>;
|
16
16
|
export declare const parseDecimal: (value: number | string, decimals?: number) => number;
|
17
17
|
export declare const removeKeyObjectEmptyValue: (data: IMergeState) => IMergeState;
|
18
|
+
export declare const transformLatLong: (value: string, options?: {
|
19
|
+
latMin?: number;
|
20
|
+
longMin?: number;
|
21
|
+
latMax?: number;
|
22
|
+
longMax?: number;
|
23
|
+
}) => {
|
24
|
+
latitude: string;
|
25
|
+
longitude: string;
|
26
|
+
latlong: string;
|
27
|
+
isValid: boolean;
|
28
|
+
};
|
29
|
+
export declare const sanitizeObjectKeyPrefix: (prefix: string, data: IMergeState) => IMergeState;
|