@redsift/table 11.6.0-muiv5-alpha.6 → 11.6.0-muiv5-alpha.7
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/index.d.ts +240 -17
- package/package.json +2 -2
- package/_internal/BaseComponents.d.ts +0 -3
- package/_internal/BaseTextField.d.ts +0 -15
- package/_internal/DataGrid.d.ts +0 -6
- package/_internal/DataGrid.d2.ts +0 -6
- package/_internal/GridToolbarFilterSemanticField.d.ts +0 -5
- package/_internal/GridToolbarFilterSemanticField.d2.ts +0 -15
- package/_internal/Pagination.d.ts +0 -7
- package/_internal/ServerSideControlledPagination.d.ts +0 -39
- package/_internal/StatefulDataGrid.d.ts +0 -6
- package/_internal/StatefulDataGrid.d2.ts +0 -19
- package/_internal/TextCell.d.ts +0 -3
- package/_internal/TextCell.d2.ts +0 -30
- package/_internal/Toolbar.d.ts +0 -4
- package/_internal/Toolbar.d2.ts +0 -56
- package/_internal/ToolbarWrapper.d.ts +0 -6
- package/_internal/ToolbarWrapper.d2.ts +0 -25
- package/_internal/types.d.ts +0 -35
- package/_internal/types.d2.ts +0 -39
package/index.d.ts
CHANGED
|
@@ -2,24 +2,13 @@ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipl
|
|
|
2
2
|
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue';
|
|
3
3
|
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect';
|
|
4
4
|
import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
|
|
5
|
-
import { GridNativeColTypes, GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, GridFilterModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns } from '@mui/x-data-grid-pro';
|
|
5
|
+
import { GridNativeColTypes, GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, DataGridProProps, GridFilterModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns, GridSlotsComponent, GridSelectionModel, GridRowParams, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
|
|
6
6
|
export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
7
|
-
import { D as DataGridProps } from './_internal/types.js';
|
|
8
|
-
export { D as DataGridProps, S as SelectionStatus, a as StyledDataGridProps } from './_internal/types.js';
|
|
9
7
|
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { a as ControlledPagination, C as ControlledPaginationProps, b as ServerSideControlledPagination, S as ServerSideControlledPaginationProps, o as onServerSideSelectionStatusChange } from './_internal/ServerSideControlledPagination.js';
|
|
15
|
-
export { S as StatefulDataGrid, a as StatefulDataGridProps } from './_internal/StatefulDataGrid.d2.ts';
|
|
16
|
-
export { T as TextCell } from './_internal/TextCell.d2.ts';
|
|
17
|
-
export { T as Toolbar } from './_internal/Toolbar.d2.ts';
|
|
18
|
-
export { a as ToolbarWrapper, T as ToolbarWrapperProps } from './_internal/ToolbarWrapper.d2.ts';
|
|
19
|
-
import 'react';
|
|
20
|
-
import '@mui/material';
|
|
21
|
-
import '@redsift/design-system';
|
|
22
|
-
import '@mui/x-data-grid-pro/models/gridApiPro';
|
|
8
|
+
import React, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
|
|
9
|
+
import { TablePaginationProps } from '@mui/material';
|
|
10
|
+
import { Theme, Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
|
|
11
|
+
import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
23
12
|
|
|
24
13
|
declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any, any, any>;
|
|
25
14
|
|
|
@@ -327,6 +316,52 @@ declare const buildStorageKey: ({ id, version, category }: {
|
|
|
327
316
|
}) => `${string}:${number}:paginationModel` | `${string}:${number}:filterModel` | `${string}:${number}:sortModel` | `${string}:${number}:visibilityModel` | `${string}:${number}:pinnedColumns` | `${string}:${number}:dimension` | `${string}:${number}:searchModel`;
|
|
328
317
|
declare const clearPreviousVersionStorage: (id: string, previousLocalStorageVersions: number[]) => void;
|
|
329
318
|
|
|
319
|
+
interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
|
|
320
|
+
/** License key for MUI Datagrid Pro. */
|
|
321
|
+
license?: string;
|
|
322
|
+
/** Height. A default one is set to prevent rendering all rows. */
|
|
323
|
+
height?: string;
|
|
324
|
+
/** Toolbar. A default one is provided but every button from this default Toolbar can be customized and the entire Toolbar can be replaced. */
|
|
325
|
+
toolbar?: ReactNode;
|
|
326
|
+
/** Whether the Toolbar is displayed or not. */
|
|
327
|
+
hideToolbar?: boolean;
|
|
328
|
+
/** Indicates how to display pagination. */
|
|
329
|
+
paginationPlacement?: 'top' | 'bottom' | 'both' | 'none';
|
|
330
|
+
/** Props to forward to the pagination component. */
|
|
331
|
+
paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
|
|
332
|
+
/** Theme. */
|
|
333
|
+
theme?: Theme;
|
|
334
|
+
}
|
|
335
|
+
type SelectionStatus = {
|
|
336
|
+
type: 'page' | 'table' | 'other' | 'none';
|
|
337
|
+
numberOfSelectedRows: number;
|
|
338
|
+
numberOfSelectedRowsInPage?: number;
|
|
339
|
+
page?: number;
|
|
340
|
+
pageSize?: number;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
type StyledDataGridProps = {
|
|
344
|
+
$height?: string;
|
|
345
|
+
$theme?: DataGridProps['theme'];
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
declare const DataGrid: Comp<DataGridProps, HTMLDivElement>;
|
|
349
|
+
|
|
350
|
+
interface StatefulDataGridProps extends DataGridProps {
|
|
351
|
+
/** Hook returning pathname, search params and a method to update query params. */
|
|
352
|
+
useRouter: () => {
|
|
353
|
+
pathname: string;
|
|
354
|
+
search: string;
|
|
355
|
+
historyReplace: (newSearch: string) => void;
|
|
356
|
+
};
|
|
357
|
+
/** Local Storage version, to upgrade when we want to force a clean out. */
|
|
358
|
+
localStorageVersion?: number;
|
|
359
|
+
/** Previous Local Storage versions to clean out when a new one is released. */
|
|
360
|
+
previousLocalStorageVersions?: number[];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
364
|
+
|
|
330
365
|
interface ExtendedGridFilterModel extends GridFilterModel {
|
|
331
366
|
quickFilterValues?: string[];
|
|
332
367
|
}
|
|
@@ -403,4 +438,192 @@ type DataGridModel = {
|
|
|
403
438
|
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel }: DataGridModel, search: string, localStorageVersion: number, historyReplace: (newSearch: string) => void, columns: DataGridProps['columns']) => void;
|
|
404
439
|
declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterModelToMatch: GridFilterModel) => boolean;
|
|
405
440
|
|
|
406
|
-
|
|
441
|
+
declare const BaseButton: React.JSXElementConstructor<any>;
|
|
442
|
+
|
|
443
|
+
declare const BaseCheckbox: React.JSXElementConstructor<any>;
|
|
444
|
+
|
|
445
|
+
declare const muiIconToDSIcon: Partial<Record<keyof GridSlotsComponent, string>>;
|
|
446
|
+
declare const BaseIcon: React.JSXElementConstructor<any>;
|
|
447
|
+
|
|
448
|
+
declare const BasePopper: React.JSXElementConstructor<any>;
|
|
449
|
+
|
|
450
|
+
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
451
|
+
|
|
452
|
+
interface CompletionResponseItem {
|
|
453
|
+
columnField: string;
|
|
454
|
+
operatorValue: string;
|
|
455
|
+
value?: string;
|
|
456
|
+
}
|
|
457
|
+
type CompletionResponse = {
|
|
458
|
+
linkOperator: 'and' | 'or';
|
|
459
|
+
items: CompletionResponseItem[];
|
|
460
|
+
};
|
|
461
|
+
interface LocaleText {
|
|
462
|
+
textLabel?: string;
|
|
463
|
+
textPlaceholder?: string;
|
|
464
|
+
buttonAriaLabel?: string;
|
|
465
|
+
buttonText?: string;
|
|
466
|
+
powerText?: string;
|
|
467
|
+
powerTooltipContent?: string;
|
|
468
|
+
errorText?: string;
|
|
469
|
+
}
|
|
470
|
+
interface FilterConfig {
|
|
471
|
+
columns: object[];
|
|
472
|
+
typeOperators: object;
|
|
473
|
+
notes: string;
|
|
474
|
+
openaiApiKey?: string;
|
|
475
|
+
completionFunc?: (nlpFilterConfig: FilterConfig, prompt: string, model: string) => Promise<CompletionResponse>;
|
|
476
|
+
}
|
|
477
|
+
interface GridToolbarFilterSemanticFieldProps extends ComponentProps<'form'> {
|
|
478
|
+
nlpFilterConfig: FilterConfig;
|
|
479
|
+
onFilterModelChange: (filterModel: GridFilterModel) => void;
|
|
480
|
+
dateFormat?: string;
|
|
481
|
+
defaultModel?: string;
|
|
482
|
+
defaultFilter?: CompletionResponse;
|
|
483
|
+
disablePower?: boolean;
|
|
484
|
+
localeText?: LocaleText;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
declare const DEFAULT_OPERATORS: {
|
|
488
|
+
string: string[];
|
|
489
|
+
number: string[];
|
|
490
|
+
boolean: string[];
|
|
491
|
+
date: string[];
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* The GridToolbarFilterSemanticField component.
|
|
495
|
+
*/
|
|
496
|
+
declare const GridToolbarFilterSemanticField: Comp<GridToolbarFilterSemanticFieldProps, HTMLFormElement>;
|
|
497
|
+
|
|
498
|
+
type ControlledPaginationProps = {
|
|
499
|
+
displaySelection?: boolean;
|
|
500
|
+
displayRowsPerPage?: boolean;
|
|
501
|
+
displayPagination?: boolean;
|
|
502
|
+
selectionStatus: SelectionStatus;
|
|
503
|
+
apiRef: MutableRefObject<GridApiPro>;
|
|
504
|
+
page: number;
|
|
505
|
+
onPageChange: (page: number) => void;
|
|
506
|
+
pageSize: number;
|
|
507
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
508
|
+
rowsPerPageOptions?: number[];
|
|
509
|
+
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
510
|
+
paginationProps?: DataGridProps['paginationProps'];
|
|
511
|
+
};
|
|
512
|
+
declare const ControlledPagination: React.FC<ControlledPaginationProps>;
|
|
513
|
+
|
|
514
|
+
type ServerSideControlledPaginationProps = {
|
|
515
|
+
displaySelection?: boolean;
|
|
516
|
+
displayRowsPerPage?: boolean;
|
|
517
|
+
displayPagination?: boolean;
|
|
518
|
+
selectionStatus: SelectionStatus;
|
|
519
|
+
page: number;
|
|
520
|
+
onPageChange: (page: number) => void;
|
|
521
|
+
pageSize: number;
|
|
522
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
523
|
+
rowsPerPageOptions?: number[];
|
|
524
|
+
paginationProps?: DataGridProps['paginationProps'];
|
|
525
|
+
rowCount: number;
|
|
526
|
+
loading?: boolean;
|
|
527
|
+
};
|
|
528
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridSelectionModel, apiRef: React.MutableRefObject<GridApiPro>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
529
|
+
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
530
|
+
|
|
531
|
+
interface TextCellProps extends ComponentProps<'div'> {
|
|
532
|
+
/** Including Badge Component. */
|
|
533
|
+
badge?: ReactNode;
|
|
534
|
+
/**
|
|
535
|
+
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
536
|
+
* Can also be a ReactElement.
|
|
537
|
+
*/
|
|
538
|
+
leftIcon?: IconProps['icon'];
|
|
539
|
+
/** Left Icon Color variant. */
|
|
540
|
+
leftIconColor?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
541
|
+
/**
|
|
542
|
+
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
543
|
+
* Can also be a ReactElement.
|
|
544
|
+
*/
|
|
545
|
+
rightIcon?: IconProps['icon'];
|
|
546
|
+
/** Right Icon Color variant. */
|
|
547
|
+
rightIconColor?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
548
|
+
/** Shield variant. */
|
|
549
|
+
shieldVariant?: ShieldVariant;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The Cell component.
|
|
554
|
+
*/
|
|
555
|
+
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
556
|
+
|
|
557
|
+
type GridToolbarColumnsProps = Omit<typeof GridToolbarColumnsButton, 'ref'>;
|
|
558
|
+
type GridToolbarDensityProps = Omit<typeof GridToolbarDensitySelector, 'ref'>;
|
|
559
|
+
type GridToolbarFilterSemanticProps = Omit<GridToolbarFilterSemanticFieldProps, 'ref'>;
|
|
560
|
+
interface ToolbarProps {
|
|
561
|
+
/** Props to forward to the column button. */
|
|
562
|
+
columnsButtonProps?: GridToolbarColumnsProps;
|
|
563
|
+
/** Column button ref. */
|
|
564
|
+
columnsButtonRef?: RefObject<HTMLButtonElement>;
|
|
565
|
+
/** Props to forward to the density button. */
|
|
566
|
+
densityButtonProps?: GridToolbarDensityProps;
|
|
567
|
+
/** Density button ref. */
|
|
568
|
+
densityButtonRef?: RefObject<HTMLButtonElement>;
|
|
569
|
+
/** Props to forward to the export button. */
|
|
570
|
+
exportButtonProps?: GridToolbarExportProps;
|
|
571
|
+
/** Export button ref. */
|
|
572
|
+
exportButtonRef?: RefObject<HTMLButtonElement>;
|
|
573
|
+
/** Props to forward to the filter button. */
|
|
574
|
+
filterButtonProps?: GridToolbarFilterButtonProps;
|
|
575
|
+
/** Filter button ref. */
|
|
576
|
+
filterButtonRef?: RefObject<HTMLButtonElement>;
|
|
577
|
+
/** Whether the columns button is displayed or not. */
|
|
578
|
+
hasColumnsButton?: boolean;
|
|
579
|
+
/** Whether the density button is displayed or not. */
|
|
580
|
+
hasDensityButton?: boolean;
|
|
581
|
+
/** Whether the export button is displayed or not. */
|
|
582
|
+
hasExportButton?: boolean;
|
|
583
|
+
/** Whether the filter button is displayed or not. */
|
|
584
|
+
hasFilterButton?: boolean;
|
|
585
|
+
/** Configuration object for NLP filter. undefined if disabled. */
|
|
586
|
+
onFilterModelChange?: (filterModel: GridFilterModel) => void;
|
|
587
|
+
semanticFilterProps?: GridToolbarFilterSemanticProps;
|
|
588
|
+
/** Whether you want to show the quick filter or not. */
|
|
589
|
+
showQuickFilter?: boolean;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Temporary workaround for a type mismatch between react 17 and 18
|
|
594
|
+
* https://github.com/mui/material-ui/issues/35287#issuecomment-1337250566
|
|
595
|
+
*/
|
|
596
|
+
declare global {
|
|
597
|
+
namespace React {
|
|
598
|
+
interface DOMAttributes<T> {
|
|
599
|
+
onResize?: React.ReactEventHandler<T> | undefined;
|
|
600
|
+
onResizeCapture?: React.ReactEventHandler<T> | undefined;
|
|
601
|
+
nonce?: string | undefined;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
/** ------ */
|
|
606
|
+
declare const Toolbar: React.FC<ToolbarProps>;
|
|
607
|
+
|
|
608
|
+
type ToolbarWrapperProps = {
|
|
609
|
+
hideToolbar: DataGridProps['hideToolbar'];
|
|
610
|
+
RenderedToolbar: React.JSXElementConstructor<any>;
|
|
611
|
+
filterModel: DataGridProps['filterModel'];
|
|
612
|
+
onFilterModelChange: DataGridProps['onFilterModelChange'];
|
|
613
|
+
pagination: DataGridProps['pagination'];
|
|
614
|
+
paginationPlacement: DataGridProps['paginationPlacement'];
|
|
615
|
+
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
616
|
+
apiRef: DataGridProps['apiRef'];
|
|
617
|
+
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
618
|
+
page: DataGridProps['page'];
|
|
619
|
+
onPageChange: DataGridProps['onPageChange'];
|
|
620
|
+
pageSize: DataGridProps['pageSize'];
|
|
621
|
+
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
622
|
+
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
623
|
+
paginationProps: DataGridProps['paginationProps'];
|
|
624
|
+
paginationMode?: DataGridProps['paginationMode'];
|
|
625
|
+
rowCount?: DataGridProps['rowCount'];
|
|
626
|
+
};
|
|
627
|
+
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
628
|
+
|
|
629
|
+
export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, Category, CompletionResponse, ControlledPagination, ControlledPaginationProps, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, HAS, HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT, HAS_ONLY, HAS_ONLY_WITH_SELECT, HAS_WITH_SELECT, IS, IS_ANY_OF, IS_ANY_OF_WITH_SELECT, IS_BETWEEN, IS_NOT, IS_NOT_ANY_OF, IS_NOT_WITH_SELECT, IS_WITH_SELECT, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, SelectionStatus, ServerSideControlledPagination, ServerSideControlledPaginationProps, StatefulDataGrid, StatefulDataGridProps, StyledDataGridProps, TextCell, Toolbar, ToolbarWrapper, ToolbarWrapperProps, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "yarn test:unit && yarn test:storybook"
|
|
31
31
|
},
|
|
32
32
|
"types": "types.d.ts",
|
|
33
|
-
"version": "11.6.0-muiv5-alpha.
|
|
33
|
+
"version": "11.6.0-muiv5-alpha.7",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "^11.11.0",
|
|
36
36
|
"@emotion/styled": "^11.11.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"react-dom": ">=17",
|
|
93
93
|
"styled-components": "^5.3.5"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "9b206bde87877e58682621cf219c341f7f7ad8e7"
|
|
96
96
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GridSlotsComponent } from '@mui/x-data-grid-pro';
|
|
3
|
-
|
|
4
|
-
declare const BaseButton: React.JSXElementConstructor<any>;
|
|
5
|
-
|
|
6
|
-
declare const BaseCheckbox: React.JSXElementConstructor<any>;
|
|
7
|
-
|
|
8
|
-
declare const muiIconToDSIcon: Partial<Record<keyof GridSlotsComponent, string>>;
|
|
9
|
-
declare const BaseIcon: React.JSXElementConstructor<any>;
|
|
10
|
-
|
|
11
|
-
declare const BasePopper: React.JSXElementConstructor<any>;
|
|
12
|
-
|
|
13
|
-
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
14
|
-
|
|
15
|
-
export { BaseButton as B, BaseCheckbox as a, BaseIcon as b, BasePopper as c, BaseTextField as d, muiIconToDSIcon as m };
|
package/_internal/DataGrid.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { D as DataGrid } from './DataGrid.d2.ts';
|
|
2
|
-
export { D as DataGridProps, S as SelectionStatus, a as StyledDataGridProps } from './types.js';
|
|
3
|
-
export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel } from '@mui/x-data-grid-pro';
|
|
4
|
-
import '@redsift/design-system';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '@mui/material';
|
package/_internal/DataGrid.d2.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { D as DEFAULT_OPERATORS, G as GridToolbarFilterSemanticField } from './GridToolbarFilterSemanticField.d2.ts';
|
|
2
|
-
export { C as CompletionResponse, F as FilterConfig, G as GridToolbarFilterSemanticFieldProps } from './types.d2.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import '@mui/x-data-grid-pro';
|
|
5
|
-
import 'react';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import { G as GridToolbarFilterSemanticFieldProps } from './types.d2.ts';
|
|
3
|
-
|
|
4
|
-
declare const DEFAULT_OPERATORS: {
|
|
5
|
-
string: string[];
|
|
6
|
-
number: string[];
|
|
7
|
-
boolean: string[];
|
|
8
|
-
date: string[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* The GridToolbarFilterSemanticField component.
|
|
12
|
-
*/
|
|
13
|
-
declare const GridToolbarFilterSemanticField: Comp<GridToolbarFilterSemanticFieldProps, HTMLFormElement>;
|
|
14
|
-
|
|
15
|
-
export { DEFAULT_OPERATORS as D, GridToolbarFilterSemanticField as G };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { a as ControlledPagination, C as ControlledPaginationProps, b as ServerSideControlledPagination, S as ServerSideControlledPaginationProps, o as onServerSideSelectionStatusChange } from './ServerSideControlledPagination.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import './types.js';
|
|
4
|
-
import '@mui/x-data-grid-pro';
|
|
5
|
-
import '@mui/material';
|
|
6
|
-
import '@redsift/design-system';
|
|
7
|
-
import '@mui/x-data-grid-pro/models/gridApiPro';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { MutableRefObject } from 'react';
|
|
2
|
-
import { S as SelectionStatus, D as DataGridProps } from './types.js';
|
|
3
|
-
import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
4
|
-
import { GridSelectionModel, GridRowParams } from '@mui/x-data-grid-pro';
|
|
5
|
-
|
|
6
|
-
type ControlledPaginationProps = {
|
|
7
|
-
displaySelection?: boolean;
|
|
8
|
-
displayRowsPerPage?: boolean;
|
|
9
|
-
displayPagination?: boolean;
|
|
10
|
-
selectionStatus: SelectionStatus;
|
|
11
|
-
apiRef: MutableRefObject<GridApiPro>;
|
|
12
|
-
page: number;
|
|
13
|
-
onPageChange: (page: number) => void;
|
|
14
|
-
pageSize: number;
|
|
15
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
16
|
-
rowsPerPageOptions?: number[];
|
|
17
|
-
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
18
|
-
paginationProps?: DataGridProps['paginationProps'];
|
|
19
|
-
};
|
|
20
|
-
declare const ControlledPagination: React.FC<ControlledPaginationProps>;
|
|
21
|
-
|
|
22
|
-
type ServerSideControlledPaginationProps = {
|
|
23
|
-
displaySelection?: boolean;
|
|
24
|
-
displayRowsPerPage?: boolean;
|
|
25
|
-
displayPagination?: boolean;
|
|
26
|
-
selectionStatus: SelectionStatus;
|
|
27
|
-
page: number;
|
|
28
|
-
onPageChange: (page: number) => void;
|
|
29
|
-
pageSize: number;
|
|
30
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
31
|
-
rowsPerPageOptions?: number[];
|
|
32
|
-
paginationProps?: DataGridProps['paginationProps'];
|
|
33
|
-
rowCount: number;
|
|
34
|
-
loading?: boolean;
|
|
35
|
-
};
|
|
36
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridSelectionModel, apiRef: React.MutableRefObject<GridApiPro>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
37
|
-
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
38
|
-
|
|
39
|
-
export { ControlledPaginationProps as C, ServerSideControlledPaginationProps as S, ControlledPagination as a, ServerSideControlledPagination as b, onServerSideSelectionStatusChange as o };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import { D as DataGridProps } from './types.js';
|
|
3
|
-
|
|
4
|
-
interface StatefulDataGridProps extends DataGridProps {
|
|
5
|
-
/** Hook returning pathname, search params and a method to update query params. */
|
|
6
|
-
useRouter: () => {
|
|
7
|
-
pathname: string;
|
|
8
|
-
search: string;
|
|
9
|
-
historyReplace: (newSearch: string) => void;
|
|
10
|
-
};
|
|
11
|
-
/** Local Storage version, to upgrade when we want to force a clean out. */
|
|
12
|
-
localStorageVersion?: number;
|
|
13
|
-
/** Previous Local Storage versions to clean out when a new one is released. */
|
|
14
|
-
previousLocalStorageVersions?: number[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
18
|
-
|
|
19
|
-
export { StatefulDataGrid as S, StatefulDataGridProps as a };
|
package/_internal/TextCell.d.ts
DELETED
package/_internal/TextCell.d2.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant, Comp } from '@redsift/design-system';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface TextCellProps extends ComponentProps<'div'> {
|
|
5
|
-
/** Including Badge Component. */
|
|
6
|
-
badge?: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
9
|
-
* Can also be a ReactElement.
|
|
10
|
-
*/
|
|
11
|
-
leftIcon?: IconProps['icon'];
|
|
12
|
-
/** Left Icon Color variant. */
|
|
13
|
-
leftIconColor?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
14
|
-
/**
|
|
15
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
16
|
-
* Can also be a ReactElement.
|
|
17
|
-
*/
|
|
18
|
-
rightIcon?: IconProps['icon'];
|
|
19
|
-
/** Right Icon Color variant. */
|
|
20
|
-
rightIconColor?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
21
|
-
/** Shield variant. */
|
|
22
|
-
shieldVariant?: ShieldVariant;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The Cell component.
|
|
27
|
-
*/
|
|
28
|
-
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
29
|
-
|
|
30
|
-
export { TextCell as T };
|
package/_internal/Toolbar.d.ts
DELETED
package/_internal/Toolbar.d2.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React, { RefObject } from 'react';
|
|
2
|
-
import { GridToolbarExportProps, GridToolbarFilterButtonProps, GridFilterModel, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { G as GridToolbarFilterSemanticFieldProps } from './types.d2.ts';
|
|
4
|
-
|
|
5
|
-
type GridToolbarColumnsProps = Omit<typeof GridToolbarColumnsButton, 'ref'>;
|
|
6
|
-
type GridToolbarDensityProps = Omit<typeof GridToolbarDensitySelector, 'ref'>;
|
|
7
|
-
type GridToolbarFilterSemanticProps = Omit<GridToolbarFilterSemanticFieldProps, 'ref'>;
|
|
8
|
-
interface ToolbarProps {
|
|
9
|
-
/** Props to forward to the column button. */
|
|
10
|
-
columnsButtonProps?: GridToolbarColumnsProps;
|
|
11
|
-
/** Column button ref. */
|
|
12
|
-
columnsButtonRef?: RefObject<HTMLButtonElement>;
|
|
13
|
-
/** Props to forward to the density button. */
|
|
14
|
-
densityButtonProps?: GridToolbarDensityProps;
|
|
15
|
-
/** Density button ref. */
|
|
16
|
-
densityButtonRef?: RefObject<HTMLButtonElement>;
|
|
17
|
-
/** Props to forward to the export button. */
|
|
18
|
-
exportButtonProps?: GridToolbarExportProps;
|
|
19
|
-
/** Export button ref. */
|
|
20
|
-
exportButtonRef?: RefObject<HTMLButtonElement>;
|
|
21
|
-
/** Props to forward to the filter button. */
|
|
22
|
-
filterButtonProps?: GridToolbarFilterButtonProps;
|
|
23
|
-
/** Filter button ref. */
|
|
24
|
-
filterButtonRef?: RefObject<HTMLButtonElement>;
|
|
25
|
-
/** Whether the columns button is displayed or not. */
|
|
26
|
-
hasColumnsButton?: boolean;
|
|
27
|
-
/** Whether the density button is displayed or not. */
|
|
28
|
-
hasDensityButton?: boolean;
|
|
29
|
-
/** Whether the export button is displayed or not. */
|
|
30
|
-
hasExportButton?: boolean;
|
|
31
|
-
/** Whether the filter button is displayed or not. */
|
|
32
|
-
hasFilterButton?: boolean;
|
|
33
|
-
/** Configuration object for NLP filter. undefined if disabled. */
|
|
34
|
-
onFilterModelChange?: (filterModel: GridFilterModel) => void;
|
|
35
|
-
semanticFilterProps?: GridToolbarFilterSemanticProps;
|
|
36
|
-
/** Whether you want to show the quick filter or not. */
|
|
37
|
-
showQuickFilter?: boolean;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Temporary workaround for a type mismatch between react 17 and 18
|
|
42
|
-
* https://github.com/mui/material-ui/issues/35287#issuecomment-1337250566
|
|
43
|
-
*/
|
|
44
|
-
declare global {
|
|
45
|
-
namespace React {
|
|
46
|
-
interface DOMAttributes<T> {
|
|
47
|
-
onResize?: React.ReactEventHandler<T> | undefined;
|
|
48
|
-
onResizeCapture?: React.ReactEventHandler<T> | undefined;
|
|
49
|
-
nonce?: string | undefined;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/** ------ */
|
|
54
|
-
declare const Toolbar: React.FC<ToolbarProps>;
|
|
55
|
-
|
|
56
|
-
export { Toolbar as T };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { D as DataGridProps, S as SelectionStatus } from './types.js';
|
|
3
|
-
|
|
4
|
-
type ToolbarWrapperProps = {
|
|
5
|
-
hideToolbar: DataGridProps['hideToolbar'];
|
|
6
|
-
RenderedToolbar: React.JSXElementConstructor<any>;
|
|
7
|
-
filterModel: DataGridProps['filterModel'];
|
|
8
|
-
onFilterModelChange: DataGridProps['onFilterModelChange'];
|
|
9
|
-
pagination: DataGridProps['pagination'];
|
|
10
|
-
paginationPlacement: DataGridProps['paginationPlacement'];
|
|
11
|
-
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
12
|
-
apiRef: DataGridProps['apiRef'];
|
|
13
|
-
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
14
|
-
page: DataGridProps['page'];
|
|
15
|
-
onPageChange: DataGridProps['onPageChange'];
|
|
16
|
-
pageSize: DataGridProps['pageSize'];
|
|
17
|
-
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
18
|
-
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
19
|
-
paginationProps: DataGridProps['paginationProps'];
|
|
20
|
-
paginationMode?: DataGridProps['paginationMode'];
|
|
21
|
-
rowCount?: DataGridProps['rowCount'];
|
|
22
|
-
};
|
|
23
|
-
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
24
|
-
|
|
25
|
-
export { ToolbarWrapperProps as T, ToolbarWrapper as a };
|
package/_internal/types.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DataGridProProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { TablePaginationProps } from '@mui/material';
|
|
4
|
-
import { Theme } from '@redsift/design-system';
|
|
5
|
-
|
|
6
|
-
interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
|
|
7
|
-
/** License key for MUI Datagrid Pro. */
|
|
8
|
-
license?: string;
|
|
9
|
-
/** Height. A default one is set to prevent rendering all rows. */
|
|
10
|
-
height?: string;
|
|
11
|
-
/** Toolbar. A default one is provided but every button from this default Toolbar can be customized and the entire Toolbar can be replaced. */
|
|
12
|
-
toolbar?: ReactNode;
|
|
13
|
-
/** Whether the Toolbar is displayed or not. */
|
|
14
|
-
hideToolbar?: boolean;
|
|
15
|
-
/** Indicates how to display pagination. */
|
|
16
|
-
paginationPlacement?: 'top' | 'bottom' | 'both' | 'none';
|
|
17
|
-
/** Props to forward to the pagination component. */
|
|
18
|
-
paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
|
|
19
|
-
/** Theme. */
|
|
20
|
-
theme?: Theme;
|
|
21
|
-
}
|
|
22
|
-
type SelectionStatus = {
|
|
23
|
-
type: 'page' | 'table' | 'other' | 'none';
|
|
24
|
-
numberOfSelectedRows: number;
|
|
25
|
-
numberOfSelectedRowsInPage?: number;
|
|
26
|
-
page?: number;
|
|
27
|
-
pageSize?: number;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
type StyledDataGridProps = {
|
|
31
|
-
$height?: string;
|
|
32
|
-
$theme?: DataGridProps['theme'];
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export { DataGridProps as D, SelectionStatus as S, StyledDataGridProps as a };
|
package/_internal/types.d2.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { GridFilterModel } from '@mui/x-data-grid-pro';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
interface CompletionResponseItem {
|
|
5
|
-
columnField: string;
|
|
6
|
-
operatorValue: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
}
|
|
9
|
-
type CompletionResponse = {
|
|
10
|
-
linkOperator: 'and' | 'or';
|
|
11
|
-
items: CompletionResponseItem[];
|
|
12
|
-
};
|
|
13
|
-
interface LocaleText {
|
|
14
|
-
textLabel?: string;
|
|
15
|
-
textPlaceholder?: string;
|
|
16
|
-
buttonAriaLabel?: string;
|
|
17
|
-
buttonText?: string;
|
|
18
|
-
powerText?: string;
|
|
19
|
-
powerTooltipContent?: string;
|
|
20
|
-
errorText?: string;
|
|
21
|
-
}
|
|
22
|
-
interface FilterConfig {
|
|
23
|
-
columns: object[];
|
|
24
|
-
typeOperators: object;
|
|
25
|
-
notes: string;
|
|
26
|
-
openaiApiKey?: string;
|
|
27
|
-
completionFunc?: (nlpFilterConfig: FilterConfig, prompt: string, model: string) => Promise<CompletionResponse>;
|
|
28
|
-
}
|
|
29
|
-
interface GridToolbarFilterSemanticFieldProps extends ComponentProps<'form'> {
|
|
30
|
-
nlpFilterConfig: FilterConfig;
|
|
31
|
-
onFilterModelChange: (filterModel: GridFilterModel) => void;
|
|
32
|
-
dateFormat?: string;
|
|
33
|
-
defaultModel?: string;
|
|
34
|
-
defaultFilter?: CompletionResponse;
|
|
35
|
-
disablePower?: boolean;
|
|
36
|
-
localeText?: LocaleText;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { CompletionResponse as C, FilterConfig as F, GridToolbarFilterSemanticFieldProps as G };
|