@bigbinary/neeto-molecules 1.0.49 → 1.0.51
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/IpRestriction.cjs.js +15 -21
- package/dist/IpRestriction.cjs.js.map +1 -1
- package/dist/IpRestriction.js +17 -23
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.cjs.js +4 -3
- package/dist/KeyboardShortcuts.cjs.js.map +1 -1
- package/dist/KeyboardShortcuts.js +4 -3
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +3 -3
- package/types/IpRestriction.d.ts +1 -1
package/dist/IpRestriction.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Typography, Button as Button$1, Tooltip, Alert, Switch } from '@bigbinary/neetoui';
|
|
2
|
+
import { Typography, Button as Button$1, Dropdown, Tooltip, Alert, Switch } from '@bigbinary/neetoui';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Neeto } from '@bigbinary/neeto-icons/logos';
|
|
5
|
-
import { Check, Close,
|
|
5
|
+
import { Check, Close, MenuVertical, Plus } from '@bigbinary/neeto-icons';
|
|
6
6
|
import { Form, Input, Button } from '@bigbinary/neetoui/formik';
|
|
7
7
|
import { useQuery, useQueryClient, useMutation } from 'react-query';
|
|
8
8
|
import axios from 'axios';
|
|
@@ -3436,6 +3436,8 @@ var FormRow = function FormRow(_ref) {
|
|
|
3436
3436
|
});
|
|
3437
3437
|
};
|
|
3438
3438
|
|
|
3439
|
+
var Menu = Dropdown.Menu,
|
|
3440
|
+
MenuItem = Dropdown.MenuItem;
|
|
3439
3441
|
var Row = function Row(_ref) {
|
|
3440
3442
|
var data = _ref.data,
|
|
3441
3443
|
setEditingRow = _ref.setEditingRow;
|
|
@@ -3472,21 +3474,23 @@ var Row = function Row(_ref) {
|
|
|
3472
3474
|
style: "body2"
|
|
3473
3475
|
}, truncate(data.ipEnd, TRUNCATE_LENGTH))), /*#__PURE__*/React.createElement("div", {
|
|
3474
3476
|
className: "w-4/12 flex-grow px-3 py-2 text-center"
|
|
3475
|
-
}, /*#__PURE__*/React.createElement(
|
|
3477
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
3478
|
+
buttonStyle: "text",
|
|
3479
|
+
icon: MenuVertical,
|
|
3480
|
+
position: "bottom-end"
|
|
3481
|
+
}, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
3482
|
+
"data-cy": "ip-range-edit-button",
|
|
3483
|
+
onClick: function onClick() {
|
|
3484
|
+
return setEditingRow(data.id);
|
|
3485
|
+
}
|
|
3486
|
+
}, t("neetoMolecules.common.actions.edit")), /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
3476
3487
|
"data-cy": "ip-range-delete-button",
|
|
3477
|
-
icon: Delete,
|
|
3478
|
-
style: "text",
|
|
3479
|
-
tooltipProps: {
|
|
3480
|
-
content: "Delete",
|
|
3481
|
-
position: "top"
|
|
3482
|
-
},
|
|
3483
3488
|
onClick: function onClick() {
|
|
3484
3489
|
return setIsDeleteIpRangeAlertOpen(true);
|
|
3485
3490
|
}
|
|
3486
|
-
}), /*#__PURE__*/React.createElement(Alert, {
|
|
3487
|
-
cancelButtonLabel: t("neetoMolecules.common.deleteAlert.no"),
|
|
3491
|
+
}, t("neetoMolecules.common.actions.delete")))), /*#__PURE__*/React.createElement(Alert, {
|
|
3488
3492
|
isOpen: isDeleteIpRangeAlertOpen,
|
|
3489
|
-
submitButtonLabel: t("neetoMolecules.common.
|
|
3493
|
+
submitButtonLabel: t("neetoMolecules.common.actions.delete"),
|
|
3490
3494
|
message: t("neetoMolecules.ipRestriction.allowedIpRangeConfirmation", data),
|
|
3491
3495
|
title: t("neetoMolecules.common.deleteAlert.title", {
|
|
3492
3496
|
entity: t("neetoMolecules.ipRestriction.allowedIpRangeTitle")
|
|
@@ -3495,17 +3499,6 @@ var Row = function Row(_ref) {
|
|
|
3495
3499
|
return setIsDeleteIpRangeAlertOpen(false);
|
|
3496
3500
|
},
|
|
3497
3501
|
onSubmit: handleDelete
|
|
3498
|
-
}), /*#__PURE__*/React.createElement(Button$1, {
|
|
3499
|
-
"data-cy": "ip-range-edit-button",
|
|
3500
|
-
icon: Edit,
|
|
3501
|
-
style: "text",
|
|
3502
|
-
tooltipProps: {
|
|
3503
|
-
content: "Edit",
|
|
3504
|
-
position: "top"
|
|
3505
|
-
},
|
|
3506
|
-
onClick: function onClick() {
|
|
3507
|
-
return setEditingRow(data.id);
|
|
3508
|
-
}
|
|
3509
3502
|
})));
|
|
3510
3503
|
};
|
|
3511
3504
|
|
|
@@ -3606,6 +3599,7 @@ var CurrentIp = function CurrentIp() {
|
|
|
3606
3599
|
"data-cy": "current-ip-value",
|
|
3607
3600
|
weight: "semibold"
|
|
3608
3601
|
}, isLoading ? "..." : data.ip), /*#__PURE__*/React.createElement(Typography, {
|
|
3602
|
+
className: "pt-2",
|
|
3609
3603
|
"data-cy": "current-ip-description",
|
|
3610
3604
|
style: "body2"
|
|
3611
3605
|
}, t("neetoMolecules.ipRestriction.currentIpDescription")));
|