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