@redsift/dashboard 7.7.0 → 7.8.0
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/CONTRIBUTING.md +1 -1
- package/index.d.ts +3 -3
- package/index.js +11 -7
- package/index.js.map +1 -1
- package/package.json +4 -4
package/CONTRIBUTING.md
CHANGED
|
@@ -123,7 +123,7 @@ The component should stricly follow the following structure:
|
|
|
123
123
|
```ts
|
|
124
124
|
import React, { forwardRef, RefObject, useRef } from 'react';
|
|
125
125
|
import classNames from 'classnames';
|
|
126
|
-
import { Comp } from '
|
|
126
|
+
import { Comp } from '../../types';
|
|
127
127
|
import { StyledBadge } from './styles';
|
|
128
128
|
import { BadgeProps } from './types';
|
|
129
129
|
|
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as crossfilter2 from 'crossfilter2';
|
|
|
2
2
|
import { Crossfilter, Group as Group$1, NaturallyOrderedValue, Dimension as Dimension$1, ComparableObject, OrderedValueSelector } from 'crossfilter2';
|
|
3
3
|
import { PieChartLabelVariant, PieChartSize, PieChartTheme, PieChartVariant } from '@redsift/charts';
|
|
4
4
|
export { ColorTheme, PieChartLabelVariant, PieChartSize, PieChartTheme, PieChartVariant } from '@redsift/charts';
|
|
5
|
-
import
|
|
5
|
+
import $k7QOs$react, { Ref, ReactElement, ComponentProps, RefObject, MutableRefObject, Dispatch } from 'react';
|
|
6
6
|
import { GridFilterItem, DataGridProps as DataGridProps$1, GridFilterModel } from '@redsift/table';
|
|
7
7
|
import { GridApi } from '@mui/x-data-grid-pro';
|
|
8
8
|
|
|
@@ -299,7 +299,7 @@ interface DashboardProps extends ComponentProps<'div'> {
|
|
|
299
299
|
declare const Dashboard: Comp<DashboardProps, HTMLDivElement>;
|
|
300
300
|
|
|
301
301
|
declare const initialState: DashboardReducerState;
|
|
302
|
-
declare const DashboardContext:
|
|
302
|
+
declare const DashboardContext: $k7QOs$react.Context<DashboardContextProps>;
|
|
303
303
|
|
|
304
304
|
declare const DashboardReducer: (state: DashboardReducerState, action: DashboardReducerAction) => DashboardReducerState;
|
|
305
305
|
|
|
@@ -311,7 +311,7 @@ interface DataGridProps extends Omit<DataGridProps$1, 'rows'> {
|
|
|
311
311
|
onFilter?: (filterModel: GridFilterModel) => void;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
declare const DataGrid:
|
|
314
|
+
declare const DataGrid: $k7QOs$react.FC<DataGridProps>;
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
317
|
* Component size.
|
package/index.js
CHANGED
|
@@ -68,7 +68,7 @@ const NeutralColorPalette = {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Do not edit directly
|
|
71
|
-
* Generated on
|
|
71
|
+
* Generated on Fri, 28 Apr 2023 13:20:47 GMT
|
|
72
72
|
*/
|
|
73
73
|
|
|
74
74
|
const RedsiftColorDefaultPrimary = '#0079e1';
|
|
@@ -1933,7 +1933,7 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
1933
1933
|
return {
|
|
1934
1934
|
focusProps: {
|
|
1935
1935
|
onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,
|
|
1936
|
-
onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur :
|
|
1936
|
+
onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined
|
|
1937
1937
|
}
|
|
1938
1938
|
};
|
|
1939
1939
|
}
|
|
@@ -2261,6 +2261,9 @@ class $9bf71ea28793e738$var$Tree {
|
|
|
2261
2261
|
this.fastMap.set(scopeRef, node);
|
|
2262
2262
|
if (nodeToRestore) node.nodeToRestore = nodeToRestore;
|
|
2263
2263
|
}
|
|
2264
|
+
addNode(node) {
|
|
2265
|
+
this.fastMap.set(node.scopeRef, node);
|
|
2266
|
+
}
|
|
2264
2267
|
removeTreeNode(scopeRef) {
|
|
2265
2268
|
// never remove the root
|
|
2266
2269
|
if (scopeRef === null) return;
|
|
@@ -2271,13 +2274,13 @@ class $9bf71ea28793e738$var$Tree {
|
|
|
2271
2274
|
for (let current of this.traverse())if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;
|
|
2272
2275
|
let children = node.children;
|
|
2273
2276
|
parentNode.removeChild(node);
|
|
2274
|
-
if (children.
|
|
2277
|
+
if (children.size > 0) children.forEach((child)=>parentNode.addChild(child));
|
|
2275
2278
|
this.fastMap.delete(node.scopeRef);
|
|
2276
2279
|
}
|
|
2277
2280
|
// Pre Order Depth First
|
|
2278
2281
|
*traverse(node = this.root) {
|
|
2279
2282
|
if (node.scopeRef != null) yield node;
|
|
2280
|
-
if (node.children.
|
|
2283
|
+
if (node.children.size > 0) for (let child of node.children)yield* this.traverse(child);
|
|
2281
2284
|
}
|
|
2282
2285
|
clone() {
|
|
2283
2286
|
let newTree = new $9bf71ea28793e738$var$Tree();
|
|
@@ -2294,15 +2297,15 @@ class $9bf71ea28793e738$var$Tree {
|
|
|
2294
2297
|
}
|
|
2295
2298
|
class $9bf71ea28793e738$var$TreeNode {
|
|
2296
2299
|
addChild(node) {
|
|
2297
|
-
this.children.
|
|
2300
|
+
this.children.add(node);
|
|
2298
2301
|
node.parent = this;
|
|
2299
2302
|
}
|
|
2300
2303
|
removeChild(node) {
|
|
2301
|
-
this.children.
|
|
2304
|
+
this.children.delete(node);
|
|
2302
2305
|
node.parent = undefined;
|
|
2303
2306
|
}
|
|
2304
2307
|
constructor(props){
|
|
2305
|
-
(_defineProperty$1)(this, "children",
|
|
2308
|
+
(_defineProperty$1)(this, "children", new Set());
|
|
2306
2309
|
(_defineProperty$1)(this, "contain", false);
|
|
2307
2310
|
this.scopeRef = props.scopeRef;
|
|
2308
2311
|
}
|
|
@@ -3612,6 +3615,7 @@ const Checkbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3612
3615
|
"aria-labelledby": ariaLabelledby,
|
|
3613
3616
|
"aria-readonly": isReadOnly,
|
|
3614
3617
|
"aria-required": isRequired,
|
|
3618
|
+
autoFocus: autoFocus,
|
|
3615
3619
|
checked: isSelected ? true : false,
|
|
3616
3620
|
disabled: isDisabled,
|
|
3617
3621
|
name: name,
|