@hybr1d-tech/charizard 0.4.11 → 0.4.13
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/components/table-v2/TableV2.d.ts +2 -20
- package/dist/components/table-v2/inventory/inventory.store.d.ts +38 -0
- package/dist/components/table-v2/store.d.ts +1 -0
- package/dist/components/table-v2/table-filters-drawer/TableFiltersDrawer.d.ts +3 -2
- package/dist/components/table-v2/table-filters-drawer/index.d.ts +1 -0
- package/dist/components/table-v2/table-filters-drawer/utils.d.ts +15 -0
- package/dist/components/table-v2/table-header-filters/FilterDrawerAllCheckbox.d.ts +7 -0
- package/dist/components/table-v2/table-header-filters/FilterDrawerCheckbox.d.ts +10 -0
- package/dist/components/table-v2/table-header-filters/TableHeaderFilters.d.ts +2 -2
- package/dist/components/table-v2/table-meta-header/index.d.ts +1 -0
- package/dist/components/table-v2/table-pagination/TablePagination.d.ts +6 -0
- package/dist/components/table-v2/table-pagination/index.d.ts +1 -0
- package/dist/components/table-v2/types.d.ts +4 -1
- package/dist/hybr1d-ui.js +3303 -3078
- package/dist/hybr1d-ui.umd.cjs +14 -14
- package/dist/style.css +1 -1
- package/package.json +16 -16
|
@@ -70,15 +70,6 @@ export interface TableV2Props {
|
|
|
70
70
|
rowSelection?: {};
|
|
71
71
|
setRowSelection?: React.Dispatch<React.SetStateAction<{}>>;
|
|
72
72
|
};
|
|
73
|
-
selectorConfig?: {
|
|
74
|
-
selectors: {
|
|
75
|
-
name: string;
|
|
76
|
-
onClick: any;
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated use infiniteScrollConfig
|
|
81
|
-
*/
|
|
82
73
|
paginationConfig?: {
|
|
83
74
|
metaData: {
|
|
84
75
|
total_items: number;
|
|
@@ -87,16 +78,7 @@ export interface TableV2Props {
|
|
|
87
78
|
};
|
|
88
79
|
loader: React.ReactNode;
|
|
89
80
|
fetchNextPage: () => void;
|
|
90
|
-
|
|
91
|
-
scrollThreshold?: string | number;
|
|
92
|
-
scrollableTarget?: string;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* Used for infinite scroll, all the properties comes from useInfiniteQuery
|
|
96
|
-
*/
|
|
97
|
-
infiniteScrollConfig?: {
|
|
98
|
-
fetchNextPage: () => void;
|
|
99
|
-
isFetchingNextPage: boolean;
|
|
81
|
+
fetchPrevPage: () => void;
|
|
100
82
|
};
|
|
101
83
|
emptyStateConfig?: {
|
|
102
84
|
icon: string;
|
|
@@ -113,4 +95,4 @@ export interface TableV2Props {
|
|
|
113
95
|
};
|
|
114
96
|
headerText?: string;
|
|
115
97
|
}
|
|
116
|
-
export declare function TableV2({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText,
|
|
98
|
+
export declare function TableV2({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText, paginationConfig, emptyStateConfig, headerText, }: TableV2Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface InventoryStore {
|
|
2
|
+
query: InventoryQueries;
|
|
3
|
+
dispatch: (action: {
|
|
4
|
+
type: INV_ACTION_TYPES;
|
|
5
|
+
payload: Partial<InventoryQueries> | null;
|
|
6
|
+
}) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const invInitialQueries: {
|
|
9
|
+
page: number;
|
|
10
|
+
limit: number;
|
|
11
|
+
search: string;
|
|
12
|
+
sort_by: string;
|
|
13
|
+
sort_order: string;
|
|
14
|
+
filters: {
|
|
15
|
+
filter_type: string;
|
|
16
|
+
filter_brand: string;
|
|
17
|
+
filter_country: string;
|
|
18
|
+
filter_status: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type InventoryQueries = typeof invInitialQueries;
|
|
22
|
+
export declare enum INV_ACTION_TYPES {
|
|
23
|
+
SEARCH = "search",
|
|
24
|
+
SORT_BY = "sort_by",
|
|
25
|
+
SORT_ORDER = "sort_order",
|
|
26
|
+
INITIAL_FILTER = "initial_filter",
|
|
27
|
+
STATUS_FILTER = "status",
|
|
28
|
+
FILTER = "filter",
|
|
29
|
+
RESET_FILTERS = "reset_filters",
|
|
30
|
+
RESET_ALL = "reset_all",
|
|
31
|
+
SELECTOR_FILTER = "selector_filter"
|
|
32
|
+
}
|
|
33
|
+
export declare const invQueryReducer: (query: any, { payload, type }: {
|
|
34
|
+
payload: any;
|
|
35
|
+
type: any;
|
|
36
|
+
}) => any;
|
|
37
|
+
export declare const useInventoryStore: import("zustand").UseBoundStore<import("zustand").StoreApi<InventoryStore>>;
|
|
38
|
+
export {};
|
|
@@ -3,6 +3,7 @@ export interface TableStore {
|
|
|
3
3
|
filters: InternalTableFilters[];
|
|
4
4
|
setDefaultFilters: (filters: InternalTableFilters[]) => void;
|
|
5
5
|
addFilters: (filterKey: string, value: string, filterDispatch: any) => void;
|
|
6
|
+
changeFiltersDrawer: (filterKey: string, value: string[], filterDispatch: any) => void;
|
|
6
7
|
removeFilters: (filterKey: string, value: string, filterDispatch: any) => void;
|
|
7
8
|
resetFilters: (filterKey: string, filterDispatch: any) => void;
|
|
8
9
|
resetAllFilters: (filterReset?: any) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { FilterConfig } from '../types';
|
|
1
2
|
interface TableFiltersDrawerProps {
|
|
2
|
-
|
|
3
|
+
filterConfig: FilterConfig;
|
|
3
4
|
}
|
|
4
|
-
export default function TableFiltersDrawer({
|
|
5
|
+
export default function TableFiltersDrawer({ filterConfig }: TableFiltersDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TableFiltersDrawer';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterOptions, InternalTableFilters } from '../types';
|
|
2
|
+
type FilterItem = {
|
|
3
|
+
label?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
};
|
|
7
|
+
type Filters = {
|
|
8
|
+
[key: string]: FilterItem[];
|
|
9
|
+
};
|
|
10
|
+
type FilterResults = {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function removeUncheckedItems(input: Filters): FilterResults;
|
|
14
|
+
export declare const getDefaultCheckedState: (filters: FilterOptions[], tableFilters: InternalTableFilters[]) => Record<string, any[]>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function FilterDrawerCheckbox({ label, value, checked, filterKey, countryCode, customName, setFilterCheckedState, idx, }: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
filterKey: string;
|
|
6
|
+
countryCode?: string;
|
|
7
|
+
customName?: string;
|
|
8
|
+
setFilterCheckedState: any;
|
|
9
|
+
idx: number;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { FilterConfig } from '../types';
|
|
1
|
+
import type { FilterConfig, FilterOptions } from '../types';
|
|
2
2
|
interface TableHeaderFiltersProps {
|
|
3
3
|
filterConfig: FilterConfig;
|
|
4
|
-
filters:
|
|
4
|
+
filters: FilterOptions[];
|
|
5
5
|
}
|
|
6
6
|
export default function TableHeaderFilters({ filterConfig, filters }: TableHeaderFiltersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TableMetaHeader';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TableV2Props } from '../TableV2';
|
|
2
|
+
interface TablePaginationProps {
|
|
3
|
+
paginationConfig?: TableV2Props['paginationConfig'];
|
|
4
|
+
}
|
|
5
|
+
export default function TablePagination({ paginationConfig }: TablePaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TablePagination';
|
|
@@ -25,7 +25,10 @@ export type FilterOptions = {
|
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
export type FilterConfig = {
|
|
28
|
-
filters:
|
|
28
|
+
filters: {
|
|
29
|
+
header?: FilterOptions[];
|
|
30
|
+
drawer?: FilterOptions[];
|
|
31
|
+
};
|
|
29
32
|
isLoading: boolean;
|
|
30
33
|
isError: boolean;
|
|
31
34
|
filterDispatch: (value: any) => void;
|