@bigbinary/neeto-molecules 3.16.38 → 3.16.39
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.js +74 -60
- package/dist/IpRestriction.js.map +1 -1
- package/dist/cjs/IpRestriction.js +74 -60
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/package.json +1 -1
package/dist/IpRestriction.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import { createElement, memo, useState } from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
3
4
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
4
5
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
5
6
|
import Callout from '@bigbinary/neetoui/Callout';
|
|
@@ -27,7 +28,6 @@ import axios from 'axios';
|
|
|
27
28
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
28
29
|
import useMutationWithInvalidation from '@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation';
|
|
29
30
|
import { n } from './inject-css-DmrvuTKK.js';
|
|
30
|
-
import 'classnames';
|
|
31
31
|
import '@bigbinary/neeto-cist';
|
|
32
32
|
|
|
33
33
|
var ipNum = {};
|
|
@@ -3251,38 +3251,41 @@ var AllowedIpRange = withT(function (_ref) {
|
|
|
3251
3251
|
index = _ref.index,
|
|
3252
3252
|
arrayHelpers = _ref.arrayHelpers;
|
|
3253
3253
|
return /*#__PURE__*/jsxs("div", {
|
|
3254
|
-
className: "
|
|
3255
|
-
children: [/*#__PURE__*/
|
|
3256
|
-
className: "
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3254
|
+
className: "flex items-start gap-3",
|
|
3255
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
3256
|
+
className: "grid flex-grow grid-cols-1 gap-3 md:grid-cols-3",
|
|
3257
|
+
children: [/*#__PURE__*/jsx(Input, {
|
|
3258
|
+
className: "text-left",
|
|
3259
|
+
"data-cy": "ip-start-text-field",
|
|
3260
|
+
label: t("neetoMolecules.ipRestriction.ipStart"),
|
|
3261
|
+
labelProps: {
|
|
3262
|
+
className: "md:hidden"
|
|
3263
|
+
},
|
|
3264
|
+
name: "allowedIpRanges.".concat(index, ".ipStart"),
|
|
3265
|
+
placeholder: t("neetoMolecules.ipRestriction.ipStart")
|
|
3266
|
+
}), /*#__PURE__*/jsx(Input, {
|
|
3267
|
+
className: "text-left",
|
|
3268
|
+
"data-cy": "ip-end-text-field",
|
|
3269
|
+
label: t("neetoMolecules.ipRestriction.ipEnd"),
|
|
3270
|
+
labelProps: {
|
|
3271
|
+
className: "md:hidden"
|
|
3272
|
+
},
|
|
3273
|
+
name: "allowedIpRanges.".concat(index, ".ipEnd"),
|
|
3274
|
+
placeholder: t("neetoMolecules.ipRestriction.ipEnd")
|
|
3275
|
+
}), /*#__PURE__*/jsx(Select, {
|
|
3276
|
+
className: "text-left",
|
|
3277
|
+
"data-testid": "address-type-select-field",
|
|
3278
|
+
label: t("neetoMolecules.ipRestriction.type"),
|
|
3279
|
+
labelProps: {
|
|
3280
|
+
className: "md:hidden"
|
|
3281
|
+
},
|
|
3282
|
+
name: "allowedIpRanges.".concat(index, ".addressType"),
|
|
3283
|
+
options: ADDRESS_TYPE_SELECT_OPTIONS
|
|
3284
|
+
})]
|
|
3282
3285
|
}), /*#__PURE__*/jsx("div", {
|
|
3283
|
-
className: "
|
|
3286
|
+
className: "flex flex-shrink-0 justify-center md:min-w-14",
|
|
3284
3287
|
children: /*#__PURE__*/jsx(Button, {
|
|
3285
|
-
className: "mt-
|
|
3288
|
+
className: "mt-5 md:mt-0",
|
|
3286
3289
|
"data-cy": "allowed-ip-range-delete-button",
|
|
3287
3290
|
"data-testid": "allowed-ip-range-delete-btn",
|
|
3288
3291
|
icon: Delete,
|
|
@@ -3303,48 +3306,57 @@ var AllowedIpRange = withT(function (_ref) {
|
|
|
3303
3306
|
var AllowedIpRanges = withT(function (_ref) {
|
|
3304
3307
|
var t = _ref.t;
|
|
3305
3308
|
return /*#__PURE__*/jsxs("div", {
|
|
3306
|
-
className: "space-y-
|
|
3309
|
+
className: "space-y-5",
|
|
3307
3310
|
"data-cy": "allowed-ip-range-container",
|
|
3308
3311
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
3309
3312
|
"data-cy": "allowed-ip-range-heading",
|
|
3310
3313
|
style: "h4",
|
|
3311
3314
|
children: t("neetoMolecules.ipRestriction.allowedIpRangeTitle")
|
|
3312
3315
|
}), /*#__PURE__*/jsxs("div", {
|
|
3313
|
-
className: "space-y-
|
|
3316
|
+
className: "space-y-3",
|
|
3314
3317
|
children: [/*#__PURE__*/jsxs("div", {
|
|
3315
|
-
className: "hidden
|
|
3316
|
-
children: [/*#__PURE__*/jsxs(
|
|
3317
|
-
className: "
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3318
|
+
className: "hidden gap-3 md:flex",
|
|
3319
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
3320
|
+
className: "grid flex-grow grid-cols-3 gap-3",
|
|
3321
|
+
children: [/*#__PURE__*/jsxs(Typography, {
|
|
3322
|
+
className: "neeto-ui-text-gray-700 uppercase",
|
|
3323
|
+
style: "h6",
|
|
3324
|
+
children: [t("neetoMolecules.ipRestriction.ipStart"), "*"]
|
|
3325
|
+
}), /*#__PURE__*/jsxs(Typography, {
|
|
3326
|
+
className: "neeto-ui-text-gray-700 uppercase",
|
|
3327
|
+
style: "h6",
|
|
3328
|
+
children: [t("neetoMolecules.ipRestriction.ipEnd"), "*"]
|
|
3329
|
+
}), /*#__PURE__*/jsxs(Typography, {
|
|
3330
|
+
className: "neeto-ui-text-gray-700 uppercase",
|
|
3331
|
+
style: "h6",
|
|
3332
|
+
children: [t("neetoMolecules.ipRestriction.type"), "*"]
|
|
3333
|
+
})]
|
|
3334
|
+
}), /*#__PURE__*/jsx("div", {
|
|
3335
|
+
className: "min-w-14 flex-shrink-0",
|
|
3336
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
3337
|
+
className: "neeto-ui-text-gray-700 text-center uppercase",
|
|
3338
|
+
style: "h6",
|
|
3339
|
+
children: t("neetoMolecules.ipRestriction.actions")
|
|
3340
|
+
})
|
|
3332
3341
|
})]
|
|
3333
3342
|
}), /*#__PURE__*/jsx("div", {
|
|
3334
|
-
className: "w-full space-y-
|
|
3343
|
+
className: "w-full space-y-6 md:space-y-4",
|
|
3335
3344
|
children: /*#__PURE__*/jsx(FieldArray, {
|
|
3336
3345
|
name: "allowedIpRanges",
|
|
3337
3346
|
children: function children(arrayHelpers) {
|
|
3338
3347
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
3339
3348
|
children: [arrayHelpers.form.values.allowedIpRanges.map(function (allowedIpRange, index) {
|
|
3340
|
-
return /*#__PURE__*/
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3349
|
+
return /*#__PURE__*/jsx("div", {
|
|
3350
|
+
className: "neeto-ui-border-gray-300 w-full border-b pb-6 last:border-none last:pb-0 md:border-none md:pb-0",
|
|
3351
|
+
children: /*#__PURE__*/createElement(AllowedIpRange, {
|
|
3352
|
+
allowedIpRange: allowedIpRange,
|
|
3353
|
+
arrayHelpers: arrayHelpers,
|
|
3354
|
+
index: index,
|
|
3355
|
+
key: allowedIpRange.createdAt
|
|
3356
|
+
})
|
|
3357
|
+
}, index);
|
|
3346
3358
|
}), /*#__PURE__*/jsx(Button, {
|
|
3347
|
-
className: "mt-2",
|
|
3359
|
+
className: "md:mt-2",
|
|
3348
3360
|
"data-cy": "add-allowed-ip-range-button",
|
|
3349
3361
|
icon: Plus,
|
|
3350
3362
|
iconPosition: "left",
|
|
@@ -3560,7 +3572,9 @@ var IpRestriction = function IpRestriction() {
|
|
|
3560
3572
|
})]
|
|
3561
3573
|
}),
|
|
3562
3574
|
children: [/*#__PURE__*/jsx(BlockNavigation, {}), /*#__PURE__*/jsxs("div", {
|
|
3563
|
-
className: "nm-ip-restriction space-y-2",
|
|
3575
|
+
className: classnames("nm-ip-restriction space-y-2", {
|
|
3576
|
+
"pb-6": values.ipRestriction
|
|
3577
|
+
}),
|
|
3564
3578
|
children: [/*#__PURE__*/jsx(Checkbox, {
|
|
3565
3579
|
checked: values.ipRestriction,
|
|
3566
3580
|
className: "flex-grow-0",
|
|
@@ -3580,7 +3594,7 @@ var IpRestriction = function IpRestriction() {
|
|
|
3580
3594
|
children: t("neetoMolecules.ipRestriction.description")
|
|
3581
3595
|
})]
|
|
3582
3596
|
}), values.ipRestriction && /*#__PURE__*/jsxs("div", {
|
|
3583
|
-
className: "neeto-ui-border-gray-300
|
|
3597
|
+
className: "neeto-ui-border-gray-300 w-full space-y-6 border-t pt-6",
|
|
3584
3598
|
children: [/*#__PURE__*/jsx(CurrentIp$1, {}), /*#__PURE__*/jsx(AllowedIpRanges$1, {}), /*#__PURE__*/jsx(Callout, {
|
|
3585
3599
|
style: "warning",
|
|
3586
3600
|
children: /*#__PURE__*/jsx("div", {
|