@ammarkhalidfarooq/dashboard-package 0.4.45 → 0.4.46
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/index.cjs.js +44 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +44 -39
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6294,6 +6294,41 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
6294
6294
|
error: false
|
|
6295
6295
|
}
|
|
6296
6296
|
};
|
|
6297
|
+
var renderCard = function renderCard(title) {
|
|
6298
|
+
return /*#__PURE__*/jsxRuntime.jsx(MetricCard
|
|
6299
|
+
// key={title}
|
|
6300
|
+
, {
|
|
6301
|
+
title: title,
|
|
6302
|
+
value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
|
|
6303
|
+
caption: metricInfo[title].subValue,
|
|
6304
|
+
icon: metricInfo[title].icon,
|
|
6305
|
+
error: metricInfo[title].error,
|
|
6306
|
+
active: activeMetric === title,
|
|
6307
|
+
onClick: function onClick() {
|
|
6308
|
+
return setActiveMetric(title);
|
|
6309
|
+
},
|
|
6310
|
+
sx: metricInfo[title].error ? {
|
|
6311
|
+
border: "2px solid #ef4444",
|
|
6312
|
+
bgcolor: "#fffafa"
|
|
6313
|
+
} : {}
|
|
6314
|
+
})
|
|
6315
|
+
// <DisplayCard
|
|
6316
|
+
// key={title}
|
|
6317
|
+
// title={title}
|
|
6318
|
+
// value={metricInfo[title].value}
|
|
6319
|
+
// subValue={metricInfo[title].subValue}
|
|
6320
|
+
// icon={metricInfo[title].icon}
|
|
6321
|
+
// onClick={() => setActiveMetric(title)}
|
|
6322
|
+
// isActive={activeMetric === title}
|
|
6323
|
+
// sx={{
|
|
6324
|
+
// // border:
|
|
6325
|
+
// // activeMetric === title
|
|
6326
|
+
// // ? "2px solid rgb(99, 99, 230)"
|
|
6327
|
+
// // : "2px solid #f0f0f0",
|
|
6328
|
+
// }}
|
|
6329
|
+
// />
|
|
6330
|
+
;
|
|
6331
|
+
};
|
|
6297
6332
|
var selectedInfo = metricInfo[activeMetric];
|
|
6298
6333
|
var mainChart = {
|
|
6299
6334
|
label: activeMetric,
|
|
@@ -6305,47 +6340,17 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
6305
6340
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
6306
6341
|
children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
6307
6342
|
sx: {
|
|
6308
|
-
display: "
|
|
6343
|
+
display: "grid",
|
|
6344
|
+
gridTemplateColumns: {
|
|
6345
|
+
xs: "1fr",
|
|
6346
|
+
sm: "1fr 1fr",
|
|
6347
|
+
md: "1fr 1fr 1fr",
|
|
6348
|
+
lg: "repeat(6, 1fr)"
|
|
6349
|
+
},
|
|
6309
6350
|
gap: 2,
|
|
6310
|
-
mb:
|
|
6311
|
-
flexWrap: "wrap"
|
|
6351
|
+
mb: 1
|
|
6312
6352
|
},
|
|
6313
|
-
children: Object.keys(metricInfo).map(
|
|
6314
|
-
return /*#__PURE__*/jsxRuntime.jsx(MetricCard
|
|
6315
|
-
// key={title}
|
|
6316
|
-
, {
|
|
6317
|
-
title: title,
|
|
6318
|
-
value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
|
|
6319
|
-
caption: metricInfo[title].subValue,
|
|
6320
|
-
icon: metricInfo[title].icon,
|
|
6321
|
-
error: metricInfo[title].error,
|
|
6322
|
-
active: activeMetric === title,
|
|
6323
|
-
onClick: function onClick() {
|
|
6324
|
-
return setActiveMetric(title);
|
|
6325
|
-
},
|
|
6326
|
-
sx: metricInfo[title].error ? {
|
|
6327
|
-
border: "2px solid #ef4444",
|
|
6328
|
-
bgcolor: "#fffafa"
|
|
6329
|
-
} : {}
|
|
6330
|
-
})
|
|
6331
|
-
// <DisplayCard
|
|
6332
|
-
// key={title}
|
|
6333
|
-
// title={title}
|
|
6334
|
-
// value={metricInfo[title].value}
|
|
6335
|
-
// subValue={metricInfo[title].subValue}
|
|
6336
|
-
// icon={metricInfo[title].icon}
|
|
6337
|
-
// onClick={() => setActiveMetric(title)}
|
|
6338
|
-
// isActive={activeMetric === title}
|
|
6339
|
-
// sx={{
|
|
6340
|
-
// flex: 1,
|
|
6341
|
-
// // border:
|
|
6342
|
-
// // activeMetric === title
|
|
6343
|
-
// // ? "2px solid rgb(99, 99, 230)"
|
|
6344
|
-
// // : "2px solid #f0f0f0",
|
|
6345
|
-
// }}
|
|
6346
|
-
// />
|
|
6347
|
-
;
|
|
6348
|
-
})
|
|
6353
|
+
children: Object.keys(metricInfo).map(renderCard)
|
|
6349
6354
|
}), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
|
|
6350
6355
|
container: true,
|
|
6351
6356
|
spacing: 3,
|