@devtron-labs/devtron-fe-common-lib 0.0.62-beta-3 → 0.0.62-beta-4
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/Common/Constants.d.ts +1 -0
- package/dist/Common/DraggableWrapper/types.d.ts +1 -4
- package/dist/Common/Hooks/useUrlFilters/index.d.ts +1 -1
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -19
- package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +14 -2
- package/dist/Pages/GlobalConfigurations/Authorization/constants.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +7 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +50 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +7 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +6 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +286 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +12 -0
- package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
- package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +4 -0
- package/dist/Shared/Components/APIResponseHandler/constants.d.ts +4 -0
- package/dist/Shared/Components/APIResponseHandler/index.d.ts +2 -0
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +37 -0
- package/dist/Shared/Components/BulkSelection/constants.d.ts +1 -0
- package/dist/Shared/Components/BulkSelection/types.d.ts +0 -2
- package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +12 -0
- package/dist/Shared/Components/index.d.ts +2 -0
- package/dist/Shared/Helpers.d.ts +16 -0
- package/dist/Shared/index.d.ts +2 -0
- package/dist/Shared/validations.d.ts +8 -0
- package/dist/index.js +1203 -216
- package/package.json +1 -1
- package/src/Assets/Icon/ic-cpu.svg +4 -0
- package/src/Assets/Icon/ic-memory.svg +3 -0
- package/src/Assets/Icon/ic-timer.svg +3 -0
- package/src/Common/BreadCrumb/Types.ts +0 -1
- package/src/Common/Checkbox.tsx +1 -0
- package/src/Common/Constants.ts +2 -1
- package/src/Common/CustomInput/CustomInput.tsx +2 -1
- package/src/Common/DraggableWrapper/DraggableWrapper.tsx +3 -1
- package/src/Common/DraggableWrapper/types.ts +1 -4
- package/src/Common/Helper.tsx +1 -7
- package/src/Common/Hooks/useUrlFilters/index.ts +1 -1
- package/src/Common/Hooks/useUrlFilters/types.ts +1 -21
- package/src/Common/Hooks/useUrlFilters/useUrlFilters.ts +6 -28
- package/src/Common/RJSF/utils.ts +2 -0
- package/src/Common/SearchBar/searchBar.scss +1 -1
- package/src/Pages/GlobalConfigurations/Authorization/constants.ts +1 -1
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +128 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +44 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +106 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +55 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +32 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +45 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +56 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +4 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +139 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +7 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +167 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +339 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +507 -0
- package/src/Pages/GlobalConfigurations/index.ts +1 -0
- package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +41 -0
- package/src/Shared/Components/APIResponseHandler/constants.tsx +5 -0
- package/src/Shared/Components/APIResponseHandler/index.ts +2 -0
- package/src/Shared/Components/APIResponseHandler/types.tsx +39 -0
- package/src/Shared/Components/BulkSelection/BulkSelection.tsx +2 -2
- package/src/Shared/Components/BulkSelection/BulkSelectionDropdownItems.tsx +3 -1
- package/src/Shared/Components/BulkSelection/BulkSelectionProvider.tsx +17 -17
- package/src/Shared/Components/BulkSelection/constants.tsx +1 -0
- package/src/Shared/Components/BulkSelection/types.tsx +0 -2
- package/src/Shared/Components/ReactSelect/index.ts +1 -0
- package/src/Shared/Components/ReactSelect/utils.tsx +97 -0
- package/src/Shared/Components/index.ts +2 -0
- package/src/Shared/Helpers.tsx +29 -0
- package/src/Shared/index.ts +2 -0
- package/src/Shared/validations.tsx +130 -0
package/dist/index.js
CHANGED
|
@@ -50,7 +50,8 @@ var ROUTES = {
|
|
|
50
50
|
USER_CHECK_ROLE: 'user/check/roles',
|
|
51
51
|
IMAGE_TAGGING: 'app/image-tagging',
|
|
52
52
|
CD_MATERIAL_GET: 'app/cd-pipeline',
|
|
53
|
-
DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
|
|
53
|
+
DEPLOYMENT_TEMPLATE_LIST: 'app/template/list',
|
|
54
|
+
INFRA_CONFIG_PROFILE: 'infra-config/profile',
|
|
54
55
|
};
|
|
55
56
|
exports.KEY_VALUE = void 0;
|
|
56
57
|
(function (KEY_VALUE) {
|
|
@@ -797,9 +798,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
|
|
|
797
798
|
styleInject(css_248z$9);
|
|
798
799
|
|
|
799
800
|
var _g$7;
|
|
800
|
-
function _extends$
|
|
801
|
+
function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
801
802
|
var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
802
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
803
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
803
804
|
xmlns: "http://www.w3.org/2000/svg",
|
|
804
805
|
viewBox: "0 0 24 24",
|
|
805
806
|
width: "1em",
|
|
@@ -851,8 +852,8 @@ EmptyState.Loading = Loading;
|
|
|
851
852
|
|
|
852
853
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
853
854
|
|
|
854
|
-
function _extends$
|
|
855
|
-
_extends$
|
|
855
|
+
function _extends$v() {
|
|
856
|
+
_extends$v = Object.assign || function (target) {
|
|
856
857
|
for (var i = 1; i < arguments.length; i++) {
|
|
857
858
|
var source = arguments[i];
|
|
858
859
|
|
|
@@ -866,7 +867,7 @@ function _extends$s() {
|
|
|
866
867
|
return target;
|
|
867
868
|
};
|
|
868
869
|
|
|
869
|
-
return _extends$
|
|
870
|
+
return _extends$v.apply(this, arguments);
|
|
870
871
|
}
|
|
871
872
|
|
|
872
873
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
@@ -1592,7 +1593,7 @@ function ProgressBar(_ref) {
|
|
|
1592
1593
|
isIn = _ref.isIn,
|
|
1593
1594
|
theme = _ref.theme;
|
|
1594
1595
|
|
|
1595
|
-
var style = _extends$
|
|
1596
|
+
var style = _extends$v({}, userStyle, {
|
|
1596
1597
|
animationDuration: delay + "ms",
|
|
1597
1598
|
animationPlayState: isRunning ? 'running' : 'paused',
|
|
1598
1599
|
opacity: hide ? 0 : 1
|
|
@@ -1869,9 +1870,9 @@ var ToastContainer = function ToastContainer(props) {
|
|
|
1869
1870
|
,
|
|
1870
1871
|
id: containerId
|
|
1871
1872
|
}, getToastToRender(function (position, toastList) {
|
|
1872
|
-
var containerStyle = !toastList.length ? _extends$
|
|
1873
|
+
var containerStyle = !toastList.length ? _extends$v({}, style, {
|
|
1873
1874
|
pointerEvents: 'none'
|
|
1874
|
-
}) : _extends$
|
|
1875
|
+
}) : _extends$v({}, style);
|
|
1875
1876
|
return React.createElement("div", {
|
|
1876
1877
|
className: getClassName(position),
|
|
1877
1878
|
style: containerStyle,
|
|
@@ -1978,7 +1979,7 @@ function dispatchToast(content, options) {
|
|
|
1978
1979
|
|
|
1979
1980
|
|
|
1980
1981
|
function mergeOptions(type, options) {
|
|
1981
|
-
return _extends$
|
|
1982
|
+
return _extends$v({}, options, {
|
|
1982
1983
|
type: options && options.type || type,
|
|
1983
1984
|
toastId: getToastId(options)
|
|
1984
1985
|
});
|
|
@@ -1995,7 +1996,7 @@ function toast(content, options) {
|
|
|
1995
1996
|
}
|
|
1996
1997
|
|
|
1997
1998
|
toast.loading = function (content, options) {
|
|
1998
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
1999
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$v({
|
|
1999
2000
|
isLoading: true,
|
|
2000
2001
|
autoClose: false,
|
|
2001
2002
|
closeOnClick: false,
|
|
@@ -2011,7 +2012,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2011
2012
|
var id;
|
|
2012
2013
|
|
|
2013
2014
|
if (pending) {
|
|
2014
|
-
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$
|
|
2015
|
+
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$v({}, options, pending));
|
|
2015
2016
|
}
|
|
2016
2017
|
|
|
2017
2018
|
var resetParams = {
|
|
@@ -2030,7 +2031,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2030
2031
|
return;
|
|
2031
2032
|
}
|
|
2032
2033
|
|
|
2033
|
-
var baseParams = _extends$
|
|
2034
|
+
var baseParams = _extends$v({
|
|
2034
2035
|
type: type
|
|
2035
2036
|
}, resetParams, options, {
|
|
2036
2037
|
data: result
|
|
@@ -2041,10 +2042,10 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2041
2042
|
} : input; // if the id is set we know that it's an update
|
|
2042
2043
|
|
|
2043
2044
|
if (id) {
|
|
2044
|
-
toast.update(id, _extends$
|
|
2045
|
+
toast.update(id, _extends$v({}, baseParams, params));
|
|
2045
2046
|
} else {
|
|
2046
2047
|
// using toast.promise without loading
|
|
2047
|
-
toast(params.render, _extends$
|
|
2048
|
+
toast(params.render, _extends$v({}, baseParams, params));
|
|
2048
2049
|
}
|
|
2049
2050
|
|
|
2050
2051
|
return result;
|
|
@@ -2068,7 +2069,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
|
|
|
2068
2069
|
toast.warn = toast.warning;
|
|
2069
2070
|
|
|
2070
2071
|
toast.dark = function (content, options) {
|
|
2071
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
2072
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$v({
|
|
2072
2073
|
theme: 'dark'
|
|
2073
2074
|
}, options)));
|
|
2074
2075
|
};
|
|
@@ -2125,7 +2126,7 @@ toast.update = function (toastId, options) {
|
|
|
2125
2126
|
var oldOptions = toast.props,
|
|
2126
2127
|
oldContent = toast.content;
|
|
2127
2128
|
|
|
2128
|
-
var nextOptions = _extends$
|
|
2129
|
+
var nextOptions = _extends$v({}, oldOptions, options, {
|
|
2129
2130
|
toastId: options.toastId || toastId,
|
|
2130
2131
|
updateId: generateToastId()
|
|
2131
2132
|
});
|
|
@@ -11810,14 +11811,7 @@ var getUrlWithSearchParams = function (url, params) {
|
|
|
11810
11811
|
var searchParams = new URLSearchParams();
|
|
11811
11812
|
Object.keys(params).forEach(function (key) {
|
|
11812
11813
|
if (params[key]) {
|
|
11813
|
-
|
|
11814
|
-
params[key].forEach(function (val) {
|
|
11815
|
-
searchParams.append(key, val);
|
|
11816
|
-
});
|
|
11817
|
-
}
|
|
11818
|
-
else {
|
|
11819
|
-
searchParams.set(key, params[key]);
|
|
11820
|
-
}
|
|
11814
|
+
searchParams.append(key, params[key]);
|
|
11821
11815
|
}
|
|
11822
11816
|
});
|
|
11823
11817
|
var queryString = searchParams.toString();
|
|
@@ -12066,16 +12060,16 @@ var Modal = function (_a) {
|
|
|
12066
12060
|
}, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
|
|
12067
12061
|
};
|
|
12068
12062
|
|
|
12069
|
-
var _path$
|
|
12070
|
-
function _extends$
|
|
12063
|
+
var _path$k;
|
|
12064
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
12071
12065
|
var SvgIcCross = function SvgIcCross(props) {
|
|
12072
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12066
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
12073
12067
|
width: "1em",
|
|
12074
12068
|
height: "1em",
|
|
12075
12069
|
viewBox: "0 0 24 24",
|
|
12076
12070
|
fill: "none",
|
|
12077
12071
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12078
|
-
}, props), _path$
|
|
12072
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12079
12073
|
d: "M19.28 5.78a.75.75 0 0 0-1.06-1.06l1.06 1.06ZM4.72 18.22a.75.75 0 1 0 1.06 1.06l-1.06-1.06Zm13.5 1.06a.75.75 0 1 0 1.06-1.06l-1.06 1.06ZM5.78 4.72a.75.75 0 0 0-1.06 1.06l1.06-1.06Zm12.44 0-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm-6.75 6.75-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm7.81 6.75-6.75-6.75-1.06 1.06 6.75 6.75 1.06-1.06Zm-6.75-6.75L5.78 4.72 4.72 5.78l6.75 6.75 1.06-1.06Z",
|
|
12080
12074
|
fill: "#596168"
|
|
12081
12075
|
})));
|
|
@@ -16374,30 +16368,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
16374
16368
|
|
|
16375
16369
|
var Tippy = index;
|
|
16376
16370
|
|
|
16377
|
-
var _path$
|
|
16378
|
-
function _extends$
|
|
16371
|
+
var _path$j;
|
|
16372
|
+
function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
16379
16373
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
16380
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16374
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
16381
16375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16382
16376
|
width: "1em",
|
|
16383
16377
|
height: "1em",
|
|
16384
16378
|
viewBox: "0 0 24 24"
|
|
16385
|
-
}, props), _path$
|
|
16379
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16386
16380
|
fill: "#767D84",
|
|
16387
16381
|
fillRule: "evenodd",
|
|
16388
16382
|
d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm-.205 12.868c-.615 0-1.12.505-1.12 1.12 0 .617.505 1.121 1.12 1.121.615 0 1.12-.504 1.12-1.12 0-.616-.506-1.12-1.12-1.12zM11.863 7c-1.667 0-3.197 1.187-3.196 2.527 0 .546.41.833.888.833 1.325 0 .642-1.803 2.39-1.803.82 0 1.311.438 1.311 1.175 0 1.34-2.39 1.708-2.39 3.334 0 .438.287.915.874.915.902 0 .792-.67 1.12-1.148.438-.642 2.473-1.325 2.473-3.101 0-1.927-1.721-2.732-3.47-2.732z"
|
|
16389
16383
|
})));
|
|
16390
16384
|
};
|
|
16391
16385
|
|
|
16392
|
-
var _path$
|
|
16393
|
-
function _extends$
|
|
16386
|
+
var _path$i;
|
|
16387
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
16394
16388
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
16395
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16389
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
16396
16390
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16397
16391
|
viewBox: "0 0 17 16",
|
|
16398
16392
|
width: "1em",
|
|
16399
16393
|
height: "1em"
|
|
16400
|
-
}, props), _path$
|
|
16394
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16401
16395
|
fill: "#767D84",
|
|
16402
16396
|
fillRule: "evenodd",
|
|
16403
16397
|
d: "M9 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 9 1.333zm0 1.334C6.054 2.667 3.667 5.054 3.667 8S6.054 13.333 9 13.333 14.333 10.946 14.333 8 11.946 2.667 9 2.667zm-.137 7.245c.41 0 .747.337.747.747s-.337.747-.747.747-.747-.336-.747-.747a.75.75 0 0 1 .747-.747zm.046-5.245c1.166 0 2.313.537 2.313 1.82 0 1.185-1.357 1.64-1.648 2.068-.22.319-.146.766-.747.766-.392 0-.583-.319-.583-.61 0-1.085 1.593-1.33 1.593-2.223 0-.492-.327-.783-.873-.783-1.166 0-.711 1.202-1.594 1.202-.319 0-.592-.191-.592-.556 0-.893 1.02-1.684 2.13-1.684z"
|
|
@@ -16449,16 +16443,16 @@ function TippyCustomized(props) {
|
|
|
16449
16443
|
return (jsxRuntime.jsx(Tippy, __assign({ className: "".concat(isWhiteTheme ? 'tippy-white-container default-white' : 'tippy-black-container default-black', " no-content-padding tippy-shadow ").concat(className), arrow: arrow || false, interactive: interactive || false, placement: placement || 'top', content: getTippyContent(), trigger: trigger || 'mouseenter', onMount: onTippyMount, onClickOutside: closeTippy, showOnCreate: showOnCreate || false, animation: animation || 'fade', duration: duration || 300, visible: props.visible }, { children: children })));
|
|
16450
16444
|
}
|
|
16451
16445
|
|
|
16452
|
-
var _path$
|
|
16453
|
-
function _extends$
|
|
16446
|
+
var _path$h, _circle, _path2$2;
|
|
16447
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
16454
16448
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
16455
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16449
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
16456
16450
|
width: "1em",
|
|
16457
16451
|
height: "1em",
|
|
16458
16452
|
viewBox: "0 0 20 20",
|
|
16459
16453
|
fill: "none",
|
|
16460
16454
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16461
|
-
}, props), _path$
|
|
16455
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16462
16456
|
d: "M10 10H3.333",
|
|
16463
16457
|
stroke: "#596168",
|
|
16464
16458
|
strokeWidth: 1.5,
|
|
@@ -16469,7 +16463,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
|
|
|
16469
16463
|
cy: 10,
|
|
16470
16464
|
r: 1.667,
|
|
16471
16465
|
fill: "#596168"
|
|
16472
|
-
})), _path2$
|
|
16466
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16473
16467
|
d: "m4.415 6.403 5.347-3.008a.486.486 0 0 1 .476 0l5.348 3.008a.486.486 0 0 1 .247.424v5.994a.485.485 0 0 1-.247.424l-5.348 3.007a.485.485 0 0 1-.476 0l-5.347-3.007",
|
|
16474
16468
|
stroke: "#596168",
|
|
16475
16469
|
strokeWidth: 1.5,
|
|
@@ -16486,15 +16480,15 @@ function PropagateTagInfo(_a) {
|
|
|
16486
16480
|
return (jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300", placement: "top", Icon: SvgInjectTag, heading: 'Propagate tags to K8s resources', infoText: "", additionalContent: additionalInfo(), showCloseButton: true, trigger: "click", interactive: true, documentationLink: isCreateApp ? DOCUMENTATION.APP_TAGS : DOCUMENTATION.APP_OVERVIEW_TAGS, documentationLinkText: "View Documentation" }, { children: jsxRuntime.jsxs("div", __assign({ className: "flexbox cursor" }, { children: [jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-16 mt-2 mr-4" }), jsxRuntime.jsx("span", { children: "Propagate tags" }), jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-16 mt-2 ml-4" })] })) })));
|
|
16487
16481
|
}
|
|
16488
16482
|
|
|
16489
|
-
var _path$
|
|
16490
|
-
function _extends$
|
|
16483
|
+
var _path$g;
|
|
16484
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
16491
16485
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
16492
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16486
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
16493
16487
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16494
16488
|
width: "1em",
|
|
16495
16489
|
height: "1em",
|
|
16496
16490
|
viewBox: "0 0 20 20"
|
|
16497
|
-
}, props), _path$
|
|
16491
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16498
16492
|
d: "M10 1.667c4.6 0 8.333 3.733 8.333 8.333S14.6 18.333 10 18.333 1.667 14.6 1.667 10 5.4 1.667 10 1.667zm0 1.666A6.67 6.67 0 0 0 3.333 10 6.67 6.67 0 0 0 10 16.667 6.67 6.67 0 0 0 16.667 10 6.67 6.67 0 0 0 10 3.333zm0 5.834c.46 0 .833.373.833.833v3.333a.834.834 0 1 1-1.666 0V10c0-.46.373-.833.833-.833zm0-3.334A.833.833 0 1 1 10 7.5a.833.833 0 0 1 0-1.667z",
|
|
16499
16493
|
fill: "#06C",
|
|
16500
16494
|
fillRule: "evenodd"
|
|
@@ -16728,15 +16722,15 @@ var TagDetails = function (_a) {
|
|
|
16728
16722
|
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox mb-8" }, { children: [jsxRuntime.jsx("div", __assign({ className: "dc__border h-30 pl-4 pr-4 br-4 mr-8 pointer ".concat(tagData.propagate ? 'bcn-7' : '', " ").concat(tagData.key.startsWith("devtron.ai/") ? 'cursor-not-allowed bcn-1' : ''), onClick: propagateTagToResource, "data-testid": "propagate-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-20 mt-4 ".concat(tagData.propagate ? 'scn-0' : '') }) })), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.KEY, placeholder: "Enter key", tabIndex: tabIndex - 1, refVar: keyRef, dependentRef: valueRef, tagOptions: suggestedTagsOptions }), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.VALUE, placeholder: "Enter value", tabIndex: tabIndex, refVar: valueRef, dependentRef: keyRef }), jsxRuntime.jsx("div", __assign({ className: "dc__border pl-4 pr-4 dc__right-radius-4 pointer flex top", onClick: deleteTag, "data-testid": "delete-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-20 mt-4" }) }))] })));
|
|
16729
16723
|
};
|
|
16730
16724
|
|
|
16731
|
-
var _path$
|
|
16732
|
-
function _extends$
|
|
16725
|
+
var _path$f;
|
|
16726
|
+
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
16733
16727
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
16734
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16728
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
16735
16729
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16736
16730
|
width: "1em",
|
|
16737
16731
|
height: "1em",
|
|
16738
16732
|
viewBox: "0 0 24 24"
|
|
16739
|
-
}, props), _path$
|
|
16733
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16740
16734
|
className: "ic-add_svg__fill-color",
|
|
16741
16735
|
fill: "#999",
|
|
16742
16736
|
d: "M18 13h-5v5a1 1 0 0 1-2 0v-5H6a1 1 0 0 1 0-2h5V6a1 1 0 0 1 2 0v5h5a1 1 0 0 1 0 2z"
|
|
@@ -16866,8 +16860,8 @@ function ForceDeleteDialog(_a) {
|
|
|
16866
16860
|
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(DeleteDialog, __assign({ title: forceDeleteDialogTitle, delete: onClickDelete, closeDelete: closeDeleteModal, deletePrefix: "Force " }, { children: jsxRuntime.jsxs(DeleteDialog.Description, { children: [jsxRuntime.jsxs("p", __assign({ className: "mt-12 mb-12 p-8 dc__break-word dc__window-bg" }, { children: ["Error: ", forceDeleteDialogMessage] })), jsxRuntime.jsx("p", { children: "Do you want to force delete?" })] }) })) }));
|
|
16867
16861
|
}
|
|
16868
16862
|
|
|
16869
|
-
function _extends$
|
|
16870
|
-
_extends$
|
|
16863
|
+
function _extends$o() {
|
|
16864
|
+
_extends$o = Object.assign ? Object.assign.bind() : function (target) {
|
|
16871
16865
|
for (var i = 1; i < arguments.length; i++) {
|
|
16872
16866
|
var source = arguments[i];
|
|
16873
16867
|
for (var key in source) {
|
|
@@ -16878,7 +16872,7 @@ function _extends$l() {
|
|
|
16878
16872
|
}
|
|
16879
16873
|
return target;
|
|
16880
16874
|
};
|
|
16881
|
-
return _extends$
|
|
16875
|
+
return _extends$o.apply(this, arguments);
|
|
16882
16876
|
}
|
|
16883
16877
|
|
|
16884
16878
|
/*
|
|
@@ -20419,7 +20413,7 @@ var Menu = function Menu(props) {
|
|
|
20419
20413
|
getStyles = props.getStyles,
|
|
20420
20414
|
innerRef = props.innerRef,
|
|
20421
20415
|
innerProps = props.innerProps;
|
|
20422
|
-
return jsx("div", _extends$
|
|
20416
|
+
return jsx("div", _extends$o({
|
|
20423
20417
|
css: getStyles('menu', props),
|
|
20424
20418
|
className: cx({
|
|
20425
20419
|
menu: true
|
|
@@ -20451,7 +20445,7 @@ var MenuList$1 = function MenuList(props) {
|
|
|
20451
20445
|
innerProps = props.innerProps,
|
|
20452
20446
|
innerRef = props.innerRef,
|
|
20453
20447
|
isMulti = props.isMulti;
|
|
20454
|
-
return jsx("div", _extends$
|
|
20448
|
+
return jsx("div", _extends$o({
|
|
20455
20449
|
css: getStyles('menuList', props),
|
|
20456
20450
|
className: cx({
|
|
20457
20451
|
'menu-list': true,
|
|
@@ -20482,7 +20476,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
20482
20476
|
cx = props.cx,
|
|
20483
20477
|
getStyles = props.getStyles,
|
|
20484
20478
|
innerProps = props.innerProps;
|
|
20485
|
-
return jsx("div", _extends$
|
|
20479
|
+
return jsx("div", _extends$o({
|
|
20486
20480
|
css: getStyles('noOptionsMessage', props),
|
|
20487
20481
|
className: cx({
|
|
20488
20482
|
'menu-notice': true,
|
|
@@ -20499,7 +20493,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
20499
20493
|
cx = props.cx,
|
|
20500
20494
|
getStyles = props.getStyles,
|
|
20501
20495
|
innerProps = props.innerProps;
|
|
20502
|
-
return jsx("div", _extends$
|
|
20496
|
+
return jsx("div", _extends$o({
|
|
20503
20497
|
css: getStyles('loadingMessage', props),
|
|
20504
20498
|
className: cx({
|
|
20505
20499
|
'menu-notice': true,
|
|
@@ -20587,7 +20581,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
20587
20581
|
rect: rect
|
|
20588
20582
|
}; // same wrapper element whether fixed or portalled
|
|
20589
20583
|
|
|
20590
|
-
var menuWrapper = jsx("div", _extends$
|
|
20584
|
+
var menuWrapper = jsx("div", _extends$o({
|
|
20591
20585
|
css: getStyles('menuPortal', state),
|
|
20592
20586
|
className: cx({
|
|
20593
20587
|
'menu-portal': true
|
|
@@ -20623,7 +20617,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
20623
20617
|
innerProps = props.innerProps,
|
|
20624
20618
|
isDisabled = props.isDisabled,
|
|
20625
20619
|
isRtl = props.isRtl;
|
|
20626
|
-
return jsx("div", _extends$
|
|
20620
|
+
return jsx("div", _extends$o({
|
|
20627
20621
|
css: getStyles('container', props),
|
|
20628
20622
|
className: cx({
|
|
20629
20623
|
'--is-disabled': isDisabled,
|
|
@@ -20658,7 +20652,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
20658
20652
|
isMulti = props.isMulti,
|
|
20659
20653
|
getStyles = props.getStyles,
|
|
20660
20654
|
hasValue = props.hasValue;
|
|
20661
|
-
return jsx("div", _extends$
|
|
20655
|
+
return jsx("div", _extends$o({
|
|
20662
20656
|
css: getStyles('valueContainer', props),
|
|
20663
20657
|
className: cx({
|
|
20664
20658
|
'value-container': true,
|
|
@@ -20684,7 +20678,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
20684
20678
|
cx = props.cx,
|
|
20685
20679
|
innerProps = props.innerProps,
|
|
20686
20680
|
getStyles = props.getStyles;
|
|
20687
|
-
return jsx("div", _extends$
|
|
20681
|
+
return jsx("div", _extends$o({
|
|
20688
20682
|
css: getStyles('indicatorsContainer', props),
|
|
20689
20683
|
className: cx({
|
|
20690
20684
|
indicators: true
|
|
@@ -20715,7 +20709,7 @@ var Svg = function Svg(_ref) {
|
|
|
20715
20709
|
var size = _ref.size,
|
|
20716
20710
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
20717
20711
|
|
|
20718
|
-
return jsx("svg", _extends$
|
|
20712
|
+
return jsx("svg", _extends$o({
|
|
20719
20713
|
height: size,
|
|
20720
20714
|
width: size,
|
|
20721
20715
|
viewBox: "0 0 20 20",
|
|
@@ -20726,14 +20720,14 @@ var Svg = function Svg(_ref) {
|
|
|
20726
20720
|
};
|
|
20727
20721
|
|
|
20728
20722
|
var CrossIcon = function CrossIcon(props) {
|
|
20729
|
-
return jsx(Svg, _extends$
|
|
20723
|
+
return jsx(Svg, _extends$o({
|
|
20730
20724
|
size: 20
|
|
20731
20725
|
}, props), jsx("path", {
|
|
20732
20726
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
20733
20727
|
}));
|
|
20734
20728
|
};
|
|
20735
20729
|
var DownChevron = function DownChevron(props) {
|
|
20736
|
-
return jsx(Svg, _extends$
|
|
20730
|
+
return jsx(Svg, _extends$o({
|
|
20737
20731
|
size: 20
|
|
20738
20732
|
}, props), jsx("path", {
|
|
20739
20733
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
@@ -20766,7 +20760,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
|
|
|
20766
20760
|
cx = props.cx,
|
|
20767
20761
|
getStyles = props.getStyles,
|
|
20768
20762
|
innerProps = props.innerProps;
|
|
20769
|
-
return jsx("div", _extends$
|
|
20763
|
+
return jsx("div", _extends$o({
|
|
20770
20764
|
css: getStyles('dropdownIndicator', props),
|
|
20771
20765
|
className: cx({
|
|
20772
20766
|
indicator: true,
|
|
@@ -20781,7 +20775,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
20781
20775
|
cx = props.cx,
|
|
20782
20776
|
getStyles = props.getStyles,
|
|
20783
20777
|
innerProps = props.innerProps;
|
|
20784
|
-
return jsx("div", _extends$
|
|
20778
|
+
return jsx("div", _extends$o({
|
|
20785
20779
|
css: getStyles('clearIndicator', props),
|
|
20786
20780
|
className: cx({
|
|
20787
20781
|
indicator: true,
|
|
@@ -20811,7 +20805,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
20811
20805
|
cx = props.cx,
|
|
20812
20806
|
getStyles = props.getStyles,
|
|
20813
20807
|
innerProps = props.innerProps;
|
|
20814
|
-
return jsx("span", _extends$
|
|
20808
|
+
return jsx("span", _extends$o({}, innerProps, {
|
|
20815
20809
|
css: getStyles('indicatorSeparator', props),
|
|
20816
20810
|
className: cx({
|
|
20817
20811
|
'indicator-separator': true
|
|
@@ -20866,7 +20860,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
20866
20860
|
getStyles = props.getStyles,
|
|
20867
20861
|
innerProps = props.innerProps,
|
|
20868
20862
|
isRtl = props.isRtl;
|
|
20869
|
-
return jsx("div", _extends$
|
|
20863
|
+
return jsx("div", _extends$o({
|
|
20870
20864
|
css: getStyles('loadingIndicator', props),
|
|
20871
20865
|
className: cx({
|
|
20872
20866
|
indicator: true,
|
|
@@ -20927,7 +20921,7 @@ var Control = function Control(props) {
|
|
|
20927
20921
|
innerRef = props.innerRef,
|
|
20928
20922
|
innerProps = props.innerProps,
|
|
20929
20923
|
menuIsOpen = props.menuIsOpen;
|
|
20930
|
-
return jsx("div", _extends$
|
|
20924
|
+
return jsx("div", _extends$o({
|
|
20931
20925
|
ref: innerRef,
|
|
20932
20926
|
css: getStyles('control', props),
|
|
20933
20927
|
className: cx({
|
|
@@ -20959,12 +20953,12 @@ var Group = function Group(props) {
|
|
|
20959
20953
|
label = props.label,
|
|
20960
20954
|
theme = props.theme,
|
|
20961
20955
|
selectProps = props.selectProps;
|
|
20962
|
-
return jsx("div", _extends$
|
|
20956
|
+
return jsx("div", _extends$o({
|
|
20963
20957
|
css: getStyles('group', props),
|
|
20964
20958
|
className: cx({
|
|
20965
20959
|
group: true
|
|
20966
20960
|
}, className)
|
|
20967
|
-
}, innerProps), jsx(Heading, _extends$
|
|
20961
|
+
}, innerProps), jsx(Heading, _extends$o({}, headingProps, {
|
|
20968
20962
|
selectProps: selectProps,
|
|
20969
20963
|
theme: theme,
|
|
20970
20964
|
getStyles: getStyles,
|
|
@@ -20996,7 +20990,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
20996
20990
|
_cleanCommonProps.data;
|
|
20997
20991
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
20998
20992
|
|
|
20999
|
-
return jsx("div", _extends$
|
|
20993
|
+
return jsx("div", _extends$o({
|
|
21000
20994
|
css: getStyles('groupHeading', props),
|
|
21001
20995
|
className: cx({
|
|
21002
20996
|
'group-heading': true
|
|
@@ -21072,7 +21066,7 @@ var Input = function Input(props) {
|
|
|
21072
21066
|
}, className),
|
|
21073
21067
|
css: getStyles('input', props),
|
|
21074
21068
|
"data-value": value || ''
|
|
21075
|
-
}, jsx("input", _extends$
|
|
21069
|
+
}, jsx("input", _extends$o({
|
|
21076
21070
|
className: cx({
|
|
21077
21071
|
input: true
|
|
21078
21072
|
}, inputClassName),
|
|
@@ -21142,7 +21136,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
21142
21136
|
function MultiValueRemove$1(_ref5) {
|
|
21143
21137
|
var children = _ref5.children,
|
|
21144
21138
|
innerProps = _ref5.innerProps;
|
|
21145
|
-
return jsx("div", _extends$
|
|
21139
|
+
return jsx("div", _extends$o({
|
|
21146
21140
|
role: "button"
|
|
21147
21141
|
}, innerProps), children || jsx(CrossIcon, {
|
|
21148
21142
|
size: 14
|
|
@@ -21231,7 +21225,7 @@ var Option$1 = function Option(props) {
|
|
|
21231
21225
|
isSelected = props.isSelected,
|
|
21232
21226
|
innerRef = props.innerRef,
|
|
21233
21227
|
innerProps = props.innerProps;
|
|
21234
|
-
return jsx("div", _extends$
|
|
21228
|
+
return jsx("div", _extends$o({
|
|
21235
21229
|
css: getStyles('option', props),
|
|
21236
21230
|
className: cx({
|
|
21237
21231
|
option: true,
|
|
@@ -21263,7 +21257,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
21263
21257
|
cx = props.cx,
|
|
21264
21258
|
getStyles = props.getStyles,
|
|
21265
21259
|
innerProps = props.innerProps;
|
|
21266
|
-
return jsx("div", _extends$
|
|
21260
|
+
return jsx("div", _extends$o({
|
|
21267
21261
|
css: getStyles('placeholder', props),
|
|
21268
21262
|
className: cx({
|
|
21269
21263
|
placeholder: true
|
|
@@ -21296,7 +21290,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
21296
21290
|
getStyles = props.getStyles,
|
|
21297
21291
|
isDisabled = props.isDisabled,
|
|
21298
21292
|
innerProps = props.innerProps;
|
|
21299
|
-
return jsx("div", _extends$
|
|
21293
|
+
return jsx("div", _extends$o({
|
|
21300
21294
|
css: getStyles('singleValue', props),
|
|
21301
21295
|
className: cx({
|
|
21302
21296
|
'single-value': true,
|
|
@@ -21544,7 +21538,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
21544
21538
|
};
|
|
21545
21539
|
|
|
21546
21540
|
var A11yText = function A11yText(props) {
|
|
21547
|
-
return jsx("span", _extends$
|
|
21541
|
+
return jsx("span", _extends$o({
|
|
21548
21542
|
css: _ref
|
|
21549
21543
|
}, props));
|
|
21550
21544
|
};
|
|
@@ -22080,7 +22074,7 @@ function DummyInput(_ref) {
|
|
|
22080
22074
|
var innerRef = _ref.innerRef,
|
|
22081
22075
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22082
22076
|
|
|
22083
|
-
return jsx("input", _extends$
|
|
22077
|
+
return jsx("input", _extends$o({
|
|
22084
22078
|
ref: innerRef
|
|
22085
22079
|
}, props, {
|
|
22086
22080
|
css: /*#__PURE__*/css$2({
|
|
@@ -23715,7 +23709,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23715
23709
|
|
|
23716
23710
|
if (!isSearchable) {
|
|
23717
23711
|
// use a dummy input to maintain focus/blur functionality
|
|
23718
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
23712
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$o({
|
|
23719
23713
|
id: id,
|
|
23720
23714
|
innerRef: this.getInputRef,
|
|
23721
23715
|
onBlur: this.onInputBlur,
|
|
@@ -23729,7 +23723,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23729
23723
|
}, ariaAttributes));
|
|
23730
23724
|
}
|
|
23731
23725
|
|
|
23732
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
23726
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$o({}, commonProps, {
|
|
23733
23727
|
autoCapitalize: "none",
|
|
23734
23728
|
autoComplete: "off",
|
|
23735
23729
|
autoCorrect: "off",
|
|
@@ -23773,7 +23767,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23773
23767
|
isFocused = _this$state5.isFocused;
|
|
23774
23768
|
|
|
23775
23769
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
23776
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
23770
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$o({}, commonProps, {
|
|
23777
23771
|
key: "placeholder",
|
|
23778
23772
|
isDisabled: isDisabled,
|
|
23779
23773
|
isFocused: isFocused,
|
|
@@ -23787,7 +23781,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23787
23781
|
return selectValue.map(function (opt, index) {
|
|
23788
23782
|
var isOptionFocused = opt === focusedValue;
|
|
23789
23783
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
23790
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
23784
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$o({}, commonProps, {
|
|
23791
23785
|
components: {
|
|
23792
23786
|
Container: MultiValueContainer,
|
|
23793
23787
|
Label: MultiValueLabel,
|
|
@@ -23819,7 +23813,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23819
23813
|
}
|
|
23820
23814
|
|
|
23821
23815
|
var singleValue = selectValue[0];
|
|
23822
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
23816
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$o({}, commonProps, {
|
|
23823
23817
|
data: singleValue,
|
|
23824
23818
|
isDisabled: isDisabled
|
|
23825
23819
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -23845,7 +23839,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23845
23839
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
23846
23840
|
'aria-hidden': 'true'
|
|
23847
23841
|
};
|
|
23848
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
23842
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$o({}, commonProps, {
|
|
23849
23843
|
innerProps: innerProps,
|
|
23850
23844
|
isFocused: isFocused
|
|
23851
23845
|
}));
|
|
@@ -23865,7 +23859,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23865
23859
|
var innerProps = {
|
|
23866
23860
|
'aria-hidden': 'true'
|
|
23867
23861
|
};
|
|
23868
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
23862
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$o({}, commonProps, {
|
|
23869
23863
|
innerProps: innerProps,
|
|
23870
23864
|
isDisabled: isDisabled,
|
|
23871
23865
|
isFocused: isFocused
|
|
@@ -23883,7 +23877,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23883
23877
|
var commonProps = this.commonProps;
|
|
23884
23878
|
var isDisabled = this.props.isDisabled;
|
|
23885
23879
|
var isFocused = this.state.isFocused;
|
|
23886
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
23880
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$o({}, commonProps, {
|
|
23887
23881
|
isDisabled: isDisabled,
|
|
23888
23882
|
isFocused: isFocused
|
|
23889
23883
|
}));
|
|
@@ -23903,7 +23897,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23903
23897
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
23904
23898
|
'aria-hidden': 'true'
|
|
23905
23899
|
};
|
|
23906
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
23900
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$o({}, commonProps, {
|
|
23907
23901
|
innerProps: innerProps,
|
|
23908
23902
|
isDisabled: isDisabled,
|
|
23909
23903
|
isFocused: isFocused
|
|
@@ -23966,7 +23960,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23966
23960
|
onMouseOver: onHover,
|
|
23967
23961
|
tabIndex: -1
|
|
23968
23962
|
};
|
|
23969
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
23963
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$o({}, commonProps, {
|
|
23970
23964
|
innerProps: innerProps,
|
|
23971
23965
|
data: data,
|
|
23972
23966
|
isDisabled: isDisabled,
|
|
@@ -23990,7 +23984,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23990
23984
|
groupIndex = item.index;
|
|
23991
23985
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
23992
23986
|
var headingId = "".concat(groupId, "-heading");
|
|
23993
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
23987
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$o({}, commonProps, {
|
|
23994
23988
|
key: groupId,
|
|
23995
23989
|
data: _data,
|
|
23996
23990
|
options: options,
|
|
@@ -24029,12 +24023,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24029
24023
|
menuPosition: menuPosition,
|
|
24030
24024
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
24031
24025
|
};
|
|
24032
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
24026
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$o({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
24033
24027
|
var ref = _ref4.ref,
|
|
24034
24028
|
_ref4$placerProps = _ref4.placerProps,
|
|
24035
24029
|
placement = _ref4$placerProps.placement,
|
|
24036
24030
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
24037
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
24031
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$o({}, commonProps, menuPlacementProps, {
|
|
24038
24032
|
innerRef: ref,
|
|
24039
24033
|
innerProps: {
|
|
24040
24034
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -24049,7 +24043,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24049
24043
|
onBottomArrive: onMenuScrollToBottom,
|
|
24050
24044
|
lockEnabled: menuShouldBlockScroll
|
|
24051
24045
|
}, function (scrollTargetRef) {
|
|
24052
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
24046
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$o({}, commonProps, {
|
|
24053
24047
|
innerRef: function innerRef(instance) {
|
|
24054
24048
|
_this4.getMenuListRef(instance);
|
|
24055
24049
|
|
|
@@ -24064,7 +24058,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24064
24058
|
// so we use the same component. the actual portalling logic is forked
|
|
24065
24059
|
// within the component based on `menuPosition`
|
|
24066
24060
|
|
|
24067
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
24061
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$o({}, commonProps, {
|
|
24068
24062
|
appendTo: menuPortalTarget,
|
|
24069
24063
|
controlElement: this.controlRef,
|
|
24070
24064
|
menuPlacement: menuPlacement,
|
|
@@ -24129,7 +24123,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24129
24123
|
isFocused = _this$state6.isFocused,
|
|
24130
24124
|
selectValue = _this$state6.selectValue;
|
|
24131
24125
|
var focusableOptions = this.getFocusableOptions();
|
|
24132
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
24126
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$o({}, commonProps, {
|
|
24133
24127
|
id: this.getElementId('live-region'),
|
|
24134
24128
|
ariaSelection: ariaSelection,
|
|
24135
24129
|
focusedOption: focusedOption,
|
|
@@ -24155,7 +24149,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24155
24149
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
24156
24150
|
var isFocused = this.state.isFocused;
|
|
24157
24151
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
24158
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
24152
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$o({}, commonProps, {
|
|
24159
24153
|
className: className,
|
|
24160
24154
|
innerProps: {
|
|
24161
24155
|
id: id,
|
|
@@ -24163,7 +24157,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24163
24157
|
},
|
|
24164
24158
|
isDisabled: isDisabled,
|
|
24165
24159
|
isFocused: isFocused
|
|
24166
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
24160
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$o({}, commonProps, {
|
|
24167
24161
|
innerRef: this.getControlRef,
|
|
24168
24162
|
innerProps: {
|
|
24169
24163
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -24172,9 +24166,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24172
24166
|
isDisabled: isDisabled,
|
|
24173
24167
|
isFocused: isFocused,
|
|
24174
24168
|
menuIsOpen: menuIsOpen
|
|
24175
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
24169
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$o({}, commonProps, {
|
|
24176
24170
|
isDisabled: isDisabled
|
|
24177
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
24171
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$o({}, commonProps, {
|
|
24178
24172
|
isDisabled: isDisabled
|
|
24179
24173
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
24180
24174
|
}
|
|
@@ -24247,7 +24241,7 @@ Select$1.defaultProps = defaultProps;
|
|
|
24247
24241
|
|
|
24248
24242
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24249
24243
|
var baseSelectProps = useStateManager(props);
|
|
24250
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
24244
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$o({
|
|
24251
24245
|
ref: ref
|
|
24252
24246
|
}, baseSelectProps));
|
|
24253
24247
|
});
|
|
@@ -24255,9 +24249,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24255
24249
|
var ReactSelect = StateManagedSelect;
|
|
24256
24250
|
|
|
24257
24251
|
var _g$6;
|
|
24258
|
-
function _extends$
|
|
24252
|
+
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
24259
24253
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
24260
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24254
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
24261
24255
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24262
24256
|
viewBox: "0 0 28 28",
|
|
24263
24257
|
width: "1em",
|
|
@@ -24278,15 +24272,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
24278
24272
|
}))));
|
|
24279
24273
|
};
|
|
24280
24274
|
|
|
24281
|
-
var _path$
|
|
24282
|
-
function _extends$
|
|
24275
|
+
var _path$e;
|
|
24276
|
+
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
24283
24277
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
24284
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24278
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
24285
24279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24286
24280
|
width: "1em",
|
|
24287
24281
|
height: "1em",
|
|
24288
24282
|
viewBox: "0 0 24 24"
|
|
24289
|
-
}, props), _path$
|
|
24283
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24290
24284
|
stroke: "#06C",
|
|
24291
24285
|
strokeLinecap: "round",
|
|
24292
24286
|
strokeLinejoin: "round",
|
|
@@ -24298,9 +24292,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
24298
24292
|
};
|
|
24299
24293
|
|
|
24300
24294
|
var _g$5;
|
|
24301
|
-
function _extends$
|
|
24295
|
+
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
24302
24296
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
24303
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24297
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
24304
24298
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24305
24299
|
width: "1em",
|
|
24306
24300
|
height: "1em",
|
|
@@ -24629,6 +24623,7 @@ Valid States of Checkbox:
|
|
|
24629
24623
|
5. disabled: false, checked: true, value: INTERMIDIATE
|
|
24630
24624
|
6. disabled: false, checked: true, value: CHECKED
|
|
24631
24625
|
*/
|
|
24626
|
+
// TODO: Associate label with input element
|
|
24632
24627
|
var Checkbox$1 = /** @class */ (function (_super) {
|
|
24633
24628
|
__extends$1(Checkbox, _super);
|
|
24634
24629
|
function Checkbox() {
|
|
@@ -24643,9 +24638,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
|
|
|
24643
24638
|
}(React.Component));
|
|
24644
24639
|
|
|
24645
24640
|
var _g$4;
|
|
24646
|
-
function _extends$
|
|
24641
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
24647
24642
|
var SvgIcSearch = function SvgIcSearch(props) {
|
|
24648
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24643
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
24649
24644
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24650
24645
|
viewBox: "0 0 24 24",
|
|
24651
24646
|
width: "1em",
|
|
@@ -24662,9 +24657,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
|
|
|
24662
24657
|
};
|
|
24663
24658
|
|
|
24664
24659
|
var _g$3;
|
|
24665
|
-
function _extends$
|
|
24660
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
24666
24661
|
var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
24667
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24662
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
24668
24663
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24669
24664
|
width: "1em",
|
|
24670
24665
|
height: "1em",
|
|
@@ -24686,7 +24681,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
|
24686
24681
|
}))));
|
|
24687
24682
|
};
|
|
24688
24683
|
|
|
24689
|
-
var css_248z$5 = ".search-bar:focus, .search-bar:focus-within {\n outline: none;\n border: solid 1px var(--B500);\n}\n.search-bar__input:focus, .search-bar__input:focus-visible {\n border: none;\n outline: none;\n}\n.search-bar__icon {\n z-index: 1;\n top: 50%;\n left: 8px;\n transform: translateY(-50%);\n}\n.search-bar__clear-button {\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}";
|
|
24684
|
+
var css_248z$5 = ".search-bar:focus, .search-bar:focus-within {\n outline: none;\n border: solid 1px var(--B500) !important;\n}\n.search-bar__input:focus, .search-bar__input:focus-visible {\n border: none;\n outline: none;\n}\n.search-bar__icon {\n z-index: 1;\n top: 50%;\n left: 8px;\n transform: translateY(-50%);\n}\n.search-bar__clear-button {\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}";
|
|
24690
24685
|
styleInject(css_248z$5);
|
|
24691
24686
|
|
|
24692
24687
|
/**
|
|
@@ -24768,16 +24763,16 @@ var SearchBar = function (_a) {
|
|
|
24768
24763
|
return (jsxRuntime.jsx("div", __assign({ className: containerClassName }, { children: jsxRuntime.jsxs("div", __assign({ className: "search-bar bc-n50 focus-within-border-b5 dc__hover-border-n300 dc__block w-100 min-w-200 dc__position-rel en-2 bw-1 br-4 h-32" }, { children: [jsxRuntime.jsx(SvgIcSearch, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-16" }), jsxRuntime.jsx("input", __assign({ placeholder: "Search", "data-testid": "search-bar", type: "text" }, inputProps, { defaultValue: initialSearchText, className: "search-bar__input bc-n50 dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ".concat(showClearButton ? 'pr-30' : 'pr-10'), onChange: handleChange, onKeyDown: handleKeyDown, ref: inputRef })), showClearButton && (jsxRuntime.jsx("button", __assign({ className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5", type: "button", onClick: clearSearch, "aria-label": "Clear search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-16 icon-n4 dc__vertical-align-middle" }) })))] })) })));
|
|
24769
24764
|
};
|
|
24770
24765
|
|
|
24771
|
-
var _path$
|
|
24772
|
-
function _extends$
|
|
24766
|
+
var _path$d;
|
|
24767
|
+
function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
|
|
24773
24768
|
var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
|
|
24774
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24769
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
24775
24770
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24776
24771
|
width: "1em",
|
|
24777
24772
|
height: "1em",
|
|
24778
24773
|
viewBox: "0 0 12 12",
|
|
24779
24774
|
fill: "none"
|
|
24780
|
-
}, props), _path$
|
|
24775
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24781
24776
|
d: "M4.125 8.5 6 10.75 7.875 8.5m-3.75-5L6 1.25 7.875 3.5",
|
|
24782
24777
|
stroke: "#3B444C",
|
|
24783
24778
|
strokeWidth: 1.5,
|
|
@@ -24786,16 +24781,16 @@ var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
|
|
|
24786
24781
|
})));
|
|
24787
24782
|
};
|
|
24788
24783
|
|
|
24789
|
-
var _path$
|
|
24790
|
-
function _extends$
|
|
24784
|
+
var _path$c;
|
|
24785
|
+
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
24791
24786
|
var SvgIcSortArrowDown = function SvgIcSortArrowDown(props) {
|
|
24792
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24787
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
24793
24788
|
width: "1em",
|
|
24794
24789
|
height: "1em",
|
|
24795
24790
|
viewBox: "0 0 12 12",
|
|
24796
24791
|
fill: "none",
|
|
24797
24792
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24798
|
-
}, props), _path$
|
|
24793
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24799
24794
|
d: "M3.5 7.5 6 10m0 0 2.5-2.5M6 10V2",
|
|
24800
24795
|
stroke: "#596168",
|
|
24801
24796
|
strokeWidth: 1.5,
|
|
@@ -24959,9 +24954,9 @@ exports.ConsequenceAction = void 0;
|
|
|
24959
24954
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
24960
24955
|
|
|
24961
24956
|
var _g$2;
|
|
24962
|
-
function _extends$
|
|
24957
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
24963
24958
|
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
24964
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24959
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
24965
24960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24966
24961
|
width: "1em",
|
|
24967
24962
|
height: "1em",
|
|
@@ -25040,16 +25035,16 @@ function DeleteComponent(_a) {
|
|
|
25040
25035
|
return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
|
|
25041
25036
|
}
|
|
25042
25037
|
|
|
25043
|
-
var _path$
|
|
25044
|
-
function _extends$
|
|
25038
|
+
var _path$b;
|
|
25039
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
25045
25040
|
var SvgIcPencil = function SvgIcPencil(props) {
|
|
25046
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25041
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
25047
25042
|
width: "1em",
|
|
25048
25043
|
height: "1em",
|
|
25049
25044
|
viewBox: "0 0 20 20",
|
|
25050
25045
|
fill: "none",
|
|
25051
25046
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25052
|
-
}, props), _path$
|
|
25047
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25053
25048
|
d: "M10.625 5 15 9.375m-7.5 7.5H3.75a.625.625 0 0 1-.625-.625v-3.491a.625.625 0 0 1 .183-.442l9.375-9.375a.625.625 0 0 1 .884 0l3.491 3.491a.625.625 0 0 1 0 .884L7.5 16.875Z",
|
|
25054
25049
|
stroke: "#596168",
|
|
25055
25050
|
strokeWidth: 1.5,
|
|
@@ -25058,19 +25053,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
|
|
|
25058
25053
|
})));
|
|
25059
25054
|
};
|
|
25060
25055
|
|
|
25061
|
-
var _path$
|
|
25062
|
-
function _extends$
|
|
25056
|
+
var _path$a, _path2$1, _path3;
|
|
25057
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
25063
25058
|
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
25064
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25059
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
25065
25060
|
width: "1em",
|
|
25066
25061
|
height: "1em",
|
|
25067
25062
|
viewBox: "0 0 12 12",
|
|
25068
25063
|
fill: "none",
|
|
25069
25064
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25070
|
-
}, props), _path$
|
|
25065
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25071
25066
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
25072
25067
|
fill: "#767D84"
|
|
25073
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25068
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25074
25069
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
25075
25070
|
stroke: "#596168",
|
|
25076
25071
|
strokeWidth: 1.5,
|
|
@@ -25085,15 +25080,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
|
25085
25080
|
})));
|
|
25086
25081
|
};
|
|
25087
25082
|
|
|
25088
|
-
var _path$
|
|
25089
|
-
function _extends$
|
|
25083
|
+
var _path$9;
|
|
25084
|
+
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
25090
25085
|
var SvgIcMinus = function SvgIcMinus(props) {
|
|
25091
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25086
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
25092
25087
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25093
25088
|
width: "1em",
|
|
25094
25089
|
height: "1em",
|
|
25095
25090
|
viewBox: "0 0 14 14"
|
|
25096
|
-
}, props), _path$
|
|
25091
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25097
25092
|
fill: "#959BA1",
|
|
25098
25093
|
className: "ic-minus_svg__fill-color",
|
|
25099
25094
|
fillRule: "evenodd",
|
|
@@ -25102,9 +25097,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
|
|
|
25102
25097
|
};
|
|
25103
25098
|
|
|
25104
25099
|
var _g$1;
|
|
25105
|
-
function _extends$
|
|
25100
|
+
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
25106
25101
|
var SvgIcWarning = function SvgIcWarning(props) {
|
|
25107
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25102
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
25108
25103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25109
25104
|
width: "1em",
|
|
25110
25105
|
height: "1em",
|
|
@@ -25124,9 +25119,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
|
|
|
25124
25119
|
};
|
|
25125
25120
|
|
|
25126
25121
|
var _g;
|
|
25127
|
-
function _extends$
|
|
25122
|
+
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
25128
25123
|
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
25129
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25124
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
25130
25125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25131
25126
|
width: "1em",
|
|
25132
25127
|
height: "1em",
|
|
@@ -25143,16 +25138,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
|
25143
25138
|
}))));
|
|
25144
25139
|
};
|
|
25145
25140
|
|
|
25146
|
-
var _path$
|
|
25147
|
-
function _extends$
|
|
25141
|
+
var _path$8;
|
|
25142
|
+
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
25148
25143
|
var SvgIcEnter = function SvgIcEnter(props) {
|
|
25149
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25144
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
25150
25145
|
width: "1em",
|
|
25151
25146
|
height: "1em",
|
|
25152
25147
|
viewBox: "0 0 16 16",
|
|
25153
25148
|
fill: "none",
|
|
25154
25149
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25155
|
-
}, props), _path$
|
|
25150
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25156
25151
|
d: "M12.667 4a.667.667 0 0 0-.667.667v2.666a.667.667 0 0 1-.667.667H4.94l.867-.86a.67.67 0 1 0-.947-.947l-2 2a.667.667 0 0 0-.14.22.667.667 0 0 0 0 .507c.032.082.08.157.14.22l2 2a.666.666 0 0 0 .947 0 .667.667 0 0 0 0-.947l-.867-.86h6.393a2 2 0 0 0 2-2V4.667A.667.667 0 0 0 12.667 4Z",
|
|
25157
25152
|
fill: "#3B444C"
|
|
25158
25153
|
})));
|
|
@@ -25558,15 +25553,15 @@ function Grid(_a) {
|
|
|
25558
25553
|
return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
|
|
25559
25554
|
}
|
|
25560
25555
|
|
|
25561
|
-
var _path$
|
|
25562
|
-
function _extends$
|
|
25556
|
+
var _path$7;
|
|
25557
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
25563
25558
|
var SvgIcCopy = function SvgIcCopy(props) {
|
|
25564
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25559
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
25565
25560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25566
25561
|
width: "1em",
|
|
25567
25562
|
height: "1em",
|
|
25568
25563
|
viewBox: "0 0 20 20"
|
|
25569
|
-
}, props), _path$
|
|
25564
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25570
25565
|
fill: "#767D84",
|
|
25571
25566
|
fillRule: "evenodd",
|
|
25572
25567
|
d: "M15.833 6.917a2.5 2.5 0 0 1 2.5 2.5v6.416a2.5 2.5 0 0 1-2.5 2.5H9.417a2.5 2.5 0 0 1-2.5-2.5V9.417a2.5 2.5 0 0 1 2.5-2.5zm0 1.666H9.417a.833.833 0 0 0-.834.834v6.416c0 .46.373.834.834.834h6.416c.46 0 .834-.373.834-.834V9.417a.833.833 0 0 0-.834-.834zM10.75 1.667c1.24 0 2.256.968 2.33 2.19l.003.143v.75a.833.833 0 0 1-1.66.097l-.006-.097V4c0-.34-.255-.62-.583-.661l-.084-.006H4c-.34 0-.62.255-.661.583L3.333 4v6.75c0 .34.255.62.583.661l.084.006h.75a.833.833 0 0 1 .097 1.66l-.097.006H4a2.333 2.333 0 0 1-2.33-2.19l-.003-.143V4c0-1.24.968-2.256 2.19-2.33L4 1.668h6.75z"
|
|
@@ -25691,7 +25686,7 @@ var PAGE_SIZE = URL_FILTER_KEYS.PAGE_SIZE, PAGE_NUMBER = URL_FILTER_KEYS.PAGE_NU
|
|
|
25691
25686
|
*
|
|
25692
25687
|
*/
|
|
25693
25688
|
var useUrlFilters = function (_a) {
|
|
25694
|
-
var _b = _a === void 0 ? {} : _a, initialSortKey = _b.initialSortKey
|
|
25689
|
+
var _b = _a === void 0 ? {} : _a, initialSortKey = _b.initialSortKey;
|
|
25695
25690
|
var location = reactRouterDom.useLocation();
|
|
25696
25691
|
var history = reactRouterDom.useHistory();
|
|
25697
25692
|
var searchParams = new URLSearchParams(location.search);
|
|
@@ -25704,7 +25699,6 @@ var useUrlFilters = function (_a) {
|
|
|
25704
25699
|
var sortByKey = (_sortBy || initialSortKey || '');
|
|
25705
25700
|
// Fallback to ascending order
|
|
25706
25701
|
var sortByOrder = Object.values(exports.SortingOrder).includes(_sortOrder) ? _sortOrder : exports.SortingOrder.ASC;
|
|
25707
|
-
var _parsedParams = parseSearchParams ? parseSearchParams(searchParams) : {};
|
|
25708
25702
|
return {
|
|
25709
25703
|
pageSize: Number(_pageSize) || DEFAULT_BASE_PAGE_SIZE,
|
|
25710
25704
|
pageNumber: Number(_pageNumber) || DEFAULT_PAGE_NUMBER,
|
|
@@ -25712,9 +25706,8 @@ var useUrlFilters = function (_a) {
|
|
|
25712
25706
|
sortBy: sortByKey,
|
|
25713
25707
|
// sort order should only be applied if the key is available
|
|
25714
25708
|
sortOrder: (sortByKey ? sortByOrder : ''),
|
|
25715
|
-
parsedParams: _parsedParams,
|
|
25716
25709
|
};
|
|
25717
|
-
}, [searchParams]), pageSize = _c.pageSize, pageNumber = _c.pageNumber, searchKey = _c.searchKey, sortBy = _c.sortBy, sortOrder = _c.sortOrder
|
|
25710
|
+
}, [searchParams]), pageSize = _c.pageSize, pageNumber = _c.pageNumber, searchKey = _c.searchKey, sortBy = _c.sortBy, sortOrder = _c.sortOrder;
|
|
25718
25711
|
/**
|
|
25719
25712
|
* Used for getting the required result from the API
|
|
25720
25713
|
*/
|
|
@@ -25756,26 +25749,23 @@ var useUrlFilters = function (_a) {
|
|
|
25756
25749
|
_resetPageNumber();
|
|
25757
25750
|
};
|
|
25758
25751
|
var clearFilters = function () {
|
|
25759
|
-
|
|
25760
|
-
|
|
25761
|
-
var updateSearchParams = function (paramsToSerialize) {
|
|
25762
|
-
Object.keys(paramsToSerialize).forEach(function (key) {
|
|
25763
|
-
if (paramsToSerialize[key]) {
|
|
25764
|
-
if (Array.isArray(paramsToSerialize[key])) {
|
|
25765
|
-
searchParams.delete(key);
|
|
25766
|
-
paramsToSerialize[key].forEach(function (val) {
|
|
25767
|
-
searchParams.append(key, val);
|
|
25768
|
-
});
|
|
25769
|
-
}
|
|
25770
|
-
else {
|
|
25771
|
-
searchParams.set(key, paramsToSerialize[key]);
|
|
25772
|
-
}
|
|
25773
|
-
}
|
|
25752
|
+
Object.values(URL_FILTER_KEYS).forEach(function (key) {
|
|
25753
|
+
searchParams.delete(key);
|
|
25774
25754
|
});
|
|
25775
|
-
|
|
25776
|
-
|
|
25755
|
+
history.replace({ search: searchParams.toString() });
|
|
25756
|
+
};
|
|
25757
|
+
return {
|
|
25758
|
+
pageSize: pageSize,
|
|
25759
|
+
changePage: changePage,
|
|
25760
|
+
changePageSize: changePageSize,
|
|
25761
|
+
searchKey: searchKey,
|
|
25762
|
+
handleSearch: handleSearch,
|
|
25763
|
+
offset: offset,
|
|
25764
|
+
sortBy: sortBy,
|
|
25765
|
+
sortOrder: sortOrder,
|
|
25766
|
+
handleSorting: handleSorting,
|
|
25767
|
+
clearFilters: clearFilters,
|
|
25777
25768
|
};
|
|
25778
|
-
return __assign(__assign({ pageSize: pageSize, changePage: changePage, changePageSize: changePageSize, searchKey: searchKey, handleSearch: handleSearch, offset: offset, sortBy: sortBy, sortOrder: sortOrder, handleSorting: handleSorting, clearFilters: clearFilters }, parsedParams), { updateSearchParams: updateSearchParams });
|
|
25779
25769
|
};
|
|
25780
25770
|
|
|
25781
25771
|
var StatusConstants = {
|
|
@@ -28461,9 +28451,9 @@ var translateString = function (stringToTranslate, params) {
|
|
|
28461
28451
|
return utils.englishStringTranslator(stringToTranslate, params);
|
|
28462
28452
|
}
|
|
28463
28453
|
};
|
|
28464
|
-
var getCommonSelectStyle = function (styleOverrides) {
|
|
28454
|
+
var getCommonSelectStyle$1 = function (styleOverrides) {
|
|
28465
28455
|
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
28466
|
-
return __assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0 })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base, state) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400', color: state.selectProps.menuIsOpen ? 'var(--N500)' : base.color })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, multiValue: function (base, state) {
|
|
28456
|
+
return __assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0, cursor: 'pointer' })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px', cursor: 'pointer' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base, state) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400', color: state.selectProps.menuIsOpen ? 'var(--N500)' : base.color })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, multiValue: function (base, state) {
|
|
28467
28457
|
return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
|
|
28468
28458
|
} }, styleOverrides);
|
|
28469
28459
|
};
|
|
@@ -28513,15 +28503,15 @@ var getInferredTypeFromValueType = function (value) {
|
|
|
28513
28503
|
}
|
|
28514
28504
|
};
|
|
28515
28505
|
|
|
28516
|
-
var _path$
|
|
28517
|
-
function _extends$
|
|
28506
|
+
var _path$6;
|
|
28507
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
28518
28508
|
var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
28519
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28509
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
28520
28510
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28521
28511
|
width: "1em",
|
|
28522
28512
|
height: "1em",
|
|
28523
28513
|
viewBox: "0 0 24 24"
|
|
28524
|
-
}, props), _path$
|
|
28514
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28525
28515
|
fill: "#999",
|
|
28526
28516
|
className: "ic-chevron-down_svg__fill-color",
|
|
28527
28517
|
fillRule: "nonzero",
|
|
@@ -28529,7 +28519,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
|
28529
28519
|
})));
|
|
28530
28520
|
};
|
|
28531
28521
|
|
|
28532
|
-
var commonStyles = getCommonSelectStyle();
|
|
28522
|
+
var commonStyles = getCommonSelectStyle$1();
|
|
28533
28523
|
var MenuList = function (_a) {
|
|
28534
28524
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
28535
28525
|
return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
|
|
@@ -28581,9 +28571,9 @@ var validator = RJSFValidator.default;
|
|
|
28581
28571
|
var RJSFForm = function (props) { return (jsxRuntime.jsx(Form, __assign({ noHtml5Validate: true, showErrorList: false, autoComplete: "off" }, props, { validator: validator, templates: __assign(__assign({}, templates), props.templates), widgets: __assign(__assign({}, widgets), props.widgets), translateString: translateString }))); };
|
|
28582
28572
|
|
|
28583
28573
|
var _style, _rect$2;
|
|
28584
|
-
function _extends$
|
|
28574
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
28585
28575
|
var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
|
|
28586
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28576
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
28587
28577
|
width: "1em",
|
|
28588
28578
|
height: "1em",
|
|
28589
28579
|
viewBox: "0 0 100 100",
|
|
@@ -28718,8 +28708,9 @@ var handleAddCD = function (_a) {
|
|
|
28718
28708
|
handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
|
|
28719
28709
|
};
|
|
28720
28710
|
|
|
28711
|
+
// TODO: label association with input
|
|
28721
28712
|
function CustomInput(_a) {
|
|
28722
|
-
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ?
|
|
28713
|
+
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 0 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo, _r = _a.inputWrapClassName, inputWrapClassName = _r === void 0 ? '' : _r, _s = _a.inputProps, inputProps = _s === void 0 ? {} : _s;
|
|
28723
28714
|
function handleError(error) {
|
|
28724
28715
|
if (!Array.isArray(error)) {
|
|
28725
28716
|
return [error];
|
|
@@ -28850,23 +28841,26 @@ function DraggableWrapper(_a) {
|
|
|
28850
28841
|
y: data.y,
|
|
28851
28842
|
});
|
|
28852
28843
|
}
|
|
28853
|
-
return (
|
|
28844
|
+
return (
|
|
28845
|
+
// Since we are using position fixed so we need to disable click on the div so that it does not interfere with the click of other elements
|
|
28846
|
+
jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
|
|
28854
28847
|
zIndex: zIndex,
|
|
28855
28848
|
} }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
|
|
28856
28849
|
zIndex: zIndex,
|
|
28850
|
+
pointerEvents: 'auto',
|
|
28857
28851
|
} }, { children: children })) })) })));
|
|
28858
28852
|
}
|
|
28859
28853
|
|
|
28860
|
-
var _path$
|
|
28861
|
-
function _extends$
|
|
28854
|
+
var _path$5;
|
|
28855
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
28862
28856
|
var SvgIcDrag = function SvgIcDrag(props) {
|
|
28863
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28857
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
28864
28858
|
width: "1em",
|
|
28865
28859
|
height: "1em",
|
|
28866
28860
|
viewBox: "0 0 16 16",
|
|
28867
28861
|
fill: "none",
|
|
28868
28862
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28869
|
-
}, props), _path$
|
|
28863
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28870
28864
|
d: "M10.334 9.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 9.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM10.334 5.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 5.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM10.334 13.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 13.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
|
|
28871
28865
|
fill: "#596168"
|
|
28872
28866
|
})));
|
|
@@ -28988,23 +28982,438 @@ var Pagination = function (_a) {
|
|
|
28988
28982
|
jsxRuntime.jsxs("div", __assign({ className: rootClassName || '' }, { children: [jsxRuntime.jsxs("div", __assign({ className: "page-number" }, { children: [offset + 1, " - ", lastPageNo, " of ", size] })), jsxRuntime.jsxs("ul", __assign({ className: "pagination" }, { children: [jsxRuntime.jsx("li", __assign({ className: "page" }, { children: jsxRuntime.jsx("button", __assign({ className: "page__button page__button--icon", disabled: !pageNoIndex, onClick: selectPreviousPage, type: "button", "aria-label": "Previous page" }, { children: jsxRuntime.jsx("span", __assign({ className: "left-icon" }, { children: jsxRuntime.jsx("i", { className: "fa fa-chevron-left" }) })) })) })), visiblePages.map(function (page) { return (jsxRuntime.jsx(PageValueItem, { value: page.value, isSelected: page.selected, selectPage: selectPage }, page.value)); }), jsxRuntime.jsx("li", __assign({ className: "page" }, { children: jsxRuntime.jsx("button", __assign({ className: "page__button page__button--icon", disabled: pageNoIndex === pages.length - 1, onClick: selectNextPage, type: "button", "aria-label": "Next page" }, { children: jsxRuntime.jsx("span", __assign({ className: "left-icon" }, { children: jsxRuntime.jsx("i", { className: "fa fa-chevron-right" }) })) })) }))] })), !isPageSizeFix && (jsxRuntime.jsxs("div", __assign({ className: "select" }, { children: [jsxRuntime.jsx("span", __assign({ className: "select__placeholder" }, { children: "Rows per page" })), jsxRuntime.jsx(PageSizeSelector, { pageSizeOptions: pageSizeOptions, pageSize: pageSize, changePageSize: changePageSize })] })))] })));
|
|
28989
28983
|
};
|
|
28990
28984
|
|
|
28985
|
+
var _path$4, _path2;
|
|
28986
|
+
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
28987
|
+
var SvgIcCpu = function SvgIcCpu(props) {
|
|
28988
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
28989
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28990
|
+
width: "1em",
|
|
28991
|
+
height: "1em",
|
|
28992
|
+
viewBox: "0 0 20 20",
|
|
28993
|
+
fill: "none"
|
|
28994
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28995
|
+
d: "M12.5 5.625h-5m5 2.5h-5m8.125-5v13.75c0 .345-.28.625-.625.625H5a.625.625 0 0 1-.625-.625V3.125c0-.345.28-.625.625-.625h10c.345 0 .625.28.625.625Z",
|
|
28996
|
+
stroke: "#596168",
|
|
28997
|
+
strokeWidth: 1.5,
|
|
28998
|
+
strokeLinecap: "round",
|
|
28999
|
+
strokeLinejoin: "round"
|
|
29000
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29001
|
+
d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
|
|
29002
|
+
fill: "#596168"
|
|
29003
|
+
})));
|
|
29004
|
+
};
|
|
29005
|
+
|
|
29006
|
+
var _path$3;
|
|
29007
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
29008
|
+
var SvgIcMemory = function SvgIcMemory(props) {
|
|
29009
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
29010
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29011
|
+
width: "1em",
|
|
29012
|
+
height: "1em",
|
|
29013
|
+
viewBox: "0 0 20 20",
|
|
29014
|
+
fill: "none"
|
|
29015
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29016
|
+
d: "M16.25 8.125h1.875m-1.875 3.75h1.875m-16.25-3.75H3.75m-1.875 3.75H3.75m8.125 4.375v1.875m-3.75-1.875v1.875m3.75-16.25V3.75m-3.75-1.875V3.75m-.313 4.063h4.375v4.375H7.814V7.811ZM4.376 3.75h11.25c.345 0 .625.28.625.625v11.25c0 .345-.28.625-.625.625H4.375a.625.625 0 0 1-.625-.625V4.375c0-.345.28-.625.625-.625Z",
|
|
29017
|
+
stroke: "#596168",
|
|
29018
|
+
strokeWidth: 1.5,
|
|
29019
|
+
strokeLinecap: "round",
|
|
29020
|
+
strokeLinejoin: "round"
|
|
29021
|
+
})));
|
|
29022
|
+
};
|
|
29023
|
+
|
|
29024
|
+
var _path$2;
|
|
29025
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
29026
|
+
var SvgIcTimer = function SvgIcTimer(props) {
|
|
29027
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
29028
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29029
|
+
width: "1em",
|
|
29030
|
+
height: "1em",
|
|
29031
|
+
viewBox: "0 0 20 20",
|
|
29032
|
+
fill: "none"
|
|
29033
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29034
|
+
d: "m10 11.041 3.094-3.093M8.125 1.666h3.75m5 9.376a6.875 6.875 0 1 1-13.75 0 6.875 6.875 0 0 1 13.75 0Z",
|
|
29035
|
+
stroke: "#596168",
|
|
29036
|
+
strokeWidth: 1.5,
|
|
29037
|
+
strokeLinecap: "round",
|
|
29038
|
+
strokeLinejoin: "round"
|
|
29039
|
+
})));
|
|
29040
|
+
};
|
|
29041
|
+
|
|
29042
|
+
var _a$2;
|
|
28991
29043
|
/**
|
|
28992
|
-
*
|
|
29044
|
+
* Unique actions that will be dispatched and,
|
|
29045
|
+
* Keeping some values (cpu_limit, etc) in sync with backend
|
|
28993
29046
|
*/
|
|
28994
|
-
exports.
|
|
28995
|
-
(function (
|
|
28996
|
-
|
|
28997
|
-
|
|
28998
|
-
|
|
29047
|
+
exports.BuildInfraConfigTypes = void 0;
|
|
29048
|
+
(function (BuildInfraConfigTypes) {
|
|
29049
|
+
BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
|
|
29050
|
+
BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
|
|
29051
|
+
BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
|
|
29052
|
+
BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
|
|
29053
|
+
BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
|
|
29054
|
+
})(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
|
|
28999
29055
|
/**
|
|
29000
|
-
*
|
|
29056
|
+
* Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
|
|
29001
29057
|
*/
|
|
29002
|
-
exports.
|
|
29003
|
-
(function (
|
|
29004
|
-
|
|
29005
|
-
|
|
29006
|
-
|
|
29007
|
-
|
|
29058
|
+
exports.BuildInfraMetaConfigTypes = void 0;
|
|
29059
|
+
(function (BuildInfraMetaConfigTypes) {
|
|
29060
|
+
BuildInfraMetaConfigTypes["NAME"] = "name";
|
|
29061
|
+
BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
|
|
29062
|
+
})(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
|
|
29063
|
+
/**
|
|
29064
|
+
* Would be used as key for few components and would be appending activate and de_activate actions to it
|
|
29065
|
+
*/
|
|
29066
|
+
exports.BuildInfraLocators = void 0;
|
|
29067
|
+
(function (BuildInfraLocators) {
|
|
29068
|
+
BuildInfraLocators["CPU"] = "cpu";
|
|
29069
|
+
BuildInfraLocators["MEMORY"] = "memory";
|
|
29070
|
+
// This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
|
|
29071
|
+
BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
|
|
29072
|
+
})(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
|
|
29073
|
+
// FIXME: Derive this from BuildInfraLocators
|
|
29074
|
+
// Appending the locators from above
|
|
29075
|
+
exports.BuildInfraInheritActions = void 0;
|
|
29076
|
+
(function (BuildInfraInheritActions) {
|
|
29077
|
+
BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
|
|
29078
|
+
BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
|
|
29079
|
+
BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
|
|
29080
|
+
BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
|
|
29081
|
+
BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_timeout";
|
|
29082
|
+
BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_timeout";
|
|
29083
|
+
})(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
|
|
29084
|
+
var BuildInfraConfigActionMap = (_a$2 = {},
|
|
29085
|
+
_a$2[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
29086
|
+
_a$2[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
|
|
29087
|
+
_a$2[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
|
|
29088
|
+
_a$2[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
|
|
29089
|
+
_a$2[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
|
|
29090
|
+
_a$2);
|
|
29091
|
+
exports.BuildInfraProfileVariants = void 0;
|
|
29092
|
+
(function (BuildInfraProfileVariants) {
|
|
29093
|
+
BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
|
|
29094
|
+
BuildInfraProfileVariants["NORMAL"] = "NORMAL";
|
|
29095
|
+
BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
|
|
29096
|
+
})(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
|
|
29097
|
+
|
|
29098
|
+
var _a$1;
|
|
29099
|
+
var BUILD_INFRA_INPUT_CONSTRAINTS = {
|
|
29100
|
+
// Will not enforce any decimal specification on input field
|
|
29101
|
+
STEP: 'any',
|
|
29102
|
+
MIN: 0,
|
|
29103
|
+
DECIMAL_PLACES: 2,
|
|
29104
|
+
};
|
|
29105
|
+
var BUILD_INFRA_TEXT = {
|
|
29106
|
+
HEADING: 'Build Infra Configuration',
|
|
29107
|
+
EDIT_SUBMIT: 'Save changes',
|
|
29108
|
+
SAVE_SUBMIT: 'Save',
|
|
29109
|
+
EDIT_CANCEL: 'Cancel',
|
|
29110
|
+
EDIT_DEFAULT_TOOLTIP: 'Efficiently control infrastructure settings such as CPU, Memory, and Build timeout for your build pipelines. Streamline resource management to optimise build time and cost effortlessly.',
|
|
29111
|
+
DESCRIPTION_LABEL: 'Description',
|
|
29112
|
+
DESCRIPTION_PLACEHOLDER: 'Enter a description here',
|
|
29113
|
+
PROFILE_LABEL: 'Profile name',
|
|
29114
|
+
PROFILE_PLACEHOLDER: 'Enter a name eg. java/node/small/medium/large',
|
|
29115
|
+
INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
|
|
29116
|
+
SUBMIT_BUTTON_TIPPY: {
|
|
29117
|
+
INVALID_INPUT: 'Valid input is required for all mandatory fields.',
|
|
29118
|
+
REQUEST_IN_PROGRESS: 'Request in progress.',
|
|
29119
|
+
},
|
|
29120
|
+
VALIDATE_REQUEST_LIMIT: {
|
|
29121
|
+
REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
|
|
29122
|
+
CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
|
|
29123
|
+
REQUEST_DECIMAL_PLACES: "Request should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
|
|
29124
|
+
LIMIT_DECIMAL_PLACES: "Limit should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
|
|
29125
|
+
},
|
|
29126
|
+
getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
|
|
29127
|
+
getSubmitSuccessMessage: function (profileName, isEdited) {
|
|
29128
|
+
return "".concat(profileName, " profile is ").concat(isEdited ? 'updated' : 'created');
|
|
29129
|
+
},
|
|
29130
|
+
PROFILE_NOT_FOUND: {
|
|
29131
|
+
title: 'Profile not found',
|
|
29132
|
+
subTitle: 'The profile you are looking for does not exist.',
|
|
29133
|
+
},
|
|
29134
|
+
INVALID_FORM_MESSAGE: 'Valid input is required for all mandatory fields.',
|
|
29135
|
+
};
|
|
29136
|
+
var BUILD_INFRA_BREADCRUMB = {
|
|
29137
|
+
alias: {
|
|
29138
|
+
'global-config': null,
|
|
29139
|
+
'build-infra': {
|
|
29140
|
+
component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
|
|
29141
|
+
linked: false,
|
|
29142
|
+
},
|
|
29143
|
+
},
|
|
29144
|
+
};
|
|
29145
|
+
// TODO: move heading to component itself
|
|
29146
|
+
var BUILD_INFRA_FORM_FIELDS = [
|
|
29147
|
+
{
|
|
29148
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "CPU (Request - Limit)" })),
|
|
29149
|
+
marker: SvgIcCpu,
|
|
29150
|
+
actions: [
|
|
29151
|
+
{
|
|
29152
|
+
actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
|
|
29153
|
+
label: 'Request',
|
|
29154
|
+
placeholder: 'Type CPU request',
|
|
29155
|
+
},
|
|
29156
|
+
{
|
|
29157
|
+
actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
|
|
29158
|
+
label: 'Limit',
|
|
29159
|
+
placeholder: 'Type CPU limit',
|
|
29160
|
+
},
|
|
29161
|
+
],
|
|
29162
|
+
locator: exports.BuildInfraLocators.CPU,
|
|
29163
|
+
},
|
|
29164
|
+
{
|
|
29165
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Memory (Request - Limit)" })),
|
|
29166
|
+
marker: SvgIcMemory,
|
|
29167
|
+
actions: [
|
|
29168
|
+
{
|
|
29169
|
+
actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
|
|
29170
|
+
label: 'Request',
|
|
29171
|
+
placeholder: 'Type memory request',
|
|
29172
|
+
},
|
|
29173
|
+
{
|
|
29174
|
+
actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
|
|
29175
|
+
label: 'Limit',
|
|
29176
|
+
placeholder: 'Type memory limit',
|
|
29177
|
+
},
|
|
29178
|
+
],
|
|
29179
|
+
locator: exports.BuildInfraLocators.MEMORY,
|
|
29180
|
+
},
|
|
29181
|
+
{
|
|
29182
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Build timeout" })),
|
|
29183
|
+
marker: SvgIcTimer,
|
|
29184
|
+
actions: [
|
|
29185
|
+
{
|
|
29186
|
+
actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
|
|
29187
|
+
label: 'Timeout',
|
|
29188
|
+
placeholder: 'Type build timeout',
|
|
29189
|
+
},
|
|
29190
|
+
],
|
|
29191
|
+
locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
29192
|
+
},
|
|
29193
|
+
];
|
|
29194
|
+
var PROFILE_INPUT_ERROR_FIELDS = Object.fromEntries(Object.values(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (value) { return [value, null]; }));
|
|
29195
|
+
// fields required to be filled before submitting the form in create view, since we pre-populate the form with default values so no need in configs
|
|
29196
|
+
var CREATE_MODE_REQUIRED_INPUT_FIELDS = [exports.BuildInfraMetaConfigTypes.NAME];
|
|
29197
|
+
var DEFAULT_PROFILE_NAME = 'default';
|
|
29198
|
+
var CREATE_PROFILE_BASE_VALUE = {
|
|
29199
|
+
name: '',
|
|
29200
|
+
description: '',
|
|
29201
|
+
type: exports.BuildInfraProfileVariants.NORMAL,
|
|
29202
|
+
appCount: 0,
|
|
29203
|
+
};
|
|
29204
|
+
var CREATE_VIEW_CHECKED_CONFIGS = (_a$1 = {},
|
|
29205
|
+
_a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
|
|
29206
|
+
_a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
|
|
29207
|
+
_a$1);
|
|
29208
|
+
var BUILD_INFRA_TEST_IDS = {
|
|
29209
|
+
SUBMIT_BUTTON: 'build-infra-submit-button',
|
|
29210
|
+
CANCEL_BUTTON: 'build-infra-cancel-button',
|
|
29211
|
+
};
|
|
29212
|
+
|
|
29213
|
+
var Descriptor = function (_a) {
|
|
29214
|
+
var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children, tippyInfoText = _a.tippyInfoText, tippyAdditionalContent = _a.tippyAdditionalContent;
|
|
29215
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space dc__align-items-center w-100 ".concat(additionalContainerClasses !== null && additionalContainerClasses !== void 0 ? additionalContainerClasses : '') }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__gap-4" }, { children: [jsxRuntime.jsx(BreadCrumb, { breadcrumbs: breadCrumbs }), jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300 h-100 dc__align-left", placement: "right", Icon: SvgIcHelp, iconClass: "fcv-5", infoText: tippyInfoText !== null && tippyInfoText !== void 0 ? tippyInfoText : BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP, additionalContent: tippyAdditionalContent, heading: BUILD_INFRA_TEXT.HEADING, showCloseButton: true, trigger: "click", interactive: true }, { children: jsxRuntime.jsx("button", __assign({ className: "p-0 h-20 dc__no-background dc__no-border dc__tab-focus", type: "button", "aria-label": "build-infra-info" }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) })) }))] })), children] })));
|
|
29216
|
+
};
|
|
29217
|
+
|
|
29218
|
+
var Footer = function (_a) {
|
|
29219
|
+
var disabled = _a.disabled, handleCancel = _a.handleCancel, editProfile = _a.editProfile, loading = _a.loading;
|
|
29220
|
+
var disableMessage = disabled
|
|
29221
|
+
? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
|
|
29222
|
+
: BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
|
|
29223
|
+
var getButtonText = function () {
|
|
29224
|
+
if (editProfile) {
|
|
29225
|
+
return BUILD_INFRA_TEXT.EDIT_SUBMIT;
|
|
29226
|
+
}
|
|
29227
|
+
return BUILD_INFRA_TEXT.SAVE_SUBMIT;
|
|
29228
|
+
};
|
|
29229
|
+
var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
|
|
29230
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex pl pr pb pt h-64 dc__gap-12 dc__border-top dc__content-start" }, { children: [jsxRuntime.jsx(ConditionalWrap, __assign({ condition: disabled || loading, wrap: renderTippy }, { children: jsxRuntime.jsx("div", __assign({ className: "flexbox dc__align-items-center" }, { children: jsxRuntime.jsx("button", __assign({ type: "submit", className: "cta submit h-32 flex", disabled: disabled || loading, "data-testid": BUILD_INFRA_TEST_IDS.SUBMIT_BUTTON }, { children: loading ? jsxRuntime.jsx(Progressing, { size: 16 }) : getButtonText() })) })) })), handleCancel && (jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel h-32 flex", disabled: loading, "data-testid": BUILD_INFRA_TEST_IDS.CANCEL_BUTTON, onClick: handleCancel }, { children: BUILD_INFRA_TEXT.EDIT_CANCEL })))] })));
|
|
29231
|
+
};
|
|
29232
|
+
|
|
29233
|
+
var getBaseProfileObject = function (fromCreateView, profile) {
|
|
29234
|
+
if (fromCreateView) {
|
|
29235
|
+
return CREATE_PROFILE_BASE_VALUE;
|
|
29236
|
+
}
|
|
29237
|
+
return {
|
|
29238
|
+
id: profile.id,
|
|
29239
|
+
name: profile.name,
|
|
29240
|
+
description: profile.description,
|
|
29241
|
+
type: profile.type,
|
|
29242
|
+
appCount: profile.appCount,
|
|
29243
|
+
};
|
|
29244
|
+
};
|
|
29245
|
+
// Would receive a single profile and return transformed response
|
|
29246
|
+
var getTransformedBuildInfraProfileResponse = function (_a) {
|
|
29247
|
+
var _b, _c, _d;
|
|
29248
|
+
var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
|
|
29249
|
+
// Assuming would contain all the keys
|
|
29250
|
+
var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
|
|
29251
|
+
acc[configuration.key] = configuration;
|
|
29252
|
+
return acc;
|
|
29253
|
+
}, {})) !== null && _b !== void 0 ? _b : {};
|
|
29254
|
+
var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
|
|
29255
|
+
acc[configuration.key] = configuration;
|
|
29256
|
+
return acc;
|
|
29257
|
+
}, {})) !== null && _d !== void 0 ? _d : {};
|
|
29258
|
+
var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
|
|
29259
|
+
var _a, _b;
|
|
29260
|
+
var defaultConfiguration = defaultConfigurationsMap[key];
|
|
29261
|
+
var profileConfiguration = ((_a = profileConfigurations[key]) === null || _a === void 0 ? void 0 : _a.profileName) === (profile === null || profile === void 0 ? void 0 : profile.name) ? profileConfigurations[key] : null;
|
|
29262
|
+
// Pushing default value in configurations in case we de-activate the configuration
|
|
29263
|
+
var defaultValue = {
|
|
29264
|
+
value: defaultConfiguration.value,
|
|
29265
|
+
unit: defaultConfiguration.unit,
|
|
29266
|
+
};
|
|
29267
|
+
if (fromCreateView) {
|
|
29268
|
+
acc[key] = {
|
|
29269
|
+
key: key,
|
|
29270
|
+
value: defaultConfiguration.value,
|
|
29271
|
+
unit: defaultConfiguration.unit,
|
|
29272
|
+
active: (_b = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _b !== void 0 ? _b : false,
|
|
29273
|
+
defaultValue: defaultValue,
|
|
29274
|
+
};
|
|
29275
|
+
return acc;
|
|
29276
|
+
}
|
|
29277
|
+
if (profileConfiguration) {
|
|
29278
|
+
acc[key] = __assign(__assign({}, profileConfiguration), { defaultValue: defaultValue });
|
|
29279
|
+
return acc;
|
|
29280
|
+
}
|
|
29281
|
+
// Removing id from it since we do not have a configuration
|
|
29282
|
+
// While generating payload, we will check on the basis of id and active flag.
|
|
29283
|
+
acc[key] = {
|
|
29284
|
+
key: key,
|
|
29285
|
+
value: defaultConfiguration.value,
|
|
29286
|
+
// saving profile name as undefined and this would be a check, if we are deriving from default or not
|
|
29287
|
+
unit: defaultConfiguration.unit,
|
|
29288
|
+
active: false,
|
|
29289
|
+
defaultValue: defaultValue,
|
|
29290
|
+
};
|
|
29291
|
+
return acc;
|
|
29292
|
+
}, {});
|
|
29293
|
+
return {
|
|
29294
|
+
configurationUnits: configurationUnits,
|
|
29295
|
+
profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
|
|
29296
|
+
};
|
|
29297
|
+
};
|
|
29298
|
+
var getBuildInfraProfileByName = function (_a) {
|
|
29299
|
+
var name = _a.name, fromCreateView = _a.fromCreateView;
|
|
29300
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
29301
|
+
var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
|
|
29302
|
+
return __generator(this, function (_c) {
|
|
29303
|
+
switch (_c.label) {
|
|
29304
|
+
case 0:
|
|
29305
|
+
_c.trys.push([0, 2, , 3]);
|
|
29306
|
+
return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
|
|
29307
|
+
case 1:
|
|
29308
|
+
response = _c.sent();
|
|
29309
|
+
_b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
|
|
29310
|
+
return [2 /*return*/, getTransformedBuildInfraProfileResponse({
|
|
29311
|
+
configurationUnits: configurationUnits,
|
|
29312
|
+
defaultConfigurations: defaultConfigurations,
|
|
29313
|
+
profile: profile,
|
|
29314
|
+
fromCreateView: fromCreateView,
|
|
29315
|
+
})];
|
|
29316
|
+
case 2:
|
|
29317
|
+
error_1 = _c.sent();
|
|
29318
|
+
showError(error_1);
|
|
29319
|
+
throw error_1;
|
|
29320
|
+
case 3: return [2 /*return*/];
|
|
29321
|
+
}
|
|
29322
|
+
});
|
|
29323
|
+
});
|
|
29324
|
+
};
|
|
29325
|
+
var getBuildInfraProfilePayload = function (profileInput) {
|
|
29326
|
+
var currentConfigurations = profileInput.configurations;
|
|
29327
|
+
var configurationKeys = Object.keys(currentConfigurations);
|
|
29328
|
+
// would only keep the configurations with id or active flag as true
|
|
29329
|
+
var configurations = configurationKeys.reduce(function (acc, key) {
|
|
29330
|
+
var configuration = currentConfigurations[key];
|
|
29331
|
+
if (configuration.id || configuration.active) {
|
|
29332
|
+
acc.push({
|
|
29333
|
+
id: configuration.id,
|
|
29334
|
+
key: key,
|
|
29335
|
+
value: Number(configuration.value),
|
|
29336
|
+
unit: configuration.unit,
|
|
29337
|
+
active: configuration.active,
|
|
29338
|
+
});
|
|
29339
|
+
}
|
|
29340
|
+
return acc;
|
|
29341
|
+
}, []);
|
|
29342
|
+
var payload = {
|
|
29343
|
+
name: profileInput.name,
|
|
29344
|
+
description: profileInput.description,
|
|
29345
|
+
type: profileInput.type,
|
|
29346
|
+
configurations: configurations,
|
|
29347
|
+
};
|
|
29348
|
+
return payload;
|
|
29349
|
+
};
|
|
29350
|
+
var updateBuildInfraProfile = function (_a) {
|
|
29351
|
+
var name = _a.name, profileInput = _a.profileInput;
|
|
29352
|
+
var payload = getBuildInfraProfilePayload(profileInput);
|
|
29353
|
+
return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
|
|
29354
|
+
};
|
|
29355
|
+
var createBuildInfraProfile = function (_a) {
|
|
29356
|
+
var profileInput = _a.profileInput;
|
|
29357
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
29358
|
+
var payload;
|
|
29359
|
+
return __generator(this, function (_b) {
|
|
29360
|
+
payload = getBuildInfraProfilePayload(profileInput);
|
|
29361
|
+
return [2 /*return*/, post(ROUTES.INFRA_CONFIG_PROFILE, payload)];
|
|
29362
|
+
});
|
|
29363
|
+
});
|
|
29364
|
+
};
|
|
29365
|
+
|
|
29366
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
29367
|
+
var NOT_FOUND_DEFAULT_TEXT = {
|
|
29368
|
+
title: 'Resource not found',
|
|
29369
|
+
subTitle: 'The resource you are looking for does not exist',
|
|
29370
|
+
};
|
|
29371
|
+
|
|
29372
|
+
var APIResponseHandler = function (_a) {
|
|
29373
|
+
var _b, _c;
|
|
29374
|
+
var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
|
|
29375
|
+
// keeping it above loading since, not expected to send a call if not authorized
|
|
29376
|
+
if (notAuthorized) {
|
|
29377
|
+
return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
|
|
29378
|
+
}
|
|
29379
|
+
if (isLoading) {
|
|
29380
|
+
return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
|
|
29381
|
+
}
|
|
29382
|
+
if (error) {
|
|
29383
|
+
// TODO: Can extend ErrorScreenNotFound
|
|
29384
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
|
|
29385
|
+
return (jsxRuntime.jsx(GenericEmptyState, { title: (_b = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.title) !== null && _b !== void 0 ? _b : NOT_FOUND_DEFAULT_TEXT.title, subTitle: (_c = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.subTitle) !== null && _c !== void 0 ? _c : NOT_FOUND_DEFAULT_TEXT.subTitle }));
|
|
29386
|
+
}
|
|
29387
|
+
return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
|
|
29388
|
+
}
|
|
29389
|
+
// Had to add this since while using it is throwing ts error
|
|
29390
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
29391
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
29392
|
+
};
|
|
29393
|
+
|
|
29394
|
+
var getCommonSelectStyle = function (styleOverrides) {
|
|
29395
|
+
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29396
|
+
return (__assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0 })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400' })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); } }, styleOverrides));
|
|
29397
|
+
};
|
|
29398
|
+
var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
|
|
29399
|
+
if (isSelected) {
|
|
29400
|
+
return 'var(--B100)';
|
|
29401
|
+
}
|
|
29402
|
+
if (isFocused) {
|
|
29403
|
+
return 'var(--N50)';
|
|
29404
|
+
}
|
|
29405
|
+
return 'var(--white)';
|
|
29406
|
+
};
|
|
29407
|
+
var getCustomOptionSelectionStyle = function (styleOverrides) {
|
|
29408
|
+
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29409
|
+
return function (base, state) { return (__assign(__assign(__assign({}, base), { backgroundColor: getCustomOptionBackgroundColor(state.isSelected, state.isFocused), color: state.isSelected ? 'var(--B500)' : 'var(--N900)', textOverflow: 'ellipsis', fontWeight: '500', overflow: 'hidden', textAlign: 'left', whiteSpace: 'nowrap', cursor: 'pointer', fontSize: '13px' }), styleOverrides)); };
|
|
29410
|
+
};
|
|
29411
|
+
var SelectOption = function (props) {
|
|
29412
|
+
var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
|
|
29413
|
+
selectProps.styles.option = getCustomOptionSelectionStyle(style);
|
|
29414
|
+
var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
|
|
29415
|
+
return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
|
|
29416
|
+
};
|
|
29008
29417
|
|
|
29009
29418
|
var BulkSelectionDropdownItems = function (_a) {
|
|
29010
29419
|
var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
|
|
@@ -29013,7 +29422,9 @@ var BulkSelectionDropdownItems = function (_a) {
|
|
|
29013
29422
|
action: locator,
|
|
29014
29423
|
});
|
|
29015
29424
|
};
|
|
29016
|
-
return (jsxRuntime.jsxs("button", __assign({ "data-testid": "bulk-action-".concat(locator), onClick: handleSelect, className: "dc__no-border dc__outline-none-imp w-100 flexbox h-32 dc__align-items-center pt-6 pr-8 pb-6 pl-8 dc__gap-8 ".concat(isSelected
|
|
29425
|
+
return (jsxRuntime.jsxs("button", __assign({ "data-testid": "bulk-action-".concat(locator), onClick: handleSelect, className: "dc__no-border dc__outline-none-imp w-100 flexbox h-32 dc__align-items-center pt-6 pr-8 pb-6 pl-8 dc__gap-8 ".concat(isSelected
|
|
29426
|
+
? 'cb-5 bcb-1 icon-stroke-b5 fs-13 fw-6 lh-20'
|
|
29427
|
+
: 'dc__no-background cn-9 fs-13 fw-4 lh-20 dc__hover-n50'), type: "button" }, { children: [jsxRuntime.jsx(Icon, { className: "icon-dim-16" }), label] })));
|
|
29017
29428
|
};
|
|
29018
29429
|
|
|
29019
29430
|
exports.BulkSelectionEvents = void 0;
|
|
@@ -29042,7 +29453,8 @@ var BulkSelectionOptionsLabels = (_a = {},
|
|
|
29042
29453
|
// Considering application can not be named as *
|
|
29043
29454
|
var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
|
|
29044
29455
|
var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
|
|
29045
|
-
var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
|
|
29456
|
+
var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
|
|
29457
|
+
var CLEAR_SELECTIONS_WARNING = 'Selections on other pages are cleared';
|
|
29046
29458
|
|
|
29047
29459
|
// giving type any here since not exporting this context, rather using it through useBulkSelection hook which is typed
|
|
29048
29460
|
var BulkSelectionContext = React.createContext({
|
|
@@ -29050,8 +29462,6 @@ var BulkSelectionContext = React.createContext({
|
|
|
29050
29462
|
handleBulkSelection: noop$1,
|
|
29051
29463
|
isChecked: false,
|
|
29052
29464
|
checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
|
|
29053
|
-
isBulkSelectionApplied: false,
|
|
29054
|
-
getSelectedIdentifiersCount: noop$1,
|
|
29055
29465
|
});
|
|
29056
29466
|
var useBulkSelection = function () {
|
|
29057
29467
|
var context = React.useContext(BulkSelectionContext);
|
|
@@ -29063,8 +29473,6 @@ var useBulkSelection = function () {
|
|
|
29063
29473
|
var BulkSelectionProvider = function (_a) {
|
|
29064
29474
|
var children = _a.children, identifiers = _a.identifiers, getSelectAllDialogStatus = _a.getSelectAllDialogStatus;
|
|
29065
29475
|
var _b = __read(React.useState({}), 2), selectedIdentifiers = _b[0], setSelectedIdentifiers = _b[1];
|
|
29066
|
-
var isBulkSelectionApplied = selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
|
|
29067
|
-
var getSelectedIdentifiersCount = function () { return Object.keys(selectedIdentifiers).length; };
|
|
29068
29476
|
var setIdentifiersAfterClear = function (newIdentifiers, selectedIds) {
|
|
29069
29477
|
var _newIdentifiers = JSON.parse(JSON.stringify(newIdentifiers));
|
|
29070
29478
|
selectedIds.forEach(function (id) {
|
|
@@ -29075,7 +29483,7 @@ var BulkSelectionProvider = function (_a) {
|
|
|
29075
29483
|
var setIdentifiersAfterPageSelection = function (baseObject) {
|
|
29076
29484
|
var _selectedIdentifiers = JSON.parse(JSON.stringify(selectedIdentifiers));
|
|
29077
29485
|
// removing bulk selection across pages if present
|
|
29078
|
-
if (
|
|
29486
|
+
if (_selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29079
29487
|
delete _selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
|
|
29080
29488
|
}
|
|
29081
29489
|
setSelectedIdentifiers(__assign(__assign({}, _selectedIdentifiers), baseObject));
|
|
@@ -29091,6 +29499,7 @@ var BulkSelectionProvider = function (_a) {
|
|
|
29091
29499
|
setSelectedIdentifiers({});
|
|
29092
29500
|
break;
|
|
29093
29501
|
case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
|
|
29502
|
+
toast.info(CLEAR_SELECTIONS_WARNING);
|
|
29094
29503
|
setIdentifiersAfterClear(identifiers, selectedIds);
|
|
29095
29504
|
break;
|
|
29096
29505
|
}
|
|
@@ -29099,13 +29508,10 @@ var BulkSelectionProvider = function (_a) {
|
|
|
29099
29508
|
break;
|
|
29100
29509
|
}
|
|
29101
29510
|
case exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES: {
|
|
29102
|
-
if (
|
|
29511
|
+
if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29103
29512
|
return;
|
|
29104
29513
|
}
|
|
29105
|
-
var selectedIdentifiersLength =
|
|
29106
|
-
// This is for showing a modal dialog if applicable to confirm if bulk selection is to be applied
|
|
29107
|
-
// Do note that the 'getSelectAllDialogStatus' should be called after the length check explicitly
|
|
29108
|
-
// otherwise the modal will open each time
|
|
29514
|
+
var selectedIdentifiersLength = Object.keys(selectedIdentifiers).length;
|
|
29109
29515
|
if (selectedIdentifiersLength > 0 && getSelectAllDialogStatus() === exports.SelectAllDialogStatus.OPEN) {
|
|
29110
29516
|
return;
|
|
29111
29517
|
}
|
|
@@ -29120,6 +29526,9 @@ var BulkSelectionProvider = function (_a) {
|
|
|
29120
29526
|
_c));
|
|
29121
29527
|
break;
|
|
29122
29528
|
case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
|
|
29529
|
+
if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29530
|
+
toast.info(CLEAR_SELECTIONS_WARNING);
|
|
29531
|
+
}
|
|
29123
29532
|
setIdentifiersAfterPageSelection(identifiers);
|
|
29124
29533
|
break;
|
|
29125
29534
|
}
|
|
@@ -29140,7 +29549,7 @@ var BulkSelectionProvider = function (_a) {
|
|
|
29140
29549
|
};
|
|
29141
29550
|
}
|
|
29142
29551
|
// if selectedIdentifiers contains select all across pages locator then it means all are selected
|
|
29143
|
-
if (
|
|
29552
|
+
if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29144
29553
|
return {
|
|
29145
29554
|
isChecked: true,
|
|
29146
29555
|
checkboxValue: exports.CHECKBOX_VALUE.BULK_CHECKED,
|
|
@@ -29165,9 +29574,7 @@ var BulkSelectionProvider = function (_a) {
|
|
|
29165
29574
|
handleBulkSelection: handleBulkSelection,
|
|
29166
29575
|
isChecked: isChecked,
|
|
29167
29576
|
checkboxValue: checkboxValue,
|
|
29168
|
-
|
|
29169
|
-
getSelectedIdentifiersCount: getSelectedIdentifiersCount,
|
|
29170
|
-
}); }, [selectedIdentifiers, handleBulkSelection, isChecked, checkboxValue, getSelectedIdentifiersCount]);
|
|
29577
|
+
}); }, [selectedIdentifiers, handleBulkSelection, isChecked, checkboxValue]);
|
|
29171
29578
|
return jsxRuntime.jsx(BulkSelectionContext.Provider, __assign({ value: value }, { children: children }));
|
|
29172
29579
|
};
|
|
29173
29580
|
|
|
@@ -29249,8 +29656,8 @@ var SvgIcClose = function SvgIcClose(props) {
|
|
|
29249
29656
|
|
|
29250
29657
|
var BulkSelection = function (_a) {
|
|
29251
29658
|
var showPagination = _a.showPagination;
|
|
29252
|
-
var _b = useBulkSelection(), handleBulkSelection = _b.handleBulkSelection,
|
|
29253
|
-
var areOptionsSelected =
|
|
29659
|
+
var _b = useBulkSelection(), handleBulkSelection = _b.handleBulkSelection, selectedIdentifiers = _b.selectedIdentifiers, isChecked = _b.isChecked, checkboxValue = _b.checkboxValue;
|
|
29660
|
+
var areOptionsSelected = Object.keys(selectedIdentifiers).length > 0;
|
|
29254
29661
|
var BulkSelectionItems = __spreadArray(__spreadArray([
|
|
29255
29662
|
{
|
|
29256
29663
|
locator: exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE,
|
|
@@ -29280,17 +29687,580 @@ var BulkSelection = function (_a) {
|
|
|
29280
29687
|
return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true }, { children: [jsxRuntime.jsxs(PopupMenu.Button, __assign({ isKebab: true, rootClassName: "h-20 flexbox p-0 dc__no-background dc__no-border dc__outline-none-imp", dataTestId: BULK_DROPDOWN_TEST_ID }, { children: [jsxRuntime.jsx(Checkbox$1, { isChecked: isChecked, onChange: noop$1, rootClassName: "icon-dim-20 m-0", value: checkboxValue }), jsxRuntime.jsx(SvgIcChevronDown, { className: "icon-dim-20 fcn-6 dc__no-shrink" })] })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "dc__top-22 w-150 dc__right-0 pt-4 pb-4 pl-0 pr-0 bcn-0 flex column dc__content-start dc__align-start dc__position-abs bcn-0 dc__border dc__border-radius-4-imp" }, { children: BulkSelectionItems.map(function (item) { return (jsxRuntime.jsx(BulkSelectionDropdownItems, { locator: item.locator, label: item.label, isSelected: item.isSelected, icon: item.icon, handleBulkSelection: handleBulkSelection }, item.locator)); }) }))] })));
|
|
29281
29688
|
};
|
|
29282
29689
|
|
|
29690
|
+
var MESSAGES = {
|
|
29691
|
+
PROVIDE_A_NUMBER: 'Please provide a number',
|
|
29692
|
+
LOWERCASE_ALPHANUMERIC: 'Only lowercase alphanumeric characters, -, _ or . allowed',
|
|
29693
|
+
CAN_NOT_START_END_WITH_SEPARATORS: 'Cannot start/end with -, _ or .',
|
|
29694
|
+
getMinMaxCharMessage: function (min, max) { return "Minimum ".concat(min, " and maximum ").concat(max, " characters allowed"); },
|
|
29695
|
+
getMaxCharMessage: function (max) { return "Maximum ".concat(max, " characters are allowed"); },
|
|
29696
|
+
VALID_POSITIVE_NUMBER: 'This field should be a valid positive number',
|
|
29697
|
+
VALID_POSITIVE_INTEGER: 'This field should be a valid positive integer',
|
|
29698
|
+
MAX_SAFE_INTEGER: "Maximum allowed value is ".concat(Number.MAX_SAFE_INTEGER),
|
|
29699
|
+
};
|
|
29700
|
+
var MAX_DESCRIPTION_LENGTH = 300;
|
|
29701
|
+
var validateName = function (name) {
|
|
29702
|
+
if (!/^.{3,50}$/.test(name)) {
|
|
29703
|
+
return {
|
|
29704
|
+
isValid: false,
|
|
29705
|
+
message: MESSAGES.getMinMaxCharMessage(3, 50),
|
|
29706
|
+
};
|
|
29707
|
+
}
|
|
29708
|
+
if (!/^[a-z0-9-._]+$/.test(name)) {
|
|
29709
|
+
return {
|
|
29710
|
+
isValid: false,
|
|
29711
|
+
message: MESSAGES.LOWERCASE_ALPHANUMERIC,
|
|
29712
|
+
};
|
|
29713
|
+
}
|
|
29714
|
+
if (!/^(?![-._]).*[^-._]$/.test(name)) {
|
|
29715
|
+
return {
|
|
29716
|
+
isValid: false,
|
|
29717
|
+
message: MESSAGES.CAN_NOT_START_END_WITH_SEPARATORS,
|
|
29718
|
+
};
|
|
29719
|
+
}
|
|
29720
|
+
return {
|
|
29721
|
+
isValid: true,
|
|
29722
|
+
};
|
|
29723
|
+
};
|
|
29724
|
+
var validateDescription = function (description) {
|
|
29725
|
+
if ((description === null || description === void 0 ? void 0 : description.length) > MAX_DESCRIPTION_LENGTH) {
|
|
29726
|
+
return {
|
|
29727
|
+
isValid: false,
|
|
29728
|
+
message: MESSAGES.getMaxCharMessage(MAX_DESCRIPTION_LENGTH),
|
|
29729
|
+
};
|
|
29730
|
+
}
|
|
29731
|
+
return {
|
|
29732
|
+
isValid: true,
|
|
29733
|
+
};
|
|
29734
|
+
};
|
|
29735
|
+
var validateRequiredPositiveNumber = function (value) {
|
|
29736
|
+
if (!value) {
|
|
29737
|
+
return {
|
|
29738
|
+
isValid: false,
|
|
29739
|
+
message: MESSAGES.PROVIDE_A_NUMBER,
|
|
29740
|
+
};
|
|
29741
|
+
}
|
|
29742
|
+
// TODO: Look if regex is available for this, since 0002 is not a valid number
|
|
29743
|
+
if (!/^\d+(\.\d+)?$/.test(value.toString())) {
|
|
29744
|
+
return {
|
|
29745
|
+
isValid: false,
|
|
29746
|
+
message: MESSAGES.VALID_POSITIVE_NUMBER,
|
|
29747
|
+
};
|
|
29748
|
+
}
|
|
29749
|
+
var numericValue = Number(value);
|
|
29750
|
+
if (numericValue > Number.MAX_SAFE_INTEGER) {
|
|
29751
|
+
return {
|
|
29752
|
+
isValid: false,
|
|
29753
|
+
message: MESSAGES.MAX_SAFE_INTEGER,
|
|
29754
|
+
};
|
|
29755
|
+
}
|
|
29756
|
+
if (numericValue <= 0) {
|
|
29757
|
+
return {
|
|
29758
|
+
isValid: false,
|
|
29759
|
+
message: MESSAGES.VALID_POSITIVE_NUMBER,
|
|
29760
|
+
};
|
|
29761
|
+
}
|
|
29762
|
+
return {
|
|
29763
|
+
isValid: true,
|
|
29764
|
+
};
|
|
29765
|
+
};
|
|
29766
|
+
var validateRequiredPositiveInteger = function (value) {
|
|
29767
|
+
if (!value) {
|
|
29768
|
+
return {
|
|
29769
|
+
isValid: false,
|
|
29770
|
+
message: MESSAGES.PROVIDE_A_NUMBER,
|
|
29771
|
+
};
|
|
29772
|
+
}
|
|
29773
|
+
if (!/^\d+$/.test(value.toString())) {
|
|
29774
|
+
return {
|
|
29775
|
+
isValid: false,
|
|
29776
|
+
message: MESSAGES.VALID_POSITIVE_INTEGER,
|
|
29777
|
+
};
|
|
29778
|
+
}
|
|
29779
|
+
var numericValue = Number(value);
|
|
29780
|
+
if (numericValue > Number.MAX_SAFE_INTEGER) {
|
|
29781
|
+
return {
|
|
29782
|
+
isValid: false,
|
|
29783
|
+
message: MESSAGES.MAX_SAFE_INTEGER,
|
|
29784
|
+
};
|
|
29785
|
+
}
|
|
29786
|
+
if (numericValue <= 0) {
|
|
29787
|
+
return {
|
|
29788
|
+
isValid: false,
|
|
29789
|
+
message: MESSAGES.VALID_POSITIVE_INTEGER,
|
|
29790
|
+
};
|
|
29791
|
+
}
|
|
29792
|
+
return {
|
|
29793
|
+
isValid: true,
|
|
29794
|
+
};
|
|
29795
|
+
};
|
|
29796
|
+
|
|
29797
|
+
// Disabling default export since this is a helper function and we would have to export a lot of functions in future.
|
|
29798
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
29799
|
+
var highlightSearchText = function (_a) {
|
|
29800
|
+
var searchText = _a.searchText, text = _a.text, highlightClasses = _a.highlightClasses;
|
|
29801
|
+
if (!searchText) {
|
|
29802
|
+
return text;
|
|
29803
|
+
}
|
|
29804
|
+
try {
|
|
29805
|
+
var regex = new RegExp(searchText, 'gi');
|
|
29806
|
+
return text.replace(regex, function (match) { return "<span class=\"".concat(highlightClasses, "\">").concat(match, "</span>"); });
|
|
29807
|
+
}
|
|
29808
|
+
catch (error) {
|
|
29809
|
+
return text;
|
|
29810
|
+
}
|
|
29811
|
+
};
|
|
29812
|
+
|
|
29813
|
+
var validateRequestLimit = function (_a) {
|
|
29814
|
+
var _b, _c, _d, _e, _f, _g;
|
|
29815
|
+
var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
|
|
29816
|
+
// Request <= Limit
|
|
29817
|
+
// Request and Limit should be numbers can be decimals
|
|
29818
|
+
// Request and Limit should be positive numbers
|
|
29819
|
+
// Request and Limit should be less than Number.MAX_SAFE_INTEGER
|
|
29820
|
+
// Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
|
|
29821
|
+
// Both request and limit should be there
|
|
29822
|
+
var requestNumber = Number(request.value);
|
|
29823
|
+
var limitNumber = Number(limit.value);
|
|
29824
|
+
var requestUnit = Number((_b = unitsMap[request.unit]) === null || _b === void 0 ? void 0 : _b.conversionFactor);
|
|
29825
|
+
var limitUnit = Number((_c = unitsMap[limit.unit]) === null || _c === void 0 ? void 0 : _c.conversionFactor);
|
|
29826
|
+
var requestLimitValidationResponse = {
|
|
29827
|
+
request: {
|
|
29828
|
+
isValid: true,
|
|
29829
|
+
},
|
|
29830
|
+
limit: {
|
|
29831
|
+
isValid: true,
|
|
29832
|
+
},
|
|
29833
|
+
};
|
|
29834
|
+
var requestValidationMessage = validateRequiredPositiveNumber(request.value).message;
|
|
29835
|
+
var limitValidationMessage = validateRequiredPositiveNumber(limit.value).message;
|
|
29836
|
+
if (requestValidationMessage) {
|
|
29837
|
+
requestLimitValidationResponse.request = {
|
|
29838
|
+
message: requestValidationMessage,
|
|
29839
|
+
isValid: false,
|
|
29840
|
+
};
|
|
29841
|
+
}
|
|
29842
|
+
if (limitValidationMessage) {
|
|
29843
|
+
requestLimitValidationResponse.limit = {
|
|
29844
|
+
message: limitValidationMessage,
|
|
29845
|
+
isValid: false,
|
|
29846
|
+
};
|
|
29847
|
+
}
|
|
29848
|
+
if (limitValidationMessage || requestValidationMessage) {
|
|
29849
|
+
return requestLimitValidationResponse;
|
|
29850
|
+
}
|
|
29851
|
+
// only two decimal places are allowed
|
|
29852
|
+
var requestDecimalPlaces = (_e = (_d = String(request.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
|
|
29853
|
+
var limitDecimalPlaces = (_g = (_f = String(limit.value).split('.')[1]) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0;
|
|
29854
|
+
if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29855
|
+
requestLimitValidationResponse.request = {
|
|
29856
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
|
|
29857
|
+
isValid: false,
|
|
29858
|
+
};
|
|
29859
|
+
return requestLimitValidationResponse;
|
|
29860
|
+
}
|
|
29861
|
+
if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29862
|
+
requestLimitValidationResponse.limit = {
|
|
29863
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
|
|
29864
|
+
isValid: false,
|
|
29865
|
+
};
|
|
29866
|
+
return requestLimitValidationResponse;
|
|
29867
|
+
}
|
|
29868
|
+
// Assuming requestUnit and requestNumber are not 0
|
|
29869
|
+
// TODO: Communicate this assumption to the backend
|
|
29870
|
+
var limitRequestUnitFactor = limitUnit / requestUnit;
|
|
29871
|
+
var limitRequestFactor = limitNumber / requestNumber;
|
|
29872
|
+
var isDifferenceBigNumber = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
|
|
29873
|
+
if (!isDifferenceBigNumber) {
|
|
29874
|
+
requestLimitValidationResponse.request = {
|
|
29875
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
|
|
29876
|
+
isValid: false,
|
|
29877
|
+
};
|
|
29878
|
+
return requestLimitValidationResponse;
|
|
29879
|
+
}
|
|
29880
|
+
if (limitRequestUnitFactor * limitRequestFactor < 1) {
|
|
29881
|
+
requestLimitValidationResponse.request = {
|
|
29882
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
|
|
29883
|
+
isValid: false,
|
|
29884
|
+
};
|
|
29885
|
+
return requestLimitValidationResponse;
|
|
29886
|
+
}
|
|
29887
|
+
return requestLimitValidationResponse;
|
|
29888
|
+
};
|
|
29889
|
+
var getInitialProfileInputErrors = function (fromCreateView) {
|
|
29890
|
+
if (fromCreateView) {
|
|
29891
|
+
var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29892
|
+
CREATE_MODE_REQUIRED_INPUT_FIELDS.forEach(function (field) {
|
|
29893
|
+
initialProfileInputErrors_1[field] = '';
|
|
29894
|
+
});
|
|
29895
|
+
return initialProfileInputErrors_1;
|
|
29896
|
+
}
|
|
29897
|
+
return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29898
|
+
};
|
|
29899
|
+
var useBuildInfraForm = function (_a) {
|
|
29900
|
+
var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
|
|
29901
|
+
var fromCreateView = !name;
|
|
29902
|
+
var _b = __read(useAsync(function () {
|
|
29903
|
+
return getBuildInfraProfileByName({
|
|
29904
|
+
name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
|
|
29905
|
+
fromCreateView: fromCreateView,
|
|
29906
|
+
});
|
|
29907
|
+
}, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
|
|
29908
|
+
// If configuration is existing and is active then use it else use default from profileResponse
|
|
29909
|
+
var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
|
|
29910
|
+
var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
|
|
29911
|
+
var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
|
|
29912
|
+
React.useEffect(function () {
|
|
29913
|
+
if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
|
|
29914
|
+
setProfileInput(__assign({}, profileResponse.profile));
|
|
29915
|
+
setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
|
|
29916
|
+
}
|
|
29917
|
+
}, [profileResponse, isLoading]);
|
|
29918
|
+
// NOTE: Currently sending and receiving values as string, but will parse it to number for payload
|
|
29919
|
+
var handleProfileInputChange = function (_a) {
|
|
29920
|
+
var action = _a.action, data = _a.data;
|
|
29921
|
+
var currentInput = __assign({}, profileInput);
|
|
29922
|
+
var currentInputErrors = __assign({}, profileInputErrors);
|
|
29923
|
+
var lastSavedConfiguration = profileResponse.profile.configurations;
|
|
29924
|
+
var currentConfiguration = currentInput.configurations;
|
|
29925
|
+
var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
|
|
29926
|
+
switch (action) {
|
|
29927
|
+
case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
|
|
29928
|
+
currentInput.description = value;
|
|
29929
|
+
currentInputErrors.description = validateDescription(value).message;
|
|
29930
|
+
break;
|
|
29931
|
+
case exports.BuildInfraMetaConfigTypes.NAME:
|
|
29932
|
+
currentInput.name = value;
|
|
29933
|
+
currentInputErrors.name = validateName(value).message;
|
|
29934
|
+
break;
|
|
29935
|
+
case exports.BuildInfraConfigTypes.CPU_LIMIT: {
|
|
29936
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
|
|
29937
|
+
var _c = validateRequestLimit({
|
|
29938
|
+
request: {
|
|
29939
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
|
|
29940
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
|
|
29941
|
+
},
|
|
29942
|
+
limit: {
|
|
29943
|
+
value: value,
|
|
29944
|
+
unit: unit,
|
|
29945
|
+
},
|
|
29946
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29947
|
+
}), request = _c.request, limit = _c.limit;
|
|
29948
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29949
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29950
|
+
break;
|
|
29951
|
+
}
|
|
29952
|
+
case exports.BuildInfraConfigTypes.CPU_REQUEST: {
|
|
29953
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
|
|
29954
|
+
var _d = validateRequestLimit({
|
|
29955
|
+
request: {
|
|
29956
|
+
value: value,
|
|
29957
|
+
unit: unit,
|
|
29958
|
+
},
|
|
29959
|
+
limit: {
|
|
29960
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
|
|
29961
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
|
|
29962
|
+
},
|
|
29963
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29964
|
+
}), request = _d.request, limit = _d.limit;
|
|
29965
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29966
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29967
|
+
break;
|
|
29968
|
+
}
|
|
29969
|
+
case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
|
|
29970
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
|
|
29971
|
+
var _e = validateRequestLimit({
|
|
29972
|
+
request: {
|
|
29973
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
|
|
29974
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
|
|
29975
|
+
},
|
|
29976
|
+
limit: {
|
|
29977
|
+
value: value,
|
|
29978
|
+
unit: unit,
|
|
29979
|
+
},
|
|
29980
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29981
|
+
}), request = _e.request, limit = _e.limit;
|
|
29982
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29983
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29984
|
+
break;
|
|
29985
|
+
}
|
|
29986
|
+
case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
|
|
29987
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
|
|
29988
|
+
var _f = validateRequestLimit({
|
|
29989
|
+
request: {
|
|
29990
|
+
value: value,
|
|
29991
|
+
unit: unit,
|
|
29992
|
+
},
|
|
29993
|
+
limit: {
|
|
29994
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
|
|
29995
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
|
|
29996
|
+
},
|
|
29997
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29998
|
+
}), request = _f.request, limit = _f.limit;
|
|
29999
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
30000
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
30001
|
+
break;
|
|
30002
|
+
}
|
|
30003
|
+
case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
|
|
30004
|
+
currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
|
|
30005
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveInteger(value).message;
|
|
30006
|
+
break;
|
|
30007
|
+
}
|
|
30008
|
+
case exports.BuildInfraInheritActions.ACTIVATE_CPU:
|
|
30009
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit, active: true });
|
|
30010
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit, active: true });
|
|
30011
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
30012
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
30013
|
+
break;
|
|
30014
|
+
case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
|
|
30015
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit, active: true });
|
|
30016
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit, active: true });
|
|
30017
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
30018
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
30019
|
+
break;
|
|
30020
|
+
case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
|
|
30021
|
+
currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, lastSavedConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT].value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT].unit, active: true });
|
|
30022
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
30023
|
+
break;
|
|
30024
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
|
|
30025
|
+
// Reverting the value and unit to defaultValues
|
|
30026
|
+
currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT].defaultValue.value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT].defaultValue.unit, active: false });
|
|
30027
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
30028
|
+
break;
|
|
30029
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
|
|
30030
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].defaultValue.value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].defaultValue.unit, active: false });
|
|
30031
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].defaultValue.value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].defaultValue.unit, active: false });
|
|
30032
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
30033
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
30034
|
+
break;
|
|
30035
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
|
|
30036
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].defaultValue.value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].defaultValue.unit, active: false });
|
|
30037
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].defaultValue.value, unit: lastSavedConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].defaultValue.unit, active: false });
|
|
30038
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
30039
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
30040
|
+
break;
|
|
30041
|
+
default:
|
|
30042
|
+
throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
|
|
30043
|
+
}
|
|
30044
|
+
setProfileInput(currentInput);
|
|
30045
|
+
setProfileInputErrors(currentInputErrors);
|
|
30046
|
+
};
|
|
30047
|
+
var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30048
|
+
var hasErrors, err_1;
|
|
30049
|
+
return __generator(this, function (_a) {
|
|
30050
|
+
switch (_a.label) {
|
|
30051
|
+
case 0:
|
|
30052
|
+
e.preventDefault();
|
|
30053
|
+
hasErrors = Object.keys(profileInputErrors).filter(function (item) { return profileInputErrors[item] !== null && profileInputErrors[item] !== undefined; }).length > 0;
|
|
30054
|
+
if (hasErrors) {
|
|
30055
|
+
toast.error(BUILD_INFRA_TEXT.INVALID_FORM_MESSAGE);
|
|
30056
|
+
return [2 /*return*/];
|
|
30057
|
+
}
|
|
30058
|
+
setLoadingActionRequest(true);
|
|
30059
|
+
_a.label = 1;
|
|
30060
|
+
case 1:
|
|
30061
|
+
_a.trys.push([1, 6, , 7]);
|
|
30062
|
+
if (!editProfile) return [3 /*break*/, 3];
|
|
30063
|
+
return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
|
|
30064
|
+
case 2:
|
|
30065
|
+
_a.sent();
|
|
30066
|
+
return [3 /*break*/, 5];
|
|
30067
|
+
case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
|
|
30068
|
+
case 4:
|
|
30069
|
+
_a.sent();
|
|
30070
|
+
_a.label = 5;
|
|
30071
|
+
case 5:
|
|
30072
|
+
setLoadingActionRequest(false);
|
|
30073
|
+
toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
|
|
30074
|
+
if (handleSuccessRedirection) {
|
|
30075
|
+
handleSuccessRedirection();
|
|
30076
|
+
}
|
|
30077
|
+
else {
|
|
30078
|
+
reloadRequest();
|
|
30079
|
+
}
|
|
30080
|
+
return [3 /*break*/, 7];
|
|
30081
|
+
case 6:
|
|
30082
|
+
err_1 = _a.sent();
|
|
30083
|
+
showError(err_1);
|
|
30084
|
+
setLoadingActionRequest(false);
|
|
30085
|
+
return [3 /*break*/, 7];
|
|
30086
|
+
case 7: return [2 /*return*/];
|
|
30087
|
+
}
|
|
30088
|
+
});
|
|
30089
|
+
}); };
|
|
30090
|
+
return {
|
|
30091
|
+
isLoading: isLoading,
|
|
30092
|
+
profileResponse: profileResponse,
|
|
30093
|
+
responseError: responseError,
|
|
30094
|
+
reloadRequest: reloadRequest,
|
|
30095
|
+
profileInput: profileInput,
|
|
30096
|
+
profileInputErrors: profileInputErrors,
|
|
30097
|
+
handleProfileInputChange: handleProfileInputChange,
|
|
30098
|
+
loadingActionRequest: loadingActionRequest,
|
|
30099
|
+
handleSubmit: handleSubmit,
|
|
30100
|
+
};
|
|
30101
|
+
};
|
|
30102
|
+
var unitSelectorStyles = function () {
|
|
30103
|
+
return getCommonSelectStyle({
|
|
30104
|
+
control: function (base, state) { return (__assign(__assign({}, base), { borderRadius: 0, backgroundColor: 'var(--N0)', border: state.isFocused ? '1px solid var(--B500) !important' : '1px solid var(--N200)', alignItems: 'center', cursor: 'pointer', borderTopRightRadius: '4px', borderBottomRightRadius: '4px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', outline: 'none', boxShadow: 'none', '&:hover': {
|
|
30105
|
+
border: '1px solid var(--N400)',
|
|
30106
|
+
} })); },
|
|
30107
|
+
indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
|
|
30108
|
+
dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
|
|
30109
|
+
option: function (base, state) { return (__assign(__assign(__assign(__assign(__assign({}, base), { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', cursor: 'pointer' }), (state.isFocused
|
|
30110
|
+
? {
|
|
30111
|
+
backgroundColor: 'var(--N50)',
|
|
30112
|
+
}
|
|
30113
|
+
: {})), (state.isSelected && {
|
|
30114
|
+
backgroundColor: 'var(--B100)',
|
|
30115
|
+
fontWeight: 600,
|
|
30116
|
+
color: 'var(--B500)',
|
|
30117
|
+
})), { '&:active': {
|
|
30118
|
+
backgroundColor: 'var(--N50)',
|
|
30119
|
+
} })); },
|
|
30120
|
+
valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
|
|
30121
|
+
menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
|
|
30122
|
+
});
|
|
30123
|
+
};
|
|
30124
|
+
|
|
30125
|
+
/**
|
|
30126
|
+
* In case need arise for variants break this CustomInput and Select as a separate component
|
|
30127
|
+
*/
|
|
30128
|
+
var BuildInfraFormAction = function (_a) {
|
|
30129
|
+
var actionType = _a.actionType, label = _a.label, placeholder = _a.placeholder, error = _a.error, isRequired = _a.isRequired, profileUnitsMap = _a.profileUnitsMap, handleProfileInputChange = _a.handleProfileInputChange, currentUnitName = _a.currentUnitName, currentValue = _a.currentValue;
|
|
30130
|
+
var handleUnitChange = function (selectedUnit) {
|
|
30131
|
+
var data = {
|
|
30132
|
+
unit: selectedUnit.label,
|
|
30133
|
+
value: currentValue,
|
|
30134
|
+
};
|
|
30135
|
+
handleProfileInputChange({ action: actionType, data: data });
|
|
30136
|
+
};
|
|
30137
|
+
var handleInputChange = function (e) {
|
|
30138
|
+
var data = {
|
|
30139
|
+
unit: currentUnitName,
|
|
30140
|
+
value: e.currentTarget.value,
|
|
30141
|
+
};
|
|
30142
|
+
handleProfileInputChange({ action: actionType, data: data });
|
|
30143
|
+
};
|
|
30144
|
+
var unitOptions = React.useMemo(function () {
|
|
30145
|
+
var _a, _b;
|
|
30146
|
+
var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
|
|
30147
|
+
label: unit.name,
|
|
30148
|
+
value: String(unit.conversionFactor),
|
|
30149
|
+
}); })) !== null && _b !== void 0 ? _b : [];
|
|
30150
|
+
return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
|
|
30151
|
+
}, [profileUnitsMap]);
|
|
30152
|
+
var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
|
|
30153
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__gap-4 dc__mxw-420 w-100 dc__align-start" }, { children: [jsxRuntime.jsx("label", __assign({ htmlFor: "".concat(actionType, "-input"), className: "fs-13 fw-4 lh-20 cn-7 ".concat(isRequired ? 'dc__required-field' : '') }, { children: label })), jsxRuntime.jsxs("div", __assign({ className: "w-100 flexbox dc__align-items-center" }, { children: [jsxRuntime.jsx("div", __assign({ className: "flex-grow-1" }, { children: jsxRuntime.jsx("input", { "data-testid": "".concat(actionType, "-input-field"), name: actionType, type: "number", step: BUILD_INFRA_INPUT_CONSTRAINTS.STEP, min: BUILD_INFRA_INPUT_CONSTRAINTS.MIN, className: "form__input dc__no-right-border dc__no-right-radius", placeholder: placeholder, value: currentValue, onChange: handleInputChange, required: isRequired, autoComplete: "off", id: "".concat(actionType, "-input") }) })), profileUnitsMap && (jsxRuntime.jsx(ReactSelect, { name: "".concat(actionType, "-unit"), className: "bcn-0 dc__mxw-120", options: unitOptions, value: currentUnit, onChange: handleUnitChange, isSearchable: false, components: {
|
|
30154
|
+
IndicatorSeparator: null,
|
|
30155
|
+
ClearIndicator: null,
|
|
30156
|
+
}, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
|
|
30157
|
+
};
|
|
30158
|
+
|
|
30159
|
+
var BuildInfraFormItem = function (_a) {
|
|
30160
|
+
var heading = _a.heading, Marker = _a.marker, children = _a.children, isInheriting = _a.isInheriting, showDivider = _a.showDivider, handleProfileInputChange = _a.handleProfileInputChange, locator = _a.locator, isDefaultProfile = _a.isDefaultProfile;
|
|
30161
|
+
var handleActivationChange = function (e) {
|
|
30162
|
+
var checked = e.currentTarget.checked;
|
|
30163
|
+
var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
|
|
30164
|
+
handleProfileInputChange({ action: action });
|
|
30165
|
+
};
|
|
30166
|
+
var renderMarker = function () {
|
|
30167
|
+
if (isDefaultProfile) {
|
|
30168
|
+
return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
|
|
30169
|
+
}
|
|
30170
|
+
return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
|
|
30171
|
+
};
|
|
30172
|
+
// If in configuration active is false, means it is inheriting values from other profile
|
|
30173
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", __assign({ className: "flexbox-col dc__gap-8 w-100" }, { children: jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__gap-12 dc__align-start w-100" }, { children: [renderMarker(), jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__gap-8 w-100" }, { children: [heading, !isInheriting && children] }))] })) })), showDivider && jsxRuntime.jsx("div", { className: "w-100 dc__border-bottom-n1" })] }));
|
|
30174
|
+
};
|
|
30175
|
+
|
|
30176
|
+
var BuildInfraProfileDescriptionField = function (_a) {
|
|
30177
|
+
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
30178
|
+
var handleChange = function (e) {
|
|
30179
|
+
handleProfileInputChange({
|
|
30180
|
+
action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
|
|
30181
|
+
data: { value: e.currentTarget.value },
|
|
30182
|
+
});
|
|
30183
|
+
};
|
|
30184
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__gap-4 w-100 dc__align-start" }, { children: [jsxRuntime.jsx("label", __assign({ htmlFor: "build-infra-profile-description", className: "m-0 fs-13 fw-4 lh-20 cn-7" }, { children: BUILD_INFRA_TEXT.DESCRIPTION_LABEL })), jsxRuntime.jsx("textarea", { "data-testid": "build-infra-profile-description", name: "profile-description", className: "form__textarea mxh-140 dc__hover-border-n300", id: "build-infra-profile-description", placeholder: BUILD_INFRA_TEXT.DESCRIPTION_PLACEHOLDER, value: currentValue, onChange: handleChange }), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
|
|
30185
|
+
};
|
|
30186
|
+
|
|
30187
|
+
var BuildInfraProfileNameField = function (_a) {
|
|
30188
|
+
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
30189
|
+
var handleChange = function (e) {
|
|
30190
|
+
handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
|
|
30191
|
+
};
|
|
30192
|
+
return (jsxRuntime.jsx("div", __assign({ className: "flexbox-col dc__gap-4 w-100 dc__align-start" }, { children: jsxRuntime.jsx(CustomInput, { name: "profile-name", label: BUILD_INFRA_TEXT.PROFILE_LABEL, labelClassName: "m-0 dc__required-field fs-13 fw-4 lh-20 cn-7", placeholder: BUILD_INFRA_TEXT.PROFILE_PLACEHOLDER, value: currentValue, onChange: handleChange, error: error, required: true, inputWrapClassName: "w-100" }) })));
|
|
30193
|
+
};
|
|
30194
|
+
|
|
30195
|
+
var InheritingHeader = function (_a) {
|
|
30196
|
+
var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
|
|
30197
|
+
var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
|
|
30198
|
+
if (isDefaultProfile || !isInheriting) {
|
|
30199
|
+
// For typing issues
|
|
30200
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
30201
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
|
|
30202
|
+
}
|
|
30203
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__content-space w-100" }, { children: [defaultHeading, jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space w-100" }, { children: [jsxRuntime.jsx("span", __assign({ className: "m-0 pt-0 pb-0 pl-4 pr-4 fs-13 lh-20 fw-4 cn-9 dc__ellipsis-right dc__word-break-all flex-grow-1" }, { children: inheritingDataString })), jsxRuntime.jsx("p", __assign({ className: "m-0 cn-7 fs-13 fw-4 lh-20 dc__no-shrink" }, { children: BUILD_INFRA_TEXT.INHERITING_HEADING_DESCRIPTION }))] }))] })));
|
|
30204
|
+
};
|
|
30205
|
+
var BuildInfraConfigForm = function (_a) {
|
|
30206
|
+
var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
|
|
30207
|
+
var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
|
|
30208
|
+
// will get the desired configuration from the currentConfigurations and then check if it is active or not
|
|
30209
|
+
var isInheritingProfileValues = function (actions) {
|
|
30210
|
+
return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
|
|
30211
|
+
};
|
|
30212
|
+
// Had to show loader for an instance due to batching of state updates not working as expected :/
|
|
30213
|
+
if (!currentConfigurations) {
|
|
30214
|
+
return jsxRuntime.jsx(Progressing, { pageLoader: true });
|
|
30215
|
+
}
|
|
30216
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__mxw-920 dc__gap-16" }, { children: [!isDefaultProfile && (jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__gap-12" }, { children: [jsxRuntime.jsx(BuildInfraProfileNameField, { handleProfileInputChange: handleProfileInputChange, currentValue: profileInput.name, error: profileInputErrors.name }), jsxRuntime.jsx(BuildInfraProfileDescriptionField, { handleProfileInputChange: handleProfileInputChange, currentValue: profileInput.description, error: profileInputErrors.description })] }))), jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__gap-12" }, { children: [configurationContainerLabel, jsxRuntime.jsx("div", __assign({ className: "w-100 flexbox-col dc__gap-16 br-4 dc__border-n1 p-16" }, { children: BUILD_INFRA_FORM_FIELDS.map(function (field, index) { return (jsxRuntime.jsx(BuildInfraFormItem, __assign({ marker: field.marker, heading: jsxRuntime.jsx(InheritingHeader, { defaultHeading: field.heading, inheritingData: field.actions.map(function (action) { return currentConfigurations[action.actionType]; }), isInheriting: isInheritingProfileValues(field.actions), isDefaultProfile: isDefaultProfile }), showDivider: index !== BUILD_INFRA_FORM_FIELDS.length - 1, isInheriting: isInheritingProfileValues(field.actions), handleProfileInputChange: handleProfileInputChange, locator: field.locator, isDefaultProfile: isDefaultProfile }, { children: jsxRuntime.jsx("div", __assign({ className: "w-50 flexbox dc__gap-12 w-100 dc__align-start" }, { children: field.actions.map(function (action) { return (jsxRuntime.jsx(BuildInfraFormAction, { actionType: action.actionType, label: action.label, placeholder: action.placeholder, error: profileInputErrors[action.actionType],
|
|
30217
|
+
// Assumption is for default profiles all input fields are required
|
|
30218
|
+
isRequired: true, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
|
|
30219
|
+
};
|
|
30220
|
+
|
|
30221
|
+
/**
|
|
30222
|
+
* User Status received from the API
|
|
30223
|
+
*/
|
|
30224
|
+
exports.UserStatusDto = void 0;
|
|
30225
|
+
(function (UserStatusDto) {
|
|
30226
|
+
UserStatusDto["active"] = "active";
|
|
30227
|
+
UserStatusDto["inactive"] = "inactive";
|
|
30228
|
+
})(exports.UserStatusDto || (exports.UserStatusDto = {}));
|
|
30229
|
+
/**
|
|
30230
|
+
* User status for the frontend
|
|
30231
|
+
*/
|
|
30232
|
+
exports.UserStatus = void 0;
|
|
30233
|
+
(function (UserStatus) {
|
|
30234
|
+
UserStatus["active"] = "active";
|
|
30235
|
+
UserStatus["inactive"] = "inactive";
|
|
30236
|
+
UserStatus["temporary"] = "temporary";
|
|
30237
|
+
})(exports.UserStatus || (exports.UserStatus = {}));
|
|
30238
|
+
|
|
30239
|
+
exports.APIResponseHandler = APIResponseHandler;
|
|
29283
30240
|
exports.AddCDButton = AddCDButton;
|
|
29284
30241
|
exports.AppStatus = AppStatus;
|
|
30242
|
+
exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
|
|
30243
|
+
exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
|
|
30244
|
+
exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
|
|
30245
|
+
exports.BUILD_INFRA_TEST_IDS = BUILD_INFRA_TEST_IDS;
|
|
30246
|
+
exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
|
|
29285
30247
|
exports.BULK_DROPDOWN_TEST_ID = BULK_DROPDOWN_TEST_ID;
|
|
29286
30248
|
exports.BULK_SELECTION_CONTEXT_ERROR = BULK_SELECTION_CONTEXT_ERROR;
|
|
29287
30249
|
exports.BreadCrumb = BreadCrumb;
|
|
29288
30250
|
exports.BreadcrumbStore = Store;
|
|
30251
|
+
exports.BuildInfraConfigActionMap = BuildInfraConfigActionMap;
|
|
30252
|
+
exports.BuildInfraConfigForm = BuildInfraConfigForm;
|
|
30253
|
+
exports.BuildInfraDescriptor = Descriptor;
|
|
30254
|
+
exports.BuildInfraFooter = Footer;
|
|
29289
30255
|
exports.BuildStageVariable = BuildStageVariable;
|
|
29290
30256
|
exports.BulkSelection = BulkSelection;
|
|
29291
30257
|
exports.BulkSelectionOptionsLabels = BulkSelectionOptionsLabels;
|
|
29292
30258
|
exports.BulkSelectionProvider = BulkSelectionProvider;
|
|
29293
30259
|
exports.CDModalTab = CDModalTab;
|
|
30260
|
+
exports.CLEAR_SELECTIONS_WARNING = CLEAR_SELECTIONS_WARNING;
|
|
30261
|
+
exports.CREATE_MODE_REQUIRED_INPUT_FIELDS = CREATE_MODE_REQUIRED_INPUT_FIELDS;
|
|
30262
|
+
exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
|
|
30263
|
+
exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
|
|
29294
30264
|
exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
|
|
29295
30265
|
exports.Checkbox = Checkbox$1;
|
|
29296
30266
|
exports.ClearIndicator = ClearIndicator;
|
|
@@ -29300,6 +30270,7 @@ exports.ConfirmationDialog = ConfirmationDialog;
|
|
|
29300
30270
|
exports.CustomInput = CustomInput;
|
|
29301
30271
|
exports.CustomSelect = CustomSelect;
|
|
29302
30272
|
exports.DEFAULT_BASE_PAGE_SIZE = DEFAULT_BASE_PAGE_SIZE;
|
|
30273
|
+
exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
|
|
29303
30274
|
exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
|
|
29304
30275
|
exports.DOCUMENTATION = DOCUMENTATION;
|
|
29305
30276
|
exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
|
|
@@ -29333,6 +30304,7 @@ exports.MultiValueRemove = MultiValueRemove;
|
|
|
29333
30304
|
exports.OpaqueModal = OpaqueModal;
|
|
29334
30305
|
exports.Option = Option;
|
|
29335
30306
|
exports.PATTERNS = PATTERNS;
|
|
30307
|
+
exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
|
|
29336
30308
|
exports.Pagination = Pagination;
|
|
29337
30309
|
exports.PopupMenu = PopupMenu;
|
|
29338
30310
|
exports.Progressing = Progressing;
|
|
@@ -29350,6 +30322,7 @@ exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
|
|
|
29350
30322
|
exports.SELECT_ALL_ACROSS_PAGES_LOCATOR = SELECT_ALL_ACROSS_PAGES_LOCATOR;
|
|
29351
30323
|
exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
|
|
29352
30324
|
exports.SearchBar = SearchBar;
|
|
30325
|
+
exports.SelectOption = SelectOption;
|
|
29353
30326
|
exports.ServerError = ServerError;
|
|
29354
30327
|
exports.ServerErrors = ServerErrors;
|
|
29355
30328
|
exports.SingleSelectOption = SingleSelectOption;
|
|
@@ -29373,6 +30346,7 @@ exports.VisibleModal2 = VisibleModal2;
|
|
|
29373
30346
|
exports.abortPreviousRequests = abortPreviousRequests;
|
|
29374
30347
|
exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
|
|
29375
30348
|
exports.copyToClipboard = copyToClipboard;
|
|
30349
|
+
exports.createBuildInfraProfile = createBuildInfraProfile;
|
|
29376
30350
|
exports.createGitCommitUrl = createGitCommitUrl;
|
|
29377
30351
|
exports.customStyles = customStyles;
|
|
29378
30352
|
exports.debounce = debounce$2;
|
|
@@ -29381,7 +30355,10 @@ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
|
|
|
29381
30355
|
exports.genericCDMaterialsService = genericCDMaterialsService;
|
|
29382
30356
|
exports.get = get;
|
|
29383
30357
|
exports.getAlphabetIcon = getAlphabetIcon;
|
|
30358
|
+
exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
|
|
30359
|
+
exports.getCommonSelectStyle = getCommonSelectStyle;
|
|
29384
30360
|
exports.getCookie = getCookie;
|
|
30361
|
+
exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
|
|
29385
30362
|
exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
|
|
29386
30363
|
exports.getFilteredChartVersions = getFilteredChartVersions;
|
|
29387
30364
|
exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
|
|
@@ -29392,11 +30369,13 @@ exports.getLoginInfo = getLoginInfo;
|
|
|
29392
30369
|
exports.getRandomColor = getRandomColor;
|
|
29393
30370
|
exports.getRedirectionProps = getRedirectionProps;
|
|
29394
30371
|
exports.getTeamListMin = getTeamListMin;
|
|
30372
|
+
exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
|
|
29395
30373
|
exports.getUnlockedJSON = getUnlockedJSON;
|
|
29396
30374
|
exports.getUrlWithSearchParams = getUrlWithSearchParams;
|
|
29397
30375
|
exports.getUserRole = getUserRole;
|
|
29398
30376
|
exports.handleAddCD = handleAddCD;
|
|
29399
30377
|
exports.handleUTCTime = handleUTCTime;
|
|
30378
|
+
exports.highlightSearchText = highlightSearchText;
|
|
29400
30379
|
exports.logExceptionToSentry = logExceptionToSentry;
|
|
29401
30380
|
exports.multiSelectStyles = multiSelectStyles;
|
|
29402
30381
|
exports.noop = noop$1;
|
|
@@ -29410,8 +30389,11 @@ exports.sortCallback = sortCallback;
|
|
|
29410
30389
|
exports.stopPropagation = stopPropagation;
|
|
29411
30390
|
exports.toastAccessDenied = toastAccessDenied;
|
|
29412
30391
|
exports.trash = trash;
|
|
30392
|
+
exports.unitSelectorStyles = unitSelectorStyles;
|
|
30393
|
+
exports.updateBuildInfraProfile = updateBuildInfraProfile;
|
|
29413
30394
|
exports.useAsync = useAsync;
|
|
29414
30395
|
exports.useBreadcrumb = useBreadcrumb;
|
|
30396
|
+
exports.useBuildInfraForm = useBuildInfraForm;
|
|
29415
30397
|
exports.useBulkSelection = useBulkSelection;
|
|
29416
30398
|
exports.useClickOutside = useClickOutside;
|
|
29417
30399
|
exports.useEffectAfterMount = useEffectAfterMount;
|
|
@@ -29421,3 +30403,8 @@ exports.useSuperAdmin = useSuperAdmin;
|
|
|
29421
30403
|
exports.useThrottledEffect = useThrottledEffect;
|
|
29422
30404
|
exports.useUrlFilters = useUrlFilters;
|
|
29423
30405
|
exports.useWindowSize = useWindowSize;
|
|
30406
|
+
exports.validateDescription = validateDescription;
|
|
30407
|
+
exports.validateName = validateName;
|
|
30408
|
+
exports.validateRequestLimit = validateRequestLimit;
|
|
30409
|
+
exports.validateRequiredPositiveInteger = validateRequiredPositiveInteger;
|
|
30410
|
+
exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;
|