@redsift/table 6.2.0 → 6.3.1
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 +47 -54
- package/index.js +88 -443
- package/index.js.map +1 -1
- package/package.json +5 -3
package/index.d.ts
CHANGED
|
@@ -1,7 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridFilterItem, GridCellParams, GridFilterInputMultipleValue, GridFilterOperator, DataGridProProps, GridColumns } from '@mui/x-data-grid-pro';
|
|
3
|
+
export { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridNumericOperators, getGridSingleSelectOperators, getGridStringOperators } from '@mui/x-data-grid-pro';
|
|
4
|
+
import { Comp as Comp$1, ShieldVariant } from '@redsift/design-system';
|
|
3
5
|
import { Ref, ReactElement, ComponentProps, ReactNode } from 'react';
|
|
4
6
|
|
|
7
|
+
declare const CONTAINS_ANY_OF: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
11
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare const ENDS_WITH_ANY_OF: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
18
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare const IS_ANY_OF: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>;
|
|
22
|
+
|
|
23
|
+
declare const STARTS_WITH_ANY_OF: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
27
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
31
|
+
|
|
32
|
+
interface DataGridProps extends DataGridProProps {
|
|
33
|
+
hideToolbar?: boolean;
|
|
34
|
+
license: string;
|
|
35
|
+
$height?: string;
|
|
36
|
+
column?: GridColumns;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare type StyledDataGridProps = {
|
|
40
|
+
$height?: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
declare const DataGrid: Comp$1<DataGridProps, HTMLDivElement>;
|
|
44
|
+
|
|
45
|
+
declare const Toolbar: () => JSX.Element;
|
|
46
|
+
|
|
5
47
|
/** Component Type. */
|
|
6
48
|
declare type Comp<P, T = HTMLElement> = {
|
|
7
49
|
(props: P & {
|
|
@@ -17,7 +59,7 @@ declare type Comp<P, T = HTMLElement> = {
|
|
|
17
59
|
className?: string;
|
|
18
60
|
};
|
|
19
61
|
/** Get types of the values of a record. */
|
|
20
|
-
declare type ValueOf
|
|
62
|
+
declare type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
21
63
|
/**
|
|
22
64
|
* Color palette.
|
|
23
65
|
*/
|
|
@@ -29,58 +71,9 @@ declare const ColorPalette: {
|
|
|
29
71
|
readonly info: "info";
|
|
30
72
|
readonly success: "success";
|
|
31
73
|
};
|
|
32
|
-
declare type ColorPalette = ValueOf
|
|
74
|
+
declare type ColorPalette = ValueOf<typeof ColorPalette>;
|
|
33
75
|
declare type Color = ColorPalette | string;
|
|
34
76
|
|
|
35
|
-
interface DataGridProps extends DataGridProProps {
|
|
36
|
-
hideToolbar?: boolean;
|
|
37
|
-
license: string;
|
|
38
|
-
$height?: string;
|
|
39
|
-
column?: GridColumns;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
declare type StyledDataGridProps = {
|
|
43
|
-
$height?: string;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
declare const DataGrid: Comp<DataGridProps, HTMLDivElement>;
|
|
47
|
-
|
|
48
|
-
declare const Toolbar: () => JSX.Element;
|
|
49
|
-
|
|
50
|
-
/** Get types of the values of a record. */
|
|
51
|
-
declare type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
52
|
-
/**
|
|
53
|
-
* Component variant.
|
|
54
|
-
*/
|
|
55
|
-
declare const ShieldVariant: {
|
|
56
|
-
readonly success: "success";
|
|
57
|
-
readonly successLocked: "successLocked";
|
|
58
|
-
readonly successUnlocked: "successUnlocked";
|
|
59
|
-
readonly fail: "fail";
|
|
60
|
-
readonly failLocked: "failLocked";
|
|
61
|
-
readonly failUnlocked: "failUnlocked";
|
|
62
|
-
readonly warning: "warning";
|
|
63
|
-
readonly warningLocked: "warningLocked";
|
|
64
|
-
readonly warningUnlocked: "warningUnlocked";
|
|
65
|
-
readonly noData: "noData";
|
|
66
|
-
readonly ignored: "ignored";
|
|
67
|
-
readonly email: "email";
|
|
68
|
-
readonly question: "question";
|
|
69
|
-
};
|
|
70
|
-
declare type ShieldVariant = ValueOf<typeof ShieldVariant>;
|
|
71
|
-
/**
|
|
72
|
-
* Component props.
|
|
73
|
-
*/
|
|
74
|
-
interface ShieldProps extends ComponentProps<'div'> {
|
|
75
|
-
/** Shield variant. */
|
|
76
|
-
variant?: ShieldVariant;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The Shield component.
|
|
81
|
-
*/
|
|
82
|
-
declare const Shield: Comp<ShieldProps, HTMLDivElement>;
|
|
83
|
-
|
|
84
77
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
85
78
|
/** Including Badge Component. */
|
|
86
79
|
badge?: ReactNode;
|
|
@@ -111,4 +104,4 @@ interface TextCellProps extends ComponentProps<'div'> {
|
|
|
111
104
|
*/
|
|
112
105
|
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
113
106
|
|
|
114
|
-
export { DataGrid, DataGridProps,
|
|
107
|
+
export { CONTAINS_ANY_OF, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, IS_ANY_OF, STARTS_WITH_ANY_OF, StyledDataGridProps, TextCell, Toolbar, getGridStringArrayOperators };
|
package/index.js
CHANGED
|
@@ -1,8 +1,87 @@
|
|
|
1
|
-
import { GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport, gridVisibleSortedRowIdsSelector, DataGridPro } from '@mui/x-data-grid-pro';
|
|
2
|
-
export { GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from '@mui/x-data-grid-pro';
|
|
1
|
+
import { GridFilterInputMultipleValue, getGridStringOperators, GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport, gridVisibleSortedRowIdsSelector, DataGridPro } from '@mui/x-data-grid-pro';
|
|
2
|
+
export { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, getGridBooleanOperators, getGridDateOperators, getGridNumericOperators, getGridSingleSelectOperators, getGridStringOperators } from '@mui/x-data-grid-pro';
|
|
3
3
|
import React, { forwardRef, useRef } from 'react';
|
|
4
|
+
import { Icon, Shield } from '@redsift/design-system';
|
|
5
|
+
import { mdiChevronUp, mdiChevronDown, mdiChevronRight, mdiFilterVariant } from '@redsift/icons';
|
|
4
6
|
import styled, { css } from 'styled-components';
|
|
5
7
|
|
|
8
|
+
const containsAnyOfOperator = {
|
|
9
|
+
label: 'contains any of',
|
|
10
|
+
value: 'containsAnyOf',
|
|
11
|
+
getApplyFilterFn: filterItem => {
|
|
12
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return params => {
|
|
16
|
+
if (filterItem.value.length === 0) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
let match = false;
|
|
20
|
+
filterItem.value.forEach(filteredValue => {
|
|
21
|
+
if (params.value.indexOf(filteredValue) !== -1) {
|
|
22
|
+
match = true;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return match;
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
InputComponent: GridFilterInputMultipleValue
|
|
29
|
+
};
|
|
30
|
+
const CONTAINS_ANY_OF = containsAnyOfOperator;
|
|
31
|
+
|
|
32
|
+
const endsWithAnyOfOperator = {
|
|
33
|
+
label: 'ends with any of',
|
|
34
|
+
value: 'endsWithAnyOf',
|
|
35
|
+
getApplyFilterFn: filterItem => {
|
|
36
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return params => {
|
|
40
|
+
if (filterItem.value.length === 0) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
let match = false;
|
|
44
|
+
filterItem.value.forEach(filteredValue => {
|
|
45
|
+
if (params.value.endsWith(filteredValue)) {
|
|
46
|
+
match = true;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return match;
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
InputComponent: GridFilterInputMultipleValue
|
|
53
|
+
};
|
|
54
|
+
const ENDS_WITH_ANY_OF = endsWithAnyOfOperator;
|
|
55
|
+
|
|
56
|
+
const isAnyOfOperator = getGridStringOperators().filter(operator => operator.value === 'isAnyOf')[0];
|
|
57
|
+
const IS_ANY_OF = isAnyOfOperator;
|
|
58
|
+
|
|
59
|
+
const startsWithAnyOfOperator = {
|
|
60
|
+
label: 'ends with any of',
|
|
61
|
+
value: 'startsWithAnyOf',
|
|
62
|
+
getApplyFilterFn: filterItem => {
|
|
63
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return params => {
|
|
67
|
+
if (filterItem.value.length === 0) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
let match = false;
|
|
71
|
+
filterItem.value.forEach(filteredValue => {
|
|
72
|
+
if (params.value.startsWith(filteredValue)) {
|
|
73
|
+
match = true;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return match;
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
InputComponent: GridFilterInputMultipleValue
|
|
80
|
+
};
|
|
81
|
+
const STARTS_WITH_ANY_OF = startsWithAnyOfOperator;
|
|
82
|
+
|
|
83
|
+
const getGridStringArrayOperators = () => [CONTAINS_ANY_OF, ENDS_WITH_ANY_OF, IS_ANY_OF, STARTS_WITH_ANY_OF];
|
|
84
|
+
|
|
6
85
|
function ownKeys(object, enumerableOnly) {
|
|
7
86
|
var keys = Object.keys(object);
|
|
8
87
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -168,181 +247,6 @@ class LicenseInfo {
|
|
|
168
247
|
|
|
169
248
|
}
|
|
170
249
|
|
|
171
|
-
/** Component Type. */
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* JS falsy values.
|
|
175
|
-
* (excluding `NaN` as it can't be distinguished from `number`)
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
/** Get types of the values of a record. */
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Color palette.
|
|
182
|
-
*/
|
|
183
|
-
const ColorPalette = {
|
|
184
|
-
primary: 'primary',
|
|
185
|
-
secondary: 'secondary',
|
|
186
|
-
error: 'error',
|
|
187
|
-
warning: 'warning',
|
|
188
|
-
info: 'info',
|
|
189
|
-
success: 'success'
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
// Material Design Icons v7.0.96
|
|
193
|
-
var mdiChevronDown = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z";
|
|
194
|
-
var mdiChevronRight = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";
|
|
195
|
-
var mdiChevronUp = "M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z";
|
|
196
|
-
var mdiFilterVariant = "M6,13H18V11H6M3,6V8H21V6M10,18H14V16H10V18Z";
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Component size.
|
|
200
|
-
*/
|
|
201
|
-
const IconSize = {
|
|
202
|
-
large: 'large',
|
|
203
|
-
medium: 'medium',
|
|
204
|
-
small: 'small'
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Component style.
|
|
209
|
-
*/
|
|
210
|
-
const StyledIcon = styled.span`
|
|
211
|
-
font-style: normal;
|
|
212
|
-
position: relative;
|
|
213
|
-
|
|
214
|
-
${_ref => {
|
|
215
|
-
let {
|
|
216
|
-
$color
|
|
217
|
-
} = _ref;
|
|
218
|
-
return $color && Object.keys(ColorPalette).indexOf($color) !== -1 ? css`
|
|
219
|
-
color: var(--redsift-color-${$color}-main);
|
|
220
|
-
` : css`
|
|
221
|
-
color: ${$color || css`var(--redsift-color-action-active)`};
|
|
222
|
-
`;
|
|
223
|
-
}}
|
|
224
|
-
|
|
225
|
-
${_ref2 => {
|
|
226
|
-
let {
|
|
227
|
-
$size
|
|
228
|
-
} = _ref2;
|
|
229
|
-
switch ($size) {
|
|
230
|
-
case IconSize.large:
|
|
231
|
-
return css`
|
|
232
|
-
font-size: 35px;
|
|
233
|
-
height: 35px;
|
|
234
|
-
line-height: 35px;
|
|
235
|
-
width: 35px;
|
|
236
|
-
|
|
237
|
-
& .redsift-badge-standard {
|
|
238
|
-
position: absolute;
|
|
239
|
-
right: -23px;
|
|
240
|
-
top: 0px;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
& .redsift-badge-dot {
|
|
244
|
-
position: absolute;
|
|
245
|
-
right: -7px;
|
|
246
|
-
top: 4px;
|
|
247
|
-
}
|
|
248
|
-
`;
|
|
249
|
-
case IconSize.small:
|
|
250
|
-
return css`
|
|
251
|
-
font-size: 20px;
|
|
252
|
-
height: 20px;
|
|
253
|
-
line-height: 20px;
|
|
254
|
-
width: 20px;
|
|
255
|
-
|
|
256
|
-
& .redsift-badge-standard {
|
|
257
|
-
position: absolute;
|
|
258
|
-
right: -24px;
|
|
259
|
-
top: -8px;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
& .redsift-badge-dot {
|
|
263
|
-
position: absolute;
|
|
264
|
-
right: -8px;
|
|
265
|
-
top: 1px;
|
|
266
|
-
}
|
|
267
|
-
`;
|
|
268
|
-
case IconSize.medium:
|
|
269
|
-
default:
|
|
270
|
-
return css`
|
|
271
|
-
font-size: 24px;
|
|
272
|
-
height: 24px;
|
|
273
|
-
line-height: 24px;
|
|
274
|
-
width: 24px;
|
|
275
|
-
|
|
276
|
-
& .redsift-badge-standard {
|
|
277
|
-
position: absolute;
|
|
278
|
-
right: -24px;
|
|
279
|
-
top: -6px;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
& .redsift-badge-dot {
|
|
283
|
-
position: absolute;
|
|
284
|
-
right: -8px;
|
|
285
|
-
top: 2px;
|
|
286
|
-
}
|
|
287
|
-
`;
|
|
288
|
-
}
|
|
289
|
-
}}
|
|
290
|
-
`;
|
|
291
|
-
|
|
292
|
-
const _excluded$2 = ["aria-hidden", "aria-label", "badge", "className", "color", "icon", "size", "svgProps"];
|
|
293
|
-
const COMPONENT_NAME$3 = 'RedSiftIcon';
|
|
294
|
-
const CLASSNAME$3 = 'redsift-icon';
|
|
295
|
-
const DEFAULT_PROPS$2 = {
|
|
296
|
-
size: IconSize.medium
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* The Icon component.
|
|
301
|
-
*/
|
|
302
|
-
const Icon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
303
|
-
const iconRef = ref || useRef();
|
|
304
|
-
let {
|
|
305
|
-
'aria-hidden': ariaHidden,
|
|
306
|
-
'aria-label': ariaLabel,
|
|
307
|
-
badge,
|
|
308
|
-
className,
|
|
309
|
-
color,
|
|
310
|
-
icon,
|
|
311
|
-
size,
|
|
312
|
-
svgProps
|
|
313
|
-
} = props,
|
|
314
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$2);
|
|
315
|
-
if (!ariaHidden) {
|
|
316
|
-
ariaHidden = undefined;
|
|
317
|
-
}
|
|
318
|
-
return /*#__PURE__*/React.createElement(StyledIcon, _extends({}, forwardedProps, {
|
|
319
|
-
$color: color,
|
|
320
|
-
$size: size,
|
|
321
|
-
"aria-hidden": ariaLabel ? ariaHidden || undefined : true,
|
|
322
|
-
"aria-label": ariaLabel,
|
|
323
|
-
className: classNames(Icon.className, className),
|
|
324
|
-
ref: iconRef
|
|
325
|
-
}), /*#__PURE__*/React.createElement("svg", _extends({}, svgProps, {
|
|
326
|
-
"aria-hidden": ariaLabel ? ariaHidden || undefined : true,
|
|
327
|
-
"aria-label": ariaLabel,
|
|
328
|
-
focusable: "false",
|
|
329
|
-
height: "1em",
|
|
330
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
331
|
-
role: "img",
|
|
332
|
-
style: {
|
|
333
|
-
verticalAlign: '-0.125em'
|
|
334
|
-
},
|
|
335
|
-
viewBox: "0 0 24 24",
|
|
336
|
-
width: "1em"
|
|
337
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
338
|
-
d: icon,
|
|
339
|
-
fill: "currentColor"
|
|
340
|
-
})), badge ? badge : null);
|
|
341
|
-
});
|
|
342
|
-
Icon.className = CLASSNAME$3;
|
|
343
|
-
Icon.defaultProps = DEFAULT_PROPS$2;
|
|
344
|
-
Icon.displayName = COMPONENT_NAME$3;
|
|
345
|
-
|
|
346
250
|
/**
|
|
347
251
|
* Component style.
|
|
348
252
|
*/
|
|
@@ -466,9 +370,9 @@ const Toolbar = () => {
|
|
|
466
370
|
};
|
|
467
371
|
|
|
468
372
|
const _excluded$1 = ["className", "hideToolbar", "license", "$height"];
|
|
469
|
-
const COMPONENT_NAME$
|
|
470
|
-
const CLASSNAME$
|
|
471
|
-
const DEFAULT_PROPS
|
|
373
|
+
const COMPONENT_NAME$1 = 'RedSiftDataGrid';
|
|
374
|
+
const CLASSNAME$1 = 'redsift-data-grid';
|
|
375
|
+
const DEFAULT_PROPS = {
|
|
472
376
|
license: process.env.MUI_LICENSE_KEY,
|
|
473
377
|
$height: '500px'
|
|
474
378
|
};
|
|
@@ -519,268 +423,9 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
519
423
|
})
|
|
520
424
|
})));
|
|
521
425
|
});
|
|
522
|
-
DataGrid.className = CLASSNAME$
|
|
523
|
-
DataGrid.defaultProps = DEFAULT_PROPS
|
|
524
|
-
DataGrid.displayName = COMPONENT_NAME$
|
|
525
|
-
|
|
526
|
-
/** Get types of the values of a record. */
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Component variant.
|
|
530
|
-
*/
|
|
531
|
-
const ShieldVariant = {
|
|
532
|
-
success: 'success',
|
|
533
|
-
successLocked: 'successLocked',
|
|
534
|
-
successUnlocked: 'successUnlocked',
|
|
535
|
-
fail: 'fail',
|
|
536
|
-
failLocked: 'failLocked',
|
|
537
|
-
failUnlocked: 'failUnlocked',
|
|
538
|
-
warning: 'warning',
|
|
539
|
-
warningLocked: 'warningLocked',
|
|
540
|
-
warningUnlocked: 'warningUnlocked',
|
|
541
|
-
noData: 'noData',
|
|
542
|
-
ignored: 'ignored',
|
|
543
|
-
email: 'email',
|
|
544
|
-
question: 'question'
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
const StyledShield = styled.div`
|
|
548
|
-
display: flex;
|
|
549
|
-
margin: 0 8px;
|
|
550
|
-
`;
|
|
551
|
-
|
|
552
|
-
const LockedIcon = _ref => {
|
|
553
|
-
let {
|
|
554
|
-
color
|
|
555
|
-
} = _ref;
|
|
556
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
557
|
-
width: "16.36",
|
|
558
|
-
height: "19.63",
|
|
559
|
-
viewBox: "0 0 20 24",
|
|
560
|
-
fill: "none",
|
|
561
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
562
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
563
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
564
|
-
fill: color
|
|
565
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
566
|
-
d: "M13.5 9.66667H12.9167V8.5C12.9167 6.89 11.61 5.58333 10 5.58333C8.39 5.58333 7.08333 6.89 7.08333 8.5V9.66667H6.5C5.85833 9.66667 5.33333 10.1917 5.33333 10.8333V16.6667C5.33333 17.3083 5.85833 17.8333 6.5 17.8333H13.5C14.1417 17.8333 14.6667 17.3083 14.6667 16.6667V10.8333C14.6667 10.1917 14.1417 9.66667 13.5 9.66667ZM10 14.9167C9.35833 14.9167 8.83333 14.3917 8.83333 13.75C8.83333 13.1083 9.35833 12.5833 10 12.5833C10.6417 12.5833 11.1667 13.1083 11.1667 13.75C11.1667 14.3917 10.6417 14.9167 10 14.9167ZM11.8083 9.66667H8.19167V8.5C8.19167 7.5025 9.0025 6.69167 10 6.69167C10.9975 6.69167 11.8083 7.5025 11.8083 8.5V9.66667Z",
|
|
567
|
-
fill: "white"
|
|
568
|
-
}));
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
const UnlockedIcon = _ref => {
|
|
572
|
-
let {
|
|
573
|
-
color
|
|
574
|
-
} = _ref;
|
|
575
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
576
|
-
width: "16.36",
|
|
577
|
-
height: "19.63",
|
|
578
|
-
viewBox: "0 0 20 24",
|
|
579
|
-
fill: "none",
|
|
580
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
581
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
582
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
583
|
-
fill: color
|
|
584
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
585
|
-
d: "M10 14.9167C10.6417 14.9167 11.1667 14.3917 11.1667 13.75C11.1667 13.1083 10.6417 12.5833 10 12.5833C9.35833 12.5833 8.83333 13.1083 8.83333 13.75C8.83333 14.3917 9.35833 14.9167 10 14.9167ZM13.5 9.66667H12.9167V8.5C12.9167 6.89 11.61 5.58334 10 5.58334C8.39 5.58334 7.08333 6.89 7.08333 8.5H8.19167C8.19167 7.5025 9.0025 6.69167 10 6.69167C10.9975 6.69167 11.8083 7.5025 11.8083 8.5V9.66667H6.5C5.85833 9.66667 5.33333 10.1917 5.33333 10.8333V16.6667C5.33333 17.3083 5.85833 17.8333 6.5 17.8333H13.5C14.1417 17.8333 14.6667 17.3083 14.6667 16.6667V10.8333C14.6667 10.1917 14.1417 9.66667 13.5 9.66667ZM13.5 16.6667H6.5V10.8333H13.5V16.6667Z",
|
|
586
|
-
fill: "white"
|
|
587
|
-
}));
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
const SuccessIcon = _ref => {
|
|
591
|
-
let {
|
|
592
|
-
color
|
|
593
|
-
} = _ref;
|
|
594
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
595
|
-
width: "16.36",
|
|
596
|
-
height: "19.63",
|
|
597
|
-
viewBox: "0 0 20 24",
|
|
598
|
-
fill: "none",
|
|
599
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
600
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
601
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
602
|
-
fill: color
|
|
603
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
604
|
-
fillRule: "evenodd",
|
|
605
|
-
clipRule: "evenodd",
|
|
606
|
-
d: "M8 16.5711L16.4853 8.08579L15.0711 6.67158L8 13.7426L5.17157 10.9142L3.75736 12.3284L8 16.5711Z",
|
|
607
|
-
fill: "white"
|
|
608
|
-
}));
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
const WarningIcon = _ref => {
|
|
612
|
-
let {
|
|
613
|
-
color
|
|
614
|
-
} = _ref;
|
|
615
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
616
|
-
width: "16.36",
|
|
617
|
-
height: "19.63",
|
|
618
|
-
viewBox: "0 0 20 24",
|
|
619
|
-
fill: "none",
|
|
620
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
621
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
622
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
623
|
-
fill: color
|
|
624
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
625
|
-
fillRule: "evenodd",
|
|
626
|
-
clipRule: "evenodd",
|
|
627
|
-
d: "M10 5C10.7177 5 11.3804 5.38457 11.7365 6.00772L15.7365 13.0077C16.0902 13.6267 16.0877 14.3872 15.7298 15.0039C15.372 15.6205 14.7129 16 14 16H6C5.28706 16 4.62802 15.6205 4.27018 15.0039C3.91234 14.3872 3.9098 13.6267 4.26351 13.0077L8.26351 6.00772C8.6196 5.38457 9.28229 5 10 5ZM10 7L6 14H14L10 7Z",
|
|
628
|
-
fill: "white"
|
|
629
|
-
}));
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
const FailIcon = _ref => {
|
|
633
|
-
let {
|
|
634
|
-
color
|
|
635
|
-
} = _ref;
|
|
636
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
637
|
-
width: "16.36",
|
|
638
|
-
height: "19.63",
|
|
639
|
-
viewBox: "0 0 20 24",
|
|
640
|
-
fill: "none",
|
|
641
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
642
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
643
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
644
|
-
fill: color
|
|
645
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
646
|
-
fillRule: "evenodd",
|
|
647
|
-
clipRule: "evenodd",
|
|
648
|
-
d: "M9 15V5H11V15H9Z",
|
|
649
|
-
fill: "white"
|
|
650
|
-
}));
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
const NoDataIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
654
|
-
width: "16.36",
|
|
655
|
-
height: "19.63",
|
|
656
|
-
viewBox: "0 0 20 24",
|
|
657
|
-
fill: "none",
|
|
658
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
659
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
660
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
661
|
-
fill: "#BDBDBD"
|
|
662
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
663
|
-
fillRule: "evenodd",
|
|
664
|
-
clipRule: "evenodd",
|
|
665
|
-
d: "M16 13H4V11H16V13Z",
|
|
666
|
-
fill: "white"
|
|
667
|
-
}));
|
|
668
|
-
|
|
669
|
-
const IgnoredIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
670
|
-
width: "16.36",
|
|
671
|
-
height: "19.63",
|
|
672
|
-
viewBox: "0 0 20 24",
|
|
673
|
-
fill: "none",
|
|
674
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
675
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
676
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
677
|
-
fill: "#BDBDBD"
|
|
678
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
679
|
-
d: "M10 6.16666C6.78 6.16666 4.16667 8.77999 4.16667 12C4.16667 15.22 6.78 17.8333 10 17.8333C13.22 17.8333 15.8333 15.22 15.8333 12C15.8333 8.77999 13.22 6.16666 10 6.16666ZM5.33333 12C5.33333 9.42166 7.42167 7.33332 10 7.33332C11.0792 7.33332 12.0708 7.70082 12.8583 8.31916L6.31917 14.8583C5.70083 14.0708 5.33333 13.0792 5.33333 12ZM10 16.6667C8.92083 16.6667 7.92917 16.2992 7.14167 15.6808L13.6808 9.14166C14.2992 9.92916 14.6667 10.9208 14.6667 12C14.6667 14.5783 12.5783 16.6667 10 16.6667Z",
|
|
680
|
-
fill: "white"
|
|
681
|
-
}));
|
|
682
|
-
|
|
683
|
-
const QuestionIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
684
|
-
width: "16.36",
|
|
685
|
-
height: "19.63",
|
|
686
|
-
viewBox: "0 0 20 24",
|
|
687
|
-
fill: "none",
|
|
688
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
689
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
690
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
691
|
-
fill: "#BDBDBD"
|
|
692
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
693
|
-
d: "M9 17H11V15H9V17ZM10 5C7.79 5 6 6.79 6 9H8C8 7.9 8.9 7 10 7C11.1 7 12 7.9 12 9C12 11 9 10.75 9 14H11C11 11.75 14 11.5 14 9C14 6.79 12.21 5 10 5Z",
|
|
694
|
-
fill: "white"
|
|
695
|
-
}));
|
|
696
|
-
|
|
697
|
-
const EmailIcon = _ref => {
|
|
698
|
-
let {
|
|
699
|
-
color
|
|
700
|
-
} = _ref;
|
|
701
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
702
|
-
width: "16.36",
|
|
703
|
-
height: "19.63",
|
|
704
|
-
viewBox: "0 0 20 24",
|
|
705
|
-
fill: "none",
|
|
706
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
707
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
708
|
-
d: "M10 0L0 4.36364V10.9091C0 16.9636 4.26667 22.6255 10 24C15.7333 22.6255 20 16.9636 20 10.9091V4.36364L10 0Z",
|
|
709
|
-
fill: color
|
|
710
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
711
|
-
d: "M14.6667 6.33334H5.33333C4.69167 6.33334 4.1725 6.85834 4.1725 7.50001L4.16667 14.5C4.16667 15.1417 4.69167 15.6667 5.33333 15.6667H14.6667C15.3083 15.6667 15.8333 15.1417 15.8333 14.5V7.50001C15.8333 6.85834 15.3083 6.33334 14.6667 6.33334ZM14.6667 14.5H5.33333V8.66668L10 11.5833L14.6667 8.66668V14.5ZM10 10.4167L5.33333 7.50001H14.6667L10 10.4167Z",
|
|
712
|
-
fill: "white"
|
|
713
|
-
}));
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
const COMPONENT_NAME$1 = 'RedSiftShield';
|
|
717
|
-
const CLASSNAME$1 = 'redsift-shield';
|
|
718
|
-
const DEFAULT_PROPS = {
|
|
719
|
-
variant: ShieldVariant.success
|
|
720
|
-
};
|
|
721
|
-
const colors = {
|
|
722
|
-
success: '#4caf50',
|
|
723
|
-
warning: '#FCBB54',
|
|
724
|
-
error: '#e06354',
|
|
725
|
-
primary: '#0075da'
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Variant map to icon.
|
|
730
|
-
*/
|
|
731
|
-
const shieldVariantIcons = {
|
|
732
|
-
success: /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
733
|
-
color: colors.success
|
|
734
|
-
}),
|
|
735
|
-
successLocked: /*#__PURE__*/React.createElement(LockedIcon, {
|
|
736
|
-
color: colors.success
|
|
737
|
-
}),
|
|
738
|
-
successUnlocked: /*#__PURE__*/React.createElement(UnlockedIcon, {
|
|
739
|
-
color: colors.success
|
|
740
|
-
}),
|
|
741
|
-
fail: /*#__PURE__*/React.createElement(FailIcon, {
|
|
742
|
-
color: colors.error
|
|
743
|
-
}),
|
|
744
|
-
failLocked: /*#__PURE__*/React.createElement(LockedIcon, {
|
|
745
|
-
color: colors.error
|
|
746
|
-
}),
|
|
747
|
-
failUnlocked: /*#__PURE__*/React.createElement(UnlockedIcon, {
|
|
748
|
-
color: colors.error
|
|
749
|
-
}),
|
|
750
|
-
warning: /*#__PURE__*/React.createElement(WarningIcon, {
|
|
751
|
-
color: colors.warning
|
|
752
|
-
}),
|
|
753
|
-
warningLocked: /*#__PURE__*/React.createElement(LockedIcon, {
|
|
754
|
-
color: colors.warning
|
|
755
|
-
}),
|
|
756
|
-
warningUnlocked: /*#__PURE__*/React.createElement(UnlockedIcon, {
|
|
757
|
-
color: colors.warning
|
|
758
|
-
}),
|
|
759
|
-
noData: /*#__PURE__*/React.createElement(NoDataIcon, null),
|
|
760
|
-
ignored: /*#__PURE__*/React.createElement(IgnoredIcon, null),
|
|
761
|
-
email: /*#__PURE__*/React.createElement(EmailIcon, {
|
|
762
|
-
color: colors.primary
|
|
763
|
-
}),
|
|
764
|
-
question: /*#__PURE__*/React.createElement(QuestionIcon, null)
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* The Shield component.
|
|
769
|
-
*/
|
|
770
|
-
const Shield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
771
|
-
const shieldRef = ref || useRef();
|
|
772
|
-
const {
|
|
773
|
-
className,
|
|
774
|
-
variant
|
|
775
|
-
} = props;
|
|
776
|
-
return /*#__PURE__*/React.createElement(StyledShield, {
|
|
777
|
-
className: classNames(Shield.className, `${Shield.className}-${variant}`, className),
|
|
778
|
-
ref: shieldRef
|
|
779
|
-
}, shieldVariantIcons[variant]);
|
|
780
|
-
});
|
|
781
|
-
Shield.className = CLASSNAME$1;
|
|
782
|
-
Shield.defaultProps = DEFAULT_PROPS;
|
|
783
|
-
Shield.displayName = COMPONENT_NAME$1;
|
|
426
|
+
DataGrid.className = CLASSNAME$1;
|
|
427
|
+
DataGrid.defaultProps = DEFAULT_PROPS;
|
|
428
|
+
DataGrid.displayName = COMPONENT_NAME$1;
|
|
784
429
|
|
|
785
430
|
const StyledTextCell = styled.div`
|
|
786
431
|
display: flex;
|
|
@@ -848,5 +493,5 @@ const TextCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
848
493
|
TextCell.className = CLASSNAME;
|
|
849
494
|
TextCell.displayName = COMPONENT_NAME;
|
|
850
495
|
|
|
851
|
-
export { DataGrid,
|
|
496
|
+
export { CONTAINS_ANY_OF, DataGrid, ENDS_WITH_ANY_OF, IS_ANY_OF, STARTS_WITH_ANY_OF, TextCell, Toolbar, getGridStringArrayOperators };
|
|
852
497
|
//# sourceMappingURL=index.js.map
|