@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
4
|
var React = require('react');
|
|
5
|
+
var classnames = require('classnames');
|
|
5
6
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
6
7
|
var Alert = require('@bigbinary/neetoui/Alert');
|
|
7
8
|
var Callout = require('@bigbinary/neetoui/Callout');
|
|
@@ -29,7 +30,6 @@ var axios = require('axios');
|
|
|
29
30
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
30
31
|
var useMutationWithInvalidation = require('@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation');
|
|
31
32
|
var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
32
|
-
require('classnames');
|
|
33
33
|
require('@bigbinary/neeto-cist');
|
|
34
34
|
|
|
35
35
|
function _interopNamespaceDefault(e) {
|
|
@@ -3272,38 +3272,41 @@ var AllowedIpRange = withT(function (_ref) {
|
|
|
3272
3272
|
index = _ref.index,
|
|
3273
3273
|
arrayHelpers = _ref.arrayHelpers;
|
|
3274
3274
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3275
|
-
className: "
|
|
3276
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
3277
|
-
className: "
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3275
|
+
className: "flex items-start gap-3",
|
|
3276
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3277
|
+
className: "grid flex-grow grid-cols-1 gap-3 md:grid-cols-3",
|
|
3278
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
3279
|
+
className: "text-left",
|
|
3280
|
+
"data-cy": "ip-start-text-field",
|
|
3281
|
+
label: t("neetoMolecules.ipRestriction.ipStart"),
|
|
3282
|
+
labelProps: {
|
|
3283
|
+
className: "md:hidden"
|
|
3284
|
+
},
|
|
3285
|
+
name: "allowedIpRanges.".concat(index, ".ipStart"),
|
|
3286
|
+
placeholder: t("neetoMolecules.ipRestriction.ipStart")
|
|
3287
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
3288
|
+
className: "text-left",
|
|
3289
|
+
"data-cy": "ip-end-text-field",
|
|
3290
|
+
label: t("neetoMolecules.ipRestriction.ipEnd"),
|
|
3291
|
+
labelProps: {
|
|
3292
|
+
className: "md:hidden"
|
|
3293
|
+
},
|
|
3294
|
+
name: "allowedIpRanges.".concat(index, ".ipEnd"),
|
|
3295
|
+
placeholder: t("neetoMolecules.ipRestriction.ipEnd")
|
|
3296
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Select, {
|
|
3297
|
+
className: "text-left",
|
|
3298
|
+
"data-testid": "address-type-select-field",
|
|
3299
|
+
label: t("neetoMolecules.ipRestriction.type"),
|
|
3300
|
+
labelProps: {
|
|
3301
|
+
className: "md:hidden"
|
|
3302
|
+
},
|
|
3303
|
+
name: "allowedIpRanges.".concat(index, ".addressType"),
|
|
3304
|
+
options: ADDRESS_TYPE_SELECT_OPTIONS
|
|
3305
|
+
})]
|
|
3303
3306
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3304
|
-
className: "
|
|
3307
|
+
className: "flex flex-shrink-0 justify-center md:min-w-14",
|
|
3305
3308
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3306
|
-
className: "mt-
|
|
3309
|
+
className: "mt-5 md:mt-0",
|
|
3307
3310
|
"data-cy": "allowed-ip-range-delete-button",
|
|
3308
3311
|
"data-testid": "allowed-ip-range-delete-btn",
|
|
3309
3312
|
icon: Delete,
|
|
@@ -3324,48 +3327,57 @@ var AllowedIpRange = withT(function (_ref) {
|
|
|
3324
3327
|
var AllowedIpRanges = withT(function (_ref) {
|
|
3325
3328
|
var t = _ref.t;
|
|
3326
3329
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3327
|
-
className: "space-y-
|
|
3330
|
+
className: "space-y-5",
|
|
3328
3331
|
"data-cy": "allowed-ip-range-container",
|
|
3329
3332
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
3330
3333
|
"data-cy": "allowed-ip-range-heading",
|
|
3331
3334
|
style: "h4",
|
|
3332
3335
|
children: t("neetoMolecules.ipRestriction.allowedIpRangeTitle")
|
|
3333
3336
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3334
|
-
className: "space-y-
|
|
3337
|
+
className: "space-y-3",
|
|
3335
3338
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3336
|
-
className: "hidden
|
|
3337
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(
|
|
3338
|
-
className: "
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3339
|
+
className: "hidden gap-3 md:flex",
|
|
3340
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3341
|
+
className: "grid flex-grow grid-cols-3 gap-3",
|
|
3342
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
3343
|
+
className: "neeto-ui-text-gray-700 uppercase",
|
|
3344
|
+
style: "h6",
|
|
3345
|
+
children: [t("neetoMolecules.ipRestriction.ipStart"), "*"]
|
|
3346
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
3347
|
+
className: "neeto-ui-text-gray-700 uppercase",
|
|
3348
|
+
style: "h6",
|
|
3349
|
+
children: [t("neetoMolecules.ipRestriction.ipEnd"), "*"]
|
|
3350
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
3351
|
+
className: "neeto-ui-text-gray-700 uppercase",
|
|
3352
|
+
style: "h6",
|
|
3353
|
+
children: [t("neetoMolecules.ipRestriction.type"), "*"]
|
|
3354
|
+
})]
|
|
3355
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3356
|
+
className: "min-w-14 flex-shrink-0",
|
|
3357
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
3358
|
+
className: "neeto-ui-text-gray-700 text-center uppercase",
|
|
3359
|
+
style: "h6",
|
|
3360
|
+
children: t("neetoMolecules.ipRestriction.actions")
|
|
3361
|
+
})
|
|
3353
3362
|
})]
|
|
3354
3363
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3355
|
-
className: "w-full space-y-
|
|
3364
|
+
className: "w-full space-y-6 md:space-y-4",
|
|
3356
3365
|
children: /*#__PURE__*/jsxRuntime.jsx(formik.FieldArray, {
|
|
3357
3366
|
name: "allowedIpRanges",
|
|
3358
3367
|
children: function children(arrayHelpers) {
|
|
3359
3368
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3360
3369
|
children: [arrayHelpers.form.values.allowedIpRanges.map(function (allowedIpRange, index) {
|
|
3361
|
-
return /*#__PURE__*/
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3370
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3371
|
+
className: "neeto-ui-border-gray-300 w-full border-b pb-6 last:border-none last:pb-0 md:border-none md:pb-0",
|
|
3372
|
+
children: /*#__PURE__*/React.createElement(AllowedIpRange, {
|
|
3373
|
+
allowedIpRange: allowedIpRange,
|
|
3374
|
+
arrayHelpers: arrayHelpers,
|
|
3375
|
+
index: index,
|
|
3376
|
+
key: allowedIpRange.createdAt
|
|
3377
|
+
})
|
|
3378
|
+
}, index);
|
|
3367
3379
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3368
|
-
className: "mt-2",
|
|
3380
|
+
className: "md:mt-2",
|
|
3369
3381
|
"data-cy": "add-allowed-ip-range-button",
|
|
3370
3382
|
icon: Plus,
|
|
3371
3383
|
iconPosition: "left",
|
|
@@ -3581,7 +3593,9 @@ var IpRestriction = function IpRestriction() {
|
|
|
3581
3593
|
})]
|
|
3582
3594
|
}),
|
|
3583
3595
|
children: [/*#__PURE__*/jsxRuntime.jsx(BlockNavigation, {}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3584
|
-
className: "nm-ip-restriction space-y-2",
|
|
3596
|
+
className: classnames("nm-ip-restriction space-y-2", {
|
|
3597
|
+
"pb-6": values.ipRestriction
|
|
3598
|
+
}),
|
|
3585
3599
|
children: [/*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
3586
3600
|
checked: values.ipRestriction,
|
|
3587
3601
|
className: "flex-grow-0",
|
|
@@ -3601,7 +3615,7 @@ var IpRestriction = function IpRestriction() {
|
|
|
3601
3615
|
children: t("neetoMolecules.ipRestriction.description")
|
|
3602
3616
|
})]
|
|
3603
3617
|
}), values.ipRestriction && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3604
|
-
className: "neeto-ui-border-gray-300
|
|
3618
|
+
className: "neeto-ui-border-gray-300 w-full space-y-6 border-t pt-6",
|
|
3605
3619
|
children: [/*#__PURE__*/jsxRuntime.jsx(CurrentIp$1, {}), /*#__PURE__*/jsxRuntime.jsx(AllowedIpRanges$1, {}), /*#__PURE__*/jsxRuntime.jsx(Callout, {
|
|
3606
3620
|
style: "warning",
|
|
3607
3621
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|