@devtron-labs/devtron-fe-common-lib 0.0.62-beta-3 → 0.0.62-beta-5

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.
Files changed (78) hide show
  1. package/dist/Common/Constants.d.ts +1 -0
  2. package/dist/Common/Hooks/useUrlFilters/types.d.ts +35 -0
  3. package/dist/Pages/GlobalConfigurations/Authorization/constants.d.ts +4 -0
  4. package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +1 -0
  5. package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +23 -0
  6. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +4 -0
  7. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +4 -0
  8. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +7 -0
  9. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +4 -0
  10. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +4 -0
  11. package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +4 -0
  12. package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +4 -0
  13. package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +50 -0
  14. package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +7 -0
  15. package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +6 -0
  16. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +286 -0
  17. package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +12 -0
  18. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
  19. package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +4 -0
  20. package/dist/Shared/Components/APIResponseHandler/constants.d.ts +4 -0
  21. package/dist/Shared/Components/APIResponseHandler/index.d.ts +2 -0
  22. package/dist/Shared/Components/APIResponseHandler/types.d.ts +37 -0
  23. package/dist/Shared/Components/BulkSelection/constants.d.ts +1 -0
  24. package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +7 -0
  25. package/dist/Shared/Components/FilterChips/index.d.ts +2 -0
  26. package/dist/Shared/Components/FilterChips/types.d.ts +37 -0
  27. package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
  28. package/dist/Shared/Components/ReactSelect/utils.d.ts +12 -0
  29. package/dist/Shared/Components/index.d.ts +3 -0
  30. package/dist/Shared/Helpers.d.ts +16 -0
  31. package/dist/Shared/index.d.ts +2 -0
  32. package/dist/Shared/validations.d.ts +8 -0
  33. package/dist/index.js +1221 -170
  34. package/package.json +1 -1
  35. package/src/Assets/Icon/ic-cpu.svg +4 -0
  36. package/src/Assets/Icon/ic-memory.svg +3 -0
  37. package/src/Assets/Icon/ic-timer.svg +3 -0
  38. package/src/Common/BreadCrumb/Types.ts +0 -1
  39. package/src/Common/Checkbox.tsx +1 -0
  40. package/src/Common/Constants.ts +2 -1
  41. package/src/Common/CustomInput/CustomInput.tsx +2 -1
  42. package/src/Common/DraggableWrapper/DraggableWrapper.tsx +3 -1
  43. package/src/Common/Hooks/useUrlFilters/types.ts +35 -0
  44. package/src/Common/RJSF/utils.ts +2 -0
  45. package/src/Common/SearchBar/searchBar.scss +1 -1
  46. package/src/Pages/GlobalConfigurations/Authorization/constants.ts +5 -0
  47. package/src/Pages/GlobalConfigurations/Authorization/index.ts +1 -0
  48. package/src/Pages/GlobalConfigurations/Authorization/types.ts +25 -0
  49. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +128 -0
  50. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +44 -0
  51. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +106 -0
  52. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +55 -0
  53. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +32 -0
  54. package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +45 -0
  55. package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +56 -0
  56. package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +4 -0
  57. package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +139 -0
  58. package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +7 -0
  59. package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +167 -0
  60. package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +339 -0
  61. package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +507 -0
  62. package/src/Pages/GlobalConfigurations/index.ts +1 -0
  63. package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +41 -0
  64. package/src/Shared/Components/APIResponseHandler/constants.tsx +5 -0
  65. package/src/Shared/Components/APIResponseHandler/index.ts +2 -0
  66. package/src/Shared/Components/APIResponseHandler/types.tsx +39 -0
  67. package/src/Shared/Components/BulkSelection/BulkSelectionDropdownItems.tsx +3 -1
  68. package/src/Shared/Components/BulkSelection/BulkSelectionProvider.tsx +12 -1
  69. package/src/Shared/Components/BulkSelection/constants.tsx +1 -0
  70. package/src/Shared/Components/FilterChips/FilterChips.component.tsx +100 -0
  71. package/src/Shared/Components/FilterChips/index.ts +2 -0
  72. package/src/Shared/Components/FilterChips/types.ts +39 -0
  73. package/src/Shared/Components/ReactSelect/index.ts +1 -0
  74. package/src/Shared/Components/ReactSelect/utils.tsx +97 -0
  75. package/src/Shared/Components/index.ts +3 -0
  76. package/src/Shared/Helpers.tsx +29 -0
  77. package/src/Shared/index.ts +2 -0
  78. 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$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); }
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$t({
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$s() {
855
- _extends$s = Object.assign || function (target) {
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$s.apply(this, arguments);
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$s({}, userStyle, {
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$s({}, style, {
1873
+ var containerStyle = !toastList.length ? _extends$v({}, style, {
1873
1874
  pointerEvents: 'none'
1874
- }) : _extends$s({}, style);
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$s({}, options, {
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$s({
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$s({}, options, pending));
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$s({
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$s({}, baseParams, params));
2045
+ toast.update(id, _extends$v({}, baseParams, params));
2045
2046
  } else {
2046
2047
  // using toast.promise without loading
2047
- toast(params.render, _extends$s({}, baseParams, params));
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$s({
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$s({}, oldOptions, options, {
2129
+ var nextOptions = _extends$v({}, oldOptions, options, {
2129
2130
  toastId: options.toastId || toastId,
2130
2131
  updateId: generateToastId()
2131
2132
  });
@@ -12066,16 +12067,16 @@ var Modal = function (_a) {
12066
12067
  }, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
12067
12068
  };
12068
12069
 
12069
- var _path$h;
12070
- 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); }
12070
+ var _path$k;
12071
+ 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
12072
  var SvgIcCross = function SvgIcCross(props) {
12072
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
12073
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
12073
12074
  width: "1em",
12074
12075
  height: "1em",
12075
12076
  viewBox: "0 0 24 24",
12076
12077
  fill: "none",
12077
12078
  xmlns: "http://www.w3.org/2000/svg"
12078
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
12079
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
12079
12080
  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
12081
  fill: "#596168"
12081
12082
  })));
@@ -16374,30 +16375,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
16374
16375
 
16375
16376
  var Tippy = index;
16376
16377
 
16377
- var _path$g;
16378
- 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); }
16378
+ var _path$j;
16379
+ 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
16380
  var SvgIcHelp = function SvgIcHelp(props) {
16380
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
16381
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
16381
16382
  xmlns: "http://www.w3.org/2000/svg",
16382
16383
  width: "1em",
16383
16384
  height: "1em",
16384
16385
  viewBox: "0 0 24 24"
16385
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
16386
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
16386
16387
  fill: "#767D84",
16387
16388
  fillRule: "evenodd",
16388
16389
  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
16390
  })));
16390
16391
  };
16391
16392
 
16392
- var _path$f;
16393
- 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); }
16393
+ var _path$i;
16394
+ 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
16395
  var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
16395
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
16396
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
16396
16397
  xmlns: "http://www.w3.org/2000/svg",
16397
16398
  viewBox: "0 0 17 16",
16398
16399
  width: "1em",
16399
16400
  height: "1em"
16400
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
16401
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
16401
16402
  fill: "#767D84",
16402
16403
  fillRule: "evenodd",
16403
16404
  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 +16450,16 @@ function TippyCustomized(props) {
16449
16450
  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
16451
  }
16451
16452
 
16452
- var _path$e, _circle, _path2$1;
16453
- function _extends$o() { _extends$o = 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$o.apply(this, arguments); }
16453
+ var _path$h, _circle, _path2$2;
16454
+ 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
16455
  var SvgInjectTag = function SvgInjectTag(props) {
16455
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
16456
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
16456
16457
  width: "1em",
16457
16458
  height: "1em",
16458
16459
  viewBox: "0 0 20 20",
16459
16460
  fill: "none",
16460
16461
  xmlns: "http://www.w3.org/2000/svg"
16461
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
16462
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
16462
16463
  d: "M10 10H3.333",
16463
16464
  stroke: "#596168",
16464
16465
  strokeWidth: 1.5,
@@ -16469,7 +16470,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
16469
16470
  cy: 10,
16470
16471
  r: 1.667,
16471
16472
  fill: "#596168"
16472
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
16473
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
16473
16474
  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
16475
  stroke: "#596168",
16475
16476
  strokeWidth: 1.5,
@@ -16486,15 +16487,15 @@ function PropagateTagInfo(_a) {
16486
16487
  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
16488
  }
16488
16489
 
16489
- var _path$d;
16490
- 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); }
16490
+ var _path$g;
16491
+ 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
16492
  var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
16492
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16493
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
16493
16494
  xmlns: "http://www.w3.org/2000/svg",
16494
16495
  width: "1em",
16495
16496
  height: "1em",
16496
16497
  viewBox: "0 0 20 20"
16497
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
16498
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
16498
16499
  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
16500
  fill: "#06C",
16500
16501
  fillRule: "evenodd"
@@ -16728,15 +16729,15 @@ var TagDetails = function (_a) {
16728
16729
  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
16730
  };
16730
16731
 
16731
- var _path$c;
16732
- 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); }
16732
+ var _path$f;
16733
+ 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
16734
  var SvgIcAdd = function SvgIcAdd(props) {
16734
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
16735
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
16735
16736
  xmlns: "http://www.w3.org/2000/svg",
16736
16737
  width: "1em",
16737
16738
  height: "1em",
16738
16739
  viewBox: "0 0 24 24"
16739
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
16740
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
16740
16741
  className: "ic-add_svg__fill-color",
16741
16742
  fill: "#999",
16742
16743
  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 +16867,8 @@ function ForceDeleteDialog(_a) {
16866
16867
  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
16868
  }
16868
16869
 
16869
- function _extends$l() {
16870
- _extends$l = Object.assign ? Object.assign.bind() : function (target) {
16870
+ function _extends$o() {
16871
+ _extends$o = Object.assign ? Object.assign.bind() : function (target) {
16871
16872
  for (var i = 1; i < arguments.length; i++) {
16872
16873
  var source = arguments[i];
16873
16874
  for (var key in source) {
@@ -16878,7 +16879,7 @@ function _extends$l() {
16878
16879
  }
16879
16880
  return target;
16880
16881
  };
16881
- return _extends$l.apply(this, arguments);
16882
+ return _extends$o.apply(this, arguments);
16882
16883
  }
16883
16884
 
16884
16885
  /*
@@ -20419,7 +20420,7 @@ var Menu = function Menu(props) {
20419
20420
  getStyles = props.getStyles,
20420
20421
  innerRef = props.innerRef,
20421
20422
  innerProps = props.innerProps;
20422
- return jsx("div", _extends$l({
20423
+ return jsx("div", _extends$o({
20423
20424
  css: getStyles('menu', props),
20424
20425
  className: cx({
20425
20426
  menu: true
@@ -20451,7 +20452,7 @@ var MenuList$1 = function MenuList(props) {
20451
20452
  innerProps = props.innerProps,
20452
20453
  innerRef = props.innerRef,
20453
20454
  isMulti = props.isMulti;
20454
- return jsx("div", _extends$l({
20455
+ return jsx("div", _extends$o({
20455
20456
  css: getStyles('menuList', props),
20456
20457
  className: cx({
20457
20458
  'menu-list': true,
@@ -20482,7 +20483,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
20482
20483
  cx = props.cx,
20483
20484
  getStyles = props.getStyles,
20484
20485
  innerProps = props.innerProps;
20485
- return jsx("div", _extends$l({
20486
+ return jsx("div", _extends$o({
20486
20487
  css: getStyles('noOptionsMessage', props),
20487
20488
  className: cx({
20488
20489
  'menu-notice': true,
@@ -20499,7 +20500,7 @@ var LoadingMessage = function LoadingMessage(props) {
20499
20500
  cx = props.cx,
20500
20501
  getStyles = props.getStyles,
20501
20502
  innerProps = props.innerProps;
20502
- return jsx("div", _extends$l({
20503
+ return jsx("div", _extends$o({
20503
20504
  css: getStyles('loadingMessage', props),
20504
20505
  className: cx({
20505
20506
  'menu-notice': true,
@@ -20587,7 +20588,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
20587
20588
  rect: rect
20588
20589
  }; // same wrapper element whether fixed or portalled
20589
20590
 
20590
- var menuWrapper = jsx("div", _extends$l({
20591
+ var menuWrapper = jsx("div", _extends$o({
20591
20592
  css: getStyles('menuPortal', state),
20592
20593
  className: cx({
20593
20594
  'menu-portal': true
@@ -20623,7 +20624,7 @@ var SelectContainer = function SelectContainer(props) {
20623
20624
  innerProps = props.innerProps,
20624
20625
  isDisabled = props.isDisabled,
20625
20626
  isRtl = props.isRtl;
20626
- return jsx("div", _extends$l({
20627
+ return jsx("div", _extends$o({
20627
20628
  css: getStyles('container', props),
20628
20629
  className: cx({
20629
20630
  '--is-disabled': isDisabled,
@@ -20658,7 +20659,7 @@ var ValueContainer = function ValueContainer(props) {
20658
20659
  isMulti = props.isMulti,
20659
20660
  getStyles = props.getStyles,
20660
20661
  hasValue = props.hasValue;
20661
- return jsx("div", _extends$l({
20662
+ return jsx("div", _extends$o({
20662
20663
  css: getStyles('valueContainer', props),
20663
20664
  className: cx({
20664
20665
  'value-container': true,
@@ -20684,7 +20685,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
20684
20685
  cx = props.cx,
20685
20686
  innerProps = props.innerProps,
20686
20687
  getStyles = props.getStyles;
20687
- return jsx("div", _extends$l({
20688
+ return jsx("div", _extends$o({
20688
20689
  css: getStyles('indicatorsContainer', props),
20689
20690
  className: cx({
20690
20691
  indicators: true
@@ -20715,7 +20716,7 @@ var Svg = function Svg(_ref) {
20715
20716
  var size = _ref.size,
20716
20717
  props = _objectWithoutProperties(_ref, _excluded$2);
20717
20718
 
20718
- return jsx("svg", _extends$l({
20719
+ return jsx("svg", _extends$o({
20719
20720
  height: size,
20720
20721
  width: size,
20721
20722
  viewBox: "0 0 20 20",
@@ -20726,14 +20727,14 @@ var Svg = function Svg(_ref) {
20726
20727
  };
20727
20728
 
20728
20729
  var CrossIcon = function CrossIcon(props) {
20729
- return jsx(Svg, _extends$l({
20730
+ return jsx(Svg, _extends$o({
20730
20731
  size: 20
20731
20732
  }, props), jsx("path", {
20732
20733
  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
20734
  }));
20734
20735
  };
20735
20736
  var DownChevron = function DownChevron(props) {
20736
- return jsx(Svg, _extends$l({
20737
+ return jsx(Svg, _extends$o({
20737
20738
  size: 20
20738
20739
  }, props), jsx("path", {
20739
20740
  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 +20767,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
20766
20767
  cx = props.cx,
20767
20768
  getStyles = props.getStyles,
20768
20769
  innerProps = props.innerProps;
20769
- return jsx("div", _extends$l({
20770
+ return jsx("div", _extends$o({
20770
20771
  css: getStyles('dropdownIndicator', props),
20771
20772
  className: cx({
20772
20773
  indicator: true,
@@ -20781,7 +20782,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
20781
20782
  cx = props.cx,
20782
20783
  getStyles = props.getStyles,
20783
20784
  innerProps = props.innerProps;
20784
- return jsx("div", _extends$l({
20785
+ return jsx("div", _extends$o({
20785
20786
  css: getStyles('clearIndicator', props),
20786
20787
  className: cx({
20787
20788
  indicator: true,
@@ -20811,7 +20812,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
20811
20812
  cx = props.cx,
20812
20813
  getStyles = props.getStyles,
20813
20814
  innerProps = props.innerProps;
20814
- return jsx("span", _extends$l({}, innerProps, {
20815
+ return jsx("span", _extends$o({}, innerProps, {
20815
20816
  css: getStyles('indicatorSeparator', props),
20816
20817
  className: cx({
20817
20818
  'indicator-separator': true
@@ -20866,7 +20867,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
20866
20867
  getStyles = props.getStyles,
20867
20868
  innerProps = props.innerProps,
20868
20869
  isRtl = props.isRtl;
20869
- return jsx("div", _extends$l({
20870
+ return jsx("div", _extends$o({
20870
20871
  css: getStyles('loadingIndicator', props),
20871
20872
  className: cx({
20872
20873
  indicator: true,
@@ -20927,7 +20928,7 @@ var Control = function Control(props) {
20927
20928
  innerRef = props.innerRef,
20928
20929
  innerProps = props.innerProps,
20929
20930
  menuIsOpen = props.menuIsOpen;
20930
- return jsx("div", _extends$l({
20931
+ return jsx("div", _extends$o({
20931
20932
  ref: innerRef,
20932
20933
  css: getStyles('control', props),
20933
20934
  className: cx({
@@ -20959,12 +20960,12 @@ var Group = function Group(props) {
20959
20960
  label = props.label,
20960
20961
  theme = props.theme,
20961
20962
  selectProps = props.selectProps;
20962
- return jsx("div", _extends$l({
20963
+ return jsx("div", _extends$o({
20963
20964
  css: getStyles('group', props),
20964
20965
  className: cx({
20965
20966
  group: true
20966
20967
  }, className)
20967
- }, innerProps), jsx(Heading, _extends$l({}, headingProps, {
20968
+ }, innerProps), jsx(Heading, _extends$o({}, headingProps, {
20968
20969
  selectProps: selectProps,
20969
20970
  theme: theme,
20970
20971
  getStyles: getStyles,
@@ -20996,7 +20997,7 @@ var GroupHeading = function GroupHeading(props) {
20996
20997
  _cleanCommonProps.data;
20997
20998
  var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
20998
20999
 
20999
- return jsx("div", _extends$l({
21000
+ return jsx("div", _extends$o({
21000
21001
  css: getStyles('groupHeading', props),
21001
21002
  className: cx({
21002
21003
  'group-heading': true
@@ -21072,7 +21073,7 @@ var Input = function Input(props) {
21072
21073
  }, className),
21073
21074
  css: getStyles('input', props),
21074
21075
  "data-value": value || ''
21075
- }, jsx("input", _extends$l({
21076
+ }, jsx("input", _extends$o({
21076
21077
  className: cx({
21077
21078
  input: true
21078
21079
  }, inputClassName),
@@ -21142,7 +21143,7 @@ var MultiValueLabel = MultiValueGeneric;
21142
21143
  function MultiValueRemove$1(_ref5) {
21143
21144
  var children = _ref5.children,
21144
21145
  innerProps = _ref5.innerProps;
21145
- return jsx("div", _extends$l({
21146
+ return jsx("div", _extends$o({
21146
21147
  role: "button"
21147
21148
  }, innerProps), children || jsx(CrossIcon, {
21148
21149
  size: 14
@@ -21231,7 +21232,7 @@ var Option$1 = function Option(props) {
21231
21232
  isSelected = props.isSelected,
21232
21233
  innerRef = props.innerRef,
21233
21234
  innerProps = props.innerProps;
21234
- return jsx("div", _extends$l({
21235
+ return jsx("div", _extends$o({
21235
21236
  css: getStyles('option', props),
21236
21237
  className: cx({
21237
21238
  option: true,
@@ -21263,7 +21264,7 @@ var Placeholder = function Placeholder(props) {
21263
21264
  cx = props.cx,
21264
21265
  getStyles = props.getStyles,
21265
21266
  innerProps = props.innerProps;
21266
- return jsx("div", _extends$l({
21267
+ return jsx("div", _extends$o({
21267
21268
  css: getStyles('placeholder', props),
21268
21269
  className: cx({
21269
21270
  placeholder: true
@@ -21296,7 +21297,7 @@ var SingleValue = function SingleValue(props) {
21296
21297
  getStyles = props.getStyles,
21297
21298
  isDisabled = props.isDisabled,
21298
21299
  innerProps = props.innerProps;
21299
- return jsx("div", _extends$l({
21300
+ return jsx("div", _extends$o({
21300
21301
  css: getStyles('singleValue', props),
21301
21302
  className: cx({
21302
21303
  'single-value': true,
@@ -21544,7 +21545,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
21544
21545
  };
21545
21546
 
21546
21547
  var A11yText = function A11yText(props) {
21547
- return jsx("span", _extends$l({
21548
+ return jsx("span", _extends$o({
21548
21549
  css: _ref
21549
21550
  }, props));
21550
21551
  };
@@ -22080,7 +22081,7 @@ function DummyInput(_ref) {
22080
22081
  var innerRef = _ref.innerRef,
22081
22082
  props = _objectWithoutProperties(_ref, _excluded);
22082
22083
 
22083
- return jsx("input", _extends$l({
22084
+ return jsx("input", _extends$o({
22084
22085
  ref: innerRef
22085
22086
  }, props, {
22086
22087
  css: /*#__PURE__*/css$2({
@@ -23715,7 +23716,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23715
23716
 
23716
23717
  if (!isSearchable) {
23717
23718
  // use a dummy input to maintain focus/blur functionality
23718
- return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$l({
23719
+ return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$o({
23719
23720
  id: id,
23720
23721
  innerRef: this.getInputRef,
23721
23722
  onBlur: this.onInputBlur,
@@ -23729,7 +23730,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23729
23730
  }, ariaAttributes));
23730
23731
  }
23731
23732
 
23732
- return /*#__PURE__*/React__namespace.createElement(Input, _extends$l({}, commonProps, {
23733
+ return /*#__PURE__*/React__namespace.createElement(Input, _extends$o({}, commonProps, {
23733
23734
  autoCapitalize: "none",
23734
23735
  autoComplete: "off",
23735
23736
  autoCorrect: "off",
@@ -23773,7 +23774,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23773
23774
  isFocused = _this$state5.isFocused;
23774
23775
 
23775
23776
  if (!this.hasValue() || !controlShouldRenderValue) {
23776
- return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$l({}, commonProps, {
23777
+ return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$o({}, commonProps, {
23777
23778
  key: "placeholder",
23778
23779
  isDisabled: isDisabled,
23779
23780
  isFocused: isFocused,
@@ -23787,7 +23788,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23787
23788
  return selectValue.map(function (opt, index) {
23788
23789
  var isOptionFocused = opt === focusedValue;
23789
23790
  var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
23790
- return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$l({}, commonProps, {
23791
+ return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$o({}, commonProps, {
23791
23792
  components: {
23792
23793
  Container: MultiValueContainer,
23793
23794
  Label: MultiValueLabel,
@@ -23819,7 +23820,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23819
23820
  }
23820
23821
 
23821
23822
  var singleValue = selectValue[0];
23822
- return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$l({}, commonProps, {
23823
+ return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$o({}, commonProps, {
23823
23824
  data: singleValue,
23824
23825
  isDisabled: isDisabled
23825
23826
  }), this.formatOptionLabel(singleValue, 'value'));
@@ -23845,7 +23846,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23845
23846
  onTouchEnd: this.onClearIndicatorTouchEnd,
23846
23847
  'aria-hidden': 'true'
23847
23848
  };
23848
- return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$l({}, commonProps, {
23849
+ return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$o({}, commonProps, {
23849
23850
  innerProps: innerProps,
23850
23851
  isFocused: isFocused
23851
23852
  }));
@@ -23865,7 +23866,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23865
23866
  var innerProps = {
23866
23867
  'aria-hidden': 'true'
23867
23868
  };
23868
- return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$l({}, commonProps, {
23869
+ return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$o({}, commonProps, {
23869
23870
  innerProps: innerProps,
23870
23871
  isDisabled: isDisabled,
23871
23872
  isFocused: isFocused
@@ -23883,7 +23884,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23883
23884
  var commonProps = this.commonProps;
23884
23885
  var isDisabled = this.props.isDisabled;
23885
23886
  var isFocused = this.state.isFocused;
23886
- return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$l({}, commonProps, {
23887
+ return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$o({}, commonProps, {
23887
23888
  isDisabled: isDisabled,
23888
23889
  isFocused: isFocused
23889
23890
  }));
@@ -23903,7 +23904,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23903
23904
  onTouchEnd: this.onDropdownIndicatorTouchEnd,
23904
23905
  'aria-hidden': 'true'
23905
23906
  };
23906
- return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$l({}, commonProps, {
23907
+ return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$o({}, commonProps, {
23907
23908
  innerProps: innerProps,
23908
23909
  isDisabled: isDisabled,
23909
23910
  isFocused: isFocused
@@ -23966,7 +23967,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23966
23967
  onMouseOver: onHover,
23967
23968
  tabIndex: -1
23968
23969
  };
23969
- return /*#__PURE__*/React__namespace.createElement(Option, _extends$l({}, commonProps, {
23970
+ return /*#__PURE__*/React__namespace.createElement(Option, _extends$o({}, commonProps, {
23970
23971
  innerProps: innerProps,
23971
23972
  data: data,
23972
23973
  isDisabled: isDisabled,
@@ -23990,7 +23991,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23990
23991
  groupIndex = item.index;
23991
23992
  var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
23992
23993
  var headingId = "".concat(groupId, "-heading");
23993
- return /*#__PURE__*/React__namespace.createElement(Group, _extends$l({}, commonProps, {
23994
+ return /*#__PURE__*/React__namespace.createElement(Group, _extends$o({}, commonProps, {
23994
23995
  key: groupId,
23995
23996
  data: _data,
23996
23997
  options: options,
@@ -24029,12 +24030,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24029
24030
  menuPosition: menuPosition,
24030
24031
  menuShouldScrollIntoView: menuShouldScrollIntoView
24031
24032
  };
24032
- var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$l({}, commonProps, menuPlacementProps), function (_ref4) {
24033
+ var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$o({}, commonProps, menuPlacementProps), function (_ref4) {
24033
24034
  var ref = _ref4.ref,
24034
24035
  _ref4$placerProps = _ref4.placerProps,
24035
24036
  placement = _ref4$placerProps.placement,
24036
24037
  maxHeight = _ref4$placerProps.maxHeight;
24037
- return /*#__PURE__*/React__namespace.createElement(Menu, _extends$l({}, commonProps, menuPlacementProps, {
24038
+ return /*#__PURE__*/React__namespace.createElement(Menu, _extends$o({}, commonProps, menuPlacementProps, {
24038
24039
  innerRef: ref,
24039
24040
  innerProps: {
24040
24041
  onMouseDown: _this4.onMenuMouseDown,
@@ -24049,7 +24050,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24049
24050
  onBottomArrive: onMenuScrollToBottom,
24050
24051
  lockEnabled: menuShouldBlockScroll
24051
24052
  }, function (scrollTargetRef) {
24052
- return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$l({}, commonProps, {
24053
+ return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$o({}, commonProps, {
24053
24054
  innerRef: function innerRef(instance) {
24054
24055
  _this4.getMenuListRef(instance);
24055
24056
 
@@ -24064,7 +24065,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24064
24065
  // so we use the same component. the actual portalling logic is forked
24065
24066
  // within the component based on `menuPosition`
24066
24067
 
24067
- return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$l({}, commonProps, {
24068
+ return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$o({}, commonProps, {
24068
24069
  appendTo: menuPortalTarget,
24069
24070
  controlElement: this.controlRef,
24070
24071
  menuPlacement: menuPlacement,
@@ -24129,7 +24130,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24129
24130
  isFocused = _this$state6.isFocused,
24130
24131
  selectValue = _this$state6.selectValue;
24131
24132
  var focusableOptions = this.getFocusableOptions();
24132
- return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$l({}, commonProps, {
24133
+ return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$o({}, commonProps, {
24133
24134
  id: this.getElementId('live-region'),
24134
24135
  ariaSelection: ariaSelection,
24135
24136
  focusedOption: focusedOption,
@@ -24155,7 +24156,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24155
24156
  menuIsOpen = _this$props14.menuIsOpen;
24156
24157
  var isFocused = this.state.isFocused;
24157
24158
  var commonProps = this.commonProps = this.getCommonProps();
24158
- return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$l({}, commonProps, {
24159
+ return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$o({}, commonProps, {
24159
24160
  className: className,
24160
24161
  innerProps: {
24161
24162
  id: id,
@@ -24163,7 +24164,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24163
24164
  },
24164
24165
  isDisabled: isDisabled,
24165
24166
  isFocused: isFocused
24166
- }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$l({}, commonProps, {
24167
+ }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$o({}, commonProps, {
24167
24168
  innerRef: this.getControlRef,
24168
24169
  innerProps: {
24169
24170
  onMouseDown: this.onControlMouseDown,
@@ -24172,9 +24173,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24172
24173
  isDisabled: isDisabled,
24173
24174
  isFocused: isFocused,
24174
24175
  menuIsOpen: menuIsOpen
24175
- }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$l({}, commonProps, {
24176
+ }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$o({}, commonProps, {
24176
24177
  isDisabled: isDisabled
24177
- }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$l({}, commonProps, {
24178
+ }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$o({}, commonProps, {
24178
24179
  isDisabled: isDisabled
24179
24180
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
24180
24181
  }
@@ -24247,7 +24248,7 @@ Select$1.defaultProps = defaultProps;
24247
24248
 
24248
24249
  var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24249
24250
  var baseSelectProps = useStateManager(props);
24250
- return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$l({
24251
+ return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$o({
24251
24252
  ref: ref
24252
24253
  }, baseSelectProps));
24253
24254
  });
@@ -24255,9 +24256,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24255
24256
  var ReactSelect = StateManagedSelect;
24256
24257
 
24257
24258
  var _g$6;
24258
- 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); }
24259
+ 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
24260
  var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24260
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
24261
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
24261
24262
  xmlns: "http://www.w3.org/2000/svg",
24262
24263
  viewBox: "0 0 28 28",
24263
24264
  width: "1em",
@@ -24278,15 +24279,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24278
24279
  }))));
24279
24280
  };
24280
24281
 
24281
- var _path$b;
24282
- 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); }
24282
+ var _path$e;
24283
+ 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
24284
  var SvgIcCheck = function SvgIcCheck(props) {
24284
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
24285
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
24285
24286
  xmlns: "http://www.w3.org/2000/svg",
24286
24287
  width: "1em",
24287
24288
  height: "1em",
24288
24289
  viewBox: "0 0 24 24"
24289
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
24290
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
24290
24291
  stroke: "#06C",
24291
24292
  strokeLinecap: "round",
24292
24293
  strokeLinejoin: "round",
@@ -24298,9 +24299,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
24298
24299
  };
24299
24300
 
24300
24301
  var _g$5;
24301
- 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); }
24302
+ 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
24303
  var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
24303
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24304
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
24304
24305
  xmlns: "http://www.w3.org/2000/svg",
24305
24306
  width: "1em",
24306
24307
  height: "1em",
@@ -24629,6 +24630,7 @@ Valid States of Checkbox:
24629
24630
  5. disabled: false, checked: true, value: INTERMIDIATE
24630
24631
  6. disabled: false, checked: true, value: CHECKED
24631
24632
  */
24633
+ // TODO: Associate label with input element
24632
24634
  var Checkbox$1 = /** @class */ (function (_super) {
24633
24635
  __extends$1(Checkbox, _super);
24634
24636
  function Checkbox() {
@@ -24643,9 +24645,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
24643
24645
  }(React.Component));
24644
24646
 
24645
24647
  var _g$4;
24646
- 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); }
24648
+ 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
24649
  var SvgIcSearch = function SvgIcSearch(props) {
24648
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24650
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
24649
24651
  xmlns: "http://www.w3.org/2000/svg",
24650
24652
  viewBox: "0 0 24 24",
24651
24653
  width: "1em",
@@ -24662,9 +24664,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
24662
24664
  };
24663
24665
 
24664
24666
  var _g$3;
24665
- 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); }
24667
+ 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
24668
  var SvgIcErrorCross = function SvgIcErrorCross(props) {
24667
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24669
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
24668
24670
  xmlns: "http://www.w3.org/2000/svg",
24669
24671
  width: "1em",
24670
24672
  height: "1em",
@@ -24686,7 +24688,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
24686
24688
  }))));
24687
24689
  };
24688
24690
 
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}";
24691
+ 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
24692
  styleInject(css_248z$5);
24691
24693
 
24692
24694
  /**
@@ -24768,16 +24770,16 @@ var SearchBar = function (_a) {
24768
24770
  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
24771
  };
24770
24772
 
24771
- var _path$a;
24772
- 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); }
24773
+ var _path$d;
24774
+ 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
24775
  var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
24774
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
24776
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24775
24777
  xmlns: "http://www.w3.org/2000/svg",
24776
24778
  width: "1em",
24777
24779
  height: "1em",
24778
24780
  viewBox: "0 0 12 12",
24779
24781
  fill: "none"
24780
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
24782
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
24781
24783
  d: "M4.125 8.5 6 10.75 7.875 8.5m-3.75-5L6 1.25 7.875 3.5",
24782
24784
  stroke: "#3B444C",
24783
24785
  strokeWidth: 1.5,
@@ -24786,16 +24788,16 @@ var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
24786
24788
  })));
24787
24789
  };
24788
24790
 
24789
- var _path$9;
24790
- 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); }
24791
+ var _path$c;
24792
+ 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
24793
  var SvgIcSortArrowDown = function SvgIcSortArrowDown(props) {
24792
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
24794
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24793
24795
  width: "1em",
24794
24796
  height: "1em",
24795
24797
  viewBox: "0 0 12 12",
24796
24798
  fill: "none",
24797
24799
  xmlns: "http://www.w3.org/2000/svg"
24798
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
24800
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
24799
24801
  d: "M3.5 7.5 6 10m0 0 2.5-2.5M6 10V2",
24800
24802
  stroke: "#596168",
24801
24803
  strokeWidth: 1.5,
@@ -24959,9 +24961,9 @@ exports.ConsequenceAction = void 0;
24959
24961
  })(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
24960
24962
 
24961
24963
  var _g$2;
24962
- 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); }
24964
+ 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
24965
  var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
24964
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
24966
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24965
24967
  xmlns: "http://www.w3.org/2000/svg",
24966
24968
  width: "1em",
24967
24969
  height: "1em",
@@ -25040,16 +25042,16 @@ function DeleteComponent(_a) {
25040
25042
  return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
25041
25043
  }
25042
25044
 
25043
- var _path$8;
25044
- 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); }
25045
+ var _path$b;
25046
+ 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
25047
  var SvgIcPencil = function SvgIcPencil(props) {
25046
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
25048
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
25047
25049
  width: "1em",
25048
25050
  height: "1em",
25049
25051
  viewBox: "0 0 20 20",
25050
25052
  fill: "none",
25051
25053
  xmlns: "http://www.w3.org/2000/svg"
25052
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
25054
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
25053
25055
  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
25056
  stroke: "#596168",
25055
25057
  strokeWidth: 1.5,
@@ -25058,19 +25060,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
25058
25060
  })));
25059
25061
  };
25060
25062
 
25061
- var _path$7, _path2, _path3;
25062
- 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); }
25063
+ var _path$a, _path2$1, _path3;
25064
+ 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
25065
  var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
25064
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
25066
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
25065
25067
  width: "1em",
25066
25068
  height: "1em",
25067
25069
  viewBox: "0 0 12 12",
25068
25070
  fill: "none",
25069
25071
  xmlns: "http://www.w3.org/2000/svg"
25070
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
25072
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
25071
25073
  d: "M3.742 4.674h-2.25v-2.25",
25072
25074
  fill: "#767D84"
25073
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
25075
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
25074
25076
  d: "M3.742 4.674h-2.25v-2.25",
25075
25077
  stroke: "#596168",
25076
25078
  strokeWidth: 1.5,
@@ -25085,15 +25087,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
25085
25087
  })));
25086
25088
  };
25087
25089
 
25088
- var _path$6;
25089
- 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); }
25090
+ var _path$9;
25091
+ 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
25092
  var SvgIcMinus = function SvgIcMinus(props) {
25091
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
25093
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
25092
25094
  xmlns: "http://www.w3.org/2000/svg",
25093
25095
  width: "1em",
25094
25096
  height: "1em",
25095
25097
  viewBox: "0 0 14 14"
25096
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
25098
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
25097
25099
  fill: "#959BA1",
25098
25100
  className: "ic-minus_svg__fill-color",
25099
25101
  fillRule: "evenodd",
@@ -25102,9 +25104,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
25102
25104
  };
25103
25105
 
25104
25106
  var _g$1;
25105
- 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); }
25107
+ 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
25108
  var SvgIcWarning = function SvgIcWarning(props) {
25107
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25109
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
25108
25110
  xmlns: "http://www.w3.org/2000/svg",
25109
25111
  width: "1em",
25110
25112
  height: "1em",
@@ -25124,9 +25126,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
25124
25126
  };
25125
25127
 
25126
25128
  var _g;
25127
- 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); }
25129
+ 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
25130
  var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25129
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
25131
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
25130
25132
  xmlns: "http://www.w3.org/2000/svg",
25131
25133
  width: "1em",
25132
25134
  height: "1em",
@@ -25143,16 +25145,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25143
25145
  }))));
25144
25146
  };
25145
25147
 
25146
- var _path$5;
25147
- 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); }
25148
+ var _path$8;
25149
+ 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
25150
  var SvgIcEnter = function SvgIcEnter(props) {
25149
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
25151
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
25150
25152
  width: "1em",
25151
25153
  height: "1em",
25152
25154
  viewBox: "0 0 16 16",
25153
25155
  fill: "none",
25154
25156
  xmlns: "http://www.w3.org/2000/svg"
25155
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
25157
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
25156
25158
  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
25159
  fill: "#3B444C"
25158
25160
  })));
@@ -25558,15 +25560,15 @@ function Grid(_a) {
25558
25560
  return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
25559
25561
  }
25560
25562
 
25561
- var _path$4;
25562
- 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); }
25563
+ var _path$7;
25564
+ 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
25565
  var SvgIcCopy = function SvgIcCopy(props) {
25564
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
25566
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25565
25567
  xmlns: "http://www.w3.org/2000/svg",
25566
25568
  width: "1em",
25567
25569
  height: "1em",
25568
25570
  viewBox: "0 0 20 20"
25569
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
25571
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
25570
25572
  fill: "#767D84",
25571
25573
  fillRule: "evenodd",
25572
25574
  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"
@@ -28461,9 +28463,9 @@ var translateString = function (stringToTranslate, params) {
28461
28463
  return utils.englishStringTranslator(stringToTranslate, params);
28462
28464
  }
28463
28465
  };
28464
- var getCommonSelectStyle = function (styleOverrides) {
28466
+ var getCommonSelectStyle$1 = function (styleOverrides) {
28465
28467
  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) {
28468
+ 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
28469
  return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
28468
28470
  } }, styleOverrides);
28469
28471
  };
@@ -28513,15 +28515,15 @@ var getInferredTypeFromValueType = function (value) {
28513
28515
  }
28514
28516
  };
28515
28517
 
28516
- var _path$3;
28517
- 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); }
28518
+ var _path$6;
28519
+ 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
28520
  var SvgIcChevronDown = function SvgIcChevronDown(props) {
28519
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
28521
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
28520
28522
  xmlns: "http://www.w3.org/2000/svg",
28521
28523
  width: "1em",
28522
28524
  height: "1em",
28523
28525
  viewBox: "0 0 24 24"
28524
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
28526
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
28525
28527
  fill: "#999",
28526
28528
  className: "ic-chevron-down_svg__fill-color",
28527
28529
  fillRule: "nonzero",
@@ -28529,7 +28531,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
28529
28531
  })));
28530
28532
  };
28531
28533
 
28532
- var commonStyles = getCommonSelectStyle();
28534
+ var commonStyles = getCommonSelectStyle$1();
28533
28535
  var MenuList = function (_a) {
28534
28536
  var children = _a.children, props = __rest(_a, ["children"]);
28535
28537
  return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
@@ -28581,9 +28583,9 @@ var validator = RJSFValidator.default;
28581
28583
  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
28584
 
28583
28585
  var _style, _rect$2;
28584
- 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); }
28586
+ 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
28587
  var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
28586
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
28588
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
28587
28589
  width: "1em",
28588
28590
  height: "1em",
28589
28591
  viewBox: "0 0 100 100",
@@ -28718,8 +28720,9 @@ var handleAddCD = function (_a) {
28718
28720
  handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
28719
28721
  };
28720
28722
 
28723
+ // TODO: label association with input
28721
28724
  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 ? 1 : _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;
28725
+ 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
28726
  function handleError(error) {
28724
28727
  if (!Array.isArray(error)) {
28725
28728
  return [error];
@@ -28850,23 +28853,26 @@ function DraggableWrapper(_a) {
28850
28853
  y: data.y,
28851
28854
  });
28852
28855
  }
28853
- return (jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed", style: {
28856
+ return (
28857
+ // 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
28858
+ jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
28854
28859
  zIndex: zIndex,
28855
28860
  } }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
28856
28861
  zIndex: zIndex,
28862
+ pointerEvents: 'auto',
28857
28863
  } }, { children: children })) })) })));
28858
28864
  }
28859
28865
 
28860
- var _path$2;
28861
- 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); }
28866
+ var _path$5;
28867
+ 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
28868
  var SvgIcDrag = function SvgIcDrag(props) {
28863
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
28869
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
28864
28870
  width: "1em",
28865
28871
  height: "1em",
28866
28872
  viewBox: "0 0 16 16",
28867
28873
  fill: "none",
28868
28874
  xmlns: "http://www.w3.org/2000/svg"
28869
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
28875
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
28870
28876
  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
28877
  fill: "#596168"
28872
28878
  })));
@@ -28988,23 +28994,438 @@ var Pagination = function (_a) {
28988
28994
  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
28995
  };
28990
28996
 
28997
+ var _path$4, _path2;
28998
+ 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); }
28999
+ var SvgIcCpu = function SvgIcCpu(props) {
29000
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
29001
+ xmlns: "http://www.w3.org/2000/svg",
29002
+ width: "1em",
29003
+ height: "1em",
29004
+ viewBox: "0 0 20 20",
29005
+ fill: "none"
29006
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
29007
+ 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",
29008
+ stroke: "#596168",
29009
+ strokeWidth: 1.5,
29010
+ strokeLinecap: "round",
29011
+ strokeLinejoin: "round"
29012
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
29013
+ d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
29014
+ fill: "#596168"
29015
+ })));
29016
+ };
29017
+
29018
+ var _path$3;
29019
+ 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); }
29020
+ var SvgIcMemory = function SvgIcMemory(props) {
29021
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
29022
+ xmlns: "http://www.w3.org/2000/svg",
29023
+ width: "1em",
29024
+ height: "1em",
29025
+ viewBox: "0 0 20 20",
29026
+ fill: "none"
29027
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
29028
+ 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",
29029
+ stroke: "#596168",
29030
+ strokeWidth: 1.5,
29031
+ strokeLinecap: "round",
29032
+ strokeLinejoin: "round"
29033
+ })));
29034
+ };
29035
+
29036
+ var _path$2;
29037
+ 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); }
29038
+ var SvgIcTimer = function SvgIcTimer(props) {
29039
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
29040
+ xmlns: "http://www.w3.org/2000/svg",
29041
+ width: "1em",
29042
+ height: "1em",
29043
+ viewBox: "0 0 20 20",
29044
+ fill: "none"
29045
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
29046
+ 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",
29047
+ stroke: "#596168",
29048
+ strokeWidth: 1.5,
29049
+ strokeLinecap: "round",
29050
+ strokeLinejoin: "round"
29051
+ })));
29052
+ };
29053
+
29054
+ var _a$2;
28991
29055
  /**
28992
- * User Status received from the API
29056
+ * Unique actions that will be dispatched and,
29057
+ * Keeping some values (cpu_limit, etc) in sync with backend
28993
29058
  */
28994
- exports.UserStatusDto = void 0;
28995
- (function (UserStatusDto) {
28996
- UserStatusDto["active"] = "active";
28997
- UserStatusDto["inactive"] = "inactive";
28998
- })(exports.UserStatusDto || (exports.UserStatusDto = {}));
29059
+ exports.BuildInfraConfigTypes = void 0;
29060
+ (function (BuildInfraConfigTypes) {
29061
+ BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
29062
+ BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
29063
+ BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
29064
+ BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
29065
+ BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
29066
+ })(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
28999
29067
  /**
29000
- * User status for the frontend
29068
+ * Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
29001
29069
  */
29002
- exports.UserStatus = void 0;
29003
- (function (UserStatus) {
29004
- UserStatus["active"] = "active";
29005
- UserStatus["inactive"] = "inactive";
29006
- UserStatus["temporary"] = "temporaryAccess";
29007
- })(exports.UserStatus || (exports.UserStatus = {}));
29070
+ exports.BuildInfraMetaConfigTypes = void 0;
29071
+ (function (BuildInfraMetaConfigTypes) {
29072
+ BuildInfraMetaConfigTypes["NAME"] = "name";
29073
+ BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
29074
+ })(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
29075
+ /**
29076
+ * Would be used as key for few components and would be appending activate and de_activate actions to it
29077
+ */
29078
+ exports.BuildInfraLocators = void 0;
29079
+ (function (BuildInfraLocators) {
29080
+ BuildInfraLocators["CPU"] = "cpu";
29081
+ BuildInfraLocators["MEMORY"] = "memory";
29082
+ // This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
29083
+ BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
29084
+ })(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
29085
+ // FIXME: Derive this from BuildInfraLocators
29086
+ // Appending the locators from above
29087
+ exports.BuildInfraInheritActions = void 0;
29088
+ (function (BuildInfraInheritActions) {
29089
+ BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
29090
+ BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
29091
+ BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
29092
+ BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
29093
+ BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_timeout";
29094
+ BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_timeout";
29095
+ })(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
29096
+ var BuildInfraConfigActionMap = (_a$2 = {},
29097
+ _a$2[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
29098
+ _a$2[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
29099
+ _a$2[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
29100
+ _a$2[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
29101
+ _a$2[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
29102
+ _a$2);
29103
+ exports.BuildInfraProfileVariants = void 0;
29104
+ (function (BuildInfraProfileVariants) {
29105
+ BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
29106
+ BuildInfraProfileVariants["NORMAL"] = "NORMAL";
29107
+ BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
29108
+ })(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
29109
+
29110
+ var _a$1;
29111
+ var BUILD_INFRA_INPUT_CONSTRAINTS = {
29112
+ // Will not enforce any decimal specification on input field
29113
+ STEP: 'any',
29114
+ MIN: 0,
29115
+ DECIMAL_PLACES: 2,
29116
+ };
29117
+ var BUILD_INFRA_TEXT = {
29118
+ HEADING: 'Build Infra Configuration',
29119
+ EDIT_SUBMIT: 'Save changes',
29120
+ SAVE_SUBMIT: 'Save',
29121
+ EDIT_CANCEL: 'Cancel',
29122
+ 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.',
29123
+ DESCRIPTION_LABEL: 'Description',
29124
+ DESCRIPTION_PLACEHOLDER: 'Enter a description here',
29125
+ PROFILE_LABEL: 'Profile name',
29126
+ PROFILE_PLACEHOLDER: 'Enter a name eg. java/node/small/medium/large',
29127
+ INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
29128
+ SUBMIT_BUTTON_TIPPY: {
29129
+ INVALID_INPUT: 'Valid input is required for all mandatory fields.',
29130
+ REQUEST_IN_PROGRESS: 'Request in progress.',
29131
+ },
29132
+ VALIDATE_REQUEST_LIMIT: {
29133
+ REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
29134
+ CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
29135
+ REQUEST_DECIMAL_PLACES: "Request should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
29136
+ LIMIT_DECIMAL_PLACES: "Limit should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
29137
+ },
29138
+ getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
29139
+ getSubmitSuccessMessage: function (profileName, isEdited) {
29140
+ return "".concat(profileName, " profile is ").concat(isEdited ? 'updated' : 'created');
29141
+ },
29142
+ PROFILE_NOT_FOUND: {
29143
+ title: 'Profile not found',
29144
+ subTitle: 'The profile you are looking for does not exist.',
29145
+ },
29146
+ INVALID_FORM_MESSAGE: 'Valid input is required for all mandatory fields.',
29147
+ };
29148
+ var BUILD_INFRA_BREADCRUMB = {
29149
+ alias: {
29150
+ 'global-config': null,
29151
+ 'build-infra': {
29152
+ component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
29153
+ linked: false,
29154
+ },
29155
+ },
29156
+ };
29157
+ // TODO: move heading to component itself
29158
+ var BUILD_INFRA_FORM_FIELDS = [
29159
+ {
29160
+ 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)" })),
29161
+ marker: SvgIcCpu,
29162
+ actions: [
29163
+ {
29164
+ actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
29165
+ label: 'Request',
29166
+ placeholder: 'Type CPU request',
29167
+ },
29168
+ {
29169
+ actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
29170
+ label: 'Limit',
29171
+ placeholder: 'Type CPU limit',
29172
+ },
29173
+ ],
29174
+ locator: exports.BuildInfraLocators.CPU,
29175
+ },
29176
+ {
29177
+ 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)" })),
29178
+ marker: SvgIcMemory,
29179
+ actions: [
29180
+ {
29181
+ actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
29182
+ label: 'Request',
29183
+ placeholder: 'Type memory request',
29184
+ },
29185
+ {
29186
+ actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
29187
+ label: 'Limit',
29188
+ placeholder: 'Type memory limit',
29189
+ },
29190
+ ],
29191
+ locator: exports.BuildInfraLocators.MEMORY,
29192
+ },
29193
+ {
29194
+ heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Build timeout" })),
29195
+ marker: SvgIcTimer,
29196
+ actions: [
29197
+ {
29198
+ actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
29199
+ label: 'Timeout',
29200
+ placeholder: 'Type build timeout',
29201
+ },
29202
+ ],
29203
+ locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
29204
+ },
29205
+ ];
29206
+ var PROFILE_INPUT_ERROR_FIELDS = Object.fromEntries(Object.values(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (value) { return [value, null]; }));
29207
+ // 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
29208
+ var CREATE_MODE_REQUIRED_INPUT_FIELDS = [exports.BuildInfraMetaConfigTypes.NAME];
29209
+ var DEFAULT_PROFILE_NAME = 'default';
29210
+ var CREATE_PROFILE_BASE_VALUE = {
29211
+ name: '',
29212
+ description: '',
29213
+ type: exports.BuildInfraProfileVariants.NORMAL,
29214
+ appCount: 0,
29215
+ };
29216
+ var CREATE_VIEW_CHECKED_CONFIGS = (_a$1 = {},
29217
+ _a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
29218
+ _a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
29219
+ _a$1);
29220
+ var BUILD_INFRA_TEST_IDS = {
29221
+ SUBMIT_BUTTON: 'build-infra-submit-button',
29222
+ CANCEL_BUTTON: 'build-infra-cancel-button',
29223
+ };
29224
+
29225
+ var Descriptor = function (_a) {
29226
+ var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children, tippyInfoText = _a.tippyInfoText, tippyAdditionalContent = _a.tippyAdditionalContent;
29227
+ 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] })));
29228
+ };
29229
+
29230
+ var Footer = function (_a) {
29231
+ var disabled = _a.disabled, handleCancel = _a.handleCancel, editProfile = _a.editProfile, loading = _a.loading;
29232
+ var disableMessage = disabled
29233
+ ? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
29234
+ : BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
29235
+ var getButtonText = function () {
29236
+ if (editProfile) {
29237
+ return BUILD_INFRA_TEXT.EDIT_SUBMIT;
29238
+ }
29239
+ return BUILD_INFRA_TEXT.SAVE_SUBMIT;
29240
+ };
29241
+ var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
29242
+ 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 })))] })));
29243
+ };
29244
+
29245
+ var getBaseProfileObject = function (fromCreateView, profile) {
29246
+ if (fromCreateView) {
29247
+ return CREATE_PROFILE_BASE_VALUE;
29248
+ }
29249
+ return {
29250
+ id: profile.id,
29251
+ name: profile.name,
29252
+ description: profile.description,
29253
+ type: profile.type,
29254
+ appCount: profile.appCount,
29255
+ };
29256
+ };
29257
+ // Would receive a single profile and return transformed response
29258
+ var getTransformedBuildInfraProfileResponse = function (_a) {
29259
+ var _b, _c, _d;
29260
+ var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
29261
+ // Assuming would contain all the keys
29262
+ var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
29263
+ acc[configuration.key] = configuration;
29264
+ return acc;
29265
+ }, {})) !== null && _b !== void 0 ? _b : {};
29266
+ var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
29267
+ acc[configuration.key] = configuration;
29268
+ return acc;
29269
+ }, {})) !== null && _d !== void 0 ? _d : {};
29270
+ var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
29271
+ var _a, _b;
29272
+ var defaultConfiguration = defaultConfigurationsMap[key];
29273
+ 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;
29274
+ // Pushing default value in configurations in case we de-activate the configuration
29275
+ var defaultValue = {
29276
+ value: defaultConfiguration.value,
29277
+ unit: defaultConfiguration.unit,
29278
+ };
29279
+ if (fromCreateView) {
29280
+ acc[key] = {
29281
+ key: key,
29282
+ value: defaultConfiguration.value,
29283
+ unit: defaultConfiguration.unit,
29284
+ active: (_b = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _b !== void 0 ? _b : false,
29285
+ defaultValue: defaultValue,
29286
+ };
29287
+ return acc;
29288
+ }
29289
+ if (profileConfiguration) {
29290
+ acc[key] = __assign(__assign({}, profileConfiguration), { defaultValue: defaultValue });
29291
+ return acc;
29292
+ }
29293
+ // Removing id from it since we do not have a configuration
29294
+ // While generating payload, we will check on the basis of id and active flag.
29295
+ acc[key] = {
29296
+ key: key,
29297
+ value: defaultConfiguration.value,
29298
+ // saving profile name as undefined and this would be a check, if we are deriving from default or not
29299
+ unit: defaultConfiguration.unit,
29300
+ active: false,
29301
+ defaultValue: defaultValue,
29302
+ };
29303
+ return acc;
29304
+ }, {});
29305
+ return {
29306
+ configurationUnits: configurationUnits,
29307
+ profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
29308
+ };
29309
+ };
29310
+ var getBuildInfraProfileByName = function (_a) {
29311
+ var name = _a.name, fromCreateView = _a.fromCreateView;
29312
+ return __awaiter(void 0, void 0, void 0, function () {
29313
+ var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
29314
+ return __generator(this, function (_c) {
29315
+ switch (_c.label) {
29316
+ case 0:
29317
+ _c.trys.push([0, 2, , 3]);
29318
+ return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
29319
+ case 1:
29320
+ response = _c.sent();
29321
+ _b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
29322
+ return [2 /*return*/, getTransformedBuildInfraProfileResponse({
29323
+ configurationUnits: configurationUnits,
29324
+ defaultConfigurations: defaultConfigurations,
29325
+ profile: profile,
29326
+ fromCreateView: fromCreateView,
29327
+ })];
29328
+ case 2:
29329
+ error_1 = _c.sent();
29330
+ showError(error_1);
29331
+ throw error_1;
29332
+ case 3: return [2 /*return*/];
29333
+ }
29334
+ });
29335
+ });
29336
+ };
29337
+ var getBuildInfraProfilePayload = function (profileInput) {
29338
+ var currentConfigurations = profileInput.configurations;
29339
+ var configurationKeys = Object.keys(currentConfigurations);
29340
+ // would only keep the configurations with id or active flag as true
29341
+ var configurations = configurationKeys.reduce(function (acc, key) {
29342
+ var configuration = currentConfigurations[key];
29343
+ if (configuration.id || configuration.active) {
29344
+ acc.push({
29345
+ id: configuration.id,
29346
+ key: key,
29347
+ value: Number(configuration.value),
29348
+ unit: configuration.unit,
29349
+ active: configuration.active,
29350
+ });
29351
+ }
29352
+ return acc;
29353
+ }, []);
29354
+ var payload = {
29355
+ name: profileInput.name,
29356
+ description: profileInput.description,
29357
+ type: profileInput.type,
29358
+ configurations: configurations,
29359
+ };
29360
+ return payload;
29361
+ };
29362
+ var updateBuildInfraProfile = function (_a) {
29363
+ var name = _a.name, profileInput = _a.profileInput;
29364
+ var payload = getBuildInfraProfilePayload(profileInput);
29365
+ return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
29366
+ };
29367
+ var createBuildInfraProfile = function (_a) {
29368
+ var profileInput = _a.profileInput;
29369
+ return __awaiter(void 0, void 0, void 0, function () {
29370
+ var payload;
29371
+ return __generator(this, function (_b) {
29372
+ payload = getBuildInfraProfilePayload(profileInput);
29373
+ return [2 /*return*/, post(ROUTES.INFRA_CONFIG_PROFILE, payload)];
29374
+ });
29375
+ });
29376
+ };
29377
+
29378
+ // eslint-disable-next-line import/prefer-default-export
29379
+ var NOT_FOUND_DEFAULT_TEXT = {
29380
+ title: 'Resource not found',
29381
+ subTitle: 'The resource you are looking for does not exist',
29382
+ };
29383
+
29384
+ var APIResponseHandler = function (_a) {
29385
+ var _b, _c;
29386
+ var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
29387
+ // keeping it above loading since, not expected to send a call if not authorized
29388
+ if (notAuthorized) {
29389
+ return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
29390
+ }
29391
+ if (isLoading) {
29392
+ return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
29393
+ }
29394
+ if (error) {
29395
+ // TODO: Can extend ErrorScreenNotFound
29396
+ if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
29397
+ 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 }));
29398
+ }
29399
+ return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
29400
+ }
29401
+ // Had to add this since while using it is throwing ts error
29402
+ // eslint-disable-next-line react/jsx-no-useless-fragment
29403
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
29404
+ };
29405
+
29406
+ var getCommonSelectStyle = function (styleOverrides) {
29407
+ if (styleOverrides === void 0) { styleOverrides = {}; }
29408
+ 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));
29409
+ };
29410
+ var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
29411
+ if (isSelected) {
29412
+ return 'var(--B100)';
29413
+ }
29414
+ if (isFocused) {
29415
+ return 'var(--N50)';
29416
+ }
29417
+ return 'var(--white)';
29418
+ };
29419
+ var getCustomOptionSelectionStyle = function (styleOverrides) {
29420
+ if (styleOverrides === void 0) { styleOverrides = {}; }
29421
+ 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)); };
29422
+ };
29423
+ var SelectOption = function (props) {
29424
+ var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
29425
+ selectProps.styles.option = getCustomOptionSelectionStyle(style);
29426
+ var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
29427
+ return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
29428
+ };
29008
29429
 
29009
29430
  var BulkSelectionDropdownItems = function (_a) {
29010
29431
  var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
@@ -29013,7 +29434,9 @@ var BulkSelectionDropdownItems = function (_a) {
29013
29434
  action: locator,
29014
29435
  });
29015
29436
  };
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 ? 'cb-5 bcb-2 fs-13 fw-6 lh-20' : '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] })));
29437
+ 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
29438
+ ? 'cb-5 bcb-1 icon-stroke-b5 fs-13 fw-6 lh-20'
29439
+ : '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
29440
  };
29018
29441
 
29019
29442
  exports.BulkSelectionEvents = void 0;
@@ -29042,7 +29465,8 @@ var BulkSelectionOptionsLabels = (_a = {},
29042
29465
  // Considering application can not be named as *
29043
29466
  var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
29044
29467
  var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
29045
- var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
29468
+ var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
29469
+ var CLEAR_SELECTIONS_WARNING = 'Selections on other pages are cleared';
29046
29470
 
29047
29471
  // giving type any here since not exporting this context, rather using it through useBulkSelection hook which is typed
29048
29472
  var BulkSelectionContext = React.createContext({
@@ -29091,6 +29515,7 @@ var BulkSelectionProvider = function (_a) {
29091
29515
  setSelectedIdentifiers({});
29092
29516
  break;
29093
29517
  case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
29518
+ toast.info(CLEAR_SELECTIONS_WARNING);
29094
29519
  setIdentifiersAfterClear(identifiers, selectedIds);
29095
29520
  break;
29096
29521
  }
@@ -29120,6 +29545,9 @@ var BulkSelectionProvider = function (_a) {
29120
29545
  _c));
29121
29546
  break;
29122
29547
  case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
29548
+ if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29549
+ toast.info(CLEAR_SELECTIONS_WARNING);
29550
+ }
29123
29551
  setIdentifiersAfterPageSelection(identifiers);
29124
29552
  break;
29125
29553
  }
@@ -29280,17 +29708,622 @@ var BulkSelection = function (_a) {
29280
29708
  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
29709
  };
29282
29710
 
29711
+ var FilterChip = function (_a) {
29712
+ var _b, _c;
29713
+ var label = _a.label, value = _a.value, handleRemoveFilter = _a.handleRemoveFilter, _d = _a.getFormattedLabel, getFormattedLabel = _d === void 0 ? noop$1 : _d, _e = _a.getFormattedValue, getFormattedValue = _e === void 0 ? noop$1 : _e;
29714
+ var removeFilter = function () {
29715
+ handleRemoveFilter(label, value);
29716
+ };
29717
+ var labelToDisplay = (_b = getFormattedLabel(label)) !== null && _b !== void 0 ? _b : label;
29718
+ var valueToDisplay = (_c = getFormattedValue(label, value)) !== null && _c !== void 0 ? _c : value;
29719
+ return (jsxRuntime.jsxs("div", __assign({ className: "flexbox flex-align-center br-4 dc__border dc__bg-n50 pl-6 pr-6 pt-2 pb-2 dc__user-select-none h-24 dc__gap-6 fs-12 lh-20 cn-9 fw-4" }, { children: [jsxRuntime.jsx("span", __assign({ className: "fw-6 dc__capitalize" }, { children: labelToDisplay })), jsxRuntime.jsx("span", { className: "dc__divider h-24" }), jsxRuntime.jsx("span", __assign({ className: "dc__ellipsis-right" }, { children: valueToDisplay })), jsxRuntime.jsx("button", __assign({ type: "button", className: "flex p-0 dc__transparent", onClick: removeFilter, "aria-label": "Remove filter" }, { children: jsxRuntime.jsx(SvgIcClose, { className: "icon-dim-12 icon-use-fill-n6" }) }))] })));
29720
+ };
29721
+ /**
29722
+ * Component for rendering the applied filter chips
29723
+ */
29724
+ var FilterChips = function (_a) {
29725
+ var filterConfig = _a.filterConfig, clearFilters = _a.clearFilters, onRemoveFilter = _a.onRemoveFilter, getFormattedLabel = _a.getFormattedLabel, getFormattedValue = _a.getFormattedValue;
29726
+ var handleRemoveFilter = function (filterKey, valueToRemove) {
29727
+ var _a;
29728
+ var updatedFilterConfig = JSON.parse(JSON.stringify(filterConfig));
29729
+ if (Array.isArray(filterConfig[filterKey])) {
29730
+ onRemoveFilter(__assign(__assign({}, updatedFilterConfig), (_a = {}, _a[filterKey] = updatedFilterConfig[filterKey].filter(function (val) { return val !== valueToRemove; }), _a)));
29731
+ return;
29732
+ }
29733
+ if (filterKey in updatedFilterConfig) {
29734
+ delete updatedFilterConfig[filterKey];
29735
+ onRemoveFilter(updatedFilterConfig);
29736
+ }
29737
+ };
29738
+ var chips = Object.entries(filterConfig).filter(function (_a) {
29739
+ var _b = __read(_a, 2), value = _b[1];
29740
+ return (Array.isArray(value) ? value.length : !!value);
29741
+ });
29742
+ return (chips.length > 0 && (jsxRuntime.jsxs("div", __assign({ className: "flexbox pt-6 pb-6 flex-wrap dc__gap-8" }, { children: [chips.map(function (_a) {
29743
+ var _b = __read(_a, 2), filterKey = _b[0], filterValue = _b[1];
29744
+ return Array.isArray(filterValue) ? (filterValue.map(function (filter) { return (jsxRuntime.jsx(FilterChip, { label: filterKey, value: filter, handleRemoveFilter: handleRemoveFilter, getFormattedLabel: getFormattedLabel, getFormattedValue: getFormattedValue }, "".concat(filterKey, "-").concat(filter))); })) : (jsxRuntime.jsx(FilterChip, { label: filterKey, value: filterValue, handleRemoveFilter: handleRemoveFilter, getFormattedLabel: getFormattedLabel, getFormattedValue: getFormattedValue }, filterKey));
29745
+ }), jsxRuntime.jsx("div", __assign({ className: "flex" }, { children: jsxRuntime.jsx("button", __assign({ type: "button", className: "cta text fs-13 lh-20-imp h-20 p-0-imp", onClick: clearFilters }, { children: "Clear All Filters" })) }))] }))));
29746
+ };
29747
+
29748
+ var MESSAGES = {
29749
+ PROVIDE_A_NUMBER: 'Please provide a number',
29750
+ LOWERCASE_ALPHANUMERIC: 'Only lowercase alphanumeric characters, -, _ or . allowed',
29751
+ CAN_NOT_START_END_WITH_SEPARATORS: 'Cannot start/end with -, _ or .',
29752
+ getMinMaxCharMessage: function (min, max) { return "Minimum ".concat(min, " and maximum ").concat(max, " characters allowed"); },
29753
+ getMaxCharMessage: function (max) { return "Maximum ".concat(max, " characters are allowed"); },
29754
+ VALID_POSITIVE_NUMBER: 'This field should be a valid positive number',
29755
+ VALID_POSITIVE_INTEGER: 'This field should be a valid positive integer',
29756
+ MAX_SAFE_INTEGER: "Maximum allowed value is ".concat(Number.MAX_SAFE_INTEGER),
29757
+ };
29758
+ var MAX_DESCRIPTION_LENGTH = 300;
29759
+ var validateName = function (name) {
29760
+ if (!/^.{3,50}$/.test(name)) {
29761
+ return {
29762
+ isValid: false,
29763
+ message: MESSAGES.getMinMaxCharMessage(3, 50),
29764
+ };
29765
+ }
29766
+ if (!/^[a-z0-9-._]+$/.test(name)) {
29767
+ return {
29768
+ isValid: false,
29769
+ message: MESSAGES.LOWERCASE_ALPHANUMERIC,
29770
+ };
29771
+ }
29772
+ if (!/^(?![-._]).*[^-._]$/.test(name)) {
29773
+ return {
29774
+ isValid: false,
29775
+ message: MESSAGES.CAN_NOT_START_END_WITH_SEPARATORS,
29776
+ };
29777
+ }
29778
+ return {
29779
+ isValid: true,
29780
+ };
29781
+ };
29782
+ var validateDescription = function (description) {
29783
+ if ((description === null || description === void 0 ? void 0 : description.length) > MAX_DESCRIPTION_LENGTH) {
29784
+ return {
29785
+ isValid: false,
29786
+ message: MESSAGES.getMaxCharMessage(MAX_DESCRIPTION_LENGTH),
29787
+ };
29788
+ }
29789
+ return {
29790
+ isValid: true,
29791
+ };
29792
+ };
29793
+ var validateRequiredPositiveNumber = function (value) {
29794
+ if (!value) {
29795
+ return {
29796
+ isValid: false,
29797
+ message: MESSAGES.PROVIDE_A_NUMBER,
29798
+ };
29799
+ }
29800
+ // TODO: Look if regex is available for this, since 0002 is not a valid number
29801
+ if (!/^\d+(\.\d+)?$/.test(value.toString())) {
29802
+ return {
29803
+ isValid: false,
29804
+ message: MESSAGES.VALID_POSITIVE_NUMBER,
29805
+ };
29806
+ }
29807
+ var numericValue = Number(value);
29808
+ if (numericValue > Number.MAX_SAFE_INTEGER) {
29809
+ return {
29810
+ isValid: false,
29811
+ message: MESSAGES.MAX_SAFE_INTEGER,
29812
+ };
29813
+ }
29814
+ if (numericValue <= 0) {
29815
+ return {
29816
+ isValid: false,
29817
+ message: MESSAGES.VALID_POSITIVE_NUMBER,
29818
+ };
29819
+ }
29820
+ return {
29821
+ isValid: true,
29822
+ };
29823
+ };
29824
+ var validateRequiredPositiveInteger = function (value) {
29825
+ if (!value) {
29826
+ return {
29827
+ isValid: false,
29828
+ message: MESSAGES.PROVIDE_A_NUMBER,
29829
+ };
29830
+ }
29831
+ if (!/^\d+$/.test(value.toString())) {
29832
+ return {
29833
+ isValid: false,
29834
+ message: MESSAGES.VALID_POSITIVE_INTEGER,
29835
+ };
29836
+ }
29837
+ var numericValue = Number(value);
29838
+ if (numericValue > Number.MAX_SAFE_INTEGER) {
29839
+ return {
29840
+ isValid: false,
29841
+ message: MESSAGES.MAX_SAFE_INTEGER,
29842
+ };
29843
+ }
29844
+ if (numericValue <= 0) {
29845
+ return {
29846
+ isValid: false,
29847
+ message: MESSAGES.VALID_POSITIVE_INTEGER,
29848
+ };
29849
+ }
29850
+ return {
29851
+ isValid: true,
29852
+ };
29853
+ };
29854
+
29855
+ // Disabling default export since this is a helper function and we would have to export a lot of functions in future.
29856
+ // eslint-disable-next-line import/prefer-default-export
29857
+ var highlightSearchText = function (_a) {
29858
+ var searchText = _a.searchText, text = _a.text, highlightClasses = _a.highlightClasses;
29859
+ if (!searchText) {
29860
+ return text;
29861
+ }
29862
+ try {
29863
+ var regex = new RegExp(searchText, 'gi');
29864
+ return text.replace(regex, function (match) { return "<span class=\"".concat(highlightClasses, "\">").concat(match, "</span>"); });
29865
+ }
29866
+ catch (error) {
29867
+ return text;
29868
+ }
29869
+ };
29870
+
29871
+ var validateRequestLimit = function (_a) {
29872
+ var _b, _c, _d, _e, _f, _g;
29873
+ var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
29874
+ // Request <= Limit
29875
+ // Request and Limit should be numbers can be decimals
29876
+ // Request and Limit should be positive numbers
29877
+ // Request and Limit should be less than Number.MAX_SAFE_INTEGER
29878
+ // Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
29879
+ // Both request and limit should be there
29880
+ var requestNumber = Number(request.value);
29881
+ var limitNumber = Number(limit.value);
29882
+ var requestUnit = Number((_b = unitsMap[request.unit]) === null || _b === void 0 ? void 0 : _b.conversionFactor);
29883
+ var limitUnit = Number((_c = unitsMap[limit.unit]) === null || _c === void 0 ? void 0 : _c.conversionFactor);
29884
+ var requestLimitValidationResponse = {
29885
+ request: {
29886
+ isValid: true,
29887
+ },
29888
+ limit: {
29889
+ isValid: true,
29890
+ },
29891
+ };
29892
+ var requestValidationMessage = validateRequiredPositiveNumber(request.value).message;
29893
+ var limitValidationMessage = validateRequiredPositiveNumber(limit.value).message;
29894
+ if (requestValidationMessage) {
29895
+ requestLimitValidationResponse.request = {
29896
+ message: requestValidationMessage,
29897
+ isValid: false,
29898
+ };
29899
+ }
29900
+ if (limitValidationMessage) {
29901
+ requestLimitValidationResponse.limit = {
29902
+ message: limitValidationMessage,
29903
+ isValid: false,
29904
+ };
29905
+ }
29906
+ if (limitValidationMessage || requestValidationMessage) {
29907
+ return requestLimitValidationResponse;
29908
+ }
29909
+ // only two decimal places are allowed
29910
+ var requestDecimalPlaces = (_e = (_d = String(request.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
29911
+ var limitDecimalPlaces = (_g = (_f = String(limit.value).split('.')[1]) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0;
29912
+ if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29913
+ requestLimitValidationResponse.request = {
29914
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
29915
+ isValid: false,
29916
+ };
29917
+ return requestLimitValidationResponse;
29918
+ }
29919
+ if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29920
+ requestLimitValidationResponse.limit = {
29921
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
29922
+ isValid: false,
29923
+ };
29924
+ return requestLimitValidationResponse;
29925
+ }
29926
+ // Assuming requestUnit and requestNumber are not 0
29927
+ // TODO: Communicate this assumption to the backend
29928
+ var limitRequestUnitFactor = limitUnit / requestUnit;
29929
+ var limitRequestFactor = limitNumber / requestNumber;
29930
+ var isDifferenceBigNumber = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
29931
+ if (!isDifferenceBigNumber) {
29932
+ requestLimitValidationResponse.request = {
29933
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
29934
+ isValid: false,
29935
+ };
29936
+ return requestLimitValidationResponse;
29937
+ }
29938
+ if (limitRequestUnitFactor * limitRequestFactor < 1) {
29939
+ requestLimitValidationResponse.request = {
29940
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
29941
+ isValid: false,
29942
+ };
29943
+ return requestLimitValidationResponse;
29944
+ }
29945
+ return requestLimitValidationResponse;
29946
+ };
29947
+ var getInitialProfileInputErrors = function (fromCreateView) {
29948
+ if (fromCreateView) {
29949
+ var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29950
+ CREATE_MODE_REQUIRED_INPUT_FIELDS.forEach(function (field) {
29951
+ initialProfileInputErrors_1[field] = '';
29952
+ });
29953
+ return initialProfileInputErrors_1;
29954
+ }
29955
+ return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29956
+ };
29957
+ var useBuildInfraForm = function (_a) {
29958
+ var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
29959
+ var fromCreateView = !name;
29960
+ var _b = __read(useAsync(function () {
29961
+ return getBuildInfraProfileByName({
29962
+ name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
29963
+ fromCreateView: fromCreateView,
29964
+ });
29965
+ }, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
29966
+ // If configuration is existing and is active then use it else use default from profileResponse
29967
+ var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
29968
+ var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
29969
+ var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
29970
+ React.useEffect(function () {
29971
+ if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
29972
+ setProfileInput(__assign({}, profileResponse.profile));
29973
+ setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
29974
+ }
29975
+ }, [profileResponse, isLoading]);
29976
+ // NOTE: Currently sending and receiving values as string, but will parse it to number for payload
29977
+ var handleProfileInputChange = function (_a) {
29978
+ var action = _a.action, data = _a.data;
29979
+ var currentInput = __assign({}, profileInput);
29980
+ var currentInputErrors = __assign({}, profileInputErrors);
29981
+ var lastSavedConfiguration = profileResponse.profile.configurations;
29982
+ var currentConfiguration = currentInput.configurations;
29983
+ var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
29984
+ switch (action) {
29985
+ case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
29986
+ currentInput.description = value;
29987
+ currentInputErrors.description = validateDescription(value).message;
29988
+ break;
29989
+ case exports.BuildInfraMetaConfigTypes.NAME:
29990
+ currentInput.name = value;
29991
+ currentInputErrors.name = validateName(value).message;
29992
+ break;
29993
+ case exports.BuildInfraConfigTypes.CPU_LIMIT: {
29994
+ currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
29995
+ var _c = validateRequestLimit({
29996
+ request: {
29997
+ value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
29998
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
29999
+ },
30000
+ limit: {
30001
+ value: value,
30002
+ unit: unit,
30003
+ },
30004
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
30005
+ }), request = _c.request, limit = _c.limit;
30006
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
30007
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
30008
+ break;
30009
+ }
30010
+ case exports.BuildInfraConfigTypes.CPU_REQUEST: {
30011
+ currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
30012
+ var _d = validateRequestLimit({
30013
+ request: {
30014
+ value: value,
30015
+ unit: unit,
30016
+ },
30017
+ limit: {
30018
+ value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
30019
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
30020
+ },
30021
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
30022
+ }), request = _d.request, limit = _d.limit;
30023
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
30024
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
30025
+ break;
30026
+ }
30027
+ case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
30028
+ currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
30029
+ var _e = validateRequestLimit({
30030
+ request: {
30031
+ value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
30032
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
30033
+ },
30034
+ limit: {
30035
+ value: value,
30036
+ unit: unit,
30037
+ },
30038
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
30039
+ }), request = _e.request, limit = _e.limit;
30040
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
30041
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
30042
+ break;
30043
+ }
30044
+ case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
30045
+ currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
30046
+ var _f = validateRequestLimit({
30047
+ request: {
30048
+ value: value,
30049
+ unit: unit,
30050
+ },
30051
+ limit: {
30052
+ value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
30053
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
30054
+ },
30055
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
30056
+ }), request = _f.request, limit = _f.limit;
30057
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
30058
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
30059
+ break;
30060
+ }
30061
+ case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
30062
+ currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
30063
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveInteger(value).message;
30064
+ break;
30065
+ }
30066
+ case exports.BuildInfraInheritActions.ACTIVATE_CPU:
30067
+ 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 });
30068
+ 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 });
30069
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
30070
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
30071
+ break;
30072
+ case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
30073
+ 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 });
30074
+ 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 });
30075
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
30076
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
30077
+ break;
30078
+ case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
30079
+ 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 });
30080
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
30081
+ break;
30082
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
30083
+ // Reverting the value and unit to defaultValues
30084
+ 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 });
30085
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
30086
+ break;
30087
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
30088
+ 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 });
30089
+ 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 });
30090
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
30091
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
30092
+ break;
30093
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
30094
+ 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 });
30095
+ 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 });
30096
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
30097
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
30098
+ break;
30099
+ default:
30100
+ throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
30101
+ }
30102
+ setProfileInput(currentInput);
30103
+ setProfileInputErrors(currentInputErrors);
30104
+ };
30105
+ var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
30106
+ var hasErrors, err_1;
30107
+ return __generator(this, function (_a) {
30108
+ switch (_a.label) {
30109
+ case 0:
30110
+ e.preventDefault();
30111
+ hasErrors = Object.keys(profileInputErrors).filter(function (item) { return profileInputErrors[item] !== null && profileInputErrors[item] !== undefined; }).length > 0;
30112
+ if (hasErrors) {
30113
+ toast.error(BUILD_INFRA_TEXT.INVALID_FORM_MESSAGE);
30114
+ return [2 /*return*/];
30115
+ }
30116
+ setLoadingActionRequest(true);
30117
+ _a.label = 1;
30118
+ case 1:
30119
+ _a.trys.push([1, 6, , 7]);
30120
+ if (!editProfile) return [3 /*break*/, 3];
30121
+ return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
30122
+ case 2:
30123
+ _a.sent();
30124
+ return [3 /*break*/, 5];
30125
+ case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
30126
+ case 4:
30127
+ _a.sent();
30128
+ _a.label = 5;
30129
+ case 5:
30130
+ setLoadingActionRequest(false);
30131
+ toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
30132
+ if (handleSuccessRedirection) {
30133
+ handleSuccessRedirection();
30134
+ }
30135
+ else {
30136
+ reloadRequest();
30137
+ }
30138
+ return [3 /*break*/, 7];
30139
+ case 6:
30140
+ err_1 = _a.sent();
30141
+ showError(err_1);
30142
+ setLoadingActionRequest(false);
30143
+ return [3 /*break*/, 7];
30144
+ case 7: return [2 /*return*/];
30145
+ }
30146
+ });
30147
+ }); };
30148
+ return {
30149
+ isLoading: isLoading,
30150
+ profileResponse: profileResponse,
30151
+ responseError: responseError,
30152
+ reloadRequest: reloadRequest,
30153
+ profileInput: profileInput,
30154
+ profileInputErrors: profileInputErrors,
30155
+ handleProfileInputChange: handleProfileInputChange,
30156
+ loadingActionRequest: loadingActionRequest,
30157
+ handleSubmit: handleSubmit,
30158
+ };
30159
+ };
30160
+ var unitSelectorStyles = function () {
30161
+ return getCommonSelectStyle({
30162
+ 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': {
30163
+ border: '1px solid var(--N400)',
30164
+ } })); },
30165
+ indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
30166
+ dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
30167
+ option: function (base, state) { return (__assign(__assign(__assign(__assign(__assign({}, base), { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', cursor: 'pointer' }), (state.isFocused
30168
+ ? {
30169
+ backgroundColor: 'var(--N50)',
30170
+ }
30171
+ : {})), (state.isSelected && {
30172
+ backgroundColor: 'var(--B100)',
30173
+ fontWeight: 600,
30174
+ color: 'var(--B500)',
30175
+ })), { '&:active': {
30176
+ backgroundColor: 'var(--N50)',
30177
+ } })); },
30178
+ valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
30179
+ menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
30180
+ });
30181
+ };
30182
+
30183
+ /**
30184
+ * In case need arise for variants break this CustomInput and Select as a separate component
30185
+ */
30186
+ var BuildInfraFormAction = function (_a) {
30187
+ 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;
30188
+ var handleUnitChange = function (selectedUnit) {
30189
+ var data = {
30190
+ unit: selectedUnit.label,
30191
+ value: currentValue,
30192
+ };
30193
+ handleProfileInputChange({ action: actionType, data: data });
30194
+ };
30195
+ var handleInputChange = function (e) {
30196
+ var data = {
30197
+ unit: currentUnitName,
30198
+ value: e.currentTarget.value,
30199
+ };
30200
+ handleProfileInputChange({ action: actionType, data: data });
30201
+ };
30202
+ var unitOptions = React.useMemo(function () {
30203
+ var _a, _b;
30204
+ var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
30205
+ label: unit.name,
30206
+ value: String(unit.conversionFactor),
30207
+ }); })) !== null && _b !== void 0 ? _b : [];
30208
+ return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
30209
+ }, [profileUnitsMap]);
30210
+ var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
30211
+ 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: {
30212
+ IndicatorSeparator: null,
30213
+ ClearIndicator: null,
30214
+ }, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
30215
+ };
30216
+
30217
+ var BuildInfraFormItem = function (_a) {
30218
+ 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;
30219
+ var handleActivationChange = function (e) {
30220
+ var checked = e.currentTarget.checked;
30221
+ var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
30222
+ handleProfileInputChange({ action: action });
30223
+ };
30224
+ var renderMarker = function () {
30225
+ if (isDefaultProfile) {
30226
+ return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
30227
+ }
30228
+ return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
30229
+ };
30230
+ // If in configuration active is false, means it is inheriting values from other profile
30231
+ 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" })] }));
30232
+ };
30233
+
30234
+ var BuildInfraProfileDescriptionField = function (_a) {
30235
+ var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
30236
+ var handleChange = function (e) {
30237
+ handleProfileInputChange({
30238
+ action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
30239
+ data: { value: e.currentTarget.value },
30240
+ });
30241
+ };
30242
+ 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] })))] })));
30243
+ };
30244
+
30245
+ var BuildInfraProfileNameField = function (_a) {
30246
+ var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
30247
+ var handleChange = function (e) {
30248
+ handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
30249
+ };
30250
+ 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" }) })));
30251
+ };
30252
+
30253
+ var InheritingHeader = function (_a) {
30254
+ var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
30255
+ var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
30256
+ if (isDefaultProfile || !isInheriting) {
30257
+ // For typing issues
30258
+ // eslint-disable-next-line react/jsx-no-useless-fragment
30259
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
30260
+ }
30261
+ 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 }))] }))] })));
30262
+ };
30263
+ var BuildInfraConfigForm = function (_a) {
30264
+ var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
30265
+ var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
30266
+ // will get the desired configuration from the currentConfigurations and then check if it is active or not
30267
+ var isInheritingProfileValues = function (actions) {
30268
+ return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
30269
+ };
30270
+ // Had to show loader for an instance due to batching of state updates not working as expected :/
30271
+ if (!currentConfigurations) {
30272
+ return jsxRuntime.jsx(Progressing, { pageLoader: true });
30273
+ }
30274
+ 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],
30275
+ // Assumption is for default profiles all input fields are required
30276
+ isRequired: true, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
30277
+ };
30278
+
30279
+ exports.UserListSortableKeys = void 0;
30280
+ (function (UserListSortableKeys) {
30281
+ UserListSortableKeys["email"] = "email_id";
30282
+ UserListSortableKeys["lastLogin"] = "last_login";
30283
+ })(exports.UserListSortableKeys || (exports.UserListSortableKeys = {}));
30284
+ /**
30285
+ * User Status received from the API
30286
+ */
30287
+ exports.UserStatusDto = void 0;
30288
+ (function (UserStatusDto) {
30289
+ UserStatusDto["active"] = "active";
30290
+ UserStatusDto["inactive"] = "inactive";
30291
+ })(exports.UserStatusDto || (exports.UserStatusDto = {}));
30292
+ /**
30293
+ * User status for the frontend
30294
+ */
30295
+ exports.UserStatus = void 0;
30296
+ (function (UserStatus) {
30297
+ UserStatus["active"] = "active";
30298
+ UserStatus["inactive"] = "inactive";
30299
+ UserStatus["temporary"] = "temporaryAccess";
30300
+ })(exports.UserStatus || (exports.UserStatus = {}));
30301
+
30302
+ exports.APIResponseHandler = APIResponseHandler;
29283
30303
  exports.AddCDButton = AddCDButton;
29284
30304
  exports.AppStatus = AppStatus;
30305
+ exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
30306
+ exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
30307
+ exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
30308
+ exports.BUILD_INFRA_TEST_IDS = BUILD_INFRA_TEST_IDS;
30309
+ exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
29285
30310
  exports.BULK_DROPDOWN_TEST_ID = BULK_DROPDOWN_TEST_ID;
29286
30311
  exports.BULK_SELECTION_CONTEXT_ERROR = BULK_SELECTION_CONTEXT_ERROR;
29287
30312
  exports.BreadCrumb = BreadCrumb;
29288
30313
  exports.BreadcrumbStore = Store;
30314
+ exports.BuildInfraConfigActionMap = BuildInfraConfigActionMap;
30315
+ exports.BuildInfraConfigForm = BuildInfraConfigForm;
30316
+ exports.BuildInfraDescriptor = Descriptor;
30317
+ exports.BuildInfraFooter = Footer;
29289
30318
  exports.BuildStageVariable = BuildStageVariable;
29290
30319
  exports.BulkSelection = BulkSelection;
29291
30320
  exports.BulkSelectionOptionsLabels = BulkSelectionOptionsLabels;
29292
30321
  exports.BulkSelectionProvider = BulkSelectionProvider;
29293
30322
  exports.CDModalTab = CDModalTab;
30323
+ exports.CLEAR_SELECTIONS_WARNING = CLEAR_SELECTIONS_WARNING;
30324
+ exports.CREATE_MODE_REQUIRED_INPUT_FIELDS = CREATE_MODE_REQUIRED_INPUT_FIELDS;
30325
+ exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
30326
+ exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
29294
30327
  exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
29295
30328
  exports.Checkbox = Checkbox$1;
29296
30329
  exports.ClearIndicator = ClearIndicator;
@@ -29300,6 +30333,7 @@ exports.ConfirmationDialog = ConfirmationDialog;
29300
30333
  exports.CustomInput = CustomInput;
29301
30334
  exports.CustomSelect = CustomSelect;
29302
30335
  exports.DEFAULT_BASE_PAGE_SIZE = DEFAULT_BASE_PAGE_SIZE;
30336
+ exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
29303
30337
  exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
29304
30338
  exports.DOCUMENTATION = DOCUMENTATION;
29305
30339
  exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
@@ -29318,6 +30352,7 @@ exports.EmptyState = EmptyState;
29318
30352
  exports.ErrorScreenManager = ErrorScreenManager;
29319
30353
  exports.ErrorScreenNotAuthorized = ErrorScreenNotAuthorized;
29320
30354
  exports.FALLBACK_REQUEST_TIMEOUT = FALLBACK_REQUEST_TIMEOUT;
30355
+ exports.FilterChips = FilterChips;
29321
30356
  exports.ForceDeleteDialog = ForceDeleteDialog;
29322
30357
  exports.GenericEmptyState = GenericEmptyState;
29323
30358
  exports.Grid = Grid;
@@ -29333,6 +30368,7 @@ exports.MultiValueRemove = MultiValueRemove;
29333
30368
  exports.OpaqueModal = OpaqueModal;
29334
30369
  exports.Option = Option;
29335
30370
  exports.PATTERNS = PATTERNS;
30371
+ exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
29336
30372
  exports.Pagination = Pagination;
29337
30373
  exports.PopupMenu = PopupMenu;
29338
30374
  exports.Progressing = Progressing;
@@ -29350,6 +30386,7 @@ exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
29350
30386
  exports.SELECT_ALL_ACROSS_PAGES_LOCATOR = SELECT_ALL_ACROSS_PAGES_LOCATOR;
29351
30387
  exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
29352
30388
  exports.SearchBar = SearchBar;
30389
+ exports.SelectOption = SelectOption;
29353
30390
  exports.ServerError = ServerError;
29354
30391
  exports.ServerErrors = ServerErrors;
29355
30392
  exports.SingleSelectOption = SingleSelectOption;
@@ -29373,6 +30410,7 @@ exports.VisibleModal2 = VisibleModal2;
29373
30410
  exports.abortPreviousRequests = abortPreviousRequests;
29374
30411
  exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
29375
30412
  exports.copyToClipboard = copyToClipboard;
30413
+ exports.createBuildInfraProfile = createBuildInfraProfile;
29376
30414
  exports.createGitCommitUrl = createGitCommitUrl;
29377
30415
  exports.customStyles = customStyles;
29378
30416
  exports.debounce = debounce$2;
@@ -29381,7 +30419,10 @@ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
29381
30419
  exports.genericCDMaterialsService = genericCDMaterialsService;
29382
30420
  exports.get = get;
29383
30421
  exports.getAlphabetIcon = getAlphabetIcon;
30422
+ exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
30423
+ exports.getCommonSelectStyle = getCommonSelectStyle;
29384
30424
  exports.getCookie = getCookie;
30425
+ exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
29385
30426
  exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
29386
30427
  exports.getFilteredChartVersions = getFilteredChartVersions;
29387
30428
  exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
@@ -29392,11 +30433,13 @@ exports.getLoginInfo = getLoginInfo;
29392
30433
  exports.getRandomColor = getRandomColor;
29393
30434
  exports.getRedirectionProps = getRedirectionProps;
29394
30435
  exports.getTeamListMin = getTeamListMin;
30436
+ exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
29395
30437
  exports.getUnlockedJSON = getUnlockedJSON;
29396
30438
  exports.getUrlWithSearchParams = getUrlWithSearchParams;
29397
30439
  exports.getUserRole = getUserRole;
29398
30440
  exports.handleAddCD = handleAddCD;
29399
30441
  exports.handleUTCTime = handleUTCTime;
30442
+ exports.highlightSearchText = highlightSearchText;
29400
30443
  exports.logExceptionToSentry = logExceptionToSentry;
29401
30444
  exports.multiSelectStyles = multiSelectStyles;
29402
30445
  exports.noop = noop$1;
@@ -29410,8 +30453,11 @@ exports.sortCallback = sortCallback;
29410
30453
  exports.stopPropagation = stopPropagation;
29411
30454
  exports.toastAccessDenied = toastAccessDenied;
29412
30455
  exports.trash = trash;
30456
+ exports.unitSelectorStyles = unitSelectorStyles;
30457
+ exports.updateBuildInfraProfile = updateBuildInfraProfile;
29413
30458
  exports.useAsync = useAsync;
29414
30459
  exports.useBreadcrumb = useBreadcrumb;
30460
+ exports.useBuildInfraForm = useBuildInfraForm;
29415
30461
  exports.useBulkSelection = useBulkSelection;
29416
30462
  exports.useClickOutside = useClickOutside;
29417
30463
  exports.useEffectAfterMount = useEffectAfterMount;
@@ -29421,3 +30467,8 @@ exports.useSuperAdmin = useSuperAdmin;
29421
30467
  exports.useThrottledEffect = useThrottledEffect;
29422
30468
  exports.useUrlFilters = useUrlFilters;
29423
30469
  exports.useWindowSize = useWindowSize;
30470
+ exports.validateDescription = validateDescription;
30471
+ exports.validateName = validateName;
30472
+ exports.validateRequestLimit = validateRequestLimit;
30473
+ exports.validateRequiredPositiveInteger = validateRequiredPositiveInteger;
30474
+ exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;