rez-table-listing-mui 1.3.0 → 1.3.2

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
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { SortingState, PaginationState, RowSelectionState, ExpandedState, ColumnPinningState, ColumnDef, Row, Table, ColumnOrderState, Header } from '@tanstack/react-table';
3
- import React, { Dispatch, SetStateAction } from 'react';
3
+ import React$1, { Dispatch, SetStateAction } from 'react';
4
4
 
5
5
  interface onFilterChangeFunctionProps {
6
6
  updatedFilters?: any;
@@ -100,6 +100,22 @@ interface FilterDrawerProps {
100
100
  onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
101
101
  filterComponentOptions?: FilterComponentOptions;
102
102
  }
103
+ interface FilterCriteria {
104
+ columnId: string;
105
+ value: string | string[];
106
+ type: FilterInputDataTypes | undefined;
107
+ operator?: string | null;
108
+ dropdown?: {
109
+ label?: string;
110
+ value?: string;
111
+ };
112
+ optionList?: {
113
+ label?: string | undefined;
114
+ value?: string | undefined;
115
+ };
116
+ attribute_key?: string | undefined;
117
+ name: string | undefined;
118
+ }
103
119
  interface FilterStateProps {
104
120
  filter_attribute: string;
105
121
  filter_operator: string;
@@ -119,6 +135,56 @@ interface FilterStateProps {
119
135
  filter_entity_type?: string;
120
136
  filter_entity_name?: string;
121
137
  }
138
+ interface createSavedFilterPayload {
139
+ name: string;
140
+ organization_id?: number;
141
+ enterprise_id?: number;
142
+ user_id?: number;
143
+ is_default: boolean;
144
+ mapped_entity_type: string;
145
+ status?: string;
146
+ entity_type: string;
147
+ filterDetails: FilterDetail[];
148
+ }
149
+ interface deleteSavedFilterPayload {
150
+ name: string;
151
+ is_default: boolean;
152
+ id: string | number;
153
+ status?: string;
154
+ entity_type: string;
155
+ mapped_entity_type: string;
156
+ }
157
+ interface updateSavedFilterPayload {
158
+ name: string;
159
+ is_default: boolean;
160
+ id: string | number;
161
+ status?: string;
162
+ entity_type: string;
163
+ mapped_entity_type: string;
164
+ filterDetails: FilterDetail[];
165
+ }
166
+ interface FilterDetail {
167
+ filter_attribute: string;
168
+ filter_operator: string;
169
+ filter_value: string | string[];
170
+ }
171
+ interface FilterDetail {
172
+ filter_attribute: string;
173
+ filter_operator: string;
174
+ filter_value: string | string[];
175
+ }
176
+ interface FilterFormComponentProps {
177
+ columnsData: FilterColumnsDataProps;
178
+ dropdownData: FilterDropdownDataProps;
179
+ tableStates: CraftTableOptionsProps;
180
+ editMode?: boolean;
181
+ setEditMode?: React.Dispatch<React.SetStateAction<boolean>>;
182
+ setDeleteFilterModalOpen?: React.Dispatch<React.SetStateAction<boolean>>;
183
+ setSavedFilterModalOpen?: React.Dispatch<React.SetStateAction<boolean>>;
184
+ tabValue?: number;
185
+ onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
186
+ filterComponentOptions?: FilterComponentOptions;
187
+ }
122
188
  interface FilterMasterStateProps {
123
189
  attributes: {
124
190
  selected: string;
@@ -130,6 +196,27 @@ interface FilterMasterStateProps {
130
196
  };
131
197
  activeFilterTabIndex: number;
132
198
  }
199
+ interface AttributesFilterProps {
200
+ columnsData: FilterColumnsDataProps;
201
+ tableStates: CraftTableOptionsProps;
202
+ dropdownData: FilterDropdownDataProps;
203
+ searchTerm: string;
204
+ setSearchTerm: React.Dispatch<React.SetStateAction<string>>;
205
+ tabValue?: number;
206
+ onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
207
+ }
208
+ interface AttributesFilterSelectProps {
209
+ columnsData: FilterColumnsDataProps;
210
+ tableStates: CraftTableOptionsProps;
211
+ dropdownData: FilterDropdownDataProps;
212
+ searchTerm: string;
213
+ setSearchTerm: React.Dispatch<React.SetStateAction<string>>;
214
+ tabValue?: number;
215
+ }
216
+ interface viewSettingsPayload {
217
+ column: string;
218
+ sort_by: string;
219
+ }
133
220
  interface FilterDataMainFilterEntityListProps {
134
221
  value: string;
135
222
  id: string | number;
@@ -295,12 +382,12 @@ interface CraftTablePaginationProps {
295
382
  interface LoadingOptionsProps {
296
383
  isLoading: boolean;
297
384
  loaderText?: string;
298
- loadingComponent?: React.ReactNode;
385
+ loadingComponent?: React$1.ReactNode;
299
386
  }
300
387
  interface TopbarOptionsProps {
301
388
  tableStates: CraftTableOptionsProps;
302
- leftSideComponent?: React.ReactNode;
303
- rightSideComponent?: React.ReactNode;
389
+ leftSideComponent?: React$1.ReactNode;
390
+ rightSideComponent?: React$1.ReactNode;
304
391
  showColumnToggle?: boolean;
305
392
  showCompactTableToggle?: boolean;
306
393
  showChangeLayoutToggle?: boolean;
@@ -318,7 +405,7 @@ interface CustomRenderContext<T> {
318
405
  table: Row<T>[];
319
406
  }
320
407
  type CustomRenderFnMap<T> = {
321
- [key: string]: (ctx: CustomRenderContext<T>) => React.ReactNode;
408
+ [key: string]: (ctx: CustomRenderContext<T>) => React$1.ReactNode;
322
409
  };
323
410
  type CustomColumnMeta = {
324
411
  type?: "custom";
@@ -329,12 +416,12 @@ type CustomColumnDef<T> = ColumnDef<T> & {
329
416
  meta?: CustomColumnMeta;
330
417
  };
331
418
  interface CraftTableStyleProps {
332
- wrapperStyle?: React.CSSProperties;
419
+ wrapperStyle?: React$1.CSSProperties;
333
420
  }
334
421
  interface FilterOptionsProps {
335
422
  onClick?: () => void;
336
423
  show?: boolean;
337
- component: React.ReactNode;
424
+ component: React$1.ReactNode;
338
425
  }
339
426
  interface settingsOptionsProps {
340
427
  showIcon?: boolean;
@@ -346,7 +433,7 @@ interface CraftTableProps<T> {
346
433
  tableStates: CraftTableOptionsProps;
347
434
  paginationOptions?: CraftTablePaginationProps;
348
435
  featureOptions?: CraftTableFeatureProps;
349
- nestedComponent?: React.ComponentType<{
436
+ nestedComponent?: React$1.ComponentType<{
350
437
  row: Row<T>;
351
438
  }>;
352
439
  loadingOptions?: LoadingOptionsProps;
@@ -354,7 +441,7 @@ interface CraftTableProps<T> {
354
441
  customRenderFn?: CustomRenderFnMap<T>;
355
442
  shouldHideColumn?: (accessorKey?: string) => boolean;
356
443
  styleOptions?: CraftTableStyleProps;
357
- emptyListComponent?: React.ReactNode;
444
+ emptyListComponent?: React$1.ReactNode;
358
445
  filterOptions?: FilterOptionsProps;
359
446
  settingsOptions?: settingsOptionsProps;
360
447
  craftTableFilterSettingsOptions?: craftTableFilterSettingsOptionsProps;
@@ -362,11 +449,11 @@ interface CraftTableProps<T> {
362
449
  interface CraftTableComponentProps<T> {
363
450
  table: Table<T>;
364
451
  featureOptions: CraftTableFeatureProps;
365
- NestedComponent?: React.ComponentType<{
452
+ NestedComponent?: React$1.ComponentType<{
366
453
  row: Row<T>;
367
454
  }>;
368
455
  columnOrder: ColumnOrderState;
369
- setColumnOrder: React.Dispatch<React.SetStateAction<ColumnOrderState>>;
456
+ setColumnOrder: React$1.Dispatch<React$1.SetStateAction<ColumnOrderState>>;
370
457
  isCompactTable: boolean;
371
458
  tableStates: CraftTableOptionsProps;
372
459
  }
@@ -411,7 +498,7 @@ declare const Kanban: ({ metaData, data, isLoading, KanbanCardComponent, showSet
411
498
  metaData: any;
412
499
  data: any;
413
500
  isLoading?: boolean;
414
- KanbanCardComponent: React.ComponentType<{
501
+ KanbanCardComponent: React$1.ComponentType<{
415
502
  key: string | number;
416
503
  cardData: any;
417
504
  }>;
@@ -420,4 +507,4 @@ declare const Kanban: ({ metaData, data, isLoading, KanbanCardComponent, showSet
420
507
  }) => react_jsx_runtime.JSX.Element;
421
508
 
422
509
  export { TableFilter as CraftTableFilter, TableSearch as CraftTableSearch, QuickFilterSettings as CraftTableSettings, TableTabs as CraftTableTabs, Kanban as KanbanWrapper, TableWrapper, useCraftTable, useCraftTableFilterSettings };
423
- export type { CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, FilterOptionsProps, TableHeaderProps, TopbarOptionsProps, craftTableFilterSettingsOptionsProps, settingsOptionsProps };
510
+ export type { AttributesFilterProps, AttributesFilterSelectProps, CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, FilterColumnsDataProps, FilterColumnsListProps, FilterComponentOptions, FilterComponentOptionsMainFilterOptions, FilterCriteria, FilterDataMainFilterEntityListProps, FilterDataMainFilterEntityWiseCriteriaProps, FilterDataProps, FilterDrawerProps, FilterDropdownDataProps, FilterFormComponentProps, FilterInputDataTypes, FilterMasterStateProps, FilterOperationListProps, FilterOptionsProps, FilterStateProps, TableHeaderProps, TopbarOptionsProps, craftTableFilterSettingsOptionsProps, createSavedFilterPayload, deleteSavedFilterPayload, settingsOptionsProps, updateSavedFilterPayload, viewSettingsPayload };