@redsift/dashboard 11.6.0-muiv5-alpha.10 → 11.6.0-muiv5-alpha.11
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/{_internal/context.js → _virtual/_internal/_rollupPluginBabelHelpers.js} +2 -11
- package/_virtual/_internal/_rollupPluginBabelHelpers.js.map +1 -0
- package/components/ChartEmptyState/_internal/ChartEmptyState.js +2 -0
- package/{_internal → components/ChartEmptyState/_internal}/ChartEmptyState2.js +2 -33
- package/components/ChartEmptyState/_internal/ChartEmptyState2.js.map +1 -0
- package/components/ChartEmptyState/_internal/styles.js +35 -0
- package/components/ChartEmptyState/_internal/styles.js.map +1 -0
- package/components/CrossfilterRegistry/_internal/CrossfilterRegistry.js +2 -0
- package/{_internal → components/CrossfilterRegistry/_internal}/CrossfilterRegistry2.js +1 -1
- package/components/CrossfilterRegistry/_internal/CrossfilterRegistry2.js.map +1 -0
- package/components/Dashboard/_internal/Dashboard.js +5 -0
- package/{_internal → components/Dashboard/_internal}/Dashboard.js.map +1 -1
- package/components/Dashboard/_internal/Dashboard2.js +46 -0
- package/components/Dashboard/_internal/Dashboard2.js.map +1 -0
- package/components/Dashboard/_internal/context.js +11 -0
- package/components/Dashboard/_internal/context.js.map +1 -0
- package/{_internal/Dashboard2.js → components/Dashboard/_internal/reducer.js} +4 -44
- package/components/Dashboard/_internal/reducer.js.map +1 -0
- package/{_internal → components/Dashboard/_internal}/types.js +1 -1
- package/components/Dashboard/_internal/types.js.map +1 -0
- package/components/PdfExportButton/_internal/PdfDocument.js +173 -0
- package/components/PdfExportButton/_internal/PdfDocument.js.map +1 -0
- package/components/PdfExportButton/_internal/PdfExportButton.js +2 -0
- package/components/PdfExportButton/_internal/PdfExportButton2.js +110 -0
- package/components/PdfExportButton/_internal/PdfExportButton2.js.map +1 -0
- package/components/PdfExportButton/_internal/styles.js +146 -0
- package/components/PdfExportButton/_internal/styles.js.map +1 -0
- package/components/TimeSeriesBarChart/_internal/TimeSeriesBarChart.js +3 -0
- package/{_internal → components/TimeSeriesBarChart/_internal}/TimeSeriesBarChart.js.map +1 -1
- package/{_internal → components/TimeSeriesBarChart/_internal}/TimeSeriesBarChart2.js +10 -119
- package/components/TimeSeriesBarChart/_internal/TimeSeriesBarChart2.js.map +1 -0
- package/components/TimeSeriesBarChart/_internal/styles.js +98 -0
- package/components/TimeSeriesBarChart/_internal/styles.js.map +1 -0
- package/components/TimeSeriesBarChart/_internal/types.js +22 -0
- package/components/TimeSeriesBarChart/_internal/types.js.map +1 -0
- package/components/WithFilters/_internal/FilterableBarChart.js +152 -0
- package/components/WithFilters/_internal/FilterableBarChart.js.map +1 -0
- package/components/WithFilters/_internal/FilterableDataGrid.js +51 -0
- package/components/WithFilters/_internal/FilterableDataGrid.js.map +1 -0
- package/components/WithFilters/_internal/FilterablePieChart.js +160 -0
- package/components/WithFilters/_internal/FilterablePieChart.js.map +1 -0
- package/components/WithFilters/_internal/FilterableScatterPlot.js +252 -0
- package/components/WithFilters/_internal/FilterableScatterPlot.js.map +1 -0
- package/components/WithFilters/_internal/WithFilters.js +2 -0
- package/components/WithFilters/_internal/WithFilters2.js +36 -0
- package/components/WithFilters/_internal/WithFilters2.js.map +1 -0
- package/hooks/_internal/useCategoricalChartAsListbox.js +94 -0
- package/hooks/_internal/useCategoricalChartAsListbox.js.map +1 -0
- package/index.js +11 -15
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/utils/groupReducers/_internal/groupReduceCount.js +5 -0
- package/utils/groupReducers/_internal/groupReduceCount.js.map +1 -0
- package/utils/groupReducers/_internal/groupReduceSum.js +5 -0
- package/utils/groupReducers/_internal/groupReduceSum.js.map +1 -0
- package/_internal/ChartEmptyState.js +0 -2
- package/_internal/ChartEmptyState2.js.map +0 -1
- package/_internal/CrossfilterRegistry.js +0 -2
- package/_internal/CrossfilterRegistry2.js.map +0 -1
- package/_internal/Dashboard.js +0 -4
- package/_internal/Dashboard2.js.map +0 -1
- package/_internal/PdfExportButton.js +0 -2
- package/_internal/PdfExportButton2.js +0 -417
- package/_internal/PdfExportButton2.js.map +0 -1
- package/_internal/TimeSeriesBarChart.js +0 -2
- package/_internal/TimeSeriesBarChart2.js.map +0 -1
- package/_internal/WithFilters.js +0 -2
- package/_internal/WithFilters2.js +0 -701
- package/_internal/WithFilters2.js.map +0 -1
- package/_internal/context.js.map +0 -1
- package/_internal/types.js.map +0 -1
- /package/{_internal → components/ChartEmptyState/_internal}/ChartEmptyState.js.map +0 -0
- /package/{_internal → components/CrossfilterRegistry/_internal}/CrossfilterRegistry.js.map +0 -0
- /package/{_internal → components/PdfExportButton/_internal}/PdfExportButton.js.map +0 -0
- /package/{_internal → components/WithFilters/_internal}/WithFilters.js.map +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
function ownKeys(object, enumerableOnly) {
|
|
4
2
|
var keys = Object.keys(object);
|
|
5
3
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -91,12 +89,5 @@ function _toPropertyKey(arg) {
|
|
|
91
89
|
return typeof key === "symbol" ? key : String(key);
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
const DashboardContext = /*#__PURE__*/React.createContext({
|
|
98
|
-
state: initialState
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
export { DashboardContext as D, _objectSpread2 as _, _objectWithoutProperties as a, _extends as b, initialState as i };
|
|
102
|
-
//# sourceMappingURL=context.js.map
|
|
92
|
+
export { _defineProperty as defineProperty, _extends as extends, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey };
|
|
93
|
+
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,37 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { mdiRefresh } from '@redsift/icons';
|
|
3
|
-
import
|
|
4
|
-
import { Button } from '@redsift/design-system';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component style.
|
|
8
|
-
*/
|
|
9
|
-
const StyledChartEmptyState = styled.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
|
-
margin-top: 16px;
|
|
15
|
-
|
|
16
|
-
.redsift-chart-empty-state__title {
|
|
17
|
-
font-family: var(--redsift-typography-h4-font-family);
|
|
18
|
-
font-size: var(--redsift-typography-h4-font-size);
|
|
19
|
-
font-weight: var(--redsift-typography-h4-font-weight);
|
|
20
|
-
line-height: var(--redsift-typography-h4-line-height);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.redsift-chart-empty-state__subtitle {
|
|
24
|
-
font-family: var(--redsift-typography-body-font-family);
|
|
25
|
-
font-size: var(--redsift-typography-body-font-size);
|
|
26
|
-
font-weight: var(--redsift-typography-body-font-weight);
|
|
27
|
-
line-height: var(--redsift-typography-body-line-height);
|
|
28
|
-
margin-top: 8px;
|
|
29
|
-
text-align: center;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
const StyledResetButton = styled(Button)`
|
|
33
|
-
margin-top: 8px;
|
|
34
|
-
`;
|
|
3
|
+
import { StyledChartEmptyState, StyledResetButton } from './styles.js';
|
|
35
4
|
|
|
36
5
|
const COMPONENT_NAME = 'ChartEmptyState';
|
|
37
6
|
const CLASSNAME = 'redsift-chart-empty-state';
|
|
@@ -150,5 +119,5 @@ const ChartEmptyState = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
150
119
|
ChartEmptyState.className = CLASSNAME;
|
|
151
120
|
ChartEmptyState.displayName = COMPONENT_NAME;
|
|
152
121
|
|
|
153
|
-
export { ChartEmptyState
|
|
122
|
+
export { ChartEmptyState };
|
|
154
123
|
//# sourceMappingURL=ChartEmptyState2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartEmptyState2.js","sources":["../../../../src/components/ChartEmptyState/ChartEmptyState.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport { mdiRefresh } from '@redsift/icons';\nimport { Comp } from '@redsift/design-system';\n\nimport { ChartEmptyStateProps } from './types';\nimport { StyledChartEmptyState, StyledResetButton } from './styles';\n\nconst COMPONENT_NAME = 'ChartEmptyState';\nconst CLASSNAME = 'redsift-chart-empty-state';\n\nexport const ChartEmptyState: Comp<ChartEmptyStateProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n onReset,\n title = 'No Data Available',\n subtitle = 'Please check the applied filters',\n resetLabel = 'Reset all filters',\n } = props;\n\n return (\n <StyledChartEmptyState ref={ref as RefObject<HTMLDivElement>} className=\"redsift-chart-empty-state\">\n <div className={`${ChartEmptyState.className}__img`}>\n <svg width=\"86\" height=\"86\" viewBox=\"0 0 86 86\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n opacity=\"0.2\"\n d=\"M43 86C66.7482 86 86 66.7482 86 43C86 19.2518 66.7482 0 43 0C19.2518 0 0 19.2518 0 43C0 66.7482 19.2518 86 43 86Z\"\n fill=\"#4285F4\"\n />\n <path\n opacity=\"0.4\"\n d=\"M13.4479 45.9299C13.4479 44.8254 14.3434 43.9299 15.4479 43.9299H29.3785C30.4831 43.9299 31.3785 44.8254 31.3785 45.9299V60.0675H13.4479V45.9299Z\"\n fill=\"#4285F4\"\n />\n <path\n opacity=\"0.4\"\n d=\"M34.0681 27.9993C34.0681 26.8948 34.9636 25.9993 36.0681 25.9993H49.9987C51.1033 25.9993 51.9987 26.8948 51.9987 27.9993V60.0675H34.0681V27.9993Z\"\n fill=\"#4285F4\"\n />\n <path\n opacity=\"0.4\"\n d=\"M54.6883 53.1022C54.6883 51.9976 55.5837 51.1022 56.6883 51.1022H70.6189C71.7235 51.1022 72.6189 51.9976 72.6189 53.1022V60.0675H54.6883V53.1022Z\"\n fill=\"#4285F4\"\n />\n <line x1=\"10.3618\" y1=\"60.464\" x2=\"75.705\" y2=\"60.464\" stroke=\"#305AA2\" strokeLinecap=\"round\" />\n <path d=\"M48.7345 25.9993H46.9414L51.9987 28.9192V27.8839L48.7345 25.9993Z\" fill=\"#4285F4\" />\n <path d=\"M41.5622 25.9993L51.9987 32.0249V30.9896L43.3553 25.9993H41.5622Z\" fill=\"#4285F4\" />\n <path d=\"M36.183 25.9993L51.9987 35.1305V34.0953L37.9761 25.9993H36.183Z\" fill=\"#4285F4\" />\n <path\n d=\"M34.0771 27.622C34.0681 27.6758 34.0681 27.7296 34.0681 27.7924V27.8839L51.9987 38.2362V37.201L34.281 26.9716C34.1776 27.171 34.097 27.3834 34.0771 27.622Z\"\n fill=\"#4285F4\"\n />\n <path d=\"M34.0681 30.9896L51.9987 41.3418V40.3066L34.0681 29.9544V30.9896Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 34.0953L51.9987 44.4475V43.4123L34.0681 33.06V34.0953Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 37.2009L51.9987 47.5531V46.518L34.0681 36.1657V37.2009Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 40.3066L51.9987 50.6588V49.6236L34.0681 39.2714V40.3066Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 43.4123L51.9987 53.7645V52.7293L34.0681 42.377V43.4123Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 46.518L51.9987 56.8702V55.835L34.0681 45.4827V46.518Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 49.6236L51.9987 59.9759V58.9407L34.0681 48.5884V49.6236Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 52.7293L46.7782 60.0675H48.5712L34.0681 51.6941V52.7293Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 55.835L41.399 60.0675H43.192L34.0681 54.7997V55.835Z\" fill=\"#4285F4\" />\n <path d=\"M34.0681 58.9406L36.0198 60.0675H37.8129L34.0681 57.9054V58.9406Z\" fill=\"#4285F4\" />\n <circle\n opacity=\"0.6\"\n cx=\"50.5506\"\n cy=\"29.9304\"\n r=\"10.1549\"\n transform=\"rotate(-45 50.5506 29.9304)\"\n fill=\"white\"\n stroke=\"#305AA2\"\n strokeWidth=\"3\"\n />\n <circle\n cx=\"50.5506\"\n cy=\"29.9304\"\n r=\"10.1549\"\n transform=\"rotate(-45 50.5506 29.9304)\"\n stroke=\"#305AA2\"\n strokeWidth=\"3\"\n />\n <path\n d=\"M59.2186 36.4771L58.1579 35.4164L56.0366 37.5377L57.0973 38.5984L59.2186 36.4771ZM65.9725 47.4736C66.5582 48.0594 67.508 48.0594 68.0938 47.4736C68.6796 46.8878 68.6796 45.938 68.0938 45.3522L65.9725 47.4736ZM57.0973 38.5984L65.9725 47.4736L68.0938 45.3522L59.2186 36.4771L57.0973 38.5984Z\"\n fill=\"#305AA2\"\n />\n </svg>\n </div>\n <div className={`${ChartEmptyState.className}__title`}>{title}</div>\n <div className={`${ChartEmptyState.className}__subtitle`}>{subtitle}</div>\n {onReset ? (\n <StyledResetButton variant=\"unstyled\" leftIcon={mdiRefresh} onClick={onReset}>\n {resetLabel}\n </StyledResetButton>\n ) : null}\n </StyledChartEmptyState>\n );\n});\n\nChartEmptyState.className = CLASSNAME;\nChartEmptyState.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","ChartEmptyState","forwardRef","props","ref","onReset","title","subtitle","resetLabel","React","createElement","StyledChartEmptyState","className","width","height","viewBox","fill","xmlns","opacity","d","x1","y1","x2","y2","stroke","strokeLinecap","cx","cy","r","transform","strokeWidth","StyledResetBut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-components';
|
|
2
|
+
import { Button } from '@redsift/design-system';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledChartEmptyState = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
margin-top: 16px;
|
|
13
|
+
|
|
14
|
+
.redsift-chart-empty-state__title {
|
|
15
|
+
font-family: var(--redsift-typography-h4-font-family);
|
|
16
|
+
font-size: var(--redsift-typography-h4-font-size);
|
|
17
|
+
font-weight: var(--redsift-typography-h4-font-weight);
|
|
18
|
+
line-height: var(--redsift-typography-h4-line-height);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.redsift-chart-empty-state__subtitle {
|
|
22
|
+
font-family: var(--redsift-typography-body-font-family);
|
|
23
|
+
font-size: var(--redsift-typography-body-font-size);
|
|
24
|
+
font-weight: var(--redsift-typography-body-font-weight);
|
|
25
|
+
line-height: var(--redsift-typography-body-line-height);
|
|
26
|
+
margin-top: 8px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
const StyledResetButton = styled(Button)`
|
|
31
|
+
margin-top: 8px;
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export { StyledChartEmptyState, StyledResetButton };
|
|
35
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/ChartEmptyState/styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Button } from '@redsift/design-system';\n\n/**\n * Component style.\n */\nexport const StyledChartEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: 16px;\n\n .redsift-chart-empty-state__title {\n font-family: var(--redsift-typography-h4-font-family);\n font-size: var(--redsift-typography-h4-font-size);\n font-weight: var(--redsift-typography-h4-font-weight);\n line-height: var(--redsift-typography-h4-line-height);\n }\n\n .redsift-chart-empty-state__subtitle {\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n margin-top: 8px;\n text-align: center;\n }\n`;\n\nexport const StyledResetButton = styled(Button)`\n margin-top: 8px;\n`;\n"],"names":["StyledChartEmptyState","styled","div","StyledResetButton","Button"],"mappings":";;;AAGA;AACA;AACA;AACaA,MAAAA,qBAAqB,GAAGC,MAAM,CAACC,GAAI,CAAA;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;MAEYC,iBAAiB,GAAGF,MAAM,CAACG,MAAM,CAAE,CAAA;AAChD;AACA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossfilterRegistry2.js","sources":["../../../../src/components/CrossfilterRegistry/CrossfilterRegistry.ts"],"sourcesContent":["import { JSONArray, TNdx } from '../../types';\nimport crossfilter from 'crossfilter2';\n\nexport const CrossfilterRegistry = (() => {\n const instances = new WeakMap<JSONArray, TNdx>();\n\n const get = (data: JSONArray): TNdx => {\n let instance = instances.get(data);\n\n if (!instance) {\n instance = crossfilter(data);\n instances.set(data, instance);\n }\n\n return instance;\n };\n\n const remove = (data: JSONArray): void => {\n instances.delete(data);\n };\n\n return {\n get,\n remove,\n };\n})();\n"],"names":["CrossfilterRegistry","instances","WeakMap","get","data","instance","crossfilter","set","remove","delete"],"mappings":";;AAGaA,MAAAA,mBAAmB,GAAG,CAAC,MAAM;AACxC,EAAA,MAAMC,SAAS,GAAG,IAAIC,OAAO,EAAmB,CAAA;EAEhD,MAAMC,GAAG,GAAIC,IAAe,IAAW;AACrC,IAAA,IAAIC,QAAQ,GAAGJ,SAAS,CAACE,GAAG,CAACC,IAAI,CAAC,CAAA;IAElC,IAAI,CAACC,QAAQ,EAAE;AACbA,MAAAA,QAAQ,GAAGC,WAAW,CAACF,IAAI,CAAC,CAAA;AAC5BH,MAAAA,SAAS,CAACM,GAAG,CAACH,IAAI,EAAEC,QAAQ,CAAC,CAAA;AAC/B,KAAA;AAEA,IAAA,OAAOA,QAAQ,CAAA;GAChB,CAAA;EAED,MAAMG,MAAM,GAAIJ,IAAe,IAAW;AACxCH,IAAAA,SAAS,CAACQ,MAAM,CAACL,IAAI,CAAC,CAAA;GACvB,CAAA;EAED,OAAO;IACLD,GAAG;AACHK,IAAAA,MAAAA;GACD,CAAA;AACH,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_internal/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { forwardRef, useRef, useState, useReducer, useMemo } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useGridApiRef } from '@mui/x-data-grid-pro';
|
|
5
|
+
import { DashboardContext } from './context.js';
|
|
6
|
+
import { DashboardReducer } from './reducer.js';
|
|
7
|
+
import { CrossfilterRegistry } from '../../CrossfilterRegistry/_internal/CrossfilterRegistry2.js';
|
|
8
|
+
|
|
9
|
+
const _excluded = ["children", "className", "data", "dataGridApiRef"];
|
|
10
|
+
const COMPONENT_NAME = 'Dashboard';
|
|
11
|
+
const CLASSNAME = 'redsift-dashboard-container';
|
|
12
|
+
const Dashboard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
13
|
+
const {
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
data,
|
|
17
|
+
dataGridApiRef: propsDataGridApiRef
|
|
18
|
+
} = props,
|
|
19
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
20
|
+
const providerRef = ref || useRef();
|
|
21
|
+
const dataGridApiRef = propsDataGridApiRef || useGridApiRef();
|
|
22
|
+
const [updateContext, setUpdateContext] = useState(false);
|
|
23
|
+
const [state, dispatch] = useReducer(DashboardReducer, {
|
|
24
|
+
tableFilters: []
|
|
25
|
+
});
|
|
26
|
+
const value = useMemo(() => ({
|
|
27
|
+
dashboardRef: providerRef,
|
|
28
|
+
data,
|
|
29
|
+
dataGridApiRef,
|
|
30
|
+
dispatch,
|
|
31
|
+
ndx: CrossfilterRegistry.get(data),
|
|
32
|
+
state,
|
|
33
|
+
toggleUpdateContext: () => setUpdateContext(!updateContext)
|
|
34
|
+
}), [data, state, updateContext]);
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, forwardedProps, {
|
|
36
|
+
className: classNames(Dashboard.className, className),
|
|
37
|
+
ref: providerRef
|
|
38
|
+
}), /*#__PURE__*/React.createElement(DashboardContext.Provider, {
|
|
39
|
+
value: value
|
|
40
|
+
}, children));
|
|
41
|
+
});
|
|
42
|
+
Dashboard.className = CLASSNAME;
|
|
43
|
+
Dashboard.displayName = COMPONENT_NAME;
|
|
44
|
+
|
|
45
|
+
export { Dashboard };
|
|
46
|
+
//# sourceMappingURL=Dashboard2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard2.js","sources":["../../../../src/components/Dashboard/Dashboard.tsx"],"sourcesContent":["import React, { forwardRef, RefObject, useMemo, useReducer, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { useGridApiRef } from '@mui/x-data-grid-pro';\n\nimport { Comp } from '@redsift/design-system';\nimport { DashboardContext } from './context';\nimport { DashboardContextProps, DashboardProps } from './types';\nimport { DashboardReducer } from './reducer';\nimport { CrossfilterRegistry } from '../CrossfilterRegistry';\n\nconst COMPONENT_NAME = 'Dashboard';\nconst CLASSNAME = 'redsift-dashboard-container';\n\nexport const Dashboard: Comp<DashboardProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, data, dataGridApiRef: propsDataGridApiRef, ...forwardedProps } = props;\n\n const providerRef = ref || useRef<HTMLDivElement>();\n const dataGridApiRef = propsDataGridApiRef || useGridApiRef();\n const [updateContext, setUpdateContext] = useState(false);\n\n const [state, dispatch] = useReducer(DashboardReducer, {\n tableFilters: [],\n });\n\n const value = useMemo<DashboardContextProps>(\n () => ({\n dashboardRef: providerRef as RefObject<HTMLDivElement>,\n data,\n dataGridApiRef,\n dispatch,\n ndx: CrossfilterRegistry.get(data),\n state,\n toggleUpdateContext: () => setUpdateContext(!updateContext),\n }),\n [data, state, updateContext]\n );\n\n return (\n <div\n {...forwardedProps}\n className={classNames(Dashboard.className, className)}\n ref={providerRef as RefObject<HTMLDivElement>}\n >\n <DashboardContext.Provider value={value as DashboardContextProps}>{children}</DashboardContext.Provider>\n </div>\n );\n});\nDashboard.className = CLASSNAME;\nDashboard.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","Dashboard","forwardRef","props","ref","children","className","data","dataGridApiRef","propsDataGridApiRef","forwardedProps","_objectWithoutProperties","_excluded","providerRef","useRef","useGridApiRef","updateContext","setUpdateContext","useState","state","dispatch","useReducer","DashboardReducer","tableFilters","value","useMemo","dashboardRef","ndx","CrossfilterRegistry","get","toggleUpdateContext","React","createElement","_extends","classNames","DashboardContext","Provider","displayName"],"mappings":";;;;;;;;;AAUA,MAAMA,cAAc,GAAG,WAAW,CAAA;AAClC,MAAMC,SAAS,GAAG,6BAA6B,CAAA;AAExC,MAAMC,SAA+C,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACxF,MAAM;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,IAAI;AAAEC,MAAAA,cAAc,EAAEC,mBAAAA;AAAuC,KAAC,GAAGN,KAAK;AAAxBO,IAAAA,cAAc,GAAAC,wBAAA,CAAKR,KAAK,EAAAS,SAAA,CAAA,CAAA;AAEn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context.ts"],"sourcesContent":["import React from 'react';\nimport { DashboardContextProps, DashboardReducerState } from './types';\n\nexport const initialState: DashboardReducerState = {\n tableFilters: [],\n};\n\nexport const DashboardContext = React.createContext<DashboardContextProps>({\n state: initialState,\n} as DashboardContextProps);\n"],"names":["initialState","tableFilters","DashboardContext","React","createContext","state"],"mappings":";;AAGO,MAAMA,YAAmC,GAAG;AACjDC,EAAAA,YAAY,EAAE,EAAA;AAChB,EAAC;MAEYC,gBAAgB,gBAAGC,KAAK,CAACC,aAAa,CAAwB;AACzEC,EAAAA,KAAK,EAAEL,YAAAA;AACT,CAA0B;;;;"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import { useGridApiRef } from '@mui/x-data-grid-pro';
|
|
5
|
-
import { D as DashboardReducerActionType } from './types.js';
|
|
6
|
-
import { C as CrossfilterRegistry } from './CrossfilterRegistry2.js';
|
|
1
|
+
import { objectSpread2 as _objectSpread2 } from '../../../_virtual/_internal/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { DashboardReducerActionType } from './types.js';
|
|
7
3
|
|
|
8
4
|
const areEquals = (tableFilter, actionFilter) => {
|
|
9
5
|
return tableFilter.columnField === actionFilter.columnField && tableFilter.operatorValue === actionFilter.operatorValue;
|
|
@@ -61,41 +57,5 @@ const DashboardReducer = (state, action) => {
|
|
|
61
57
|
}
|
|
62
58
|
};
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const CLASSNAME = 'redsift-dashboard-container';
|
|
67
|
-
const Dashboard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
68
|
-
const {
|
|
69
|
-
children,
|
|
70
|
-
className,
|
|
71
|
-
data,
|
|
72
|
-
dataGridApiRef: propsDataGridApiRef
|
|
73
|
-
} = props,
|
|
74
|
-
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
75
|
-
const providerRef = ref || useRef();
|
|
76
|
-
const dataGridApiRef = propsDataGridApiRef || useGridApiRef();
|
|
77
|
-
const [updateContext, setUpdateContext] = useState(false);
|
|
78
|
-
const [state, dispatch] = useReducer(DashboardReducer, {
|
|
79
|
-
tableFilters: []
|
|
80
|
-
});
|
|
81
|
-
const value = useMemo(() => ({
|
|
82
|
-
dashboardRef: providerRef,
|
|
83
|
-
data,
|
|
84
|
-
dataGridApiRef,
|
|
85
|
-
dispatch,
|
|
86
|
-
ndx: CrossfilterRegistry.get(data),
|
|
87
|
-
state,
|
|
88
|
-
toggleUpdateContext: () => setUpdateContext(!updateContext)
|
|
89
|
-
}), [data, state, updateContext]);
|
|
90
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, forwardedProps, {
|
|
91
|
-
className: classNames(Dashboard.className, className),
|
|
92
|
-
ref: providerRef
|
|
93
|
-
}), /*#__PURE__*/React.createElement(DashboardContext.Provider, {
|
|
94
|
-
value: value
|
|
95
|
-
}, children));
|
|
96
|
-
});
|
|
97
|
-
Dashboard.className = CLASSNAME;
|
|
98
|
-
Dashboard.displayName = COMPONENT_NAME;
|
|
99
|
-
|
|
100
|
-
export { Dashboard as D, DashboardReducer as a };
|
|
101
|
-
//# sourceMappingURL=Dashboard2.js.map
|
|
60
|
+
export { DashboardReducer };
|
|
61
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.js","sources":["../../../../src/components/Dashboard/reducer.ts"],"sourcesContent":["import { GridFilterItem } from '@redsift/table';\nimport {\n DashboardReducerState,\n DashboardReducerAction,\n DashboardReducerActionType,\n} from './types';\n\nconst areEquals = (\n tableFilter: GridFilterItem,\n actionFilter: GridFilterItem\n) => {\n return (\n tableFilter.columnField === actionFilter.columnField &&\n tableFilter.operatorValue === actionFilter.operatorValue\n );\n};\n\nconst addOrUpdateFilter = (\n oldFilters: GridFilterItem[],\n newFilter: GridFilterItem\n) => {\n if (oldFilters.find((f) => areEquals(f, newFilter))) {\n return oldFilters.map((f) => {\n if (areEquals(f, newFilter)) {\n return newFilter;\n }\n return f;\n });\n } else {\n return [...oldFilters, newFilter];\n }\n};\n\nconst addOrUpdateFilters = (\n oldFilters: GridFilterItem[],\n newFilters: GridFilterItem[]\n) => {\n let updatedFilters = oldFilters;\n for (let i = 0; i < newFilters.length; i++) {\n updatedFilters = addOrUpdateFilter(updatedFilters, newFilters[i]);\n }\n return updatedFilters;\n};\n\nconst replaceFilters = (newFilters: GridFilterItem | GridFilterItem[]) => {\n return Array.isArray(newFilters) ? newFilters : [newFilters];\n};\n\nconst removeFilter = (\n oldFilters: GridFilterItem[],\n newFilter: GridFilterItem\n) => {\n return oldFilters.filter((f) => !areEquals(f, newFilter));\n};\n\nconst removeAllFilters = () => {\n return [] as GridFilterItem[];\n};\n\nexport const DashboardReducer = (\n state: DashboardReducerState,\n action: DashboardReducerAction\n): DashboardReducerState => {\n switch (action.type) {\n case DashboardReducerActionType.ResetFilter:\n return {\n ...state,\n tableFilters: removeFilter(\n state.tableFilters,\n action.filter as GridFilterItem\n ),\n };\n case DashboardReducerActionType.ResetFilters:\n return { ...state, tableFilters: removeAllFilters() };\n case DashboardReducerActionType.FilterTable:\n return {\n ...state,\n tableFilters: addOrUpdateFilter(\n state.tableFilters,\n action.filter as GridFilterItem\n ),\n };\n\n case DashboardReducerActionType.FilterTableBatch:\n return {\n ...state,\n tableFilters: replaceFilters(action.filter!),\n };\n\n case DashboardReducerActionType.AppendFilterTableBatch:\n return {\n ...state,\n tableFilters: addOrUpdateFilters(\n state.tableFilters,\n action.filter as GridFilterItem[]\n ),\n };\n }\n};\n"],"names":["areEquals","tableFilter","actionFilter","columnField","operatorValue","addOrUpdateFilter","oldFilters","newFilter","find","f","map","addOrUpdateFilters","newFilters","updatedFilters","i","length","replaceFilters","Array","isArray","removeFilter","filter","removeAllFilters","DashboardReducer","state","action","type","DashboardReducerActionType","ResetFilter","_objectSpread","tableFilters","ResetFilters","FilterTable","FilterTableBatch","AppendFilterTableBatch"],"m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,MAAA,OAAAL,cAAA,CAAAA,cAAA,CAAA,EAAA,EACKL,KAAK,CAAA,EAAA,EAAA,EAAA;QACRM,YAAY,EAAElB,kBAAkB,CAC9BY,KAAK,CAACM,YAAY,EAClBL,MAAM,CAACJ,MACT,CAAA;AAAC,OAAA,CAAA,CAAA;AAEP,GAAA;AACF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../src/components/Dashboard/types.ts"],"sourcesContent":["import { ComponentProps, Dispatch, MutableRefObject, RefObject } from 'react';\nimport { GridFilterItem } from '@redsift/table';\nimport { GridApi } from '@mui/x-data-grid-pro';\n\nimport { JSONArray } from '../../types';\n\n/**\n * Context props.\n */\nexport type DashboardContextProps = {\n dashboardRef?: RefObject<HTMLDivElement>;\n data: JSONArray;\n dataGridApiRef?: MutableRefObject<GridApi>;\n dispatch: Dispatch<DashboardReducerAction>;\n state: DashboardReducerState;\n toggleUpdateContext?: () => void;\n};\n\n/**\n * Reducer props.\n */\nexport type DashboardReducerState = {\n tableFilters: GridFilterItem[];\n};\n\nexport enum DashboardReducerActionType {\n ResetFilter = 'reset-filter',\n ResetFilters = 'reset-filters',\n FilterTable = 'filter-table',\n FilterTableBatch = 'filter-table-batch',\n AppendFilterTableBatch = 'append-filter-table-batch',\n}\n\nexport type DashboardReducerAction = {\n type: DashboardReducerActionType;\n filter?: GridFilterItem | GridFilterItem[];\n};\n\n/**\n * Component props.\n */\nexport interface DashboardProps extends ComponentProps<'div'> {\n /** Dataset that will be share across every components within the dashboard. */\n data: JSONArray;\n /** Datagrid API Ref. */\n dataGridApiRef?: MutableRefObject<GridApi>;\n}\n"],"names":["DashboardReducerActionType"],"mappings":"AAMA;AACA;AACA;;AAUA;AACA;AACA;;AAKYA,IAAAA,0BAA0B,0BAA1BA,0BAA0B,EAAA;EAA1BA,0BAA0B,CAAA,aAAA,CAAA,GAAA,cAAA,CAAA;EAA1BA,0BAA0B,CAAA,cAAA,CAAA,GAAA,eAAA,CAAA;EAA1BA,0BAA0B,CAAA,aAAA,CAAA,GAAA,cAAA,CAAA;EAA1BA,0BAA0B,CAAA,kBAAA,CAAA,GAAA,oBAAA,CAAA;EAA1BA,0BAA0B,CAAA,wBAAA,CAAA,GAAA,2BAAA,CAAA;AAAA,EAAA,OAA1BA,0BAA0B,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;;AAatC;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Document, Page, View, Image, Text } from '@react-pdf/renderer';
|
|
3
|
+
import { getPdfStyles } from './styles.js';
|
|
4
|
+
|
|
5
|
+
// istanbul ignore file
|
|
6
|
+
const DEFAULT_COLUMN_WIDTH = 100;
|
|
7
|
+
const getWidthColumn = (width, totalW, nrColumns) => {
|
|
8
|
+
// calculation width column where the 7px margin between the columns is included
|
|
9
|
+
return `${Math.round(width * 100 / (totalW - 7 * (nrColumns - 1)))}%`;
|
|
10
|
+
};
|
|
11
|
+
const PdfTableRow = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
rowIndex,
|
|
14
|
+
rowData,
|
|
15
|
+
columns,
|
|
16
|
+
styles,
|
|
17
|
+
totalWidth
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
20
|
+
style: styles.tableRowContainer,
|
|
21
|
+
key: `row-${rowIndex}`
|
|
22
|
+
}, columns.map((column, index) => {
|
|
23
|
+
const {
|
|
24
|
+
field,
|
|
25
|
+
width
|
|
26
|
+
} = column;
|
|
27
|
+
let totalW = totalWidth;
|
|
28
|
+
let nrColumns = columns.length;
|
|
29
|
+
|
|
30
|
+
// The checkbox in the table will not be printed
|
|
31
|
+
if (field === '__check__') {
|
|
32
|
+
totalW = totalW - (width || 50);
|
|
33
|
+
nrColumns = nrColumns - 1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const widthColumn = getWidthColumn(width || DEFAULT_COLUMN_WIDTH, totalW, nrColumns);
|
|
37
|
+
|
|
38
|
+
// Empty value will print '-'
|
|
39
|
+
if (!rowData[field]) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
41
|
+
style: {
|
|
42
|
+
width: widthColumn,
|
|
43
|
+
paddingVertical: 2,
|
|
44
|
+
marginRight: 7
|
|
45
|
+
},
|
|
46
|
+
key: `cell-${rowIndex}-${index}`
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
style: styles.tableCellText
|
|
49
|
+
}, '-'));
|
|
50
|
+
}
|
|
51
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: {
|
|
53
|
+
width: widthColumn,
|
|
54
|
+
paddingVertical: 2,
|
|
55
|
+
marginRight: 7
|
|
56
|
+
},
|
|
57
|
+
key: `cell-${rowIndex}-${index}`
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
59
|
+
style: styles.tableCellText
|
|
60
|
+
}, Array.isArray(rowData[field]) ? rowData[field].join(', ') : rowData[field]));
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
const PdfTable = _ref2 => {
|
|
64
|
+
let {
|
|
65
|
+
dataTable,
|
|
66
|
+
styles,
|
|
67
|
+
localeText
|
|
68
|
+
} = _ref2;
|
|
69
|
+
const {
|
|
70
|
+
data,
|
|
71
|
+
columns,
|
|
72
|
+
totalWidth
|
|
73
|
+
} = dataTable;
|
|
74
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
|
|
75
|
+
style: styles.tableHeaderContainer
|
|
76
|
+
}, columns.map(column => {
|
|
77
|
+
let totalW = totalWidth;
|
|
78
|
+
let nrColumns = columns.length;
|
|
79
|
+
const {
|
|
80
|
+
field,
|
|
81
|
+
headerName,
|
|
82
|
+
width
|
|
83
|
+
} = column;
|
|
84
|
+
|
|
85
|
+
// The checkbox in the table will not be printed
|
|
86
|
+
if (field === '__check__') {
|
|
87
|
+
totalW = totalW - (width || 50);
|
|
88
|
+
nrColumns = nrColumns - 1;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const widthColumn = getWidthColumn(width || DEFAULT_COLUMN_WIDTH, totalW, nrColumns);
|
|
92
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
93
|
+
style: {
|
|
94
|
+
width: widthColumn,
|
|
95
|
+
paddingVertical: 2,
|
|
96
|
+
marginRight: 7
|
|
97
|
+
},
|
|
98
|
+
key: `heading-${field}`
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
100
|
+
style: styles.tableCellHeaderText
|
|
101
|
+
}, headerName));
|
|
102
|
+
})), /*#__PURE__*/React.createElement(View, null, data.map((row, index) => {
|
|
103
|
+
if (index < 1000) {
|
|
104
|
+
return /*#__PURE__*/React.createElement(PdfTableRow, {
|
|
105
|
+
key: index,
|
|
106
|
+
rowIndex: index,
|
|
107
|
+
rowData: data[index],
|
|
108
|
+
columns: columns,
|
|
109
|
+
styles: styles,
|
|
110
|
+
totalWidth: totalWidth
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
})), data.length >= 1000 ? /*#__PURE__*/React.createElement(View, {
|
|
114
|
+
style: styles.constraintsContainer
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
116
|
+
style: styles.constraints
|
|
117
|
+
}, (localeText === null || localeText === void 0 ? void 0 : localeText.maxSizeDisclaimer) || 'Due to processing constraints this pdf is limited to the first 1000 rows of data.')) : null);
|
|
118
|
+
};
|
|
119
|
+
const Pagination = _ref3 => {
|
|
120
|
+
let {
|
|
121
|
+
styles
|
|
122
|
+
} = _ref3;
|
|
123
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
124
|
+
style: styles.pageNumber,
|
|
125
|
+
render: _ref4 => {
|
|
126
|
+
let {
|
|
127
|
+
pageNumber,
|
|
128
|
+
totalPages
|
|
129
|
+
} = _ref4;
|
|
130
|
+
return `${pageNumber}/${totalPages}`;
|
|
131
|
+
},
|
|
132
|
+
fixed: true
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
const PdfDocument = _ref5 => {
|
|
136
|
+
let {
|
|
137
|
+
dashboardImage,
|
|
138
|
+
introduction,
|
|
139
|
+
localeText,
|
|
140
|
+
logo,
|
|
141
|
+
dataTable,
|
|
142
|
+
primaryColor
|
|
143
|
+
} = _ref5;
|
|
144
|
+
const styles = getPdfStyles(primaryColor);
|
|
145
|
+
return /*#__PURE__*/React.createElement(Document, null, /*#__PURE__*/React.createElement(Page, {
|
|
146
|
+
size: "A4",
|
|
147
|
+
style: styles.page
|
|
148
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, logo ? /*#__PURE__*/React.createElement(View, {
|
|
149
|
+
style: styles.logoContainer
|
|
150
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
151
|
+
src: logo,
|
|
152
|
+
style: styles.logo
|
|
153
|
+
})) : null, introduction ? /*#__PURE__*/React.createElement(View, {
|
|
154
|
+
style: styles.introductionContainer
|
|
155
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
156
|
+
style: styles.introductionText
|
|
157
|
+
}, introduction)) : null, dashboardImage ? /*#__PURE__*/React.createElement(View, {
|
|
158
|
+
style: styles.dashboardImageContainer
|
|
159
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
160
|
+
src: dashboardImage
|
|
161
|
+
})) : null, dataTable ? /*#__PURE__*/React.createElement(View, {
|
|
162
|
+
style: styles.tableContainer
|
|
163
|
+
}, /*#__PURE__*/React.createElement(PdfTable, {
|
|
164
|
+
dataTable: dataTable,
|
|
165
|
+
styles: styles,
|
|
166
|
+
localeText: localeText
|
|
167
|
+
})) : null, /*#__PURE__*/React.createElement(Pagination, {
|
|
168
|
+
styles: styles
|
|
169
|
+
}))));
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export { PdfDocument };
|
|
173
|
+
//# sourceMappingURL=PdfDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfDocument.js","sources":["../../../../src/components/PdfExportButton/PdfDocument.tsx"],"sourcesContent":["// istanbul ignore file\n\nimport React from 'react';\nimport { Document, Image, Page, Text, View } from '@react-pdf/renderer';\nimport { GridValidRowModel } from '@mui/x-data-grid-pro';\nimport { PdfTableColumn, PdfTableRowProps, PdfTableProps, PdfDocumentProps, PdfStyles } from './types';\nimport { getPdfStyles } from './styles';\n\nconst DEFAULT_COLUMN_WIDTH = 100;\n\nconst getWidthColumn = (width: number, totalW: number, nrColumns: number) => {\n // calculation width column where the 7px margin between the columns is included\n return `${Math.round((width * 100) / (totalW - 7 * (nrColumns - 1)))}%`;\n};\n\nconst PdfTableRow = ({ rowIndex, rowData, columns, styles, totalWidth }: PdfTableRowProps) => {\n return (\n <View style={styles.tableRowContainer} key={`row-${rowIndex}`}>\n {columns.map((column: PdfTableColumn, index: number) => {\n const { field, width } = column;\n let totalW = totalWidth;\n let nrColumns = columns.length;\n\n // The checkbox in the table will not be printed\n if (field === '__check__') {\n totalW = totalW - (width || 50);\n nrColumns = nrColumns - 1;\n return;\n }\n const widthColumn = getWidthColumn(width || DEFAULT_COLUMN_WIDTH, totalW, nrColumns);\n\n // Empty value will print '-'\n if (!rowData[field]) {\n return (\n <View\n style={{\n width: widthColumn,\n paddingVertical: 2,\n marginRight: 7,\n }}\n key={`cell-${rowIndex}-${index}`}\n >\n <Text style={styles.tableCellText}>{'-'}</Text>\n </View>\n );\n }\n return (\n <View\n style={{\n width: widthColumn,\n paddingVertical: 2,\n marginRight: 7,\n }}\n key={`cell-${rowIndex}-${index}`}\n >\n <Text style={styles.tableCellText}>\n {Array.isArray(rowData[field]) ? rowData[field].join(', ') : rowData[field]}\n </Text>\n </View>\n );\n })}\n </View>\n );\n};\n\nconst PdfTable = ({ dataTable, styles, localeText }: PdfTableProps) => {\n const { data, columns, totalWidth } = dataTable;\n\n return (\n <>\n <View style={styles.tableHeaderContainer}>\n {columns.map((column: PdfTableColumn) => {\n let totalW = totalWidth;\n let nrColumns = columns.length;\n const { field, headerName, width } = column;\n\n // The checkbox in the table will not be printed\n if (field === '__check__') {\n totalW = totalW - (width || 50);\n nrColumns = nrColumns - 1;\n return;\n }\n const widthColumn = getWidthColumn(width || DEFAULT_COLUMN_WIDTH, totalW, nrColumns);\n\n return (\n <View\n style={{\n width: widthColumn,\n paddingVertical: 2,\n marginRight: 7,\n }}\n key={`heading-${field}`}\n >\n <Text style={styles.tableCellHeaderText}>{headerName}</Text>\n </View>\n );\n })}\n </View>\n <View>\n {data.map((row: GridValidRowModel, index: number) => {\n if (index < 1000) {\n return (\n <PdfTableRow\n key={index}\n rowIndex={index}\n rowData={data[index]}\n columns={columns}\n styles={styles}\n totalWidth={totalWidth}\n />\n );\n }\n })}\n </View>\n {data.length >= 1000 ? (\n <View style={styles.constraintsContainer}>\n <Text style={styles.constraints}>\n {localeText?.maxSizeDisclaimer ||\n 'Due to processing constraints this pdf is limited to the first 1000 rows of data.'}\n </Text>\n </View>\n ) : null}\n </>\n );\n};\n\nconst Pagination = ({ styles }: { styles: PdfStyles }) => {\n return (\n <Text style={styles.pageNumber} render={({ pageNumber, totalPages }) => `${pageNumber}/${totalPages}`} fixed />\n );\n};\n\nexport const PdfDocument = ({\n dashboardImage,\n introduction,\n localeText,\n logo,\n dataTable,\n primaryColor,\n}: PdfDocumentProps) => {\n const styles = getPdfStyles(primaryColor);\n\n return (\n <Document>\n <Page size=\"A4\" style={styles.page}>\n <>\n {logo ? (\n <View style={styles.logoContainer}>\n <Image src={logo} style={styles.logo} />\n </View>\n ) : null}\n {introduction ? (\n <View style={styles.introductionContainer}>\n <Text style={styles.introductionText}>{introduction}</Text>\n </View>\n ) : null}\n {dashboardImage ? (\n <View style={styles.dashboardImageContainer}>\n <Image src={dashboardImage as unknown as string} />\n </View>\n ) : null}\n {dataTable ? (\n <View style={styles.tableContainer}>\n <PdfTable dataTable={dataTable} styles={styles} localeText={localeText} />\n </View>\n ) : null}\n\n <Pagination styles={styles} />\n </>\n </Page>\n </Document>\n );\n};\n"],"names":["DEFAULT_COLUMN_WIDTH","getWidthColumn","width","totalW","nrColumns","Math","round","PdfTableRow","_ref","rowIndex","rowData","columns","styles","totalWidth","React","createElement","View","style","tableRowContainer","key","map","column","index","field","length","widthColumn","paddingVertical","marginRight","Text","tableCellText","Array","isArray","join","PdfTable","_ref2","dataTable","localeText","data","Fragment","tableHeaderContainer","headerName","tableCellHeaderText","row","constraintsContainer","constraints","maxSizeDisclaimer","Pagination","_ref3","pageNumber","render","_ref4","totalPages","fixed","PdfDocument","_ref5","dashboardImage","introduction","logo","primaryColor","getPdfStyles","Document","Page","size","page","logoContainer","Image","src","introductionContainer","introductionText","dashboardImageContainer","tableContainer"],"mappings":";;;;AAAA;AAQA,MAAMA,oBAAoB,GAAG,GAAG,CAAA;AAEhC,MAAMC,cAAc,GAAGA,CAACC,KAAa,EAAEC,MAAc,EAAEC,SAAiB,KAAK;AAC3E;AACA,EAAA,OAAQ,GAAEC,IAAI,CAACC,KAAK,CAAEJ,KAAK,GAAG,GAAG,IAAKC,MAAM,GAAG,CAAC,IAAIC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAE,CAAE,CAAA,CAAA,CAAA;AACzE,CAAC,CAAA;AAED,MAAMG,WAAW,GAAGC,IAAA,IAA0E;EAAA,IAAzE;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,OAAO;IAAEC,MAAM;AAAEC,IAAAA,UAAAA;AAA6B,GAAC,GAAAL,IAAA,CAAA;AACvF,EAAA,oBACEM,KAAA,CAAAC,aAAA,CAACC,IAAI,EAAA;IAACC,KAAK,EAAEL,MAAM,CAACM,iBAAkB;IAACC,GAAG,EAAG,OAAMV,QAAS,CAAA,CAAA;GACzDE,EAAAA,OAAO,CAACS,GAAG,CAAC,CAACC,MAAsB,EAAEC,KAAa,KAAK;IACtD,MAAM;MAAEC,KAAK;AAAErB,MAAAA,KAAAA;AAAM,KAAC,GAAGmB,MAAM,CAAA;IAC/B,IAAIlB,MAAM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