@ammarkhalidfarooq/dashboard-package 0.4.44 → 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 +73 -33
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +73 -33
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6240,42 +6240,95 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
6240
6240
|
var categories = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
6241
6241
|
var metricInfo = {
|
|
6242
6242
|
"Organic Users": {
|
|
6243
|
-
value: (
|
|
6243
|
+
value: "".concat(formatNumber(8420)),
|
|
6244
6244
|
subValue: (apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedTrend) || "18% vs last month",
|
|
6245
6245
|
data: [3200, 4100, 2800, 5600, 4200, 6100, 7500],
|
|
6246
|
-
icon: iconsMaterial.PeopleAltOutlined
|
|
6246
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PeopleAltOutlined, {}),
|
|
6247
|
+
money: false,
|
|
6248
|
+
warning: false,
|
|
6249
|
+
error: false
|
|
6247
6250
|
},
|
|
6248
6251
|
"Search Clicks": {
|
|
6249
|
-
value: (
|
|
6252
|
+
value: "".concat(formatNumber(5842)),
|
|
6250
6253
|
subValue: (apiData === null || apiData === void 0 ? void 0 : apiData.netRaisedSub) || "92.3% pass-through",
|
|
6251
6254
|
data: [1500, 1800, 1600, 2200, 2000, 2400, 2800],
|
|
6252
|
-
icon: iconsMaterial.SearchOutlined
|
|
6255
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.SearchOutlined, {}),
|
|
6256
|
+
money: false,
|
|
6257
|
+
warning: false,
|
|
6258
|
+
error: false
|
|
6253
6259
|
},
|
|
6254
6260
|
Donations: {
|
|
6255
|
-
value: (
|
|
6261
|
+
value: "".concat(formatNumber(420)),
|
|
6256
6262
|
subValue: (apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedTrend) || "18% vs last month",
|
|
6257
6263
|
data: [15, 22, 18, 30, 25, 35, 42],
|
|
6258
|
-
icon: iconsMaterial.FavoriteOutlined
|
|
6264
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.FavoriteOutlined, {}),
|
|
6265
|
+
money: false,
|
|
6266
|
+
warning: false,
|
|
6267
|
+
error: false
|
|
6259
6268
|
},
|
|
6260
6269
|
"Conversion Rate": {
|
|
6261
6270
|
value: "3.1%",
|
|
6262
6271
|
subValue: (apiData === null || apiData === void 0 ? void 0 : apiData.avgDonationTrend) || "8.4% vs last month",
|
|
6263
6272
|
data: [2.5, 2.7, 2.6, 3.1, 3.0, 2.9, 3.1],
|
|
6264
|
-
icon: iconsMaterial.Adjust
|
|
6273
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Adjust, {}),
|
|
6274
|
+
money: false,
|
|
6275
|
+
warning: false,
|
|
6276
|
+
error: false
|
|
6265
6277
|
},
|
|
6266
6278
|
"Revenue raised": {
|
|
6267
|
-
value: (
|
|
6279
|
+
value: "$".concat(formatNumber(240398)),
|
|
6268
6280
|
subValue: (apiData === null || apiData === void 0 ? void 0 : apiData.roasTrend) || "0.4x vs last month",
|
|
6269
6281
|
data: [2.5, 3.1, 2.8, 4.2, 3.8, 4.5, 5.2],
|
|
6270
|
-
icon: iconsMaterial.PaidOutlined
|
|
6282
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
|
|
6283
|
+
money: true,
|
|
6284
|
+
warning: false,
|
|
6285
|
+
error: false
|
|
6271
6286
|
},
|
|
6272
6287
|
"Avg donation": {
|
|
6273
|
-
value: (
|
|
6288
|
+
value: "$".concat(formatNumber(130.58)),
|
|
6274
6289
|
subValue: (apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedTrend) || "18% vs last month",
|
|
6275
6290
|
data: [110, 125, 120, 135, 130, 128, 130.58],
|
|
6276
|
-
icon: iconsMaterial.PaidOutlined
|
|
6291
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
|
|
6292
|
+
money: true,
|
|
6293
|
+
warning: false,
|
|
6294
|
+
error: false
|
|
6277
6295
|
}
|
|
6278
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
|
+
};
|
|
6279
6332
|
var selectedInfo = metricInfo[activeMetric];
|
|
6280
6333
|
var mainChart = {
|
|
6281
6334
|
label: activeMetric,
|
|
@@ -6287,30 +6340,17 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
6287
6340
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
6288
6341
|
children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
6289
6342
|
sx: {
|
|
6290
|
-
display: "
|
|
6343
|
+
display: "grid",
|
|
6344
|
+
gridTemplateColumns: {
|
|
6345
|
+
xs: "1fr",
|
|
6346
|
+
sm: "1fr 1fr",
|
|
6347
|
+
md: "1fr 1fr 1fr",
|
|
6348
|
+
lg: "repeat(6, 1fr)"
|
|
6349
|
+
},
|
|
6291
6350
|
gap: 2,
|
|
6292
|
-
mb:
|
|
6293
|
-
flexWrap: "wrap"
|
|
6351
|
+
mb: 1
|
|
6294
6352
|
},
|
|
6295
|
-
children: Object.keys(metricInfo).map(
|
|
6296
|
-
return /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
6297
|
-
title: title,
|
|
6298
|
-
value: metricInfo[title].value,
|
|
6299
|
-
subValue: metricInfo[title].subValue,
|
|
6300
|
-
icon: metricInfo[title].icon,
|
|
6301
|
-
onClick: function onClick() {
|
|
6302
|
-
return setActiveMetric(title);
|
|
6303
|
-
},
|
|
6304
|
-
isActive: activeMetric === title,
|
|
6305
|
-
sx: {
|
|
6306
|
-
flex: 1
|
|
6307
|
-
// border:
|
|
6308
|
-
// activeMetric === title
|
|
6309
|
-
// ? "2px solid rgb(99, 99, 230)"
|
|
6310
|
-
// : "2px solid #f0f0f0",
|
|
6311
|
-
}
|
|
6312
|
-
}, title);
|
|
6313
|
-
})
|
|
6353
|
+
children: Object.keys(metricInfo).map(renderCard)
|
|
6314
6354
|
}), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
|
|
6315
6355
|
container: true,
|
|
6316
6356
|
spacing: 3,
|