@tenancy.nz/feature-ui 1.0.0 → 1.0.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.
Files changed (41) hide show
  1. package/dist/cjs/_virtual/_rollupPluginBabelHelpers.cjs +134 -0
  2. package/dist/cjs/components/AgentDetailsCard.cjs +93 -0
  3. package/dist/cjs/components/AnalyticsBox.cjs +58 -0
  4. package/dist/cjs/components/AnalyticsSection.cjs +161 -0
  5. package/dist/cjs/components/BookingChart.cjs +126 -0
  6. package/dist/cjs/components/BookingChart.styled.cjs +46 -0
  7. package/dist/cjs/components/BookingTable.cjs +53 -0
  8. package/dist/cjs/components/BookingTableRow.cjs +107 -0
  9. package/dist/cjs/components/BookingTableRow.styled.cjs +21 -0
  10. package/dist/cjs/components/BookingTableRowHeader.cjs +66 -0
  11. package/dist/cjs/components/BookingTableRowSkeleton.cjs +97 -0
  12. package/dist/cjs/components/CheckedIcon.cjs +23 -0
  13. package/dist/cjs/components/EnquiriesDoughnutChart.cjs +144 -0
  14. package/dist/cjs/components/GridList.cjs +80 -0
  15. package/dist/cjs/components/Hidden.cjs +18 -0
  16. package/dist/cjs/components/IconLabel.cjs +44 -0
  17. package/dist/cjs/components/NotesCard.cjs +67 -0
  18. package/dist/cjs/components/PropertyCard.cjs +145 -0
  19. package/dist/cjs/components/PropertyCard.styled.cjs +24 -0
  20. package/dist/cjs/index.cjs +36 -0
  21. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +120 -0
  22. package/dist/esm/components/AgentDetailsCard.js +89 -0
  23. package/dist/esm/components/AnalyticsBox.js +54 -0
  24. package/dist/esm/components/AnalyticsSection.js +157 -0
  25. package/dist/esm/components/BookingChart.js +122 -0
  26. package/dist/esm/components/BookingChart.styled.js +40 -0
  27. package/dist/esm/components/BookingTable.js +49 -0
  28. package/dist/esm/components/BookingTableRow.js +103 -0
  29. package/dist/esm/components/BookingTableRow.styled.js +19 -0
  30. package/dist/esm/components/BookingTableRowHeader.js +62 -0
  31. package/dist/esm/components/BookingTableRowSkeleton.js +93 -0
  32. package/dist/esm/components/CheckedIcon.js +19 -0
  33. package/dist/esm/components/EnquiriesDoughnutChart.js +140 -0
  34. package/dist/esm/components/GridList.js +76 -0
  35. package/dist/esm/components/Hidden.js +14 -0
  36. package/dist/esm/components/IconLabel.js +40 -0
  37. package/dist/esm/components/NotesCard.js +63 -0
  38. package/dist/esm/components/PropertyCard.js +141 -0
  39. package/dist/esm/components/PropertyCard.styled.js +20 -0
  40. package/dist/esm/index.js +16 -0
  41. package/package.json +5 -5
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
7
+ var React = require('react');
8
+ var ui = require('@tenancy.nz/ui');
9
+ var icons = require('@tenancy.nz/icons');
10
+ var IconLabel = require('./IconLabel.cjs');
11
+ var PropertyCard_styled = require('./PropertyCard.styled.cjs');
12
+
13
+ var _excluded = ["address", "compact", "enquiriesCount", "imgSrc", "noOfBedrooms", "noOfBathrooms", "noOfCarparks", "rent", "viewingsCount"];
14
+ function PropertyCard(_ref) {
15
+ var _ref$address = _ref.address,
16
+ address = _ref$address === void 0 ? void 0 : _ref$address,
17
+ _ref$compact = _ref.compact,
18
+ compact = _ref$compact === void 0 ? false : _ref$compact,
19
+ _ref$enquiriesCount = _ref.enquiriesCount,
20
+ enquiriesCount = _ref$enquiriesCount === void 0 ? void 0 : _ref$enquiriesCount,
21
+ imgSrc = _ref.imgSrc,
22
+ _ref$noOfBedrooms = _ref.noOfBedrooms,
23
+ noOfBedrooms = _ref$noOfBedrooms === void 0 ? void 0 : _ref$noOfBedrooms,
24
+ _ref$noOfBathrooms = _ref.noOfBathrooms,
25
+ noOfBathrooms = _ref$noOfBathrooms === void 0 ? void 0 : _ref$noOfBathrooms,
26
+ _ref$noOfCarparks = _ref.noOfCarparks,
27
+ noOfCarparks = _ref$noOfCarparks === void 0 ? void 0 : _ref$noOfCarparks,
28
+ _ref$rent = _ref.rent,
29
+ rent = _ref$rent === void 0 ? void 0 : _ref$rent,
30
+ _ref$viewingsCount = _ref.viewingsCount,
31
+ viewingsCount = _ref$viewingsCount === void 0 ? void 0 : _ref$viewingsCount,
32
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
33
+ return /* @__PURE__ */React.createElement(ui.Paper, _rollupPluginBabelHelpers.objectSpread2({
34
+ overflow: false,
35
+ sx: {
36
+ display: "flex",
37
+ alignItems: "center"
38
+ }
39
+ }, rest), /* @__PURE__ */React.createElement(PropertyCard_styled.StyledPropertyImage, null, /* @__PURE__ */React.createElement(ui.Media, {
40
+ as: "img",
41
+ title: address,
42
+ src: imgSrc
43
+ })), /* @__PURE__ */React.createElement(PropertyCard_styled.StyledPropertyDetailsBox, null, /* @__PURE__ */React.createElement(ui.Box, null, /* @__PURE__ */React.createElement(ui.Heading, {
44
+ as: "h4",
45
+ weight: "700"
46
+ }, address)), /* @__PURE__ */React.createElement(ui.Box, {
47
+ sx: {
48
+ display: "flex",
49
+ alignItems: "center",
50
+ ml: {
51
+ sm: "auto"
52
+ },
53
+ mt: {
54
+ xs: "10px",
55
+ sm: 0
56
+ },
57
+ "@media print": {
58
+ ml: "auto"
59
+ }
60
+ }
61
+ }, /* @__PURE__ */React.createElement(PropertyCard_styled.StyledPropertyAmenitiesBox, null, rent && /* @__PURE__ */React.createElement(ui.Heading, {
62
+ as: "h4",
63
+ weight: "700"
64
+ }, rent), /* @__PURE__ */React.createElement(ui.Box, {
65
+ fontSize: "16px"
66
+ }, noOfBedrooms && /* @__PURE__ */React.createElement(IconLabel.default, {
67
+ color: "text.primary",
68
+ startIcon: /* @__PURE__ */React.createElement(icons.Icon, {
69
+ size: 21,
70
+ color: "inherit",
71
+ name: "bed"
72
+ })
73
+ }, /* @__PURE__ */React.createElement(ui.Text, {
74
+ as: "span",
75
+ variant: "inherit"
76
+ }, noOfBedrooms)), noOfBathrooms && /* @__PURE__ */React.createElement(IconLabel.default, {
77
+ color: "text.primary",
78
+ startIcon: /* @__PURE__ */React.createElement(icons.Icon, {
79
+ size: 21,
80
+ color: "inherit",
81
+ name: "bath"
82
+ }),
83
+ marginLeft: 3
84
+ }, /* @__PURE__ */React.createElement(ui.Text, {
85
+ as: "span",
86
+ variant: "inherit"
87
+ }, noOfBathrooms)), noOfCarparks && /* @__PURE__ */React.createElement(IconLabel.default, {
88
+ color: "text.primary",
89
+ startIcon: /* @__PURE__ */React.createElement(icons.Icon, {
90
+ size: 21,
91
+ color: "inherit",
92
+ name: "car"
93
+ }),
94
+ marginLeft: 3
95
+ }, /* @__PURE__ */React.createElement(ui.Text, {
96
+ as: "span",
97
+ variant: "inherit"
98
+ }, noOfCarparks)))), !compact && /* @__PURE__ */React.createElement(ui.Box, {
99
+ paddingLeft: "25px",
100
+ borderLeft: "1px solid #00000040",
101
+ display: "flex",
102
+ direction: "column",
103
+ sx: {
104
+ gap: {
105
+ xs: "18px",
106
+ lg: "10px",
107
+ xl: 0
108
+ },
109
+ justifyContent: "space-between"
110
+ }
111
+ }, viewingsCount && /* @__PURE__ */React.createElement(ui.Box, {
112
+ display: "flex",
113
+ align: "center",
114
+ gap: "12px"
115
+ }, /* @__PURE__ */React.createElement(ui.Box, {
116
+ minWidth: "87px"
117
+ }, /* @__PURE__ */React.createElement(ui.Text, {
118
+ transform: "uppercase",
119
+ color: "textPrimary",
120
+ as: "span",
121
+ weight: "600",
122
+ align: "right",
123
+ lineHeight: "15px"
124
+ }, "Viewings")), /* @__PURE__ */React.createElement(ui.Heading, {
125
+ as: "h2"
126
+ }, viewingsCount)), enquiriesCount && /* @__PURE__ */React.createElement(ui.Box, {
127
+ display: "flex",
128
+ align: "center",
129
+ gap: "12px"
130
+ }, /* @__PURE__ */React.createElement(ui.Box, {
131
+ minWidth: "87px"
132
+ }, /* @__PURE__ */React.createElement(ui.Text, {
133
+ transform: "uppercase",
134
+ color: "textPrimary",
135
+ as: "span",
136
+ weight: "600",
137
+ minWidth: "87px",
138
+ align: "right",
139
+ lineHeight: "15px"
140
+ }, "Enquiries")), /* @__PURE__ */React.createElement(ui.Heading, {
141
+ as: "h2"
142
+ }, enquiriesCount))))));
143
+ }
144
+
145
+ exports.default = PropertyCard;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
5
+ var react = require('@emotion/react');
6
+ var styled = require('@emotion/styled');
7
+
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
9
+ var StyledPropertyImage = styled.figure(_templateObject || (_templateObject = _rollupPluginBabelHelpers.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) {
10
+ var theme = _ref.theme;
11
+ return react.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.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"));
12
+ });
13
+ var StyledPropertyDetailsBox = styled.div(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n align-items: flex-start;\n padding: 16px 24px 16px 20px;\n flex-direction: column;\n\n ", "\n\n @media print {\n flex-direction: row;\n align-items: center;\n }\n"])), function (_ref2) {
14
+ var theme = _ref2.theme;
15
+ return react.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", " {\n flex-direction: row;\n align-items: center;\n }\n "])), theme.breakpoints.up("sm"));
16
+ });
17
+ var StyledPropertyAmenitiesBox = styled.div(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers.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) {
18
+ var theme = _ref3.theme;
19
+ return "\n @media (min-width: ".concat(theme.breakpoints.values.md, "px) {\n align-items: flex-end;\n }\n ");
20
+ });
21
+
22
+ exports.StyledPropertyAmenitiesBox = StyledPropertyAmenitiesBox;
23
+ exports.StyledPropertyDetailsBox = StyledPropertyDetailsBox;
24
+ exports.StyledPropertyImage = StyledPropertyImage;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var AgentDetailsCard = require('./components/AgentDetailsCard.cjs');
5
+ var AnalyticsBox = require('./components/AnalyticsBox.cjs');
6
+ var AnalyticsSection = require('./components/AnalyticsSection.cjs');
7
+ var BookingChart = require('./components/BookingChart.cjs');
8
+ var BookingTable = require('./components/BookingTable.cjs');
9
+ var BookingTableRow = require('./components/BookingTableRow.cjs');
10
+ var BookingTableRowHeader = require('./components/BookingTableRowHeader.cjs');
11
+ var BookingTableRowSkeleton = require('./components/BookingTableRowSkeleton.cjs');
12
+ var CheckedIcon = require('./components/CheckedIcon.cjs');
13
+ var EnquiriesDoughnutChart = require('./components/EnquiriesDoughnutChart.cjs');
14
+ var GridList = require('./components/GridList.cjs');
15
+ var Hidden = require('./components/Hidden.cjs');
16
+ var IconLabel = require('./components/IconLabel.cjs');
17
+ var NotesCard = require('./components/NotesCard.cjs');
18
+ var PropertyCard = require('./components/PropertyCard.cjs');
19
+
20
+
21
+
22
+ exports.AgentDetailsCard = AgentDetailsCard.default;
23
+ exports.AnalyticsBox = AnalyticsBox.default;
24
+ exports.AnalyticsSection = AnalyticsSection.default;
25
+ exports.BookingChart = BookingChart.default;
26
+ exports.BookingTable = BookingTable.default;
27
+ exports.BookingTableRow = BookingTableRow.default;
28
+ exports.BookingTableRowHeader = BookingTableRowHeader.default;
29
+ exports.BookingTableRowSkeleton = BookingTableRowSkeleton.default;
30
+ exports.CheckedIcon = CheckedIcon.default;
31
+ exports.EnquiriesDoughnutChart = EnquiriesDoughnutChart.default;
32
+ exports.GridList = GridList.default;
33
+ exports.Hidden = Hidden.default;
34
+ exports.IconLabel = IconLabel.default;
35
+ exports.NotesCard = NotesCard.default;
36
+ exports.PropertyCard = PropertyCard.default;
@@ -0,0 +1,120 @@
1
+ function _arrayLikeToArray(r, a) {
2
+ (null == a || a > r.length) && (a = r.length);
3
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
4
+ return n;
5
+ }
6
+ function _arrayWithHoles(r) {
7
+ if (Array.isArray(r)) return r;
8
+ }
9
+ function _defineProperty(e, r, t) {
10
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
11
+ value: t,
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true
15
+ }) : e[r] = t, e;
16
+ }
17
+ function _iterableToArrayLimit(r, l) {
18
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
19
+ if (null != t) {
20
+ var e,
21
+ n,
22
+ i,
23
+ u,
24
+ a = [],
25
+ f = true,
26
+ o = false;
27
+ try {
28
+ if (i = (t = t.call(r)).next, 0 === l) {
29
+ if (Object(t) !== t) return;
30
+ f = !1;
31
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
32
+ } catch (r) {
33
+ o = true, n = r;
34
+ } finally {
35
+ try {
36
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
37
+ } finally {
38
+ if (o) throw n;
39
+ }
40
+ }
41
+ return a;
42
+ }
43
+ }
44
+ function _nonIterableRest() {
45
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
46
+ }
47
+ function ownKeys(e, r) {
48
+ var t = Object.keys(e);
49
+ if (Object.getOwnPropertySymbols) {
50
+ var o = Object.getOwnPropertySymbols(e);
51
+ r && (o = o.filter(function (r) {
52
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
53
+ })), t.push.apply(t, o);
54
+ }
55
+ return t;
56
+ }
57
+ function _objectSpread2(e) {
58
+ for (var r = 1; r < arguments.length; r++) {
59
+ var t = null != arguments[r] ? arguments[r] : {};
60
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
61
+ _defineProperty(e, r, t[r]);
62
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
63
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
64
+ });
65
+ }
66
+ return e;
67
+ }
68
+ function _objectWithoutProperties(e, t) {
69
+ if (null == e) return {};
70
+ var o,
71
+ r,
72
+ i = _objectWithoutPropertiesLoose(e, t);
73
+ if (Object.getOwnPropertySymbols) {
74
+ var n = Object.getOwnPropertySymbols(e);
75
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
76
+ }
77
+ return i;
78
+ }
79
+ function _objectWithoutPropertiesLoose(r, e) {
80
+ if (null == r) return {};
81
+ var t = {};
82
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
83
+ if (-1 !== e.indexOf(n)) continue;
84
+ t[n] = r[n];
85
+ }
86
+ return t;
87
+ }
88
+ function _slicedToArray(r, e) {
89
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
90
+ }
91
+ function _taggedTemplateLiteral(e, t) {
92
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
93
+ raw: {
94
+ value: Object.freeze(t)
95
+ }
96
+ }));
97
+ }
98
+ function _toPrimitive(t, r) {
99
+ if ("object" != typeof t || !t) return t;
100
+ var e = t[Symbol.toPrimitive];
101
+ if (void 0 !== e) {
102
+ var i = e.call(t, r);
103
+ if ("object" != typeof i) return i;
104
+ throw new TypeError("@@toPrimitive must return a primitive value.");
105
+ }
106
+ return ("string" === r ? String : Number)(t);
107
+ }
108
+ function _toPropertyKey(t) {
109
+ var i = _toPrimitive(t, "string");
110
+ return "symbol" == typeof i ? i : i + "";
111
+ }
112
+ function _unsupportedIterableToArray(r, a) {
113
+ if (r) {
114
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
115
+ var t = {}.toString.call(r).slice(8, -1);
116
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
117
+ }
118
+ }
119
+
120
+ export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _taggedTemplateLiteral as taggedTemplateLiteral, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ import React from 'react';
3
+ import { Box, Skeleton, Heading, Text } from '@tenancy.nz/ui';
4
+ import { UserIcon, PhoneIcon, EnvelopeIcon } from '@tenancy.nz/icons';
5
+ import IconLabel from './IconLabel.js';
6
+
7
+ function AgentDetailsCard(_ref) {
8
+ var _ref$email = _ref.email,
9
+ email = _ref$email === void 0 ? void 0 : _ref$email,
10
+ _ref$loading = _ref.loading,
11
+ loading = _ref$loading === void 0 ? false : _ref$loading,
12
+ _ref$logo = _ref.logo,
13
+ logo = _ref$logo === void 0 ? void 0 : _ref$logo,
14
+ _ref$name = _ref.name,
15
+ name = _ref$name === void 0 ? void 0 : _ref$name,
16
+ _ref$phone = _ref.phone,
17
+ phone = _ref$phone === void 0 ? void 0 : _ref$phone;
18
+ return /* @__PURE__ */React.createElement(Box, {
19
+ display: "flex",
20
+ gap: "8px",
21
+ align: "flex-start"
22
+ }, /* @__PURE__ */React.createElement(Box, {
23
+ display: "flex",
24
+ gap: "8px",
25
+ direction: "column",
26
+ width: "100%"
27
+ }, loading ? /* @__PURE__ */React.createElement(Skeleton, {
28
+ width: "75%",
29
+ height: "22px",
30
+ variant: "text"
31
+ }) : /* @__PURE__ */React.createElement(IconLabel, {
32
+ color: "tertiary.main",
33
+ startIcon: /* @__PURE__ */React.createElement(UserIcon, {
34
+ size: "24px"
35
+ })
36
+ }, /* @__PURE__ */React.createElement(Heading, {
37
+ as: "h5",
38
+ weight: "700"
39
+ }, name)), loading ? /* @__PURE__ */React.createElement(Skeleton, {
40
+ width: "55%",
41
+ height: "18px",
42
+ variant: "text"
43
+ }) : /* @__PURE__ */React.createElement(IconLabel, {
44
+ color: "tertiary.main",
45
+ startIcon: /* @__PURE__ */React.createElement(PhoneIcon, {
46
+ size: "24px"
47
+ })
48
+ }, /* @__PURE__ */React.createElement(Text, {
49
+ as: "span",
50
+ color: "text.primary",
51
+ variant: "body1",
52
+ weight: "400"
53
+ }, phone)), loading ? /* @__PURE__ */React.createElement(Skeleton, {
54
+ width: "55%",
55
+ height: "18px",
56
+ variant: "text"
57
+ }) : /* @__PURE__ */React.createElement(IconLabel, {
58
+ color: "tertiary.main",
59
+ startIcon: /* @__PURE__ */React.createElement(EnvelopeIcon, {
60
+ size: "24px"
61
+ })
62
+ }, /* @__PURE__ */React.createElement(Text, {
63
+ as: "span",
64
+ color: "text.primary",
65
+ variant: "body1",
66
+ weight: "400"
67
+ }, email))), loading && /* @__PURE__ */React.createElement(Box, {
68
+ flex: "0 0 40px"
69
+ }, /* @__PURE__ */React.createElement(Skeleton, {
70
+ width: "40px",
71
+ height: "40px",
72
+ variant: "rectangular"
73
+ })), logo && !loading && /* @__PURE__ */React.createElement(Box, {
74
+ width: "40px",
75
+ height: "40px",
76
+ sx: {
77
+ flex: "0 0 40px",
78
+ "> img": {
79
+ maxWidth: "100%",
80
+ maxHeight: "100%"
81
+ }
82
+ }
83
+ }, /* @__PURE__ */React.createElement("img", {
84
+ src: logo,
85
+ alt: "Agency Logo"
86
+ })));
87
+ }
88
+
89
+ export { AgentDetailsCard as default };
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
3
+ import React from 'react';
4
+ import { Paper, Box, Heading, Text } from '@tenancy.nz/ui';
5
+
6
+ var _excluded = ["width", "minWidth", "maxWidth", "height", "border", "label", "amount", "text"];
7
+ function AnalyticsBox(_ref) {
8
+ var width = _ref.width,
9
+ minWidth = _ref.minWidth,
10
+ maxWidth = _ref.maxWidth,
11
+ height = _ref.height,
12
+ border = _ref.border,
13
+ label = _ref.label,
14
+ amount = _ref.amount,
15
+ text = _ref.text,
16
+ rest = _objectWithoutProperties(_ref, _excluded);
17
+ return /* @__PURE__ */React.createElement(Paper, _objectSpread2(_objectSpread2({}, rest), {}, {
18
+ sx: {
19
+ maxWidth: maxWidth,
20
+ width: width,
21
+ minWidth: minWidth,
22
+ border: border,
23
+ height: height || "100%",
24
+ display: "flex",
25
+ alignItems: "center",
26
+ justifyContent: "center",
27
+ padding: "16px"
28
+ }
29
+ }), /* @__PURE__ */React.createElement(Box, null, /* @__PURE__ */React.createElement(Heading, {
30
+ align: "center",
31
+ weight: "700",
32
+ as: "h3",
33
+ gutterBottom: true
34
+ }, amount), /* @__PURE__ */React.createElement(Text, {
35
+ align: "center",
36
+ weight: "400",
37
+ variant: "body2"
38
+ }, label), text && /* @__PURE__ */React.createElement(Text, {
39
+ align: "center",
40
+ weight: "400",
41
+ sx: {
42
+ fontSize: {
43
+ xs: 8,
44
+ sm: 10,
45
+ xl: 14
46
+ },
47
+ lineHeight: "15.6px",
48
+ maxWidth: "366px",
49
+ mt: "8px"
50
+ }
51
+ }, text)));
52
+ }
53
+
54
+ export { AnalyticsBox as default };
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ import React from 'react';
3
+ import { useMediaQuery, Box, Paper, Text } from '@tenancy.nz/ui';
4
+ import AnalyticsBox from './AnalyticsBox.js';
5
+ import EnquiriesDoughnutChart from './EnquiriesDoughnutChart.js';
6
+
7
+ function AnalyticsSection(_ref) {
8
+ var viewingsCount = _ref.viewingsCount,
9
+ bookingsCount = _ref.bookingsCount,
10
+ attendeesCount = _ref.attendeesCount,
11
+ cancellationsCount = _ref.cancellationsCount,
12
+ applicationsCount = _ref.applicationsCount,
13
+ averageRent = _ref.averageRent,
14
+ textUsage = _ref.textUsage,
15
+ tradeMeEnquiriesCount = _ref.tradeMeEnquiriesCount,
16
+ bookMeEnquiriesCount = _ref.bookMeEnquiriesCount,
17
+ manualEnquiryCount = _ref.manualEnquiryCount,
18
+ agreementsCount = _ref.agreementsCount,
19
+ agreementsFinalisedCount = _ref.agreementsFinalisedCount,
20
+ filterDaysCount = _ref.filterDaysCount;
21
+ var isXlUp = useMediaQuery(function (theme) {
22
+ return theme.breakpoints.up("xl");
23
+ });
24
+ return /* @__PURE__ */React.createElement(Box, {
25
+ display: "flex",
26
+ align: "stretch",
27
+ direction: {
28
+ xs: "column-reverse",
29
+ mlg: "row"
30
+ },
31
+ gap: "27px"
32
+ }, /* @__PURE__ */React.createElement(Box, {
33
+ width: "100%",
34
+ maxWidth: {
35
+ xs: "100%",
36
+ mob: "340px",
37
+ xl: "463px"
38
+ }
39
+ }, /* @__PURE__ */React.createElement(Paper, {
40
+ style: {
41
+ width: "100%",
42
+ position: "relative",
43
+ height: "100%"
44
+ }
45
+ }, /* @__PURE__ */React.createElement(Box, {
46
+ mt: "20px",
47
+ height: "100%"
48
+ }, /* @__PURE__ */React.createElement(EnquiriesDoughnutChart, {
49
+ tradeMeEnquiriesCount: tradeMeEnquiriesCount,
50
+ bookMeEnquiriesCount: bookMeEnquiriesCount,
51
+ manualEnquiryCount: manualEnquiryCount
52
+ })))), /* @__PURE__ */React.createElement(Box, {
53
+ width: "100%"
54
+ }, /* @__PURE__ */React.createElement(Box, {
55
+ display: "flex",
56
+ direction: "row",
57
+ width: "100%",
58
+ gap: 6
59
+ }, /* @__PURE__ */React.createElement(Box, {
60
+ flex: 3
61
+ }, /* @__PURE__ */React.createElement(Box, {
62
+ display: "flex",
63
+ gap: 6
64
+ }, /* @__PURE__ */React.createElement(AnalyticsBox, {
65
+ label: "Viewings",
66
+ amount: viewingsCount,
67
+ width: "100%",
68
+ height: isXlUp ? "157px" : "125px"
69
+ }), /* @__PURE__ */React.createElement(AnalyticsBox, {
70
+ label: "Bookings",
71
+ amount: bookingsCount,
72
+ width: "100%",
73
+ height: isXlUp ? "157px" : "125px"
74
+ }), /* @__PURE__ */React.createElement(AnalyticsBox, {
75
+ label: "Attendees",
76
+ amount: attendeesCount,
77
+ width: "100%",
78
+ border: "3px solid #6FD3C0",
79
+ height: isXlUp ? "157px" : "125px"
80
+ })), /* @__PURE__ */React.createElement(Box, {
81
+ display: "flex",
82
+ width: "100%",
83
+ gap: 6,
84
+ mt: 6
85
+ }, /* @__PURE__ */React.createElement(AnalyticsBox, {
86
+ label: "Converted Properties",
87
+ amount: agreementsCount,
88
+ width: "100%",
89
+ height: isXlUp ? "157px" : "125px",
90
+ text: /* @__PURE__ */React.createElement(Box, {
91
+ as: "span",
92
+ maxWidth: "276px"
93
+ }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement(Text, {
94
+ as: "span",
95
+ display: "inline",
96
+ weight: "700",
97
+ fontSize: "inherit"
98
+ }, filterDaysCount), " ", "days where an agreement has been", " ", /* @__PURE__ */React.createElement(Text, {
99
+ as: "span",
100
+ display: "inline",
101
+ weight: "700",
102
+ fontSize: "inherit"
103
+ }, "created"))
104
+ }), /* @__PURE__ */React.createElement(AnalyticsBox, {
105
+ label: "Converted Properties",
106
+ amount: agreementsFinalisedCount,
107
+ width: "100%",
108
+ height: isXlUp ? "157px" : "125px",
109
+ text: /* @__PURE__ */React.createElement(Box, {
110
+ as: "span",
111
+ maxWidth: "276px"
112
+ }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement(Text, {
113
+ as: "span",
114
+ display: "inline",
115
+ weight: "700",
116
+ fontSize: "inherit"
117
+ }, filterDaysCount), " ", "days where an agreement has been", " ", /* @__PURE__ */React.createElement(Text, {
118
+ as: "span",
119
+ display: "inline",
120
+ weight: "700",
121
+ fontSize: "inherit"
122
+ }, "finalised"))
123
+ }))), /* @__PURE__ */React.createElement(Box, {
124
+ flex: 2
125
+ }, /* @__PURE__ */React.createElement(Box, {
126
+ display: "flex",
127
+ gap: 6
128
+ }, /* @__PURE__ */React.createElement(AnalyticsBox, {
129
+ label: "Cancellations",
130
+ amount: cancellationsCount,
131
+ width: "100%",
132
+ border: "3px solid #ED0D8D",
133
+ height: isXlUp ? "157px" : "125px"
134
+ }), /* @__PURE__ */React.createElement(AnalyticsBox, {
135
+ label: "Applications",
136
+ amount: applicationsCount,
137
+ width: "100%",
138
+ border: "3px solid #F5C440",
139
+ height: isXlUp ? "157px" : "125px"
140
+ })), /* @__PURE__ */React.createElement(Box, {
141
+ display: "flex",
142
+ gap: 6,
143
+ mt: 6
144
+ }, /* @__PURE__ */React.createElement(AnalyticsBox, {
145
+ label: /* @__PURE__ */React.createElement("span", null, "Average", /* @__PURE__ */React.createElement("br", null), " Rent"),
146
+ amount: averageRent,
147
+ width: "100%",
148
+ height: isXlUp ? "157px" : "125px"
149
+ }), /* @__PURE__ */React.createElement(AnalyticsBox, {
150
+ label: /* @__PURE__ */React.createElement("span", null, "Text Usage", /* @__PURE__ */React.createElement("br", null), " Total"),
151
+ amount: textUsage,
152
+ width: "100%",
153
+ height: isXlUp ? "157px" : "125px"
154
+ }))))));
155
+ }
156
+
157
+ export { AnalyticsSection as default };