@tenancy.nz/feature-ui 1.4.11 → 1.5.1

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.
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
- import { useMediaQuery, Box, Paper, Text } from '@tenancy.nz/ui';
2
+ import { uid } from 'react-uid';
3
+ import Stack from '@mui/material/Stack';
4
+ import useMediaQuery from '@mui/material/useMediaQuery';
5
+ import { Paper, Text, Grid } from '@tenancy.nz/ui';
3
6
  import AnalyticsBox from './AnalyticsBox.js';
4
- import EnquiriesDoughnutChart from './EnquiriesDoughnutChart.js';
7
+ import AnalyticsDoughnutChart from './analytics-doughnut-chart.js';
5
8
 
6
9
  function AnalyticsSection(_ref) {
7
10
  var viewingsCount = _ref.viewingsCount,
@@ -11,158 +14,165 @@ function AnalyticsSection(_ref) {
11
14
  applicationsCount = _ref.applicationsCount,
12
15
  averageRent = _ref.averageRent,
13
16
  textUsage = _ref.textUsage,
14
- tradeMeEnquiriesCount = _ref.tradeMeEnquiriesCount,
15
- bookMeEnquiriesCount = _ref.bookMeEnquiriesCount,
16
- manualEnquiryCount = _ref.manualEnquiryCount,
17
17
  agreementsCount = _ref.agreementsCount,
18
18
  agreementsFinalisedCount = _ref.agreementsFinalisedCount,
19
- filterDaysCount = _ref.filterDaysCount;
19
+ filterDaysCount = _ref.filterDaysCount,
20
+ allHouseEnquiriesCount = _ref.allHouseEnquiriesCount,
21
+ bookMeEnquiriesCount = _ref.bookMeEnquiriesCount,
22
+ oneRoofEnquiriesCount = _ref.oneRoofEnquiriesCount,
23
+ realestateEnquiriesCount = _ref.realestateEnquiriesCount,
24
+ tradeMeEnquiriesCount = _ref.tradeMeEnquiriesCount,
25
+ manualEnquiryCount = _ref.manualEnquiryCount,
26
+ allHouseBookingsCount = _ref.allHouseBookingsCount,
27
+ bookMeBookingsCount = _ref.bookMeBookingsCount,
28
+ oneRoofBookingsCount = _ref.oneRoofBookingsCount,
29
+ realestateBookingsCount = _ref.realestateBookingsCount,
30
+ tradeMeBookingsCount = _ref.tradeMeBookingsCount,
31
+ manualBookingsCount = _ref.manualBookingsCount,
32
+ _ref$outlinedItems = _ref.outlinedItems,
33
+ outlinedItems = _ref$outlinedItems === void 0 ? false : _ref$outlinedItems;
20
34
  var isXlUp = useMediaQuery(function (theme) {
21
35
  return theme.breakpoints.up("xl");
22
36
  });
23
- return /* @__PURE__ */React.createElement(Box, {
24
- display: "flex",
25
- align: "stretch",
26
- direction: {
27
- xs: "column-reverse",
28
- mlg: "row"
29
- },
30
- gap: "27px"
31
- }, /* @__PURE__ */React.createElement(Box, {
32
- width: "100%",
37
+ var stats = [{
38
+ label: "Viewings",
39
+ value: viewingsCount
40
+ }, {
41
+ label: "Bookings",
42
+ value: bookingsCount
43
+ }, {
44
+ label: "Attendees",
45
+ value: attendeesCount
46
+ }, {
47
+ label: "Cancellations",
48
+ value: cancellationsCount
49
+ }, {
50
+ label: "Applications",
51
+ value: applicationsCount
52
+ }, {
53
+ label: "Average Rent",
54
+ value: "$".concat(averageRent)
55
+ }, {
56
+ label: "Text Usage Total",
57
+ value: textUsage
58
+ }];
59
+ return /* @__PURE__ */React.createElement(Stack, {
60
+ gap: 6
61
+ }, /* @__PURE__ */React.createElement(Stack, {
62
+ flexDirection: "row",
63
+ gap: 6,
64
+ flexWrap: "wrap",
65
+ alignItems: "stretch"
66
+ }, /* @__PURE__ */React.createElement(Paper, {
67
+ outlined: outlinedItems,
68
+ inset: "medium",
69
+ overflow: false,
33
70
  sx: {
34
- maxWidth: {
35
- xs: "100%",
36
- mob: "340px",
37
- xl: "463px"
38
- }
71
+ width: "100%",
72
+ minWidth: {
73
+ lg: "456px"
74
+ },
75
+ flex: {
76
+ xs: "0 0 100%",
77
+ md: 1
78
+ },
79
+ alignItems: "center",
80
+ justifyContent: "center",
81
+ display: "flex"
39
82
  }
40
- }, /* @__PURE__ */React.createElement(Paper, {
41
- outlined: true,
83
+ }, /* @__PURE__ */React.createElement(AnalyticsDoughnutChart, {
84
+ tradeMeCount: tradeMeEnquiriesCount,
85
+ bookMeCount: bookMeEnquiriesCount,
86
+ manualCount: manualEnquiryCount,
87
+ allhouseCount: allHouseEnquiriesCount,
88
+ oneRoofCount: oneRoofEnquiriesCount,
89
+ realEstateCount: realestateEnquiriesCount,
90
+ heading: "Number of enquiries"
91
+ })), /* @__PURE__ */React.createElement(Paper, {
92
+ outlined: outlinedItems,
93
+ inset: "medium",
94
+ overflow: false,
42
95
  sx: {
43
96
  width: "100%",
44
- position: "relative",
45
- height: "100%"
97
+ minWidth: {
98
+ lg: "456px"
99
+ },
100
+ flex: {
101
+ xs: "0 0 100%",
102
+ md: 1
103
+ },
104
+ alignItems: "center",
105
+ justifyContent: "center",
106
+ display: "flex"
107
+ }
108
+ }, /* @__PURE__ */React.createElement(AnalyticsDoughnutChart, {
109
+ tradeMeCount: tradeMeBookingsCount,
110
+ bookMeCount: bookMeBookingsCount,
111
+ manualCount: manualBookingsCount,
112
+ allhouseCount: allHouseBookingsCount,
113
+ oneRoofCount: oneRoofBookingsCount,
114
+ realEstateCount: realestateBookingsCount,
115
+ heading: "Number of bookings"
116
+ })), /* @__PURE__ */React.createElement(Stack, {
117
+ gap: {
118
+ xs: 3,
119
+ md: 6
120
+ },
121
+ justifyContent: "space-between",
122
+ sx: {
123
+ flexDirection: {
124
+ xs: "row",
125
+ lg: "column"
126
+ },
127
+ flex: {
128
+ sm: "0 0 100%",
129
+ lg: "0 0 284px"
130
+ }
46
131
  }
47
- }, /* @__PURE__ */React.createElement(Box, {
48
- mt: "20px",
49
- height: "100%"
50
- }, /* @__PURE__ */React.createElement(EnquiriesDoughnutChart, {
51
- tradeMeEnquiriesCount: tradeMeEnquiriesCount,
52
- bookMeEnquiriesCount: bookMeEnquiriesCount,
53
- manualEnquiryCount: manualEnquiryCount
54
- })))), /* @__PURE__ */React.createElement(Box, {
55
- width: "100%"
56
- }, /* @__PURE__ */React.createElement(Box, {
57
- display: "flex",
58
- direction: "row",
59
- width: "100%",
60
- gap: 6
61
- }, /* @__PURE__ */React.createElement(Box, {
62
- flex: 3
63
- }, /* @__PURE__ */React.createElement(Box, {
64
- display: "flex",
65
- gap: 6
66
- }, /* @__PURE__ */React.createElement(AnalyticsBox, {
67
- outlined: true,
68
- label: "Viewings",
69
- amount: viewingsCount,
70
- width: "100%",
71
- height: isXlUp ? "157px" : "125px"
72
- }), /* @__PURE__ */React.createElement(AnalyticsBox, {
73
- outlined: true,
74
- label: "Bookings",
75
- amount: bookingsCount,
76
- width: "100%",
77
- height: isXlUp ? "157px" : "125px"
78
- }), /* @__PURE__ */React.createElement(AnalyticsBox, {
79
- outlined: true,
80
- label: "Attendees",
81
- amount: attendeesCount,
82
- width: "100%",
83
- border: "3px solid #6FD3C0",
84
- height: isXlUp ? "157px" : "125px"
85
- })), /* @__PURE__ */React.createElement(Box, {
86
- display: "flex",
87
- width: "100%",
88
- gap: 6,
89
- mt: 6
90
132
  }, /* @__PURE__ */React.createElement(AnalyticsBox, {
91
- outlined: true,
92
- label: "Converted Properties",
133
+ outlined: outlinedItems,
134
+ label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
93
135
  amount: agreementsCount,
94
136
  width: "100%",
95
- height: isXlUp ? "157px" : "125px",
96
- text: /* @__PURE__ */React.createElement(Box, {
97
- as: "span",
98
- maxWidth: "276px"
99
- }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement(Text, {
100
- as: "span",
101
- display: "inline",
102
- weight: "700",
103
- fontSize: "inherit"
104
- }, filterDaysCount), " ", "days where an agreement has been", " ", /* @__PURE__ */React.createElement(Text, {
137
+ height: isXlUp ? "157px" : "auto",
138
+ text: /* @__PURE__ */React.createElement(Text, {
105
139
  as: "span",
106
- display: "inline",
107
- weight: "700",
108
- fontSize: "inherit"
109
- }, "created"))
140
+ variant: "inherit"
141
+ }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement("strong", null, filterDaysCount), " days where an agreement has been ", /* @__PURE__ */React.createElement("strong", null, "created"))
110
142
  }), /* @__PURE__ */React.createElement(AnalyticsBox, {
111
- outlined: true,
112
- label: "Converted Properties",
143
+ outlined: outlinedItems,
144
+ label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
113
145
  amount: agreementsFinalisedCount,
114
146
  width: "100%",
115
- height: isXlUp ? "157px" : "125px",
116
- text: /* @__PURE__ */React.createElement(Box, {
147
+ height: isXlUp ? "157px" : "auto",
148
+ text: /* @__PURE__ */React.createElement(Text, {
117
149
  as: "span",
118
- maxWidth: "276px"
119
- }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement(Text, {
120
- as: "span",
121
- display: "inline",
122
- weight: "700",
123
- fontSize: "inherit"
124
- }, filterDaysCount), " ", "days where an agreement has been", " ", /* @__PURE__ */React.createElement(Text, {
125
- as: "span",
126
- display: "inline",
127
- weight: "700",
128
- fontSize: "inherit"
129
- }, "finalised"))
130
- }))), /* @__PURE__ */React.createElement(Box, {
131
- flex: 2
132
- }, /* @__PURE__ */React.createElement(Box, {
133
- display: "flex",
134
- gap: 6
135
- }, /* @__PURE__ */React.createElement(AnalyticsBox, {
136
- outlined: true,
137
- label: "Cancellations",
138
- amount: cancellationsCount,
139
- width: "100%",
140
- border: "3px solid #ED0D8D",
141
- height: isXlUp ? "157px" : "125px"
142
- }), /* @__PURE__ */React.createElement(AnalyticsBox, {
143
- outlined: true,
144
- label: "Applications",
145
- amount: applicationsCount,
146
- width: "100%",
147
- border: "3px solid #F5C440",
148
- height: isXlUp ? "157px" : "125px"
149
- })), /* @__PURE__ */React.createElement(Box, {
150
- display: "flex",
151
- gap: 6,
152
- mt: 6
153
- }, /* @__PURE__ */React.createElement(AnalyticsBox, {
154
- outlined: true,
155
- label: /* @__PURE__ */React.createElement("span", null, "Average", /* @__PURE__ */React.createElement("br", null), " Rent"),
156
- amount: averageRent,
157
- width: "100%",
158
- height: isXlUp ? "157px" : "125px"
159
- }), /* @__PURE__ */React.createElement(AnalyticsBox, {
160
- outlined: true,
161
- label: /* @__PURE__ */React.createElement("span", null, "Text Usage", /* @__PURE__ */React.createElement("br", null), " Total"),
162
- amount: textUsage,
163
- width: "100%",
164
- height: isXlUp ? "157px" : "125px"
165
- }))))));
150
+ variant: "inherit"
151
+ }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement("strong", null, " ", filterDaysCount), " days where an agreement has been ", /* @__PURE__ */React.createElement("strong", null, "finalised"))
152
+ })), /* @__PURE__ */React.createElement(Grid, {
153
+ container: true,
154
+ spacing: {
155
+ xs: 3,
156
+ md: 6
157
+ }
158
+ }, stats.map(function (stat, i) {
159
+ return /* @__PURE__ */React.createElement(Grid, {
160
+ item: true,
161
+ key: uid(stat, i),
162
+ flex: {
163
+ lg: 1
164
+ },
165
+ xs: 6,
166
+ sm: 3,
167
+ md: 2
168
+ }, /* @__PURE__ */React.createElement(AnalyticsBox, {
169
+ outlined: outlinedItems,
170
+ label: stat.label,
171
+ amount: stat.value,
172
+ width: "100%",
173
+ height: isXlUp ? "157px" : "124px"
174
+ }));
175
+ }))));
166
176
  }
167
177
 
168
178
  export { AnalyticsSection as default };
@@ -0,0 +1,39 @@
1
+ import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React from 'react';
3
+ import Stack from '@mui/material/Stack';
4
+ import { Box, Text } from '@tenancy.nz/ui';
5
+
6
+ function ChartLegend(_ref) {
7
+ var _ref$color = _ref.color,
8
+ color = _ref$color === void 0 ? void 0 : _ref$color,
9
+ _ref$count = _ref.count,
10
+ count = _ref$count === void 0 ? void 0 : _ref$count,
11
+ label = _ref.label,
12
+ _ref$sx = _ref.sx,
13
+ sx = _ref$sx === void 0 ? {} : _ref$sx;
14
+ return /* @__PURE__ */React.createElement(Stack, {
15
+ flexDirection: "row",
16
+ alignItems: "center",
17
+ gap: 1.5,
18
+ sx: _objectSpread2(_objectSpread2({}, sx), {}, {
19
+ userSelect: "none",
20
+ fontSize: "12px"
21
+ })
22
+ }, /* @__PURE__ */React.createElement(Box, {
23
+ borderRadius: "4px",
24
+ width: "32px",
25
+ height: "18px",
26
+ bgcolor: color || "#D9D9D9"
27
+ }), /* @__PURE__ */React.createElement(Box, {
28
+ minWidth: "24px"
29
+ }, count !== void 0 && count >= 0 && /* @__PURE__ */React.createElement(Text, {
30
+ align: "center",
31
+ weight: "700",
32
+ variant: "inherit"
33
+ }, count)), typeof label !== "string" ? label : /* @__PURE__ */React.createElement(Text, {
34
+ weight: "500",
35
+ variant: "inherit"
36
+ }, label));
37
+ }
38
+
39
+ export { ChartLegend as default };
@@ -1,19 +1,24 @@
1
1
  import React from 'react';
2
- import { CircleCheckIcon, CircleTimesIcon } from '@tenancy.nz/icons';
2
+ import CheckCircleOutlineRoundedIcon from '@mui/icons-material/CheckCircleOutlineRounded';
3
+ import HighlightOffRoundedIcon from '@mui/icons-material/HighlightOffRounded';
3
4
  import { Text } from '@tenancy.nz/ui';
4
5
 
5
6
  function CheckedIcon(_ref) {
6
7
  var value = _ref.value;
7
8
  if (value === true) {
8
- return /* @__PURE__ */React.createElement(CircleCheckIcon, {
9
- color: "success.main",
10
- size: "20px"
9
+ return /* @__PURE__ */React.createElement(CheckCircleOutlineRoundedIcon, {
10
+ sx: {
11
+ color: "success.main"
12
+ },
13
+ fontSize: "small"
11
14
  });
12
15
  }
13
16
  if (value === false) {
14
- return /* @__PURE__ */React.createElement(CircleTimesIcon, {
15
- color: "error.main",
16
- size: "20px"
17
+ return /* @__PURE__ */React.createElement(HighlightOffRoundedIcon, {
18
+ sx: {
19
+ color: "error.main"
20
+ },
21
+ fontSize: "small"
17
22
  });
18
23
  }
19
24
  return /* @__PURE__ */React.createElement(Text, {
@@ -1,7 +1,10 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React from 'react';
3
3
  import { Paper, Media, Box, Heading, Text } from '@tenancy.nz/ui';
4
- import { Icon } from '@tenancy.nz/icons';
4
+ import Stack from '@mui/material/Stack';
5
+ import BedRoundedIcon from '@mui/icons-material/BedRounded';
6
+ import BathtubRoundedIcon from '@mui/icons-material/BathtubRounded';
7
+ import DirectionsCarRoundedIcon from '@mui/icons-material/DirectionsCarRounded';
5
8
  import IconLabel from './IconLabel.js';
6
9
  import { StyledPropertyImage, StyledPropertyDetailsBox, StyledPropertyAmenitiesBox } from './PropertyCard.styled.js';
7
10
 
@@ -32,7 +35,6 @@ function PropertyCard(_ref) {
32
35
  alignItems: "center"
33
36
  }
34
37
  }, rest), /* @__PURE__ */React.createElement(StyledPropertyImage, null, /* @__PURE__ */React.createElement(Media, {
35
- as: "img",
36
38
  title: address,
37
39
  src: imgSrc
38
40
  })), /* @__PURE__ */React.createElement(StyledPropertyDetailsBox, null, /* @__PURE__ */React.createElement(Box, null, /* @__PURE__ */React.createElement(Heading, {
@@ -49,6 +51,10 @@ function PropertyCard(_ref) {
49
51
  xs: "10px",
50
52
  sm: 0
51
53
  },
54
+ width: {
55
+ xs: "100%",
56
+ sm: "auto"
57
+ },
52
58
  "@media print": {
53
59
  ml: "auto"
54
60
  }
@@ -56,84 +62,99 @@ function PropertyCard(_ref) {
56
62
  }, /* @__PURE__ */React.createElement(StyledPropertyAmenitiesBox, null, rent && /* @__PURE__ */React.createElement(Heading, {
57
63
  as: "h4",
58
64
  weight: "700"
59
- }, rent), /* @__PURE__ */React.createElement(Box, {
60
- fontSize: "16px"
65
+ }, rent), /* @__PURE__ */React.createElement(Stack, {
66
+ sx: {
67
+ fontSize: "16px",
68
+ fontWeight: "600"
69
+ },
70
+ flexDirection: "row",
71
+ gap: 3,
72
+ alignItems: "center"
61
73
  }, (noOfBedrooms || String(noOfBedrooms) === "0") && /* @__PURE__ */React.createElement(IconLabel, {
62
74
  color: "text.primary",
63
- startIcon: /* @__PURE__ */React.createElement(Icon, {
64
- size: 21,
65
- color: "inherit",
66
- name: "bed"
75
+ startIcon: /* @__PURE__ */React.createElement(BedRoundedIcon, {
76
+ sx: {
77
+ color: "tertiary.main"
78
+ },
79
+ fontSize: "small"
67
80
  })
68
81
  }, /* @__PURE__ */React.createElement(Text, {
69
82
  as: "span",
70
83
  variant: "inherit"
71
84
  }, noOfBedrooms)), (noOfBathrooms || String(noOfBathrooms) === "0") && /* @__PURE__ */React.createElement(IconLabel, {
72
85
  color: "text.primary",
73
- startIcon: /* @__PURE__ */React.createElement(Icon, {
74
- size: 21,
75
- color: "inherit",
76
- name: "bath"
77
- }),
78
- marginLeft: 3
86
+ startIcon: /* @__PURE__ */React.createElement(BathtubRoundedIcon, {
87
+ sx: {
88
+ color: "tertiary.main"
89
+ },
90
+ fontSize: "small"
91
+ })
79
92
  }, /* @__PURE__ */React.createElement(Text, {
80
93
  as: "span",
81
94
  variant: "inherit"
82
95
  }, noOfBathrooms)), (noOfCarparks || String(noOfCarparks) === "0") && /* @__PURE__ */React.createElement(IconLabel, {
83
96
  color: "text.primary",
84
- startIcon: /* @__PURE__ */React.createElement(Icon, {
85
- size: 21,
86
- color: "inherit",
87
- name: "car"
88
- }),
89
- marginLeft: 3
97
+ startIcon: /* @__PURE__ */React.createElement(DirectionsCarRoundedIcon, {
98
+ sx: {
99
+ color: "tertiary.main"
100
+ },
101
+ fontSize: "small"
102
+ })
90
103
  }, /* @__PURE__ */React.createElement(Text, {
91
104
  as: "span",
92
105
  variant: "inherit"
93
106
  }, noOfCarparks)))), !compact && /* @__PURE__ */React.createElement(Box, {
94
- paddingLeft: "25px",
95
- borderLeft: "1px solid #00000040",
107
+ paddingLeft: "24px",
96
108
  display: "flex",
97
109
  direction: "column",
98
110
  sx: {
99
111
  gap: {
100
- xs: "18px",
101
- lg: "10px",
112
+ xs: 4,
113
+ lg: 2,
102
114
  xl: 0
103
115
  },
104
- justifyContent: "space-between"
116
+ justifyContent: "space-between",
117
+ borderLeft: {
118
+ xs: "none",
119
+ sm: "1px solid"
120
+ },
121
+ borderLeftColor: {
122
+ xs: "transparent",
123
+ sm: "grey.300"
124
+ },
125
+ ml: {
126
+ xs: "auto",
127
+ sm: "0"
128
+ }
105
129
  }
106
- }, viewingsCount && /* @__PURE__ */React.createElement(Box, {
130
+ }, viewingsCount !== void 0 && /* @__PURE__ */React.createElement(Box, {
107
131
  display: "flex",
108
132
  align: "center",
109
- gap: "12px"
133
+ gap: 2
110
134
  }, /* @__PURE__ */React.createElement(Box, {
111
- minWidth: "87px"
135
+ minWidth: "67px"
112
136
  }, /* @__PURE__ */React.createElement(Text, {
113
- transform: "uppercase",
114
137
  color: "textPrimary",
115
138
  as: "span",
116
- weight: "600",
139
+ weight: "500",
117
140
  align: "right",
118
- lineHeight: "15px"
141
+ variant: "body2"
119
142
  }, "Viewings")), /* @__PURE__ */React.createElement(Heading, {
120
- as: "h2"
121
- }, viewingsCount)), enquiriesCount && /* @__PURE__ */React.createElement(Box, {
143
+ as: "h4"
144
+ }, viewingsCount)), enquiriesCount !== void 0 && /* @__PURE__ */React.createElement(Box, {
122
145
  display: "flex",
123
146
  align: "center",
124
- gap: "12px"
147
+ gap: 2
125
148
  }, /* @__PURE__ */React.createElement(Box, {
126
- minWidth: "87px"
149
+ minWidth: "67px"
127
150
  }, /* @__PURE__ */React.createElement(Text, {
128
- transform: "uppercase",
151
+ variant: "body2",
129
152
  color: "textPrimary",
130
153
  as: "span",
131
- weight: "600",
132
- minWidth: "87px",
133
- align: "right",
134
- lineHeight: "15px"
154
+ weight: "500",
155
+ align: "right"
135
156
  }, "Enquiries")), /* @__PURE__ */React.createElement(Heading, {
136
- as: "h2"
157
+ as: "h4"
137
158
  }, enquiriesCount))))));
138
159
  }
139
160
 
@@ -3,7 +3,7 @@ import { css } from '@emotion/react';
3
3
  import styled from '@emotion/styled';
4
4
 
5
5
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
6
- var StyledPropertyImage = styled.figure(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n width: 120px;\n height: 95px;\n flex: 0 0 95px;\n overflow: hidden;\n\n ", "\n"])), function (_ref) {
6
+ var StyledPropertyImage = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n width: 120px;\n height: 95px;\n flex: 0 0 95px;\n overflow: hidden;\n\n ", "\n"])), function (_ref) {
7
7
  var theme = _ref.theme;
8
8
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", " {\n display: none;\n }\n\n ", " {\n width: 150px;\n height: 135px;\n flex: 0 0 150px;\n }\n\n @media print {\n width: 150px;\n height: 135px;\n flex: 0 0 150px;\n display: block;\n }\n "])), theme.breakpoints.down("sm"), theme.breakpoints.up("sm"));
9
9
  });
@@ -11,9 +11,9 @@ var StyledPropertyDetailsBox = styled.div(_templateObject3 || (_templateObject3
11
11
  var theme = _ref2.theme;
12
12
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", " {\n flex-direction: row;\n align-items: center;\n }\n "])), theme.breakpoints.up("sm"));
13
13
  });
14
- var StyledPropertyAmenitiesBox = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-right: 25px;\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n\n gap: 18px;\n min-width: 170px;\n height: 100%;\n justify-content: space-between;\n\n ", "\n @media print {\n align-items: flex-end;\n }\n"])), function (_ref3) {
14
+ var StyledPropertyAmenitiesBox = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-right: 25px;\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n gap: 8px;\n min-width: 170px;\n height: 100%;\n justify-content: space-between;\n\n ", "\n @media print {\n align-items: flex-end;\n }\n"])), function (_ref3) {
15
15
  var theme = _ref3.theme;
16
- return "\n @media (min-width: ".concat(theme.breakpoints.values.md, "px) {\n align-items: flex-end;\n }\n ");
16
+ return "\n @media (min-width: ".concat(theme.breakpoints.values.sm, "px) {\n align-items: flex-end;\n }\n ");
17
17
  });
18
18
 
19
19
  export { StyledPropertyAmenitiesBox, StyledPropertyDetailsBox, StyledPropertyImage };
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import DoughnutChart from './doughnut-chart.js';
3
+ import { parseChartCount } from '../utils/helpers/general.js';
4
+
5
+ function AnalyticsDoughnutChart(_ref) {
6
+ var _ref$allhouseCount = _ref.allhouseCount,
7
+ allhouseCount = _ref$allhouseCount === void 0 ? 0 : _ref$allhouseCount,
8
+ _ref$bookMeCount = _ref.bookMeCount,
9
+ bookMeCount = _ref$bookMeCount === void 0 ? 0 : _ref$bookMeCount,
10
+ _ref$oneRoofCount = _ref.oneRoofCount,
11
+ oneRoofCount = _ref$oneRoofCount === void 0 ? 0 : _ref$oneRoofCount,
12
+ _ref$realEstateCount = _ref.realEstateCount,
13
+ realEstateCount = _ref$realEstateCount === void 0 ? 0 : _ref$realEstateCount,
14
+ _ref$tradeMeCount = _ref.tradeMeCount,
15
+ tradeMeCount = _ref$tradeMeCount === void 0 ? 0 : _ref$tradeMeCount,
16
+ _ref$manualCount = _ref.manualCount,
17
+ manualCount = _ref$manualCount === void 0 ? 0 : _ref$manualCount,
18
+ _ref$heading = _ref.heading,
19
+ heading = _ref$heading === void 0 ? void 0 : _ref$heading;
20
+ var data = [{
21
+ color: "#0CC1A3",
22
+ count: parseChartCount(bookMeCount),
23
+ slug: "bookme",
24
+ title: "Tenant Portal"
25
+ }, {
26
+ color: "#000000",
27
+ count: parseChartCount(allhouseCount),
28
+ slug: "allhouse",
29
+ title: "Allhouse"
30
+ }, {
31
+ color: "#FF8500",
32
+ count: parseChartCount(oneRoofCount),
33
+ slug: "oneroof",
34
+ title: "OneRoof"
35
+ }, {
36
+ color: "#0098FF",
37
+ count: parseChartCount(realEstateCount),
38
+ slug: "realestate",
39
+ title: "realestate.co.nz"
40
+ }, {
41
+ color: "#4854D3",
42
+ count: parseChartCount(tradeMeCount),
43
+ slug: "trademe",
44
+ title: "Trade Me"
45
+ }, {
46
+ color: "#D9D9D9",
47
+ count: parseChartCount(manualCount),
48
+ slug: "manual",
49
+ title: "Manually Generated"
50
+ }];
51
+ return /* @__PURE__ */React.createElement(DoughnutChart, {
52
+ data: data,
53
+ heading: heading
54
+ });
55
+ }
56
+
57
+ export { AnalyticsDoughnutChart as default };