@devtron-labs/devtron-fe-common-lib 0.0.58-beta-5 → 0.0.58-beta-6

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 (83) hide show
  1. package/dist/Common/Constants.d.ts +14 -1
  2. package/dist/Common/Hooks/index.d.ts +1 -0
  3. package/dist/Common/Hooks/useUrlFilters/constants.d.ts +8 -0
  4. package/dist/Common/Hooks/useUrlFilters/index.d.ts +2 -0
  5. package/dist/Common/Hooks/useUrlFilters/types.d.ts +6 -0
  6. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +32 -0
  7. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +18 -0
  8. package/dist/Common/SortableTableHeaderCell/index.d.ts +2 -0
  9. package/dist/Common/SortableTableHeaderCell/types.d.ts +8 -0
  10. package/dist/Common/Types.d.ts +2 -3
  11. package/dist/Common/index.d.ts +1 -0
  12. package/dist/index.d.ts +1 -3
  13. package/dist/index.js +339 -1124
  14. package/package.json +1 -1
  15. package/src/Assets/Icon/ic-arrow-up-down.svg +3 -0
  16. package/src/Assets/Icon/ic-sort-arrow-down.svg +3 -0
  17. package/src/Common/BreadCrumb/Types.ts +1 -0
  18. package/src/Common/Checkbox.tsx +0 -1
  19. package/src/Common/Constants.ts +18 -3
  20. package/src/Common/CustomInput/CustomInput.tsx +1 -2
  21. package/src/Common/DraggableWrapper/DraggableWrapper.tsx +1 -3
  22. package/src/Common/Hooks/index.ts +1 -0
  23. package/src/Common/Hooks/useUrlFilters/constants.ts +9 -0
  24. package/src/Common/Hooks/useUrlFilters/index.ts +2 -0
  25. package/src/Common/Hooks/useUrlFilters/types.ts +6 -0
  26. package/src/Common/Hooks/useUrlFilters/useUrlFilters.ts +120 -0
  27. package/src/Common/RJSF/utils.ts +0 -3
  28. package/src/Common/SearchBar/SearchBar.component.tsx +13 -26
  29. package/src/Common/SearchBar/searchBar.scss +1 -1
  30. package/src/Common/SortableTableHeaderCell/SortableTableHeaderCell.tsx +44 -0
  31. package/src/Common/SortableTableHeaderCell/index.ts +2 -0
  32. package/src/Common/SortableTableHeaderCell/types.ts +9 -0
  33. package/src/Common/Types.ts +1 -2
  34. package/src/Common/index.ts +1 -0
  35. package/src/index.ts +1 -3
  36. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +0 -4
  37. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +0 -4
  38. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +0 -7
  39. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +0 -4
  40. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +0 -4
  41. package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +0 -4
  42. package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +0 -4
  43. package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +0 -48
  44. package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +0 -7
  45. package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +0 -13
  46. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +0 -281
  47. package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +0 -12
  48. package/dist/Pages/GlobalConfigurations/index.d.ts +0 -1
  49. package/dist/Pages/index.d.ts +0 -1
  50. package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +0 -4
  51. package/dist/Shared/Components/APIResponseHandler/index.d.ts +0 -2
  52. package/dist/Shared/Components/APIResponseHandler/types.d.ts +0 -37
  53. package/dist/Shared/Components/ReactSelect/index.d.ts +0 -1
  54. package/dist/Shared/Components/ReactSelect/utils.d.ts +0 -12
  55. package/dist/Shared/Components/index.d.ts +0 -2
  56. package/dist/Shared/index.d.ts +0 -2
  57. package/dist/Shared/validations.d.ts +0 -7
  58. package/src/Assets/Icon/ic-cpu.svg +0 -4
  59. package/src/Assets/Icon/ic-memory.svg +0 -3
  60. package/src/Assets/Icon/ic-timer.svg +0 -3
  61. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +0 -121
  62. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +0 -44
  63. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +0 -99
  64. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +0 -55
  65. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +0 -32
  66. package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +0 -38
  67. package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +0 -45
  68. package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +0 -4
  69. package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +0 -137
  70. package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +0 -7
  71. package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +0 -183
  72. package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +0 -334
  73. package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +0 -490
  74. package/src/Pages/GlobalConfigurations/index.ts +0 -1
  75. package/src/Pages/index.ts +0 -1
  76. package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +0 -39
  77. package/src/Shared/Components/APIResponseHandler/index.ts +0 -2
  78. package/src/Shared/Components/APIResponseHandler/types.tsx +0 -39
  79. package/src/Shared/Components/ReactSelect/index.ts +0 -1
  80. package/src/Shared/Components/ReactSelect/utils.tsx +0 -97
  81. package/src/Shared/Components/index.ts +0 -2
  82. package/src/Shared/index.ts +0 -2
  83. package/src/Shared/validations.tsx +0 -72
package/dist/index.js CHANGED
@@ -50,8 +50,7 @@ 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',
54
- INFRA_CONFIG_PROFILE: 'infra-config/profile',
53
+ DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
55
54
  };
56
55
  exports.KEY_VALUE = void 0;
57
56
  (function (KEY_VALUE) {
@@ -268,7 +267,22 @@ var MAX_Z_INDEX = 2147483647;
268
267
  var SELECTED_APPROVAL_TAB_STATE = {
269
268
  APPROVAL: 'approval',
270
269
  PENDING: 'pending',
271
- };
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;
272
286
 
273
287
  /******************************************************************************
274
288
  Copyright (c) Microsoft Corporation.
@@ -430,7 +444,6 @@ exports.CHECKBOX_VALUE = void 0;
430
444
  (function (CHECKBOX_VALUE) {
431
445
  CHECKBOX_VALUE["CHECKED"] = "CHECKED";
432
446
  CHECKBOX_VALUE["INTERMEDIATE"] = "INTERMEDIATE";
433
- CHECKBOX_VALUE["BULK_CHECKED"] = "BULK_CHECKED";
434
447
  })(exports.CHECKBOX_VALUE || (exports.CHECKBOX_VALUE = {}));
435
448
  exports.ImageType = void 0;
436
449
  (function (ImageType) {
@@ -767,9 +780,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
767
780
  styleInject(css_248z$9);
768
781
 
769
782
  var _g$7;
770
- 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); }
783
+ 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); }
771
784
  var SvgIcProgressing = function SvgIcProgressing(props) {
772
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
785
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
773
786
  xmlns: "http://www.w3.org/2000/svg",
774
787
  viewBox: "0 0 24 24",
775
788
  width: "1em",
@@ -821,8 +834,8 @@ EmptyState.Loading = Loading;
821
834
 
822
835
  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}
823
836
 
824
- function _extends$q() {
825
- _extends$q = Object.assign || function (target) {
837
+ function _extends$p() {
838
+ _extends$p = Object.assign || function (target) {
826
839
  for (var i = 1; i < arguments.length; i++) {
827
840
  var source = arguments[i];
828
841
 
@@ -836,7 +849,7 @@ function _extends$q() {
836
849
  return target;
837
850
  };
838
851
 
839
- return _extends$q.apply(this, arguments);
852
+ return _extends$p.apply(this, arguments);
840
853
  }
841
854
 
842
855
  function _objectWithoutPropertiesLoose$2(source, excluded) {
@@ -1562,7 +1575,7 @@ function ProgressBar(_ref) {
1562
1575
  isIn = _ref.isIn,
1563
1576
  theme = _ref.theme;
1564
1577
 
1565
- var style = _extends$q({}, userStyle, {
1578
+ var style = _extends$p({}, userStyle, {
1566
1579
  animationDuration: delay + "ms",
1567
1580
  animationPlayState: isRunning ? 'running' : 'paused',
1568
1581
  opacity: hide ? 0 : 1
@@ -1839,9 +1852,9 @@ var ToastContainer = function ToastContainer(props) {
1839
1852
  ,
1840
1853
  id: containerId
1841
1854
  }, getToastToRender(function (position, toastList) {
1842
- var containerStyle = !toastList.length ? _extends$q({}, style, {
1855
+ var containerStyle = !toastList.length ? _extends$p({}, style, {
1843
1856
  pointerEvents: 'none'
1844
- }) : _extends$q({}, style);
1857
+ }) : _extends$p({}, style);
1845
1858
  return React.createElement("div", {
1846
1859
  className: getClassName(position),
1847
1860
  style: containerStyle,
@@ -1948,7 +1961,7 @@ function dispatchToast(content, options) {
1948
1961
 
1949
1962
 
1950
1963
  function mergeOptions(type, options) {
1951
- return _extends$q({}, options, {
1964
+ return _extends$p({}, options, {
1952
1965
  type: options && options.type || type,
1953
1966
  toastId: getToastId(options)
1954
1967
  });
@@ -1965,7 +1978,7 @@ function toast(content, options) {
1965
1978
  }
1966
1979
 
1967
1980
  toast.loading = function (content, options) {
1968
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$q({
1981
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$p({
1969
1982
  isLoading: true,
1970
1983
  autoClose: false,
1971
1984
  closeOnClick: false,
@@ -1981,7 +1994,7 @@ function handlePromise(promise, _ref2, options) {
1981
1994
  var id;
1982
1995
 
1983
1996
  if (pending) {
1984
- id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$q({}, options, pending));
1997
+ id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$p({}, options, pending));
1985
1998
  }
1986
1999
 
1987
2000
  var resetParams = {
@@ -2000,7 +2013,7 @@ function handlePromise(promise, _ref2, options) {
2000
2013
  return;
2001
2014
  }
2002
2015
 
2003
- var baseParams = _extends$q({
2016
+ var baseParams = _extends$p({
2004
2017
  type: type
2005
2018
  }, resetParams, options, {
2006
2019
  data: result
@@ -2011,10 +2024,10 @@ function handlePromise(promise, _ref2, options) {
2011
2024
  } : input; // if the id is set we know that it's an update
2012
2025
 
2013
2026
  if (id) {
2014
- toast.update(id, _extends$q({}, baseParams, params));
2027
+ toast.update(id, _extends$p({}, baseParams, params));
2015
2028
  } else {
2016
2029
  // using toast.promise without loading
2017
- toast(params.render, _extends$q({}, baseParams, params));
2030
+ toast(params.render, _extends$p({}, baseParams, params));
2018
2031
  }
2019
2032
 
2020
2033
  return result;
@@ -2038,7 +2051,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
2038
2051
  toast.warn = toast.warning;
2039
2052
 
2040
2053
  toast.dark = function (content, options) {
2041
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$q({
2054
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$p({
2042
2055
  theme: 'dark'
2043
2056
  }, options)));
2044
2057
  };
@@ -2095,7 +2108,7 @@ toast.update = function (toastId, options) {
2095
2108
  var oldOptions = toast.props,
2096
2109
  oldContent = toast.content;
2097
2110
 
2098
- var nextOptions = _extends$q({}, oldOptions, options, {
2111
+ var nextOptions = _extends$p({}, oldOptions, options, {
2099
2112
  toastId: options.toastId || toastId,
2100
2113
  updateId: generateToastId()
2101
2114
  });
@@ -12012,16 +12025,16 @@ var Modal = function (_a) {
12012
12025
  }, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
12013
12026
  };
12014
12027
 
12015
- var _path$g;
12016
- 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); }
12028
+ var _path$f;
12029
+ 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); }
12017
12030
  var SvgIcCross = function SvgIcCross(props) {
12018
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
12031
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
12019
12032
  width: "1em",
12020
12033
  height: "1em",
12021
12034
  viewBox: "0 0 24 24",
12022
12035
  fill: "none",
12023
12036
  xmlns: "http://www.w3.org/2000/svg"
12024
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
12037
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
12025
12038
  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",
12026
12039
  fill: "#596168"
12027
12040
  })));
@@ -16320,30 +16333,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
16320
16333
 
16321
16334
  var Tippy = index;
16322
16335
 
16323
- var _path$f;
16324
- 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); }
16336
+ var _path$e;
16337
+ 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); }
16325
16338
  var SvgIcHelp = function SvgIcHelp(props) {
16326
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
16339
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16327
16340
  xmlns: "http://www.w3.org/2000/svg",
16328
16341
  width: "1em",
16329
16342
  height: "1em",
16330
16343
  viewBox: "0 0 24 24"
16331
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
16344
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
16332
16345
  fill: "#767D84",
16333
16346
  fillRule: "evenodd",
16334
16347
  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"
16335
16348
  })));
16336
16349
  };
16337
16350
 
16338
- var _path$e;
16339
- 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); }
16351
+ var _path$d;
16352
+ 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); }
16340
16353
  var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
16341
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16354
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
16342
16355
  xmlns: "http://www.w3.org/2000/svg",
16343
16356
  viewBox: "0 0 17 16",
16344
16357
  width: "1em",
16345
16358
  height: "1em"
16346
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
16359
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
16347
16360
  fill: "#767D84",
16348
16361
  fillRule: "evenodd",
16349
16362
  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"
@@ -16395,16 +16408,16 @@ function TippyCustomized(props) {
16395
16408
  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 })));
16396
16409
  }
16397
16410
 
16398
- var _path$d, _circle, _path2$2;
16399
- 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); }
16411
+ var _path$c, _circle, _path2$1;
16412
+ 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); }
16400
16413
  var SvgInjectTag = function SvgInjectTag(props) {
16401
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
16414
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
16402
16415
  width: "1em",
16403
16416
  height: "1em",
16404
16417
  viewBox: "0 0 20 20",
16405
16418
  fill: "none",
16406
16419
  xmlns: "http://www.w3.org/2000/svg"
16407
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
16420
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
16408
16421
  d: "M10 10H3.333",
16409
16422
  stroke: "#596168",
16410
16423
  strokeWidth: 1.5,
@@ -16415,7 +16428,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
16415
16428
  cy: 10,
16416
16429
  r: 1.667,
16417
16430
  fill: "#596168"
16418
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
16431
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
16419
16432
  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",
16420
16433
  stroke: "#596168",
16421
16434
  strokeWidth: 1.5,
@@ -16432,15 +16445,15 @@ function PropagateTagInfo(_a) {
16432
16445
  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" })] })) })));
16433
16446
  }
16434
16447
 
16435
- var _path$c;
16436
- 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); }
16448
+ var _path$b;
16449
+ 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); }
16437
16450
  var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
16438
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
16451
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
16439
16452
  xmlns: "http://www.w3.org/2000/svg",
16440
16453
  width: "1em",
16441
16454
  height: "1em",
16442
16455
  viewBox: "0 0 20 20"
16443
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
16456
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
16444
16457
  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",
16445
16458
  fill: "#06C",
16446
16459
  fillRule: "evenodd"
@@ -16674,15 +16687,15 @@ var TagDetails = function (_a) {
16674
16687
  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" }) }))] })));
16675
16688
  };
16676
16689
 
16677
- var _path$b;
16678
- 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); }
16690
+ var _path$a;
16691
+ 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); }
16679
16692
  var SvgIcAdd = function SvgIcAdd(props) {
16680
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
16693
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
16681
16694
  xmlns: "http://www.w3.org/2000/svg",
16682
16695
  width: "1em",
16683
16696
  height: "1em",
16684
16697
  viewBox: "0 0 24 24"
16685
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
16698
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
16686
16699
  className: "ic-add_svg__fill-color",
16687
16700
  fill: "#999",
16688
16701
  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"
@@ -16812,8 +16825,8 @@ function ForceDeleteDialog(_a) {
16812
16825
  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?" })] }) })) }));
16813
16826
  }
16814
16827
 
16815
- function _extends$j() {
16816
- _extends$j = Object.assign ? Object.assign.bind() : function (target) {
16828
+ function _extends$i() {
16829
+ _extends$i = Object.assign ? Object.assign.bind() : function (target) {
16817
16830
  for (var i = 1; i < arguments.length; i++) {
16818
16831
  var source = arguments[i];
16819
16832
  for (var key in source) {
@@ -16824,7 +16837,7 @@ function _extends$j() {
16824
16837
  }
16825
16838
  return target;
16826
16839
  };
16827
- return _extends$j.apply(this, arguments);
16840
+ return _extends$i.apply(this, arguments);
16828
16841
  }
16829
16842
 
16830
16843
  /*
@@ -20365,7 +20378,7 @@ var Menu = function Menu(props) {
20365
20378
  getStyles = props.getStyles,
20366
20379
  innerRef = props.innerRef,
20367
20380
  innerProps = props.innerProps;
20368
- return jsx("div", _extends$j({
20381
+ return jsx("div", _extends$i({
20369
20382
  css: getStyles('menu', props),
20370
20383
  className: cx({
20371
20384
  menu: true
@@ -20397,7 +20410,7 @@ var MenuList$1 = function MenuList(props) {
20397
20410
  innerProps = props.innerProps,
20398
20411
  innerRef = props.innerRef,
20399
20412
  isMulti = props.isMulti;
20400
- return jsx("div", _extends$j({
20413
+ return jsx("div", _extends$i({
20401
20414
  css: getStyles('menuList', props),
20402
20415
  className: cx({
20403
20416
  'menu-list': true,
@@ -20428,7 +20441,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
20428
20441
  cx = props.cx,
20429
20442
  getStyles = props.getStyles,
20430
20443
  innerProps = props.innerProps;
20431
- return jsx("div", _extends$j({
20444
+ return jsx("div", _extends$i({
20432
20445
  css: getStyles('noOptionsMessage', props),
20433
20446
  className: cx({
20434
20447
  'menu-notice': true,
@@ -20445,7 +20458,7 @@ var LoadingMessage = function LoadingMessage(props) {
20445
20458
  cx = props.cx,
20446
20459
  getStyles = props.getStyles,
20447
20460
  innerProps = props.innerProps;
20448
- return jsx("div", _extends$j({
20461
+ return jsx("div", _extends$i({
20449
20462
  css: getStyles('loadingMessage', props),
20450
20463
  className: cx({
20451
20464
  'menu-notice': true,
@@ -20533,7 +20546,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
20533
20546
  rect: rect
20534
20547
  }; // same wrapper element whether fixed or portalled
20535
20548
 
20536
- var menuWrapper = jsx("div", _extends$j({
20549
+ var menuWrapper = jsx("div", _extends$i({
20537
20550
  css: getStyles('menuPortal', state),
20538
20551
  className: cx({
20539
20552
  'menu-portal': true
@@ -20569,7 +20582,7 @@ var SelectContainer = function SelectContainer(props) {
20569
20582
  innerProps = props.innerProps,
20570
20583
  isDisabled = props.isDisabled,
20571
20584
  isRtl = props.isRtl;
20572
- return jsx("div", _extends$j({
20585
+ return jsx("div", _extends$i({
20573
20586
  css: getStyles('container', props),
20574
20587
  className: cx({
20575
20588
  '--is-disabled': isDisabled,
@@ -20604,7 +20617,7 @@ var ValueContainer = function ValueContainer(props) {
20604
20617
  isMulti = props.isMulti,
20605
20618
  getStyles = props.getStyles,
20606
20619
  hasValue = props.hasValue;
20607
- return jsx("div", _extends$j({
20620
+ return jsx("div", _extends$i({
20608
20621
  css: getStyles('valueContainer', props),
20609
20622
  className: cx({
20610
20623
  'value-container': true,
@@ -20630,7 +20643,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
20630
20643
  cx = props.cx,
20631
20644
  innerProps = props.innerProps,
20632
20645
  getStyles = props.getStyles;
20633
- return jsx("div", _extends$j({
20646
+ return jsx("div", _extends$i({
20634
20647
  css: getStyles('indicatorsContainer', props),
20635
20648
  className: cx({
20636
20649
  indicators: true
@@ -20661,7 +20674,7 @@ var Svg = function Svg(_ref) {
20661
20674
  var size = _ref.size,
20662
20675
  props = _objectWithoutProperties(_ref, _excluded$2);
20663
20676
 
20664
- return jsx("svg", _extends$j({
20677
+ return jsx("svg", _extends$i({
20665
20678
  height: size,
20666
20679
  width: size,
20667
20680
  viewBox: "0 0 20 20",
@@ -20672,14 +20685,14 @@ var Svg = function Svg(_ref) {
20672
20685
  };
20673
20686
 
20674
20687
  var CrossIcon = function CrossIcon(props) {
20675
- return jsx(Svg, _extends$j({
20688
+ return jsx(Svg, _extends$i({
20676
20689
  size: 20
20677
20690
  }, props), jsx("path", {
20678
20691
  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"
20679
20692
  }));
20680
20693
  };
20681
20694
  var DownChevron = function DownChevron(props) {
20682
- return jsx(Svg, _extends$j({
20695
+ return jsx(Svg, _extends$i({
20683
20696
  size: 20
20684
20697
  }, props), jsx("path", {
20685
20698
  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"
@@ -20712,7 +20725,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
20712
20725
  cx = props.cx,
20713
20726
  getStyles = props.getStyles,
20714
20727
  innerProps = props.innerProps;
20715
- return jsx("div", _extends$j({
20728
+ return jsx("div", _extends$i({
20716
20729
  css: getStyles('dropdownIndicator', props),
20717
20730
  className: cx({
20718
20731
  indicator: true,
@@ -20727,7 +20740,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
20727
20740
  cx = props.cx,
20728
20741
  getStyles = props.getStyles,
20729
20742
  innerProps = props.innerProps;
20730
- return jsx("div", _extends$j({
20743
+ return jsx("div", _extends$i({
20731
20744
  css: getStyles('clearIndicator', props),
20732
20745
  className: cx({
20733
20746
  indicator: true,
@@ -20757,7 +20770,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
20757
20770
  cx = props.cx,
20758
20771
  getStyles = props.getStyles,
20759
20772
  innerProps = props.innerProps;
20760
- return jsx("span", _extends$j({}, innerProps, {
20773
+ return jsx("span", _extends$i({}, innerProps, {
20761
20774
  css: getStyles('indicatorSeparator', props),
20762
20775
  className: cx({
20763
20776
  'indicator-separator': true
@@ -20812,7 +20825,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
20812
20825
  getStyles = props.getStyles,
20813
20826
  innerProps = props.innerProps,
20814
20827
  isRtl = props.isRtl;
20815
- return jsx("div", _extends$j({
20828
+ return jsx("div", _extends$i({
20816
20829
  css: getStyles('loadingIndicator', props),
20817
20830
  className: cx({
20818
20831
  indicator: true,
@@ -20873,7 +20886,7 @@ var Control = function Control(props) {
20873
20886
  innerRef = props.innerRef,
20874
20887
  innerProps = props.innerProps,
20875
20888
  menuIsOpen = props.menuIsOpen;
20876
- return jsx("div", _extends$j({
20889
+ return jsx("div", _extends$i({
20877
20890
  ref: innerRef,
20878
20891
  css: getStyles('control', props),
20879
20892
  className: cx({
@@ -20905,12 +20918,12 @@ var Group = function Group(props) {
20905
20918
  label = props.label,
20906
20919
  theme = props.theme,
20907
20920
  selectProps = props.selectProps;
20908
- return jsx("div", _extends$j({
20921
+ return jsx("div", _extends$i({
20909
20922
  css: getStyles('group', props),
20910
20923
  className: cx({
20911
20924
  group: true
20912
20925
  }, className)
20913
- }, innerProps), jsx(Heading, _extends$j({}, headingProps, {
20926
+ }, innerProps), jsx(Heading, _extends$i({}, headingProps, {
20914
20927
  selectProps: selectProps,
20915
20928
  theme: theme,
20916
20929
  getStyles: getStyles,
@@ -20942,7 +20955,7 @@ var GroupHeading = function GroupHeading(props) {
20942
20955
  _cleanCommonProps.data;
20943
20956
  var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
20944
20957
 
20945
- return jsx("div", _extends$j({
20958
+ return jsx("div", _extends$i({
20946
20959
  css: getStyles('groupHeading', props),
20947
20960
  className: cx({
20948
20961
  'group-heading': true
@@ -21018,7 +21031,7 @@ var Input = function Input(props) {
21018
21031
  }, className),
21019
21032
  css: getStyles('input', props),
21020
21033
  "data-value": value || ''
21021
- }, jsx("input", _extends$j({
21034
+ }, jsx("input", _extends$i({
21022
21035
  className: cx({
21023
21036
  input: true
21024
21037
  }, inputClassName),
@@ -21088,7 +21101,7 @@ var MultiValueLabel = MultiValueGeneric;
21088
21101
  function MultiValueRemove$1(_ref5) {
21089
21102
  var children = _ref5.children,
21090
21103
  innerProps = _ref5.innerProps;
21091
- return jsx("div", _extends$j({
21104
+ return jsx("div", _extends$i({
21092
21105
  role: "button"
21093
21106
  }, innerProps), children || jsx(CrossIcon, {
21094
21107
  size: 14
@@ -21177,7 +21190,7 @@ var Option$1 = function Option(props) {
21177
21190
  isSelected = props.isSelected,
21178
21191
  innerRef = props.innerRef,
21179
21192
  innerProps = props.innerProps;
21180
- return jsx("div", _extends$j({
21193
+ return jsx("div", _extends$i({
21181
21194
  css: getStyles('option', props),
21182
21195
  className: cx({
21183
21196
  option: true,
@@ -21209,7 +21222,7 @@ var Placeholder = function Placeholder(props) {
21209
21222
  cx = props.cx,
21210
21223
  getStyles = props.getStyles,
21211
21224
  innerProps = props.innerProps;
21212
- return jsx("div", _extends$j({
21225
+ return jsx("div", _extends$i({
21213
21226
  css: getStyles('placeholder', props),
21214
21227
  className: cx({
21215
21228
  placeholder: true
@@ -21242,7 +21255,7 @@ var SingleValue = function SingleValue(props) {
21242
21255
  getStyles = props.getStyles,
21243
21256
  isDisabled = props.isDisabled,
21244
21257
  innerProps = props.innerProps;
21245
- return jsx("div", _extends$j({
21258
+ return jsx("div", _extends$i({
21246
21259
  css: getStyles('singleValue', props),
21247
21260
  className: cx({
21248
21261
  'single-value': true,
@@ -21490,7 +21503,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
21490
21503
  };
21491
21504
 
21492
21505
  var A11yText = function A11yText(props) {
21493
- return jsx("span", _extends$j({
21506
+ return jsx("span", _extends$i({
21494
21507
  css: _ref
21495
21508
  }, props));
21496
21509
  };
@@ -22026,7 +22039,7 @@ function DummyInput(_ref) {
22026
22039
  var innerRef = _ref.innerRef,
22027
22040
  props = _objectWithoutProperties(_ref, _excluded);
22028
22041
 
22029
- return jsx("input", _extends$j({
22042
+ return jsx("input", _extends$i({
22030
22043
  ref: innerRef
22031
22044
  }, props, {
22032
22045
  css: /*#__PURE__*/css$2({
@@ -23661,7 +23674,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23661
23674
 
23662
23675
  if (!isSearchable) {
23663
23676
  // use a dummy input to maintain focus/blur functionality
23664
- return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$j({
23677
+ return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$i({
23665
23678
  id: id,
23666
23679
  innerRef: this.getInputRef,
23667
23680
  onBlur: this.onInputBlur,
@@ -23675,7 +23688,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23675
23688
  }, ariaAttributes));
23676
23689
  }
23677
23690
 
23678
- return /*#__PURE__*/React__namespace.createElement(Input, _extends$j({}, commonProps, {
23691
+ return /*#__PURE__*/React__namespace.createElement(Input, _extends$i({}, commonProps, {
23679
23692
  autoCapitalize: "none",
23680
23693
  autoComplete: "off",
23681
23694
  autoCorrect: "off",
@@ -23719,7 +23732,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23719
23732
  isFocused = _this$state5.isFocused;
23720
23733
 
23721
23734
  if (!this.hasValue() || !controlShouldRenderValue) {
23722
- return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$j({}, commonProps, {
23735
+ return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$i({}, commonProps, {
23723
23736
  key: "placeholder",
23724
23737
  isDisabled: isDisabled,
23725
23738
  isFocused: isFocused,
@@ -23733,7 +23746,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23733
23746
  return selectValue.map(function (opt, index) {
23734
23747
  var isOptionFocused = opt === focusedValue;
23735
23748
  var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
23736
- return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$j({}, commonProps, {
23749
+ return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$i({}, commonProps, {
23737
23750
  components: {
23738
23751
  Container: MultiValueContainer,
23739
23752
  Label: MultiValueLabel,
@@ -23765,7 +23778,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23765
23778
  }
23766
23779
 
23767
23780
  var singleValue = selectValue[0];
23768
- return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$j({}, commonProps, {
23781
+ return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$i({}, commonProps, {
23769
23782
  data: singleValue,
23770
23783
  isDisabled: isDisabled
23771
23784
  }), this.formatOptionLabel(singleValue, 'value'));
@@ -23791,7 +23804,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23791
23804
  onTouchEnd: this.onClearIndicatorTouchEnd,
23792
23805
  'aria-hidden': 'true'
23793
23806
  };
23794
- return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$j({}, commonProps, {
23807
+ return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$i({}, commonProps, {
23795
23808
  innerProps: innerProps,
23796
23809
  isFocused: isFocused
23797
23810
  }));
@@ -23811,7 +23824,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23811
23824
  var innerProps = {
23812
23825
  'aria-hidden': 'true'
23813
23826
  };
23814
- return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$j({}, commonProps, {
23827
+ return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$i({}, commonProps, {
23815
23828
  innerProps: innerProps,
23816
23829
  isDisabled: isDisabled,
23817
23830
  isFocused: isFocused
@@ -23829,7 +23842,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23829
23842
  var commonProps = this.commonProps;
23830
23843
  var isDisabled = this.props.isDisabled;
23831
23844
  var isFocused = this.state.isFocused;
23832
- return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$j({}, commonProps, {
23845
+ return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$i({}, commonProps, {
23833
23846
  isDisabled: isDisabled,
23834
23847
  isFocused: isFocused
23835
23848
  }));
@@ -23849,7 +23862,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23849
23862
  onTouchEnd: this.onDropdownIndicatorTouchEnd,
23850
23863
  'aria-hidden': 'true'
23851
23864
  };
23852
- return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$j({}, commonProps, {
23865
+ return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$i({}, commonProps, {
23853
23866
  innerProps: innerProps,
23854
23867
  isDisabled: isDisabled,
23855
23868
  isFocused: isFocused
@@ -23912,7 +23925,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23912
23925
  onMouseOver: onHover,
23913
23926
  tabIndex: -1
23914
23927
  };
23915
- return /*#__PURE__*/React__namespace.createElement(Option, _extends$j({}, commonProps, {
23928
+ return /*#__PURE__*/React__namespace.createElement(Option, _extends$i({}, commonProps, {
23916
23929
  innerProps: innerProps,
23917
23930
  data: data,
23918
23931
  isDisabled: isDisabled,
@@ -23936,7 +23949,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23936
23949
  groupIndex = item.index;
23937
23950
  var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
23938
23951
  var headingId = "".concat(groupId, "-heading");
23939
- return /*#__PURE__*/React__namespace.createElement(Group, _extends$j({}, commonProps, {
23952
+ return /*#__PURE__*/React__namespace.createElement(Group, _extends$i({}, commonProps, {
23940
23953
  key: groupId,
23941
23954
  data: _data,
23942
23955
  options: options,
@@ -23975,12 +23988,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23975
23988
  menuPosition: menuPosition,
23976
23989
  menuShouldScrollIntoView: menuShouldScrollIntoView
23977
23990
  };
23978
- var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$j({}, commonProps, menuPlacementProps), function (_ref4) {
23991
+ var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$i({}, commonProps, menuPlacementProps), function (_ref4) {
23979
23992
  var ref = _ref4.ref,
23980
23993
  _ref4$placerProps = _ref4.placerProps,
23981
23994
  placement = _ref4$placerProps.placement,
23982
23995
  maxHeight = _ref4$placerProps.maxHeight;
23983
- return /*#__PURE__*/React__namespace.createElement(Menu, _extends$j({}, commonProps, menuPlacementProps, {
23996
+ return /*#__PURE__*/React__namespace.createElement(Menu, _extends$i({}, commonProps, menuPlacementProps, {
23984
23997
  innerRef: ref,
23985
23998
  innerProps: {
23986
23999
  onMouseDown: _this4.onMenuMouseDown,
@@ -23995,7 +24008,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23995
24008
  onBottomArrive: onMenuScrollToBottom,
23996
24009
  lockEnabled: menuShouldBlockScroll
23997
24010
  }, function (scrollTargetRef) {
23998
- return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$j({}, commonProps, {
24011
+ return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$i({}, commonProps, {
23999
24012
  innerRef: function innerRef(instance) {
24000
24013
  _this4.getMenuListRef(instance);
24001
24014
 
@@ -24010,7 +24023,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24010
24023
  // so we use the same component. the actual portalling logic is forked
24011
24024
  // within the component based on `menuPosition`
24012
24025
 
24013
- return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$j({}, commonProps, {
24026
+ return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$i({}, commonProps, {
24014
24027
  appendTo: menuPortalTarget,
24015
24028
  controlElement: this.controlRef,
24016
24029
  menuPlacement: menuPlacement,
@@ -24075,7 +24088,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24075
24088
  isFocused = _this$state6.isFocused,
24076
24089
  selectValue = _this$state6.selectValue;
24077
24090
  var focusableOptions = this.getFocusableOptions();
24078
- return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$j({}, commonProps, {
24091
+ return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$i({}, commonProps, {
24079
24092
  id: this.getElementId('live-region'),
24080
24093
  ariaSelection: ariaSelection,
24081
24094
  focusedOption: focusedOption,
@@ -24101,7 +24114,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24101
24114
  menuIsOpen = _this$props14.menuIsOpen;
24102
24115
  var isFocused = this.state.isFocused;
24103
24116
  var commonProps = this.commonProps = this.getCommonProps();
24104
- return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$j({}, commonProps, {
24117
+ return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$i({}, commonProps, {
24105
24118
  className: className,
24106
24119
  innerProps: {
24107
24120
  id: id,
@@ -24109,7 +24122,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24109
24122
  },
24110
24123
  isDisabled: isDisabled,
24111
24124
  isFocused: isFocused
24112
- }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$j({}, commonProps, {
24125
+ }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$i({}, commonProps, {
24113
24126
  innerRef: this.getControlRef,
24114
24127
  innerProps: {
24115
24128
  onMouseDown: this.onControlMouseDown,
@@ -24118,9 +24131,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24118
24131
  isDisabled: isDisabled,
24119
24132
  isFocused: isFocused,
24120
24133
  menuIsOpen: menuIsOpen
24121
- }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$j({}, commonProps, {
24134
+ }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$i({}, commonProps, {
24122
24135
  isDisabled: isDisabled
24123
- }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$j({}, commonProps, {
24136
+ }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$i({}, commonProps, {
24124
24137
  isDisabled: isDisabled
24125
24138
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
24126
24139
  }
@@ -24193,7 +24206,7 @@ Select$1.defaultProps = defaultProps;
24193
24206
 
24194
24207
  var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24195
24208
  var baseSelectProps = useStateManager(props);
24196
- return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$j({
24209
+ return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$i({
24197
24210
  ref: ref
24198
24211
  }, baseSelectProps));
24199
24212
  });
@@ -24201,9 +24214,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24201
24214
  var ReactSelect = StateManagedSelect;
24202
24215
 
24203
24216
  var _g$6;
24204
- 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); }
24217
+ 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); }
24205
24218
  var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24206
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24219
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24207
24220
  xmlns: "http://www.w3.org/2000/svg",
24208
24221
  viewBox: "0 0 28 28",
24209
24222
  width: "1em",
@@ -24224,15 +24237,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24224
24237
  }))));
24225
24238
  };
24226
24239
 
24227
- var _path$a;
24228
- 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); }
24240
+ var _path$9;
24241
+ 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); }
24229
24242
  var SvgIcCheck = function SvgIcCheck(props) {
24230
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24243
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24231
24244
  xmlns: "http://www.w3.org/2000/svg",
24232
24245
  width: "1em",
24233
24246
  height: "1em",
24234
24247
  viewBox: "0 0 24 24"
24235
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
24248
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
24236
24249
  stroke: "#06C",
24237
24250
  strokeLinecap: "round",
24238
24251
  strokeLinejoin: "round",
@@ -24244,9 +24257,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
24244
24257
  };
24245
24258
 
24246
24259
  var _g$5;
24247
- 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); }
24260
+ 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); }
24248
24261
  var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
24249
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24262
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
24250
24263
  xmlns: "http://www.w3.org/2000/svg",
24251
24264
  width: "1em",
24252
24265
  height: "1em",
@@ -24575,7 +24588,6 @@ Valid States of Checkbox:
24575
24588
  5. disabled: false, checked: true, value: INTERMIDIATE
24576
24589
  6. disabled: false, checked: true, value: CHECKED
24577
24590
  */
24578
- // TODO: Associate label with input element
24579
24591
  var Checkbox$1 = /** @class */ (function (_super) {
24580
24592
  __extends$1(Checkbox, _super);
24581
24593
  function Checkbox() {
@@ -24590,9 +24602,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
24590
24602
  }(React.Component));
24591
24603
 
24592
24604
  var _g$4;
24593
- 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); }
24605
+ 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); }
24594
24606
  var SvgIcSearch = function SvgIcSearch(props) {
24595
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
24607
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
24596
24608
  xmlns: "http://www.w3.org/2000/svg",
24597
24609
  viewBox: "0 0 24 24",
24598
24610
  width: "1em",
@@ -24609,9 +24621,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
24609
24621
  };
24610
24622
 
24611
24623
  var _g$3;
24612
- 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); }
24624
+ 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); }
24613
24625
  var SvgIcErrorCross = function SvgIcErrorCross(props) {
24614
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
24626
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
24615
24627
  xmlns: "http://www.w3.org/2000/svg",
24616
24628
  width: "1em",
24617
24629
  height: "1em",
@@ -24633,7 +24645,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
24633
24645
  }))));
24634
24646
  };
24635
24647
 
24636
- 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}";
24648
+ 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}";
24637
24649
  styleInject(css_248z$5);
24638
24650
 
24639
24651
  /**
@@ -24678,26 +24690,9 @@ var SearchBar = function (_a) {
24678
24690
  handleSearchChange,
24679
24691
  debounceTimeout,
24680
24692
  ]);
24681
- // In most case would reset the state by doing history.push('/')
24682
- React.useEffect(function () {
24683
- inputRef.current.value = initialSearchText;
24684
- }, [initialSearchText]);
24685
- var _applySearch = function (value) {
24686
- handleSearchChange(value);
24687
- handleEnter(value);
24688
- };
24689
- var clearSearch = function () {
24690
- inputRef.current.value = '';
24691
- _applySearch('');
24692
- setShowClearButton(false);
24693
- };
24694
24693
  var handleChange = function (e) {
24695
24694
  var value = e.target.value;
24696
24695
  setShowClearButton(!!value);
24697
- if (!value) {
24698
- clearSearch();
24699
- return;
24700
- }
24701
24696
  if (shouldDebounce) {
24702
24697
  debouncedSearchChange(value);
24703
24698
  }
@@ -24705,6 +24700,10 @@ var SearchBar = function (_a) {
24705
24700
  handleSearchChange(value);
24706
24701
  }
24707
24702
  };
24703
+ var _applySearch = function (value) {
24704
+ handleSearchChange(value);
24705
+ handleEnter(value);
24706
+ };
24708
24707
  var handleKeyDown = function (e) {
24709
24708
  var key = e.key;
24710
24709
  if (key === 'Enter') {
@@ -24713,7 +24712,66 @@ var SearchBar = function (_a) {
24713
24712
  _applySearch(value);
24714
24713
  }
24715
24714
  };
24716
- 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-18" }), 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-18 icon-n4 dc__vertical-align-middle" }) })))] })) })));
24715
+ var clearSearch = function () {
24716
+ inputRef.current.value = '';
24717
+ _applySearch('');
24718
+ };
24719
+ return (jsxRuntime.jsx("div", __assign({ className: containerClassName }, { children: jsxRuntime.jsxs("div", __assign({ className: "search-bar bcn-0 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-18" }), jsxRuntime.jsx("input", __assign({ placeholder: "Search", "data-testid": "search-bar", type: "text" }, inputProps, { defaultValue: initialSearchText, className: "search-bar__input bcn-0 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-18 icon-n4 dc__vertical-align-middle" }) })))] })) })));
24720
+ };
24721
+
24722
+ var _path$8;
24723
+ 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); }
24724
+ var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
24725
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
24726
+ xmlns: "http://www.w3.org/2000/svg",
24727
+ width: "1em",
24728
+ height: "1em",
24729
+ viewBox: "0 0 12 12",
24730
+ fill: "none"
24731
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
24732
+ d: "M4.125 8.5 6 10.75 7.875 8.5m-3.75-5L6 1.25 7.875 3.5",
24733
+ stroke: "#3B444C",
24734
+ strokeWidth: 1.5,
24735
+ strokeLinecap: "round",
24736
+ strokeLinejoin: "round"
24737
+ })));
24738
+ };
24739
+
24740
+ var _path$7;
24741
+ 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); }
24742
+ var SvgIcSortArrowDown = function SvgIcSortArrowDown(props) {
24743
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
24744
+ width: "1em",
24745
+ height: "1em",
24746
+ viewBox: "0 0 12 12",
24747
+ fill: "none",
24748
+ xmlns: "http://www.w3.org/2000/svg"
24749
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
24750
+ d: "M3.5 7.5 6 10m0 0 2.5-2.5M6 10V2",
24751
+ stroke: "#596168",
24752
+ strokeWidth: 1.5,
24753
+ strokeLinecap: "round",
24754
+ strokeLinejoin: "round"
24755
+ })));
24756
+ };
24757
+
24758
+ /**
24759
+ * Reusable component for the table header cell with support for sorting icons
24760
+ *
24761
+ * @example Usage
24762
+ * ```tsx
24763
+ * <SortableTableHeaderCell
24764
+ * isSorted={currentSortedCell === 'cell'}
24765
+ * triggerSorting={() => {}}
24766
+ * sortOrder={SortingOrder.ASC}
24767
+ * title="Header Cell"
24768
+ * disabled={isDisabled}
24769
+ * />
24770
+ * ```
24771
+ */
24772
+ var SortableTableHeaderCell = function (_a) {
24773
+ var isSorted = _a.isSorted, triggerSorting = _a.triggerSorting, sortOrder = _a.sortOrder, title = _a.title, disabled = _a.disabled;
24774
+ 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" }))] })));
24717
24775
  };
24718
24776
 
24719
24777
  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}";
@@ -24852,9 +24910,9 @@ exports.ConsequenceAction = void 0;
24852
24910
  })(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
24853
24911
 
24854
24912
  var _g$2;
24855
- 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); }
24913
+ 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); }
24856
24914
  var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
24857
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
24915
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
24858
24916
  xmlns: "http://www.w3.org/2000/svg",
24859
24917
  width: "1em",
24860
24918
  height: "1em",
@@ -24933,16 +24991,16 @@ function DeleteComponent(_a) {
24933
24991
  return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
24934
24992
  }
24935
24993
 
24936
- var _path$9;
24937
- 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); }
24994
+ var _path$6;
24995
+ 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); }
24938
24996
  var SvgIcPencil = function SvgIcPencil(props) {
24939
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
24997
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
24940
24998
  width: "1em",
24941
24999
  height: "1em",
24942
25000
  viewBox: "0 0 20 20",
24943
25001
  fill: "none",
24944
25002
  xmlns: "http://www.w3.org/2000/svg"
24945
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
25003
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
24946
25004
  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",
24947
25005
  stroke: "#596168",
24948
25006
  strokeWidth: 1.5,
@@ -24951,19 +25009,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
24951
25009
  })));
24952
25010
  };
24953
25011
 
24954
- var _path$8, _path2$1, _path3;
24955
- 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); }
25012
+ var _path$5, _path2, _path3;
25013
+ 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); }
24956
25014
  var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
24957
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
25015
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
24958
25016
  width: "1em",
24959
25017
  height: "1em",
24960
25018
  viewBox: "0 0 12 12",
24961
25019
  fill: "none",
24962
25020
  xmlns: "http://www.w3.org/2000/svg"
24963
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
25021
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
24964
25022
  d: "M3.742 4.674h-2.25v-2.25",
24965
25023
  fill: "#767D84"
24966
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
25024
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
24967
25025
  d: "M3.742 4.674h-2.25v-2.25",
24968
25026
  stroke: "#596168",
24969
25027
  strokeWidth: 1.5,
@@ -24978,15 +25036,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
24978
25036
  })));
24979
25037
  };
24980
25038
 
24981
- var _path$7;
24982
- 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); }
25039
+ var _path$4;
25040
+ 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); }
24983
25041
  var SvgIcMinus = function SvgIcMinus(props) {
24984
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
25042
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
24985
25043
  xmlns: "http://www.w3.org/2000/svg",
24986
25044
  width: "1em",
24987
25045
  height: "1em",
24988
25046
  viewBox: "0 0 14 14"
24989
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
25047
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
24990
25048
  fill: "#959BA1",
24991
25049
  className: "ic-minus_svg__fill-color",
24992
25050
  fillRule: "evenodd",
@@ -24995,9 +25053,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
24995
25053
  };
24996
25054
 
24997
25055
  var _g$1;
24998
- 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); }
25056
+ 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); }
24999
25057
  var SvgIcWarning = function SvgIcWarning(props) {
25000
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25058
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
25001
25059
  xmlns: "http://www.w3.org/2000/svg",
25002
25060
  width: "1em",
25003
25061
  height: "1em",
@@ -25017,9 +25075,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
25017
25075
  };
25018
25076
 
25019
25077
  var _g;
25020
- 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); }
25078
+ 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); }
25021
25079
  var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25022
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
25080
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
25023
25081
  xmlns: "http://www.w3.org/2000/svg",
25024
25082
  width: "1em",
25025
25083
  height: "1em",
@@ -25036,16 +25094,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25036
25094
  }))));
25037
25095
  };
25038
25096
 
25039
- var _path$6;
25040
- 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); }
25097
+ var _path$3;
25098
+ 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); }
25041
25099
  var SvgIcEnter = function SvgIcEnter(props) {
25042
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
25100
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
25043
25101
  width: "1em",
25044
25102
  height: "1em",
25045
25103
  viewBox: "0 0 16 16",
25046
25104
  fill: "none",
25047
25105
  xmlns: "http://www.w3.org/2000/svg"
25048
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
25106
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
25049
25107
  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",
25050
25108
  fill: "#3B444C"
25051
25109
  })));
@@ -25451,15 +25509,15 @@ function Grid(_a) {
25451
25509
  return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
25452
25510
  }
25453
25511
 
25454
- var _path$5;
25455
- 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); }
25512
+ var _path$2;
25513
+ 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); }
25456
25514
  var SvgIcCopy = function SvgIcCopy(props) {
25457
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
25515
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
25458
25516
  xmlns: "http://www.w3.org/2000/svg",
25459
25517
  width: "1em",
25460
25518
  height: "1em",
25461
25519
  viewBox: "0 0 20 20"
25462
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
25520
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
25463
25521
  fill: "#767D84",
25464
25522
  fillRule: "evenodd",
25465
25523
  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"
@@ -25556,6 +25614,115 @@ var useWindowSize = function () {
25556
25614
  return windowSize;
25557
25615
  };
25558
25616
 
25617
+ var DEFAULT_PAGE_NUMBER = 1;
25618
+ var URL_FILTER_KEYS = {
25619
+ PAGE_SIZE: 'pageSize',
25620
+ PAGE_NUMBER: 'pageNumber',
25621
+ SEARCH_KEY: 'searchKey',
25622
+ SORT_BY: 'sortBy',
25623
+ SORT_ORDER: 'sortOrder',
25624
+ };
25625
+
25626
+ 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;
25627
+ /**
25628
+ * Generic hook for implementing URL based filters.
25629
+ * eg: pagination, search, sort.
25630
+ *
25631
+ * The exposed handlers can be consumed directly without the need for explicit state management
25632
+ *
25633
+ * @example Default Usage:
25634
+ * ```tsx
25635
+ * const { pageSize, changePage, ...rest } = useUrlFilters()
25636
+ * ```
25637
+ *
25638
+ * @example Usage with custom type for sort keys and initial sort key:
25639
+ * ```tsx
25640
+ * const { sortBy, sortOrder } = useUrlFilters<'email' | 'name'>({ initialSortKey: 'email' })
25641
+ * ```
25642
+ *
25643
+ */
25644
+ var useUrlFilters = function (_a) {
25645
+ var _b = _a === void 0 ? {} : _a, initialSortKey = _b.initialSortKey;
25646
+ var location = reactRouterDom.useLocation();
25647
+ var history = reactRouterDom.useHistory();
25648
+ var searchParams = new URLSearchParams(location.search);
25649
+ var _c = React.useMemo(function () {
25650
+ var _pageSize = searchParams.get(PAGE_SIZE);
25651
+ var _pageNumber = searchParams.get(PAGE_NUMBER);
25652
+ var _searchKey = searchParams.get(SEARCH_KEY);
25653
+ var _sortOrder = searchParams.get(SORT_ORDER);
25654
+ var _sortBy = searchParams.get(SORT_BY);
25655
+ var sortByKey = (_sortBy || initialSortKey || '');
25656
+ // Fallback to ascending order
25657
+ var sortByOrder = Object.values(exports.SortingOrder).includes(_sortOrder) ? _sortOrder : exports.SortingOrder.ASC;
25658
+ return {
25659
+ pageSize: Number(_pageSize) || DEFAULT_BASE_PAGE_SIZE,
25660
+ pageNumber: Number(_pageNumber) || DEFAULT_PAGE_NUMBER,
25661
+ searchKey: _searchKey || '',
25662
+ sortBy: sortByKey,
25663
+ // sort order should only be applied if the key is available
25664
+ sortOrder: (sortByKey ? sortByOrder : ''),
25665
+ };
25666
+ }, [searchParams]), pageSize = _c.pageSize, pageNumber = _c.pageNumber, searchKey = _c.searchKey, sortBy = _c.sortBy, sortOrder = _c.sortOrder;
25667
+ /**
25668
+ * Used for getting the required result from the API
25669
+ */
25670
+ var offset = pageSize * (pageNumber - 1);
25671
+ /**
25672
+ * Update and replace the search params in the URL.
25673
+ *
25674
+ * Note: Currently only primitive data types are supported
25675
+ */
25676
+ var _updateSearchParam = function (key, value) {
25677
+ searchParams.set(key, String(value));
25678
+ history.replace({ search: searchParams.toString() });
25679
+ };
25680
+ var _resetPageNumber = function () {
25681
+ _updateSearchParam(PAGE_NUMBER, DEFAULT_PAGE_NUMBER);
25682
+ };
25683
+ var changePage = function (page) {
25684
+ _updateSearchParam(PAGE_NUMBER, page);
25685
+ };
25686
+ var changePageSize = function (_pageSize) {
25687
+ _updateSearchParam(PAGE_SIZE, _pageSize);
25688
+ _resetPageNumber();
25689
+ };
25690
+ var handleSearch = function (searchTerm) {
25691
+ _updateSearchParam(SEARCH_KEY, searchTerm);
25692
+ };
25693
+ var handleSorting = function (_sortBy) {
25694
+ var order;
25695
+ if (_sortBy === sortBy && sortOrder === exports.SortingOrder.ASC) {
25696
+ order = exports.SortingOrder.DESC;
25697
+ }
25698
+ else {
25699
+ order = exports.SortingOrder.ASC;
25700
+ }
25701
+ _updateSearchParam(SORT_BY, _sortBy);
25702
+ _updateSearchParam(SORT_ORDER, order);
25703
+ // Reset page number on sorting change
25704
+ _resetPageNumber();
25705
+ };
25706
+ var clearFilters = function () {
25707
+ Object.values(URL_FILTER_KEYS).forEach(function (key) {
25708
+ searchParams.delete(key);
25709
+ });
25710
+ history.replace({ search: searchParams.toString() });
25711
+ };
25712
+ return {
25713
+ pageSize: pageSize,
25714
+ changePage: changePage,
25715
+ changePageSize: changePageSize,
25716
+ searchKey: searchKey,
25717
+ handleSearch: handleSearch,
25718
+ offset: offset,
25719
+ sortBy: sortBy,
25720
+ sortOrder: sortOrder,
25721
+ handleSorting: handleSorting,
25722
+ clearFilters: clearFilters,
25723
+ };
25724
+ };
25725
+
25559
25726
  var StatusConstants = {
25560
25727
  NOT_DEPLOYED: {
25561
25728
  noSpaceLower: 'notdeployed',
@@ -28239,10 +28406,9 @@ var translateString = function (stringToTranslate, params) {
28239
28406
  return utils.englishStringTranslator(stringToTranslate, params);
28240
28407
  }
28241
28408
  };
28242
- // NOTE: If you are changing this please make sure BuildInfra selects are also working fine
28243
- var getCommonSelectStyle$1 = function (styleOverrides) {
28409
+ var getCommonSelectStyle = function (styleOverrides) {
28244
28410
  if (styleOverrides === void 0) { styleOverrides = {}; }
28245
- 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) {
28411
+ 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) {
28246
28412
  return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
28247
28413
  } }, styleOverrides);
28248
28414
  };
@@ -28292,15 +28458,15 @@ var getInferredTypeFromValueType = function (value) {
28292
28458
  }
28293
28459
  };
28294
28460
 
28295
- var _path$4;
28296
- 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); }
28461
+ var _path$1;
28462
+ function _extends$2() { _extends$2 = 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$2.apply(this, arguments); }
28297
28463
  var SvgIcChevronDown = function SvgIcChevronDown(props) {
28298
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
28464
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
28299
28465
  xmlns: "http://www.w3.org/2000/svg",
28300
28466
  width: "1em",
28301
28467
  height: "1em",
28302
28468
  viewBox: "0 0 24 24"
28303
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
28469
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
28304
28470
  fill: "#999",
28305
28471
  className: "ic-chevron-down_svg__fill-color",
28306
28472
  fillRule: "nonzero",
@@ -28308,7 +28474,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
28308
28474
  })));
28309
28475
  };
28310
28476
 
28311
- var commonStyles = getCommonSelectStyle$1();
28477
+ var commonStyles = getCommonSelectStyle();
28312
28478
  var MenuList = function (_a) {
28313
28479
  var children = _a.children, props = __rest(_a, ["children"]);
28314
28480
  return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
@@ -28360,9 +28526,9 @@ var validator = RJSFValidator.default;
28360
28526
  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 }))); };
28361
28527
 
28362
28528
  var _style, _rect;
28363
- 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); }
28529
+ function _extends$1() { _extends$1 = 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$1.apply(this, arguments); }
28364
28530
  var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
28365
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
28531
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
28366
28532
  width: "1em",
28367
28533
  height: "1em",
28368
28534
  viewBox: "0 0 100 100",
@@ -28497,9 +28663,8 @@ var handleAddCD = function (_a) {
28497
28663
  handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
28498
28664
  };
28499
28665
 
28500
- // TODO: label association with input
28501
28666
  function CustomInput(_a) {
28502
- 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;
28667
+ 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;
28503
28668
  function handleError(error) {
28504
28669
  if (!Array.isArray(error)) {
28505
28670
  return [error];
@@ -28630,26 +28795,23 @@ function DraggableWrapper(_a) {
28630
28795
  y: data.y,
28631
28796
  });
28632
28797
  }
28633
- return (
28634
- // 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
28635
- jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
28798
+ return (jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed", style: {
28636
28799
  zIndex: zIndex,
28637
28800
  } }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
28638
28801
  zIndex: zIndex,
28639
- pointerEvents: 'auto',
28640
28802
  } }, { children: children })) })) })));
28641
28803
  }
28642
28804
 
28643
- var _path$3;
28644
- 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); }
28805
+ var _path;
28806
+ function _extends() { _extends = 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.apply(this, arguments); }
28645
28807
  var SvgIcDrag = function SvgIcDrag(props) {
28646
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
28808
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
28647
28809
  width: "1em",
28648
28810
  height: "1em",
28649
28811
  viewBox: "0 0 16 16",
28650
28812
  fill: "none",
28651
28813
  xmlns: "http://www.w3.org/2000/svg"
28652
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
28814
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
28653
28815
  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",
28654
28816
  fill: "#596168"
28655
28817
  })));
@@ -28771,945 +28933,12 @@ var Pagination = function (_a) {
28771
28933
  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 })] })))] })));
28772
28934
  };
28773
28935
 
28774
- var _path$2, _path2;
28775
- function _extends$2() { _extends$2 = 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$2.apply(this, arguments); }
28776
- var SvgIcCpu = function SvgIcCpu(props) {
28777
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
28778
- xmlns: "http://www.w3.org/2000/svg",
28779
- width: "1em",
28780
- height: "1em",
28781
- viewBox: "0 0 20 20",
28782
- fill: "none"
28783
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
28784
- 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",
28785
- stroke: "#596168",
28786
- strokeWidth: 1.5,
28787
- strokeLinecap: "round",
28788
- strokeLinejoin: "round"
28789
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
28790
- d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
28791
- fill: "#596168"
28792
- })));
28793
- };
28794
-
28795
- var _path$1;
28796
- function _extends$1() { _extends$1 = 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$1.apply(this, arguments); }
28797
- var SvgIcMemory = function SvgIcMemory(props) {
28798
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
28799
- xmlns: "http://www.w3.org/2000/svg",
28800
- width: "1em",
28801
- height: "1em",
28802
- viewBox: "0 0 20 20",
28803
- fill: "none"
28804
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
28805
- 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",
28806
- stroke: "#596168",
28807
- strokeWidth: 1.5,
28808
- strokeLinecap: "round",
28809
- strokeLinejoin: "round"
28810
- })));
28811
- };
28812
-
28813
- var _path;
28814
- function _extends() { _extends = 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.apply(this, arguments); }
28815
- var SvgIcTimer = function SvgIcTimer(props) {
28816
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
28817
- xmlns: "http://www.w3.org/2000/svg",
28818
- width: "1em",
28819
- height: "1em",
28820
- viewBox: "0 0 20 20",
28821
- fill: "none"
28822
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
28823
- 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",
28824
- stroke: "#596168",
28825
- strokeWidth: 1.5,
28826
- strokeLinecap: "round",
28827
- strokeLinejoin: "round"
28828
- })));
28829
- };
28830
-
28831
- var _a$1;
28832
- /**
28833
- * Unique actions that will be dispatched and,
28834
- * Keeping some values (cpu_limit, etc) in sync with backend
28835
- */
28836
- exports.BuildInfraConfigTypes = void 0;
28837
- (function (BuildInfraConfigTypes) {
28838
- BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
28839
- BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
28840
- BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
28841
- BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
28842
- BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
28843
- })(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
28844
- /**
28845
- * Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
28846
- */
28847
- exports.BuildInfraMetaConfigTypes = void 0;
28848
- (function (BuildInfraMetaConfigTypes) {
28849
- BuildInfraMetaConfigTypes["NAME"] = "name";
28850
- BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
28851
- })(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
28852
- /**
28853
- * Would be used as key for few components and would be appending activate and de_activate actions to it
28854
- */
28855
- exports.BuildInfraLocators = void 0;
28856
- (function (BuildInfraLocators) {
28857
- BuildInfraLocators["CPU"] = "cpu";
28858
- BuildInfraLocators["MEMORY"] = "memory";
28859
- // This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
28860
- BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
28861
- })(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
28862
- // FIXME: Derive this from BuildInfraLocators
28863
- // Appending the locators from above
28864
- exports.BuildInfraInheritActions = void 0;
28865
- (function (BuildInfraInheritActions) {
28866
- BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
28867
- BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
28868
- BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
28869
- BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
28870
- BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_build_timeout";
28871
- BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_build_timeout";
28872
- })(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
28873
- // TODO: Better name would be BuildInfraConfigActionMap
28874
- var BuildInfraLocatorsActionMap = (_a$1 = {},
28875
- _a$1[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
28876
- _a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
28877
- _a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
28878
- _a$1[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
28879
- _a$1[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
28880
- _a$1);
28881
- exports.BuildInfraProfileVariants = void 0;
28882
- (function (BuildInfraProfileVariants) {
28883
- BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
28884
- BuildInfraProfileVariants["NORMAL"] = "NORMAL";
28885
- BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
28886
- })(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
28887
-
28888
- var _a;
28889
- var BUILD_INFRA_TEXT = {
28890
- HEADING: 'Build Infra Configuration',
28891
- EDIT_SUBMIT: 'Save changes',
28892
- SAVE_SUBMIT: 'Save',
28893
- EDIT_CANCEL: 'Cancel',
28894
- 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.',
28895
- DESCRIPTION_LABEL: 'Description',
28896
- DESCRIPTION_PLACEHOLDER: 'Enter a description here',
28897
- PROFILE_LABEL: 'Profile name',
28898
- PROFILE_PLACEHOLDER: 'Eg. Java or Node',
28899
- INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
28900
- SUBMIT_BUTTON_TIPPY: {
28901
- INVALID_INPUT: 'Valid input is required for all mandatory fields.',
28902
- REQUEST_IN_PROGRESS: 'Request in progress.',
28903
- },
28904
- VALIDATE_REQUEST_LIMIT: {
28905
- NEGATIVE_REQUEST: 'Request should be a positive number.',
28906
- NEGATIVE_LIMIT: 'Limit should be a positive number.',
28907
- REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
28908
- REQUEST_TOO_BIG: 'Request is too big to compute.',
28909
- LIMIT_TOO_BIG: 'Limit is too big to compute.',
28910
- REQUEST_DECIMAL_PLACES: 'Request should be upto 2 decimal places.',
28911
- LIMIT_DECIMAL_PLACES: 'Limit should be upto 2 decimal places.',
28912
- },
28913
- getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
28914
- getSubmitSuccessMessage: function (profileName, isEdited) {
28915
- return "".concat(profileName, " is ").concat(isEdited ? 'updated' : 'created');
28916
- },
28917
- PROFILE_NOT_FOUND: {
28918
- title: 'Profile not found',
28919
- subTitle: 'The profile you are looking for does not exist.',
28920
- },
28921
- };
28922
- var BUILD_INFRA_BREADCRUMB = {
28923
- alias: {
28924
- 'global-config': null,
28925
- 'build-infra': {
28926
- component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
28927
- linked: false,
28928
- },
28929
- },
28930
- };
28931
- var BUILD_INFRA_FORM_FIELDS = [
28932
- {
28933
- heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20" }, { children: "CPU (Request - Limit)" })),
28934
- marker: SvgIcCpu,
28935
- actions: [
28936
- {
28937
- actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
28938
- label: 'Request',
28939
- placeholder: 'Type CPU request',
28940
- },
28941
- {
28942
- actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
28943
- label: 'Limit',
28944
- placeholder: 'Type CPU limit',
28945
- },
28946
- ],
28947
- locator: exports.BuildInfraLocators.CPU,
28948
- },
28949
- {
28950
- heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20" }, { children: "Memory (Request - Limit)" })),
28951
- marker: SvgIcMemory,
28952
- actions: [
28953
- {
28954
- actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
28955
- label: 'Request',
28956
- placeholder: 'Type memory request',
28957
- },
28958
- {
28959
- actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
28960
- label: 'Limit',
28961
- placeholder: 'Type memory limit',
28962
- },
28963
- ],
28964
- locator: exports.BuildInfraLocators.MEMORY,
28965
- },
28966
- {
28967
- heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20" }, { children: "Build timeout" })),
28968
- marker: SvgIcTimer,
28969
- actions: [
28970
- {
28971
- actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
28972
- label: 'Timeout',
28973
- placeholder: 'Type build timeout',
28974
- },
28975
- ],
28976
- locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
28977
- },
28978
- ];
28979
- // TODO: Handle the case of create profile to disable save button initially and enable it when all the fields are filled
28980
- var PROFILE_INPUT_ERROR_FIELDS = __assign({}, Object.fromEntries(Object.keys(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (key) { return [key, null]; })));
28981
- // All fields in BuildInfraConfigTypes are required and name in BuildInfraMetaConfigTypes is required
28982
- var REQUIRED_INPUT_FIELDS = __spreadArray(__spreadArray([], __read(Object.keys(exports.BuildInfraConfigTypes)), false), [exports.BuildInfraMetaConfigTypes.NAME], false);
28983
- var DEFAULT_PROFILE_NAME = 'default';
28984
- var CREATE_PROFILE_BASE_VALUE = {
28985
- name: '',
28986
- description: '',
28987
- type: exports.BuildInfraProfileVariants.NORMAL,
28988
- appCount: 0,
28989
- };
28990
- var CREATE_VIEW_CHECKED_CONFIGS = (_a = {},
28991
- _a[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
28992
- _a[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
28993
- _a);
28994
- var BUILD_INFRA_INPUT_CONSTRAINTS = {
28995
- STEP: 0.01,
28996
- MIN: 0,
28997
- DECIMAL_PLACES: 2,
28998
- };
28999
-
29000
- var Descriptor = function (_a) {
29001
- var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children;
29002
- 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: BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP, 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] })));
29003
- };
29004
-
29005
- var Footer = function (_a) {
29006
- var disabled = _a.disabled, hideCancelButton = _a.hideCancelButton, editProfile = _a.editProfile, loading = _a.loading;
29007
- var disableMessage = disabled
29008
- ? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
29009
- : BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
29010
- var getButtonText = function () {
29011
- if (editProfile) {
29012
- return BUILD_INFRA_TEXT.EDIT_SUBMIT;
29013
- }
29014
- return BUILD_INFRA_TEXT.SAVE_SUBMIT;
29015
- };
29016
- var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
29017
- 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 }, { children: loading ? jsxRuntime.jsx(Progressing, { size: 16 }) : getButtonText() })) })) })), !hideCancelButton && (jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel h-32 flex" }, { children: BUILD_INFRA_TEXT.EDIT_CANCEL })))] })));
29018
- };
29019
-
29020
- var getBaseProfileObject = function (fromCreateView, profile) {
29021
- if (fromCreateView) {
29022
- return CREATE_PROFILE_BASE_VALUE;
29023
- }
29024
- return {
29025
- id: profile.id,
29026
- name: profile.name,
29027
- description: profile.description,
29028
- type: profile.type,
29029
- appCount: profile.appCount,
29030
- };
29031
- };
29032
- // Would receive a single profile and return transformed response
29033
- var getTransformedBuildInfraProfileResponse = function (_a) {
29034
- var _b, _c, _d;
29035
- var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
29036
- // Assuming would contain all the keys
29037
- var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
29038
- acc[configuration.key] = configuration;
29039
- return acc;
29040
- }, {})) !== null && _b !== void 0 ? _b : {};
29041
- var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
29042
- acc[configuration.key] = configuration;
29043
- return acc;
29044
- }, {})) !== null && _d !== void 0 ? _d : {};
29045
- // traversing defaultConfigurationsMap and if key is present in profileConfigurations then use that else use defaultConfigurationsMap
29046
- var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
29047
- var _a;
29048
- var defaultConfiguration = defaultConfigurationsMap[key];
29049
- var profileConfiguration = profileConfigurations[key];
29050
- if (fromCreateView) {
29051
- acc[key] = {
29052
- key: key,
29053
- value: defaultConfiguration.value,
29054
- unit: defaultConfiguration.unit,
29055
- active: (_a = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _a !== void 0 ? _a : false,
29056
- };
29057
- }
29058
- else if (profileConfiguration) {
29059
- acc[key] = profileConfiguration;
29060
- }
29061
- else {
29062
- // Removing id from it since we do not have a configuration
29063
- // While generating payload, we will check on the basis of id and active flag.
29064
- acc[key] = {
29065
- key: key,
29066
- value: defaultConfiguration.value,
29067
- // saving profile name as undefined and this would be a check, if we are deriving from default or not
29068
- unit: defaultConfiguration.unit,
29069
- active: false,
29070
- };
29071
- }
29072
- acc[key].defaultValue = {
29073
- value: defaultConfiguration.value,
29074
- unit: defaultConfiguration.unit,
29075
- };
29076
- return acc;
29077
- }, {});
29078
- return {
29079
- configurationUnits: configurationUnits,
29080
- profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
29081
- };
29082
- };
29083
- var getBuildInfraProfileByName = function (_a) {
29084
- var name = _a.name, fromCreateView = _a.fromCreateView;
29085
- return __awaiter(void 0, void 0, void 0, function () {
29086
- var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
29087
- return __generator(this, function (_c) {
29088
- switch (_c.label) {
29089
- case 0:
29090
- _c.trys.push([0, 2, , 3]);
29091
- return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
29092
- case 1:
29093
- response = _c.sent();
29094
- _b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
29095
- return [2 /*return*/, getTransformedBuildInfraProfileResponse({
29096
- configurationUnits: configurationUnits,
29097
- defaultConfigurations: defaultConfigurations,
29098
- profile: profile,
29099
- fromCreateView: fromCreateView,
29100
- })];
29101
- case 2:
29102
- error_1 = _c.sent();
29103
- showError(error_1);
29104
- throw error_1;
29105
- case 3: return [2 /*return*/];
29106
- }
29107
- });
29108
- });
29109
- };
29110
- var getBuildInfraProfilePayload = function (profileInput) {
29111
- var currentConfigurations = profileInput.configurations;
29112
- var configurationKeys = Object.keys(currentConfigurations);
29113
- // would only keep the configurations with id or active flag as true
29114
- var configurations = configurationKeys.reduce(function (acc, key) {
29115
- var configuration = currentConfigurations[key];
29116
- if (configuration.id || configuration.active) {
29117
- acc.push({
29118
- id: configuration.id,
29119
- key: key,
29120
- value: Number(configuration.value),
29121
- unit: configuration.unit,
29122
- active: configuration.active,
29123
- });
29124
- }
29125
- return acc;
29126
- }, []);
29127
- var payload = {
29128
- name: profileInput.name,
29129
- description: profileInput.description,
29130
- type: profileInput.type,
29131
- configurations: configurations,
29132
- };
29133
- return payload;
29134
- };
29135
- var updateBuildInfraProfile = function (_a) {
29136
- var name = _a.name, profileInput = _a.profileInput;
29137
- var payload = getBuildInfraProfilePayload(profileInput);
29138
- // TODO: Would remove this
29139
- console.log(payload, 'edit payload');
29140
- return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
29141
- };
29142
- var createBuildInfraProfile = function (_a) {
29143
- var profileInput = _a.profileInput;
29144
- return __awaiter(void 0, void 0, void 0, function () {
29145
- var payload;
29146
- return __generator(this, function (_b) {
29147
- switch (_b.label) {
29148
- case 0:
29149
- // Adding a timeout to show the loader
29150
- // eslint-disable-next-line no-promise-executor-return
29151
- return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })];
29152
- case 1:
29153
- // Adding a timeout to show the loader
29154
- // eslint-disable-next-line no-promise-executor-return
29155
- _b.sent();
29156
- payload = getBuildInfraProfilePayload(profileInput);
29157
- // TODO: Remove this
29158
- console.log(payload, 'create payload');
29159
- return [2 /*return*/, Promise.resolve({
29160
- code: 200,
29161
- result: profileInput,
29162
- })
29163
- // return post(`${ROUTES}/${name}`, payload)
29164
- ];
29165
- }
29166
- });
29167
- });
29168
- };
29169
- var deleteBuildInfraProfileByName = function (name) { return __awaiter(void 0, void 0, void 0, function () {
29170
- return __generator(this, function (_a) {
29171
- switch (_a.label) {
29172
- case 0:
29173
- // Adding a timeout to show the loader
29174
- // eslint-disable-next-line no-promise-executor-return
29175
- return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })];
29176
- case 1:
29177
- // Adding a timeout to show the loader
29178
- // eslint-disable-next-line no-promise-executor-return
29179
- _a.sent();
29180
- return [2 /*return*/, Promise.resolve({
29181
- code: 200,
29182
- result: null,
29183
- })
29184
- // return trash(`${ROUTES}/${name}`)
29185
- ];
29186
- }
29187
- });
29188
- }); };
29189
-
29190
- var APIResponseHandler = function (_a) {
29191
- var _b, _c;
29192
- var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
29193
- // keeping it above loading since, not expected to send a call if not authorized
29194
- if (notAuthorized) {
29195
- return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
29196
- }
29197
- if (isLoading) {
29198
- return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
29199
- }
29200
- if (error) {
29201
- if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
29202
- return (jsxRuntime.jsx(GenericEmptyState, { title: (_b = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.title) !== null && _b !== void 0 ? _b : 'Data not found', subTitle: (_c = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.subTitle) !== null && _c !== void 0 ? _c : 'The data you are looking for does not exist' }));
29203
- }
29204
- return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
29205
- }
29206
- // Had to add this since while using it is throwing ts error
29207
- // eslint-disable-next-line react/jsx-no-useless-fragment
29208
- return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
29209
- };
29210
-
29211
- var getCommonSelectStyle = function (styleOverrides) {
29212
- if (styleOverrides === void 0) { styleOverrides = {}; }
29213
- 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));
29214
- };
29215
- var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
29216
- if (isSelected) {
29217
- return 'var(--B100)';
29218
- }
29219
- if (isFocused) {
29220
- return 'var(--N50)';
29221
- }
29222
- return 'var(--white)';
29223
- };
29224
- var getCustomOptionSelectionStyle = function (styleOverrides) {
29225
- if (styleOverrides === void 0) { styleOverrides = {}; }
29226
- 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)); };
29227
- };
29228
- var SelectOption = function (props) {
29229
- var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
29230
- selectProps.styles.option = getCustomOptionSelectionStyle(style);
29231
- var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
29232
- return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
29233
- };
29234
-
29235
- var validateName = function (name) {
29236
- if (!/^.{3,50}$/.test(name)) {
29237
- return {
29238
- isValid: false,
29239
- message: 'Minimum 3 and maximum 50 characters allowed',
29240
- };
29241
- }
29242
- if (!/^[a-z0-9-._]+$/.test(name)) {
29243
- return {
29244
- isValid: false,
29245
- message: 'Only lowercase alphanumeric characters, -, _ or . allowed',
29246
- };
29247
- }
29248
- if (!/^(?![-._]).*[^-._]$/.test(name)) {
29249
- return {
29250
- isValid: false,
29251
- message: 'Cannot start/end with -, _ or .',
29252
- };
29253
- }
29254
- return {
29255
- isValid: true,
29256
- };
29257
- };
29258
- var validateDescription = function (description) {
29259
- if ((description === null || description === void 0 ? void 0 : description.length) > 300) {
29260
- return {
29261
- isValid: false,
29262
- message: 'Maximum 300 characters are allowed',
29263
- };
29264
- }
29265
- return {
29266
- isValid: true,
29267
- };
29268
- };
29269
- var validateRequiredPositiveNumber = function (value) {
29270
- if (!value) {
29271
- return {
29272
- isValid: false,
29273
- message: 'This field is required',
29274
- };
29275
- }
29276
- // TODO: Look if regex is available for this, since 0002 is not a valid number
29277
- if (!/^\d+(\.\d+)?$/.test(value.toString())) {
29278
- return {
29279
- isValid: false,
29280
- message: 'This field should be a valid positive number',
29281
- };
29282
- }
29283
- if (Number(value) < 0) {
29284
- return {
29285
- isValid: false,
29286
- message: 'Only positive numbers are allowed',
29287
- };
29288
- }
29289
- return {
29290
- isValid: true,
29291
- };
29292
- };
29293
-
29294
- var validateRequestLimit = function (_a) {
29295
- var _b, _c, _d, _e;
29296
- var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
29297
- // Request <= Limit
29298
- // Request and Limit should be numbers can be decimals
29299
- // Request and Limit should be positive numbers
29300
- // Request and Limit should be less than Number.MAX_SAFE_INTEGER
29301
- // Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
29302
- // Both request and limit should be there
29303
- var requestNumber = Number(request.value);
29304
- var limitNumber = Number(limit.value);
29305
- var requestUnit = Number(unitsMap[request.unit].conversionFactor);
29306
- var limitUnit = Number(unitsMap[limit.unit].conversionFactor);
29307
- var requestLimitValidationResponse = {
29308
- request: {
29309
- isValid: true,
29310
- },
29311
- limit: {
29312
- isValid: true,
29313
- },
29314
- };
29315
- var isRequestValidNumber = validateRequiredPositiveNumber(request.value).isValid;
29316
- var isLimitValidNumber = validateRequiredPositiveNumber(limit.value).isValid;
29317
- if (!isRequestValidNumber) {
29318
- requestLimitValidationResponse.request = {
29319
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.NEGATIVE_REQUEST,
29320
- isValid: false,
29321
- };
29322
- }
29323
- if (!isLimitValidNumber) {
29324
- requestLimitValidationResponse.limit = {
29325
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.NEGATIVE_LIMIT,
29326
- isValid: false,
29327
- };
29328
- }
29329
- if (!isRequestValidNumber || !isLimitValidNumber) {
29330
- return requestLimitValidationResponse;
29331
- }
29332
- var isSafeRequestNumber = requestNumber * requestUnit < Number.MAX_SAFE_INTEGER;
29333
- var isSafeLimitNumber = limitNumber * limitUnit < Number.MAX_SAFE_INTEGER;
29334
- if (!isSafeRequestNumber) {
29335
- requestLimitValidationResponse.request = {
29336
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_TOO_BIG,
29337
- isValid: false,
29338
- };
29339
- return requestLimitValidationResponse;
29340
- }
29341
- if (!isSafeLimitNumber) {
29342
- requestLimitValidationResponse.limit = {
29343
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_TOO_BIG,
29344
- isValid: false,
29345
- };
29346
- return requestLimitValidationResponse;
29347
- }
29348
- // only two decimal places are allowed
29349
- var requestDecimalPlaces = (_c = (_b = String(request.value).split('.')[1]) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
29350
- var limitDecimalPlaces = (_e = (_d = String(limit.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
29351
- if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29352
- requestLimitValidationResponse.request = {
29353
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
29354
- isValid: false,
29355
- };
29356
- return requestLimitValidationResponse;
29357
- }
29358
- if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29359
- requestLimitValidationResponse.limit = {
29360
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
29361
- isValid: false,
29362
- };
29363
- return requestLimitValidationResponse;
29364
- }
29365
- if (requestNumber * requestUnit > limitNumber * limitUnit) {
29366
- requestLimitValidationResponse.request = {
29367
- message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
29368
- isValid: false,
29369
- };
29370
- }
29371
- return requestLimitValidationResponse;
29372
- };
29373
- var getInitialProfileInputErrors = function (fromCreateView) {
29374
- if (fromCreateView) {
29375
- var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29376
- REQUIRED_INPUT_FIELDS.forEach(function (field) {
29377
- initialProfileInputErrors_1[field] = '';
29378
- });
29379
- return initialProfileInputErrors_1;
29380
- }
29381
- return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29382
- };
29383
- var useBuildInfraForm = function (_a) {
29384
- var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
29385
- var fromCreateView = !name;
29386
- var _b = __read(useAsync(function () {
29387
- return getBuildInfraProfileByName({
29388
- name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
29389
- fromCreateView: fromCreateView,
29390
- });
29391
- }, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
29392
- // If configuration is existing and is active then use it else use default from profileResponse
29393
- var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
29394
- var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
29395
- var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
29396
- React.useEffect(function () {
29397
- if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
29398
- setProfileInput(__assign({}, profileResponse.profile));
29399
- setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
29400
- }
29401
- }, [profileResponse, isLoading]);
29402
- // NOTE: Currently sending and receiving values as string, but will parse it to number for payload
29403
- var handleProfileInputChange = function (_a) {
29404
- var action = _a.action, data = _a.data;
29405
- var currentInput = __assign({}, profileInput);
29406
- var currentInputErrors = __assign({}, profileInputErrors);
29407
- var lastSavedConfiguration = profileResponse.profile.configurations;
29408
- var currentConfiguration = currentInput.configurations;
29409
- var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
29410
- switch (action) {
29411
- case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
29412
- currentInput.description = value;
29413
- currentInputErrors.description = validateDescription(value).message;
29414
- break;
29415
- case exports.BuildInfraMetaConfigTypes.NAME:
29416
- currentInput.name = value;
29417
- currentInputErrors.name = validateName(value).message;
29418
- break;
29419
- case exports.BuildInfraConfigTypes.CPU_LIMIT: {
29420
- currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
29421
- var _c = validateRequestLimit({
29422
- request: {
29423
- value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
29424
- unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
29425
- },
29426
- limit: {
29427
- value: value,
29428
- unit: unit,
29429
- },
29430
- unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
29431
- }), request = _c.request, limit = _c.limit;
29432
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
29433
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
29434
- break;
29435
- }
29436
- case exports.BuildInfraConfigTypes.CPU_REQUEST: {
29437
- currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
29438
- var _d = validateRequestLimit({
29439
- request: {
29440
- value: value,
29441
- unit: unit,
29442
- },
29443
- limit: {
29444
- value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
29445
- unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
29446
- },
29447
- unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
29448
- }), request = _d.request, limit = _d.limit;
29449
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
29450
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
29451
- break;
29452
- }
29453
- case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
29454
- currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
29455
- var _e = validateRequestLimit({
29456
- request: {
29457
- value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
29458
- unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
29459
- },
29460
- limit: {
29461
- value: value,
29462
- unit: unit,
29463
- },
29464
- unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
29465
- }), request = _e.request, limit = _e.limit;
29466
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
29467
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
29468
- break;
29469
- }
29470
- case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
29471
- currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
29472
- var _f = validateRequestLimit({
29473
- request: {
29474
- value: value,
29475
- unit: unit,
29476
- },
29477
- limit: {
29478
- value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
29479
- unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
29480
- },
29481
- unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
29482
- }), request = _f.request, limit = _f.limit;
29483
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
29484
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
29485
- break;
29486
- }
29487
- case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
29488
- currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
29489
- currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveNumber(value).message;
29490
- break;
29491
- }
29492
- case exports.BuildInfraInheritActions.ACTIVATE_CPU:
29493
- 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 });
29494
- 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 });
29495
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
29496
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
29497
- break;
29498
- case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
29499
- 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 });
29500
- 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 });
29501
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
29502
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
29503
- break;
29504
- case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
29505
- 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 });
29506
- currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
29507
- break;
29508
- case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
29509
- // Reverting the value and unit to defaultValues
29510
- 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 });
29511
- currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
29512
- break;
29513
- case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
29514
- 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 });
29515
- 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 });
29516
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
29517
- currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
29518
- break;
29519
- case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
29520
- 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 });
29521
- 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 });
29522
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
29523
- currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
29524
- break;
29525
- default:
29526
- throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
29527
- }
29528
- setProfileInput(currentInput);
29529
- setProfileInputErrors(currentInputErrors);
29530
- };
29531
- var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
29532
- var err_1;
29533
- return __generator(this, function (_a) {
29534
- switch (_a.label) {
29535
- case 0:
29536
- e.preventDefault();
29537
- setLoadingActionRequest(true);
29538
- _a.label = 1;
29539
- case 1:
29540
- _a.trys.push([1, 6, , 7]);
29541
- if (!editProfile) return [3 /*break*/, 3];
29542
- return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
29543
- case 2:
29544
- _a.sent();
29545
- return [3 /*break*/, 5];
29546
- case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
29547
- case 4:
29548
- _a.sent();
29549
- _a.label = 5;
29550
- case 5:
29551
- setLoadingActionRequest(false);
29552
- toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
29553
- if (handleSuccessRedirection) {
29554
- handleSuccessRedirection();
29555
- }
29556
- else {
29557
- reloadRequest();
29558
- }
29559
- return [3 /*break*/, 7];
29560
- case 6:
29561
- err_1 = _a.sent();
29562
- showError(err_1);
29563
- setLoadingActionRequest(false);
29564
- return [3 /*break*/, 7];
29565
- case 7: return [2 /*return*/];
29566
- }
29567
- });
29568
- }); };
29569
- return {
29570
- isLoading: isLoading,
29571
- profileResponse: profileResponse,
29572
- responseError: responseError,
29573
- reloadRequest: reloadRequest,
29574
- profileInput: profileInput,
29575
- profileInputErrors: profileInputErrors,
29576
- handleProfileInputChange: handleProfileInputChange,
29577
- loadingActionRequest: loadingActionRequest,
29578
- handleSubmit: handleSubmit,
29579
- };
29580
- };
29581
- var getOptionBackgroundColor = function (isFocused, isSelected) {
29582
- if (isSelected) {
29583
- return 'var(--B100)';
29584
- }
29585
- if (isFocused) {
29586
- return 'var(--N50)';
29587
- }
29588
- return 'var(--white)';
29589
- };
29590
- var unitSelectorStyles = function () {
29591
- return getCommonSelectStyle({
29592
- control: function (base, state) { return (__assign(__assign({}, base), { borderRadius: 0, backgroundColor: 'var(--N0)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', alignItems: 'center', cursor: 'pointer', borderTopRightRadius: '4px', borderBottomRightRadius: '4px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', outline: 'none', boxShadow: 'none', '&:hover': {
29593
- border: '1px solid var(--N400)',
29594
- } })); },
29595
- indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
29596
- dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
29597
- option: function (base, state) { return (__assign(__assign({}, base), { padding: '4px 12px', backgroundColor: getOptionBackgroundColor(state.isFocused, state.isSelected), color: 'var(--N900)', cursor: 'pointer', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', height: '36px' })); },
29598
- valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
29599
- menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
29600
- });
29601
- };
29602
-
29603
- /**
29604
- * In case need arise for variants break this CustomInput and Select as a separate component
29605
- */
29606
- var BuildInfraFormAction = function (_a) {
29607
- var _b, _c;
29608
- 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;
29609
- var handleUnitChange = function (selectedUnit) {
29610
- var data = {
29611
- unit: selectedUnit.label,
29612
- value: currentValue,
29613
- };
29614
- handleProfileInputChange({ action: actionType, data: data });
29615
- };
29616
- var handleInputChange = function (e) {
29617
- var data = {
29618
- unit: currentUnitName,
29619
- value: e.currentTarget.value,
29620
- };
29621
- handleProfileInputChange({ action: actionType, data: data });
29622
- };
29623
- var unitOptions = (_c = (_b = Object.values(profileUnitsMap)) === null || _b === void 0 ? void 0 : _b.map(function (unit) { return ({
29624
- label: unit.name,
29625
- value: unit.name,
29626
- }); })) !== null && _c !== void 0 ? _c : [];
29627
- var currentUnit = unitOptions.find(function (unit) { return unit.value === currentUnitName; });
29628
- 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": actionType, 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: {
29629
- IndicatorSeparator: null,
29630
- ClearIndicator: null,
29631
- }, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
29632
- };
29633
-
29634
- var BuildInfraFormItem = function (_a) {
29635
- 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;
29636
- var handleActivationChange = function (e) {
29637
- var checked = e.currentTarget.checked;
29638
- var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
29639
- handleProfileInputChange({ action: action });
29640
- };
29641
- var renderMarker = function () {
29642
- if (isDefaultProfile) {
29643
- return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
29644
- }
29645
- return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
29646
- };
29647
- // If in configuration active is false, means it is inheriting values from other profile
29648
- 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" })] }));
29649
- };
29650
-
29651
- var BuildInfraProfileDescriptionField = function (_a) {
29652
- var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
29653
- var handleChange = function (e) {
29654
- handleProfileInputChange({
29655
- action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
29656
- data: { value: e.currentTarget.value },
29657
- });
29658
- };
29659
- 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] })))] })));
29660
- };
29661
-
29662
- var BuildInfraProfileNameField = function (_a) {
29663
- var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
29664
- var handleChange = function (e) {
29665
- handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
29666
- };
29667
- 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" }) })));
29668
- };
29669
-
29670
- var InheritingHeader = function (_a) {
29671
- var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
29672
- var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
29673
- if (isDefaultProfile || !isInheriting) {
29674
- // For typing issues
29675
- // eslint-disable-next-line react/jsx-no-useless-fragment
29676
- return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
29677
- }
29678
- return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__content-space w-100" }, { children: [defaultHeading, jsxRuntime.jsx("p", __assign({ className: "m-0 flexbox pt-0 pb-0 pl-4 pr-4 fs-13 lh-20 fw-4 cn-9" }, { children: inheritingDataString })), jsxRuntime.jsx("p", __assign({ className: "m-0 cn-7 fs-13 fw-4 lh-20" }, { children: BUILD_INFRA_TEXT.INHERITING_HEADING_DESCRIPTION }))] })));
29679
- };
29680
- var BuildInfraConfigForm = function (_a) {
29681
- var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
29682
- var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
29683
- // will get the desired configuration from the currentConfigurations and then check if it is active or not
29684
- var isInheritingProfileValues = function (actions) {
29685
- return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
29686
- };
29687
- // Had to show loader for an instance due to batching of state updates not working as expected :/
29688
- if (!currentConfigurations) {
29689
- return jsxRuntime.jsx(Progressing, { pageLoader: true });
29690
- }
29691
- 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],
29692
- // Assumption is for default profiles all input fields are required
29693
- isRequired: isDefaultProfile, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
29694
- };
29695
-
29696
- exports.APIResponseHandler = APIResponseHandler;
29697
28936
  exports.AddCDButton = AddCDButton;
29698
28937
  exports.AppStatus = AppStatus;
29699
- exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
29700
- exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
29701
- exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
29702
- exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
29703
28938
  exports.BreadCrumb = BreadCrumb;
29704
28939
  exports.BreadcrumbStore = Store;
29705
- exports.BuildInfraConfigForm = BuildInfraConfigForm;
29706
- exports.BuildInfraDescriptor = Descriptor;
29707
- exports.BuildInfraFooter = Footer;
29708
- exports.BuildInfraLocatorsActionMap = BuildInfraLocatorsActionMap;
29709
28940
  exports.BuildStageVariable = BuildStageVariable;
29710
28941
  exports.CDModalTab = CDModalTab;
29711
- exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
29712
- exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
29713
28942
  exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
29714
28943
  exports.Checkbox = Checkbox$1;
29715
28944
  exports.ClearIndicator = ClearIndicator;
@@ -29718,7 +28947,7 @@ exports.ConditionalWrap = ConditionalWrap;
29718
28947
  exports.ConfirmationDialog = ConfirmationDialog;
29719
28948
  exports.CustomInput = CustomInput;
29720
28949
  exports.CustomSelect = CustomSelect;
29721
- exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
28950
+ exports.DEFAULT_BASE_PAGE_SIZE = DEFAULT_BASE_PAGE_SIZE;
29722
28951
  exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
29723
28952
  exports.DOCUMENTATION = DOCUMENTATION;
29724
28953
  exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
@@ -29752,13 +28981,11 @@ exports.MultiValueRemove = MultiValueRemove;
29752
28981
  exports.OpaqueModal = OpaqueModal;
29753
28982
  exports.Option = Option;
29754
28983
  exports.PATTERNS = PATTERNS;
29755
- exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
29756
28984
  exports.Pagination = Pagination;
29757
28985
  exports.PopupMenu = PopupMenu;
29758
28986
  exports.Progressing = Progressing;
29759
28987
  exports.PropagateTagInfo = PropagateTagInfo;
29760
28988
  exports.REGISTRY_TYPE_MAP = REGISTRY_TYPE_MAP;
29761
- exports.REQUIRED_INPUT_FIELDS = REQUIRED_INPUT_FIELDS;
29762
28989
  exports.RJSFForm = RJSFForm;
29763
28990
  exports.ROUTES = ROUTES;
29764
28991
  exports.RadioGroup = RadioGroup$1;
@@ -29770,10 +28997,10 @@ exports.ResizableTextarea = ResizableTextarea;
29770
28997
  exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
29771
28998
  exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
29772
28999
  exports.SearchBar = SearchBar;
29773
- exports.SelectOption = SelectOption;
29774
29000
  exports.ServerError = ServerError;
29775
29001
  exports.ServerErrors = ServerErrors;
29776
29002
  exports.SingleSelectOption = SingleSelectOption;
29003
+ exports.SortableTableHeaderCell = SortableTableHeaderCell;
29777
29004
  exports.SourceTypeMap = SourceTypeMap;
29778
29005
  exports.StyledRadioGroup = RadioGroup;
29779
29006
  exports.TOAST_ACCESS_DENIED = TOAST_ACCESS_DENIED;
@@ -29792,20 +29019,15 @@ exports.VisibleModal = VisibleModal;
29792
29019
  exports.VisibleModal2 = VisibleModal2;
29793
29020
  exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
29794
29021
  exports.copyToClipboard = copyToClipboard;
29795
- exports.createBuildInfraProfile = createBuildInfraProfile;
29796
29022
  exports.createGitCommitUrl = createGitCommitUrl;
29797
29023
  exports.customStyles = customStyles;
29798
29024
  exports.debounce = debounce$2;
29799
- exports.deleteBuildInfraProfileByName = deleteBuildInfraProfileByName;
29800
29025
  exports.extractImage = extractImage;
29801
29026
  exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
29802
29027
  exports.genericCDMaterialsService = genericCDMaterialsService;
29803
29028
  exports.get = get;
29804
29029
  exports.getAlphabetIcon = getAlphabetIcon;
29805
- exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
29806
- exports.getCommonSelectStyle = getCommonSelectStyle;
29807
29030
  exports.getCookie = getCookie;
29808
- exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
29809
29031
  exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
29810
29032
  exports.getFilteredChartVersions = getFilteredChartVersions;
29811
29033
  exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
@@ -29814,7 +29036,6 @@ exports.getLoginInfo = getLoginInfo;
29814
29036
  exports.getRandomColor = getRandomColor;
29815
29037
  exports.getRedirectionProps = getRedirectionProps;
29816
29038
  exports.getTeamListMin = getTeamListMin;
29817
- exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
29818
29039
  exports.getUnlockedJSON = getUnlockedJSON;
29819
29040
  exports.getUrlWithSearchParams = getUrlWithSearchParams;
29820
29041
  exports.getUserRole = getUserRole;
@@ -29833,19 +29054,13 @@ exports.sortCallback = sortCallback;
29833
29054
  exports.stopPropagation = stopPropagation;
29834
29055
  exports.toastAccessDenied = toastAccessDenied;
29835
29056
  exports.trash = trash;
29836
- exports.unitSelectorStyles = unitSelectorStyles;
29837
- exports.updateBuildInfraProfile = updateBuildInfraProfile;
29838
29057
  exports.useAsync = useAsync;
29839
29058
  exports.useBreadcrumb = useBreadcrumb;
29840
- exports.useBuildInfraForm = useBuildInfraForm;
29841
29059
  exports.useClickOutside = useClickOutside;
29842
29060
  exports.useEffectAfterMount = useEffectAfterMount;
29843
29061
  exports.useForm = useForm;
29844
29062
  exports.useSearchString = useSearchString;
29845
29063
  exports.useSuperAdmin = useSuperAdmin;
29846
29064
  exports.useThrottledEffect = useThrottledEffect;
29065
+ exports.useUrlFilters = useUrlFilters;
29847
29066
  exports.useWindowSize = useWindowSize;
29848
- exports.validateDescription = validateDescription;
29849
- exports.validateName = validateName;
29850
- exports.validateRequestLimit = validateRequestLimit;
29851
- exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;