@ammarkhalidfarooq/dashboard-package 0.4.43 → 0.4.44

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.es.js CHANGED
@@ -5926,65 +5926,100 @@ var PaidSection = function PaidSection() {
5926
5926
  var categories = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
5927
5927
  var metricInfo = {
5928
5928
  "Total Spent": {
5929
- value: "$80,313",
5929
+ value: "$".concat(formatNumber(80313)),
5930
5930
  subValue: "12% vs last month",
5931
5931
  chartLabel: "Daily Spend",
5932
5932
  data: [800, 950, 700, 1100, 900, 1200, 1300],
5933
- icon: IndeterminateCheckBoxOutlined
5933
+ icon: /*#__PURE__*/jsx(IndeterminateCheckBoxOutlined, {}),
5934
+ money: true,
5935
+ error: false,
5936
+ warning: false
5934
5937
  },
5935
5938
  "Revinue Raised": {
5936
- value: "$240,398",
5939
+ value: "$".concat(formatNumber(240398)),
5937
5940
  subValue: "12% vs last month",
5938
5941
  chartLabel: "Daily Revenue",
5939
5942
  data: [3200, 4100, 2800, 5600, 4200, 6100, 7500],
5940
- icon: PaidOutlined
5943
+ icon: /*#__PURE__*/jsx(PaidOutlined, {}),
5944
+ money: true,
5945
+ error: false,
5946
+ warning: false
5941
5947
  },
5942
5948
  ROAS: {
5943
5949
  value: "3.0",
5944
5950
  subValue: "12% vs last month",
5945
5951
  chartLabel: "ROAS Trend",
5946
5952
  data: [2.5, 3.1, 2.8, 4.2, 3.8, 4.5, 5.2],
5947
- icon: TrendingUp
5953
+ icon: /*#__PURE__*/jsx(TrendingUp, {}),
5954
+ money: false,
5955
+ error: false,
5956
+ warning: false
5948
5957
  },
5949
5958
  "Cost per donor": {
5950
- value: "$373",
5959
+ value: "$".concat(formatNumber(373)),
5951
5960
  subValue: "12% vs last month",
5952
5961
  chartLabel: "CPA Trend",
5953
5962
  data: [350, 380, 360, 410, 390, 370, 373],
5954
- icon: PersonOutlined
5963
+ icon: /*#__PURE__*/jsx(PersonOutlined, {}),
5964
+ money: true,
5965
+ error: false,
5966
+ warning: false
5955
5967
  },
5956
5968
  "Conversion rate": {
5957
5969
  value: "3.1%",
5958
5970
  subValue: "12% vs last month",
5959
5971
  chartLabel: "Conversion Rate",
5960
5972
  data: [2.8, 3.0, 2.9, 3.4, 3.2, 3.1, 3.1],
5961
- icon: Adjust
5973
+ icon: /*#__PURE__*/jsx(Adjust, {}),
5974
+ money: false,
5975
+ error: false,
5976
+ warning: false
5962
5977
  },
5963
5978
  "Avg donation": {
5964
- value: "$130.58",
5979
+ value: "$".concat(formatNumber(130.58)),
5965
5980
  subValue: "12% vs last month",
5966
5981
  chartLabel: "Average Donation",
5967
5982
  data: [120, 135, 125, 140, 130, 128, 130.58],
5968
- icon: PaidOutlined
5983
+ icon: /*#__PURE__*/jsx(PaidOutlined, {}),
5984
+ money: true,
5985
+ error: false,
5986
+ warning: false
5969
5987
  }
5970
5988
  };
5971
5989
  var renderCard = function renderCard(title) {
5972
- return /*#__PURE__*/jsx(DisplayCard, {
5990
+ return /*#__PURE__*/jsx(MetricCard
5991
+ // key={title}
5992
+ , {
5973
5993
  title: title,
5974
- value: metricInfo[title].value,
5975
- subValue: metricInfo[title].subValue,
5994
+ value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
5995
+ caption: metricInfo[title].subValue,
5976
5996
  icon: metricInfo[title].icon,
5997
+ error: metricInfo[title].error,
5998
+ active: activeMetric === title,
5977
5999
  onClick: function onClick() {
5978
6000
  return setActiveMetric(title);
5979
6001
  },
5980
- isActive: activeMetric === title,
5981
- sx: {
5982
- // border:
5983
- // activeMetric === title
5984
- // ? "2px solid rgb(99, 99, 230)"
5985
- // : "2px solid #f0f0f0",
5986
- }
5987
- }, title);
6002
+ sx: metricInfo[title].error ? {
6003
+ border: "2px solid #ef4444",
6004
+ bgcolor: "#fffafa"
6005
+ } : {}
6006
+ })
6007
+ // <DisplayCard
6008
+ // key={title}
6009
+ // title={title}
6010
+ // value={metricInfo[title].value}
6011
+ // subValue={metricInfo[title].subValue}
6012
+ // icon={metricInfo[title].icon}
6013
+ // onClick={() => setActiveMetric(title)}
6014
+ // isActive={activeMetric === title}
6015
+ // sx={{
6016
+ // // border:
6017
+ // // activeMetric === title
6018
+ // // ? "2px solid rgb(99, 99, 230)"
6019
+ // // : "2px solid #f0f0f0",
6020
+ // }}
6021
+ // />
6022
+ ;
5988
6023
  };
5989
6024
  var selectedInfo = metricInfo[activeMetric];
5990
6025
  var mainChart = {