@reltio/pivoting 1.4.1585 → 1.4.1586-mui5
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.ts +1 -0
- package/package.json +39 -24
- package/public/bundle.js +205 -0
- package/public/bundle.js.LICENSE.txt +59 -0
- package/public/package.json +25 -0
- package/scripts/build/index.js +20 -0
- package/src/components/PivotingLayout/PivotingLayout.tsx +34 -0
- package/src/components/PivotingLayout/__tests__/PivotingLayout.specs.tsx +31 -0
- package/src/components/PivotingLayout/styles.ts +30 -0
- package/src/components/PivotingLayoutItem/PivotingLayoutItem.tsx +46 -0
- package/src/components/PivotingLayoutItem/__tests__/PivotingLayoutItem.specs.tsx +58 -0
- package/src/components/PivotingProfileBand/PivotingProfileBand.tsx +46 -0
- package/src/components/PivotingProfileBand/__tests__/PivotingProfileBand.specs.tsx +25 -0
- package/src/components/PivotingProfileBand/styles.ts +67 -0
- package/src/index.ts +3 -0
- package/src/perspective/PivotingPerspective.tsx +78 -0
- package/src/perspective/__tests__/PivotingPerspective.specs.tsx +112 -0
- package/src/perspective/index.tsx +52 -0
- package/src/perspective/styles.ts +16 -0
- package/src/types/PivotingPerspectiveConfig.ts +5 -0
- package/src/types/index.ts +1 -0
- package/tsconfig.json +4 -0
- package/webpack.config.js +10 -0
- package/bundle.js +0 -2
- package/bundle.js.LICENSE.txt +0 -22
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {AdapterMoment} from '@mui/x-date-pickers/AdapterMoment';
|
|
2
|
+
import createGenerateClassName from '@mui/styles/createGenerateClassName';
|
|
3
|
+
import StylesProvider from '@mui/styles/StylesProvider';
|
|
4
|
+
import {LocalizationProvider} from '@mui/x-date-pickers/LocalizationProvider';
|
|
5
|
+
import {ErrorPopup, ViewIdContext} from '@reltio/components';
|
|
6
|
+
import {DashboardPerspectiveConfig, PivotingValue} from '@reltio/mdm-sdk';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import {Provider} from 'react-redux';
|
|
9
|
+
import ReactResizeDetector from 'react-resize-detector';
|
|
10
|
+
import {Store} from 'redux';
|
|
11
|
+
import PivotingPerspectiveView from './PivotingPerspective';
|
|
12
|
+
|
|
13
|
+
const generateClassName = createGenerateClassName({
|
|
14
|
+
productionPrefix: 'pivotingPerspective',
|
|
15
|
+
disableGlobal: true,
|
|
16
|
+
seed: 'pvt'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
type Props = {
|
|
20
|
+
config: DashboardPerspectiveConfig;
|
|
21
|
+
attributeTypeUri: string;
|
|
22
|
+
value: PivotingValue[];
|
|
23
|
+
store: Store<unknown>;
|
|
24
|
+
onResize?: (width: number, height: number) => void;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const PivotingPerspective = ({config, attributeTypeUri, value, store, onResize}: Props) => {
|
|
28
|
+
return (
|
|
29
|
+
<Provider store={store}>
|
|
30
|
+
<ViewIdContext.Provider value={config.id}>
|
|
31
|
+
<StylesProvider generateClassName={generateClassName}>
|
|
32
|
+
<LocalizationProvider dateAdapter={AdapterMoment}>
|
|
33
|
+
<ReactResizeDetector
|
|
34
|
+
handleHeight
|
|
35
|
+
onResize={(width, height) => onResize?.(Math.floor(width), Math.floor(height))}
|
|
36
|
+
/>
|
|
37
|
+
{config && (
|
|
38
|
+
<PivotingPerspectiveView
|
|
39
|
+
value={value}
|
|
40
|
+
config={config}
|
|
41
|
+
attributeTypeUri={attributeTypeUri}
|
|
42
|
+
/>
|
|
43
|
+
)}
|
|
44
|
+
<ErrorPopup />
|
|
45
|
+
</LocalizationProvider>
|
|
46
|
+
</StylesProvider>
|
|
47
|
+
</ViewIdContext.Provider>
|
|
48
|
+
</Provider>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export {PivotingPerspective};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {makeStyles} from '@mui/styles';
|
|
2
|
+
|
|
3
|
+
export const useStyles = makeStyles({
|
|
4
|
+
perspectiveView: {
|
|
5
|
+
position: 'absolute',
|
|
6
|
+
top: 0,
|
|
7
|
+
left: 0,
|
|
8
|
+
right: 0,
|
|
9
|
+
bottom: 0,
|
|
10
|
+
overflowX: 'hidden',
|
|
11
|
+
overflowY: 'auto',
|
|
12
|
+
fontFamily: 'Roboto, Helvetica, Arial, sans-serif',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type {PivotingView} from './PivotingPerspectiveConfig';
|
package/tsconfig.json
ADDED