@tenancy.nz/feature-ui 1.5.0 → 1.5.2
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/cjs/components/AnalyticsSection.cjs +12 -10
- package/dist/cjs/components/PropertyCard.cjs +19 -5
- package/dist/cjs/components/PropertyCard.styled.cjs +1 -1
- package/dist/cjs/components/doughnut-chart.cjs +5 -1
- package/dist/cjs/utils/helpers/general.cjs +0 -3
- package/dist/esm/components/AnalyticsSection.js +12 -10
- package/dist/esm/components/PropertyCard.js +19 -5
- package/dist/esm/components/PropertyCard.styled.js +1 -1
- package/dist/esm/components/doughnut-chart.js +5 -1
- package/dist/esm/utils/helpers/general.js +0 -3
- package/package.json +3 -3
|
@@ -32,7 +32,9 @@ function AnalyticsSection(_ref) {
|
|
|
32
32
|
oneRoofBookingsCount = _ref.oneRoofBookingsCount,
|
|
33
33
|
realestateBookingsCount = _ref.realestateBookingsCount,
|
|
34
34
|
tradeMeBookingsCount = _ref.tradeMeBookingsCount,
|
|
35
|
-
manualBookingsCount = _ref.manualBookingsCount
|
|
35
|
+
manualBookingsCount = _ref.manualBookingsCount,
|
|
36
|
+
_ref$outlinedItems = _ref.outlinedItems,
|
|
37
|
+
outlinedItems = _ref$outlinedItems === void 0 ? false : _ref$outlinedItems;
|
|
36
38
|
var isXlUp = useMediaQuery(function (theme) {
|
|
37
39
|
return theme.breakpoints.up("xl");
|
|
38
40
|
});
|
|
@@ -66,17 +68,17 @@ function AnalyticsSection(_ref) {
|
|
|
66
68
|
flexWrap: "wrap",
|
|
67
69
|
alignItems: "stretch"
|
|
68
70
|
}, /* @__PURE__ */React.createElement(ui.Paper, {
|
|
69
|
-
outlined:
|
|
71
|
+
outlined: outlinedItems,
|
|
70
72
|
inset: "medium",
|
|
71
73
|
overflow: false,
|
|
72
74
|
sx: {
|
|
73
75
|
width: "100%",
|
|
74
76
|
minWidth: {
|
|
75
|
-
|
|
77
|
+
lg: "456px"
|
|
76
78
|
},
|
|
77
79
|
flex: {
|
|
78
80
|
xs: "0 0 100%",
|
|
79
|
-
|
|
81
|
+
md: 1
|
|
80
82
|
},
|
|
81
83
|
alignItems: "center",
|
|
82
84
|
justifyContent: "center",
|
|
@@ -91,17 +93,17 @@ function AnalyticsSection(_ref) {
|
|
|
91
93
|
realEstateCount: realestateEnquiriesCount,
|
|
92
94
|
heading: "Number of enquiries"
|
|
93
95
|
})), /* @__PURE__ */React.createElement(ui.Paper, {
|
|
94
|
-
outlined:
|
|
96
|
+
outlined: outlinedItems,
|
|
95
97
|
inset: "medium",
|
|
96
98
|
overflow: false,
|
|
97
99
|
sx: {
|
|
98
100
|
width: "100%",
|
|
99
101
|
minWidth: {
|
|
100
|
-
|
|
102
|
+
lg: "456px"
|
|
101
103
|
},
|
|
102
104
|
flex: {
|
|
103
105
|
xs: "0 0 100%",
|
|
104
|
-
|
|
106
|
+
md: 1
|
|
105
107
|
},
|
|
106
108
|
alignItems: "center",
|
|
107
109
|
justifyContent: "center",
|
|
@@ -132,7 +134,7 @@ function AnalyticsSection(_ref) {
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
}, /* @__PURE__ */React.createElement(AnalyticsBox.default, {
|
|
135
|
-
outlined:
|
|
137
|
+
outlined: outlinedItems,
|
|
136
138
|
label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
|
|
137
139
|
amount: agreementsCount,
|
|
138
140
|
width: "100%",
|
|
@@ -142,7 +144,7 @@ function AnalyticsSection(_ref) {
|
|
|
142
144
|
variant: "inherit"
|
|
143
145
|
}, "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"))
|
|
144
146
|
}), /* @__PURE__ */React.createElement(AnalyticsBox.default, {
|
|
145
|
-
outlined:
|
|
147
|
+
outlined: outlinedItems,
|
|
146
148
|
label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
|
|
147
149
|
amount: agreementsFinalisedCount,
|
|
148
150
|
width: "100%",
|
|
@@ -168,7 +170,7 @@ function AnalyticsSection(_ref) {
|
|
|
168
170
|
sm: 3,
|
|
169
171
|
md: 2
|
|
170
172
|
}, /* @__PURE__ */React.createElement(AnalyticsBox.default, {
|
|
171
|
-
outlined:
|
|
173
|
+
outlined: outlinedItems,
|
|
172
174
|
label: stat.label,
|
|
173
175
|
amount: stat.value,
|
|
174
176
|
width: "100%",
|
|
@@ -55,6 +55,10 @@ function PropertyCard(_ref) {
|
|
|
55
55
|
xs: "10px",
|
|
56
56
|
sm: 0
|
|
57
57
|
},
|
|
58
|
+
width: {
|
|
59
|
+
xs: "100%",
|
|
60
|
+
sm: "auto"
|
|
61
|
+
},
|
|
58
62
|
"@media print": {
|
|
59
63
|
ml: "auto"
|
|
60
64
|
}
|
|
@@ -105,8 +109,6 @@ function PropertyCard(_ref) {
|
|
|
105
109
|
variant: "inherit"
|
|
106
110
|
}, noOfCarparks)))), !compact && /* @__PURE__ */React.createElement(ui.Box, {
|
|
107
111
|
paddingLeft: "24px",
|
|
108
|
-
borderLeft: "1px solid",
|
|
109
|
-
borderLeftColor: "grey.300",
|
|
110
112
|
display: "flex",
|
|
111
113
|
direction: "column",
|
|
112
114
|
sx: {
|
|
@@ -115,9 +117,21 @@ function PropertyCard(_ref) {
|
|
|
115
117
|
lg: 2,
|
|
116
118
|
xl: 0
|
|
117
119
|
},
|
|
118
|
-
justifyContent: "space-between"
|
|
120
|
+
justifyContent: "space-between",
|
|
121
|
+
borderLeft: {
|
|
122
|
+
xs: "none",
|
|
123
|
+
sm: "1px solid"
|
|
124
|
+
},
|
|
125
|
+
borderLeftColor: {
|
|
126
|
+
xs: "transparent",
|
|
127
|
+
sm: "grey.300"
|
|
128
|
+
},
|
|
129
|
+
ml: {
|
|
130
|
+
xs: "auto",
|
|
131
|
+
sm: "0"
|
|
132
|
+
}
|
|
119
133
|
}
|
|
120
|
-
}, viewingsCount && /* @__PURE__ */React.createElement(ui.Box, {
|
|
134
|
+
}, viewingsCount !== void 0 && /* @__PURE__ */React.createElement(ui.Box, {
|
|
121
135
|
display: "flex",
|
|
122
136
|
align: "center",
|
|
123
137
|
gap: 2
|
|
@@ -131,7 +145,7 @@ function PropertyCard(_ref) {
|
|
|
131
145
|
variant: "body2"
|
|
132
146
|
}, "Viewings")), /* @__PURE__ */React.createElement(ui.Heading, {
|
|
133
147
|
as: "h4"
|
|
134
|
-
}, viewingsCount)), enquiriesCount && /* @__PURE__ */React.createElement(ui.Box, {
|
|
148
|
+
}, viewingsCount)), enquiriesCount !== void 0 && /* @__PURE__ */React.createElement(ui.Box, {
|
|
135
149
|
display: "flex",
|
|
136
150
|
align: "center",
|
|
137
151
|
gap: 2
|
|
@@ -15,7 +15,7 @@ var StyledPropertyDetailsBox = styled.div(_templateObject3 || (_templateObject3
|
|
|
15
15
|
});
|
|
16
16
|
var StyledPropertyAmenitiesBox = styled.div(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers.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) {
|
|
17
17
|
var theme = _ref3.theme;
|
|
18
|
-
return "\n @media (min-width: ".concat(theme.breakpoints.values.
|
|
18
|
+
return "\n @media (min-width: ".concat(theme.breakpoints.values.sm, "px) {\n align-items: flex-end;\n }\n ");
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
exports.StyledPropertyAmenitiesBox = StyledPropertyAmenitiesBox;
|
|
@@ -98,6 +98,10 @@ function DoughnutChart(_ref) {
|
|
|
98
98
|
borderWidth: 0,
|
|
99
99
|
borderRadius: 5
|
|
100
100
|
};
|
|
101
|
+
},
|
|
102
|
+
label: function label(_ref2) {
|
|
103
|
+
var index = _ref2.index;
|
|
104
|
+
return " ".concat(chartLabels[index], ": ").concat(parseInt(String(chartValues[index]), 10));
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
}
|
|
@@ -115,7 +119,7 @@ function DoughnutChart(_ref) {
|
|
|
115
119
|
return /* @__PURE__ */React.createElement(ChartLegend.default, {
|
|
116
120
|
key: reactUid.uid(item),
|
|
117
121
|
color: color,
|
|
118
|
-
count: count,
|
|
122
|
+
count: parseInt(String(count), 10),
|
|
119
123
|
label: title
|
|
120
124
|
});
|
|
121
125
|
}))));
|
|
@@ -28,7 +28,9 @@ function AnalyticsSection(_ref) {
|
|
|
28
28
|
oneRoofBookingsCount = _ref.oneRoofBookingsCount,
|
|
29
29
|
realestateBookingsCount = _ref.realestateBookingsCount,
|
|
30
30
|
tradeMeBookingsCount = _ref.tradeMeBookingsCount,
|
|
31
|
-
manualBookingsCount = _ref.manualBookingsCount
|
|
31
|
+
manualBookingsCount = _ref.manualBookingsCount,
|
|
32
|
+
_ref$outlinedItems = _ref.outlinedItems,
|
|
33
|
+
outlinedItems = _ref$outlinedItems === void 0 ? false : _ref$outlinedItems;
|
|
32
34
|
var isXlUp = useMediaQuery(function (theme) {
|
|
33
35
|
return theme.breakpoints.up("xl");
|
|
34
36
|
});
|
|
@@ -62,17 +64,17 @@ function AnalyticsSection(_ref) {
|
|
|
62
64
|
flexWrap: "wrap",
|
|
63
65
|
alignItems: "stretch"
|
|
64
66
|
}, /* @__PURE__ */React.createElement(Paper, {
|
|
65
|
-
outlined:
|
|
67
|
+
outlined: outlinedItems,
|
|
66
68
|
inset: "medium",
|
|
67
69
|
overflow: false,
|
|
68
70
|
sx: {
|
|
69
71
|
width: "100%",
|
|
70
72
|
minWidth: {
|
|
71
|
-
|
|
73
|
+
lg: "456px"
|
|
72
74
|
},
|
|
73
75
|
flex: {
|
|
74
76
|
xs: "0 0 100%",
|
|
75
|
-
|
|
77
|
+
md: 1
|
|
76
78
|
},
|
|
77
79
|
alignItems: "center",
|
|
78
80
|
justifyContent: "center",
|
|
@@ -87,17 +89,17 @@ function AnalyticsSection(_ref) {
|
|
|
87
89
|
realEstateCount: realestateEnquiriesCount,
|
|
88
90
|
heading: "Number of enquiries"
|
|
89
91
|
})), /* @__PURE__ */React.createElement(Paper, {
|
|
90
|
-
outlined:
|
|
92
|
+
outlined: outlinedItems,
|
|
91
93
|
inset: "medium",
|
|
92
94
|
overflow: false,
|
|
93
95
|
sx: {
|
|
94
96
|
width: "100%",
|
|
95
97
|
minWidth: {
|
|
96
|
-
|
|
98
|
+
lg: "456px"
|
|
97
99
|
},
|
|
98
100
|
flex: {
|
|
99
101
|
xs: "0 0 100%",
|
|
100
|
-
|
|
102
|
+
md: 1
|
|
101
103
|
},
|
|
102
104
|
alignItems: "center",
|
|
103
105
|
justifyContent: "center",
|
|
@@ -128,7 +130,7 @@ function AnalyticsSection(_ref) {
|
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
}, /* @__PURE__ */React.createElement(AnalyticsBox, {
|
|
131
|
-
outlined:
|
|
133
|
+
outlined: outlinedItems,
|
|
132
134
|
label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
|
|
133
135
|
amount: agreementsCount,
|
|
134
136
|
width: "100%",
|
|
@@ -138,7 +140,7 @@ function AnalyticsSection(_ref) {
|
|
|
138
140
|
variant: "inherit"
|
|
139
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"))
|
|
140
142
|
}), /* @__PURE__ */React.createElement(AnalyticsBox, {
|
|
141
|
-
outlined:
|
|
143
|
+
outlined: outlinedItems,
|
|
142
144
|
label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
|
|
143
145
|
amount: agreementsFinalisedCount,
|
|
144
146
|
width: "100%",
|
|
@@ -164,7 +166,7 @@ function AnalyticsSection(_ref) {
|
|
|
164
166
|
sm: 3,
|
|
165
167
|
md: 2
|
|
166
168
|
}, /* @__PURE__ */React.createElement(AnalyticsBox, {
|
|
167
|
-
outlined:
|
|
169
|
+
outlined: outlinedItems,
|
|
168
170
|
label: stat.label,
|
|
169
171
|
amount: stat.value,
|
|
170
172
|
width: "100%",
|
|
@@ -51,6 +51,10 @@ function PropertyCard(_ref) {
|
|
|
51
51
|
xs: "10px",
|
|
52
52
|
sm: 0
|
|
53
53
|
},
|
|
54
|
+
width: {
|
|
55
|
+
xs: "100%",
|
|
56
|
+
sm: "auto"
|
|
57
|
+
},
|
|
54
58
|
"@media print": {
|
|
55
59
|
ml: "auto"
|
|
56
60
|
}
|
|
@@ -101,8 +105,6 @@ function PropertyCard(_ref) {
|
|
|
101
105
|
variant: "inherit"
|
|
102
106
|
}, noOfCarparks)))), !compact && /* @__PURE__ */React.createElement(Box, {
|
|
103
107
|
paddingLeft: "24px",
|
|
104
|
-
borderLeft: "1px solid",
|
|
105
|
-
borderLeftColor: "grey.300",
|
|
106
108
|
display: "flex",
|
|
107
109
|
direction: "column",
|
|
108
110
|
sx: {
|
|
@@ -111,9 +113,21 @@ function PropertyCard(_ref) {
|
|
|
111
113
|
lg: 2,
|
|
112
114
|
xl: 0
|
|
113
115
|
},
|
|
114
|
-
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
|
+
}
|
|
115
129
|
}
|
|
116
|
-
}, viewingsCount && /* @__PURE__ */React.createElement(Box, {
|
|
130
|
+
}, viewingsCount !== void 0 && /* @__PURE__ */React.createElement(Box, {
|
|
117
131
|
display: "flex",
|
|
118
132
|
align: "center",
|
|
119
133
|
gap: 2
|
|
@@ -127,7 +141,7 @@ function PropertyCard(_ref) {
|
|
|
127
141
|
variant: "body2"
|
|
128
142
|
}, "Viewings")), /* @__PURE__ */React.createElement(Heading, {
|
|
129
143
|
as: "h4"
|
|
130
|
-
}, viewingsCount)), enquiriesCount && /* @__PURE__ */React.createElement(Box, {
|
|
144
|
+
}, viewingsCount)), enquiriesCount !== void 0 && /* @__PURE__ */React.createElement(Box, {
|
|
131
145
|
display: "flex",
|
|
132
146
|
align: "center",
|
|
133
147
|
gap: 2
|
|
@@ -13,7 +13,7 @@ var StyledPropertyDetailsBox = styled.div(_templateObject3 || (_templateObject3
|
|
|
13
13
|
});
|
|
14
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.
|
|
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 };
|
|
@@ -94,6 +94,10 @@ function DoughnutChart(_ref) {
|
|
|
94
94
|
borderWidth: 0,
|
|
95
95
|
borderRadius: 5
|
|
96
96
|
};
|
|
97
|
+
},
|
|
98
|
+
label: function label(_ref2) {
|
|
99
|
+
var index = _ref2.index;
|
|
100
|
+
return " ".concat(chartLabels[index], ": ").concat(parseInt(String(chartValues[index]), 10));
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
}
|
|
@@ -111,7 +115,7 @@ function DoughnutChart(_ref) {
|
|
|
111
115
|
return /* @__PURE__ */React.createElement(ChartLegend, {
|
|
112
116
|
key: uid(item),
|
|
113
117
|
color: color,
|
|
114
|
-
count: count,
|
|
118
|
+
count: parseInt(String(count), 10),
|
|
115
119
|
label: title
|
|
116
120
|
});
|
|
117
121
|
}))));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenancy.nz/feature-ui",
|
|
3
3
|
"description": "React UI feature components.",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/cjs/index.cjs",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"primereact": "3.1.3",
|
|
21
21
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
22
22
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
23
|
-
"@tenancy.nz/ui": "1.5.
|
|
23
|
+
"@tenancy.nz/ui": "1.5.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@emotion/react": "^11.14.0",
|
|
27
27
|
"@emotion/styled": "^11.14.1",
|
|
28
28
|
"@mui/icons-material": "^7.2.0",
|
|
29
29
|
"@mui/material": "^7.3.1",
|
|
30
|
-
"@tenancy.nz/ui": "1.5.
|
|
30
|
+
"@tenancy.nz/ui": "1.5.2"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"react-uid": "^2.4.0"
|