@bygd/nc-report-ui 0.1.3 → 0.1.4
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/dist/app/esm/index.js +7 -7
- package/dist/default/cjs/index.cjs +78 -1
- package/dist/default/esm/index.js +76 -1
- package/dist/default/iife/index.js +464 -60
- package/package.json +1 -1
package/dist/app/esm/index.js
CHANGED
|
@@ -656,7 +656,7 @@ var reactIs$2 = {exports: {}};
|
|
|
656
656
|
|
|
657
657
|
var reactIs_production_min$1 = {};
|
|
658
658
|
|
|
659
|
-
/** @license React
|
|
659
|
+
/** @license React v17.0.2
|
|
660
660
|
* react-is.production.min.js
|
|
661
661
|
*
|
|
662
662
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -670,12 +670,12 @@ var hasRequiredReactIs_production_min$1;
|
|
|
670
670
|
function requireReactIs_production_min$1 () {
|
|
671
671
|
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
|
672
672
|
hasRequiredReactIs_production_min$1 = 1;
|
|
673
|
-
var b=
|
|
674
|
-
Symbol.for("react.
|
|
675
|
-
function
|
|
676
|
-
reactIs_production_min$1.
|
|
677
|
-
reactIs_production_min$1.
|
|
678
|
-
reactIs_production_min$1.
|
|
673
|
+
var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
|
|
674
|
+
if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
|
|
675
|
+
function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min$1.ContextConsumer=h;reactIs_production_min$1.ContextProvider=z;reactIs_production_min$1.Element=A;reactIs_production_min$1.ForwardRef=B;reactIs_production_min$1.Fragment=C;reactIs_production_min$1.Lazy=D;reactIs_production_min$1.Memo=E;reactIs_production_min$1.Portal=F;reactIs_production_min$1.Profiler=G;reactIs_production_min$1.StrictMode=H;
|
|
676
|
+
reactIs_production_min$1.Suspense=I;reactIs_production_min$1.isAsyncMode=function(){return false};reactIs_production_min$1.isConcurrentMode=function(){return false};reactIs_production_min$1.isContextConsumer=function(a){return y(a)===h};reactIs_production_min$1.isContextProvider=function(a){return y(a)===g};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min$1.isForwardRef=function(a){return y(a)===k};reactIs_production_min$1.isFragment=function(a){return y(a)===d};reactIs_production_min$1.isLazy=function(a){return y(a)===p};reactIs_production_min$1.isMemo=function(a){return y(a)===n};
|
|
677
|
+
reactIs_production_min$1.isPortal=function(a){return y(a)===c};reactIs_production_min$1.isProfiler=function(a){return y(a)===f};reactIs_production_min$1.isStrictMode=function(a){return y(a)===e};reactIs_production_min$1.isSuspense=function(a){return y(a)===l};reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?true:false};
|
|
678
|
+
reactIs_production_min$1.typeOf=y;
|
|
679
679
|
return reactIs_production_min$1;
|
|
680
680
|
}
|
|
681
681
|
|
|
@@ -25,6 +25,8 @@ var MenuItem = require('@mui/material/MenuItem');
|
|
|
25
25
|
var FormControl = require('@mui/material/FormControl');
|
|
26
26
|
var Select = require('@mui/material/Select');
|
|
27
27
|
var EventEmitter = require('eventemitter3');
|
|
28
|
+
var Grid = require('@material-ui/core/Grid');
|
|
29
|
+
var Container = require('@material-ui/core/Container');
|
|
28
30
|
|
|
29
31
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
30
32
|
|
|
@@ -64,6 +66,8 @@ var MenuItem__default = /*#__PURE__*/_interopDefault(MenuItem);
|
|
|
64
66
|
var FormControl__default = /*#__PURE__*/_interopDefault(FormControl);
|
|
65
67
|
var Select__default = /*#__PURE__*/_interopDefault(Select);
|
|
66
68
|
var EventEmitter__default = /*#__PURE__*/_interopDefault(EventEmitter);
|
|
69
|
+
var Grid__default = /*#__PURE__*/_interopDefault(Grid);
|
|
70
|
+
var Container__default = /*#__PURE__*/_interopDefault(Container);
|
|
67
71
|
|
|
68
72
|
function _extends() {
|
|
69
73
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -970,8 +974,81 @@ var Chart = ({
|
|
|
970
974
|
}), chartType));
|
|
971
975
|
};
|
|
972
976
|
|
|
977
|
+
function Dashboard({
|
|
978
|
+
id,
|
|
979
|
+
auth,
|
|
980
|
+
params
|
|
981
|
+
}) {
|
|
982
|
+
const [dashboard, setDashboard] = React__namespace.default.useState();
|
|
983
|
+
//const [schema, setSchema] = React.useState();
|
|
984
|
+
const [schema] = React__namespace.default.useState();
|
|
985
|
+
const [rows, setRows] = React__namespace.default.useState([]);
|
|
986
|
+
const cache = React__namespace.default.useRef({});
|
|
987
|
+
const channel = useChannel();
|
|
988
|
+
useFilterManager(channel);
|
|
989
|
+
const init = async () => {
|
|
990
|
+
// get dashboard entity
|
|
991
|
+
const dashboardTemp = await Api.getDashboard({
|
|
992
|
+
id: id
|
|
993
|
+
});
|
|
994
|
+
cache.current[dashboardTemp?.id] = dashboardTemp;
|
|
995
|
+
setDashboard(dashboardTemp);
|
|
996
|
+
|
|
997
|
+
// create rows and columns
|
|
998
|
+
await create_rows_and_columns(dashboardTemp);
|
|
999
|
+
};
|
|
1000
|
+
const create_rows_and_columns = async entity => {
|
|
1001
|
+
const srcRows = entity?.doc?.rows || [];
|
|
1002
|
+
const targetRows = [];
|
|
1003
|
+
for (let i = 0; i < srcRows.length; i++) {
|
|
1004
|
+
const row = srcRows[i];
|
|
1005
|
+
row.columns?.forEach(column => {
|
|
1006
|
+
// filter
|
|
1007
|
+
if (column.override?.filter?.length) {
|
|
1008
|
+
const filter = {};
|
|
1009
|
+
column.override.filter.forEach(item => {
|
|
1010
|
+
if (item.hasOwnProperty('value')) filter[item.field] = [item.value];
|
|
1011
|
+
// else filter[item.field] = [sourceDataRow[item.field]];
|
|
1012
|
+
});
|
|
1013
|
+
column.filter = filter;
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
targetRows.push(row);
|
|
1017
|
+
}
|
|
1018
|
+
setRows(targetRows);
|
|
1019
|
+
};
|
|
1020
|
+
React__namespace.default.useEffect(() => {
|
|
1021
|
+
if (!id) return;
|
|
1022
|
+
init().catch(error => console.error(error.message));
|
|
1023
|
+
}, [id]);
|
|
1024
|
+
return /*#__PURE__*/React__namespace.default.createElement(Container__default.default, null, /*#__PURE__*/React__namespace.default.createElement(Grid__default.default, {
|
|
1025
|
+
container: true
|
|
1026
|
+
}, rows?.map((row, index) =>
|
|
1027
|
+
/*#__PURE__*/
|
|
1028
|
+
// hasResourceRole(row) &&
|
|
1029
|
+
React__namespace.default.createElement(Grid__default.default, {
|
|
1030
|
+
key: index,
|
|
1031
|
+
container: true,
|
|
1032
|
+
item: true
|
|
1033
|
+
}, row?.columns?.map((column, index) => /*#__PURE__*/React__namespace.default.createElement(Grid__default.default, _extends({
|
|
1034
|
+
key: index,
|
|
1035
|
+
item: true
|
|
1036
|
+
}, column.layout), /*#__PURE__*/React__namespace.default.createElement(Chart, {
|
|
1037
|
+
auth: auth,
|
|
1038
|
+
cache: cache.current,
|
|
1039
|
+
id: column.id,
|
|
1040
|
+
dashboard: dashboard,
|
|
1041
|
+
schema: schema,
|
|
1042
|
+
channel: null,
|
|
1043
|
+
title: column.title,
|
|
1044
|
+
filter: column.filter,
|
|
1045
|
+
params: params
|
|
1046
|
+
})))))));
|
|
1047
|
+
}
|
|
1048
|
+
|
|
973
1049
|
var index = {
|
|
974
|
-
Chart
|
|
1050
|
+
Chart,
|
|
1051
|
+
Dashboard
|
|
975
1052
|
};
|
|
976
1053
|
|
|
977
1054
|
exports.default = index;
|
|
@@ -22,6 +22,8 @@ import MenuItem from '@mui/material/MenuItem';
|
|
|
22
22
|
import FormControl$1 from '@mui/material/FormControl';
|
|
23
23
|
import Select from '@mui/material/Select';
|
|
24
24
|
import EventEmitter from 'eventemitter3';
|
|
25
|
+
import Grid from '@material-ui/core/Grid';
|
|
26
|
+
import Container from '@material-ui/core/Container';
|
|
25
27
|
|
|
26
28
|
function _extends() {
|
|
27
29
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -928,8 +930,81 @@ var Chart = ({
|
|
|
928
930
|
}), chartType));
|
|
929
931
|
};
|
|
930
932
|
|
|
933
|
+
function Dashboard({
|
|
934
|
+
id,
|
|
935
|
+
auth,
|
|
936
|
+
params
|
|
937
|
+
}) {
|
|
938
|
+
const [dashboard, setDashboard] = React__default.useState();
|
|
939
|
+
//const [schema, setSchema] = React.useState();
|
|
940
|
+
const [schema] = React__default.useState();
|
|
941
|
+
const [rows, setRows] = React__default.useState([]);
|
|
942
|
+
const cache = React__default.useRef({});
|
|
943
|
+
const channel = useChannel();
|
|
944
|
+
useFilterManager(channel);
|
|
945
|
+
const init = async () => {
|
|
946
|
+
// get dashboard entity
|
|
947
|
+
const dashboardTemp = await Api.getDashboard({
|
|
948
|
+
id: id
|
|
949
|
+
});
|
|
950
|
+
cache.current[dashboardTemp?.id] = dashboardTemp;
|
|
951
|
+
setDashboard(dashboardTemp);
|
|
952
|
+
|
|
953
|
+
// create rows and columns
|
|
954
|
+
await create_rows_and_columns(dashboardTemp);
|
|
955
|
+
};
|
|
956
|
+
const create_rows_and_columns = async entity => {
|
|
957
|
+
const srcRows = entity?.doc?.rows || [];
|
|
958
|
+
const targetRows = [];
|
|
959
|
+
for (let i = 0; i < srcRows.length; i++) {
|
|
960
|
+
const row = srcRows[i];
|
|
961
|
+
row.columns?.forEach(column => {
|
|
962
|
+
// filter
|
|
963
|
+
if (column.override?.filter?.length) {
|
|
964
|
+
const filter = {};
|
|
965
|
+
column.override.filter.forEach(item => {
|
|
966
|
+
if (item.hasOwnProperty('value')) filter[item.field] = [item.value];
|
|
967
|
+
// else filter[item.field] = [sourceDataRow[item.field]];
|
|
968
|
+
});
|
|
969
|
+
column.filter = filter;
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
targetRows.push(row);
|
|
973
|
+
}
|
|
974
|
+
setRows(targetRows);
|
|
975
|
+
};
|
|
976
|
+
React__default.useEffect(() => {
|
|
977
|
+
if (!id) return;
|
|
978
|
+
init().catch(error => console.error(error.message));
|
|
979
|
+
}, [id]);
|
|
980
|
+
return /*#__PURE__*/React__default.createElement(Container, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
981
|
+
container: true
|
|
982
|
+
}, rows?.map((row, index) =>
|
|
983
|
+
/*#__PURE__*/
|
|
984
|
+
// hasResourceRole(row) &&
|
|
985
|
+
React__default.createElement(Grid, {
|
|
986
|
+
key: index,
|
|
987
|
+
container: true,
|
|
988
|
+
item: true
|
|
989
|
+
}, row?.columns?.map((column, index) => /*#__PURE__*/React__default.createElement(Grid, _extends({
|
|
990
|
+
key: index,
|
|
991
|
+
item: true
|
|
992
|
+
}, column.layout), /*#__PURE__*/React__default.createElement(Chart, {
|
|
993
|
+
auth: auth,
|
|
994
|
+
cache: cache.current,
|
|
995
|
+
id: column.id,
|
|
996
|
+
dashboard: dashboard,
|
|
997
|
+
schema: schema,
|
|
998
|
+
channel: null,
|
|
999
|
+
title: column.title,
|
|
1000
|
+
filter: column.filter,
|
|
1001
|
+
params: params
|
|
1002
|
+
})))))));
|
|
1003
|
+
}
|
|
1004
|
+
|
|
931
1005
|
var index = {
|
|
932
|
-
Chart
|
|
1006
|
+
Chart,
|
|
1007
|
+
Dashboard
|
|
933
1008
|
};
|
|
934
1009
|
|
|
935
1010
|
export { index as default };
|
|
@@ -231,7 +231,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
231
231
|
|
|
232
232
|
var reactIs_production_min$1 = {};
|
|
233
233
|
|
|
234
|
-
/** @license React
|
|
234
|
+
/** @license React v17.0.2
|
|
235
235
|
* react-is.production.min.js
|
|
236
236
|
*
|
|
237
237
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -245,12 +245,12 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
245
245
|
function requireReactIs_production_min$1 () {
|
|
246
246
|
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
|
247
247
|
hasRequiredReactIs_production_min$1 = 1;
|
|
248
|
-
var b=
|
|
249
|
-
Symbol.for("react.
|
|
250
|
-
function
|
|
251
|
-
reactIs_production_min$1.
|
|
252
|
-
reactIs_production_min$1.
|
|
253
|
-
reactIs_production_min$1.
|
|
248
|
+
var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
|
|
249
|
+
if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
|
|
250
|
+
function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min$1.ContextConsumer=h;reactIs_production_min$1.ContextProvider=z;reactIs_production_min$1.Element=A;reactIs_production_min$1.ForwardRef=B;reactIs_production_min$1.Fragment=C;reactIs_production_min$1.Lazy=D;reactIs_production_min$1.Memo=E;reactIs_production_min$1.Portal=F;reactIs_production_min$1.Profiler=G;reactIs_production_min$1.StrictMode=H;
|
|
251
|
+
reactIs_production_min$1.Suspense=I;reactIs_production_min$1.isAsyncMode=function(){return false};reactIs_production_min$1.isConcurrentMode=function(){return false};reactIs_production_min$1.isContextConsumer=function(a){return y(a)===h};reactIs_production_min$1.isContextProvider=function(a){return y(a)===g};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min$1.isForwardRef=function(a){return y(a)===k};reactIs_production_min$1.isFragment=function(a){return y(a)===d};reactIs_production_min$1.isLazy=function(a){return y(a)===p};reactIs_production_min$1.isMemo=function(a){return y(a)===n};
|
|
252
|
+
reactIs_production_min$1.isPortal=function(a){return y(a)===c};reactIs_production_min$1.isProfiler=function(a){return y(a)===f};reactIs_production_min$1.isStrictMode=function(a){return y(a)===e};reactIs_production_min$1.isSuspense=function(a){return y(a)===l};reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?true:false};
|
|
253
|
+
reactIs_production_min$1.typeOf=y;
|
|
254
254
|
return reactIs_production_min$1;
|
|
255
255
|
}
|
|
256
256
|
|
|
@@ -5425,7 +5425,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
5425
5425
|
}, options));
|
|
5426
5426
|
}
|
|
5427
5427
|
|
|
5428
|
-
var styles$
|
|
5428
|
+
var styles$r = function styles(theme) {
|
|
5429
5429
|
var elevations = {};
|
|
5430
5430
|
theme.shadows.forEach(function (shadow, index) {
|
|
5431
5431
|
elevations["elevation".concat(index)] = {
|
|
@@ -5469,7 +5469,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
5469
5469
|
ref: ref
|
|
5470
5470
|
}, other));
|
|
5471
5471
|
});
|
|
5472
|
-
var Paper$2 = withStyles(styles$
|
|
5472
|
+
var Paper$2 = withStyles(styles$r, {
|
|
5473
5473
|
name: 'MuiPaper'
|
|
5474
5474
|
})(Paper$1);
|
|
5475
5475
|
|
|
@@ -5510,7 +5510,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
5510
5510
|
|
|
5511
5511
|
var TRANSITION_DURATION = 4; // seconds
|
|
5512
5512
|
|
|
5513
|
-
var styles$
|
|
5513
|
+
var styles$q = function styles(theme) {
|
|
5514
5514
|
var getColor = function getColor(color) {
|
|
5515
5515
|
return theme.palette.type === 'light' ? lighten$1(color, 0.62) : darken$1(color, 0.5);
|
|
5516
5516
|
};
|
|
@@ -5753,7 +5753,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
5753
5753
|
style: inlineStyles.bar2
|
|
5754
5754
|
}));
|
|
5755
5755
|
});
|
|
5756
|
-
var LinearProgress$1 = withStyles(styles$
|
|
5756
|
+
var LinearProgress$1 = withStyles(styles$q, {
|
|
5757
5757
|
name: 'MuiLinearProgress'
|
|
5758
5758
|
})(LinearProgress);
|
|
5759
5759
|
|
|
@@ -11123,7 +11123,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
11123
11123
|
}, chart?.doc.chart?.props)) : /*#__PURE__*/React.createElement("div", null);
|
|
11124
11124
|
}
|
|
11125
11125
|
|
|
11126
|
-
var styles$
|
|
11126
|
+
var styles$p = function styles(theme) {
|
|
11127
11127
|
return {
|
|
11128
11128
|
/* Styles applied to the root element. */
|
|
11129
11129
|
root: {
|
|
@@ -11295,7 +11295,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
11295
11295
|
ref: ref
|
|
11296
11296
|
}, other));
|
|
11297
11297
|
});
|
|
11298
|
-
var Typography$1 = withStyles(styles$
|
|
11298
|
+
var Typography$1 = withStyles(styles$p, {
|
|
11299
11299
|
name: 'MuiTypography'
|
|
11300
11300
|
})(Typography);
|
|
11301
11301
|
|
|
@@ -18601,7 +18601,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
18601
18601
|
return reactExports.useContext(FormControlContext$1);
|
|
18602
18602
|
}
|
|
18603
18603
|
|
|
18604
|
-
var styles$
|
|
18604
|
+
var styles$o = {
|
|
18605
18605
|
/* Styles applied to the root element. */
|
|
18606
18606
|
root: {
|
|
18607
18607
|
display: 'inline-flex',
|
|
@@ -18777,7 +18777,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
18777
18777
|
ref: ref
|
|
18778
18778
|
}, other), children));
|
|
18779
18779
|
});
|
|
18780
|
-
var FormControl$2 = withStyles(styles$
|
|
18780
|
+
var FormControl$2 = withStyles(styles$o, {
|
|
18781
18781
|
name: 'MuiFormControl'
|
|
18782
18782
|
})(FormControl$1);
|
|
18783
18783
|
|
|
@@ -19766,7 +19766,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
19766
19766
|
}));
|
|
19767
19767
|
}
|
|
19768
19768
|
|
|
19769
|
-
var styles$
|
|
19769
|
+
var styles$n = {
|
|
19770
19770
|
/* Styles applied to the root element. */
|
|
19771
19771
|
root: {
|
|
19772
19772
|
zIndex: -1,
|
|
@@ -19798,7 +19798,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
19798
19798
|
"aria-hidden": true,
|
|
19799
19799
|
ref: ref
|
|
19800
19800
|
}, other, {
|
|
19801
|
-
style: _extends$1({}, styles$
|
|
19801
|
+
style: _extends$1({}, styles$n.root, invisible ? styles$n.invisible : {}, other.style)
|
|
19802
19802
|
})) : null;
|
|
19803
19803
|
});
|
|
19804
19804
|
|
|
@@ -19814,7 +19814,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
19814
19814
|
|
|
19815
19815
|
|
|
19816
19816
|
var defaultManager = new ModalManager$1();
|
|
19817
|
-
var styles$
|
|
19817
|
+
var styles$m = function styles(theme) {
|
|
19818
19818
|
return {
|
|
19819
19819
|
/* Styles applied to the root element. */
|
|
19820
19820
|
root: {
|
|
@@ -20015,7 +20015,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
20015
20015
|
}
|
|
20016
20016
|
};
|
|
20017
20017
|
|
|
20018
|
-
var inlineStyle = styles$
|
|
20018
|
+
var inlineStyle = styles$m(theme || {
|
|
20019
20019
|
zIndex: zIndex$1
|
|
20020
20020
|
});
|
|
20021
20021
|
var childProps = {};
|
|
@@ -20773,7 +20773,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
20773
20773
|
return "scale(".concat(value, ", ").concat(Math.pow(value, 2), ")");
|
|
20774
20774
|
}
|
|
20775
20775
|
|
|
20776
|
-
var styles$
|
|
20776
|
+
var styles$l = {
|
|
20777
20777
|
entering: {
|
|
20778
20778
|
opacity: 1,
|
|
20779
20779
|
transform: getScale$1(1)
|
|
@@ -20935,7 +20935,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
20935
20935
|
opacity: 0,
|
|
20936
20936
|
transform: getScale$1(0.75),
|
|
20937
20937
|
visibility: state === 'exited' && !inProp ? 'hidden' : undefined
|
|
20938
|
-
}, styles$
|
|
20938
|
+
}, styles$l[state], style, children.props.style),
|
|
20939
20939
|
ref: handleRef
|
|
20940
20940
|
}, childProps));
|
|
20941
20941
|
});
|
|
@@ -20992,7 +20992,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
20992
20992
|
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
|
20993
20993
|
}
|
|
20994
20994
|
|
|
20995
|
-
var styles$
|
|
20995
|
+
var styles$k = {
|
|
20996
20996
|
/* Styles applied to the root element. */
|
|
20997
20997
|
root: {},
|
|
20998
20998
|
|
|
@@ -21252,7 +21252,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
21252
21252
|
className: clsx$3(classes.paper, PaperProps.className)
|
|
21253
21253
|
}), children)));
|
|
21254
21254
|
});
|
|
21255
|
-
var Popover$2 = withStyles(styles$
|
|
21255
|
+
var Popover$2 = withStyles(styles$k, {
|
|
21256
21256
|
name: 'MuiPopover'
|
|
21257
21257
|
})(Popover$1);
|
|
21258
21258
|
|
|
@@ -21262,7 +21262,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
21262
21262
|
|
|
21263
21263
|
var ListContext$1 = reactExports.createContext({});
|
|
21264
21264
|
|
|
21265
|
-
var styles$
|
|
21265
|
+
var styles$j = {
|
|
21266
21266
|
/* Styles applied to the root element. */
|
|
21267
21267
|
root: {
|
|
21268
21268
|
listStyle: 'none',
|
|
@@ -21310,7 +21310,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
21310
21310
|
ref: ref
|
|
21311
21311
|
}, other), subheader, children));
|
|
21312
21312
|
});
|
|
21313
|
-
var List$2 = withStyles(styles$
|
|
21313
|
+
var List$2 = withStyles(styles$j, {
|
|
21314
21314
|
name: 'MuiList'
|
|
21315
21315
|
})(List$1);
|
|
21316
21316
|
|
|
@@ -21564,7 +21564,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
21564
21564
|
vertical: 'top',
|
|
21565
21565
|
horizontal: 'left'
|
|
21566
21566
|
};
|
|
21567
|
-
var styles$
|
|
21567
|
+
var styles$i = {
|
|
21568
21568
|
/* Styles applied to the `Paper` component. */
|
|
21569
21569
|
paper: {
|
|
21570
21570
|
// specZ: The maximum height of a simple menu should be one or more rows less than the view
|
|
@@ -21703,7 +21703,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
21703
21703
|
className: clsx$3(classes.list, MenuListProps.className)
|
|
21704
21704
|
}), items));
|
|
21705
21705
|
});
|
|
21706
|
-
var Menu$2 = withStyles(styles$
|
|
21706
|
+
var Menu$2 = withStyles(styles$i, {
|
|
21707
21707
|
name: 'MuiMenu'
|
|
21708
21708
|
})(Menu$1);
|
|
21709
21709
|
|
|
@@ -22125,7 +22125,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22125
22125
|
}, {});
|
|
22126
22126
|
}
|
|
22127
22127
|
|
|
22128
|
-
var styles$
|
|
22128
|
+
var styles$h = function styles(theme) {
|
|
22129
22129
|
return {
|
|
22130
22130
|
/* Styles applied to the root element. */
|
|
22131
22131
|
root: {
|
|
@@ -22209,7 +22209,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22209
22209
|
}, other), children, titleAccess ? /*#__PURE__*/reactExports.createElement("title", null, titleAccess) : null);
|
|
22210
22210
|
});
|
|
22211
22211
|
SvgIcon$1.muiName = 'SvgIcon';
|
|
22212
|
-
var SvgIcon$2 = withStyles(styles$
|
|
22212
|
+
var SvgIcon$2 = withStyles(styles$h, {
|
|
22213
22213
|
name: 'MuiSvgIcon'
|
|
22214
22214
|
})(SvgIcon$1);
|
|
22215
22215
|
|
|
@@ -22241,7 +22241,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22241
22241
|
}
|
|
22242
22242
|
|
|
22243
22243
|
var useEnhancedEffect$4 = typeof window !== 'undefined' ? reactExports.useLayoutEffect : reactExports.useEffect;
|
|
22244
|
-
var styles$
|
|
22244
|
+
var styles$g = {
|
|
22245
22245
|
/* Styles applied to the shadow textarea element. */
|
|
22246
22246
|
shadow: {
|
|
22247
22247
|
// Visibility needed to hide the extra text area on iPads
|
|
@@ -22383,11 +22383,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22383
22383
|
readOnly: true,
|
|
22384
22384
|
ref: shadowRef,
|
|
22385
22385
|
tabIndex: -1,
|
|
22386
|
-
style: _extends$1({}, styles$
|
|
22386
|
+
style: _extends$1({}, styles$g.shadow, style)
|
|
22387
22387
|
}));
|
|
22388
22388
|
});
|
|
22389
22389
|
|
|
22390
|
-
var styles$
|
|
22390
|
+
var styles$f = function styles(theme) {
|
|
22391
22391
|
var light = theme.palette.type === 'light';
|
|
22392
22392
|
var placeholder = {
|
|
22393
22393
|
color: 'currentColor',
|
|
@@ -22819,11 +22819,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22819
22819
|
startAdornment: startAdornment
|
|
22820
22820
|
})) : null);
|
|
22821
22821
|
});
|
|
22822
|
-
var InputBase$2 = withStyles(styles$
|
|
22822
|
+
var InputBase$2 = withStyles(styles$f, {
|
|
22823
22823
|
name: 'MuiInputBase'
|
|
22824
22824
|
})(InputBase$1);
|
|
22825
22825
|
|
|
22826
|
-
var styles$
|
|
22826
|
+
var styles$e = function styles(theme) {
|
|
22827
22827
|
var light = theme.palette.type === 'light';
|
|
22828
22828
|
var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
22829
22829
|
return {
|
|
@@ -22955,7 +22955,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22955
22955
|
}, other));
|
|
22956
22956
|
});
|
|
22957
22957
|
Input$1.muiName = 'Input';
|
|
22958
|
-
var Input$2 = withStyles(styles$
|
|
22958
|
+
var Input$2 = withStyles(styles$e, {
|
|
22959
22959
|
name: 'MuiInput'
|
|
22960
22960
|
})(Input$1);
|
|
22961
22961
|
|
|
@@ -22983,7 +22983,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
22983
22983
|
}));
|
|
22984
22984
|
});
|
|
22985
22985
|
|
|
22986
|
-
var styles$
|
|
22986
|
+
var styles$d = function styles(theme) {
|
|
22987
22987
|
return {
|
|
22988
22988
|
/* Styles applied to the select component `root` class. */
|
|
22989
22989
|
root: {},
|
|
@@ -23134,11 +23134,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
23134
23134
|
}, other));
|
|
23135
23135
|
});
|
|
23136
23136
|
NativeSelect.muiName = 'Select';
|
|
23137
|
-
withStyles(styles$
|
|
23137
|
+
withStyles(styles$d, {
|
|
23138
23138
|
name: 'MuiNativeSelect'
|
|
23139
23139
|
})(NativeSelect);
|
|
23140
23140
|
|
|
23141
|
-
var styles$
|
|
23141
|
+
var styles$c = function styles(theme) {
|
|
23142
23142
|
var light = theme.palette.type === 'light';
|
|
23143
23143
|
var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
23144
23144
|
var backgroundColor = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)';
|
|
@@ -23324,11 +23324,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
23324
23324
|
}, other));
|
|
23325
23325
|
});
|
|
23326
23326
|
FilledInput$1.muiName = 'Input';
|
|
23327
|
-
var FilledInput$2 = withStyles(styles$
|
|
23327
|
+
var FilledInput$2 = withStyles(styles$c, {
|
|
23328
23328
|
name: 'MuiFilledInput'
|
|
23329
23329
|
})(FilledInput$1);
|
|
23330
23330
|
|
|
23331
|
-
var styles$
|
|
23331
|
+
var styles$b = function styles(theme) {
|
|
23332
23332
|
return {
|
|
23333
23333
|
/* Styles applied to the root element. */
|
|
23334
23334
|
root: {
|
|
@@ -23443,11 +23443,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
23443
23443
|
}
|
|
23444
23444
|
})));
|
|
23445
23445
|
});
|
|
23446
|
-
var NotchedOutline$2 = withStyles(styles$
|
|
23446
|
+
var NotchedOutline$2 = withStyles(styles$b, {
|
|
23447
23447
|
name: 'PrivateNotchedOutline'
|
|
23448
23448
|
})(NotchedOutline$1);
|
|
23449
23449
|
|
|
23450
|
-
var styles$
|
|
23450
|
+
var styles$a = function styles(theme) {
|
|
23451
23451
|
var borderColor = theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
23452
23452
|
return {
|
|
23453
23453
|
/* Styles applied to the root element. */
|
|
@@ -23588,11 +23588,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
23588
23588
|
}, other));
|
|
23589
23589
|
});
|
|
23590
23590
|
OutlinedInput$1.muiName = 'Input';
|
|
23591
|
-
var OutlinedInput$2 = withStyles(styles$
|
|
23591
|
+
var OutlinedInput$2 = withStyles(styles$a, {
|
|
23592
23592
|
name: 'MuiOutlinedInput'
|
|
23593
23593
|
})(OutlinedInput$1);
|
|
23594
23594
|
|
|
23595
|
-
var styles$
|
|
23595
|
+
var styles$9 = styles$d;
|
|
23596
23596
|
|
|
23597
23597
|
var _ref = /*#__PURE__*/reactExports.createElement(Input$2, null);
|
|
23598
23598
|
|
|
@@ -23680,7 +23680,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
23680
23680
|
}, other));
|
|
23681
23681
|
});
|
|
23682
23682
|
Select$1.muiName = 'Select';
|
|
23683
|
-
var Select$2 = withStyles(styles$
|
|
23683
|
+
var Select$2 = withStyles(styles$9, {
|
|
23684
23684
|
name: 'MuiSelect'
|
|
23685
23685
|
})(Select$1);
|
|
23686
23686
|
|
|
@@ -23880,7 +23880,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
23880
23880
|
|
|
23881
23881
|
var DURATION$1 = 550;
|
|
23882
23882
|
var DELAY_RIPPLE$1 = 80;
|
|
23883
|
-
var styles$
|
|
23883
|
+
var styles$8 = function styles(theme) {
|
|
23884
23884
|
return {
|
|
23885
23885
|
/* Styles applied to the root element. */
|
|
23886
23886
|
root: {
|
|
@@ -24160,12 +24160,12 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
24160
24160
|
exit: true
|
|
24161
24161
|
}, ripples));
|
|
24162
24162
|
});
|
|
24163
|
-
var TouchRipple$2 = withStyles(styles$
|
|
24163
|
+
var TouchRipple$2 = withStyles(styles$8, {
|
|
24164
24164
|
flip: false,
|
|
24165
24165
|
name: 'MuiTouchRipple'
|
|
24166
24166
|
})( /*#__PURE__*/reactExports.memo(TouchRipple$1));
|
|
24167
24167
|
|
|
24168
|
-
var styles$
|
|
24168
|
+
var styles$7 = {
|
|
24169
24169
|
/* Styles applied to the root element. */
|
|
24170
24170
|
root: {
|
|
24171
24171
|
display: 'inline-flex',
|
|
@@ -24469,11 +24469,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
24469
24469
|
center: centerRipple
|
|
24470
24470
|
}, TouchRippleProps)) : null);
|
|
24471
24471
|
});
|
|
24472
|
-
var ButtonBase$2 = withStyles(styles$
|
|
24472
|
+
var ButtonBase$2 = withStyles(styles$7, {
|
|
24473
24473
|
name: 'MuiButtonBase'
|
|
24474
24474
|
})(ButtonBase$1);
|
|
24475
24475
|
|
|
24476
|
-
var styles$
|
|
24476
|
+
var styles$6 = function styles(theme) {
|
|
24477
24477
|
return {
|
|
24478
24478
|
/* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */
|
|
24479
24479
|
root: {
|
|
@@ -24654,11 +24654,11 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
24654
24654
|
ref: handleRef
|
|
24655
24655
|
}, componentProps), children));
|
|
24656
24656
|
});
|
|
24657
|
-
var ListItem$1 = withStyles(styles$
|
|
24657
|
+
var ListItem$1 = withStyles(styles$6, {
|
|
24658
24658
|
name: 'MuiListItem'
|
|
24659
24659
|
})(ListItem);
|
|
24660
24660
|
|
|
24661
|
-
var styles$
|
|
24661
|
+
var styles$5 = function styles(theme) {
|
|
24662
24662
|
return {
|
|
24663
24663
|
/* Styles applied to the root element. */
|
|
24664
24664
|
root: _extends$1({}, theme.typography.body1, _defineProperty({
|
|
@@ -24720,7 +24720,7 @@ var _BYGD_NC_REPORT_UI = (function () {
|
|
|
24720
24720
|
ref: ref
|
|
24721
24721
|
}, other));
|
|
24722
24722
|
});
|
|
24723
|
-
var MenuItem$2 = withStyles(styles$
|
|
24723
|
+
var MenuItem$2 = withStyles(styles$5, {
|
|
24724
24724
|
name: 'MuiMenuItem'
|
|
24725
24725
|
})(MenuItem$1);
|
|
24726
24726
|
|
|
@@ -45506,7 +45506,7 @@ export default theme;`;
|
|
|
45506
45506
|
function getStyleValue(value) {
|
|
45507
45507
|
return parseInt(value, 10) || 0;
|
|
45508
45508
|
}
|
|
45509
|
-
const styles$
|
|
45509
|
+
const styles$4 = {
|
|
45510
45510
|
shadow: {
|
|
45511
45511
|
// Visibility needed to hide the extra text area on iPads
|
|
45512
45512
|
visibility: 'hidden',
|
|
@@ -45705,7 +45705,7 @@ export default theme;`;
|
|
|
45705
45705
|
ref: hiddenTextareaRef,
|
|
45706
45706
|
tabIndex: -1,
|
|
45707
45707
|
style: {
|
|
45708
|
-
...styles$
|
|
45708
|
+
...styles$4.shadow,
|
|
45709
45709
|
...style,
|
|
45710
45710
|
paddingTop: 0,
|
|
45711
45711
|
paddingBottom: 0
|
|
@@ -46999,7 +46999,7 @@ export default theme;`;
|
|
|
46999
46999
|
});
|
|
47000
47000
|
});
|
|
47001
47001
|
|
|
47002
|
-
const styles$
|
|
47002
|
+
const styles$3 = {
|
|
47003
47003
|
entering: {
|
|
47004
47004
|
opacity: 1
|
|
47005
47005
|
},
|
|
@@ -47111,7 +47111,7 @@ export default theme;`;
|
|
|
47111
47111
|
style: {
|
|
47112
47112
|
opacity: 0,
|
|
47113
47113
|
visibility: state === 'exited' && !inProp ? 'hidden' : undefined,
|
|
47114
|
-
...styles$
|
|
47114
|
+
...styles$3[state],
|
|
47115
47115
|
...style,
|
|
47116
47116
|
...children.props.style
|
|
47117
47117
|
},
|
|
@@ -49253,7 +49253,7 @@ export default theme;`;
|
|
|
49253
49253
|
function getScale(value) {
|
|
49254
49254
|
return `scale(${value}, ${value ** 2})`;
|
|
49255
49255
|
}
|
|
49256
|
-
const styles = {
|
|
49256
|
+
const styles$2 = {
|
|
49257
49257
|
entering: {
|
|
49258
49258
|
opacity: 1,
|
|
49259
49259
|
transform: getScale(1)
|
|
@@ -49412,7 +49412,7 @@ export default theme;`;
|
|
|
49412
49412
|
opacity: 0,
|
|
49413
49413
|
transform: getScale(0.75),
|
|
49414
49414
|
visibility: state === 'exited' && !inProp ? 'hidden' : undefined,
|
|
49415
|
-
...styles[state],
|
|
49415
|
+
...styles$2[state],
|
|
49416
49416
|
...style,
|
|
49417
49417
|
...children.props.style
|
|
49418
49418
|
},
|
|
@@ -53211,8 +53211,412 @@ export default theme;`;
|
|
|
53211
53211
|
}), chartType));
|
|
53212
53212
|
};
|
|
53213
53213
|
|
|
53214
|
+
var SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
53215
|
+
var GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
53216
|
+
|
|
53217
|
+
function generateGrid(globalStyles, theme, breakpoint) {
|
|
53218
|
+
var styles = {};
|
|
53219
|
+
GRID_SIZES.forEach(function (size) {
|
|
53220
|
+
var key = "grid-".concat(breakpoint, "-").concat(size);
|
|
53221
|
+
|
|
53222
|
+
if (size === true) {
|
|
53223
|
+
// For the auto layouting
|
|
53224
|
+
styles[key] = {
|
|
53225
|
+
flexBasis: 0,
|
|
53226
|
+
flexGrow: 1,
|
|
53227
|
+
maxWidth: '100%'
|
|
53228
|
+
};
|
|
53229
|
+
return;
|
|
53230
|
+
}
|
|
53231
|
+
|
|
53232
|
+
if (size === 'auto') {
|
|
53233
|
+
styles[key] = {
|
|
53234
|
+
flexBasis: 'auto',
|
|
53235
|
+
flexGrow: 0,
|
|
53236
|
+
maxWidth: 'none'
|
|
53237
|
+
};
|
|
53238
|
+
return;
|
|
53239
|
+
} // Keep 7 significant numbers.
|
|
53240
|
+
|
|
53241
|
+
|
|
53242
|
+
var width = "".concat(Math.round(size / 12 * 10e7) / 10e5, "%"); // Close to the bootstrap implementation:
|
|
53243
|
+
// https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41
|
|
53244
|
+
|
|
53245
|
+
styles[key] = {
|
|
53246
|
+
flexBasis: width,
|
|
53247
|
+
flexGrow: 0,
|
|
53248
|
+
maxWidth: width
|
|
53249
|
+
};
|
|
53250
|
+
}); // No need for a media query for the first size.
|
|
53251
|
+
|
|
53252
|
+
if (breakpoint === 'xs') {
|
|
53253
|
+
_extends$1(globalStyles, styles);
|
|
53254
|
+
} else {
|
|
53255
|
+
globalStyles[theme.breakpoints.up(breakpoint)] = styles;
|
|
53256
|
+
}
|
|
53257
|
+
}
|
|
53258
|
+
|
|
53259
|
+
function getOffset(val) {
|
|
53260
|
+
var div = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
53261
|
+
var parse = parseFloat(val);
|
|
53262
|
+
return "".concat(parse / div).concat(String(val).replace(String(parse), '') || 'px');
|
|
53263
|
+
}
|
|
53264
|
+
|
|
53265
|
+
function generateGutter(theme, breakpoint) {
|
|
53266
|
+
var styles = {};
|
|
53267
|
+
SPACINGS.forEach(function (spacing) {
|
|
53268
|
+
var themeSpacing = theme.spacing(spacing);
|
|
53269
|
+
|
|
53270
|
+
if (themeSpacing === 0) {
|
|
53271
|
+
return;
|
|
53272
|
+
}
|
|
53273
|
+
|
|
53274
|
+
styles["spacing-".concat(breakpoint, "-").concat(spacing)] = {
|
|
53275
|
+
margin: "-".concat(getOffset(themeSpacing, 2)),
|
|
53276
|
+
width: "calc(100% + ".concat(getOffset(themeSpacing), ")"),
|
|
53277
|
+
'& > $item': {
|
|
53278
|
+
padding: getOffset(themeSpacing, 2)
|
|
53279
|
+
}
|
|
53280
|
+
};
|
|
53281
|
+
});
|
|
53282
|
+
return styles;
|
|
53283
|
+
} // Default CSS values
|
|
53284
|
+
// flex: '0 1 auto',
|
|
53285
|
+
// flexDirection: 'row',
|
|
53286
|
+
// alignItems: 'flex-start',
|
|
53287
|
+
// flexWrap: 'nowrap',
|
|
53288
|
+
// justifyContent: 'flex-start',
|
|
53289
|
+
|
|
53290
|
+
|
|
53291
|
+
var styles$1 = function styles(theme) {
|
|
53292
|
+
return _extends$1({
|
|
53293
|
+
/* Styles applied to the root element. */
|
|
53294
|
+
root: {},
|
|
53295
|
+
|
|
53296
|
+
/* Styles applied to the root element if `container={true}`. */
|
|
53297
|
+
container: {
|
|
53298
|
+
boxSizing: 'border-box',
|
|
53299
|
+
display: 'flex',
|
|
53300
|
+
flexWrap: 'wrap',
|
|
53301
|
+
width: '100%'
|
|
53302
|
+
},
|
|
53303
|
+
|
|
53304
|
+
/* Styles applied to the root element if `item={true}`. */
|
|
53305
|
+
item: {
|
|
53306
|
+
boxSizing: 'border-box',
|
|
53307
|
+
margin: '0' // For instance, it's useful when used with a `figure` element.
|
|
53308
|
+
|
|
53309
|
+
},
|
|
53310
|
+
|
|
53311
|
+
/* Styles applied to the root element if `zeroMinWidth={true}`. */
|
|
53312
|
+
zeroMinWidth: {
|
|
53313
|
+
minWidth: 0
|
|
53314
|
+
},
|
|
53315
|
+
|
|
53316
|
+
/* Styles applied to the root element if `direction="column"`. */
|
|
53317
|
+
'direction-xs-column': {
|
|
53318
|
+
flexDirection: 'column'
|
|
53319
|
+
},
|
|
53320
|
+
|
|
53321
|
+
/* Styles applied to the root element if `direction="column-reverse"`. */
|
|
53322
|
+
'direction-xs-column-reverse': {
|
|
53323
|
+
flexDirection: 'column-reverse'
|
|
53324
|
+
},
|
|
53325
|
+
|
|
53326
|
+
/* Styles applied to the root element if `direction="row-reverse"`. */
|
|
53327
|
+
'direction-xs-row-reverse': {
|
|
53328
|
+
flexDirection: 'row-reverse'
|
|
53329
|
+
},
|
|
53330
|
+
|
|
53331
|
+
/* Styles applied to the root element if `wrap="nowrap"`. */
|
|
53332
|
+
'wrap-xs-nowrap': {
|
|
53333
|
+
flexWrap: 'nowrap'
|
|
53334
|
+
},
|
|
53335
|
+
|
|
53336
|
+
/* Styles applied to the root element if `wrap="reverse"`. */
|
|
53337
|
+
'wrap-xs-wrap-reverse': {
|
|
53338
|
+
flexWrap: 'wrap-reverse'
|
|
53339
|
+
},
|
|
53340
|
+
|
|
53341
|
+
/* Styles applied to the root element if `alignItems="center"`. */
|
|
53342
|
+
'align-items-xs-center': {
|
|
53343
|
+
alignItems: 'center'
|
|
53344
|
+
},
|
|
53345
|
+
|
|
53346
|
+
/* Styles applied to the root element if `alignItems="flex-start"`. */
|
|
53347
|
+
'align-items-xs-flex-start': {
|
|
53348
|
+
alignItems: 'flex-start'
|
|
53349
|
+
},
|
|
53350
|
+
|
|
53351
|
+
/* Styles applied to the root element if `alignItems="flex-end"`. */
|
|
53352
|
+
'align-items-xs-flex-end': {
|
|
53353
|
+
alignItems: 'flex-end'
|
|
53354
|
+
},
|
|
53355
|
+
|
|
53356
|
+
/* Styles applied to the root element if `alignItems="baseline"`. */
|
|
53357
|
+
'align-items-xs-baseline': {
|
|
53358
|
+
alignItems: 'baseline'
|
|
53359
|
+
},
|
|
53360
|
+
|
|
53361
|
+
/* Styles applied to the root element if `alignContent="center"`. */
|
|
53362
|
+
'align-content-xs-center': {
|
|
53363
|
+
alignContent: 'center'
|
|
53364
|
+
},
|
|
53365
|
+
|
|
53366
|
+
/* Styles applied to the root element if `alignContent="flex-start"`. */
|
|
53367
|
+
'align-content-xs-flex-start': {
|
|
53368
|
+
alignContent: 'flex-start'
|
|
53369
|
+
},
|
|
53370
|
+
|
|
53371
|
+
/* Styles applied to the root element if `alignContent="flex-end"`. */
|
|
53372
|
+
'align-content-xs-flex-end': {
|
|
53373
|
+
alignContent: 'flex-end'
|
|
53374
|
+
},
|
|
53375
|
+
|
|
53376
|
+
/* Styles applied to the root element if `alignContent="space-between"`. */
|
|
53377
|
+
'align-content-xs-space-between': {
|
|
53378
|
+
alignContent: 'space-between'
|
|
53379
|
+
},
|
|
53380
|
+
|
|
53381
|
+
/* Styles applied to the root element if `alignContent="space-around"`. */
|
|
53382
|
+
'align-content-xs-space-around': {
|
|
53383
|
+
alignContent: 'space-around'
|
|
53384
|
+
},
|
|
53385
|
+
|
|
53386
|
+
/* Styles applied to the root element if `justifyContent="center"`. */
|
|
53387
|
+
'justify-content-xs-center': {
|
|
53388
|
+
justifyContent: 'center'
|
|
53389
|
+
},
|
|
53390
|
+
|
|
53391
|
+
/* Styles applied to the root element if `justifyContent="flex-end"`. */
|
|
53392
|
+
'justify-content-xs-flex-end': {
|
|
53393
|
+
justifyContent: 'flex-end'
|
|
53394
|
+
},
|
|
53395
|
+
|
|
53396
|
+
/* Styles applied to the root element if `justifyContent="space-between"`. */
|
|
53397
|
+
'justify-content-xs-space-between': {
|
|
53398
|
+
justifyContent: 'space-between'
|
|
53399
|
+
},
|
|
53400
|
+
|
|
53401
|
+
/* Styles applied to the root element if `justifyContent="space-around"`. */
|
|
53402
|
+
'justify-content-xs-space-around': {
|
|
53403
|
+
justifyContent: 'space-around'
|
|
53404
|
+
},
|
|
53405
|
+
|
|
53406
|
+
/* Styles applied to the root element if `justifyContent="space-evenly"`. */
|
|
53407
|
+
'justify-content-xs-space-evenly': {
|
|
53408
|
+
justifyContent: 'space-evenly'
|
|
53409
|
+
}
|
|
53410
|
+
}, generateGutter(theme, 'xs'), theme.breakpoints.keys.reduce(function (accumulator, key) {
|
|
53411
|
+
// Use side effect over immutability for better performance.
|
|
53412
|
+
generateGrid(accumulator, theme, key);
|
|
53413
|
+
return accumulator;
|
|
53414
|
+
}, {}));
|
|
53415
|
+
};
|
|
53416
|
+
var Grid = /*#__PURE__*/reactExports.forwardRef(function Grid(props, ref) {
|
|
53417
|
+
var _props$alignContent = props.alignContent,
|
|
53418
|
+
alignContent = _props$alignContent === void 0 ? 'stretch' : _props$alignContent,
|
|
53419
|
+
_props$alignItems = props.alignItems,
|
|
53420
|
+
alignItems = _props$alignItems === void 0 ? 'stretch' : _props$alignItems,
|
|
53421
|
+
classes = props.classes,
|
|
53422
|
+
classNameProp = props.className,
|
|
53423
|
+
_props$component = props.component,
|
|
53424
|
+
Component = _props$component === void 0 ? 'div' : _props$component,
|
|
53425
|
+
_props$container = props.container,
|
|
53426
|
+
container = _props$container === void 0 ? false : _props$container,
|
|
53427
|
+
_props$direction = props.direction,
|
|
53428
|
+
direction = _props$direction === void 0 ? 'row' : _props$direction,
|
|
53429
|
+
_props$item = props.item,
|
|
53430
|
+
item = _props$item === void 0 ? false : _props$item,
|
|
53431
|
+
justify = props.justify,
|
|
53432
|
+
_props$justifyContent = props.justifyContent,
|
|
53433
|
+
justifyContent = _props$justifyContent === void 0 ? 'flex-start' : _props$justifyContent,
|
|
53434
|
+
_props$lg = props.lg,
|
|
53435
|
+
lg = _props$lg === void 0 ? false : _props$lg,
|
|
53436
|
+
_props$md = props.md,
|
|
53437
|
+
md = _props$md === void 0 ? false : _props$md,
|
|
53438
|
+
_props$sm = props.sm,
|
|
53439
|
+
sm = _props$sm === void 0 ? false : _props$sm,
|
|
53440
|
+
_props$spacing = props.spacing,
|
|
53441
|
+
spacing = _props$spacing === void 0 ? 0 : _props$spacing,
|
|
53442
|
+
_props$wrap = props.wrap,
|
|
53443
|
+
wrap = _props$wrap === void 0 ? 'wrap' : _props$wrap,
|
|
53444
|
+
_props$xl = props.xl,
|
|
53445
|
+
xl = _props$xl === void 0 ? false : _props$xl,
|
|
53446
|
+
_props$xs = props.xs,
|
|
53447
|
+
xs = _props$xs === void 0 ? false : _props$xs,
|
|
53448
|
+
_props$zeroMinWidth = props.zeroMinWidth,
|
|
53449
|
+
zeroMinWidth = _props$zeroMinWidth === void 0 ? false : _props$zeroMinWidth,
|
|
53450
|
+
other = _objectWithoutProperties(props, ["alignContent", "alignItems", "classes", "className", "component", "container", "direction", "item", "justify", "justifyContent", "lg", "md", "sm", "spacing", "wrap", "xl", "xs", "zeroMinWidth"]);
|
|
53451
|
+
|
|
53452
|
+
var className = clsx$3(classes.root, classNameProp, container && [classes.container, spacing !== 0 && classes["spacing-xs-".concat(String(spacing))]], item && classes.item, zeroMinWidth && classes.zeroMinWidth, direction !== 'row' && classes["direction-xs-".concat(String(direction))], wrap !== 'wrap' && classes["wrap-xs-".concat(String(wrap))], alignItems !== 'stretch' && classes["align-items-xs-".concat(String(alignItems))], alignContent !== 'stretch' && classes["align-content-xs-".concat(String(alignContent))], (justify || justifyContent) !== 'flex-start' && classes["justify-content-xs-".concat(String(justify || justifyContent))], xs !== false && classes["grid-xs-".concat(String(xs))], sm !== false && classes["grid-sm-".concat(String(sm))], md !== false && classes["grid-md-".concat(String(md))], lg !== false && classes["grid-lg-".concat(String(lg))], xl !== false && classes["grid-xl-".concat(String(xl))]);
|
|
53453
|
+
return /*#__PURE__*/reactExports.createElement(Component, _extends$1({
|
|
53454
|
+
className: className,
|
|
53455
|
+
ref: ref
|
|
53456
|
+
}, other));
|
|
53457
|
+
});
|
|
53458
|
+
var StyledGrid = withStyles(styles$1, {
|
|
53459
|
+
name: 'MuiGrid'
|
|
53460
|
+
})(Grid);
|
|
53461
|
+
|
|
53462
|
+
var styles = function styles(theme) {
|
|
53463
|
+
return {
|
|
53464
|
+
/* Styles applied to the root element. */
|
|
53465
|
+
root: _defineProperty({
|
|
53466
|
+
width: '100%',
|
|
53467
|
+
marginLeft: 'auto',
|
|
53468
|
+
boxSizing: 'border-box',
|
|
53469
|
+
marginRight: 'auto',
|
|
53470
|
+
paddingLeft: theme.spacing(2),
|
|
53471
|
+
paddingRight: theme.spacing(2),
|
|
53472
|
+
display: 'block'
|
|
53473
|
+
}, theme.breakpoints.up('sm'), {
|
|
53474
|
+
paddingLeft: theme.spacing(3),
|
|
53475
|
+
paddingRight: theme.spacing(3)
|
|
53476
|
+
}),
|
|
53477
|
+
|
|
53478
|
+
/* Styles applied to the root element if `disableGutters={true}`. */
|
|
53479
|
+
disableGutters: {
|
|
53480
|
+
paddingLeft: 0,
|
|
53481
|
+
paddingRight: 0
|
|
53482
|
+
},
|
|
53483
|
+
|
|
53484
|
+
/* Styles applied to the root element if `fixed={true}`. */
|
|
53485
|
+
fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {
|
|
53486
|
+
var value = theme.breakpoints.values[breakpoint];
|
|
53487
|
+
|
|
53488
|
+
if (value !== 0) {
|
|
53489
|
+
acc[theme.breakpoints.up(breakpoint)] = {
|
|
53490
|
+
maxWidth: value
|
|
53491
|
+
};
|
|
53492
|
+
}
|
|
53493
|
+
|
|
53494
|
+
return acc;
|
|
53495
|
+
}, {}),
|
|
53496
|
+
|
|
53497
|
+
/* Styles applied to the root element if `maxWidth="xs"`. */
|
|
53498
|
+
maxWidthXs: _defineProperty({}, theme.breakpoints.up('xs'), {
|
|
53499
|
+
maxWidth: Math.max(theme.breakpoints.values.xs, 444)
|
|
53500
|
+
}),
|
|
53501
|
+
|
|
53502
|
+
/* Styles applied to the root element if `maxWidth="sm"`. */
|
|
53503
|
+
maxWidthSm: _defineProperty({}, theme.breakpoints.up('sm'), {
|
|
53504
|
+
maxWidth: theme.breakpoints.values.sm
|
|
53505
|
+
}),
|
|
53506
|
+
|
|
53507
|
+
/* Styles applied to the root element if `maxWidth="md"`. */
|
|
53508
|
+
maxWidthMd: _defineProperty({}, theme.breakpoints.up('md'), {
|
|
53509
|
+
maxWidth: theme.breakpoints.values.md
|
|
53510
|
+
}),
|
|
53511
|
+
|
|
53512
|
+
/* Styles applied to the root element if `maxWidth="lg"`. */
|
|
53513
|
+
maxWidthLg: _defineProperty({}, theme.breakpoints.up('lg'), {
|
|
53514
|
+
maxWidth: theme.breakpoints.values.lg
|
|
53515
|
+
}),
|
|
53516
|
+
|
|
53517
|
+
/* Styles applied to the root element if `maxWidth="xl"`. */
|
|
53518
|
+
maxWidthXl: _defineProperty({}, theme.breakpoints.up('xl'), {
|
|
53519
|
+
maxWidth: theme.breakpoints.values.xl
|
|
53520
|
+
})
|
|
53521
|
+
};
|
|
53522
|
+
};
|
|
53523
|
+
var Container = /*#__PURE__*/reactExports.forwardRef(function Container(props, ref) {
|
|
53524
|
+
var classes = props.classes,
|
|
53525
|
+
className = props.className,
|
|
53526
|
+
_props$component = props.component,
|
|
53527
|
+
Component = _props$component === void 0 ? 'div' : _props$component,
|
|
53528
|
+
_props$disableGutters = props.disableGutters,
|
|
53529
|
+
disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
|
|
53530
|
+
_props$fixed = props.fixed,
|
|
53531
|
+
fixed = _props$fixed === void 0 ? false : _props$fixed,
|
|
53532
|
+
_props$maxWidth = props.maxWidth,
|
|
53533
|
+
maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,
|
|
53534
|
+
other = _objectWithoutProperties(props, ["classes", "className", "component", "disableGutters", "fixed", "maxWidth"]);
|
|
53535
|
+
|
|
53536
|
+
return /*#__PURE__*/reactExports.createElement(Component, _extends$1({
|
|
53537
|
+
className: clsx$3(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes["maxWidth".concat(capitalize$1(String(maxWidth)))]),
|
|
53538
|
+
ref: ref
|
|
53539
|
+
}, other));
|
|
53540
|
+
});
|
|
53541
|
+
var Container$1 = withStyles(styles, {
|
|
53542
|
+
name: 'MuiContainer'
|
|
53543
|
+
})(Container);
|
|
53544
|
+
|
|
53545
|
+
function Dashboard({
|
|
53546
|
+
id,
|
|
53547
|
+
auth,
|
|
53548
|
+
params
|
|
53549
|
+
}) {
|
|
53550
|
+
const [dashboard, setDashboard] = React.useState();
|
|
53551
|
+
//const [schema, setSchema] = React.useState();
|
|
53552
|
+
const [schema] = React.useState();
|
|
53553
|
+
const [rows, setRows] = React.useState([]);
|
|
53554
|
+
const cache = React.useRef({});
|
|
53555
|
+
const channel = useChannel();
|
|
53556
|
+
useFilterManager(channel);
|
|
53557
|
+
const init = async () => {
|
|
53558
|
+
// get dashboard entity
|
|
53559
|
+
const dashboardTemp = await Api.getDashboard({
|
|
53560
|
+
id: id
|
|
53561
|
+
});
|
|
53562
|
+
cache.current[dashboardTemp?.id] = dashboardTemp;
|
|
53563
|
+
setDashboard(dashboardTemp);
|
|
53564
|
+
|
|
53565
|
+
// create rows and columns
|
|
53566
|
+
await create_rows_and_columns(dashboardTemp);
|
|
53567
|
+
};
|
|
53568
|
+
const create_rows_and_columns = async entity => {
|
|
53569
|
+
const srcRows = entity?.doc?.rows || [];
|
|
53570
|
+
const targetRows = [];
|
|
53571
|
+
for (let i = 0; i < srcRows.length; i++) {
|
|
53572
|
+
const row = srcRows[i];
|
|
53573
|
+
row.columns?.forEach(column => {
|
|
53574
|
+
// filter
|
|
53575
|
+
if (column.override?.filter?.length) {
|
|
53576
|
+
const filter = {};
|
|
53577
|
+
column.override.filter.forEach(item => {
|
|
53578
|
+
if (item.hasOwnProperty('value')) filter[item.field] = [item.value];
|
|
53579
|
+
// else filter[item.field] = [sourceDataRow[item.field]];
|
|
53580
|
+
});
|
|
53581
|
+
column.filter = filter;
|
|
53582
|
+
}
|
|
53583
|
+
});
|
|
53584
|
+
targetRows.push(row);
|
|
53585
|
+
}
|
|
53586
|
+
setRows(targetRows);
|
|
53587
|
+
};
|
|
53588
|
+
React.useEffect(() => {
|
|
53589
|
+
if (!id) return;
|
|
53590
|
+
init().catch(error => console.error(error.message));
|
|
53591
|
+
}, [id]);
|
|
53592
|
+
return /*#__PURE__*/React.createElement(Container$1, null, /*#__PURE__*/React.createElement(StyledGrid, {
|
|
53593
|
+
container: true
|
|
53594
|
+
}, rows?.map((row, index) =>
|
|
53595
|
+
/*#__PURE__*/
|
|
53596
|
+
// hasResourceRole(row) &&
|
|
53597
|
+
React.createElement(StyledGrid, {
|
|
53598
|
+
key: index,
|
|
53599
|
+
container: true,
|
|
53600
|
+
item: true
|
|
53601
|
+
}, row?.columns?.map((column, index) => /*#__PURE__*/React.createElement(StyledGrid, _extends({
|
|
53602
|
+
key: index,
|
|
53603
|
+
item: true
|
|
53604
|
+
}, column.layout), /*#__PURE__*/React.createElement(Chart, {
|
|
53605
|
+
auth: auth,
|
|
53606
|
+
cache: cache.current,
|
|
53607
|
+
id: column.id,
|
|
53608
|
+
dashboard: dashboard,
|
|
53609
|
+
schema: schema,
|
|
53610
|
+
channel: null,
|
|
53611
|
+
title: column.title,
|
|
53612
|
+
filter: column.filter,
|
|
53613
|
+
params: params
|
|
53614
|
+
})))))));
|
|
53615
|
+
}
|
|
53616
|
+
|
|
53214
53617
|
var index = {
|
|
53215
|
-
Chart
|
|
53618
|
+
Chart,
|
|
53619
|
+
Dashboard
|
|
53216
53620
|
};
|
|
53217
53621
|
|
|
53218
53622
|
return index;
|