@hybr1d-tech/charizard 1.1.7 → 1.1.9

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.d.ts CHANGED
@@ -488,6 +488,8 @@ export declare interface CreatableSelectV2Props extends SelectV2Props {
488
488
  onCreateOption: (value: string) => Promise<void> | void;
489
489
  }
490
490
 
491
+ export declare const createTableStore: <TQuery extends TBaseQuery>(initialQueries: TQuery) => UseBoundStore<StoreApi<TableStore<TQuery>>>;
492
+
491
493
  declare type CustomColCheckedState = {
492
494
  id: string;
493
495
  label: string;
@@ -552,6 +554,10 @@ declare interface DateRangePickerProps extends PropsRange {
552
554
  trigger?: React_2.ReactNode;
553
555
  }
554
556
 
557
+ export declare const DEFAULT_LIMIT = 25;
558
+
559
+ export declare const DEFAULT_PAGE = 0;
560
+
555
561
  /**
556
562
  * The default selected time object used to initialize or reset the time picker state.
557
563
  *
@@ -940,6 +946,8 @@ export declare const getInitials: (name: string) => string;
940
946
 
941
947
  export declare const getProductIconFromType: (type?: string) => string;
942
948
 
949
+ export declare const getTableNameInfo: (value: TableNameValueString) => TableNameValue | undefined;
950
+
943
951
  export declare const getUsername: (user?: any) => any;
944
952
 
945
953
  export declare interface GroupActionProps {
@@ -2793,6 +2801,21 @@ export declare const Tab: default_2.FC<TabProps>;
2793
2801
 
2794
2802
  export declare function Table({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText, paginationConfig, emptyStateConfig, tableStyleConfig, customColumnConfig, exportConfig, customActionItems, }: TableProps): JSX_2.Element;
2795
2803
 
2804
+ export declare enum TABLE_ACTION_TYPES {
2805
+ SEARCH = "search",
2806
+ SORT_BY = "sort_by",
2807
+ SORT_ORDER = "sort_order",
2808
+ INITIAL_FILTER = "initial_filter",
2809
+ FILTER = "filter",
2810
+ RESET_FILTERS = "reset_filters",
2811
+ RESET_ALL = "reset_all",
2812
+ SELECTOR_FILTER = "selector_filter",
2813
+ PAGE = "page",
2814
+ LIMIT = "limit"
2815
+ }
2816
+
2817
+ export declare const TABLE_NAMES: TableNames;
2818
+
2796
2819
  declare type TableCustomColsVariant = 'default' | 'selection';
2797
2820
 
2798
2821
  declare type TableCustomColumns = {
@@ -2928,6 +2951,29 @@ export declare interface TableLegacyProps {
2928
2951
  headerText?: string;
2929
2952
  }
2930
2953
 
2954
+ declare type TableNames = {
2955
+ [key: string]: {
2956
+ [key: string]: {
2957
+ [key: string]: TableNameValue;
2958
+ };
2959
+ };
2960
+ };
2961
+
2962
+ declare type TableNameValue = {
2963
+ label: string;
2964
+ value: string;
2965
+ };
2966
+
2967
+ export declare type TableNameValueString = typeof TABLE_NAMES extends {
2968
+ [key: string]: infer T;
2969
+ } ? T extends {
2970
+ [key: string]: infer U;
2971
+ } ? U extends {
2972
+ [key: string]: infer V;
2973
+ } ? V extends {
2974
+ value: string;
2975
+ } ? V['value'] : never : never : never : never;
2976
+
2931
2977
  export declare function TablePagination({ paginationConfig }: TablePaginationProps): JSX_2.Element | null;
2932
2978
 
2933
2979
  declare interface TablePaginationProps {
@@ -3048,6 +3094,14 @@ export declare interface TableProps {
3048
3094
  customActionItems?: JSX.Element[];
3049
3095
  }
3050
3096
 
3097
+ export declare interface TableStore<TQuery> {
3098
+ query: TQuery;
3099
+ dispatch: (action: {
3100
+ type: TABLE_ACTION_TYPES;
3101
+ payload: any | null;
3102
+ }) => void;
3103
+ }
3104
+
3051
3105
  declare interface TableTagItem {
3052
3106
  id: string;
3053
3107
  name: string;
@@ -3124,6 +3178,15 @@ export declare interface TaskCardsProps {
3124
3178
  onClicks?: ((data: ITask) => void)[][];
3125
3179
  }
3126
3180
 
3181
+ declare type TBaseQuery = {
3182
+ page: number;
3183
+ limit: number;
3184
+ search: string;
3185
+ sort_by: string;
3186
+ sort_order: string;
3187
+ filters: Record<string, any>;
3188
+ };
3189
+
3127
3190
  /**
3128
3191
  * TextareaV2 is a styled textarea component with optional error message display.
3129
3192
  * It provides a flexible way to render a textarea with custom styles and error handling.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybr1d-tech/charizard",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"