@hybr1d-tech/charizard 1.1.62 → 1.1.65

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
@@ -814,24 +814,6 @@ declare enum FILTER_TYPE {
814
814
  TAB = "tab"
815
815
  }
816
816
 
817
- /**
818
- * @param filters comes from an api, must follow the type definition strictly
819
- * @param isLoading is fetching from api
820
- * @param isError api threw error
821
- * @param filterDispatch must be of @type (value) => dispatch({type,payload})
822
- * this is used to sync the internal table filter state with the external zustand store of the consumer
823
- * @param filterReset same type as above but is used to reset all the filters
824
- *
825
- *
826
- */
827
- declare type FilterConfig = {
828
- filters: FilterOptions[];
829
- isLoading: boolean;
830
- isError: boolean;
831
- filterDispatch: (value: any) => void;
832
- filterReset: (value: any) => void;
833
- };
834
-
835
817
  /**
836
818
  * @param filters comes from an api, must follow the type definition strictly
837
819
  * @param isLoading is fetching from api
@@ -843,7 +825,7 @@ declare type FilterConfig = {
843
825
  *
844
826
  *
845
827
  */
846
- declare type FilterConfig_2 = {
828
+ declare type FilterConfig = {
847
829
  initialFilters?: {
848
830
  [key: string]: string;
849
831
  };
@@ -856,22 +838,6 @@ declare type FilterConfig_2 = {
856
838
  };
857
839
 
858
840
  declare type FilterOptions = {
859
- id: string;
860
- name: string;
861
- key: string;
862
- options: {
863
- name: string;
864
- value: string;
865
- country_code?: string;
866
- customName?: string;
867
- }[];
868
- config?: {
869
- hideSearch?: boolean;
870
- placeholder?: string;
871
- };
872
- };
873
-
874
- declare type FilterOptions_2 = {
875
841
  id: string;
876
842
  name: string;
877
843
  key: string;
@@ -1632,12 +1598,6 @@ declare interface InputV2Props extends React.InputHTMLAttributes<HTMLInputElemen
1632
1598
  /* Excluded from this release type: onErrorHeightChange */
1633
1599
  }
1634
1600
 
1635
- declare type InternalTableFilters = {
1636
- key: string;
1637
- values: string[] | string;
1638
- type?: FILTER_TYPE;
1639
- };
1640
-
1641
1601
  export declare const isArrayOfString: (arr: unknown) => arr is string[];
1642
1602
 
1643
1603
  export declare const isDatePassed: (date?: string) => boolean;
@@ -2644,8 +2604,6 @@ export declare interface SelectV2Props extends Props<any, boolean> {
2644
2604
 
2645
2605
  export declare type SelectValue = SelectMultiValue | SelectSingleValue;
2646
2606
 
2647
- export declare const SINGLE_VALUE_FILTER_TYPES: FILTER_TYPE[];
2648
-
2649
2607
  export declare function Skeleton({ className, ...props }: SkeletonProps): JSX_2.Element;
2650
2608
 
2651
2609
  declare type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;
@@ -2792,124 +2750,10 @@ declare interface TableDeviceCellProps {
2792
2750
  }
2793
2751
 
2794
2752
  declare type TableFilters = {
2795
- header?: FilterOptions_2[];
2796
- drawer?: FilterOptions_2[];
2753
+ header?: FilterOptions[];
2754
+ drawer?: FilterOptions[];
2797
2755
  };
2798
2756
 
2799
- export declare function TableLegacy({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText, selectorConfig, paginationConfig, emptyStateConfig, headerText, infiniteScrollConfig, }: TableLegacyProps): JSX_2.Element;
2800
-
2801
- export declare interface TableLegacyProps {
2802
- data: any;
2803
- columns: any;
2804
- /**
2805
- * column for actions dropdown in the last row
2806
- */
2807
- actionsConfig?: {
2808
- isDropdownActions?: boolean;
2809
- menuItems?: {
2810
- label: string;
2811
- iconSrc?: string;
2812
- onClick: any;
2813
- filterFn?: any;
2814
- disabled?: boolean | ((data: any) => boolean);
2815
- }[];
2816
- key?: string;
2817
- customComp?: (data: any) => React_2.ReactNode | JSX.Element;
2818
- };
2819
- loaderConfig: {
2820
- text?: string;
2821
- isFetching: boolean;
2822
- isError: boolean;
2823
- errMsg?: string;
2824
- };
2825
- /**
2826
- * table search
2827
- */
2828
- searchConfig?: {
2829
- placeholder?: string;
2830
- search: string;
2831
- setSearch: any;
2832
- };
2833
- /**
2834
- * table sorting
2835
- * @param sortBy used for
2836
- */
2837
- sortConfig?: {
2838
- sortBy: string;
2839
- setSortBy: any;
2840
- sortOrd: 'asc' | 'desc' | '';
2841
- setSortOrd: any;
2842
- sortMap: Record<string, string>;
2843
- };
2844
- /**
2845
- * table filtering, data comes from an api
2846
- */
2847
- filterConfig?: FilterConfig;
2848
- totalText?: string;
2849
- /**
2850
- * Row checkbox or radio selection config
2851
- *
2852
- * @param rowIdKey: needed to keep the selected rows when search is being used server side https://tanstack.com/table/v8/docs/guide/row-selection#useful-row-ids
2853
- */
2854
- rowSelectionConfig?: {
2855
- isCheckbox?: boolean;
2856
- isRadio?: boolean;
2857
- actions?: {
2858
- icon: string;
2859
- text: string;
2860
- onClick: any;
2861
- }[];
2862
- setSelectedRows?: React_2.Dispatch<React_2.SetStateAction<any>>;
2863
- iconSrc?: string;
2864
- clearOnSearch?: boolean;
2865
- rowIdKey?: string;
2866
- rowSelection?: {};
2867
- setRowSelection?: React_2.Dispatch<React_2.SetStateAction<{}>>;
2868
- };
2869
- selectorConfig?: {
2870
- selectors: {
2871
- name: string;
2872
- onClick: any;
2873
- }[];
2874
- };
2875
- /**
2876
- * @deprecated use infiniteScrollConfig
2877
- */
2878
- paginationConfig?: {
2879
- metaData: {
2880
- total_items: number;
2881
- items_on_page: number;
2882
- page_no: number;
2883
- };
2884
- loader: React_2.ReactNode;
2885
- fetchNextPage: () => void;
2886
- height?: string;
2887
- scrollThreshold?: string | number;
2888
- scrollableTarget?: string;
2889
- };
2890
- /**
2891
- * Used for infinite scroll, all the properties comes from useInfiniteQuery
2892
- */
2893
- infiniteScrollConfig?: {
2894
- fetchNextPage: () => void;
2895
- isFetchingNextPage: boolean;
2896
- };
2897
- emptyStateConfig?: {
2898
- icon: string;
2899
- isCustom?: {
2900
- value: boolean;
2901
- component: React_2.ReactNode;
2902
- };
2903
- title: string;
2904
- desc: string;
2905
- btnText: string;
2906
- onClick: any;
2907
- columns: number;
2908
- emptySearchTitle?: string;
2909
- };
2910
- headerText?: string;
2911
- }
2912
-
2913
2757
  declare type TableNames = {
2914
2758
  [key: string]: {
2915
2759
  [key: string]: {
@@ -2983,7 +2827,7 @@ export declare interface TableProps {
2983
2827
  /**
2984
2828
  * table filtering, data comes from an api
2985
2829
  */
2986
- filterConfig?: FilterConfig_2;
2830
+ filterConfig?: FilterConfig;
2987
2831
  totalText?: string;
2988
2832
  /**
2989
2833
  * Row checkbox or radio selection config
@@ -3061,16 +2905,6 @@ export declare interface TableStore<TQuery> {
3061
2905
  }) => void;
3062
2906
  }
3063
2907
 
3064
- declare interface TableStore_2 {
3065
- filters: InternalTableFilters[];
3066
- setDefaultFilters: (filters: InternalTableFilters[]) => void;
3067
- addFilters: (filterKey: string, value: string, filterDispatch: any) => void;
3068
- changeFiltersDrawer: (filterKey: string, value: string[], filterDispatch: any) => void;
3069
- removeFilters: (filterKey: string, value: string, filterDispatch: any) => void;
3070
- resetFilters: (filterKey: string, filterDispatch: any) => void;
3071
- resetAllFilters: (filterReset?: any) => void;
3072
- }
3073
-
3074
2908
  declare interface TableTagItem {
3075
2909
  id: string;
3076
2910
  name: string;
@@ -3514,21 +3348,6 @@ export declare interface UsersChipUser {
3514
3348
  user_position?: string | null;
3515
3349
  }
3516
3350
 
3517
- export declare const useTableStore: UseBoundStore<Omit<StoreApi<TableStore_2>, "setState"> & {
3518
- setState(partial: TableStore_2 | Partial<TableStore_2> | ((state: TableStore_2) => TableStore_2 | Partial<TableStore_2>), replace?: false | undefined, action?: (string | {
3519
- [x: string]: unknown;
3520
- [x: number]: unknown;
3521
- [x: symbol]: unknown;
3522
- type: string;
3523
- }) | undefined): void;
3524
- setState(state: TableStore_2 | ((state: TableStore_2) => TableStore_2), replace: true, action?: (string | {
3525
- [x: string]: unknown;
3526
- [x: number]: unknown;
3527
- [x: symbol]: unknown;
3528
- type: string;
3529
- }) | undefined): void;
3530
- }>;
3531
-
3532
3351
  export declare const ZENADMIN_CONTACT = "mailto:customersuccess@zenadmin.ai";
3533
3352
 
3534
3353
  export declare const ZENADMIN_URL = "https://www.zenadmin.ai";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybr1d-tech/charizard",
3
- "version": "1.1.62",
3
+ "version": "1.1.65",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -47,9 +47,9 @@
47
47
  "react-day-picker": "^9.5.0",
48
48
  "react-dom": "^18.3.1",
49
49
  "react-infinite-scroll-component": "^6.1.0",
50
- "react-inlinesvg": "^4.1.7",
50
+ "react-inlinesvg": "^4.1.8",
51
51
  "react-intersection-observer": "^9.8.0",
52
- "react-router": "^7.1.2",
52
+ "react-router": "^7.1.3",
53
53
  "react-select": "^5.9.0",
54
54
  "react-toastify": "^10.0.6",
55
55
  "react-tooltip": "^5.28.0",