@tenancy.nz/feature-ui 1.11.0 → 1.11.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.
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.cjs +0 -14
- package/dist/cjs/index.cjs +0 -14
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +1 -13
- package/dist/esm/index.js +0 -7
- package/package.json +5 -5
- package/dist/cjs/components/BackButton.cjs +0 -21
- package/dist/cjs/components/ConfirmButton.cjs +0 -91
- package/dist/cjs/components/DeleteIconButton.cjs +0 -17
- package/dist/cjs/components/DownloadIconButton.cjs +0 -17
- package/dist/cjs/components/EditIconButton.cjs +0 -17
- package/dist/cjs/components/LogoutButton.cjs +0 -17
- package/dist/cjs/components/OpenInNewIconButton.cjs +0 -17
- package/dist/esm/components/BackButton.js +0 -17
- package/dist/esm/components/ConfirmButton.js +0 -87
- package/dist/esm/components/DeleteIconButton.js +0 -13
- package/dist/esm/components/DownloadIconButton.js +0 -13
- package/dist/esm/components/EditIconButton.js +0 -13
- package/dist/esm/components/LogoutButton.js +0 -13
- package/dist/esm/components/OpenInNewIconButton.js +0 -13
|
@@ -19,15 +19,6 @@ function _defineProperty(e, r, t) {
|
|
|
19
19
|
writable: true
|
|
20
20
|
}) : e[r] = t, e;
|
|
21
21
|
}
|
|
22
|
-
function _extends() {
|
|
23
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
24
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
25
|
-
var t = arguments[e];
|
|
26
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
27
|
-
}
|
|
28
|
-
return n;
|
|
29
|
-
}, _extends.apply(null, arguments);
|
|
30
|
-
}
|
|
31
22
|
function _iterableToArray(r) {
|
|
32
23
|
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
33
24
|
}
|
|
@@ -61,9 +52,6 @@ function _nonIterableRest() {
|
|
|
61
52
|
function _nonIterableSpread() {
|
|
62
53
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
63
54
|
}
|
|
64
|
-
function _objectDestructuringEmpty(t) {
|
|
65
|
-
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
66
|
-
}
|
|
67
55
|
function ownKeys(e, r) {
|
|
68
56
|
var t = Object.keys(e);
|
|
69
57
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -144,12 +132,10 @@ exports.arrayLikeToArray = _arrayLikeToArray;
|
|
|
144
132
|
exports.arrayWithHoles = _arrayWithHoles;
|
|
145
133
|
exports.arrayWithoutHoles = _arrayWithoutHoles;
|
|
146
134
|
exports.defineProperty = _defineProperty;
|
|
147
|
-
exports.extends = _extends;
|
|
148
135
|
exports.iterableToArray = _iterableToArray;
|
|
149
136
|
exports.iterableToArrayLimit = _iterableToArrayLimit;
|
|
150
137
|
exports.nonIterableRest = _nonIterableRest;
|
|
151
138
|
exports.nonIterableSpread = _nonIterableSpread;
|
|
152
|
-
exports.objectDestructuringEmpty = _objectDestructuringEmpty;
|
|
153
139
|
exports.objectSpread2 = _objectSpread2;
|
|
154
140
|
exports.objectWithoutProperties = _objectWithoutProperties;
|
|
155
141
|
exports.objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,28 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var AgentDetailsCard = require('./components/AgentDetailsCard.cjs');
|
|
4
4
|
var AnalyticsBox = require('./components/AnalyticsBox.cjs');
|
|
5
|
-
var BackButton = require('./components/BackButton.cjs');
|
|
6
5
|
var BookingTable = require('./components/BookingTable.cjs');
|
|
7
6
|
var BookingTableRow = require('./components/BookingTableRow.cjs');
|
|
8
7
|
var BookingTableRowHeader = require('./components/BookingTableRowHeader.cjs');
|
|
9
8
|
var BookingTableRowSkeleton = require('./components/BookingTableRowSkeleton.cjs');
|
|
10
|
-
var ConfirmButton = require('./components/ConfirmButton.cjs');
|
|
11
9
|
var ContactCard = require('./components/ContactCard.cjs');
|
|
12
10
|
var ContactCardHeader = require('./components/ContactCardHeader.cjs');
|
|
13
11
|
var ContactMethod = require('./components/ContactMethod.cjs');
|
|
14
12
|
var CreditRatingTag = require('./components/CreditRatingTag.cjs');
|
|
15
|
-
var DeleteIconButton = require('./components/DeleteIconButton.cjs');
|
|
16
|
-
var DownloadIconButton = require('./components/DownloadIconButton.cjs');
|
|
17
|
-
var EditIconButton = require('./components/EditIconButton.cjs');
|
|
18
13
|
var IntegrationTag = require('./components/IntegrationTag.cjs');
|
|
19
14
|
var CheckedIcon = require('./components/CheckedIcon.cjs');
|
|
20
15
|
var partnerLogo = require('./components/partner-logo.cjs');
|
|
21
16
|
var GridList = require('./components/GridList.cjs');
|
|
22
17
|
var Hidden = require('./components/Hidden.cjs');
|
|
23
18
|
var IconLabel = require('./components/IconLabel.cjs');
|
|
24
|
-
var LogoutButton = require('./components/LogoutButton.cjs');
|
|
25
19
|
var NotesCard = require('./components/NotesCard.cjs');
|
|
26
|
-
var OpenInNewIconButton = require('./components/OpenInNewIconButton.cjs');
|
|
27
20
|
var PersonCard = require('./components/PersonCard.cjs');
|
|
28
21
|
var PersonDetailHeader = require('./components/PersonDetailHeader.cjs');
|
|
29
22
|
var PropertyCard = require('./components/PropertyCard.cjs');
|
|
@@ -37,28 +30,21 @@ var SoftwareProviderIcon = require('./components/SoftwareProviderIcon.cjs');
|
|
|
37
30
|
|
|
38
31
|
exports.AgentDetailsCard = AgentDetailsCard.default;
|
|
39
32
|
exports.AnalyticsBox = AnalyticsBox.default;
|
|
40
|
-
exports.BackButton = BackButton.default;
|
|
41
33
|
exports.BookingTable = BookingTable.default;
|
|
42
34
|
exports.BookingTableRow = BookingTableRow.default;
|
|
43
35
|
exports.BookingTableRowHeader = BookingTableRowHeader.default;
|
|
44
36
|
exports.BookingTableRowSkeleton = BookingTableRowSkeleton.default;
|
|
45
|
-
exports.ConfirmButton = ConfirmButton.default;
|
|
46
37
|
exports.ContactCard = ContactCard.default;
|
|
47
38
|
exports.ContactCardHeader = ContactCardHeader.default;
|
|
48
39
|
exports.ContactMethod = ContactMethod.default;
|
|
49
40
|
exports.CreditRatingTag = CreditRatingTag.default;
|
|
50
|
-
exports.DeleteIconButton = DeleteIconButton.default;
|
|
51
|
-
exports.DownloadIconButton = DownloadIconButton.default;
|
|
52
|
-
exports.EditIconButton = EditIconButton.default;
|
|
53
41
|
exports.IntegrationTag = IntegrationTag.default;
|
|
54
42
|
exports.CheckedIcon = CheckedIcon.default;
|
|
55
43
|
exports.PartnerLogo = partnerLogo.default;
|
|
56
44
|
exports.GridList = GridList.default;
|
|
57
45
|
exports.Hidden = Hidden.default;
|
|
58
46
|
exports.IconLabel = IconLabel.default;
|
|
59
|
-
exports.LogoutButton = LogoutButton.default;
|
|
60
47
|
exports.NotesCard = NotesCard.default;
|
|
61
|
-
exports.OpenInNewIconButton = OpenInNewIconButton.default;
|
|
62
48
|
exports.PersonCard = PersonCard.default;
|
|
63
49
|
exports.PersonDetailHeader = PersonDetailHeader.default;
|
|
64
50
|
exports.PropertyCard = PropertyCard.default;
|
|
@@ -17,15 +17,6 @@ function _defineProperty(e, r, t) {
|
|
|
17
17
|
writable: true
|
|
18
18
|
}) : e[r] = t, e;
|
|
19
19
|
}
|
|
20
|
-
function _extends() {
|
|
21
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
22
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
23
|
-
var t = arguments[e];
|
|
24
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
25
|
-
}
|
|
26
|
-
return n;
|
|
27
|
-
}, _extends.apply(null, arguments);
|
|
28
|
-
}
|
|
29
20
|
function _iterableToArray(r) {
|
|
30
21
|
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
31
22
|
}
|
|
@@ -59,9 +50,6 @@ function _nonIterableRest() {
|
|
|
59
50
|
function _nonIterableSpread() {
|
|
60
51
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
61
52
|
}
|
|
62
|
-
function _objectDestructuringEmpty(t) {
|
|
63
|
-
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
64
|
-
}
|
|
65
53
|
function ownKeys(e, r) {
|
|
66
54
|
var t = Object.keys(e);
|
|
67
55
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -138,4 +126,4 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
138
126
|
}
|
|
139
127
|
}
|
|
140
128
|
|
|
141
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _defineProperty as defineProperty,
|
|
129
|
+
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _taggedTemplateLiteral as taggedTemplateLiteral, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
export { default as AgentDetailsCard } from './components/AgentDetailsCard.js';
|
|
2
2
|
export { default as AnalyticsBox } from './components/AnalyticsBox.js';
|
|
3
|
-
export { default as BackButton } from './components/BackButton.js';
|
|
4
3
|
export { default as BookingTable } from './components/BookingTable.js';
|
|
5
4
|
export { default as BookingTableRow } from './components/BookingTableRow.js';
|
|
6
5
|
export { default as BookingTableRowHeader } from './components/BookingTableRowHeader.js';
|
|
7
6
|
export { default as BookingTableRowSkeleton } from './components/BookingTableRowSkeleton.js';
|
|
8
|
-
export { default as ConfirmButton } from './components/ConfirmButton.js';
|
|
9
7
|
export { default as ContactCard } from './components/ContactCard.js';
|
|
10
8
|
export { default as ContactCardHeader } from './components/ContactCardHeader.js';
|
|
11
9
|
export { default as ContactMethod } from './components/ContactMethod.js';
|
|
12
10
|
export { default as CreditRatingTag } from './components/CreditRatingTag.js';
|
|
13
|
-
export { default as DeleteIconButton } from './components/DeleteIconButton.js';
|
|
14
|
-
export { default as DownloadIconButton } from './components/DownloadIconButton.js';
|
|
15
|
-
export { default as EditIconButton } from './components/EditIconButton.js';
|
|
16
11
|
export { default as IntegrationTag } from './components/IntegrationTag.js';
|
|
17
12
|
export { default as CheckedIcon } from './components/CheckedIcon.js';
|
|
18
13
|
export { default as PartnerLogo } from './components/partner-logo.js';
|
|
19
14
|
export { default as GridList } from './components/GridList.js';
|
|
20
15
|
export { default as Hidden } from './components/Hidden.js';
|
|
21
16
|
export { default as IconLabel } from './components/IconLabel.js';
|
|
22
|
-
export { default as LogoutButton } from './components/LogoutButton.js';
|
|
23
17
|
export { default as NotesCard } from './components/NotesCard.js';
|
|
24
|
-
export { default as OpenInNewIconButton } from './components/OpenInNewIconButton.js';
|
|
25
18
|
export { default as PersonCard } from './components/PersonCard.js';
|
|
26
19
|
export { default as PersonDetailHeader } from './components/PersonDetailHeader.js';
|
|
27
20
|
export { default as PropertyCard } from './components/PropertyCard.js';
|
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.11.
|
|
4
|
+
"version": "1.11.1",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/cjs/index.cjs",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"classnames": "^2.2.6",
|
|
18
18
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
19
19
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
20
|
-
"@tenancy.nz/icons": "1.11.
|
|
21
|
-
"@tenancy.nz/ui": "1.11.
|
|
20
|
+
"@tenancy.nz/icons": "1.11.1",
|
|
21
|
+
"@tenancy.nz/ui": "1.11.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@emotion/react": "^11.14.0",
|
|
25
25
|
"@emotion/styled": "^11.14.1",
|
|
26
26
|
"@mui/material": "^7.3.1",
|
|
27
|
-
"@tenancy.nz/icons": "1.11.
|
|
28
|
-
"@tenancy.nz/ui": "1.11.
|
|
27
|
+
"@tenancy.nz/icons": "1.11.1",
|
|
28
|
+
"@tenancy.nz/ui": "1.11.1"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-uid": "^2.4.0"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var ArrowLeftOutlinedIcon = require('@tenancy.nz/icons/ArrowLeftOutlined');
|
|
8
|
-
var ui = require('@tenancy.nz/ui');
|
|
9
|
-
|
|
10
|
-
var _excluded = ["onClick"];
|
|
11
|
-
function BackButton(_ref) {
|
|
12
|
-
var onClick = _ref.onClick,
|
|
13
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
return /* @__PURE__ */React.createElement(ui.Button, _rollupPluginBabelHelpers.objectSpread2({
|
|
15
|
-
startIcon: /* @__PURE__ */React.createElement(ArrowLeftOutlinedIcon, null),
|
|
16
|
-
variant: "outlined",
|
|
17
|
-
onClick: onClick
|
|
18
|
-
}, rest), "Back");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.default = BackButton;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var ui = require('@tenancy.nz/ui');
|
|
8
|
-
|
|
9
|
-
var _excluded = ["Component", "children", "color", "confirmMessage", "label", "onClick", "title", "confirmProps"];
|
|
10
|
-
var errorConfirmProps = {
|
|
11
|
-
severity: "error",
|
|
12
|
-
cancelBtnText: "Don't delete",
|
|
13
|
-
confirmBtnText: "Delete"
|
|
14
|
-
};
|
|
15
|
-
function ConfirmButton(_ref) {
|
|
16
|
-
var _ref$Component = _ref.Component,
|
|
17
|
-
Component = _ref$Component === void 0 ? null : _ref$Component,
|
|
18
|
-
children = _ref.children,
|
|
19
|
-
_ref$color = _ref.color,
|
|
20
|
-
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
21
|
-
_ref$confirmMessage = _ref.confirmMessage,
|
|
22
|
-
confirmMessage = _ref$confirmMessage === void 0 ? void 0 : _ref$confirmMessage,
|
|
23
|
-
_ref$label = _ref.label,
|
|
24
|
-
label = _ref$label === void 0 ? "" : _ref$label,
|
|
25
|
-
onClick = _ref.onClick,
|
|
26
|
-
_ref$title = _ref.title,
|
|
27
|
-
title = _ref$title === void 0 ? "" : _ref$title,
|
|
28
|
-
_ref$confirmProps = _ref.confirmProps,
|
|
29
|
-
confirmProps = _ref$confirmProps === void 0 ? {} : _ref$confirmProps,
|
|
30
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
31
|
-
var _useState = React.useState(false),
|
|
32
|
-
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
33
|
-
showConfirm = _useState2[0],
|
|
34
|
-
setShowConfirm = _useState2[1];
|
|
35
|
-
var _useState3 = React.useState(void 0),
|
|
36
|
-
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
|
37
|
-
value = _useState4[0],
|
|
38
|
-
setValue = _useState4[1];
|
|
39
|
-
var handleCancel = function handleCancel(e) {
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
setShowConfirm(false);
|
|
42
|
-
setValue(void 0);
|
|
43
|
-
};
|
|
44
|
-
var handleClick = function handleClick(e) {
|
|
45
|
-
e.stopPropagation();
|
|
46
|
-
if (!confirmMessage) {
|
|
47
|
-
onClick(e);
|
|
48
|
-
} else {
|
|
49
|
-
setShowConfirm(true);
|
|
50
|
-
setValue(e);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var handleConfirm = function handleConfirm() {
|
|
54
|
-
if (value) {
|
|
55
|
-
onClick(value);
|
|
56
|
-
}
|
|
57
|
-
setShowConfirm(false);
|
|
58
|
-
setValue(void 0);
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */React.createElement(React.Fragment, null, Component ? /* @__PURE__ */React.createElement(Component, _rollupPluginBabelHelpers.objectSpread2({
|
|
61
|
-
color: color,
|
|
62
|
-
onClick: handleClick
|
|
63
|
-
}, rest), children) : /* @__PURE__ */React.createElement(ui.Tooltip, {
|
|
64
|
-
title: title,
|
|
65
|
-
placement: "top"
|
|
66
|
-
}, /* @__PURE__ */React.createElement(ui.Box, {
|
|
67
|
-
display: "inline-flex",
|
|
68
|
-
color: color.indexOf(".") === -1 ? "".concat(color, ".main") : color,
|
|
69
|
-
align: "center",
|
|
70
|
-
direction: "column"
|
|
71
|
-
}, /* @__PURE__ */React.createElement(ui.IconButton, _rollupPluginBabelHelpers.objectSpread2({
|
|
72
|
-
color: color === "error" ? "error" : "inherit",
|
|
73
|
-
onClick: handleClick
|
|
74
|
-
}, rest), children), !!label && /* @__PURE__ */React.createElement(ui.Box, {
|
|
75
|
-
color: "#617391",
|
|
76
|
-
display: "inline-flex",
|
|
77
|
-
fontSize: "11px",
|
|
78
|
-
onClick: handleClick,
|
|
79
|
-
sx: {
|
|
80
|
-
cursor: "pointer"
|
|
81
|
-
}
|
|
82
|
-
}, label))), !!confirmMessage && /* @__PURE__ */React.createElement(ui.Confirmation, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
83
|
-
open: showConfirm,
|
|
84
|
-
message: confirmMessage,
|
|
85
|
-
title: "Please confirm",
|
|
86
|
-
onCancel: handleCancel,
|
|
87
|
-
onConfirm: handleConfirm
|
|
88
|
-
}, color === "error" && errorConfirmProps), confirmProps)));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
exports.default = ConfirmButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var DeleteOutlinedIcon = require('@tenancy.nz/icons/DeleteOutlined');
|
|
8
|
-
var ConfirmButton = require('./ConfirmButton.cjs');
|
|
9
|
-
|
|
10
|
-
function DeleteIconButton(_ref) {
|
|
11
|
-
var rest = _rollupPluginBabelHelpers.extends({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_ref), _ref));
|
|
12
|
-
return /* @__PURE__ */React.createElement(ConfirmButton.default, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rest), {}, {
|
|
13
|
-
color: "error"
|
|
14
|
-
}), /* @__PURE__ */React.createElement(DeleteOutlinedIcon, null));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = DeleteIconButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var DownloadOutlinedIcon = require('@tenancy.nz/icons/DownloadOutlined');
|
|
8
|
-
var ui = require('@tenancy.nz/ui');
|
|
9
|
-
|
|
10
|
-
function DownloadIconButton(_ref) {
|
|
11
|
-
var rest = _rollupPluginBabelHelpers.extends({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_ref), _ref));
|
|
12
|
-
return /* @__PURE__ */React.createElement(ui.IconButton, _rollupPluginBabelHelpers.objectSpread2({
|
|
13
|
-
color: "primary"
|
|
14
|
-
}, rest), /* @__PURE__ */React.createElement(DownloadOutlinedIcon, null));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = DownloadIconButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var EditOutlinedIcon = require('@tenancy.nz/icons/EditOutlined');
|
|
8
|
-
var ConfirmButton = require('./ConfirmButton.cjs');
|
|
9
|
-
|
|
10
|
-
function EditIconButton(_ref) {
|
|
11
|
-
var rest = _rollupPluginBabelHelpers.extends({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_ref), _ref));
|
|
12
|
-
return /* @__PURE__ */React.createElement(ConfirmButton.default, _rollupPluginBabelHelpers.objectSpread2({
|
|
13
|
-
color: "primary"
|
|
14
|
-
}, rest), /* @__PURE__ */React.createElement(EditOutlinedIcon, null));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = EditIconButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var LogoutOutlinedIcon = require('@tenancy.nz/icons/LogoutOutlined');
|
|
8
|
-
var ui = require('@tenancy.nz/ui');
|
|
9
|
-
|
|
10
|
-
function LogoutButton(_ref) {
|
|
11
|
-
var rest = _rollupPluginBabelHelpers.extends({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_ref), _ref));
|
|
12
|
-
return /* @__PURE__ */React.createElement(ui.Button, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rest), {}, {
|
|
13
|
-
startIcon: /* @__PURE__ */React.createElement(LogoutOutlinedIcon, null)
|
|
14
|
-
}), "Logout");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = LogoutButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var ExternalLinkOutlinedIcon = require('@tenancy.nz/icons/ExternalLinkOutlined');
|
|
8
|
-
var ui = require('@tenancy.nz/ui');
|
|
9
|
-
|
|
10
|
-
function OpenInNewIconButton(_ref) {
|
|
11
|
-
var rest = _rollupPluginBabelHelpers.extends({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_ref), _ref));
|
|
12
|
-
return /* @__PURE__ */React.createElement(ui.IconButton, _rollupPluginBabelHelpers.objectSpread2({
|
|
13
|
-
color: "primary"
|
|
14
|
-
}, rest), /* @__PURE__ */React.createElement(ExternalLinkOutlinedIcon, null));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = OpenInNewIconButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import ArrowLeftOutlinedIcon from '@tenancy.nz/icons/ArrowLeftOutlined';
|
|
4
|
-
import { Button } from '@tenancy.nz/ui';
|
|
5
|
-
|
|
6
|
-
var _excluded = ["onClick"];
|
|
7
|
-
function BackButton(_ref) {
|
|
8
|
-
var onClick = _ref.onClick,
|
|
9
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
-
return /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
11
|
-
startIcon: /* @__PURE__ */React.createElement(ArrowLeftOutlinedIcon, null),
|
|
12
|
-
variant: "outlined",
|
|
13
|
-
onClick: onClick
|
|
14
|
-
}, rest), "Back");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { BackButton as default };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
import { Tooltip, Box, IconButton, Confirmation } from '@tenancy.nz/ui';
|
|
4
|
-
|
|
5
|
-
var _excluded = ["Component", "children", "color", "confirmMessage", "label", "onClick", "title", "confirmProps"];
|
|
6
|
-
var errorConfirmProps = {
|
|
7
|
-
severity: "error",
|
|
8
|
-
cancelBtnText: "Don't delete",
|
|
9
|
-
confirmBtnText: "Delete"
|
|
10
|
-
};
|
|
11
|
-
function ConfirmButton(_ref) {
|
|
12
|
-
var _ref$Component = _ref.Component,
|
|
13
|
-
Component = _ref$Component === void 0 ? null : _ref$Component,
|
|
14
|
-
children = _ref.children,
|
|
15
|
-
_ref$color = _ref.color,
|
|
16
|
-
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
17
|
-
_ref$confirmMessage = _ref.confirmMessage,
|
|
18
|
-
confirmMessage = _ref$confirmMessage === void 0 ? void 0 : _ref$confirmMessage,
|
|
19
|
-
_ref$label = _ref.label,
|
|
20
|
-
label = _ref$label === void 0 ? "" : _ref$label,
|
|
21
|
-
onClick = _ref.onClick,
|
|
22
|
-
_ref$title = _ref.title,
|
|
23
|
-
title = _ref$title === void 0 ? "" : _ref$title,
|
|
24
|
-
_ref$confirmProps = _ref.confirmProps,
|
|
25
|
-
confirmProps = _ref$confirmProps === void 0 ? {} : _ref$confirmProps,
|
|
26
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
var _useState = useState(false),
|
|
28
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
-
showConfirm = _useState2[0],
|
|
30
|
-
setShowConfirm = _useState2[1];
|
|
31
|
-
var _useState3 = useState(void 0),
|
|
32
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
33
|
-
value = _useState4[0],
|
|
34
|
-
setValue = _useState4[1];
|
|
35
|
-
var handleCancel = function handleCancel(e) {
|
|
36
|
-
e.stopPropagation();
|
|
37
|
-
setShowConfirm(false);
|
|
38
|
-
setValue(void 0);
|
|
39
|
-
};
|
|
40
|
-
var handleClick = function handleClick(e) {
|
|
41
|
-
e.stopPropagation();
|
|
42
|
-
if (!confirmMessage) {
|
|
43
|
-
onClick(e);
|
|
44
|
-
} else {
|
|
45
|
-
setShowConfirm(true);
|
|
46
|
-
setValue(e);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var handleConfirm = function handleConfirm() {
|
|
50
|
-
if (value) {
|
|
51
|
-
onClick(value);
|
|
52
|
-
}
|
|
53
|
-
setShowConfirm(false);
|
|
54
|
-
setValue(void 0);
|
|
55
|
-
};
|
|
56
|
-
return /* @__PURE__ */React.createElement(React.Fragment, null, Component ? /* @__PURE__ */React.createElement(Component, _objectSpread2({
|
|
57
|
-
color: color,
|
|
58
|
-
onClick: handleClick
|
|
59
|
-
}, rest), children) : /* @__PURE__ */React.createElement(Tooltip, {
|
|
60
|
-
title: title,
|
|
61
|
-
placement: "top"
|
|
62
|
-
}, /* @__PURE__ */React.createElement(Box, {
|
|
63
|
-
display: "inline-flex",
|
|
64
|
-
color: color.indexOf(".") === -1 ? "".concat(color, ".main") : color,
|
|
65
|
-
align: "center",
|
|
66
|
-
direction: "column"
|
|
67
|
-
}, /* @__PURE__ */React.createElement(IconButton, _objectSpread2({
|
|
68
|
-
color: color === "error" ? "error" : "inherit",
|
|
69
|
-
onClick: handleClick
|
|
70
|
-
}, rest), children), !!label && /* @__PURE__ */React.createElement(Box, {
|
|
71
|
-
color: "#617391",
|
|
72
|
-
display: "inline-flex",
|
|
73
|
-
fontSize: "11px",
|
|
74
|
-
onClick: handleClick,
|
|
75
|
-
sx: {
|
|
76
|
-
cursor: "pointer"
|
|
77
|
-
}
|
|
78
|
-
}, label))), !!confirmMessage && /* @__PURE__ */React.createElement(Confirmation, _objectSpread2(_objectSpread2({
|
|
79
|
-
open: showConfirm,
|
|
80
|
-
message: confirmMessage,
|
|
81
|
-
title: "Please confirm",
|
|
82
|
-
onCancel: handleCancel,
|
|
83
|
-
onConfirm: handleConfirm
|
|
84
|
-
}, color === "error" && errorConfirmProps), confirmProps)));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export { ConfirmButton as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { extends as _extends, objectDestructuringEmpty as _objectDestructuringEmpty, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import DeleteOutlinedIcon from '@tenancy.nz/icons/DeleteOutlined';
|
|
4
|
-
import ConfirmButton from './ConfirmButton.js';
|
|
5
|
-
|
|
6
|
-
function DeleteIconButton(_ref) {
|
|
7
|
-
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
8
|
-
return /* @__PURE__ */React.createElement(ConfirmButton, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
9
|
-
color: "error"
|
|
10
|
-
}), /* @__PURE__ */React.createElement(DeleteOutlinedIcon, null));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { DeleteIconButton as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { extends as _extends, objectDestructuringEmpty as _objectDestructuringEmpty, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import DownloadOutlinedIcon from '@tenancy.nz/icons/DownloadOutlined';
|
|
4
|
-
import { IconButton } from '@tenancy.nz/ui';
|
|
5
|
-
|
|
6
|
-
function DownloadIconButton(_ref) {
|
|
7
|
-
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
8
|
-
return /* @__PURE__ */React.createElement(IconButton, _objectSpread2({
|
|
9
|
-
color: "primary"
|
|
10
|
-
}, rest), /* @__PURE__ */React.createElement(DownloadOutlinedIcon, null));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { DownloadIconButton as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { extends as _extends, objectDestructuringEmpty as _objectDestructuringEmpty, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import EditOutlinedIcon from '@tenancy.nz/icons/EditOutlined';
|
|
4
|
-
import ConfirmButton from './ConfirmButton.js';
|
|
5
|
-
|
|
6
|
-
function EditIconButton(_ref) {
|
|
7
|
-
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
8
|
-
return /* @__PURE__ */React.createElement(ConfirmButton, _objectSpread2({
|
|
9
|
-
color: "primary"
|
|
10
|
-
}, rest), /* @__PURE__ */React.createElement(EditOutlinedIcon, null));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { EditIconButton as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { extends as _extends, objectDestructuringEmpty as _objectDestructuringEmpty, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import LogoutOutlinedIcon from '@tenancy.nz/icons/LogoutOutlined';
|
|
4
|
-
import { Button } from '@tenancy.nz/ui';
|
|
5
|
-
|
|
6
|
-
function LogoutButton(_ref) {
|
|
7
|
-
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
8
|
-
return /* @__PURE__ */React.createElement(Button, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
9
|
-
startIcon: /* @__PURE__ */React.createElement(LogoutOutlinedIcon, null)
|
|
10
|
-
}), "Logout");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { LogoutButton as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { extends as _extends, objectDestructuringEmpty as _objectDestructuringEmpty, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import ExternalLinkOutlinedIcon from '@tenancy.nz/icons/ExternalLinkOutlined';
|
|
4
|
-
import { IconButton } from '@tenancy.nz/ui';
|
|
5
|
-
|
|
6
|
-
function OpenInNewIconButton(_ref) {
|
|
7
|
-
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
8
|
-
return /* @__PURE__ */React.createElement(IconButton, _objectSpread2({
|
|
9
|
-
color: "primary"
|
|
10
|
-
}, rest), /* @__PURE__ */React.createElement(ExternalLinkOutlinedIcon, null));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { OpenInNewIconButton as default };
|