@tenancy.nz/feature-ui 1.10.6 → 1.10.8
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/_virtual/_rollupPluginBabelHelpers.cjs +15 -4
- package/dist/cjs/components/BackButton.cjs +18 -0
- package/dist/cjs/components/ConfirmButton.cjs +91 -0
- package/dist/cjs/components/ContactCard.cjs +71 -0
- package/dist/cjs/components/ContactCardHeader.cjs +17 -22
- package/dist/cjs/components/ContactMethod.cjs +111 -0
- package/dist/cjs/components/DeleteIconButton.cjs +17 -0
- package/dist/cjs/components/DownloadIconButton.cjs +17 -0
- package/dist/cjs/components/EditIconButton.cjs +17 -0
- package/dist/cjs/components/LogoutButton.cjs +17 -0
- package/dist/cjs/components/OpenInNewIconButton.cjs +17 -0
- package/dist/cjs/components/ScrollTopButton.cjs +2 -1
- package/dist/cjs/index.cjs +20 -10
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +14 -5
- package/dist/esm/components/BackButton.js +14 -0
- package/dist/esm/components/ConfirmButton.js +87 -0
- package/dist/esm/components/ContactCard.js +68 -0
- package/dist/esm/components/ContactCardHeader.js +18 -23
- package/dist/esm/components/ContactMethod.js +107 -0
- package/dist/esm/components/DeleteIconButton.js +13 -0
- package/dist/esm/components/DownloadIconButton.js +13 -0
- package/dist/esm/components/EditIconButton.js +13 -0
- package/dist/esm/components/LogoutButton.js +13 -0
- package/dist/esm/components/OpenInNewIconButton.js +13 -0
- package/dist/esm/components/ScrollTopButton.js +2 -1
- package/dist/esm/index.js +10 -5
- package/package.json +5 -7
- package/dist/cjs/components/AnalyticsSection.cjs +0 -186
- package/dist/cjs/components/BookingChart.cjs +0 -128
- package/dist/cjs/components/BookingChart.styled.cjs +0 -48
- package/dist/cjs/components/ChartLegend.cjs +0 -63
- package/dist/cjs/components/analytics-doughnut-chart.cjs +0 -116
- package/dist/cjs/components/doughnut-chart.cjs +0 -130
- package/dist/cjs/components/pdf-analytics-section.cjs +0 -173
- package/dist/cjs/utils/helpers/general.cjs +0 -10
- package/dist/esm/components/AnalyticsSection.js +0 -182
- package/dist/esm/components/BookingChart.js +0 -124
- package/dist/esm/components/BookingChart.styled.js +0 -42
- package/dist/esm/components/ChartLegend.js +0 -59
- package/dist/esm/components/analytics-doughnut-chart.js +0 -112
- package/dist/esm/components/doughnut-chart.js +0 -126
- package/dist/esm/components/pdf-analytics-section.js +0 -169
- package/dist/esm/utils/helpers/general.js +0 -8
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { uid } from 'react-uid';
|
|
3
|
-
import Stack from '@mui/material/Stack';
|
|
4
|
-
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
5
|
-
import { Grid, Paper, Text } from '@tenancy.nz/ui';
|
|
6
|
-
import AnalyticsBox from './AnalyticsBox.js';
|
|
7
|
-
import AnalyticsDoughnutChart from './analytics-doughnut-chart.js';
|
|
8
|
-
|
|
9
|
-
var styles = {
|
|
10
|
-
chartPaper: {
|
|
11
|
-
height: "100%",
|
|
12
|
-
width: "100%",
|
|
13
|
-
alignItems: "center",
|
|
14
|
-
justifyContent: "center",
|
|
15
|
-
display: "flex"
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
function PDFAnalyticsSection(_ref) {
|
|
19
|
-
var viewingsCount = _ref.viewingsCount,
|
|
20
|
-
bookingsCount = _ref.bookingsCount,
|
|
21
|
-
attendeesCount = _ref.attendeesCount,
|
|
22
|
-
cancellationsCount = _ref.cancellationsCount,
|
|
23
|
-
applicationsCount = _ref.applicationsCount,
|
|
24
|
-
averageRent = _ref.averageRent,
|
|
25
|
-
textUsage = _ref.textUsage,
|
|
26
|
-
agreementsCount = _ref.agreementsCount,
|
|
27
|
-
agreementsFinalisedCount = _ref.agreementsFinalisedCount,
|
|
28
|
-
filterDaysCount = _ref.filterDaysCount,
|
|
29
|
-
allHouseEnquiriesCount = _ref.allHouseEnquiriesCount,
|
|
30
|
-
bookMeEnquiriesCount = _ref.bookMeEnquiriesCount,
|
|
31
|
-
oneRoofEnquiriesCount = _ref.oneRoofEnquiriesCount,
|
|
32
|
-
realestateEnquiriesCount = _ref.realestateEnquiriesCount,
|
|
33
|
-
tradeMeEnquiriesCount = _ref.tradeMeEnquiriesCount,
|
|
34
|
-
manualEnquiryCount = _ref.manualEnquiryCount,
|
|
35
|
-
websiteEnquiryCount = _ref.websiteEnquiryCount,
|
|
36
|
-
allHouseBookingsCount = _ref.allHouseBookingsCount,
|
|
37
|
-
bookMeBookingsCount = _ref.bookMeBookingsCount,
|
|
38
|
-
oneRoofBookingsCount = _ref.oneRoofBookingsCount,
|
|
39
|
-
realestateBookingsCount = _ref.realestateBookingsCount,
|
|
40
|
-
tradeMeBookingsCount = _ref.tradeMeBookingsCount,
|
|
41
|
-
manualBookingsCount = _ref.manualBookingsCount,
|
|
42
|
-
websiteBookingsCount = _ref.websiteBookingsCount;
|
|
43
|
-
var isXlUp = useMediaQuery(function (theme) {
|
|
44
|
-
return theme.breakpoints.up("xl");
|
|
45
|
-
});
|
|
46
|
-
var stats = [{
|
|
47
|
-
label: "Viewings",
|
|
48
|
-
value: viewingsCount
|
|
49
|
-
}, {
|
|
50
|
-
label: "Bookings",
|
|
51
|
-
value: bookingsCount
|
|
52
|
-
}, {
|
|
53
|
-
label: "Attendees",
|
|
54
|
-
value: attendeesCount
|
|
55
|
-
}, {
|
|
56
|
-
label: "Cancellations",
|
|
57
|
-
value: cancellationsCount
|
|
58
|
-
}, {
|
|
59
|
-
label: "Applications",
|
|
60
|
-
value: applicationsCount
|
|
61
|
-
}, {
|
|
62
|
-
label: "Average Rent",
|
|
63
|
-
value: "$".concat(averageRent)
|
|
64
|
-
}, {
|
|
65
|
-
label: "Text Usage Total",
|
|
66
|
-
value: textUsage
|
|
67
|
-
}];
|
|
68
|
-
return /* @__PURE__ */React.createElement(Stack, {
|
|
69
|
-
gap: 6
|
|
70
|
-
}, /* @__PURE__ */React.createElement(Grid, {
|
|
71
|
-
container: true,
|
|
72
|
-
spacing: 6
|
|
73
|
-
}, /* @__PURE__ */React.createElement(Grid, {
|
|
74
|
-
container: true,
|
|
75
|
-
item: true,
|
|
76
|
-
spacing: 6,
|
|
77
|
-
xs: 12
|
|
78
|
-
}, /* @__PURE__ */React.createElement(Grid, {
|
|
79
|
-
item: true,
|
|
80
|
-
xs: 6
|
|
81
|
-
}, /* @__PURE__ */React.createElement(Paper, {
|
|
82
|
-
outlined: true,
|
|
83
|
-
inset: "medium",
|
|
84
|
-
overflow: false,
|
|
85
|
-
sx: styles.chartPaper
|
|
86
|
-
}, /* @__PURE__ */React.createElement(AnalyticsDoughnutChart, {
|
|
87
|
-
tradeMeCount: tradeMeEnquiriesCount,
|
|
88
|
-
bookMeCount: bookMeEnquiriesCount,
|
|
89
|
-
manualCount: manualEnquiryCount,
|
|
90
|
-
allhouseCount: allHouseEnquiriesCount,
|
|
91
|
-
oneRoofCount: oneRoofEnquiriesCount,
|
|
92
|
-
realEstateCount: realestateEnquiriesCount,
|
|
93
|
-
websiteCount: websiteEnquiryCount,
|
|
94
|
-
heading: "Number of enquiries"
|
|
95
|
-
}))), /* @__PURE__ */React.createElement(Grid, {
|
|
96
|
-
item: true,
|
|
97
|
-
xs: 6
|
|
98
|
-
}, /* @__PURE__ */React.createElement(Paper, {
|
|
99
|
-
outlined: true,
|
|
100
|
-
inset: "medium",
|
|
101
|
-
overflow: false,
|
|
102
|
-
sx: styles.chartPaper
|
|
103
|
-
}, /* @__PURE__ */React.createElement(AnalyticsDoughnutChart, {
|
|
104
|
-
tradeMeCount: tradeMeBookingsCount,
|
|
105
|
-
bookMeCount: bookMeBookingsCount,
|
|
106
|
-
manualCount: manualBookingsCount,
|
|
107
|
-
allhouseCount: allHouseBookingsCount,
|
|
108
|
-
oneRoofCount: oneRoofBookingsCount,
|
|
109
|
-
realEstateCount: realestateBookingsCount,
|
|
110
|
-
websiteCount: websiteBookingsCount,
|
|
111
|
-
heading: "Number of bookings"
|
|
112
|
-
})))), /* @__PURE__ */React.createElement(Grid, {
|
|
113
|
-
item: true,
|
|
114
|
-
container: true,
|
|
115
|
-
xs: 12,
|
|
116
|
-
spacing: 6
|
|
117
|
-
}, /* @__PURE__ */React.createElement(Grid, {
|
|
118
|
-
item: true,
|
|
119
|
-
xs: 6
|
|
120
|
-
}, /* @__PURE__ */React.createElement(AnalyticsBox, {
|
|
121
|
-
outlined: true,
|
|
122
|
-
label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
|
|
123
|
-
amount: agreementsCount,
|
|
124
|
-
width: "100%",
|
|
125
|
-
height: isXlUp ? "157px" : "auto",
|
|
126
|
-
text: /* @__PURE__ */React.createElement(Text, {
|
|
127
|
-
as: "span",
|
|
128
|
-
variant: "inherit"
|
|
129
|
-
}, "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"))
|
|
130
|
-
})), /* @__PURE__ */React.createElement(Grid, {
|
|
131
|
-
item: true,
|
|
132
|
-
xs: 6,
|
|
133
|
-
sx: {
|
|
134
|
-
display: "flex",
|
|
135
|
-
alignItems: "flex-end"
|
|
136
|
-
}
|
|
137
|
-
}, /* @__PURE__ */React.createElement(AnalyticsBox, {
|
|
138
|
-
outlined: true,
|
|
139
|
-
label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
|
|
140
|
-
amount: agreementsFinalisedCount,
|
|
141
|
-
width: "100%",
|
|
142
|
-
height: isXlUp ? "157px" : "auto",
|
|
143
|
-
text: /* @__PURE__ */React.createElement(Text, {
|
|
144
|
-
as: "span",
|
|
145
|
-
variant: "inherit"
|
|
146
|
-
}, "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"))
|
|
147
|
-
})))), /* @__PURE__ */React.createElement(Grid, {
|
|
148
|
-
container: true,
|
|
149
|
-
spacing: {
|
|
150
|
-
xs: 3,
|
|
151
|
-
md: 6
|
|
152
|
-
}
|
|
153
|
-
}, stats.map(function (stat, i) {
|
|
154
|
-
return /* @__PURE__ */React.createElement(Grid, {
|
|
155
|
-
item: true,
|
|
156
|
-
key: uid(stat, i),
|
|
157
|
-
xs: 3,
|
|
158
|
-
md: 2
|
|
159
|
-
}, /* @__PURE__ */React.createElement(AnalyticsBox, {
|
|
160
|
-
outlined: true,
|
|
161
|
-
label: stat.label,
|
|
162
|
-
amount: stat.value,
|
|
163
|
-
width: "100%",
|
|
164
|
-
height: isXlUp ? "157px" : "124px"
|
|
165
|
-
}));
|
|
166
|
-
})));
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export { PDFAnalyticsSection as default };
|