@devtron-labs/devtron-fe-common-lib 0.0.61-beta-8 → 0.0.61-beta-10

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 (97) hide show
  1. package/dist/Common/Constants.d.ts +1 -14
  2. package/dist/Common/DraggableWrapper/types.d.ts +1 -4
  3. package/dist/Common/Helper.d.ts +4 -1
  4. package/dist/Common/Hooks/index.d.ts +0 -1
  5. package/dist/Common/Types.d.ts +1 -13
  6. package/dist/Common/index.d.ts +0 -1
  7. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +4 -0
  8. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +4 -0
  9. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +7 -0
  10. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +4 -0
  11. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +4 -0
  12. package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +4 -0
  13. package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +4 -0
  14. package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +50 -0
  15. package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +7 -0
  16. package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +6 -0
  17. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +286 -0
  18. package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +12 -0
  19. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -1
  20. package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +4 -0
  21. package/dist/Shared/Components/APIResponseHandler/constants.d.ts +4 -0
  22. package/dist/Shared/Components/APIResponseHandler/index.d.ts +2 -0
  23. package/dist/Shared/Components/APIResponseHandler/types.d.ts +37 -0
  24. package/dist/Shared/Components/BulkSelection/constants.d.ts +1 -0
  25. package/dist/Shared/Components/BulkSelection/types.d.ts +0 -2
  26. package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
  27. package/dist/Shared/Components/ReactSelect/utils.d.ts +12 -0
  28. package/dist/Shared/Components/index.d.ts +2 -0
  29. package/dist/Shared/Helpers.d.ts +16 -0
  30. package/dist/Shared/index.d.ts +2 -0
  31. package/dist/Shared/validations.d.ts +8 -0
  32. package/dist/index.js +1193 -386
  33. package/package.json +1 -1
  34. package/src/Assets/Icon/ic-cpu.svg +4 -0
  35. package/src/Assets/Icon/ic-memory.svg +3 -0
  36. package/src/Assets/Icon/ic-timer.svg +3 -0
  37. package/src/Common/BreadCrumb/Types.ts +0 -1
  38. package/src/Common/Checkbox.tsx +1 -0
  39. package/src/Common/Constants.ts +3 -18
  40. package/src/Common/CustomInput/CustomInput.tsx +2 -1
  41. package/src/Common/DraggableWrapper/DraggableWrapper.tsx +3 -1
  42. package/src/Common/DraggableWrapper/types.ts +1 -4
  43. package/src/Common/Helper.tsx +31 -24
  44. package/src/Common/Hooks/index.ts +0 -1
  45. package/src/Common/RJSF/utils.ts +2 -0
  46. package/src/Common/SearchBar/searchBar.scss +1 -1
  47. package/src/Common/Types.ts +1 -13
  48. package/src/Common/index.ts +0 -1
  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 -1
  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/BulkSelection.tsx +2 -2
  68. package/src/Shared/Components/BulkSelection/BulkSelectionDropdownItems.tsx +3 -1
  69. package/src/Shared/Components/BulkSelection/BulkSelectionProvider.tsx +17 -17
  70. package/src/Shared/Components/BulkSelection/constants.tsx +1 -0
  71. package/src/Shared/Components/BulkSelection/types.tsx +0 -2
  72. package/src/Shared/Components/ReactSelect/index.ts +1 -0
  73. package/src/Shared/Components/ReactSelect/utils.tsx +97 -0
  74. package/src/Shared/Components/index.ts +2 -0
  75. package/src/Shared/Helpers.tsx +29 -0
  76. package/src/Shared/index.ts +2 -0
  77. package/src/Shared/validations.tsx +130 -0
  78. package/dist/Common/Hooks/useUrlFilters/constants.d.ts +0 -8
  79. package/dist/Common/Hooks/useUrlFilters/index.d.ts +0 -2
  80. package/dist/Common/Hooks/useUrlFilters/types.d.ts +0 -19
  81. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +0 -20
  82. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +0 -18
  83. package/dist/Common/SortableTableHeaderCell/index.d.ts +0 -2
  84. package/dist/Common/SortableTableHeaderCell/types.d.ts +0 -25
  85. package/dist/Pages/GlobalConfigurations/Authorization/constants.d.ts +0 -15
  86. package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +0 -1
  87. package/src/Assets/Icon/ic-arrow-up-down.svg +0 -3
  88. package/src/Assets/Icon/ic-sort-arrow-down.svg +0 -3
  89. package/src/Common/Hooks/useUrlFilters/constants.ts +0 -9
  90. package/src/Common/Hooks/useUrlFilters/index.ts +0 -2
  91. package/src/Common/Hooks/useUrlFilters/types.ts +0 -21
  92. package/src/Common/Hooks/useUrlFilters/useUrlFilters.ts +0 -121
  93. package/src/Common/SortableTableHeaderCell/SortableTableHeaderCell.tsx +0 -44
  94. package/src/Common/SortableTableHeaderCell/index.ts +0 -2
  95. package/src/Common/SortableTableHeaderCell/types.ts +0 -26
  96. package/src/Pages/GlobalConfigurations/Authorization/constants.ts +0 -16
  97. package/src/Pages/GlobalConfigurations/Authorization/index.ts +0 -1
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) {
@@ -267,22 +268,7 @@ var MAX_Z_INDEX = 2147483647;
267
268
  var SELECTED_APPROVAL_TAB_STATE = {
268
269
  APPROVAL: 'approval',
269
270
  PENDING: 'pending',
270
- };
271
- exports.SortingOrder = void 0;
272
- (function (SortingOrder) {
273
- /**
274
- * Ascending order
275
- */
276
- SortingOrder["ASC"] = "ASC";
277
- /**
278
- * Descending order
279
- */
280
- SortingOrder["DESC"] = "DESC";
281
- })(exports.SortingOrder || (exports.SortingOrder = {}));
282
- /**
283
- * Base page size for pagination
284
- */
285
- var DEFAULT_BASE_PAGE_SIZE = 20;
271
+ };
286
272
 
287
273
  /******************************************************************************
288
274
  Copyright (c) Microsoft Corporation.
@@ -797,9 +783,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
797
783
  styleInject(css_248z$9);
798
784
 
799
785
  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); }
786
+ 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); }
801
787
  var SvgIcProgressing = function SvgIcProgressing(props) {
802
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
788
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
803
789
  xmlns: "http://www.w3.org/2000/svg",
804
790
  viewBox: "0 0 24 24",
805
791
  width: "1em",
@@ -851,8 +837,8 @@ EmptyState.Loading = Loading;
851
837
 
852
838
  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
839
 
854
- function _extends$s() {
855
- _extends$s = Object.assign || function (target) {
840
+ function _extends$t() {
841
+ _extends$t = Object.assign || function (target) {
856
842
  for (var i = 1; i < arguments.length; i++) {
857
843
  var source = arguments[i];
858
844
 
@@ -866,7 +852,7 @@ function _extends$s() {
866
852
  return target;
867
853
  };
868
854
 
869
- return _extends$s.apply(this, arguments);
855
+ return _extends$t.apply(this, arguments);
870
856
  }
871
857
 
872
858
  function _objectWithoutPropertiesLoose$2(source, excluded) {
@@ -1592,7 +1578,7 @@ function ProgressBar(_ref) {
1592
1578
  isIn = _ref.isIn,
1593
1579
  theme = _ref.theme;
1594
1580
 
1595
- var style = _extends$s({}, userStyle, {
1581
+ var style = _extends$t({}, userStyle, {
1596
1582
  animationDuration: delay + "ms",
1597
1583
  animationPlayState: isRunning ? 'running' : 'paused',
1598
1584
  opacity: hide ? 0 : 1
@@ -1869,9 +1855,9 @@ var ToastContainer = function ToastContainer(props) {
1869
1855
  ,
1870
1856
  id: containerId
1871
1857
  }, getToastToRender(function (position, toastList) {
1872
- var containerStyle = !toastList.length ? _extends$s({}, style, {
1858
+ var containerStyle = !toastList.length ? _extends$t({}, style, {
1873
1859
  pointerEvents: 'none'
1874
- }) : _extends$s({}, style);
1860
+ }) : _extends$t({}, style);
1875
1861
  return React.createElement("div", {
1876
1862
  className: getClassName(position),
1877
1863
  style: containerStyle,
@@ -1978,7 +1964,7 @@ function dispatchToast(content, options) {
1978
1964
 
1979
1965
 
1980
1966
  function mergeOptions(type, options) {
1981
- return _extends$s({}, options, {
1967
+ return _extends$t({}, options, {
1982
1968
  type: options && options.type || type,
1983
1969
  toastId: getToastId(options)
1984
1970
  });
@@ -1995,7 +1981,7 @@ function toast(content, options) {
1995
1981
  }
1996
1982
 
1997
1983
  toast.loading = function (content, options) {
1998
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$s({
1984
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$t({
1999
1985
  isLoading: true,
2000
1986
  autoClose: false,
2001
1987
  closeOnClick: false,
@@ -2011,7 +1997,7 @@ function handlePromise(promise, _ref2, options) {
2011
1997
  var id;
2012
1998
 
2013
1999
  if (pending) {
2014
- id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$s({}, options, pending));
2000
+ id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$t({}, options, pending));
2015
2001
  }
2016
2002
 
2017
2003
  var resetParams = {
@@ -2030,7 +2016,7 @@ function handlePromise(promise, _ref2, options) {
2030
2016
  return;
2031
2017
  }
2032
2018
 
2033
- var baseParams = _extends$s({
2019
+ var baseParams = _extends$t({
2034
2020
  type: type
2035
2021
  }, resetParams, options, {
2036
2022
  data: result
@@ -2041,10 +2027,10 @@ function handlePromise(promise, _ref2, options) {
2041
2027
  } : input; // if the id is set we know that it's an update
2042
2028
 
2043
2029
  if (id) {
2044
- toast.update(id, _extends$s({}, baseParams, params));
2030
+ toast.update(id, _extends$t({}, baseParams, params));
2045
2031
  } else {
2046
2032
  // using toast.promise without loading
2047
- toast(params.render, _extends$s({}, baseParams, params));
2033
+ toast(params.render, _extends$t({}, baseParams, params));
2048
2034
  }
2049
2035
 
2050
2036
  return result;
@@ -2068,7 +2054,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
2068
2054
  toast.warn = toast.warning;
2069
2055
 
2070
2056
  toast.dark = function (content, options) {
2071
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$s({
2057
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$t({
2072
2058
  theme: 'dark'
2073
2059
  }, options)));
2074
2060
  };
@@ -2125,7 +2111,7 @@ toast.update = function (toastId, options) {
2125
2111
  var oldOptions = toast.props,
2126
2112
  oldContent = toast.content;
2127
2113
 
2128
- var nextOptions = _extends$s({}, oldOptions, options, {
2114
+ var nextOptions = _extends$t({}, oldOptions, options, {
2129
2115
  toastId: options.toastId || toastId,
2130
2116
  updateId: generateToastId()
2131
2117
  });
@@ -11808,17 +11794,9 @@ var processDeployedTime = function (lastDeployed, isArgoInstalled) {
11808
11794
  */
11809
11795
  var getUrlWithSearchParams = function (url, params) {
11810
11796
  var searchParams = new URLSearchParams();
11811
- // TODO: Common out
11812
11797
  Object.keys(params).forEach(function (key) {
11813
11798
  if (params[key]) {
11814
- if (Array.isArray(params[key])) {
11815
- params[key].forEach(function (val) {
11816
- searchParams.append(key, val);
11817
- });
11818
- }
11819
- else {
11820
- searchParams.set(key, params[key]);
11821
- }
11799
+ searchParams.append(key, params[key]);
11822
11800
  }
11823
11801
  });
11824
11802
  var queryString = searchParams.toString();
@@ -11844,42 +11822,59 @@ var getFilteredChartVersions = function (charts, selectedChartType) {
11844
11822
  chartRefId: item.chartRefId,
11845
11823
  }); });
11846
11824
  };
11847
- function removeEmptyObjectKeysAndNullValues(obj) {
11848
- // It recursively removes empty object keys and array values that are null
11849
- for (var key in obj) {
11825
+ function removeEmptyObjectKeysAndNullValues(obj, originaljsonCopy) {
11826
+ var _loop_1 = function (key) {
11850
11827
  if (Array.isArray(obj[key])) {
11851
- if (obj[key].length === 0)
11852
- continue;
11853
- obj[key] = obj[key].filter(function (item) { return item !== null; });
11854
11828
  // Check if the array is empty
11855
- if (obj[key].length === 0) {
11856
- delete obj[key]; // Delete the key if the array is empty
11829
+ if (obj[key].length !== 0) {
11830
+ obj[key].forEach(function (element, index) {
11831
+ if (element === null || (typeof element === 'object' && Object.keys(element).length === 0))
11832
+ obj[key].splice(index, 1);
11833
+ else
11834
+ removeEmptyObjectKeysAndNullValues(element, originaljsonCopy[key][index]);
11835
+ });
11836
+ }
11837
+ if (obj[key].length === 0 && originaljsonCopy[key].length !== 0) {
11838
+ delete obj[key];
11857
11839
  }
11858
11840
  }
11859
11841
  else if (obj[key] && typeof obj[key] === 'object') {
11860
- if (removeEmptyObjectKeysAndNullValues(obj[key])) {
11842
+ if (removeEmptyObjectKeysAndNullValues(obj[key], originaljsonCopy[key]) &&
11843
+ Object.keys(originaljsonCopy[key]).length !== 0) {
11861
11844
  delete obj[key];
11862
11845
  }
11863
11846
  }
11864
11847
  else if (obj[key] === undefined) {
11865
11848
  delete obj[key];
11866
11849
  }
11850
+ };
11851
+ // It recursively removes empty object keys and empty array keys
11852
+ for (var key in obj) {
11853
+ _loop_1(key);
11867
11854
  }
11868
11855
  return Object.keys(obj).length === 0;
11869
11856
  }
11870
- function getUnlockedJSON(json, jsonPathArray) {
11857
+ function getUnlockedJSON(json, jsonPathArray, removeParentKeysAndEmptyArrays) {
11858
+ if (removeParentKeysAndEmptyArrays === void 0) { removeParentKeysAndEmptyArrays = false; }
11859
+ if (!jsonPathArray.length)
11860
+ return { newDocument: json, removedPatches: [] };
11871
11861
  var jsonCopy = JSON.parse(JSON.stringify(json));
11862
+ var originaljsonCopy = JSON.parse(JSON.stringify(json));
11863
+ var removedPatches = [];
11872
11864
  var patches = jsonPathArray.flatMap(function (jsonPath) {
11873
11865
  var pathsToRemove = JSONPath({ path: jsonPath, json: jsonCopy, resultType: 'all' });
11866
+ //reversing patches to handle correct array index deletion
11867
+ pathsToRemove.reverse();
11874
11868
  return pathsToRemove.map(function (result) {
11875
- return Array.isArray(result.parent)
11876
- ? { op: 'replace', path: result.pointer, value: null }
11877
- : { op: 'remove', path: result.pointer };
11869
+ //storing removed patches to have functionality of undo
11870
+ removedPatches.push({ op: 'add', path: result.pointer, value: result.value });
11871
+ return { op: 'remove', path: result.pointer };
11878
11872
  });
11879
11873
  });
11880
11874
  var newDocument = applyPatch(jsonCopy, patches).newDocument;
11881
- removeEmptyObjectKeysAndNullValues(newDocument);
11882
- return newDocument;
11875
+ if (removeParentKeysAndEmptyArrays)
11876
+ removeEmptyObjectKeysAndNullValues(newDocument, originaljsonCopy);
11877
+ return { newDocument: newDocument, removedPatches: removedPatches.reverse() };
11883
11878
  }
11884
11879
  function getLockedJSON(json, jsonPathArray) {
11885
11880
  var jsonCopy = JSON.parse(JSON.stringify(json));
@@ -12050,16 +12045,16 @@ var Modal = function (_a) {
12050
12045
  }, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
12051
12046
  };
12052
12047
 
12053
- var _path$h;
12054
- 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); }
12048
+ var _path$i;
12049
+ 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); }
12055
12050
  var SvgIcCross = function SvgIcCross(props) {
12056
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
12051
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
12057
12052
  width: "1em",
12058
12053
  height: "1em",
12059
12054
  viewBox: "0 0 24 24",
12060
12055
  fill: "none",
12061
12056
  xmlns: "http://www.w3.org/2000/svg"
12062
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
12057
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
12063
12058
  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",
12064
12059
  fill: "#596168"
12065
12060
  })));
@@ -16358,30 +16353,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
16358
16353
 
16359
16354
  var Tippy = index;
16360
16355
 
16361
- var _path$g;
16362
- 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); }
16356
+ var _path$h;
16357
+ 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); }
16363
16358
  var SvgIcHelp = function SvgIcHelp(props) {
16364
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
16359
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
16365
16360
  xmlns: "http://www.w3.org/2000/svg",
16366
16361
  width: "1em",
16367
16362
  height: "1em",
16368
16363
  viewBox: "0 0 24 24"
16369
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
16364
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
16370
16365
  fill: "#767D84",
16371
16366
  fillRule: "evenodd",
16372
16367
  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"
16373
16368
  })));
16374
16369
  };
16375
16370
 
16376
- var _path$f;
16377
- 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); }
16371
+ var _path$g;
16372
+ 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
16373
  var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
16379
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
16374
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
16380
16375
  xmlns: "http://www.w3.org/2000/svg",
16381
16376
  viewBox: "0 0 17 16",
16382
16377
  width: "1em",
16383
16378
  height: "1em"
16384
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
16379
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
16385
16380
  fill: "#767D84",
16386
16381
  fillRule: "evenodd",
16387
16382
  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"
@@ -16433,16 +16428,16 @@ function TippyCustomized(props) {
16433
16428
  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 })));
16434
16429
  }
16435
16430
 
16436
- var _path$e, _circle, _path2$1;
16437
- 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); }
16431
+ var _path$f, _circle, _path2$2;
16432
+ 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); }
16438
16433
  var SvgInjectTag = function SvgInjectTag(props) {
16439
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
16434
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
16440
16435
  width: "1em",
16441
16436
  height: "1em",
16442
16437
  viewBox: "0 0 20 20",
16443
16438
  fill: "none",
16444
16439
  xmlns: "http://www.w3.org/2000/svg"
16445
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
16440
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
16446
16441
  d: "M10 10H3.333",
16447
16442
  stroke: "#596168",
16448
16443
  strokeWidth: 1.5,
@@ -16453,7 +16448,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
16453
16448
  cy: 10,
16454
16449
  r: 1.667,
16455
16450
  fill: "#596168"
16456
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
16451
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
16457
16452
  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",
16458
16453
  stroke: "#596168",
16459
16454
  strokeWidth: 1.5,
@@ -16470,15 +16465,15 @@ function PropagateTagInfo(_a) {
16470
16465
  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" })] })) })));
16471
16466
  }
16472
16467
 
16473
- var _path$d;
16474
- 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); }
16468
+ var _path$e;
16469
+ 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); }
16475
16470
  var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
16476
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16471
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
16477
16472
  xmlns: "http://www.w3.org/2000/svg",
16478
16473
  width: "1em",
16479
16474
  height: "1em",
16480
16475
  viewBox: "0 0 20 20"
16481
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
16476
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
16482
16477
  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",
16483
16478
  fill: "#06C",
16484
16479
  fillRule: "evenodd"
@@ -16712,15 +16707,15 @@ var TagDetails = function (_a) {
16712
16707
  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" }) }))] })));
16713
16708
  };
16714
16709
 
16715
- var _path$c;
16716
- 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); }
16710
+ var _path$d;
16711
+ 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); }
16717
16712
  var SvgIcAdd = function SvgIcAdd(props) {
16718
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
16713
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16719
16714
  xmlns: "http://www.w3.org/2000/svg",
16720
16715
  width: "1em",
16721
16716
  height: "1em",
16722
16717
  viewBox: "0 0 24 24"
16723
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
16718
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
16724
16719
  className: "ic-add_svg__fill-color",
16725
16720
  fill: "#999",
16726
16721
  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"
@@ -16850,8 +16845,8 @@ function ForceDeleteDialog(_a) {
16850
16845
  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?" })] }) })) }));
16851
16846
  }
16852
16847
 
16853
- function _extends$l() {
16854
- _extends$l = Object.assign ? Object.assign.bind() : function (target) {
16848
+ function _extends$m() {
16849
+ _extends$m = Object.assign ? Object.assign.bind() : function (target) {
16855
16850
  for (var i = 1; i < arguments.length; i++) {
16856
16851
  var source = arguments[i];
16857
16852
  for (var key in source) {
@@ -16862,7 +16857,7 @@ function _extends$l() {
16862
16857
  }
16863
16858
  return target;
16864
16859
  };
16865
- return _extends$l.apply(this, arguments);
16860
+ return _extends$m.apply(this, arguments);
16866
16861
  }
16867
16862
 
16868
16863
  /*
@@ -20403,7 +20398,7 @@ var Menu = function Menu(props) {
20403
20398
  getStyles = props.getStyles,
20404
20399
  innerRef = props.innerRef,
20405
20400
  innerProps = props.innerProps;
20406
- return jsx("div", _extends$l({
20401
+ return jsx("div", _extends$m({
20407
20402
  css: getStyles('menu', props),
20408
20403
  className: cx({
20409
20404
  menu: true
@@ -20435,7 +20430,7 @@ var MenuList$1 = function MenuList(props) {
20435
20430
  innerProps = props.innerProps,
20436
20431
  innerRef = props.innerRef,
20437
20432
  isMulti = props.isMulti;
20438
- return jsx("div", _extends$l({
20433
+ return jsx("div", _extends$m({
20439
20434
  css: getStyles('menuList', props),
20440
20435
  className: cx({
20441
20436
  'menu-list': true,
@@ -20466,7 +20461,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
20466
20461
  cx = props.cx,
20467
20462
  getStyles = props.getStyles,
20468
20463
  innerProps = props.innerProps;
20469
- return jsx("div", _extends$l({
20464
+ return jsx("div", _extends$m({
20470
20465
  css: getStyles('noOptionsMessage', props),
20471
20466
  className: cx({
20472
20467
  'menu-notice': true,
@@ -20483,7 +20478,7 @@ var LoadingMessage = function LoadingMessage(props) {
20483
20478
  cx = props.cx,
20484
20479
  getStyles = props.getStyles,
20485
20480
  innerProps = props.innerProps;
20486
- return jsx("div", _extends$l({
20481
+ return jsx("div", _extends$m({
20487
20482
  css: getStyles('loadingMessage', props),
20488
20483
  className: cx({
20489
20484
  'menu-notice': true,
@@ -20571,7 +20566,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
20571
20566
  rect: rect
20572
20567
  }; // same wrapper element whether fixed or portalled
20573
20568
 
20574
- var menuWrapper = jsx("div", _extends$l({
20569
+ var menuWrapper = jsx("div", _extends$m({
20575
20570
  css: getStyles('menuPortal', state),
20576
20571
  className: cx({
20577
20572
  'menu-portal': true
@@ -20607,7 +20602,7 @@ var SelectContainer = function SelectContainer(props) {
20607
20602
  innerProps = props.innerProps,
20608
20603
  isDisabled = props.isDisabled,
20609
20604
  isRtl = props.isRtl;
20610
- return jsx("div", _extends$l({
20605
+ return jsx("div", _extends$m({
20611
20606
  css: getStyles('container', props),
20612
20607
  className: cx({
20613
20608
  '--is-disabled': isDisabled,
@@ -20642,7 +20637,7 @@ var ValueContainer = function ValueContainer(props) {
20642
20637
  isMulti = props.isMulti,
20643
20638
  getStyles = props.getStyles,
20644
20639
  hasValue = props.hasValue;
20645
- return jsx("div", _extends$l({
20640
+ return jsx("div", _extends$m({
20646
20641
  css: getStyles('valueContainer', props),
20647
20642
  className: cx({
20648
20643
  'value-container': true,
@@ -20668,7 +20663,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
20668
20663
  cx = props.cx,
20669
20664
  innerProps = props.innerProps,
20670
20665
  getStyles = props.getStyles;
20671
- return jsx("div", _extends$l({
20666
+ return jsx("div", _extends$m({
20672
20667
  css: getStyles('indicatorsContainer', props),
20673
20668
  className: cx({
20674
20669
  indicators: true
@@ -20699,7 +20694,7 @@ var Svg = function Svg(_ref) {
20699
20694
  var size = _ref.size,
20700
20695
  props = _objectWithoutProperties(_ref, _excluded$2);
20701
20696
 
20702
- return jsx("svg", _extends$l({
20697
+ return jsx("svg", _extends$m({
20703
20698
  height: size,
20704
20699
  width: size,
20705
20700
  viewBox: "0 0 20 20",
@@ -20710,14 +20705,14 @@ var Svg = function Svg(_ref) {
20710
20705
  };
20711
20706
 
20712
20707
  var CrossIcon = function CrossIcon(props) {
20713
- return jsx(Svg, _extends$l({
20708
+ return jsx(Svg, _extends$m({
20714
20709
  size: 20
20715
20710
  }, props), jsx("path", {
20716
20711
  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"
20717
20712
  }));
20718
20713
  };
20719
20714
  var DownChevron = function DownChevron(props) {
20720
- return jsx(Svg, _extends$l({
20715
+ return jsx(Svg, _extends$m({
20721
20716
  size: 20
20722
20717
  }, props), jsx("path", {
20723
20718
  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"
@@ -20750,7 +20745,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
20750
20745
  cx = props.cx,
20751
20746
  getStyles = props.getStyles,
20752
20747
  innerProps = props.innerProps;
20753
- return jsx("div", _extends$l({
20748
+ return jsx("div", _extends$m({
20754
20749
  css: getStyles('dropdownIndicator', props),
20755
20750
  className: cx({
20756
20751
  indicator: true,
@@ -20765,7 +20760,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
20765
20760
  cx = props.cx,
20766
20761
  getStyles = props.getStyles,
20767
20762
  innerProps = props.innerProps;
20768
- return jsx("div", _extends$l({
20763
+ return jsx("div", _extends$m({
20769
20764
  css: getStyles('clearIndicator', props),
20770
20765
  className: cx({
20771
20766
  indicator: true,
@@ -20795,7 +20790,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
20795
20790
  cx = props.cx,
20796
20791
  getStyles = props.getStyles,
20797
20792
  innerProps = props.innerProps;
20798
- return jsx("span", _extends$l({}, innerProps, {
20793
+ return jsx("span", _extends$m({}, innerProps, {
20799
20794
  css: getStyles('indicatorSeparator', props),
20800
20795
  className: cx({
20801
20796
  'indicator-separator': true
@@ -20850,7 +20845,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
20850
20845
  getStyles = props.getStyles,
20851
20846
  innerProps = props.innerProps,
20852
20847
  isRtl = props.isRtl;
20853
- return jsx("div", _extends$l({
20848
+ return jsx("div", _extends$m({
20854
20849
  css: getStyles('loadingIndicator', props),
20855
20850
  className: cx({
20856
20851
  indicator: true,
@@ -20911,7 +20906,7 @@ var Control = function Control(props) {
20911
20906
  innerRef = props.innerRef,
20912
20907
  innerProps = props.innerProps,
20913
20908
  menuIsOpen = props.menuIsOpen;
20914
- return jsx("div", _extends$l({
20909
+ return jsx("div", _extends$m({
20915
20910
  ref: innerRef,
20916
20911
  css: getStyles('control', props),
20917
20912
  className: cx({
@@ -20943,12 +20938,12 @@ var Group = function Group(props) {
20943
20938
  label = props.label,
20944
20939
  theme = props.theme,
20945
20940
  selectProps = props.selectProps;
20946
- return jsx("div", _extends$l({
20941
+ return jsx("div", _extends$m({
20947
20942
  css: getStyles('group', props),
20948
20943
  className: cx({
20949
20944
  group: true
20950
20945
  }, className)
20951
- }, innerProps), jsx(Heading, _extends$l({}, headingProps, {
20946
+ }, innerProps), jsx(Heading, _extends$m({}, headingProps, {
20952
20947
  selectProps: selectProps,
20953
20948
  theme: theme,
20954
20949
  getStyles: getStyles,
@@ -20980,7 +20975,7 @@ var GroupHeading = function GroupHeading(props) {
20980
20975
  _cleanCommonProps.data;
20981
20976
  var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
20982
20977
 
20983
- return jsx("div", _extends$l({
20978
+ return jsx("div", _extends$m({
20984
20979
  css: getStyles('groupHeading', props),
20985
20980
  className: cx({
20986
20981
  'group-heading': true
@@ -21056,7 +21051,7 @@ var Input = function Input(props) {
21056
21051
  }, className),
21057
21052
  css: getStyles('input', props),
21058
21053
  "data-value": value || ''
21059
- }, jsx("input", _extends$l({
21054
+ }, jsx("input", _extends$m({
21060
21055
  className: cx({
21061
21056
  input: true
21062
21057
  }, inputClassName),
@@ -21126,7 +21121,7 @@ var MultiValueLabel = MultiValueGeneric;
21126
21121
  function MultiValueRemove$1(_ref5) {
21127
21122
  var children = _ref5.children,
21128
21123
  innerProps = _ref5.innerProps;
21129
- return jsx("div", _extends$l({
21124
+ return jsx("div", _extends$m({
21130
21125
  role: "button"
21131
21126
  }, innerProps), children || jsx(CrossIcon, {
21132
21127
  size: 14
@@ -21215,7 +21210,7 @@ var Option$1 = function Option(props) {
21215
21210
  isSelected = props.isSelected,
21216
21211
  innerRef = props.innerRef,
21217
21212
  innerProps = props.innerProps;
21218
- return jsx("div", _extends$l({
21213
+ return jsx("div", _extends$m({
21219
21214
  css: getStyles('option', props),
21220
21215
  className: cx({
21221
21216
  option: true,
@@ -21247,7 +21242,7 @@ var Placeholder = function Placeholder(props) {
21247
21242
  cx = props.cx,
21248
21243
  getStyles = props.getStyles,
21249
21244
  innerProps = props.innerProps;
21250
- return jsx("div", _extends$l({
21245
+ return jsx("div", _extends$m({
21251
21246
  css: getStyles('placeholder', props),
21252
21247
  className: cx({
21253
21248
  placeholder: true
@@ -21280,7 +21275,7 @@ var SingleValue = function SingleValue(props) {
21280
21275
  getStyles = props.getStyles,
21281
21276
  isDisabled = props.isDisabled,
21282
21277
  innerProps = props.innerProps;
21283
- return jsx("div", _extends$l({
21278
+ return jsx("div", _extends$m({
21284
21279
  css: getStyles('singleValue', props),
21285
21280
  className: cx({
21286
21281
  'single-value': true,
@@ -21528,7 +21523,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
21528
21523
  };
21529
21524
 
21530
21525
  var A11yText = function A11yText(props) {
21531
- return jsx("span", _extends$l({
21526
+ return jsx("span", _extends$m({
21532
21527
  css: _ref
21533
21528
  }, props));
21534
21529
  };
@@ -22064,7 +22059,7 @@ function DummyInput(_ref) {
22064
22059
  var innerRef = _ref.innerRef,
22065
22060
  props = _objectWithoutProperties(_ref, _excluded);
22066
22061
 
22067
- return jsx("input", _extends$l({
22062
+ return jsx("input", _extends$m({
22068
22063
  ref: innerRef
22069
22064
  }, props, {
22070
22065
  css: /*#__PURE__*/css$2({
@@ -23699,7 +23694,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23699
23694
 
23700
23695
  if (!isSearchable) {
23701
23696
  // use a dummy input to maintain focus/blur functionality
23702
- return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$l({
23697
+ return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$m({
23703
23698
  id: id,
23704
23699
  innerRef: this.getInputRef,
23705
23700
  onBlur: this.onInputBlur,
@@ -23713,7 +23708,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23713
23708
  }, ariaAttributes));
23714
23709
  }
23715
23710
 
23716
- return /*#__PURE__*/React__namespace.createElement(Input, _extends$l({}, commonProps, {
23711
+ return /*#__PURE__*/React__namespace.createElement(Input, _extends$m({}, commonProps, {
23717
23712
  autoCapitalize: "none",
23718
23713
  autoComplete: "off",
23719
23714
  autoCorrect: "off",
@@ -23757,7 +23752,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23757
23752
  isFocused = _this$state5.isFocused;
23758
23753
 
23759
23754
  if (!this.hasValue() || !controlShouldRenderValue) {
23760
- return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$l({}, commonProps, {
23755
+ return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$m({}, commonProps, {
23761
23756
  key: "placeholder",
23762
23757
  isDisabled: isDisabled,
23763
23758
  isFocused: isFocused,
@@ -23771,7 +23766,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23771
23766
  return selectValue.map(function (opt, index) {
23772
23767
  var isOptionFocused = opt === focusedValue;
23773
23768
  var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
23774
- return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$l({}, commonProps, {
23769
+ return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$m({}, commonProps, {
23775
23770
  components: {
23776
23771
  Container: MultiValueContainer,
23777
23772
  Label: MultiValueLabel,
@@ -23803,7 +23798,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23803
23798
  }
23804
23799
 
23805
23800
  var singleValue = selectValue[0];
23806
- return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$l({}, commonProps, {
23801
+ return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$m({}, commonProps, {
23807
23802
  data: singleValue,
23808
23803
  isDisabled: isDisabled
23809
23804
  }), this.formatOptionLabel(singleValue, 'value'));
@@ -23829,7 +23824,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23829
23824
  onTouchEnd: this.onClearIndicatorTouchEnd,
23830
23825
  'aria-hidden': 'true'
23831
23826
  };
23832
- return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$l({}, commonProps, {
23827
+ return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$m({}, commonProps, {
23833
23828
  innerProps: innerProps,
23834
23829
  isFocused: isFocused
23835
23830
  }));
@@ -23849,7 +23844,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23849
23844
  var innerProps = {
23850
23845
  'aria-hidden': 'true'
23851
23846
  };
23852
- return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$l({}, commonProps, {
23847
+ return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$m({}, commonProps, {
23853
23848
  innerProps: innerProps,
23854
23849
  isDisabled: isDisabled,
23855
23850
  isFocused: isFocused
@@ -23867,7 +23862,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23867
23862
  var commonProps = this.commonProps;
23868
23863
  var isDisabled = this.props.isDisabled;
23869
23864
  var isFocused = this.state.isFocused;
23870
- return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$l({}, commonProps, {
23865
+ return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$m({}, commonProps, {
23871
23866
  isDisabled: isDisabled,
23872
23867
  isFocused: isFocused
23873
23868
  }));
@@ -23887,7 +23882,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23887
23882
  onTouchEnd: this.onDropdownIndicatorTouchEnd,
23888
23883
  'aria-hidden': 'true'
23889
23884
  };
23890
- return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$l({}, commonProps, {
23885
+ return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$m({}, commonProps, {
23891
23886
  innerProps: innerProps,
23892
23887
  isDisabled: isDisabled,
23893
23888
  isFocused: isFocused
@@ -23950,7 +23945,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23950
23945
  onMouseOver: onHover,
23951
23946
  tabIndex: -1
23952
23947
  };
23953
- return /*#__PURE__*/React__namespace.createElement(Option, _extends$l({}, commonProps, {
23948
+ return /*#__PURE__*/React__namespace.createElement(Option, _extends$m({}, commonProps, {
23954
23949
  innerProps: innerProps,
23955
23950
  data: data,
23956
23951
  isDisabled: isDisabled,
@@ -23974,7 +23969,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23974
23969
  groupIndex = item.index;
23975
23970
  var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
23976
23971
  var headingId = "".concat(groupId, "-heading");
23977
- return /*#__PURE__*/React__namespace.createElement(Group, _extends$l({}, commonProps, {
23972
+ return /*#__PURE__*/React__namespace.createElement(Group, _extends$m({}, commonProps, {
23978
23973
  key: groupId,
23979
23974
  data: _data,
23980
23975
  options: options,
@@ -24013,12 +24008,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24013
24008
  menuPosition: menuPosition,
24014
24009
  menuShouldScrollIntoView: menuShouldScrollIntoView
24015
24010
  };
24016
- var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$l({}, commonProps, menuPlacementProps), function (_ref4) {
24011
+ var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$m({}, commonProps, menuPlacementProps), function (_ref4) {
24017
24012
  var ref = _ref4.ref,
24018
24013
  _ref4$placerProps = _ref4.placerProps,
24019
24014
  placement = _ref4$placerProps.placement,
24020
24015
  maxHeight = _ref4$placerProps.maxHeight;
24021
- return /*#__PURE__*/React__namespace.createElement(Menu, _extends$l({}, commonProps, menuPlacementProps, {
24016
+ return /*#__PURE__*/React__namespace.createElement(Menu, _extends$m({}, commonProps, menuPlacementProps, {
24022
24017
  innerRef: ref,
24023
24018
  innerProps: {
24024
24019
  onMouseDown: _this4.onMenuMouseDown,
@@ -24033,7 +24028,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24033
24028
  onBottomArrive: onMenuScrollToBottom,
24034
24029
  lockEnabled: menuShouldBlockScroll
24035
24030
  }, function (scrollTargetRef) {
24036
- return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$l({}, commonProps, {
24031
+ return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$m({}, commonProps, {
24037
24032
  innerRef: function innerRef(instance) {
24038
24033
  _this4.getMenuListRef(instance);
24039
24034
 
@@ -24048,7 +24043,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24048
24043
  // so we use the same component. the actual portalling logic is forked
24049
24044
  // within the component based on `menuPosition`
24050
24045
 
24051
- return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$l({}, commonProps, {
24046
+ return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$m({}, commonProps, {
24052
24047
  appendTo: menuPortalTarget,
24053
24048
  controlElement: this.controlRef,
24054
24049
  menuPlacement: menuPlacement,
@@ -24113,7 +24108,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24113
24108
  isFocused = _this$state6.isFocused,
24114
24109
  selectValue = _this$state6.selectValue;
24115
24110
  var focusableOptions = this.getFocusableOptions();
24116
- return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$l({}, commonProps, {
24111
+ return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$m({}, commonProps, {
24117
24112
  id: this.getElementId('live-region'),
24118
24113
  ariaSelection: ariaSelection,
24119
24114
  focusedOption: focusedOption,
@@ -24139,7 +24134,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24139
24134
  menuIsOpen = _this$props14.menuIsOpen;
24140
24135
  var isFocused = this.state.isFocused;
24141
24136
  var commonProps = this.commonProps = this.getCommonProps();
24142
- return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$l({}, commonProps, {
24137
+ return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$m({}, commonProps, {
24143
24138
  className: className,
24144
24139
  innerProps: {
24145
24140
  id: id,
@@ -24147,7 +24142,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24147
24142
  },
24148
24143
  isDisabled: isDisabled,
24149
24144
  isFocused: isFocused
24150
- }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$l({}, commonProps, {
24145
+ }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$m({}, commonProps, {
24151
24146
  innerRef: this.getControlRef,
24152
24147
  innerProps: {
24153
24148
  onMouseDown: this.onControlMouseDown,
@@ -24156,9 +24151,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24156
24151
  isDisabled: isDisabled,
24157
24152
  isFocused: isFocused,
24158
24153
  menuIsOpen: menuIsOpen
24159
- }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$l({}, commonProps, {
24154
+ }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$m({}, commonProps, {
24160
24155
  isDisabled: isDisabled
24161
- }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$l({}, commonProps, {
24156
+ }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$m({}, commonProps, {
24162
24157
  isDisabled: isDisabled
24163
24158
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
24164
24159
  }
@@ -24231,7 +24226,7 @@ Select$1.defaultProps = defaultProps;
24231
24226
 
24232
24227
  var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24233
24228
  var baseSelectProps = useStateManager(props);
24234
- return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$l({
24229
+ return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$m({
24235
24230
  ref: ref
24236
24231
  }, baseSelectProps));
24237
24232
  });
@@ -24239,9 +24234,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24239
24234
  var ReactSelect = StateManagedSelect;
24240
24235
 
24241
24236
  var _g$6;
24242
- 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); }
24237
+ 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); }
24243
24238
  var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24244
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
24239
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
24245
24240
  xmlns: "http://www.w3.org/2000/svg",
24246
24241
  viewBox: "0 0 28 28",
24247
24242
  width: "1em",
@@ -24262,15 +24257,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24262
24257
  }))));
24263
24258
  };
24264
24259
 
24265
- var _path$b;
24266
- 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); }
24260
+ var _path$c;
24261
+ 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); }
24267
24262
  var SvgIcCheck = function SvgIcCheck(props) {
24268
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
24263
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
24269
24264
  xmlns: "http://www.w3.org/2000/svg",
24270
24265
  width: "1em",
24271
24266
  height: "1em",
24272
24267
  viewBox: "0 0 24 24"
24273
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
24268
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
24274
24269
  stroke: "#06C",
24275
24270
  strokeLinecap: "round",
24276
24271
  strokeLinejoin: "round",
@@ -24282,9 +24277,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
24282
24277
  };
24283
24278
 
24284
24279
  var _g$5;
24285
- 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); }
24280
+ 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); }
24286
24281
  var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
24287
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24282
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
24288
24283
  xmlns: "http://www.w3.org/2000/svg",
24289
24284
  width: "1em",
24290
24285
  height: "1em",
@@ -24613,6 +24608,7 @@ Valid States of Checkbox:
24613
24608
  5. disabled: false, checked: true, value: INTERMIDIATE
24614
24609
  6. disabled: false, checked: true, value: CHECKED
24615
24610
  */
24611
+ // TODO: Associate label with input element
24616
24612
  var Checkbox$1 = /** @class */ (function (_super) {
24617
24613
  __extends$1(Checkbox, _super);
24618
24614
  function Checkbox() {
@@ -24627,9 +24623,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
24627
24623
  }(React.Component));
24628
24624
 
24629
24625
  var _g$4;
24630
- 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); }
24626
+ 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); }
24631
24627
  var SvgIcSearch = function SvgIcSearch(props) {
24632
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24628
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24633
24629
  xmlns: "http://www.w3.org/2000/svg",
24634
24630
  viewBox: "0 0 24 24",
24635
24631
  width: "1em",
@@ -24646,9 +24642,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
24646
24642
  };
24647
24643
 
24648
24644
  var _g$3;
24649
- 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); }
24645
+ 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); }
24650
24646
  var SvgIcErrorCross = function SvgIcErrorCross(props) {
24651
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24647
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24652
24648
  xmlns: "http://www.w3.org/2000/svg",
24653
24649
  width: "1em",
24654
24650
  height: "1em",
@@ -24670,7 +24666,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
24670
24666
  }))));
24671
24667
  };
24672
24668
 
24673
- 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}";
24669
+ 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}";
24674
24670
  styleInject(css_248z$5);
24675
24671
 
24676
24672
  /**
@@ -24752,61 +24748,6 @@ var SearchBar = function (_a) {
24752
24748
  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" }) })))] })) })));
24753
24749
  };
24754
24750
 
24755
- var _path$a;
24756
- 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); }
24757
- var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
24758
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
24759
- xmlns: "http://www.w3.org/2000/svg",
24760
- width: "1em",
24761
- height: "1em",
24762
- viewBox: "0 0 12 12",
24763
- fill: "none"
24764
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
24765
- d: "M4.125 8.5 6 10.75 7.875 8.5m-3.75-5L6 1.25 7.875 3.5",
24766
- stroke: "#3B444C",
24767
- strokeWidth: 1.5,
24768
- strokeLinecap: "round",
24769
- strokeLinejoin: "round"
24770
- })));
24771
- };
24772
-
24773
- var _path$9;
24774
- 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); }
24775
- var SvgIcSortArrowDown = function SvgIcSortArrowDown(props) {
24776
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
24777
- width: "1em",
24778
- height: "1em",
24779
- viewBox: "0 0 12 12",
24780
- fill: "none",
24781
- xmlns: "http://www.w3.org/2000/svg"
24782
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
24783
- d: "M3.5 7.5 6 10m0 0 2.5-2.5M6 10V2",
24784
- stroke: "#596168",
24785
- strokeWidth: 1.5,
24786
- strokeLinecap: "round",
24787
- strokeLinejoin: "round"
24788
- })));
24789
- };
24790
-
24791
- /**
24792
- * Reusable component for the table header cell with support for sorting icons
24793
- *
24794
- * @example Usage
24795
- * ```tsx
24796
- * <SortableTableHeaderCell
24797
- * isSorted={currentSortedCell === 'cell'}
24798
- * triggerSorting={() => {}}
24799
- * sortOrder={SortingOrder.ASC}
24800
- * title="Header Cell"
24801
- * disabled={isDisabled}
24802
- * />
24803
- * ```
24804
- */
24805
- var SortableTableHeaderCell = function (_a) {
24806
- var isSorted = _a.isSorted, triggerSorting = _a.triggerSorting, sortOrder = _a.sortOrder, title = _a.title, disabled = _a.disabled;
24807
- return (jsxRuntime.jsxs("button", __assign({ type: "button", className: "dc__transparent p-0 bcn-0 cn-7 flex dc__content-start dc__gap-4 cursor", onClick: triggerSorting, disabled: disabled }, { children: [jsxRuntime.jsx("span", __assign({ className: "dc__uppercase dc__ellipsis-right" }, { children: title })), isSorted ? (jsxRuntime.jsx(SvgIcSortArrowDown, { className: "icon-dim-12 mw-12 scn-7 ".concat(sortOrder === exports.SortingOrder.DESC ? 'dc__flip-180' : '') })) : (jsxRuntime.jsx(SvgIcArrowUpDown, { className: "icon-dim-12 mw-12 scn-7" }))] })));
24808
- };
24809
-
24810
24751
  var css_248z$4 = ".toggle__switch {\n position: relative;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.toggle__switch.disabled {\n cursor: not-allowed;\n}\n.toggle__switch.disabled .toggle__slider {\n cursor: not-allowed;\n}\n\n/* Hide default HTML checkbox */\n.toggle__switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n/* The slider */\n.toggle__slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: all 0.4s ease;\n}\n.toggle__slider.round {\n border-radius: 34px;\n}\n.toggle__slider.round:before {\n border-radius: 50%;\n}\n.toggle__slider:before {\n position: absolute;\n content: \"\";\n height: calc(100% - 8px);\n width: calc(50% - 4px);\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: all 0.4s ease;\n}\n.toggle__slider.with-icon {\n background-color: var(--N000) !important;\n}\n.toggle__slider.with-icon svg {\n position: absolute;\n content: \"\";\n top: -1px;\n left: -1px;\n background-color: var(--N300);\n transition: all 0.4s ease;\n}\n\ninput:checked + .toggle__slider {\n background-color: var(--color);\n}\ninput:checked + .toggle__slider:before {\n transform: translateX(100%);\n}\ninput:checked + .toggle__slider.with-icon svg {\n transform: translateX(100%);\n background-color: var(--color);\n}\n\ninput:focus + .toggle__slider {\n box-shadow: 0 0 1px var(--color);\n}";
24811
24752
  styleInject(css_248z$4);
24812
24753
 
@@ -24943,9 +24884,9 @@ exports.ConsequenceAction = void 0;
24943
24884
  })(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
24944
24885
 
24945
24886
  var _g$2;
24946
- 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); }
24887
+ 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); }
24947
24888
  var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
24948
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
24889
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24949
24890
  xmlns: "http://www.w3.org/2000/svg",
24950
24891
  width: "1em",
24951
24892
  height: "1em",
@@ -25024,16 +24965,16 @@ function DeleteComponent(_a) {
25024
24965
  return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
25025
24966
  }
25026
24967
 
25027
- var _path$8;
25028
- 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); }
24968
+ var _path$b;
24969
+ 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); }
25029
24970
  var SvgIcPencil = function SvgIcPencil(props) {
25030
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
24971
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
25031
24972
  width: "1em",
25032
24973
  height: "1em",
25033
24974
  viewBox: "0 0 20 20",
25034
24975
  fill: "none",
25035
24976
  xmlns: "http://www.w3.org/2000/svg"
25036
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
24977
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
25037
24978
  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",
25038
24979
  stroke: "#596168",
25039
24980
  strokeWidth: 1.5,
@@ -25042,19 +24983,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
25042
24983
  })));
25043
24984
  };
25044
24985
 
25045
- var _path$7, _path2, _path3;
25046
- 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); }
24986
+ var _path$a, _path2$1, _path3;
24987
+ 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); }
25047
24988
  var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
25048
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
24989
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
25049
24990
  width: "1em",
25050
24991
  height: "1em",
25051
24992
  viewBox: "0 0 12 12",
25052
24993
  fill: "none",
25053
24994
  xmlns: "http://www.w3.org/2000/svg"
25054
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
24995
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
25055
24996
  d: "M3.742 4.674h-2.25v-2.25",
25056
24997
  fill: "#767D84"
25057
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
24998
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
25058
24999
  d: "M3.742 4.674h-2.25v-2.25",
25059
25000
  stroke: "#596168",
25060
25001
  strokeWidth: 1.5,
@@ -25069,15 +25010,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
25069
25010
  })));
25070
25011
  };
25071
25012
 
25072
- var _path$6;
25073
- 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); }
25013
+ var _path$9;
25014
+ 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); }
25074
25015
  var SvgIcMinus = function SvgIcMinus(props) {
25075
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
25016
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
25076
25017
  xmlns: "http://www.w3.org/2000/svg",
25077
25018
  width: "1em",
25078
25019
  height: "1em",
25079
25020
  viewBox: "0 0 14 14"
25080
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
25021
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
25081
25022
  fill: "#959BA1",
25082
25023
  className: "ic-minus_svg__fill-color",
25083
25024
  fillRule: "evenodd",
@@ -25086,9 +25027,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
25086
25027
  };
25087
25028
 
25088
25029
  var _g$1;
25089
- 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); }
25030
+ 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); }
25090
25031
  var SvgIcWarning = function SvgIcWarning(props) {
25091
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25032
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
25092
25033
  xmlns: "http://www.w3.org/2000/svg",
25093
25034
  width: "1em",
25094
25035
  height: "1em",
@@ -25108,9 +25049,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
25108
25049
  };
25109
25050
 
25110
25051
  var _g;
25111
- 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); }
25052
+ 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); }
25112
25053
  var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25113
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
25054
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
25114
25055
  xmlns: "http://www.w3.org/2000/svg",
25115
25056
  width: "1em",
25116
25057
  height: "1em",
@@ -25127,16 +25068,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25127
25068
  }))));
25128
25069
  };
25129
25070
 
25130
- var _path$5;
25131
- 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); }
25071
+ var _path$8;
25072
+ 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); }
25132
25073
  var SvgIcEnter = function SvgIcEnter(props) {
25133
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
25074
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
25134
25075
  width: "1em",
25135
25076
  height: "1em",
25136
25077
  viewBox: "0 0 16 16",
25137
25078
  fill: "none",
25138
25079
  xmlns: "http://www.w3.org/2000/svg"
25139
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
25080
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
25140
25081
  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",
25141
25082
  fill: "#3B444C"
25142
25083
  })));
@@ -25542,15 +25483,15 @@ function Grid(_a) {
25542
25483
  return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
25543
25484
  }
25544
25485
 
25545
- var _path$4;
25546
- 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); }
25486
+ var _path$7;
25487
+ 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); }
25547
25488
  var SvgIcCopy = function SvgIcCopy(props) {
25548
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
25489
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25549
25490
  xmlns: "http://www.w3.org/2000/svg",
25550
25491
  width: "1em",
25551
25492
  height: "1em",
25552
25493
  viewBox: "0 0 20 20"
25553
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
25494
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
25554
25495
  fill: "#767D84",
25555
25496
  fillRule: "evenodd",
25556
25497
  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"
@@ -25647,116 +25588,6 @@ var useWindowSize = function () {
25647
25588
  return windowSize;
25648
25589
  };
25649
25590
 
25650
- var DEFAULT_PAGE_NUMBER = 1;
25651
- var URL_FILTER_KEYS = {
25652
- PAGE_SIZE: 'pageSize',
25653
- PAGE_NUMBER: 'pageNumber',
25654
- SEARCH_KEY: 'searchKey',
25655
- SORT_BY: 'sortBy',
25656
- SORT_ORDER: 'sortOrder',
25657
- };
25658
-
25659
- var PAGE_SIZE = URL_FILTER_KEYS.PAGE_SIZE, PAGE_NUMBER = URL_FILTER_KEYS.PAGE_NUMBER, SEARCH_KEY = URL_FILTER_KEYS.SEARCH_KEY, SORT_BY = URL_FILTER_KEYS.SORT_BY, SORT_ORDER = URL_FILTER_KEYS.SORT_ORDER;
25660
- /**
25661
- * Generic hook for implementing URL based filters.
25662
- * eg: pagination, search, sort.
25663
- *
25664
- * The exposed handlers can be consumed directly without the need for explicit state management
25665
- *
25666
- * @example Default Usage:
25667
- * ```tsx
25668
- * const { pageSize, changePage, ...rest } = useUrlFilters()
25669
- * ```
25670
- *
25671
- * @example Usage with custom type for sort keys and initial sort key:
25672
- * ```tsx
25673
- * const { sortBy, sortOrder } = useUrlFilters<'email' | 'name'>({ initialSortKey: 'email' })
25674
- * ```
25675
- *
25676
- */
25677
- var useUrlFilters = function (_a) {
25678
- var _b = _a === void 0 ? {} : _a, initialSortKey = _b.initialSortKey;
25679
- var location = reactRouterDom.useLocation();
25680
- var history = reactRouterDom.useHistory();
25681
- var searchParams = new URLSearchParams(location.search);
25682
- var _c = React.useMemo(function () {
25683
- var _pageSize = searchParams.get(PAGE_SIZE);
25684
- var _pageNumber = searchParams.get(PAGE_NUMBER);
25685
- var _searchKey = searchParams.get(SEARCH_KEY);
25686
- var _sortOrder = searchParams.get(SORT_ORDER);
25687
- var _sortBy = searchParams.get(SORT_BY);
25688
- var sortByKey = (_sortBy || initialSortKey || '');
25689
- // Fallback to ascending order
25690
- var sortByOrder = Object.values(exports.SortingOrder).includes(_sortOrder) ? _sortOrder : exports.SortingOrder.ASC;
25691
- return {
25692
- pageSize: Number(_pageSize) || DEFAULT_BASE_PAGE_SIZE,
25693
- pageNumber: Number(_pageNumber) || DEFAULT_PAGE_NUMBER,
25694
- searchKey: _searchKey || '',
25695
- sortBy: sortByKey,
25696
- // sort order should only be applied if the key is available
25697
- sortOrder: (sortByKey ? sortByOrder : ''),
25698
- };
25699
- }, [searchParams]), pageSize = _c.pageSize, pageNumber = _c.pageNumber, searchKey = _c.searchKey, sortBy = _c.sortBy, sortOrder = _c.sortOrder;
25700
- /**
25701
- * Used for getting the required result from the API
25702
- */
25703
- var offset = pageSize * (pageNumber - 1);
25704
- /**
25705
- * Update and replace the search params in the URL.
25706
- *
25707
- * Note: Currently only primitive data types are supported
25708
- */
25709
- var _updateSearchParam = function (key, value) {
25710
- searchParams.set(key, String(value));
25711
- history.replace({ search: searchParams.toString() });
25712
- };
25713
- var _resetPageNumber = function () {
25714
- _updateSearchParam(PAGE_NUMBER, DEFAULT_PAGE_NUMBER);
25715
- };
25716
- var changePage = function (page) {
25717
- _updateSearchParam(PAGE_NUMBER, page);
25718
- };
25719
- var changePageSize = function (_pageSize) {
25720
- _updateSearchParam(PAGE_SIZE, _pageSize);
25721
- _resetPageNumber();
25722
- };
25723
- var handleSearch = function (searchTerm) {
25724
- _updateSearchParam(SEARCH_KEY, searchTerm);
25725
- _resetPageNumber();
25726
- };
25727
- var handleSorting = function (_sortBy) {
25728
- var order;
25729
- if (_sortBy === sortBy && sortOrder === exports.SortingOrder.ASC) {
25730
- order = exports.SortingOrder.DESC;
25731
- }
25732
- else {
25733
- order = exports.SortingOrder.ASC;
25734
- }
25735
- _updateSearchParam(SORT_BY, _sortBy);
25736
- _updateSearchParam(SORT_ORDER, order);
25737
- // Reset page number on sorting change
25738
- _resetPageNumber();
25739
- };
25740
- var clearFilters = function () {
25741
- Object.values(URL_FILTER_KEYS).forEach(function (key) {
25742
- searchParams.delete(key);
25743
- });
25744
- history.replace({ search: searchParams.toString() });
25745
- };
25746
- return {
25747
- pageSize: pageSize,
25748
- changePage: changePage,
25749
- changePageSize: changePageSize,
25750
- searchKey: searchKey,
25751
- handleSearch: handleSearch,
25752
- offset: offset,
25753
- sortBy: sortBy,
25754
- sortOrder: sortOrder,
25755
- handleSorting: handleSorting,
25756
- clearFilters: clearFilters,
25757
- };
25758
- };
25759
-
25760
25591
  var StatusConstants = {
25761
25592
  NOT_DEPLOYED: {
25762
25593
  noSpaceLower: 'notdeployed',
@@ -28440,9 +28271,9 @@ var translateString = function (stringToTranslate, params) {
28440
28271
  return utils.englishStringTranslator(stringToTranslate, params);
28441
28272
  }
28442
28273
  };
28443
- var getCommonSelectStyle = function (styleOverrides) {
28274
+ var getCommonSelectStyle$1 = function (styleOverrides) {
28444
28275
  if (styleOverrides === void 0) { styleOverrides = {}; }
28445
- 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) {
28276
+ 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) {
28446
28277
  return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
28447
28278
  } }, styleOverrides);
28448
28279
  };
@@ -28492,15 +28323,15 @@ var getInferredTypeFromValueType = function (value) {
28492
28323
  }
28493
28324
  };
28494
28325
 
28495
- var _path$3;
28496
- 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); }
28326
+ var _path$6;
28327
+ 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); }
28497
28328
  var SvgIcChevronDown = function SvgIcChevronDown(props) {
28498
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
28329
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
28499
28330
  xmlns: "http://www.w3.org/2000/svg",
28500
28331
  width: "1em",
28501
28332
  height: "1em",
28502
28333
  viewBox: "0 0 24 24"
28503
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
28334
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
28504
28335
  fill: "#999",
28505
28336
  className: "ic-chevron-down_svg__fill-color",
28506
28337
  fillRule: "nonzero",
@@ -28508,7 +28339,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
28508
28339
  })));
28509
28340
  };
28510
28341
 
28511
- var commonStyles = getCommonSelectStyle();
28342
+ var commonStyles = getCommonSelectStyle$1();
28512
28343
  var MenuList = function (_a) {
28513
28344
  var children = _a.children, props = __rest(_a, ["children"]);
28514
28345
  return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
@@ -28560,9 +28391,9 @@ var validator = RJSFValidator.default;
28560
28391
  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 }))); };
28561
28392
 
28562
28393
  var _style, _rect$2;
28563
- 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); }
28394
+ 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); }
28564
28395
  var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
28565
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
28396
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
28566
28397
  width: "1em",
28567
28398
  height: "1em",
28568
28399
  viewBox: "0 0 100 100",
@@ -28697,8 +28528,9 @@ var handleAddCD = function (_a) {
28697
28528
  handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
28698
28529
  };
28699
28530
 
28531
+ // TODO: label association with input
28700
28532
  function CustomInput(_a) {
28701
- 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;
28533
+ 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;
28702
28534
  function handleError(error) {
28703
28535
  if (!Array.isArray(error)) {
28704
28536
  return [error];
@@ -28829,23 +28661,26 @@ function DraggableWrapper(_a) {
28829
28661
  y: data.y,
28830
28662
  });
28831
28663
  }
28832
- return (jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed", style: {
28664
+ return (
28665
+ // 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
28666
+ jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
28833
28667
  zIndex: zIndex,
28834
28668
  } }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
28835
28669
  zIndex: zIndex,
28670
+ pointerEvents: 'auto',
28836
28671
  } }, { children: children })) })) })));
28837
28672
  }
28838
28673
 
28839
- var _path$2;
28840
- 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); }
28674
+ var _path$5;
28675
+ 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); }
28841
28676
  var SvgIcDrag = function SvgIcDrag(props) {
28842
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
28677
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
28843
28678
  width: "1em",
28844
28679
  height: "1em",
28845
28680
  viewBox: "0 0 16 16",
28846
28681
  fill: "none",
28847
28682
  xmlns: "http://www.w3.org/2000/svg"
28848
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
28683
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
28849
28684
  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",
28850
28685
  fill: "#596168"
28851
28686
  })));
@@ -28967,23 +28802,438 @@ var Pagination = function (_a) {
28967
28802
  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 })] })))] })));
28968
28803
  };
28969
28804
 
28805
+ var _path$4, _path2;
28806
+ 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); }
28807
+ var SvgIcCpu = function SvgIcCpu(props) {
28808
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
28809
+ xmlns: "http://www.w3.org/2000/svg",
28810
+ width: "1em",
28811
+ height: "1em",
28812
+ viewBox: "0 0 20 20",
28813
+ fill: "none"
28814
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
28815
+ 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",
28816
+ stroke: "#596168",
28817
+ strokeWidth: 1.5,
28818
+ strokeLinecap: "round",
28819
+ strokeLinejoin: "round"
28820
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
28821
+ d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
28822
+ fill: "#596168"
28823
+ })));
28824
+ };
28825
+
28826
+ var _path$3;
28827
+ 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); }
28828
+ var SvgIcMemory = function SvgIcMemory(props) {
28829
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
28830
+ xmlns: "http://www.w3.org/2000/svg",
28831
+ width: "1em",
28832
+ height: "1em",
28833
+ viewBox: "0 0 20 20",
28834
+ fill: "none"
28835
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
28836
+ 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",
28837
+ stroke: "#596168",
28838
+ strokeWidth: 1.5,
28839
+ strokeLinecap: "round",
28840
+ strokeLinejoin: "round"
28841
+ })));
28842
+ };
28843
+
28844
+ var _path$2;
28845
+ 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); }
28846
+ var SvgIcTimer = function SvgIcTimer(props) {
28847
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
28848
+ xmlns: "http://www.w3.org/2000/svg",
28849
+ width: "1em",
28850
+ height: "1em",
28851
+ viewBox: "0 0 20 20",
28852
+ fill: "none"
28853
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
28854
+ 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",
28855
+ stroke: "#596168",
28856
+ strokeWidth: 1.5,
28857
+ strokeLinecap: "round",
28858
+ strokeLinejoin: "round"
28859
+ })));
28860
+ };
28861
+
28862
+ var _a$2;
28863
+ /**
28864
+ * Unique actions that will be dispatched and,
28865
+ * Keeping some values (cpu_limit, etc) in sync with backend
28866
+ */
28867
+ exports.BuildInfraConfigTypes = void 0;
28868
+ (function (BuildInfraConfigTypes) {
28869
+ BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
28870
+ BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
28871
+ BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
28872
+ BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
28873
+ BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
28874
+ })(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
28970
28875
  /**
28971
- * User Status received from the API
28876
+ * Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
28972
28877
  */
28973
- exports.UserStatusDto = void 0;
28974
- (function (UserStatusDto) {
28975
- UserStatusDto["active"] = "active";
28976
- UserStatusDto["inactive"] = "inactive";
28977
- })(exports.UserStatusDto || (exports.UserStatusDto = {}));
28878
+ exports.BuildInfraMetaConfigTypes = void 0;
28879
+ (function (BuildInfraMetaConfigTypes) {
28880
+ BuildInfraMetaConfigTypes["NAME"] = "name";
28881
+ BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
28882
+ })(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
28978
28883
  /**
28979
- * User status for the frontend
28884
+ * Would be used as key for few components and would be appending activate and de_activate actions to it
28980
28885
  */
28981
- exports.UserStatus = void 0;
28982
- (function (UserStatus) {
28983
- UserStatus["active"] = "active";
28984
- UserStatus["inactive"] = "inactive";
28985
- UserStatus["temporary"] = "temporary";
28986
- })(exports.UserStatus || (exports.UserStatus = {}));
28886
+ exports.BuildInfraLocators = void 0;
28887
+ (function (BuildInfraLocators) {
28888
+ BuildInfraLocators["CPU"] = "cpu";
28889
+ BuildInfraLocators["MEMORY"] = "memory";
28890
+ // This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
28891
+ BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
28892
+ })(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
28893
+ // FIXME: Derive this from BuildInfraLocators
28894
+ // Appending the locators from above
28895
+ exports.BuildInfraInheritActions = void 0;
28896
+ (function (BuildInfraInheritActions) {
28897
+ BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
28898
+ BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
28899
+ BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
28900
+ BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
28901
+ BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_timeout";
28902
+ BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_timeout";
28903
+ })(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
28904
+ var BuildInfraConfigActionMap = (_a$2 = {},
28905
+ _a$2[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
28906
+ _a$2[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
28907
+ _a$2[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
28908
+ _a$2[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
28909
+ _a$2[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
28910
+ _a$2);
28911
+ exports.BuildInfraProfileVariants = void 0;
28912
+ (function (BuildInfraProfileVariants) {
28913
+ BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
28914
+ BuildInfraProfileVariants["NORMAL"] = "NORMAL";
28915
+ BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
28916
+ })(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
28917
+
28918
+ var _a$1;
28919
+ var BUILD_INFRA_INPUT_CONSTRAINTS = {
28920
+ // Will not enforce any decimal specification on input field
28921
+ STEP: 'any',
28922
+ MIN: 0,
28923
+ DECIMAL_PLACES: 2,
28924
+ };
28925
+ var BUILD_INFRA_TEXT = {
28926
+ HEADING: 'Build Infra Configuration',
28927
+ EDIT_SUBMIT: 'Save changes',
28928
+ SAVE_SUBMIT: 'Save',
28929
+ EDIT_CANCEL: 'Cancel',
28930
+ 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.',
28931
+ DESCRIPTION_LABEL: 'Description',
28932
+ DESCRIPTION_PLACEHOLDER: 'Enter a description here',
28933
+ PROFILE_LABEL: 'Profile name',
28934
+ PROFILE_PLACEHOLDER: 'Enter a name eg. java/node/small/medium/large',
28935
+ INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
28936
+ SUBMIT_BUTTON_TIPPY: {
28937
+ INVALID_INPUT: 'Valid input is required for all mandatory fields.',
28938
+ REQUEST_IN_PROGRESS: 'Request in progress.',
28939
+ },
28940
+ VALIDATE_REQUEST_LIMIT: {
28941
+ REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
28942
+ CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
28943
+ REQUEST_DECIMAL_PLACES: "Request should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
28944
+ LIMIT_DECIMAL_PLACES: "Limit should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
28945
+ },
28946
+ getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
28947
+ getSubmitSuccessMessage: function (profileName, isEdited) {
28948
+ return "".concat(profileName, " profile is ").concat(isEdited ? 'updated' : 'created');
28949
+ },
28950
+ PROFILE_NOT_FOUND: {
28951
+ title: 'Profile not found',
28952
+ subTitle: 'The profile you are looking for does not exist.',
28953
+ },
28954
+ INVALID_FORM_MESSAGE: 'Valid input is required for all mandatory fields.',
28955
+ };
28956
+ var BUILD_INFRA_BREADCRUMB = {
28957
+ alias: {
28958
+ 'global-config': null,
28959
+ 'build-infra': {
28960
+ component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
28961
+ linked: false,
28962
+ },
28963
+ },
28964
+ };
28965
+ // TODO: move heading to component itself
28966
+ var BUILD_INFRA_FORM_FIELDS = [
28967
+ {
28968
+ 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)" })),
28969
+ marker: SvgIcCpu,
28970
+ actions: [
28971
+ {
28972
+ actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
28973
+ label: 'Request',
28974
+ placeholder: 'Type CPU request',
28975
+ },
28976
+ {
28977
+ actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
28978
+ label: 'Limit',
28979
+ placeholder: 'Type CPU limit',
28980
+ },
28981
+ ],
28982
+ locator: exports.BuildInfraLocators.CPU,
28983
+ },
28984
+ {
28985
+ 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)" })),
28986
+ marker: SvgIcMemory,
28987
+ actions: [
28988
+ {
28989
+ actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
28990
+ label: 'Request',
28991
+ placeholder: 'Type memory request',
28992
+ },
28993
+ {
28994
+ actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
28995
+ label: 'Limit',
28996
+ placeholder: 'Type memory limit',
28997
+ },
28998
+ ],
28999
+ locator: exports.BuildInfraLocators.MEMORY,
29000
+ },
29001
+ {
29002
+ heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Build timeout" })),
29003
+ marker: SvgIcTimer,
29004
+ actions: [
29005
+ {
29006
+ actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
29007
+ label: 'Timeout',
29008
+ placeholder: 'Type build timeout',
29009
+ },
29010
+ ],
29011
+ locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
29012
+ },
29013
+ ];
29014
+ var PROFILE_INPUT_ERROR_FIELDS = Object.fromEntries(Object.values(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (value) { return [value, null]; }));
29015
+ // 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
29016
+ var CREATE_MODE_REQUIRED_INPUT_FIELDS = [exports.BuildInfraMetaConfigTypes.NAME];
29017
+ var DEFAULT_PROFILE_NAME = 'default';
29018
+ var CREATE_PROFILE_BASE_VALUE = {
29019
+ name: '',
29020
+ description: '',
29021
+ type: exports.BuildInfraProfileVariants.NORMAL,
29022
+ appCount: 0,
29023
+ };
29024
+ var CREATE_VIEW_CHECKED_CONFIGS = (_a$1 = {},
29025
+ _a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
29026
+ _a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
29027
+ _a$1);
29028
+ var BUILD_INFRA_TEST_IDS = {
29029
+ SUBMIT_BUTTON: 'build-infra-submit-button',
29030
+ CANCEL_BUTTON: 'build-infra-cancel-button',
29031
+ };
29032
+
29033
+ var Descriptor = function (_a) {
29034
+ var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children, tippyInfoText = _a.tippyInfoText, tippyAdditionalContent = _a.tippyAdditionalContent;
29035
+ 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] })));
29036
+ };
29037
+
29038
+ var Footer = function (_a) {
29039
+ var disabled = _a.disabled, handleCancel = _a.handleCancel, editProfile = _a.editProfile, loading = _a.loading;
29040
+ var disableMessage = disabled
29041
+ ? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
29042
+ : BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
29043
+ var getButtonText = function () {
29044
+ if (editProfile) {
29045
+ return BUILD_INFRA_TEXT.EDIT_SUBMIT;
29046
+ }
29047
+ return BUILD_INFRA_TEXT.SAVE_SUBMIT;
29048
+ };
29049
+ var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
29050
+ 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 })))] })));
29051
+ };
29052
+
29053
+ var getBaseProfileObject = function (fromCreateView, profile) {
29054
+ if (fromCreateView) {
29055
+ return CREATE_PROFILE_BASE_VALUE;
29056
+ }
29057
+ return {
29058
+ id: profile.id,
29059
+ name: profile.name,
29060
+ description: profile.description,
29061
+ type: profile.type,
29062
+ appCount: profile.appCount,
29063
+ };
29064
+ };
29065
+ // Would receive a single profile and return transformed response
29066
+ var getTransformedBuildInfraProfileResponse = function (_a) {
29067
+ var _b, _c, _d;
29068
+ var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
29069
+ // Assuming would contain all the keys
29070
+ var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
29071
+ acc[configuration.key] = configuration;
29072
+ return acc;
29073
+ }, {})) !== null && _b !== void 0 ? _b : {};
29074
+ var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
29075
+ acc[configuration.key] = configuration;
29076
+ return acc;
29077
+ }, {})) !== null && _d !== void 0 ? _d : {};
29078
+ var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
29079
+ var _a, _b;
29080
+ var defaultConfiguration = defaultConfigurationsMap[key];
29081
+ 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;
29082
+ // Pushing default value in configurations in case we de-activate the configuration
29083
+ var defaultValue = {
29084
+ value: defaultConfiguration.value,
29085
+ unit: defaultConfiguration.unit,
29086
+ };
29087
+ if (fromCreateView) {
29088
+ acc[key] = {
29089
+ key: key,
29090
+ value: defaultConfiguration.value,
29091
+ unit: defaultConfiguration.unit,
29092
+ active: (_b = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _b !== void 0 ? _b : false,
29093
+ defaultValue: defaultValue,
29094
+ };
29095
+ return acc;
29096
+ }
29097
+ if (profileConfiguration) {
29098
+ acc[key] = __assign(__assign({}, profileConfiguration), { defaultValue: defaultValue });
29099
+ return acc;
29100
+ }
29101
+ // Removing id from it since we do not have a configuration
29102
+ // While generating payload, we will check on the basis of id and active flag.
29103
+ acc[key] = {
29104
+ key: key,
29105
+ value: defaultConfiguration.value,
29106
+ // saving profile name as undefined and this would be a check, if we are deriving from default or not
29107
+ unit: defaultConfiguration.unit,
29108
+ active: false,
29109
+ defaultValue: defaultValue,
29110
+ };
29111
+ return acc;
29112
+ }, {});
29113
+ return {
29114
+ configurationUnits: configurationUnits,
29115
+ profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
29116
+ };
29117
+ };
29118
+ var getBuildInfraProfileByName = function (_a) {
29119
+ var name = _a.name, fromCreateView = _a.fromCreateView;
29120
+ return __awaiter(void 0, void 0, void 0, function () {
29121
+ var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
29122
+ return __generator(this, function (_c) {
29123
+ switch (_c.label) {
29124
+ case 0:
29125
+ _c.trys.push([0, 2, , 3]);
29126
+ return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
29127
+ case 1:
29128
+ response = _c.sent();
29129
+ _b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
29130
+ return [2 /*return*/, getTransformedBuildInfraProfileResponse({
29131
+ configurationUnits: configurationUnits,
29132
+ defaultConfigurations: defaultConfigurations,
29133
+ profile: profile,
29134
+ fromCreateView: fromCreateView,
29135
+ })];
29136
+ case 2:
29137
+ error_1 = _c.sent();
29138
+ showError(error_1);
29139
+ throw error_1;
29140
+ case 3: return [2 /*return*/];
29141
+ }
29142
+ });
29143
+ });
29144
+ };
29145
+ var getBuildInfraProfilePayload = function (profileInput) {
29146
+ var currentConfigurations = profileInput.configurations;
29147
+ var configurationKeys = Object.keys(currentConfigurations);
29148
+ // would only keep the configurations with id or active flag as true
29149
+ var configurations = configurationKeys.reduce(function (acc, key) {
29150
+ var configuration = currentConfigurations[key];
29151
+ if (configuration.id || configuration.active) {
29152
+ acc.push({
29153
+ id: configuration.id,
29154
+ key: key,
29155
+ value: Number(configuration.value),
29156
+ unit: configuration.unit,
29157
+ active: configuration.active,
29158
+ });
29159
+ }
29160
+ return acc;
29161
+ }, []);
29162
+ var payload = {
29163
+ name: profileInput.name,
29164
+ description: profileInput.description,
29165
+ type: profileInput.type,
29166
+ configurations: configurations,
29167
+ };
29168
+ return payload;
29169
+ };
29170
+ var updateBuildInfraProfile = function (_a) {
29171
+ var name = _a.name, profileInput = _a.profileInput;
29172
+ var payload = getBuildInfraProfilePayload(profileInput);
29173
+ return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
29174
+ };
29175
+ var createBuildInfraProfile = function (_a) {
29176
+ var profileInput = _a.profileInput;
29177
+ return __awaiter(void 0, void 0, void 0, function () {
29178
+ var payload;
29179
+ return __generator(this, function (_b) {
29180
+ payload = getBuildInfraProfilePayload(profileInput);
29181
+ return [2 /*return*/, post(ROUTES.INFRA_CONFIG_PROFILE, payload)];
29182
+ });
29183
+ });
29184
+ };
29185
+
29186
+ // eslint-disable-next-line import/prefer-default-export
29187
+ var NOT_FOUND_DEFAULT_TEXT = {
29188
+ title: 'Resource not found',
29189
+ subTitle: 'The resource you are looking for does not exist',
29190
+ };
29191
+
29192
+ var APIResponseHandler = function (_a) {
29193
+ var _b, _c;
29194
+ var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
29195
+ // keeping it above loading since, not expected to send a call if not authorized
29196
+ if (notAuthorized) {
29197
+ return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
29198
+ }
29199
+ if (isLoading) {
29200
+ return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
29201
+ }
29202
+ if (error) {
29203
+ // TODO: Can extend ErrorScreenNotFound
29204
+ if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
29205
+ 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 }));
29206
+ }
29207
+ return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
29208
+ }
29209
+ // Had to add this since while using it is throwing ts error
29210
+ // eslint-disable-next-line react/jsx-no-useless-fragment
29211
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
29212
+ };
29213
+
29214
+ var getCommonSelectStyle = function (styleOverrides) {
29215
+ if (styleOverrides === void 0) { styleOverrides = {}; }
29216
+ 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));
29217
+ };
29218
+ var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
29219
+ if (isSelected) {
29220
+ return 'var(--B100)';
29221
+ }
29222
+ if (isFocused) {
29223
+ return 'var(--N50)';
29224
+ }
29225
+ return 'var(--white)';
29226
+ };
29227
+ var getCustomOptionSelectionStyle = function (styleOverrides) {
29228
+ if (styleOverrides === void 0) { styleOverrides = {}; }
29229
+ 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)); };
29230
+ };
29231
+ var SelectOption = function (props) {
29232
+ var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
29233
+ selectProps.styles.option = getCustomOptionSelectionStyle(style);
29234
+ var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
29235
+ return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
29236
+ };
28987
29237
 
28988
29238
  var BulkSelectionDropdownItems = function (_a) {
28989
29239
  var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
@@ -28992,7 +29242,9 @@ var BulkSelectionDropdownItems = function (_a) {
28992
29242
  action: locator,
28993
29243
  });
28994
29244
  };
28995
- 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] })));
29245
+ 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
29246
+ ? 'cb-5 bcb-1 icon-stroke-b5 fs-13 fw-6 lh-20'
29247
+ : '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] })));
28996
29248
  };
28997
29249
 
28998
29250
  exports.BulkSelectionEvents = void 0;
@@ -29021,7 +29273,8 @@ var BulkSelectionOptionsLabels = (_a = {},
29021
29273
  // Considering application can not be named as *
29022
29274
  var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
29023
29275
  var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
29024
- var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
29276
+ var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
29277
+ var CLEAR_SELECTIONS_WARNING = 'Selections on other pages are cleared';
29025
29278
 
29026
29279
  // giving type any here since not exporting this context, rather using it through useBulkSelection hook which is typed
29027
29280
  var BulkSelectionContext = React.createContext({
@@ -29029,8 +29282,6 @@ var BulkSelectionContext = React.createContext({
29029
29282
  handleBulkSelection: noop$1,
29030
29283
  isChecked: false,
29031
29284
  checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
29032
- isBulkSelectionApplied: false,
29033
- getSelectedIdentifiersCount: noop$1,
29034
29285
  });
29035
29286
  var useBulkSelection = function () {
29036
29287
  var context = React.useContext(BulkSelectionContext);
@@ -29042,8 +29293,6 @@ var useBulkSelection = function () {
29042
29293
  var BulkSelectionProvider = function (_a) {
29043
29294
  var children = _a.children, identifiers = _a.identifiers, getSelectAllDialogStatus = _a.getSelectAllDialogStatus;
29044
29295
  var _b = __read(React.useState({}), 2), selectedIdentifiers = _b[0], setSelectedIdentifiers = _b[1];
29045
- var isBulkSelectionApplied = selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
29046
- var getSelectedIdentifiersCount = function () { return Object.keys(selectedIdentifiers).length; };
29047
29296
  var setIdentifiersAfterClear = function (newIdentifiers, selectedIds) {
29048
29297
  var _newIdentifiers = JSON.parse(JSON.stringify(newIdentifiers));
29049
29298
  selectedIds.forEach(function (id) {
@@ -29054,7 +29303,7 @@ var BulkSelectionProvider = function (_a) {
29054
29303
  var setIdentifiersAfterPageSelection = function (baseObject) {
29055
29304
  var _selectedIdentifiers = JSON.parse(JSON.stringify(selectedIdentifiers));
29056
29305
  // removing bulk selection across pages if present
29057
- if (isBulkSelectionApplied) {
29306
+ if (_selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29058
29307
  delete _selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
29059
29308
  }
29060
29309
  setSelectedIdentifiers(__assign(__assign({}, _selectedIdentifiers), baseObject));
@@ -29070,6 +29319,7 @@ var BulkSelectionProvider = function (_a) {
29070
29319
  setSelectedIdentifiers({});
29071
29320
  break;
29072
29321
  case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
29322
+ toast.info(CLEAR_SELECTIONS_WARNING);
29073
29323
  setIdentifiersAfterClear(identifiers, selectedIds);
29074
29324
  break;
29075
29325
  }
@@ -29078,13 +29328,10 @@ var BulkSelectionProvider = function (_a) {
29078
29328
  break;
29079
29329
  }
29080
29330
  case exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES: {
29081
- if (isBulkSelectionApplied) {
29331
+ if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29082
29332
  return;
29083
29333
  }
29084
- var selectedIdentifiersLength = getSelectedIdentifiersCount();
29085
- // This is for showing a modal dialog if applicable to confirm if bulk selection is to be applied
29086
- // Do note that the 'getSelectAllDialogStatus' should be called after the length check explicitly
29087
- // otherwise the modal will open each time
29334
+ var selectedIdentifiersLength = Object.keys(selectedIdentifiers).length;
29088
29335
  if (selectedIdentifiersLength > 0 && getSelectAllDialogStatus() === exports.SelectAllDialogStatus.OPEN) {
29089
29336
  return;
29090
29337
  }
@@ -29099,6 +29346,9 @@ var BulkSelectionProvider = function (_a) {
29099
29346
  _c));
29100
29347
  break;
29101
29348
  case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
29349
+ if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29350
+ toast.info(CLEAR_SELECTIONS_WARNING);
29351
+ }
29102
29352
  setIdentifiersAfterPageSelection(identifiers);
29103
29353
  break;
29104
29354
  }
@@ -29119,7 +29369,7 @@ var BulkSelectionProvider = function (_a) {
29119
29369
  };
29120
29370
  }
29121
29371
  // if selectedIdentifiers contains select all across pages locator then it means all are selected
29122
- if (isBulkSelectionApplied) {
29372
+ if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29123
29373
  return {
29124
29374
  isChecked: true,
29125
29375
  checkboxValue: exports.CHECKBOX_VALUE.BULK_CHECKED,
@@ -29144,9 +29394,7 @@ var BulkSelectionProvider = function (_a) {
29144
29394
  handleBulkSelection: handleBulkSelection,
29145
29395
  isChecked: isChecked,
29146
29396
  checkboxValue: checkboxValue,
29147
- isBulkSelectionApplied: isBulkSelectionApplied,
29148
- getSelectedIdentifiersCount: getSelectedIdentifiersCount,
29149
- }); }, [selectedIdentifiers, handleBulkSelection, isChecked, checkboxValue, getSelectedIdentifiersCount]);
29397
+ }); }, [selectedIdentifiers, handleBulkSelection, isChecked, checkboxValue]);
29150
29398
  return jsxRuntime.jsx(BulkSelectionContext.Provider, __assign({ value: value }, { children: children }));
29151
29399
  };
29152
29400
 
@@ -29228,8 +29476,8 @@ var SvgIcClose = function SvgIcClose(props) {
29228
29476
 
29229
29477
  var BulkSelection = function (_a) {
29230
29478
  var showPagination = _a.showPagination;
29231
- var _b = useBulkSelection(), handleBulkSelection = _b.handleBulkSelection, isChecked = _b.isChecked, checkboxValue = _b.checkboxValue, getSelectedIdentifiersCount = _b.getSelectedIdentifiersCount;
29232
- var areOptionsSelected = getSelectedIdentifiersCount() > 0;
29479
+ var _b = useBulkSelection(), handleBulkSelection = _b.handleBulkSelection, selectedIdentifiers = _b.selectedIdentifiers, isChecked = _b.isChecked, checkboxValue = _b.checkboxValue;
29480
+ var areOptionsSelected = Object.keys(selectedIdentifiers).length > 0;
29233
29481
  var BulkSelectionItems = __spreadArray(__spreadArray([
29234
29482
  {
29235
29483
  locator: exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE,
@@ -29259,17 +29507,562 @@ var BulkSelection = function (_a) {
29259
29507
  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)); }) }))] })));
29260
29508
  };
29261
29509
 
29510
+ var MESSAGES = {
29511
+ PROVIDE_A_NUMBER: 'Please provide a number',
29512
+ LOWERCASE_ALPHANUMERIC: 'Only lowercase alphanumeric characters, -, _ or . allowed',
29513
+ CAN_NOT_START_END_WITH_SEPARATORS: 'Cannot start/end with -, _ or .',
29514
+ getMinMaxCharMessage: function (min, max) { return "Minimum ".concat(min, " and maximum ").concat(max, " characters allowed"); },
29515
+ getMaxCharMessage: function (max) { return "Maximum ".concat(max, " characters are allowed"); },
29516
+ VALID_POSITIVE_NUMBER: 'This field should be a valid positive number',
29517
+ VALID_POSITIVE_INTEGER: 'This field should be a valid positive integer',
29518
+ MAX_SAFE_INTEGER: "Maximum allowed value is ".concat(Number.MAX_SAFE_INTEGER),
29519
+ };
29520
+ var MAX_DESCRIPTION_LENGTH = 300;
29521
+ var validateName = function (name) {
29522
+ if (!/^.{3,50}$/.test(name)) {
29523
+ return {
29524
+ isValid: false,
29525
+ message: MESSAGES.getMinMaxCharMessage(3, 50),
29526
+ };
29527
+ }
29528
+ if (!/^[a-z0-9-._]+$/.test(name)) {
29529
+ return {
29530
+ isValid: false,
29531
+ message: MESSAGES.LOWERCASE_ALPHANUMERIC,
29532
+ };
29533
+ }
29534
+ if (!/^(?![-._]).*[^-._]$/.test(name)) {
29535
+ return {
29536
+ isValid: false,
29537
+ message: MESSAGES.CAN_NOT_START_END_WITH_SEPARATORS,
29538
+ };
29539
+ }
29540
+ return {
29541
+ isValid: true,
29542
+ };
29543
+ };
29544
+ var validateDescription = function (description) {
29545
+ if ((description === null || description === void 0 ? void 0 : description.length) > MAX_DESCRIPTION_LENGTH) {
29546
+ return {
29547
+ isValid: false,
29548
+ message: MESSAGES.getMaxCharMessage(MAX_DESCRIPTION_LENGTH),
29549
+ };
29550
+ }
29551
+ return {
29552
+ isValid: true,
29553
+ };
29554
+ };
29555
+ var validateRequiredPositiveNumber = function (value) {
29556
+ if (!value) {
29557
+ return {
29558
+ isValid: false,
29559
+ message: MESSAGES.PROVIDE_A_NUMBER,
29560
+ };
29561
+ }
29562
+ // TODO: Look if regex is available for this, since 0002 is not a valid number
29563
+ if (!/^\d+(\.\d+)?$/.test(value.toString())) {
29564
+ return {
29565
+ isValid: false,
29566
+ message: MESSAGES.VALID_POSITIVE_NUMBER,
29567
+ };
29568
+ }
29569
+ var numericValue = Number(value);
29570
+ if (numericValue > Number.MAX_SAFE_INTEGER) {
29571
+ return {
29572
+ isValid: false,
29573
+ message: MESSAGES.MAX_SAFE_INTEGER,
29574
+ };
29575
+ }
29576
+ if (numericValue <= 0) {
29577
+ return {
29578
+ isValid: false,
29579
+ message: MESSAGES.VALID_POSITIVE_NUMBER,
29580
+ };
29581
+ }
29582
+ return {
29583
+ isValid: true,
29584
+ };
29585
+ };
29586
+ var validateRequiredPositiveInteger = function (value) {
29587
+ if (!value) {
29588
+ return {
29589
+ isValid: false,
29590
+ message: MESSAGES.PROVIDE_A_NUMBER,
29591
+ };
29592
+ }
29593
+ if (!/^\d+$/.test(value.toString())) {
29594
+ return {
29595
+ isValid: false,
29596
+ message: MESSAGES.VALID_POSITIVE_INTEGER,
29597
+ };
29598
+ }
29599
+ var numericValue = Number(value);
29600
+ if (numericValue > Number.MAX_SAFE_INTEGER) {
29601
+ return {
29602
+ isValid: false,
29603
+ message: MESSAGES.MAX_SAFE_INTEGER,
29604
+ };
29605
+ }
29606
+ if (numericValue <= 0) {
29607
+ return {
29608
+ isValid: false,
29609
+ message: MESSAGES.VALID_POSITIVE_INTEGER,
29610
+ };
29611
+ }
29612
+ return {
29613
+ isValid: true,
29614
+ };
29615
+ };
29616
+
29617
+ // Disabling default export since this is a helper function and we would have to export a lot of functions in future.
29618
+ // eslint-disable-next-line import/prefer-default-export
29619
+ var highlightSearchText = function (_a) {
29620
+ var searchText = _a.searchText, text = _a.text, highlightClasses = _a.highlightClasses;
29621
+ if (!searchText) {
29622
+ return text;
29623
+ }
29624
+ try {
29625
+ var regex = new RegExp(searchText, 'gi');
29626
+ return text.replace(regex, function (match) { return "<span class=\"".concat(highlightClasses, "\">").concat(match, "</span>"); });
29627
+ }
29628
+ catch (error) {
29629
+ return text;
29630
+ }
29631
+ };
29632
+
29633
+ var validateRequestLimit = function (_a) {
29634
+ var _b, _c, _d, _e, _f, _g;
29635
+ var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
29636
+ // Request <= Limit
29637
+ // Request and Limit should be numbers can be decimals
29638
+ // Request and Limit should be positive numbers
29639
+ // Request and Limit should be less than Number.MAX_SAFE_INTEGER
29640
+ // Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
29641
+ // Both request and limit should be there
29642
+ var requestNumber = Number(request.value);
29643
+ var limitNumber = Number(limit.value);
29644
+ var requestUnit = Number((_b = unitsMap[request.unit]) === null || _b === void 0 ? void 0 : _b.conversionFactor);
29645
+ var limitUnit = Number((_c = unitsMap[limit.unit]) === null || _c === void 0 ? void 0 : _c.conversionFactor);
29646
+ var requestLimitValidationResponse = {
29647
+ request: {
29648
+ isValid: true,
29649
+ },
29650
+ limit: {
29651
+ isValid: true,
29652
+ },
29653
+ };
29654
+ var requestValidationMessage = validateRequiredPositiveNumber(request.value).message;
29655
+ var limitValidationMessage = validateRequiredPositiveNumber(limit.value).message;
29656
+ if (requestValidationMessage) {
29657
+ requestLimitValidationResponse.request = {
29658
+ message: requestValidationMessage,
29659
+ isValid: false,
29660
+ };
29661
+ }
29662
+ if (limitValidationMessage) {
29663
+ requestLimitValidationResponse.limit = {
29664
+ message: limitValidationMessage,
29665
+ isValid: false,
29666
+ };
29667
+ }
29668
+ if (limitValidationMessage || requestValidationMessage) {
29669
+ return requestLimitValidationResponse;
29670
+ }
29671
+ // only two decimal places are allowed
29672
+ var requestDecimalPlaces = (_e = (_d = String(request.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
29673
+ var limitDecimalPlaces = (_g = (_f = String(limit.value).split('.')[1]) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0;
29674
+ if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29675
+ requestLimitValidationResponse.request = {
29676
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
29677
+ isValid: false,
29678
+ };
29679
+ return requestLimitValidationResponse;
29680
+ }
29681
+ if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29682
+ requestLimitValidationResponse.limit = {
29683
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
29684
+ isValid: false,
29685
+ };
29686
+ return requestLimitValidationResponse;
29687
+ }
29688
+ // Assuming requestUnit and requestNumber are not 0
29689
+ // TODO: Communicate this assumption to the backend
29690
+ var limitRequestUnitFactor = limitUnit / requestUnit;
29691
+ var limitRequestFactor = limitNumber / requestNumber;
29692
+ var isDifferenceBigNumber = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
29693
+ if (!isDifferenceBigNumber) {
29694
+ requestLimitValidationResponse.request = {
29695
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
29696
+ isValid: false,
29697
+ };
29698
+ return requestLimitValidationResponse;
29699
+ }
29700
+ if (limitRequestUnitFactor * limitRequestFactor < 1) {
29701
+ requestLimitValidationResponse.request = {
29702
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
29703
+ isValid: false,
29704
+ };
29705
+ return requestLimitValidationResponse;
29706
+ }
29707
+ return requestLimitValidationResponse;
29708
+ };
29709
+ var getInitialProfileInputErrors = function (fromCreateView) {
29710
+ if (fromCreateView) {
29711
+ var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29712
+ CREATE_MODE_REQUIRED_INPUT_FIELDS.forEach(function (field) {
29713
+ initialProfileInputErrors_1[field] = '';
29714
+ });
29715
+ return initialProfileInputErrors_1;
29716
+ }
29717
+ return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29718
+ };
29719
+ var useBuildInfraForm = function (_a) {
29720
+ var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
29721
+ var fromCreateView = !name;
29722
+ var _b = __read(useAsync(function () {
29723
+ return getBuildInfraProfileByName({
29724
+ name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
29725
+ fromCreateView: fromCreateView,
29726
+ });
29727
+ }, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
29728
+ // If configuration is existing and is active then use it else use default from profileResponse
29729
+ var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
29730
+ var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
29731
+ var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
29732
+ React.useEffect(function () {
29733
+ if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
29734
+ setProfileInput(__assign({}, profileResponse.profile));
29735
+ setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
29736
+ }
29737
+ }, [profileResponse, isLoading]);
29738
+ // NOTE: Currently sending and receiving values as string, but will parse it to number for payload
29739
+ var handleProfileInputChange = function (_a) {
29740
+ var action = _a.action, data = _a.data;
29741
+ var currentInput = __assign({}, profileInput);
29742
+ var currentInputErrors = __assign({}, profileInputErrors);
29743
+ var lastSavedConfiguration = profileResponse.profile.configurations;
29744
+ var currentConfiguration = currentInput.configurations;
29745
+ var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
29746
+ switch (action) {
29747
+ case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
29748
+ currentInput.description = value;
29749
+ currentInputErrors.description = validateDescription(value).message;
29750
+ break;
29751
+ case exports.BuildInfraMetaConfigTypes.NAME:
29752
+ currentInput.name = value;
29753
+ currentInputErrors.name = validateName(value).message;
29754
+ break;
29755
+ case exports.BuildInfraConfigTypes.CPU_LIMIT: {
29756
+ currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
29757
+ var _c = validateRequestLimit({
29758
+ request: {
29759
+ value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
29760
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
29761
+ },
29762
+ limit: {
29763
+ value: value,
29764
+ unit: unit,
29765
+ },
29766
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
29767
+ }), request = _c.request, limit = _c.limit;
29768
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
29769
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
29770
+ break;
29771
+ }
29772
+ case exports.BuildInfraConfigTypes.CPU_REQUEST: {
29773
+ currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
29774
+ var _d = validateRequestLimit({
29775
+ request: {
29776
+ value: value,
29777
+ unit: unit,
29778
+ },
29779
+ limit: {
29780
+ value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
29781
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
29782
+ },
29783
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
29784
+ }), request = _d.request, limit = _d.limit;
29785
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
29786
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
29787
+ break;
29788
+ }
29789
+ case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
29790
+ currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
29791
+ var _e = validateRequestLimit({
29792
+ request: {
29793
+ value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
29794
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
29795
+ },
29796
+ limit: {
29797
+ value: value,
29798
+ unit: unit,
29799
+ },
29800
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
29801
+ }), request = _e.request, limit = _e.limit;
29802
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
29803
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
29804
+ break;
29805
+ }
29806
+ case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
29807
+ currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
29808
+ var _f = validateRequestLimit({
29809
+ request: {
29810
+ value: value,
29811
+ unit: unit,
29812
+ },
29813
+ limit: {
29814
+ value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
29815
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
29816
+ },
29817
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
29818
+ }), request = _f.request, limit = _f.limit;
29819
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
29820
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
29821
+ break;
29822
+ }
29823
+ case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
29824
+ currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
29825
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveInteger(value).message;
29826
+ break;
29827
+ }
29828
+ case exports.BuildInfraInheritActions.ACTIVATE_CPU:
29829
+ 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 });
29830
+ 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 });
29831
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
29832
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
29833
+ break;
29834
+ case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
29835
+ 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 });
29836
+ 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 });
29837
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
29838
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
29839
+ break;
29840
+ case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
29841
+ 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 });
29842
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
29843
+ break;
29844
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
29845
+ // Reverting the value and unit to defaultValues
29846
+ 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 });
29847
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
29848
+ break;
29849
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
29850
+ 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 });
29851
+ 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 });
29852
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
29853
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
29854
+ break;
29855
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
29856
+ 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 });
29857
+ 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 });
29858
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
29859
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
29860
+ break;
29861
+ default:
29862
+ throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
29863
+ }
29864
+ setProfileInput(currentInput);
29865
+ setProfileInputErrors(currentInputErrors);
29866
+ };
29867
+ var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
29868
+ var hasErrors, err_1;
29869
+ return __generator(this, function (_a) {
29870
+ switch (_a.label) {
29871
+ case 0:
29872
+ e.preventDefault();
29873
+ hasErrors = Object.keys(profileInputErrors).filter(function (item) { return profileInputErrors[item] !== null && profileInputErrors[item] !== undefined; }).length > 0;
29874
+ if (hasErrors) {
29875
+ toast.error(BUILD_INFRA_TEXT.INVALID_FORM_MESSAGE);
29876
+ return [2 /*return*/];
29877
+ }
29878
+ setLoadingActionRequest(true);
29879
+ _a.label = 1;
29880
+ case 1:
29881
+ _a.trys.push([1, 6, , 7]);
29882
+ if (!editProfile) return [3 /*break*/, 3];
29883
+ return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
29884
+ case 2:
29885
+ _a.sent();
29886
+ return [3 /*break*/, 5];
29887
+ case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
29888
+ case 4:
29889
+ _a.sent();
29890
+ _a.label = 5;
29891
+ case 5:
29892
+ setLoadingActionRequest(false);
29893
+ toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
29894
+ if (handleSuccessRedirection) {
29895
+ handleSuccessRedirection();
29896
+ }
29897
+ else {
29898
+ reloadRequest();
29899
+ }
29900
+ return [3 /*break*/, 7];
29901
+ case 6:
29902
+ err_1 = _a.sent();
29903
+ showError(err_1);
29904
+ setLoadingActionRequest(false);
29905
+ return [3 /*break*/, 7];
29906
+ case 7: return [2 /*return*/];
29907
+ }
29908
+ });
29909
+ }); };
29910
+ return {
29911
+ isLoading: isLoading,
29912
+ profileResponse: profileResponse,
29913
+ responseError: responseError,
29914
+ reloadRequest: reloadRequest,
29915
+ profileInput: profileInput,
29916
+ profileInputErrors: profileInputErrors,
29917
+ handleProfileInputChange: handleProfileInputChange,
29918
+ loadingActionRequest: loadingActionRequest,
29919
+ handleSubmit: handleSubmit,
29920
+ };
29921
+ };
29922
+ var unitSelectorStyles = function () {
29923
+ return getCommonSelectStyle({
29924
+ 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': {
29925
+ border: '1px solid var(--N400)',
29926
+ } })); },
29927
+ indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
29928
+ dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
29929
+ option: function (base, state) { return (__assign(__assign(__assign(__assign(__assign({}, base), { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', cursor: 'pointer' }), (state.isFocused
29930
+ ? {
29931
+ backgroundColor: 'var(--N50)',
29932
+ }
29933
+ : {})), (state.isSelected && {
29934
+ backgroundColor: 'var(--B100)',
29935
+ fontWeight: 600,
29936
+ color: 'var(--B500)',
29937
+ })), { '&:active': {
29938
+ backgroundColor: 'var(--N50)',
29939
+ } })); },
29940
+ valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
29941
+ menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
29942
+ });
29943
+ };
29944
+
29945
+ /**
29946
+ * In case need arise for variants break this CustomInput and Select as a separate component
29947
+ */
29948
+ var BuildInfraFormAction = function (_a) {
29949
+ 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;
29950
+ var handleUnitChange = function (selectedUnit) {
29951
+ var data = {
29952
+ unit: selectedUnit.label,
29953
+ value: currentValue,
29954
+ };
29955
+ handleProfileInputChange({ action: actionType, data: data });
29956
+ };
29957
+ var handleInputChange = function (e) {
29958
+ var data = {
29959
+ unit: currentUnitName,
29960
+ value: e.currentTarget.value,
29961
+ };
29962
+ handleProfileInputChange({ action: actionType, data: data });
29963
+ };
29964
+ var unitOptions = React.useMemo(function () {
29965
+ var _a, _b;
29966
+ var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
29967
+ label: unit.name,
29968
+ value: String(unit.conversionFactor),
29969
+ }); })) !== null && _b !== void 0 ? _b : [];
29970
+ return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
29971
+ }, [profileUnitsMap]);
29972
+ var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
29973
+ 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: {
29974
+ IndicatorSeparator: null,
29975
+ ClearIndicator: null,
29976
+ }, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
29977
+ };
29978
+
29979
+ var BuildInfraFormItem = function (_a) {
29980
+ 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;
29981
+ var handleActivationChange = function (e) {
29982
+ var checked = e.currentTarget.checked;
29983
+ var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
29984
+ handleProfileInputChange({ action: action });
29985
+ };
29986
+ var renderMarker = function () {
29987
+ if (isDefaultProfile) {
29988
+ return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
29989
+ }
29990
+ return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
29991
+ };
29992
+ // If in configuration active is false, means it is inheriting values from other profile
29993
+ 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" })] }));
29994
+ };
29995
+
29996
+ var BuildInfraProfileDescriptionField = function (_a) {
29997
+ var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
29998
+ var handleChange = function (e) {
29999
+ handleProfileInputChange({
30000
+ action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
30001
+ data: { value: e.currentTarget.value },
30002
+ });
30003
+ };
30004
+ 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] })))] })));
30005
+ };
30006
+
30007
+ var BuildInfraProfileNameField = function (_a) {
30008
+ var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
30009
+ var handleChange = function (e) {
30010
+ handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
30011
+ };
30012
+ 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" }) })));
30013
+ };
30014
+
30015
+ var InheritingHeader = function (_a) {
30016
+ var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
30017
+ var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
30018
+ if (isDefaultProfile || !isInheriting) {
30019
+ // For typing issues
30020
+ // eslint-disable-next-line react/jsx-no-useless-fragment
30021
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
30022
+ }
30023
+ 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 }))] }))] })));
30024
+ };
30025
+ var BuildInfraConfigForm = function (_a) {
30026
+ var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
30027
+ var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
30028
+ // will get the desired configuration from the currentConfigurations and then check if it is active or not
30029
+ var isInheritingProfileValues = function (actions) {
30030
+ return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
30031
+ };
30032
+ // Had to show loader for an instance due to batching of state updates not working as expected :/
30033
+ if (!currentConfigurations) {
30034
+ return jsxRuntime.jsx(Progressing, { pageLoader: true });
30035
+ }
30036
+ 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],
30037
+ // Assumption is for default profiles all input fields are required
30038
+ isRequired: true, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
30039
+ };
30040
+
30041
+ exports.APIResponseHandler = APIResponseHandler;
29262
30042
  exports.AddCDButton = AddCDButton;
29263
30043
  exports.AppStatus = AppStatus;
30044
+ exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
30045
+ exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
30046
+ exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
30047
+ exports.BUILD_INFRA_TEST_IDS = BUILD_INFRA_TEST_IDS;
30048
+ exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
29264
30049
  exports.BULK_DROPDOWN_TEST_ID = BULK_DROPDOWN_TEST_ID;
29265
30050
  exports.BULK_SELECTION_CONTEXT_ERROR = BULK_SELECTION_CONTEXT_ERROR;
29266
30051
  exports.BreadCrumb = BreadCrumb;
29267
30052
  exports.BreadcrumbStore = Store;
30053
+ exports.BuildInfraConfigActionMap = BuildInfraConfigActionMap;
30054
+ exports.BuildInfraConfigForm = BuildInfraConfigForm;
30055
+ exports.BuildInfraDescriptor = Descriptor;
30056
+ exports.BuildInfraFooter = Footer;
29268
30057
  exports.BuildStageVariable = BuildStageVariable;
29269
30058
  exports.BulkSelection = BulkSelection;
29270
30059
  exports.BulkSelectionOptionsLabels = BulkSelectionOptionsLabels;
29271
30060
  exports.BulkSelectionProvider = BulkSelectionProvider;
29272
30061
  exports.CDModalTab = CDModalTab;
30062
+ exports.CLEAR_SELECTIONS_WARNING = CLEAR_SELECTIONS_WARNING;
30063
+ exports.CREATE_MODE_REQUIRED_INPUT_FIELDS = CREATE_MODE_REQUIRED_INPUT_FIELDS;
30064
+ exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
30065
+ exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
29273
30066
  exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
29274
30067
  exports.Checkbox = Checkbox$1;
29275
30068
  exports.ClearIndicator = ClearIndicator;
@@ -29278,7 +30071,7 @@ exports.ConditionalWrap = ConditionalWrap;
29278
30071
  exports.ConfirmationDialog = ConfirmationDialog;
29279
30072
  exports.CustomInput = CustomInput;
29280
30073
  exports.CustomSelect = CustomSelect;
29281
- exports.DEFAULT_BASE_PAGE_SIZE = DEFAULT_BASE_PAGE_SIZE;
30074
+ exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
29282
30075
  exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
29283
30076
  exports.DOCUMENTATION = DOCUMENTATION;
29284
30077
  exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
@@ -29312,6 +30105,7 @@ exports.MultiValueRemove = MultiValueRemove;
29312
30105
  exports.OpaqueModal = OpaqueModal;
29313
30106
  exports.Option = Option;
29314
30107
  exports.PATTERNS = PATTERNS;
30108
+ exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
29315
30109
  exports.Pagination = Pagination;
29316
30110
  exports.PopupMenu = PopupMenu;
29317
30111
  exports.Progressing = Progressing;
@@ -29329,10 +30123,10 @@ exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
29329
30123
  exports.SELECT_ALL_ACROSS_PAGES_LOCATOR = SELECT_ALL_ACROSS_PAGES_LOCATOR;
29330
30124
  exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
29331
30125
  exports.SearchBar = SearchBar;
30126
+ exports.SelectOption = SelectOption;
29332
30127
  exports.ServerError = ServerError;
29333
30128
  exports.ServerErrors = ServerErrors;
29334
30129
  exports.SingleSelectOption = SingleSelectOption;
29335
- exports.SortableTableHeaderCell = SortableTableHeaderCell;
29336
30130
  exports.SourceTypeMap = SourceTypeMap;
29337
30131
  exports.StyledRadioGroup = RadioGroup;
29338
30132
  exports.TOAST_ACCESS_DENIED = TOAST_ACCESS_DENIED;
@@ -29352,6 +30146,7 @@ exports.VisibleModal2 = VisibleModal2;
29352
30146
  exports.abortPreviousRequests = abortPreviousRequests;
29353
30147
  exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
29354
30148
  exports.copyToClipboard = copyToClipboard;
30149
+ exports.createBuildInfraProfile = createBuildInfraProfile;
29355
30150
  exports.createGitCommitUrl = createGitCommitUrl;
29356
30151
  exports.customStyles = customStyles;
29357
30152
  exports.debounce = debounce$2;
@@ -29360,7 +30155,10 @@ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
29360
30155
  exports.genericCDMaterialsService = genericCDMaterialsService;
29361
30156
  exports.get = get;
29362
30157
  exports.getAlphabetIcon = getAlphabetIcon;
30158
+ exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
30159
+ exports.getCommonSelectStyle = getCommonSelectStyle;
29363
30160
  exports.getCookie = getCookie;
30161
+ exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
29364
30162
  exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
29365
30163
  exports.getFilteredChartVersions = getFilteredChartVersions;
29366
30164
  exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
@@ -29371,11 +30169,13 @@ exports.getLoginInfo = getLoginInfo;
29371
30169
  exports.getRandomColor = getRandomColor;
29372
30170
  exports.getRedirectionProps = getRedirectionProps;
29373
30171
  exports.getTeamListMin = getTeamListMin;
30172
+ exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
29374
30173
  exports.getUnlockedJSON = getUnlockedJSON;
29375
30174
  exports.getUrlWithSearchParams = getUrlWithSearchParams;
29376
30175
  exports.getUserRole = getUserRole;
29377
30176
  exports.handleAddCD = handleAddCD;
29378
30177
  exports.handleUTCTime = handleUTCTime;
30178
+ exports.highlightSearchText = highlightSearchText;
29379
30179
  exports.logExceptionToSentry = logExceptionToSentry;
29380
30180
  exports.multiSelectStyles = multiSelectStyles;
29381
30181
  exports.noop = noop$1;
@@ -29389,8 +30189,11 @@ exports.sortCallback = sortCallback;
29389
30189
  exports.stopPropagation = stopPropagation;
29390
30190
  exports.toastAccessDenied = toastAccessDenied;
29391
30191
  exports.trash = trash;
30192
+ exports.unitSelectorStyles = unitSelectorStyles;
30193
+ exports.updateBuildInfraProfile = updateBuildInfraProfile;
29392
30194
  exports.useAsync = useAsync;
29393
30195
  exports.useBreadcrumb = useBreadcrumb;
30196
+ exports.useBuildInfraForm = useBuildInfraForm;
29394
30197
  exports.useBulkSelection = useBulkSelection;
29395
30198
  exports.useClickOutside = useClickOutside;
29396
30199
  exports.useEffectAfterMount = useEffectAfterMount;
@@ -29398,5 +30201,9 @@ exports.useForm = useForm;
29398
30201
  exports.useSearchString = useSearchString;
29399
30202
  exports.useSuperAdmin = useSuperAdmin;
29400
30203
  exports.useThrottledEffect = useThrottledEffect;
29401
- exports.useUrlFilters = useUrlFilters;
29402
30204
  exports.useWindowSize = useWindowSize;
30205
+ exports.validateDescription = validateDescription;
30206
+ exports.validateName = validateName;
30207
+ exports.validateRequestLimit = validateRequestLimit;
30208
+ exports.validateRequiredPositiveInteger = validateRequiredPositiveInteger;
30209
+ exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;