@devtron-labs/devtron-fe-common-lib 0.0.59-beta-11 → 0.0.59-beta-12

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 (98) hide show
  1. package/dist/Common/Constants.d.ts +1 -14
  2. package/dist/Common/Hooks/index.d.ts +0 -1
  3. package/dist/Common/Types.d.ts +1 -13
  4. package/dist/Common/index.d.ts +0 -1
  5. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +4 -0
  6. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +4 -0
  7. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +7 -0
  8. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +4 -0
  9. package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +4 -0
  10. package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +4 -0
  11. package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +4 -0
  12. package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +50 -0
  13. package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +7 -0
  14. package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +6 -0
  15. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +286 -0
  16. package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +12 -0
  17. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -1
  18. package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +4 -0
  19. package/dist/Shared/Components/APIResponseHandler/constants.d.ts +4 -0
  20. package/dist/Shared/Components/APIResponseHandler/index.d.ts +2 -0
  21. package/dist/Shared/Components/APIResponseHandler/types.d.ts +37 -0
  22. package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +1 -1
  23. package/dist/Shared/Components/BulkSelection/BulkSelectionProvider.d.ts +4 -0
  24. package/dist/Shared/Components/BulkSelection/constants.d.ts +1 -0
  25. package/dist/Shared/Components/BulkSelection/index.d.ts +1 -1
  26. package/dist/Shared/Components/BulkSelection/types.d.ts +8 -5
  27. package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
  28. package/dist/Shared/Components/ReactSelect/utils.d.ts +12 -0
  29. package/dist/Shared/Components/index.d.ts +2 -0
  30. package/dist/Shared/Helpers.d.ts +16 -0
  31. package/dist/Shared/index.d.ts +2 -0
  32. package/dist/Shared/validations.d.ts +8 -0
  33. package/dist/index.js +1301 -451
  34. package/package.json +1 -1
  35. package/src/Assets/Icon/ic-close.svg +8 -2
  36. package/src/Assets/Icon/ic-cpu.svg +4 -0
  37. package/src/Assets/Icon/ic-memory.svg +3 -0
  38. package/src/Assets/Icon/ic-timer.svg +3 -0
  39. package/src/Common/BreadCrumb/Types.ts +0 -1
  40. package/src/Common/Checkbox.tsx +1 -0
  41. package/src/Common/Constants.ts +3 -18
  42. package/src/Common/CustomInput/CustomInput.tsx +2 -1
  43. package/src/Common/DraggableWrapper/DraggableWrapper.tsx +3 -1
  44. package/src/Common/Hooks/index.ts +0 -1
  45. package/src/Common/RJSF/utils.ts +2 -0
  46. package/src/Common/SearchBar/searchBar.scss +1 -1
  47. package/src/Common/Types.ts +1 -13
  48. package/src/Common/index.ts +0 -1
  49. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +128 -0
  50. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +44 -0
  51. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +106 -0
  52. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +55 -0
  53. package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +32 -0
  54. package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +45 -0
  55. package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +55 -0
  56. package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +4 -0
  57. package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +139 -0
  58. package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +7 -0
  59. package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +167 -0
  60. package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +339 -0
  61. package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +509 -0
  62. package/src/Pages/GlobalConfigurations/index.ts +1 -1
  63. package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +41 -0
  64. package/src/Shared/Components/APIResponseHandler/constants.tsx +5 -0
  65. package/src/Shared/Components/APIResponseHandler/index.ts +2 -0
  66. package/src/Shared/Components/APIResponseHandler/types.tsx +39 -0
  67. package/src/Shared/Components/BulkSelection/BulkSelection.tsx +3 -7
  68. package/src/Shared/Components/BulkSelection/{UseBulkSelection.tsx → BulkSelectionProvider.tsx} +70 -9
  69. package/src/Shared/Components/BulkSelection/constants.tsx +1 -0
  70. package/src/Shared/Components/BulkSelection/index.ts +1 -1
  71. package/src/Shared/Components/BulkSelection/types.tsx +9 -5
  72. package/src/Shared/Components/ReactSelect/index.ts +1 -0
  73. package/src/Shared/Components/ReactSelect/utils.tsx +97 -0
  74. package/src/Shared/Components/index.ts +2 -0
  75. package/src/Shared/Helpers.tsx +29 -0
  76. package/src/Shared/index.ts +2 -0
  77. package/src/Shared/validations.tsx +130 -0
  78. package/dist/Common/Hooks/useUrlFilters/constants.d.ts +0 -8
  79. package/dist/Common/Hooks/useUrlFilters/index.d.ts +0 -2
  80. package/dist/Common/Hooks/useUrlFilters/types.d.ts +0 -6
  81. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +0 -32
  82. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +0 -18
  83. package/dist/Common/SortableTableHeaderCell/index.d.ts +0 -2
  84. package/dist/Common/SortableTableHeaderCell/types.d.ts +0 -25
  85. package/dist/Pages/GlobalConfigurations/Authorization/constants.d.ts +0 -15
  86. package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +0 -1
  87. package/dist/Shared/Components/BulkSelection/UseBulkSelection.d.ts +0 -3
  88. package/src/Assets/Icon/ic-arrow-up-down.svg +0 -3
  89. package/src/Assets/Icon/ic-sort-arrow-down.svg +0 -3
  90. package/src/Common/Hooks/useUrlFilters/constants.ts +0 -9
  91. package/src/Common/Hooks/useUrlFilters/index.ts +0 -2
  92. package/src/Common/Hooks/useUrlFilters/types.ts +0 -6
  93. package/src/Common/Hooks/useUrlFilters/useUrlFilters.ts +0 -121
  94. package/src/Common/SortableTableHeaderCell/SortableTableHeaderCell.tsx +0 -44
  95. package/src/Common/SortableTableHeaderCell/index.ts +0 -2
  96. package/src/Common/SortableTableHeaderCell/types.ts +0 -26
  97. package/src/Pages/GlobalConfigurations/Authorization/constants.ts +0 -16
  98. package/src/Pages/GlobalConfigurations/Authorization/index.ts +0 -1
package/dist/index.js CHANGED
@@ -50,7 +50,8 @@ var ROUTES = {
50
50
  USER_CHECK_ROLE: 'user/check/roles',
51
51
  IMAGE_TAGGING: 'app/image-tagging',
52
52
  CD_MATERIAL_GET: 'app/cd-pipeline',
53
- DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
53
+ DEPLOYMENT_TEMPLATE_LIST: 'app/template/list',
54
+ INFRA_CONFIG_PROFILE: 'infra-config/profile',
54
55
  };
55
56
  exports.KEY_VALUE = void 0;
56
57
  (function (KEY_VALUE) {
@@ -267,22 +268,7 @@ var MAX_Z_INDEX = 2147483647;
267
268
  var SELECTED_APPROVAL_TAB_STATE = {
268
269
  APPROVAL: 'approval',
269
270
  PENDING: 'pending',
270
- };
271
- exports.SortingOrder = void 0;
272
- (function (SortingOrder) {
273
- /**
274
- * Ascending order
275
- */
276
- SortingOrder["ASC"] = "ASC";
277
- /**
278
- * Descending order
279
- */
280
- SortingOrder["DESC"] = "DESC";
281
- })(exports.SortingOrder || (exports.SortingOrder = {}));
282
- /**
283
- * Base page size for pagination
284
- */
285
- var DEFAULT_BASE_PAGE_SIZE = 20;
271
+ };
286
272
 
287
273
  /******************************************************************************
288
274
  Copyright (c) Microsoft Corporation.
@@ -797,9 +783,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
797
783
  styleInject(css_248z$9);
798
784
 
799
785
  var _g$7;
800
- function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
786
+ function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
801
787
  var SvgIcProgressing = function SvgIcProgressing(props) {
802
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
788
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
803
789
  xmlns: "http://www.w3.org/2000/svg",
804
790
  viewBox: "0 0 24 24",
805
791
  width: "1em",
@@ -851,8 +837,8 @@ EmptyState.Loading = Loading;
851
837
 
852
838
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
853
839
 
854
- function _extends$s() {
855
- _extends$s = Object.assign || function (target) {
840
+ function _extends$t() {
841
+ _extends$t = Object.assign || function (target) {
856
842
  for (var i = 1; i < arguments.length; i++) {
857
843
  var source = arguments[i];
858
844
 
@@ -866,7 +852,7 @@ function _extends$s() {
866
852
  return target;
867
853
  };
868
854
 
869
- return _extends$s.apply(this, arguments);
855
+ return _extends$t.apply(this, arguments);
870
856
  }
871
857
 
872
858
  function _objectWithoutPropertiesLoose$2(source, excluded) {
@@ -1592,7 +1578,7 @@ function ProgressBar(_ref) {
1592
1578
  isIn = _ref.isIn,
1593
1579
  theme = _ref.theme;
1594
1580
 
1595
- var style = _extends$s({}, userStyle, {
1581
+ var style = _extends$t({}, userStyle, {
1596
1582
  animationDuration: delay + "ms",
1597
1583
  animationPlayState: isRunning ? 'running' : 'paused',
1598
1584
  opacity: hide ? 0 : 1
@@ -1869,9 +1855,9 @@ var ToastContainer = function ToastContainer(props) {
1869
1855
  ,
1870
1856
  id: containerId
1871
1857
  }, getToastToRender(function (position, toastList) {
1872
- var containerStyle = !toastList.length ? _extends$s({}, style, {
1858
+ var containerStyle = !toastList.length ? _extends$t({}, style, {
1873
1859
  pointerEvents: 'none'
1874
- }) : _extends$s({}, style);
1860
+ }) : _extends$t({}, style);
1875
1861
  return React.createElement("div", {
1876
1862
  className: getClassName(position),
1877
1863
  style: containerStyle,
@@ -1978,7 +1964,7 @@ function dispatchToast(content, options) {
1978
1964
 
1979
1965
 
1980
1966
  function mergeOptions(type, options) {
1981
- return _extends$s({}, options, {
1967
+ return _extends$t({}, options, {
1982
1968
  type: options && options.type || type,
1983
1969
  toastId: getToastId(options)
1984
1970
  });
@@ -1995,7 +1981,7 @@ function toast(content, options) {
1995
1981
  }
1996
1982
 
1997
1983
  toast.loading = function (content, options) {
1998
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$s({
1984
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$t({
1999
1985
  isLoading: true,
2000
1986
  autoClose: false,
2001
1987
  closeOnClick: false,
@@ -2011,7 +1997,7 @@ function handlePromise(promise, _ref2, options) {
2011
1997
  var id;
2012
1998
 
2013
1999
  if (pending) {
2014
- id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$s({}, options, pending));
2000
+ id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$t({}, options, pending));
2015
2001
  }
2016
2002
 
2017
2003
  var resetParams = {
@@ -2030,7 +2016,7 @@ function handlePromise(promise, _ref2, options) {
2030
2016
  return;
2031
2017
  }
2032
2018
 
2033
- var baseParams = _extends$s({
2019
+ var baseParams = _extends$t({
2034
2020
  type: type
2035
2021
  }, resetParams, options, {
2036
2022
  data: result
@@ -2041,10 +2027,10 @@ function handlePromise(promise, _ref2, options) {
2041
2027
  } : input; // if the id is set we know that it's an update
2042
2028
 
2043
2029
  if (id) {
2044
- toast.update(id, _extends$s({}, baseParams, params));
2030
+ toast.update(id, _extends$t({}, baseParams, params));
2045
2031
  } else {
2046
2032
  // using toast.promise without loading
2047
- toast(params.render, _extends$s({}, baseParams, params));
2033
+ toast(params.render, _extends$t({}, baseParams, params));
2048
2034
  }
2049
2035
 
2050
2036
  return result;
@@ -2068,7 +2054,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
2068
2054
  toast.warn = toast.warning;
2069
2055
 
2070
2056
  toast.dark = function (content, options) {
2071
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$s({
2057
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$t({
2072
2058
  theme: 'dark'
2073
2059
  }, options)));
2074
2060
  };
@@ -2125,7 +2111,7 @@ toast.update = function (toastId, options) {
2125
2111
  var oldOptions = toast.props,
2126
2112
  oldContent = toast.content;
2127
2113
 
2128
- var nextOptions = _extends$s({}, oldOptions, options, {
2114
+ var nextOptions = _extends$t({}, oldOptions, options, {
2129
2115
  toastId: options.toastId || toastId,
2130
2116
  updateId: generateToastId()
2131
2117
  });
@@ -12043,9 +12029,9 @@ var Modal = function (_a) {
12043
12029
  };
12044
12030
 
12045
12031
  var _path$i;
12046
- 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); }
12032
+ function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
12047
12033
  var SvgIcCross = function SvgIcCross(props) {
12048
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
12034
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
12049
12035
  width: "1em",
12050
12036
  height: "1em",
12051
12037
  viewBox: "0 0 24 24",
@@ -16351,9 +16337,9 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
16351
16337
  var Tippy = index;
16352
16338
 
16353
16339
  var _path$h;
16354
- 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); }
16340
+ 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); }
16355
16341
  var SvgIcHelp = function SvgIcHelp(props) {
16356
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
16342
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
16357
16343
  xmlns: "http://www.w3.org/2000/svg",
16358
16344
  width: "1em",
16359
16345
  height: "1em",
@@ -16366,9 +16352,9 @@ var SvgIcHelp = function SvgIcHelp(props) {
16366
16352
  };
16367
16353
 
16368
16354
  var _path$g;
16369
- 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); }
16355
+ 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); }
16370
16356
  var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
16371
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
16357
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
16372
16358
  xmlns: "http://www.w3.org/2000/svg",
16373
16359
  viewBox: "0 0 17 16",
16374
16360
  width: "1em",
@@ -16425,10 +16411,10 @@ function TippyCustomized(props) {
16425
16411
  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 })));
16426
16412
  }
16427
16413
 
16428
- var _path$f, _circle, _path2$1;
16429
- 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); }
16414
+ var _path$f, _circle, _path2$2;
16415
+ 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); }
16430
16416
  var SvgInjectTag = function SvgInjectTag(props) {
16431
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
16417
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
16432
16418
  width: "1em",
16433
16419
  height: "1em",
16434
16420
  viewBox: "0 0 20 20",
@@ -16445,7 +16431,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
16445
16431
  cy: 10,
16446
16432
  r: 1.667,
16447
16433
  fill: "#596168"
16448
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
16434
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
16449
16435
  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",
16450
16436
  stroke: "#596168",
16451
16437
  strokeWidth: 1.5,
@@ -16463,9 +16449,9 @@ function PropagateTagInfo(_a) {
16463
16449
  }
16464
16450
 
16465
16451
  var _path$e;
16466
- 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); }
16452
+ 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); }
16467
16453
  var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
16468
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16454
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
16469
16455
  xmlns: "http://www.w3.org/2000/svg",
16470
16456
  width: "1em",
16471
16457
  height: "1em",
@@ -16705,9 +16691,9 @@ var TagDetails = function (_a) {
16705
16691
  };
16706
16692
 
16707
16693
  var _path$d;
16708
- 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); }
16694
+ 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); }
16709
16695
  var SvgIcAdd = function SvgIcAdd(props) {
16710
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
16696
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
16711
16697
  xmlns: "http://www.w3.org/2000/svg",
16712
16698
  width: "1em",
16713
16699
  height: "1em",
@@ -16842,8 +16828,8 @@ function ForceDeleteDialog(_a) {
16842
16828
  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?" })] }) })) }));
16843
16829
  }
16844
16830
 
16845
- function _extends$l() {
16846
- _extends$l = Object.assign ? Object.assign.bind() : function (target) {
16831
+ function _extends$m() {
16832
+ _extends$m = Object.assign ? Object.assign.bind() : function (target) {
16847
16833
  for (var i = 1; i < arguments.length; i++) {
16848
16834
  var source = arguments[i];
16849
16835
  for (var key in source) {
@@ -16854,7 +16840,7 @@ function _extends$l() {
16854
16840
  }
16855
16841
  return target;
16856
16842
  };
16857
- return _extends$l.apply(this, arguments);
16843
+ return _extends$m.apply(this, arguments);
16858
16844
  }
16859
16845
 
16860
16846
  /*
@@ -20395,7 +20381,7 @@ var Menu = function Menu(props) {
20395
20381
  getStyles = props.getStyles,
20396
20382
  innerRef = props.innerRef,
20397
20383
  innerProps = props.innerProps;
20398
- return jsx("div", _extends$l({
20384
+ return jsx("div", _extends$m({
20399
20385
  css: getStyles('menu', props),
20400
20386
  className: cx({
20401
20387
  menu: true
@@ -20427,7 +20413,7 @@ var MenuList$1 = function MenuList(props) {
20427
20413
  innerProps = props.innerProps,
20428
20414
  innerRef = props.innerRef,
20429
20415
  isMulti = props.isMulti;
20430
- return jsx("div", _extends$l({
20416
+ return jsx("div", _extends$m({
20431
20417
  css: getStyles('menuList', props),
20432
20418
  className: cx({
20433
20419
  'menu-list': true,
@@ -20458,7 +20444,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
20458
20444
  cx = props.cx,
20459
20445
  getStyles = props.getStyles,
20460
20446
  innerProps = props.innerProps;
20461
- return jsx("div", _extends$l({
20447
+ return jsx("div", _extends$m({
20462
20448
  css: getStyles('noOptionsMessage', props),
20463
20449
  className: cx({
20464
20450
  'menu-notice': true,
@@ -20475,7 +20461,7 @@ var LoadingMessage = function LoadingMessage(props) {
20475
20461
  cx = props.cx,
20476
20462
  getStyles = props.getStyles,
20477
20463
  innerProps = props.innerProps;
20478
- return jsx("div", _extends$l({
20464
+ return jsx("div", _extends$m({
20479
20465
  css: getStyles('loadingMessage', props),
20480
20466
  className: cx({
20481
20467
  'menu-notice': true,
@@ -20563,7 +20549,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
20563
20549
  rect: rect
20564
20550
  }; // same wrapper element whether fixed or portalled
20565
20551
 
20566
- var menuWrapper = jsx("div", _extends$l({
20552
+ var menuWrapper = jsx("div", _extends$m({
20567
20553
  css: getStyles('menuPortal', state),
20568
20554
  className: cx({
20569
20555
  'menu-portal': true
@@ -20599,7 +20585,7 @@ var SelectContainer = function SelectContainer(props) {
20599
20585
  innerProps = props.innerProps,
20600
20586
  isDisabled = props.isDisabled,
20601
20587
  isRtl = props.isRtl;
20602
- return jsx("div", _extends$l({
20588
+ return jsx("div", _extends$m({
20603
20589
  css: getStyles('container', props),
20604
20590
  className: cx({
20605
20591
  '--is-disabled': isDisabled,
@@ -20634,7 +20620,7 @@ var ValueContainer = function ValueContainer(props) {
20634
20620
  isMulti = props.isMulti,
20635
20621
  getStyles = props.getStyles,
20636
20622
  hasValue = props.hasValue;
20637
- return jsx("div", _extends$l({
20623
+ return jsx("div", _extends$m({
20638
20624
  css: getStyles('valueContainer', props),
20639
20625
  className: cx({
20640
20626
  'value-container': true,
@@ -20660,7 +20646,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
20660
20646
  cx = props.cx,
20661
20647
  innerProps = props.innerProps,
20662
20648
  getStyles = props.getStyles;
20663
- return jsx("div", _extends$l({
20649
+ return jsx("div", _extends$m({
20664
20650
  css: getStyles('indicatorsContainer', props),
20665
20651
  className: cx({
20666
20652
  indicators: true
@@ -20691,7 +20677,7 @@ var Svg = function Svg(_ref) {
20691
20677
  var size = _ref.size,
20692
20678
  props = _objectWithoutProperties(_ref, _excluded$2);
20693
20679
 
20694
- return jsx("svg", _extends$l({
20680
+ return jsx("svg", _extends$m({
20695
20681
  height: size,
20696
20682
  width: size,
20697
20683
  viewBox: "0 0 20 20",
@@ -20702,14 +20688,14 @@ var Svg = function Svg(_ref) {
20702
20688
  };
20703
20689
 
20704
20690
  var CrossIcon = function CrossIcon(props) {
20705
- return jsx(Svg, _extends$l({
20691
+ return jsx(Svg, _extends$m({
20706
20692
  size: 20
20707
20693
  }, props), jsx("path", {
20708
20694
  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"
20709
20695
  }));
20710
20696
  };
20711
20697
  var DownChevron = function DownChevron(props) {
20712
- return jsx(Svg, _extends$l({
20698
+ return jsx(Svg, _extends$m({
20713
20699
  size: 20
20714
20700
  }, props), jsx("path", {
20715
20701
  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"
@@ -20742,7 +20728,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
20742
20728
  cx = props.cx,
20743
20729
  getStyles = props.getStyles,
20744
20730
  innerProps = props.innerProps;
20745
- return jsx("div", _extends$l({
20731
+ return jsx("div", _extends$m({
20746
20732
  css: getStyles('dropdownIndicator', props),
20747
20733
  className: cx({
20748
20734
  indicator: true,
@@ -20757,7 +20743,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
20757
20743
  cx = props.cx,
20758
20744
  getStyles = props.getStyles,
20759
20745
  innerProps = props.innerProps;
20760
- return jsx("div", _extends$l({
20746
+ return jsx("div", _extends$m({
20761
20747
  css: getStyles('clearIndicator', props),
20762
20748
  className: cx({
20763
20749
  indicator: true,
@@ -20787,7 +20773,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
20787
20773
  cx = props.cx,
20788
20774
  getStyles = props.getStyles,
20789
20775
  innerProps = props.innerProps;
20790
- return jsx("span", _extends$l({}, innerProps, {
20776
+ return jsx("span", _extends$m({}, innerProps, {
20791
20777
  css: getStyles('indicatorSeparator', props),
20792
20778
  className: cx({
20793
20779
  'indicator-separator': true
@@ -20842,7 +20828,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
20842
20828
  getStyles = props.getStyles,
20843
20829
  innerProps = props.innerProps,
20844
20830
  isRtl = props.isRtl;
20845
- return jsx("div", _extends$l({
20831
+ return jsx("div", _extends$m({
20846
20832
  css: getStyles('loadingIndicator', props),
20847
20833
  className: cx({
20848
20834
  indicator: true,
@@ -20903,7 +20889,7 @@ var Control = function Control(props) {
20903
20889
  innerRef = props.innerRef,
20904
20890
  innerProps = props.innerProps,
20905
20891
  menuIsOpen = props.menuIsOpen;
20906
- return jsx("div", _extends$l({
20892
+ return jsx("div", _extends$m({
20907
20893
  ref: innerRef,
20908
20894
  css: getStyles('control', props),
20909
20895
  className: cx({
@@ -20935,12 +20921,12 @@ var Group = function Group(props) {
20935
20921
  label = props.label,
20936
20922
  theme = props.theme,
20937
20923
  selectProps = props.selectProps;
20938
- return jsx("div", _extends$l({
20924
+ return jsx("div", _extends$m({
20939
20925
  css: getStyles('group', props),
20940
20926
  className: cx({
20941
20927
  group: true
20942
20928
  }, className)
20943
- }, innerProps), jsx(Heading, _extends$l({}, headingProps, {
20929
+ }, innerProps), jsx(Heading, _extends$m({}, headingProps, {
20944
20930
  selectProps: selectProps,
20945
20931
  theme: theme,
20946
20932
  getStyles: getStyles,
@@ -20972,7 +20958,7 @@ var GroupHeading = function GroupHeading(props) {
20972
20958
  _cleanCommonProps.data;
20973
20959
  var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
20974
20960
 
20975
- return jsx("div", _extends$l({
20961
+ return jsx("div", _extends$m({
20976
20962
  css: getStyles('groupHeading', props),
20977
20963
  className: cx({
20978
20964
  'group-heading': true
@@ -21048,7 +21034,7 @@ var Input = function Input(props) {
21048
21034
  }, className),
21049
21035
  css: getStyles('input', props),
21050
21036
  "data-value": value || ''
21051
- }, jsx("input", _extends$l({
21037
+ }, jsx("input", _extends$m({
21052
21038
  className: cx({
21053
21039
  input: true
21054
21040
  }, inputClassName),
@@ -21118,7 +21104,7 @@ var MultiValueLabel = MultiValueGeneric;
21118
21104
  function MultiValueRemove$1(_ref5) {
21119
21105
  var children = _ref5.children,
21120
21106
  innerProps = _ref5.innerProps;
21121
- return jsx("div", _extends$l({
21107
+ return jsx("div", _extends$m({
21122
21108
  role: "button"
21123
21109
  }, innerProps), children || jsx(CrossIcon, {
21124
21110
  size: 14
@@ -21207,7 +21193,7 @@ var Option$1 = function Option(props) {
21207
21193
  isSelected = props.isSelected,
21208
21194
  innerRef = props.innerRef,
21209
21195
  innerProps = props.innerProps;
21210
- return jsx("div", _extends$l({
21196
+ return jsx("div", _extends$m({
21211
21197
  css: getStyles('option', props),
21212
21198
  className: cx({
21213
21199
  option: true,
@@ -21239,7 +21225,7 @@ var Placeholder = function Placeholder(props) {
21239
21225
  cx = props.cx,
21240
21226
  getStyles = props.getStyles,
21241
21227
  innerProps = props.innerProps;
21242
- return jsx("div", _extends$l({
21228
+ return jsx("div", _extends$m({
21243
21229
  css: getStyles('placeholder', props),
21244
21230
  className: cx({
21245
21231
  placeholder: true
@@ -21272,7 +21258,7 @@ var SingleValue = function SingleValue(props) {
21272
21258
  getStyles = props.getStyles,
21273
21259
  isDisabled = props.isDisabled,
21274
21260
  innerProps = props.innerProps;
21275
- return jsx("div", _extends$l({
21261
+ return jsx("div", _extends$m({
21276
21262
  css: getStyles('singleValue', props),
21277
21263
  className: cx({
21278
21264
  'single-value': true,
@@ -21520,7 +21506,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
21520
21506
  };
21521
21507
 
21522
21508
  var A11yText = function A11yText(props) {
21523
- return jsx("span", _extends$l({
21509
+ return jsx("span", _extends$m({
21524
21510
  css: _ref
21525
21511
  }, props));
21526
21512
  };
@@ -22056,7 +22042,7 @@ function DummyInput(_ref) {
22056
22042
  var innerRef = _ref.innerRef,
22057
22043
  props = _objectWithoutProperties(_ref, _excluded);
22058
22044
 
22059
- return jsx("input", _extends$l({
22045
+ return jsx("input", _extends$m({
22060
22046
  ref: innerRef
22061
22047
  }, props, {
22062
22048
  css: /*#__PURE__*/css$2({
@@ -23691,7 +23677,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23691
23677
 
23692
23678
  if (!isSearchable) {
23693
23679
  // use a dummy input to maintain focus/blur functionality
23694
- return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$l({
23680
+ return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$m({
23695
23681
  id: id,
23696
23682
  innerRef: this.getInputRef,
23697
23683
  onBlur: this.onInputBlur,
@@ -23705,7 +23691,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23705
23691
  }, ariaAttributes));
23706
23692
  }
23707
23693
 
23708
- return /*#__PURE__*/React__namespace.createElement(Input, _extends$l({}, commonProps, {
23694
+ return /*#__PURE__*/React__namespace.createElement(Input, _extends$m({}, commonProps, {
23709
23695
  autoCapitalize: "none",
23710
23696
  autoComplete: "off",
23711
23697
  autoCorrect: "off",
@@ -23749,7 +23735,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23749
23735
  isFocused = _this$state5.isFocused;
23750
23736
 
23751
23737
  if (!this.hasValue() || !controlShouldRenderValue) {
23752
- return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$l({}, commonProps, {
23738
+ return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$m({}, commonProps, {
23753
23739
  key: "placeholder",
23754
23740
  isDisabled: isDisabled,
23755
23741
  isFocused: isFocused,
@@ -23763,7 +23749,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23763
23749
  return selectValue.map(function (opt, index) {
23764
23750
  var isOptionFocused = opt === focusedValue;
23765
23751
  var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
23766
- return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$l({}, commonProps, {
23752
+ return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$m({}, commonProps, {
23767
23753
  components: {
23768
23754
  Container: MultiValueContainer,
23769
23755
  Label: MultiValueLabel,
@@ -23795,7 +23781,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23795
23781
  }
23796
23782
 
23797
23783
  var singleValue = selectValue[0];
23798
- return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$l({}, commonProps, {
23784
+ return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$m({}, commonProps, {
23799
23785
  data: singleValue,
23800
23786
  isDisabled: isDisabled
23801
23787
  }), this.formatOptionLabel(singleValue, 'value'));
@@ -23821,7 +23807,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23821
23807
  onTouchEnd: this.onClearIndicatorTouchEnd,
23822
23808
  'aria-hidden': 'true'
23823
23809
  };
23824
- return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$l({}, commonProps, {
23810
+ return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$m({}, commonProps, {
23825
23811
  innerProps: innerProps,
23826
23812
  isFocused: isFocused
23827
23813
  }));
@@ -23841,7 +23827,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23841
23827
  var innerProps = {
23842
23828
  'aria-hidden': 'true'
23843
23829
  };
23844
- return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$l({}, commonProps, {
23830
+ return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$m({}, commonProps, {
23845
23831
  innerProps: innerProps,
23846
23832
  isDisabled: isDisabled,
23847
23833
  isFocused: isFocused
@@ -23859,7 +23845,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23859
23845
  var commonProps = this.commonProps;
23860
23846
  var isDisabled = this.props.isDisabled;
23861
23847
  var isFocused = this.state.isFocused;
23862
- return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$l({}, commonProps, {
23848
+ return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$m({}, commonProps, {
23863
23849
  isDisabled: isDisabled,
23864
23850
  isFocused: isFocused
23865
23851
  }));
@@ -23879,7 +23865,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23879
23865
  onTouchEnd: this.onDropdownIndicatorTouchEnd,
23880
23866
  'aria-hidden': 'true'
23881
23867
  };
23882
- return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$l({}, commonProps, {
23868
+ return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$m({}, commonProps, {
23883
23869
  innerProps: innerProps,
23884
23870
  isDisabled: isDisabled,
23885
23871
  isFocused: isFocused
@@ -23942,7 +23928,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23942
23928
  onMouseOver: onHover,
23943
23929
  tabIndex: -1
23944
23930
  };
23945
- return /*#__PURE__*/React__namespace.createElement(Option, _extends$l({}, commonProps, {
23931
+ return /*#__PURE__*/React__namespace.createElement(Option, _extends$m({}, commonProps, {
23946
23932
  innerProps: innerProps,
23947
23933
  data: data,
23948
23934
  isDisabled: isDisabled,
@@ -23966,7 +23952,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
23966
23952
  groupIndex = item.index;
23967
23953
  var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
23968
23954
  var headingId = "".concat(groupId, "-heading");
23969
- return /*#__PURE__*/React__namespace.createElement(Group, _extends$l({}, commonProps, {
23955
+ return /*#__PURE__*/React__namespace.createElement(Group, _extends$m({}, commonProps, {
23970
23956
  key: groupId,
23971
23957
  data: _data,
23972
23958
  options: options,
@@ -24005,12 +23991,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24005
23991
  menuPosition: menuPosition,
24006
23992
  menuShouldScrollIntoView: menuShouldScrollIntoView
24007
23993
  };
24008
- var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$l({}, commonProps, menuPlacementProps), function (_ref4) {
23994
+ var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$m({}, commonProps, menuPlacementProps), function (_ref4) {
24009
23995
  var ref = _ref4.ref,
24010
23996
  _ref4$placerProps = _ref4.placerProps,
24011
23997
  placement = _ref4$placerProps.placement,
24012
23998
  maxHeight = _ref4$placerProps.maxHeight;
24013
- return /*#__PURE__*/React__namespace.createElement(Menu, _extends$l({}, commonProps, menuPlacementProps, {
23999
+ return /*#__PURE__*/React__namespace.createElement(Menu, _extends$m({}, commonProps, menuPlacementProps, {
24014
24000
  innerRef: ref,
24015
24001
  innerProps: {
24016
24002
  onMouseDown: _this4.onMenuMouseDown,
@@ -24025,7 +24011,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24025
24011
  onBottomArrive: onMenuScrollToBottom,
24026
24012
  lockEnabled: menuShouldBlockScroll
24027
24013
  }, function (scrollTargetRef) {
24028
- return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$l({}, commonProps, {
24014
+ return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$m({}, commonProps, {
24029
24015
  innerRef: function innerRef(instance) {
24030
24016
  _this4.getMenuListRef(instance);
24031
24017
 
@@ -24040,7 +24026,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24040
24026
  // so we use the same component. the actual portalling logic is forked
24041
24027
  // within the component based on `menuPosition`
24042
24028
 
24043
- return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$l({}, commonProps, {
24029
+ return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$m({}, commonProps, {
24044
24030
  appendTo: menuPortalTarget,
24045
24031
  controlElement: this.controlRef,
24046
24032
  menuPlacement: menuPlacement,
@@ -24105,7 +24091,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24105
24091
  isFocused = _this$state6.isFocused,
24106
24092
  selectValue = _this$state6.selectValue;
24107
24093
  var focusableOptions = this.getFocusableOptions();
24108
- return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$l({}, commonProps, {
24094
+ return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$m({}, commonProps, {
24109
24095
  id: this.getElementId('live-region'),
24110
24096
  ariaSelection: ariaSelection,
24111
24097
  focusedOption: focusedOption,
@@ -24131,7 +24117,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24131
24117
  menuIsOpen = _this$props14.menuIsOpen;
24132
24118
  var isFocused = this.state.isFocused;
24133
24119
  var commonProps = this.commonProps = this.getCommonProps();
24134
- return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$l({}, commonProps, {
24120
+ return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$m({}, commonProps, {
24135
24121
  className: className,
24136
24122
  innerProps: {
24137
24123
  id: id,
@@ -24139,7 +24125,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24139
24125
  },
24140
24126
  isDisabled: isDisabled,
24141
24127
  isFocused: isFocused
24142
- }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$l({}, commonProps, {
24128
+ }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$m({}, commonProps, {
24143
24129
  innerRef: this.getControlRef,
24144
24130
  innerProps: {
24145
24131
  onMouseDown: this.onControlMouseDown,
@@ -24148,9 +24134,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
24148
24134
  isDisabled: isDisabled,
24149
24135
  isFocused: isFocused,
24150
24136
  menuIsOpen: menuIsOpen
24151
- }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$l({}, commonProps, {
24137
+ }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$m({}, commonProps, {
24152
24138
  isDisabled: isDisabled
24153
- }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$l({}, commonProps, {
24139
+ }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$m({}, commonProps, {
24154
24140
  isDisabled: isDisabled
24155
24141
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
24156
24142
  }
@@ -24223,7 +24209,7 @@ Select$1.defaultProps = defaultProps;
24223
24209
 
24224
24210
  var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24225
24211
  var baseSelectProps = useStateManager(props);
24226
- return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$l({
24212
+ return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$m({
24227
24213
  ref: ref
24228
24214
  }, baseSelectProps));
24229
24215
  });
@@ -24231,9 +24217,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
24231
24217
  var ReactSelect = StateManagedSelect;
24232
24218
 
24233
24219
  var _g$6;
24234
- 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); }
24220
+ 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); }
24235
24221
  var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24236
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
24222
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
24237
24223
  xmlns: "http://www.w3.org/2000/svg",
24238
24224
  viewBox: "0 0 28 28",
24239
24225
  width: "1em",
@@ -24255,9 +24241,9 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
24255
24241
  };
24256
24242
 
24257
24243
  var _path$c;
24258
- 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); }
24244
+ function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
24259
24245
  var SvgIcCheck = function SvgIcCheck(props) {
24260
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
24246
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
24261
24247
  xmlns: "http://www.w3.org/2000/svg",
24262
24248
  width: "1em",
24263
24249
  height: "1em",
@@ -24274,9 +24260,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
24274
24260
  };
24275
24261
 
24276
24262
  var _g$5;
24277
- 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); }
24263
+ 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); }
24278
24264
  var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
24279
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24265
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
24280
24266
  xmlns: "http://www.w3.org/2000/svg",
24281
24267
  width: "1em",
24282
24268
  height: "1em",
@@ -24605,6 +24591,7 @@ Valid States of Checkbox:
24605
24591
  5. disabled: false, checked: true, value: INTERMIDIATE
24606
24592
  6. disabled: false, checked: true, value: CHECKED
24607
24593
  */
24594
+ // TODO: Associate label with input element
24608
24595
  var Checkbox$1 = /** @class */ (function (_super) {
24609
24596
  __extends$1(Checkbox, _super);
24610
24597
  function Checkbox() {
@@ -24619,9 +24606,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
24619
24606
  }(React.Component));
24620
24607
 
24621
24608
  var _g$4;
24622
- 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); }
24609
+ 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); }
24623
24610
  var SvgIcSearch = function SvgIcSearch(props) {
24624
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24611
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
24625
24612
  xmlns: "http://www.w3.org/2000/svg",
24626
24613
  viewBox: "0 0 24 24",
24627
24614
  width: "1em",
@@ -24638,9 +24625,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
24638
24625
  };
24639
24626
 
24640
24627
  var _g$3;
24641
- 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); }
24628
+ 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); }
24642
24629
  var SvgIcErrorCross = function SvgIcErrorCross(props) {
24643
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24630
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
24644
24631
  xmlns: "http://www.w3.org/2000/svg",
24645
24632
  width: "1em",
24646
24633
  height: "1em",
@@ -24662,7 +24649,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
24662
24649
  }))));
24663
24650
  };
24664
24651
 
24665
- 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}";
24652
+ 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}";
24666
24653
  styleInject(css_248z$5);
24667
24654
 
24668
24655
  /**
@@ -24744,61 +24731,6 @@ var SearchBar = function (_a) {
24744
24731
  return (jsxRuntime.jsx("div", __assign({ className: containerClassName }, { children: jsxRuntime.jsxs("div", __assign({ className: "search-bar bc-n50 focus-within-border-b5 dc__hover-border-n300 dc__block w-100 min-w-200 dc__position-rel en-2 bw-1 br-4 h-32" }, { children: [jsxRuntime.jsx(SvgIcSearch, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-16" }), jsxRuntime.jsx("input", __assign({ placeholder: "Search", "data-testid": "search-bar", type: "text" }, inputProps, { defaultValue: initialSearchText, className: "search-bar__input bc-n50 dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ".concat(showClearButton ? 'pr-30' : 'pr-10'), onChange: handleChange, onKeyDown: handleKeyDown, ref: inputRef })), showClearButton && (jsxRuntime.jsx("button", __assign({ className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5", type: "button", onClick: clearSearch, "aria-label": "Clear search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-16 icon-n4 dc__vertical-align-middle" }) })))] })) })));
24745
24732
  };
24746
24733
 
24747
- var _path$b;
24748
- 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); }
24749
- var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
24750
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
24751
- xmlns: "http://www.w3.org/2000/svg",
24752
- width: "1em",
24753
- height: "1em",
24754
- viewBox: "0 0 12 12",
24755
- fill: "none"
24756
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
24757
- d: "M4.125 8.5 6 10.75 7.875 8.5m-3.75-5L6 1.25 7.875 3.5",
24758
- stroke: "#3B444C",
24759
- strokeWidth: 1.5,
24760
- strokeLinecap: "round",
24761
- strokeLinejoin: "round"
24762
- })));
24763
- };
24764
-
24765
- var _path$a;
24766
- 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); }
24767
- var SvgIcSortArrowDown = function SvgIcSortArrowDown(props) {
24768
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
24769
- width: "1em",
24770
- height: "1em",
24771
- viewBox: "0 0 12 12",
24772
- fill: "none",
24773
- xmlns: "http://www.w3.org/2000/svg"
24774
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
24775
- d: "M3.5 7.5 6 10m0 0 2.5-2.5M6 10V2",
24776
- stroke: "#596168",
24777
- strokeWidth: 1.5,
24778
- strokeLinecap: "round",
24779
- strokeLinejoin: "round"
24780
- })));
24781
- };
24782
-
24783
- /**
24784
- * Reusable component for the table header cell with support for sorting icons
24785
- *
24786
- * @example Usage
24787
- * ```tsx
24788
- * <SortableTableHeaderCell
24789
- * isSorted={currentSortedCell === 'cell'}
24790
- * triggerSorting={() => {}}
24791
- * sortOrder={SortingOrder.ASC}
24792
- * title="Header Cell"
24793
- * disabled={isDisabled}
24794
- * />
24795
- * ```
24796
- */
24797
- var SortableTableHeaderCell = function (_a) {
24798
- var isSorted = _a.isSorted, triggerSorting = _a.triggerSorting, sortOrder = _a.sortOrder, title = _a.title, disabled = _a.disabled;
24799
- 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" }))] })));
24800
- };
24801
-
24802
24734
  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}";
24803
24735
  styleInject(css_248z$4);
24804
24736
 
@@ -24935,9 +24867,9 @@ exports.ConsequenceAction = void 0;
24935
24867
  })(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
24936
24868
 
24937
24869
  var _g$2;
24938
- 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); }
24870
+ 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); }
24939
24871
  var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
24940
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
24872
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
24941
24873
  xmlns: "http://www.w3.org/2000/svg",
24942
24874
  width: "1em",
24943
24875
  height: "1em",
@@ -25016,16 +24948,16 @@ function DeleteComponent(_a) {
25016
24948
  return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
25017
24949
  }
25018
24950
 
25019
- var _path$9;
25020
- 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); }
24951
+ var _path$b;
24952
+ 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); }
25021
24953
  var SvgIcPencil = function SvgIcPencil(props) {
25022
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
24954
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
25023
24955
  width: "1em",
25024
24956
  height: "1em",
25025
24957
  viewBox: "0 0 20 20",
25026
24958
  fill: "none",
25027
24959
  xmlns: "http://www.w3.org/2000/svg"
25028
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
24960
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
25029
24961
  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",
25030
24962
  stroke: "#596168",
25031
24963
  strokeWidth: 1.5,
@@ -25034,19 +24966,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
25034
24966
  })));
25035
24967
  };
25036
24968
 
25037
- var _path$8, _path2, _path3;
25038
- 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); }
24969
+ var _path$a, _path2$1, _path3;
24970
+ 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); }
25039
24971
  var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
25040
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
24972
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
25041
24973
  width: "1em",
25042
24974
  height: "1em",
25043
24975
  viewBox: "0 0 12 12",
25044
24976
  fill: "none",
25045
24977
  xmlns: "http://www.w3.org/2000/svg"
25046
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
24978
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
25047
24979
  d: "M3.742 4.674h-2.25v-2.25",
25048
24980
  fill: "#767D84"
25049
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
24981
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
25050
24982
  d: "M3.742 4.674h-2.25v-2.25",
25051
24983
  stroke: "#596168",
25052
24984
  strokeWidth: 1.5,
@@ -25061,15 +24993,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
25061
24993
  })));
25062
24994
  };
25063
24995
 
25064
- var _path$7;
25065
- 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); }
24996
+ var _path$9;
24997
+ 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); }
25066
24998
  var SvgIcMinus = function SvgIcMinus(props) {
25067
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
24999
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
25068
25000
  xmlns: "http://www.w3.org/2000/svg",
25069
25001
  width: "1em",
25070
25002
  height: "1em",
25071
25003
  viewBox: "0 0 14 14"
25072
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
25004
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
25073
25005
  fill: "#959BA1",
25074
25006
  className: "ic-minus_svg__fill-color",
25075
25007
  fillRule: "evenodd",
@@ -25078,9 +25010,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
25078
25010
  };
25079
25011
 
25080
25012
  var _g$1;
25081
- 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); }
25013
+ 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); }
25082
25014
  var SvgIcWarning = function SvgIcWarning(props) {
25083
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25015
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
25084
25016
  xmlns: "http://www.w3.org/2000/svg",
25085
25017
  width: "1em",
25086
25018
  height: "1em",
@@ -25100,9 +25032,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
25100
25032
  };
25101
25033
 
25102
25034
  var _g;
25103
- 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); }
25035
+ 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); }
25104
25036
  var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25105
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
25037
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
25106
25038
  xmlns: "http://www.w3.org/2000/svg",
25107
25039
  width: "1em",
25108
25040
  height: "1em",
@@ -25119,16 +25051,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
25119
25051
  }))));
25120
25052
  };
25121
25053
 
25122
- var _path$6;
25123
- 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); }
25054
+ var _path$8;
25055
+ 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); }
25124
25056
  var SvgIcEnter = function SvgIcEnter(props) {
25125
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
25057
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
25126
25058
  width: "1em",
25127
25059
  height: "1em",
25128
25060
  viewBox: "0 0 16 16",
25129
25061
  fill: "none",
25130
25062
  xmlns: "http://www.w3.org/2000/svg"
25131
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
25063
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
25132
25064
  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",
25133
25065
  fill: "#3B444C"
25134
25066
  })));
@@ -25534,15 +25466,15 @@ function Grid(_a) {
25534
25466
  return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
25535
25467
  }
25536
25468
 
25537
- var _path$5;
25538
- 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); }
25469
+ var _path$7;
25470
+ 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); }
25539
25471
  var SvgIcCopy = function SvgIcCopy(props) {
25540
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
25472
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
25541
25473
  xmlns: "http://www.w3.org/2000/svg",
25542
25474
  width: "1em",
25543
25475
  height: "1em",
25544
25476
  viewBox: "0 0 20 20"
25545
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
25477
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
25546
25478
  fill: "#767D84",
25547
25479
  fillRule: "evenodd",
25548
25480
  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"
@@ -25639,116 +25571,6 @@ var useWindowSize = function () {
25639
25571
  return windowSize;
25640
25572
  };
25641
25573
 
25642
- var DEFAULT_PAGE_NUMBER = 1;
25643
- var URL_FILTER_KEYS = {
25644
- PAGE_SIZE: 'pageSize',
25645
- PAGE_NUMBER: 'pageNumber',
25646
- SEARCH_KEY: 'searchKey',
25647
- SORT_BY: 'sortBy',
25648
- SORT_ORDER: 'sortOrder',
25649
- };
25650
-
25651
- 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;
25652
- /**
25653
- * Generic hook for implementing URL based filters.
25654
- * eg: pagination, search, sort.
25655
- *
25656
- * The exposed handlers can be consumed directly without the need for explicit state management
25657
- *
25658
- * @example Default Usage:
25659
- * ```tsx
25660
- * const { pageSize, changePage, ...rest } = useUrlFilters()
25661
- * ```
25662
- *
25663
- * @example Usage with custom type for sort keys and initial sort key:
25664
- * ```tsx
25665
- * const { sortBy, sortOrder } = useUrlFilters<'email' | 'name'>({ initialSortKey: 'email' })
25666
- * ```
25667
- *
25668
- */
25669
- var useUrlFilters = function (_a) {
25670
- var _b = _a === void 0 ? {} : _a, initialSortKey = _b.initialSortKey;
25671
- var location = reactRouterDom.useLocation();
25672
- var history = reactRouterDom.useHistory();
25673
- var searchParams = new URLSearchParams(location.search);
25674
- var _c = React.useMemo(function () {
25675
- var _pageSize = searchParams.get(PAGE_SIZE);
25676
- var _pageNumber = searchParams.get(PAGE_NUMBER);
25677
- var _searchKey = searchParams.get(SEARCH_KEY);
25678
- var _sortOrder = searchParams.get(SORT_ORDER);
25679
- var _sortBy = searchParams.get(SORT_BY);
25680
- var sortByKey = (_sortBy || initialSortKey || '');
25681
- // Fallback to ascending order
25682
- var sortByOrder = Object.values(exports.SortingOrder).includes(_sortOrder) ? _sortOrder : exports.SortingOrder.ASC;
25683
- return {
25684
- pageSize: Number(_pageSize) || DEFAULT_BASE_PAGE_SIZE,
25685
- pageNumber: Number(_pageNumber) || DEFAULT_PAGE_NUMBER,
25686
- searchKey: _searchKey || '',
25687
- sortBy: sortByKey,
25688
- // sort order should only be applied if the key is available
25689
- sortOrder: (sortByKey ? sortByOrder : ''),
25690
- };
25691
- }, [searchParams]), pageSize = _c.pageSize, pageNumber = _c.pageNumber, searchKey = _c.searchKey, sortBy = _c.sortBy, sortOrder = _c.sortOrder;
25692
- /**
25693
- * Used for getting the required result from the API
25694
- */
25695
- var offset = pageSize * (pageNumber - 1);
25696
- /**
25697
- * Update and replace the search params in the URL.
25698
- *
25699
- * Note: Currently only primitive data types are supported
25700
- */
25701
- var _updateSearchParam = function (key, value) {
25702
- searchParams.set(key, String(value));
25703
- history.replace({ search: searchParams.toString() });
25704
- };
25705
- var _resetPageNumber = function () {
25706
- _updateSearchParam(PAGE_NUMBER, DEFAULT_PAGE_NUMBER);
25707
- };
25708
- var changePage = function (page) {
25709
- _updateSearchParam(PAGE_NUMBER, page);
25710
- };
25711
- var changePageSize = function (_pageSize) {
25712
- _updateSearchParam(PAGE_SIZE, _pageSize);
25713
- _resetPageNumber();
25714
- };
25715
- var handleSearch = function (searchTerm) {
25716
- _updateSearchParam(SEARCH_KEY, searchTerm);
25717
- _resetPageNumber();
25718
- };
25719
- var handleSorting = function (_sortBy) {
25720
- var order;
25721
- if (_sortBy === sortBy && sortOrder === exports.SortingOrder.ASC) {
25722
- order = exports.SortingOrder.DESC;
25723
- }
25724
- else {
25725
- order = exports.SortingOrder.ASC;
25726
- }
25727
- _updateSearchParam(SORT_BY, _sortBy);
25728
- _updateSearchParam(SORT_ORDER, order);
25729
- // Reset page number on sorting change
25730
- _resetPageNumber();
25731
- };
25732
- var clearFilters = function () {
25733
- Object.values(URL_FILTER_KEYS).forEach(function (key) {
25734
- searchParams.delete(key);
25735
- });
25736
- history.replace({ search: searchParams.toString() });
25737
- };
25738
- return {
25739
- pageSize: pageSize,
25740
- changePage: changePage,
25741
- changePageSize: changePageSize,
25742
- searchKey: searchKey,
25743
- handleSearch: handleSearch,
25744
- offset: offset,
25745
- sortBy: sortBy,
25746
- sortOrder: sortOrder,
25747
- handleSorting: handleSorting,
25748
- clearFilters: clearFilters,
25749
- };
25750
- };
25751
-
25752
25574
  var StatusConstants = {
25753
25575
  NOT_DEPLOYED: {
25754
25576
  noSpaceLower: 'notdeployed',
@@ -28432,9 +28254,9 @@ var translateString = function (stringToTranslate, params) {
28432
28254
  return utils.englishStringTranslator(stringToTranslate, params);
28433
28255
  }
28434
28256
  };
28435
- var getCommonSelectStyle = function (styleOverrides) {
28257
+ var getCommonSelectStyle$1 = function (styleOverrides) {
28436
28258
  if (styleOverrides === void 0) { styleOverrides = {}; }
28437
- 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) {
28259
+ 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) {
28438
28260
  return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
28439
28261
  } }, styleOverrides);
28440
28262
  };
@@ -28484,15 +28306,15 @@ var getInferredTypeFromValueType = function (value) {
28484
28306
  }
28485
28307
  };
28486
28308
 
28487
- var _path$4;
28488
- 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); }
28309
+ var _path$6;
28310
+ 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); }
28489
28311
  var SvgIcChevronDown = function SvgIcChevronDown(props) {
28490
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
28312
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
28491
28313
  xmlns: "http://www.w3.org/2000/svg",
28492
28314
  width: "1em",
28493
28315
  height: "1em",
28494
28316
  viewBox: "0 0 24 24"
28495
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
28317
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
28496
28318
  fill: "#999",
28497
28319
  className: "ic-chevron-down_svg__fill-color",
28498
28320
  fillRule: "nonzero",
@@ -28500,7 +28322,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
28500
28322
  })));
28501
28323
  };
28502
28324
 
28503
- var commonStyles = getCommonSelectStyle();
28325
+ var commonStyles = getCommonSelectStyle$1();
28504
28326
  var MenuList = function (_a) {
28505
28327
  var children = _a.children, props = __rest(_a, ["children"]);
28506
28328
  return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
@@ -28552,9 +28374,9 @@ var validator = RJSFValidator.default;
28552
28374
  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 }))); };
28553
28375
 
28554
28376
  var _style, _rect$2;
28555
- 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); }
28377
+ 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); }
28556
28378
  var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
28557
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
28379
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
28558
28380
  width: "1em",
28559
28381
  height: "1em",
28560
28382
  viewBox: "0 0 100 100",
@@ -28689,8 +28511,9 @@ var handleAddCD = function (_a) {
28689
28511
  handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
28690
28512
  };
28691
28513
 
28514
+ // TODO: label association with input
28692
28515
  function CustomInput(_a) {
28693
- var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 1 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo, _r = _a.inputWrapClassName, inputWrapClassName = _r === void 0 ? '' : _r, _s = _a.inputProps, inputProps = _s === void 0 ? {} : _s;
28516
+ var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 0 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo, _r = _a.inputWrapClassName, inputWrapClassName = _r === void 0 ? '' : _r, _s = _a.inputProps, inputProps = _s === void 0 ? {} : _s;
28694
28517
  function handleError(error) {
28695
28518
  if (!Array.isArray(error)) {
28696
28519
  return [error];
@@ -28821,23 +28644,26 @@ function DraggableWrapper(_a) {
28821
28644
  y: data.y,
28822
28645
  });
28823
28646
  }
28824
- return (jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed", style: {
28647
+ return (
28648
+ // 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
28649
+ jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
28825
28650
  zIndex: zIndex,
28826
28651
  } }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
28827
28652
  zIndex: zIndex,
28653
+ pointerEvents: 'auto',
28828
28654
  } }, { children: children })) })) })));
28829
28655
  }
28830
28656
 
28831
- var _path$3;
28832
- 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); }
28657
+ var _path$5;
28658
+ 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); }
28833
28659
  var SvgIcDrag = function SvgIcDrag(props) {
28834
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
28660
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
28835
28661
  width: "1em",
28836
28662
  height: "1em",
28837
28663
  viewBox: "0 0 16 16",
28838
28664
  fill: "none",
28839
28665
  xmlns: "http://www.w3.org/2000/svg"
28840
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
28666
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
28841
28667
  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",
28842
28668
  fill: "#596168"
28843
28669
  })));
@@ -28959,82 +28785,38 @@ var Pagination = function (_a) {
28959
28785
  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 })] })))] })));
28960
28786
  };
28961
28787
 
28962
- /**
28963
- * User Status received from the API
28964
- */
28965
- exports.UserStatusDto = void 0;
28966
- (function (UserStatusDto) {
28967
- UserStatusDto["active"] = "active";
28968
- UserStatusDto["inactive"] = "inactive";
28969
- })(exports.UserStatusDto || (exports.UserStatusDto = {}));
28970
- /**
28971
- * User status for the frontend
28972
- */
28973
- exports.UserStatus = void 0;
28974
- (function (UserStatus) {
28975
- UserStatus["active"] = "active";
28976
- UserStatus["inactive"] = "inactive";
28977
- UserStatus["temporary"] = "temporary";
28978
- })(exports.UserStatus || (exports.UserStatus = {}));
28979
-
28980
- var BulkSelectionDropdownItems = function (_a) {
28981
- var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
28982
- var handleSelect = function () {
28983
- handleBulkSelection({
28984
- action: locator,
28985
- });
28986
- };
28987
- return (jsxRuntime.jsxs("button", __assign({ "data-testid": "bulk-action-".concat(locator), onClick: handleSelect, className: "dc__no-border dc__outline-none-imp w-100 flexbox h-32 dc__align-items-center pt-6 pr-8 pb-6 pl-8 dc__gap-8 ".concat(isSelected ? 'cb-5 bcb-2 fs-13 fw-6 lh-20' : 'dc__no-background cn-9 fs-13 fw-4 lh-20 dc__hover-n50'), type: "button" }, { children: [jsxRuntime.jsx(Icon, { className: "icon-dim-16" }), label] })));
28988
- };
28989
-
28990
- exports.BulkSelectionEvents = void 0;
28991
- (function (BulkSelectionEvents) {
28992
- BulkSelectionEvents["CLEAR_ALL_SELECTIONS"] = "CLEAR_ALL_SELECTIONS";
28993
- BulkSelectionEvents["CLEAR_IDENTIFIERS"] = "CLEAR_IDENTIFIERS";
28994
- BulkSelectionEvents["SELECT_ALL_ACROSS_PAGES"] = "SELECT_ALL_ACROSS_PAGES";
28995
- BulkSelectionEvents["SELECT_ALL_ON_PAGE"] = "SELECT_ALL_ON_PAGE";
28996
- BulkSelectionEvents["SELECT_IDENTIFIER"] = "SELECT_IDENTIFIER";
28997
- BulkSelectionEvents["CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION"] = "CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION";
28998
- BulkSelectionEvents["CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES"] = "CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES";
28999
- })(exports.BulkSelectionEvents || (exports.BulkSelectionEvents = {}));
29000
- exports.SelectAllDialogStatus = void 0;
29001
- (function (SelectAllDialogStatus) {
29002
- SelectAllDialogStatus["OPEN"] = "OPEN";
29003
- SelectAllDialogStatus["CLOSED"] = "CLOSED";
29004
- })(exports.SelectAllDialogStatus || (exports.SelectAllDialogStatus = {}));
29005
-
29006
- var _a;
29007
- var BULK_DROPDOWN_TEST_ID = 'bulk-selection-pop-up-menu';
29008
- var BulkSelectionOptionsLabels = (_a = {},
29009
- _a[exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE] = 'All on this page',
29010
- _a[exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES] = 'All across pages',
29011
- _a[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS] = 'Clear selection',
29012
- _a);
29013
- // Considering application can not be named as *
29014
- var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
29015
- var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
29016
-
29017
- var _rect$1, _path$2;
29018
- 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); }
29019
- var SvgIcCheckSquare = function SvgIcCheckSquare(props) {
29020
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
28788
+ var _path$4, _path2;
28789
+ 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); }
28790
+ var SvgIcCpu = function SvgIcCpu(props) {
28791
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
28792
+ xmlns: "http://www.w3.org/2000/svg",
29021
28793
  width: "1em",
29022
28794
  height: "1em",
29023
- viewBox: "0 0 16 16",
29024
- fill: "none",
29025
- xmlns: "http://www.w3.org/2000/svg"
29026
- }, props), _rect$1 || (_rect$1 = /*#__PURE__*/React__namespace.createElement("rect", {
29027
- x: 2,
29028
- y: 2,
29029
- width: 12,
29030
- height: 12,
29031
- rx: 2,
28795
+ viewBox: "0 0 20 20",
28796
+ fill: "none"
28797
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
28798
+ 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",
29032
28799
  stroke: "#596168",
29033
28800
  strokeWidth: 1.5,
29034
28801
  strokeLinecap: "round",
29035
28802
  strokeLinejoin: "round"
29036
- })), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
29037
- d: "m11.208 5.958-4.083 4.083L5.083 8",
28803
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
28804
+ d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
28805
+ fill: "#596168"
28806
+ })));
28807
+ };
28808
+
28809
+ var _path$3;
28810
+ 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); }
28811
+ var SvgIcMemory = function SvgIcMemory(props) {
28812
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
28813
+ xmlns: "http://www.w3.org/2000/svg",
28814
+ width: "1em",
28815
+ height: "1em",
28816
+ viewBox: "0 0 20 20",
28817
+ fill: "none"
28818
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
28819
+ 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",
29038
28820
  stroke: "#596168",
29039
28821
  strokeWidth: 1.5,
29040
28822
  strokeLinecap: "round",
@@ -29042,7 +28824,585 @@ var SvgIcCheckSquare = function SvgIcCheckSquare(props) {
29042
28824
  })));
29043
28825
  };
29044
28826
 
29045
- var _rect, _path$1;
28827
+ var _path$2;
28828
+ 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); }
28829
+ var SvgIcTimer = function SvgIcTimer(props) {
28830
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
28831
+ xmlns: "http://www.w3.org/2000/svg",
28832
+ width: "1em",
28833
+ height: "1em",
28834
+ viewBox: "0 0 20 20",
28835
+ fill: "none"
28836
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
28837
+ 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",
28838
+ stroke: "#596168",
28839
+ strokeWidth: 1.5,
28840
+ strokeLinecap: "round",
28841
+ strokeLinejoin: "round"
28842
+ })));
28843
+ };
28844
+
28845
+ var _a$2;
28846
+ /**
28847
+ * Unique actions that will be dispatched and,
28848
+ * Keeping some values (cpu_limit, etc) in sync with backend
28849
+ */
28850
+ exports.BuildInfraConfigTypes = void 0;
28851
+ (function (BuildInfraConfigTypes) {
28852
+ BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
28853
+ BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
28854
+ BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
28855
+ BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
28856
+ BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
28857
+ })(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
28858
+ /**
28859
+ * Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
28860
+ */
28861
+ exports.BuildInfraMetaConfigTypes = void 0;
28862
+ (function (BuildInfraMetaConfigTypes) {
28863
+ BuildInfraMetaConfigTypes["NAME"] = "name";
28864
+ BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
28865
+ })(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
28866
+ /**
28867
+ * Would be used as key for few components and would be appending activate and de_activate actions to it
28868
+ */
28869
+ exports.BuildInfraLocators = void 0;
28870
+ (function (BuildInfraLocators) {
28871
+ BuildInfraLocators["CPU"] = "cpu";
28872
+ BuildInfraLocators["MEMORY"] = "memory";
28873
+ // This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
28874
+ BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
28875
+ })(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
28876
+ // FIXME: Derive this from BuildInfraLocators
28877
+ // Appending the locators from above
28878
+ exports.BuildInfraInheritActions = void 0;
28879
+ (function (BuildInfraInheritActions) {
28880
+ BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
28881
+ BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
28882
+ BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
28883
+ BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
28884
+ BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_timeout";
28885
+ BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_timeout";
28886
+ })(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
28887
+ var BuildInfraConfigActionMap = (_a$2 = {},
28888
+ _a$2[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
28889
+ _a$2[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
28890
+ _a$2[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
28891
+ _a$2[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
28892
+ _a$2[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
28893
+ _a$2);
28894
+ exports.BuildInfraProfileVariants = void 0;
28895
+ (function (BuildInfraProfileVariants) {
28896
+ BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
28897
+ BuildInfraProfileVariants["NORMAL"] = "NORMAL";
28898
+ BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
28899
+ })(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
28900
+
28901
+ var _a$1;
28902
+ var BUILD_INFRA_INPUT_CONSTRAINTS = {
28903
+ // Will not enforce any decimal specification on input field
28904
+ STEP: 'any',
28905
+ MIN: 0,
28906
+ DECIMAL_PLACES: 2,
28907
+ };
28908
+ var BUILD_INFRA_TEXT = {
28909
+ HEADING: 'Build Infra Configuration',
28910
+ EDIT_SUBMIT: 'Save changes',
28911
+ SAVE_SUBMIT: 'Save',
28912
+ EDIT_CANCEL: 'Cancel',
28913
+ 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.',
28914
+ DESCRIPTION_LABEL: 'Description',
28915
+ DESCRIPTION_PLACEHOLDER: 'Enter a description here',
28916
+ PROFILE_LABEL: 'Profile name',
28917
+ PROFILE_PLACEHOLDER: 'Eg. java or node',
28918
+ INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
28919
+ SUBMIT_BUTTON_TIPPY: {
28920
+ INVALID_INPUT: 'Valid input is required for all mandatory fields.',
28921
+ REQUEST_IN_PROGRESS: 'Request in progress.',
28922
+ },
28923
+ VALIDATE_REQUEST_LIMIT: {
28924
+ REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
28925
+ CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
28926
+ REQUEST_DECIMAL_PLACES: "Request should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
28927
+ LIMIT_DECIMAL_PLACES: "Limit should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
28928
+ },
28929
+ getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
28930
+ getSubmitSuccessMessage: function (profileName, isEdited) {
28931
+ return "".concat(profileName, " profile is ").concat(isEdited ? 'updated' : 'created');
28932
+ },
28933
+ PROFILE_NOT_FOUND: {
28934
+ title: 'Profile not found',
28935
+ subTitle: 'The profile you are looking for does not exist.',
28936
+ },
28937
+ INVALID_FORM_MESSAGE: 'Valid input is required for all mandatory fields.',
28938
+ };
28939
+ var BUILD_INFRA_BREADCRUMB = {
28940
+ alias: {
28941
+ 'global-config': null,
28942
+ 'build-infra': {
28943
+ component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
28944
+ linked: false,
28945
+ },
28946
+ },
28947
+ };
28948
+ // TODO: move heading to component itself
28949
+ var BUILD_INFRA_FORM_FIELDS = [
28950
+ {
28951
+ heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "CPU (Request - Limit)" })),
28952
+ marker: SvgIcCpu,
28953
+ actions: [
28954
+ {
28955
+ actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
28956
+ label: 'Request',
28957
+ placeholder: 'Type CPU request',
28958
+ },
28959
+ {
28960
+ actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
28961
+ label: 'Limit',
28962
+ placeholder: 'Type CPU limit',
28963
+ },
28964
+ ],
28965
+ locator: exports.BuildInfraLocators.CPU,
28966
+ },
28967
+ {
28968
+ heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Memory (Request - Limit)" })),
28969
+ marker: SvgIcMemory,
28970
+ actions: [
28971
+ {
28972
+ actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
28973
+ label: 'Request',
28974
+ placeholder: 'Type memory request',
28975
+ },
28976
+ {
28977
+ actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
28978
+ label: 'Limit',
28979
+ placeholder: 'Type memory limit',
28980
+ },
28981
+ ],
28982
+ locator: exports.BuildInfraLocators.MEMORY,
28983
+ },
28984
+ {
28985
+ heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Build timeout" })),
28986
+ marker: SvgIcTimer,
28987
+ actions: [
28988
+ {
28989
+ actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
28990
+ label: 'Timeout',
28991
+ placeholder: 'Type build timeout',
28992
+ },
28993
+ ],
28994
+ locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
28995
+ },
28996
+ ];
28997
+ var PROFILE_INPUT_ERROR_FIELDS = Object.fromEntries(Object.values(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (value) { return [value, null]; }));
28998
+ // fields required to be filled before submitting the form in create view, since we pre-populate the form with default values so no need in configs
28999
+ var CREATE_MODE_REQUIRED_INPUT_FIELDS = [exports.BuildInfraMetaConfigTypes.NAME];
29000
+ var DEFAULT_PROFILE_NAME = 'default';
29001
+ var CREATE_PROFILE_BASE_VALUE = {
29002
+ name: '',
29003
+ description: '',
29004
+ type: exports.BuildInfraProfileVariants.NORMAL,
29005
+ appCount: 0,
29006
+ };
29007
+ var CREATE_VIEW_CHECKED_CONFIGS = (_a$1 = {},
29008
+ _a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
29009
+ _a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
29010
+ _a$1);
29011
+ var BUILD_INFRA_TEST_IDS = {
29012
+ SUBMIT_BUTTON: 'build-infra-submit-button',
29013
+ CANCEL_BUTTON: 'build-infra-cancel-button',
29014
+ };
29015
+
29016
+ var Descriptor = function (_a) {
29017
+ var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children, tippyInfoText = _a.tippyInfoText, tippyAdditionalContent = _a.tippyAdditionalContent;
29018
+ return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space dc__align-items-center w-100 ".concat(additionalContainerClasses !== null && additionalContainerClasses !== void 0 ? additionalContainerClasses : '') }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__gap-4" }, { children: [jsxRuntime.jsx(BreadCrumb, { breadcrumbs: breadCrumbs }), jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300 h-100 dc__align-left", placement: "right", Icon: SvgIcHelp, iconClass: "fcv-5", infoText: tippyInfoText !== null && tippyInfoText !== void 0 ? tippyInfoText : BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP, additionalContent: tippyAdditionalContent, heading: BUILD_INFRA_TEXT.HEADING, showCloseButton: true, trigger: "click", interactive: true }, { children: jsxRuntime.jsx("button", __assign({ className: "p-0 h-20 dc__no-background dc__no-border dc__tab-focus", type: "button", "aria-label": "build-infra-info" }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) })) }))] })), children] })));
29019
+ };
29020
+
29021
+ var Footer = function (_a) {
29022
+ var disabled = _a.disabled, handleCancel = _a.handleCancel, editProfile = _a.editProfile, loading = _a.loading;
29023
+ var disableMessage = disabled
29024
+ ? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
29025
+ : BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
29026
+ var getButtonText = function () {
29027
+ if (editProfile) {
29028
+ return BUILD_INFRA_TEXT.EDIT_SUBMIT;
29029
+ }
29030
+ return BUILD_INFRA_TEXT.SAVE_SUBMIT;
29031
+ };
29032
+ var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
29033
+ return (jsxRuntime.jsxs("div", __assign({ className: "flex pl pr pb pt h-64 dc__gap-12 dc__border-top dc__content-start" }, { children: [jsxRuntime.jsx(ConditionalWrap, __assign({ condition: disabled || loading, wrap: renderTippy }, { children: jsxRuntime.jsx("div", __assign({ className: "flexbox dc__align-items-center" }, { children: jsxRuntime.jsx("button", __assign({ type: "submit", className: "cta submit h-32 flex", disabled: disabled || loading, "data-testid": BUILD_INFRA_TEST_IDS.SUBMIT_BUTTON }, { children: loading ? jsxRuntime.jsx(Progressing, { size: 16 }) : getButtonText() })) })) })), handleCancel && (jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel h-32 flex", "data-testid": BUILD_INFRA_TEST_IDS.CANCEL_BUTTON, onClick: handleCancel }, { children: BUILD_INFRA_TEXT.EDIT_CANCEL })))] })));
29034
+ };
29035
+
29036
+ var getBaseProfileObject = function (fromCreateView, profile) {
29037
+ if (fromCreateView) {
29038
+ return CREATE_PROFILE_BASE_VALUE;
29039
+ }
29040
+ return {
29041
+ id: profile.id,
29042
+ name: profile.name,
29043
+ description: profile.description,
29044
+ type: profile.type,
29045
+ appCount: profile.appCount,
29046
+ };
29047
+ };
29048
+ // Would receive a single profile and return transformed response
29049
+ var getTransformedBuildInfraProfileResponse = function (_a) {
29050
+ var _b, _c, _d;
29051
+ var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
29052
+ // Assuming would contain all the keys
29053
+ var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
29054
+ acc[configuration.key] = configuration;
29055
+ return acc;
29056
+ }, {})) !== null && _b !== void 0 ? _b : {};
29057
+ var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
29058
+ acc[configuration.key] = configuration;
29059
+ return acc;
29060
+ }, {})) !== null && _d !== void 0 ? _d : {};
29061
+ var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
29062
+ var _a, _b;
29063
+ var defaultConfiguration = defaultConfigurationsMap[key];
29064
+ var profileConfiguration = ((_a = profileConfigurations[key]) === null || _a === void 0 ? void 0 : _a.profileName) === (profile === null || profile === void 0 ? void 0 : profile.name) ? profileConfigurations[key] : null;
29065
+ // Pushing default value in configurations in case we de-activate the configuration
29066
+ var defaultValue = {
29067
+ value: defaultConfiguration.value,
29068
+ unit: defaultConfiguration.unit,
29069
+ };
29070
+ if (fromCreateView) {
29071
+ acc[key] = {
29072
+ key: key,
29073
+ value: defaultConfiguration.value,
29074
+ unit: defaultConfiguration.unit,
29075
+ active: (_b = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _b !== void 0 ? _b : false,
29076
+ defaultValue: defaultValue,
29077
+ };
29078
+ return acc;
29079
+ }
29080
+ if (profileConfiguration) {
29081
+ acc[key] = __assign(__assign({}, profileConfiguration), { defaultValue: defaultValue });
29082
+ return acc;
29083
+ }
29084
+ // Removing id from it since we do not have a configuration
29085
+ // While generating payload, we will check on the basis of id and active flag.
29086
+ acc[key] = {
29087
+ key: key,
29088
+ value: defaultConfiguration.value,
29089
+ // saving profile name as undefined and this would be a check, if we are deriving from default or not
29090
+ unit: defaultConfiguration.unit,
29091
+ active: false,
29092
+ defaultValue: defaultValue,
29093
+ };
29094
+ return acc;
29095
+ }, {});
29096
+ return {
29097
+ configurationUnits: configurationUnits,
29098
+ profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
29099
+ };
29100
+ };
29101
+ var getBuildInfraProfileByName = function (_a) {
29102
+ var name = _a.name, fromCreateView = _a.fromCreateView;
29103
+ return __awaiter(void 0, void 0, void 0, function () {
29104
+ var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
29105
+ return __generator(this, function (_c) {
29106
+ switch (_c.label) {
29107
+ case 0:
29108
+ _c.trys.push([0, 2, , 3]);
29109
+ return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
29110
+ case 1:
29111
+ response = _c.sent();
29112
+ _b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
29113
+ return [2 /*return*/, getTransformedBuildInfraProfileResponse({
29114
+ configurationUnits: configurationUnits,
29115
+ defaultConfigurations: defaultConfigurations,
29116
+ profile: profile,
29117
+ fromCreateView: fromCreateView,
29118
+ })];
29119
+ case 2:
29120
+ error_1 = _c.sent();
29121
+ showError(error_1);
29122
+ throw error_1;
29123
+ case 3: return [2 /*return*/];
29124
+ }
29125
+ });
29126
+ });
29127
+ };
29128
+ var getBuildInfraProfilePayload = function (profileInput) {
29129
+ var currentConfigurations = profileInput.configurations;
29130
+ var configurationKeys = Object.keys(currentConfigurations);
29131
+ // would only keep the configurations with id or active flag as true
29132
+ var configurations = configurationKeys.reduce(function (acc, key) {
29133
+ var configuration = currentConfigurations[key];
29134
+ if (configuration.id || configuration.active) {
29135
+ acc.push({
29136
+ id: configuration.id,
29137
+ key: key,
29138
+ value: Number(configuration.value),
29139
+ unit: configuration.unit,
29140
+ active: configuration.active,
29141
+ });
29142
+ }
29143
+ return acc;
29144
+ }, []);
29145
+ var payload = {
29146
+ name: profileInput.name,
29147
+ description: profileInput.description,
29148
+ type: profileInput.type,
29149
+ configurations: configurations,
29150
+ };
29151
+ return payload;
29152
+ };
29153
+ var updateBuildInfraProfile = function (_a) {
29154
+ var name = _a.name, profileInput = _a.profileInput;
29155
+ var payload = getBuildInfraProfilePayload(profileInput);
29156
+ return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
29157
+ };
29158
+ var createBuildInfraProfile = function (_a) {
29159
+ var profileInput = _a.profileInput;
29160
+ return __awaiter(void 0, void 0, void 0, function () {
29161
+ var payload;
29162
+ return __generator(this, function (_b) {
29163
+ payload = getBuildInfraProfilePayload(profileInput);
29164
+ return [2 /*return*/, post(ROUTES.INFRA_CONFIG_PROFILE, payload)];
29165
+ });
29166
+ });
29167
+ };
29168
+
29169
+ // eslint-disable-next-line import/prefer-default-export
29170
+ var NOT_FOUND_DEFAULT_TEXT = {
29171
+ title: 'Resource not found',
29172
+ subTitle: 'The resource you are looking for does not exist',
29173
+ };
29174
+
29175
+ var APIResponseHandler = function (_a) {
29176
+ var _b, _c;
29177
+ var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
29178
+ // keeping it above loading since, not expected to send a call if not authorized
29179
+ if (notAuthorized) {
29180
+ return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
29181
+ }
29182
+ if (isLoading) {
29183
+ return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
29184
+ }
29185
+ if (error) {
29186
+ // TODO: Can extend ErrorScreenNotFound
29187
+ if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
29188
+ return (jsxRuntime.jsx(GenericEmptyState, { title: (_b = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.title) !== null && _b !== void 0 ? _b : NOT_FOUND_DEFAULT_TEXT.title, subTitle: (_c = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.subTitle) !== null && _c !== void 0 ? _c : NOT_FOUND_DEFAULT_TEXT.subTitle }));
29189
+ }
29190
+ return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
29191
+ }
29192
+ // Had to add this since while using it is throwing ts error
29193
+ // eslint-disable-next-line react/jsx-no-useless-fragment
29194
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
29195
+ };
29196
+
29197
+ var getCommonSelectStyle = function (styleOverrides) {
29198
+ if (styleOverrides === void 0) { styleOverrides = {}; }
29199
+ 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));
29200
+ };
29201
+ var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
29202
+ if (isSelected) {
29203
+ return 'var(--B100)';
29204
+ }
29205
+ if (isFocused) {
29206
+ return 'var(--N50)';
29207
+ }
29208
+ return 'var(--white)';
29209
+ };
29210
+ var getCustomOptionSelectionStyle = function (styleOverrides) {
29211
+ if (styleOverrides === void 0) { styleOverrides = {}; }
29212
+ 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)); };
29213
+ };
29214
+ var SelectOption = function (props) {
29215
+ var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
29216
+ selectProps.styles.option = getCustomOptionSelectionStyle(style);
29217
+ var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
29218
+ return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
29219
+ };
29220
+
29221
+ var BulkSelectionDropdownItems = function (_a) {
29222
+ var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
29223
+ var handleSelect = function () {
29224
+ handleBulkSelection({
29225
+ action: locator,
29226
+ });
29227
+ };
29228
+ return (jsxRuntime.jsxs("button", __assign({ "data-testid": "bulk-action-".concat(locator), onClick: handleSelect, className: "dc__no-border dc__outline-none-imp w-100 flexbox h-32 dc__align-items-center pt-6 pr-8 pb-6 pl-8 dc__gap-8 ".concat(isSelected ? 'cb-5 bcb-2 fs-13 fw-6 lh-20' : 'dc__no-background cn-9 fs-13 fw-4 lh-20 dc__hover-n50'), type: "button" }, { children: [jsxRuntime.jsx(Icon, { className: "icon-dim-16" }), label] })));
29229
+ };
29230
+
29231
+ exports.BulkSelectionEvents = void 0;
29232
+ (function (BulkSelectionEvents) {
29233
+ BulkSelectionEvents["CLEAR_ALL_SELECTIONS"] = "CLEAR_ALL_SELECTIONS";
29234
+ BulkSelectionEvents["CLEAR_IDENTIFIERS"] = "CLEAR_IDENTIFIERS";
29235
+ BulkSelectionEvents["SELECT_ALL_ACROSS_PAGES"] = "SELECT_ALL_ACROSS_PAGES";
29236
+ BulkSelectionEvents["SELECT_ALL_ON_PAGE"] = "SELECT_ALL_ON_PAGE";
29237
+ BulkSelectionEvents["SELECT_IDENTIFIER"] = "SELECT_IDENTIFIER";
29238
+ BulkSelectionEvents["CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION"] = "CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION";
29239
+ BulkSelectionEvents["CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES"] = "CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES";
29240
+ })(exports.BulkSelectionEvents || (exports.BulkSelectionEvents = {}));
29241
+ exports.SelectAllDialogStatus = void 0;
29242
+ (function (SelectAllDialogStatus) {
29243
+ SelectAllDialogStatus["OPEN"] = "OPEN";
29244
+ SelectAllDialogStatus["CLOSED"] = "CLOSED";
29245
+ })(exports.SelectAllDialogStatus || (exports.SelectAllDialogStatus = {}));
29246
+
29247
+ var _a;
29248
+ var BULK_DROPDOWN_TEST_ID = 'bulk-selection-pop-up-menu';
29249
+ var BulkSelectionOptionsLabels = (_a = {},
29250
+ _a[exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE] = 'All on this page',
29251
+ _a[exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES] = 'All across pages',
29252
+ _a[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS] = 'Clear selection',
29253
+ _a);
29254
+ // Considering application can not be named as *
29255
+ var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
29256
+ var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
29257
+ var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
29258
+
29259
+ // giving type any here since not exporting this context, rather using it through useBulkSelection hook which is typed
29260
+ var BulkSelectionContext = React.createContext({
29261
+ selectedIdentifiers: {},
29262
+ handleBulkSelection: noop$1,
29263
+ isChecked: false,
29264
+ checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
29265
+ });
29266
+ var useBulkSelection = function () {
29267
+ var context = React.useContext(BulkSelectionContext);
29268
+ if (!context) {
29269
+ throw new Error(BULK_SELECTION_CONTEXT_ERROR);
29270
+ }
29271
+ return context;
29272
+ };
29273
+ var BulkSelectionProvider = function (_a) {
29274
+ var children = _a.children, identifiers = _a.identifiers, getSelectAllDialogStatus = _a.getSelectAllDialogStatus;
29275
+ var _b = __read(React.useState({}), 2), selectedIdentifiers = _b[0], setSelectedIdentifiers = _b[1];
29276
+ var setIdentifiersAfterClear = function (newIdentifiers, selectedIds) {
29277
+ var _newIdentifiers = JSON.parse(JSON.stringify(newIdentifiers));
29278
+ selectedIds.forEach(function (id) {
29279
+ delete _newIdentifiers[id];
29280
+ });
29281
+ setSelectedIdentifiers(_newIdentifiers);
29282
+ };
29283
+ var setIdentifiersAfterPageSelection = function (baseObject) {
29284
+ var _selectedIdentifiers = JSON.parse(JSON.stringify(selectedIdentifiers));
29285
+ // removing bulk selection across pages if present
29286
+ if (_selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29287
+ delete _selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
29288
+ }
29289
+ setSelectedIdentifiers(__assign(__assign({}, _selectedIdentifiers), baseObject));
29290
+ };
29291
+ var handleBulkSelection = function (_a) {
29292
+ var _b, _c;
29293
+ var _d, _e;
29294
+ var action = _a.action, data = _a.data;
29295
+ var selectedIds = (_d = data === null || data === void 0 ? void 0 : data.identifierIds) !== null && _d !== void 0 ? _d : [];
29296
+ var identifierObject = (_e = data === null || data === void 0 ? void 0 : data.identifierObject) !== null && _e !== void 0 ? _e : {};
29297
+ switch (action) {
29298
+ case exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS:
29299
+ setSelectedIdentifiers({});
29300
+ break;
29301
+ case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
29302
+ setIdentifiersAfterClear(identifiers, selectedIds);
29303
+ break;
29304
+ }
29305
+ case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS: {
29306
+ setIdentifiersAfterClear(selectedIdentifiers, selectedIds);
29307
+ break;
29308
+ }
29309
+ case exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES: {
29310
+ if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29311
+ return;
29312
+ }
29313
+ var selectedIdentifiersLength = Object.keys(selectedIdentifiers).length;
29314
+ if (selectedIdentifiersLength > 0 && getSelectAllDialogStatus() === exports.SelectAllDialogStatus.OPEN) {
29315
+ return;
29316
+ }
29317
+ setSelectedIdentifiers((_b = {},
29318
+ _b[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
29319
+ _b));
29320
+ break;
29321
+ }
29322
+ case exports.BulkSelectionEvents.CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES:
29323
+ setSelectedIdentifiers((_c = {},
29324
+ _c[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
29325
+ _c));
29326
+ break;
29327
+ case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
29328
+ setIdentifiersAfterPageSelection(identifiers);
29329
+ break;
29330
+ }
29331
+ case exports.BulkSelectionEvents.SELECT_IDENTIFIER: {
29332
+ setIdentifiersAfterPageSelection(identifierObject);
29333
+ break;
29334
+ }
29335
+ default:
29336
+ throw new Error(getInvalidActionMessage(action));
29337
+ }
29338
+ };
29339
+ var getBulkSelectionCheckboxValues = function () {
29340
+ var selectedIdentifiersArray = Object.keys(selectedIdentifiers);
29341
+ if (selectedIdentifiersArray.length === 0) {
29342
+ return {
29343
+ isChecked: false,
29344
+ checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
29345
+ };
29346
+ }
29347
+ // if selectedIdentifiers contains select all across pages locator then it means all are selected
29348
+ if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29349
+ return {
29350
+ isChecked: true,
29351
+ checkboxValue: exports.CHECKBOX_VALUE.BULK_CHECKED,
29352
+ };
29353
+ }
29354
+ // if all the identifiers are selected then CHECKED else intermediate
29355
+ var areAllPresentIdentifiersSelected = selectedIdentifiersArray.every(function (identifierId) { return identifiers[identifierId]; });
29356
+ if (areAllPresentIdentifiersSelected) {
29357
+ return {
29358
+ isChecked: true,
29359
+ checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
29360
+ };
29361
+ }
29362
+ return {
29363
+ isChecked: true,
29364
+ checkboxValue: exports.CHECKBOX_VALUE.INTERMEDIATE,
29365
+ };
29366
+ };
29367
+ var _c = getBulkSelectionCheckboxValues(), isChecked = _c.isChecked, checkboxValue = _c.checkboxValue;
29368
+ var value = React.useMemo(function () { return ({
29369
+ selectedIdentifiers: selectedIdentifiers,
29370
+ handleBulkSelection: handleBulkSelection,
29371
+ isChecked: isChecked,
29372
+ checkboxValue: checkboxValue,
29373
+ }); }, [selectedIdentifiers, handleBulkSelection, isChecked, checkboxValue]);
29374
+ return jsxRuntime.jsx(BulkSelectionContext.Provider, __assign({ value: value }, { children: children }));
29375
+ };
29376
+
29377
+ var _rect$1, _path$1;
29378
+ 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); }
29379
+ var SvgIcCheckSquare = function SvgIcCheckSquare(props) {
29380
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
29381
+ width: "1em",
29382
+ height: "1em",
29383
+ viewBox: "0 0 16 16",
29384
+ fill: "none",
29385
+ xmlns: "http://www.w3.org/2000/svg"
29386
+ }, props), _rect$1 || (_rect$1 = /*#__PURE__*/React__namespace.createElement("rect", {
29387
+ x: 2,
29388
+ y: 2,
29389
+ width: 12,
29390
+ height: 12,
29391
+ rx: 2,
29392
+ stroke: "#596168",
29393
+ strokeWidth: 1.5,
29394
+ strokeLinecap: "round",
29395
+ strokeLinejoin: "round"
29396
+ })), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
29397
+ d: "m11.208 5.958-4.083 4.083L5.083 8",
29398
+ stroke: "#596168",
29399
+ strokeWidth: 1.5,
29400
+ strokeLinecap: "round",
29401
+ strokeLinejoin: "round"
29402
+ })));
29403
+ };
29404
+
29405
+ var _rect, _path;
29046
29406
  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); }
29047
29407
  var SvgIcCheckAll = function SvgIcCheckAll(props) {
29048
29408
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
@@ -29061,7 +29421,7 @@ var SvgIcCheckAll = function SvgIcCheckAll(props) {
29061
29421
  strokeWidth: 1.5,
29062
29422
  strokeLinecap: "round",
29063
29423
  strokeLinejoin: "round"
29064
- })), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
29424
+ })), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
29065
29425
  d: "M15.467 5.866v5.6a4 4 0 0 1-4 4h-5.6M10.35 5.85l-3.5 3.5L5.1 7.6",
29066
29426
  stroke: "#596168",
29067
29427
  strokeWidth: 1.5,
@@ -29070,26 +29430,29 @@ var SvgIcCheckAll = function SvgIcCheckAll(props) {
29070
29430
  })));
29071
29431
  };
29072
29432
 
29073
- var _path;
29433
+ var _defs, _use;
29074
29434
  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); }
29075
29435
  var SvgIcClose = function SvgIcClose(props) {
29076
29436
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
29437
+ xmlns: "http://www.w3.org/2000/svg",
29438
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
29077
29439
  width: "1em",
29078
29440
  height: "1em",
29079
- viewBox: "0 0 10 10",
29080
- fill: "none",
29081
- xmlns: "http://www.w3.org/2000/svg"
29082
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
29083
- d: "M8.333 1.667 1.667 8.334m6.666 0L1.667 1.667",
29084
- stroke: "#596168",
29085
- strokeWidth: 1.5,
29086
- strokeLinecap: "round",
29087
- strokeLinejoin: "round"
29441
+ viewBox: "0 0 24 24"
29442
+ }, props), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("path", {
29443
+ id: "ic-close_svg__a",
29444
+ className: "ic-close_svg__stroke-color",
29445
+ d: "M18.295 5.705a.997.997 0 0 0-1.41 0L12 10.59 7.115 5.705a.997.997 0 1 0-1.41 1.41L10.59 12l-4.885 4.885a.997.997 0 1 0 1.41 1.41L12 13.41l4.885 4.885a.997.997 0 0 0 1.41-1.41L13.41 12l4.885-4.885a.997.997 0 0 0 0-1.41z"
29446
+ }))), _use || (_use = /*#__PURE__*/React__namespace.createElement("use", {
29447
+ fill: "#999",
29448
+ xlinkHref: "#ic-close_svg__a",
29449
+ fillRule: "evenodd"
29088
29450
  })));
29089
29451
  };
29090
29452
 
29091
29453
  var BulkSelection = function (_a) {
29092
- var checkboxValue = _a.checkboxValue, isChecked = _a.isChecked, selectedIdentifiers = _a.selectedIdentifiers, handleBulkSelection = _a.handleBulkSelection, showPagination = _a.showPagination;
29454
+ var showPagination = _a.showPagination;
29455
+ var _b = useBulkSelection(), handleBulkSelection = _b.handleBulkSelection, selectedIdentifiers = _b.selectedIdentifiers, isChecked = _b.isChecked, checkboxValue = _b.checkboxValue;
29093
29456
  var areOptionsSelected = Object.keys(selectedIdentifiers).length > 0;
29094
29457
  var BulkSelectionItems = __spreadArray(__spreadArray([
29095
29458
  {
@@ -29120,87 +29483,560 @@ var BulkSelection = function (_a) {
29120
29483
  return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true }, { children: [jsxRuntime.jsxs(PopupMenu.Button, __assign({ isKebab: true, rootClassName: "h-20 flexbox p-0 dc__no-background dc__no-border dc__outline-none-imp", dataTestId: BULK_DROPDOWN_TEST_ID }, { children: [jsxRuntime.jsx(Checkbox$1, { isChecked: isChecked, onChange: noop$1, rootClassName: "icon-dim-20", value: checkboxValue }), jsxRuntime.jsx(SvgIcChevronDown, { className: "icon-dim-20 icon-n6" })] })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "dc__top-22 w-150 dc__right-0 pt-4 pb-4 pl-0 pr-0 bcn-0 flex column dc__content-start dc__align-start dc__position-abs bcn-0 dc__border dc__border-radius-4-imp" }, { children: BulkSelectionItems.map(function (item) { return (jsxRuntime.jsx(BulkSelectionDropdownItems, { locator: item.locator, label: item.label, isSelected: item.isSelected, icon: item.icon, handleBulkSelection: handleBulkSelection }, item.locator)); }) }))] })));
29121
29484
  };
29122
29485
 
29123
- var useBulkSelection = function (_a) {
29124
- var identifiers = _a.identifiers, getSelectAllDialogStatus = _a.getSelectAllDialogStatus;
29125
- var _b = __read(React.useState({}), 2), selectedIdentifiers = _b[0], setSelectedIdentifiers = _b[1];
29126
- var setIdentifiersAfterClear = function (newIdentifiers, selectedIds) {
29127
- var _newIdentifiers = JSON.parse(JSON.stringify(newIdentifiers));
29128
- selectedIds.forEach(function (id) {
29129
- delete _newIdentifiers[id];
29130
- });
29131
- setSelectedIdentifiers(_newIdentifiers);
29486
+ var MESSAGES = {
29487
+ PROVIDE_A_NUMBER: 'Please provide a number',
29488
+ LOWERCASE_ALPHANUMERIC: 'Only lowercase alphanumeric characters, -, _ or . allowed',
29489
+ CAN_NOT_START_END_WITH_SEPARATORS: 'Cannot start/end with -, _ or .',
29490
+ getMinMaxCharMessage: function (min, max) { return "Minimum ".concat(min, " and maximum ").concat(max, " characters allowed"); },
29491
+ getMaxCharMessage: function (max) { return "Maximum ".concat(max, " characters are allowed"); },
29492
+ VALID_POSITIVE_NUMBER: 'This field should be a valid positive number',
29493
+ VALID_POSITIVE_INTEGER: 'This field should be a valid positive integer',
29494
+ MAX_SAFE_INTEGER: "Maximum allowed value is ".concat(Number.MAX_SAFE_INTEGER),
29495
+ };
29496
+ var MAX_DESCRIPTION_LENGTH = 300;
29497
+ var validateName = function (name) {
29498
+ if (!/^.{3,50}$/.test(name)) {
29499
+ return {
29500
+ isValid: false,
29501
+ message: MESSAGES.getMinMaxCharMessage(3, 50),
29502
+ };
29503
+ }
29504
+ if (!/^[a-z0-9-._]+$/.test(name)) {
29505
+ return {
29506
+ isValid: false,
29507
+ message: MESSAGES.LOWERCASE_ALPHANUMERIC,
29508
+ };
29509
+ }
29510
+ if (!/^(?![-._]).*[^-._]$/.test(name)) {
29511
+ return {
29512
+ isValid: false,
29513
+ message: MESSAGES.CAN_NOT_START_END_WITH_SEPARATORS,
29514
+ };
29515
+ }
29516
+ return {
29517
+ isValid: true,
29132
29518
  };
29133
- var setIdentifiersAfterPageSelection = function (baseObject) {
29134
- var _selectedIdentifiers = JSON.parse(JSON.stringify(selectedIdentifiers));
29135
- // removing bulk selection across pages if present
29136
- if (_selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29137
- delete _selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
29138
- }
29139
- setSelectedIdentifiers(__assign(__assign({}, _selectedIdentifiers), baseObject));
29519
+ };
29520
+ var validateDescription = function (description) {
29521
+ if ((description === null || description === void 0 ? void 0 : description.length) > MAX_DESCRIPTION_LENGTH) {
29522
+ return {
29523
+ isValid: false,
29524
+ message: MESSAGES.getMaxCharMessage(MAX_DESCRIPTION_LENGTH),
29525
+ };
29526
+ }
29527
+ return {
29528
+ isValid: true,
29140
29529
  };
29141
- var handleBulkSelection = function (_a) {
29142
- var _b, _c;
29143
- var _d, _e;
29530
+ };
29531
+ var validateRequiredPositiveNumber = function (value) {
29532
+ if (!value) {
29533
+ return {
29534
+ isValid: false,
29535
+ message: MESSAGES.PROVIDE_A_NUMBER,
29536
+ };
29537
+ }
29538
+ // TODO: Look if regex is available for this, since 0002 is not a valid number
29539
+ if (!/^\d+(\.\d+)?$/.test(value.toString())) {
29540
+ return {
29541
+ isValid: false,
29542
+ message: MESSAGES.VALID_POSITIVE_NUMBER,
29543
+ };
29544
+ }
29545
+ var numericValue = Number(value);
29546
+ if (numericValue > Number.MAX_SAFE_INTEGER) {
29547
+ return {
29548
+ isValid: false,
29549
+ message: MESSAGES.MAX_SAFE_INTEGER,
29550
+ };
29551
+ }
29552
+ if (numericValue <= 0) {
29553
+ return {
29554
+ isValid: false,
29555
+ message: MESSAGES.VALID_POSITIVE_NUMBER,
29556
+ };
29557
+ }
29558
+ return {
29559
+ isValid: true,
29560
+ };
29561
+ };
29562
+ var validateRequiredPositiveInteger = function (value) {
29563
+ if (!value) {
29564
+ return {
29565
+ isValid: false,
29566
+ message: MESSAGES.PROVIDE_A_NUMBER,
29567
+ };
29568
+ }
29569
+ if (!/^\d+$/.test(value.toString())) {
29570
+ return {
29571
+ isValid: false,
29572
+ message: MESSAGES.VALID_POSITIVE_INTEGER,
29573
+ };
29574
+ }
29575
+ var numericValue = Number(value);
29576
+ if (numericValue > Number.MAX_SAFE_INTEGER) {
29577
+ return {
29578
+ isValid: false,
29579
+ message: MESSAGES.MAX_SAFE_INTEGER,
29580
+ };
29581
+ }
29582
+ if (numericValue <= 0) {
29583
+ return {
29584
+ isValid: false,
29585
+ message: MESSAGES.VALID_POSITIVE_INTEGER,
29586
+ };
29587
+ }
29588
+ return {
29589
+ isValid: true,
29590
+ };
29591
+ };
29592
+
29593
+ // Disabling default export since this is a helper function and we would have to export a lot of functions in future.
29594
+ // eslint-disable-next-line import/prefer-default-export
29595
+ var highlightSearchText = function (_a) {
29596
+ var searchText = _a.searchText, text = _a.text, highlightClasses = _a.highlightClasses;
29597
+ if (!searchText) {
29598
+ return text;
29599
+ }
29600
+ try {
29601
+ var regex = new RegExp(searchText, 'gi');
29602
+ return text.replace(regex, function (match) { return "<span class=\"".concat(highlightClasses, "\">").concat(match, "</span>"); });
29603
+ }
29604
+ catch (error) {
29605
+ return text;
29606
+ }
29607
+ };
29608
+
29609
+ var validateRequestLimit = function (_a) {
29610
+ var _b, _c, _d, _e, _f, _g;
29611
+ var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
29612
+ // Request <= Limit
29613
+ // Request and Limit should be numbers can be decimals
29614
+ // Request and Limit should be positive numbers
29615
+ // Request and Limit should be less than Number.MAX_SAFE_INTEGER
29616
+ // Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
29617
+ // Both request and limit should be there
29618
+ var requestNumber = Number(request.value);
29619
+ var limitNumber = Number(limit.value);
29620
+ var requestUnit = Number((_b = unitsMap[request.unit]) === null || _b === void 0 ? void 0 : _b.conversionFactor);
29621
+ var limitUnit = Number((_c = unitsMap[limit.unit]) === null || _c === void 0 ? void 0 : _c.conversionFactor);
29622
+ var requestLimitValidationResponse = {
29623
+ request: {
29624
+ isValid: true,
29625
+ },
29626
+ limit: {
29627
+ isValid: true,
29628
+ },
29629
+ };
29630
+ var requestValidationMessage = validateRequiredPositiveNumber(request.value).message;
29631
+ var limitValidationMessage = validateRequiredPositiveNumber(limit.value).message;
29632
+ if (requestValidationMessage) {
29633
+ requestLimitValidationResponse.request = {
29634
+ message: requestValidationMessage,
29635
+ isValid: false,
29636
+ };
29637
+ }
29638
+ if (limitValidationMessage) {
29639
+ requestLimitValidationResponse.limit = {
29640
+ message: limitValidationMessage,
29641
+ isValid: false,
29642
+ };
29643
+ }
29644
+ if (limitValidationMessage || requestValidationMessage) {
29645
+ return requestLimitValidationResponse;
29646
+ }
29647
+ // only two decimal places are allowed
29648
+ var requestDecimalPlaces = (_e = (_d = String(request.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
29649
+ var limitDecimalPlaces = (_g = (_f = String(limit.value).split('.')[1]) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0;
29650
+ if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29651
+ requestLimitValidationResponse.request = {
29652
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
29653
+ isValid: false,
29654
+ };
29655
+ return requestLimitValidationResponse;
29656
+ }
29657
+ if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
29658
+ requestLimitValidationResponse.limit = {
29659
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
29660
+ isValid: false,
29661
+ };
29662
+ return requestLimitValidationResponse;
29663
+ }
29664
+ // Assuming requestUnit and requestNumber are not 0
29665
+ // TODO: Communicate this assumption to the backend
29666
+ var limitRequestUnitFactor = limitUnit / requestUnit;
29667
+ var limitRequestFactor = limitNumber / requestNumber;
29668
+ var isDifferenceBigNumber = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
29669
+ if (!isDifferenceBigNumber) {
29670
+ requestLimitValidationResponse.request = {
29671
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
29672
+ isValid: false,
29673
+ };
29674
+ return requestLimitValidationResponse;
29675
+ }
29676
+ if (limitRequestUnitFactor * limitRequestFactor < 1) {
29677
+ requestLimitValidationResponse.request = {
29678
+ message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
29679
+ isValid: false,
29680
+ };
29681
+ return requestLimitValidationResponse;
29682
+ }
29683
+ return requestLimitValidationResponse;
29684
+ };
29685
+ var getInitialProfileInputErrors = function (fromCreateView) {
29686
+ if (fromCreateView) {
29687
+ var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29688
+ CREATE_MODE_REQUIRED_INPUT_FIELDS.forEach(function (field) {
29689
+ initialProfileInputErrors_1[field] = '';
29690
+ });
29691
+ return initialProfileInputErrors_1;
29692
+ }
29693
+ return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
29694
+ };
29695
+ var useBuildInfraForm = function (_a) {
29696
+ var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
29697
+ var fromCreateView = !name;
29698
+ var _b = __read(useAsync(function () {
29699
+ return getBuildInfraProfileByName({
29700
+ name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
29701
+ fromCreateView: fromCreateView,
29702
+ });
29703
+ }, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
29704
+ // If configuration is existing and is active then use it else use default from profileResponse
29705
+ var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
29706
+ var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
29707
+ var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
29708
+ React.useEffect(function () {
29709
+ if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
29710
+ setProfileInput(__assign({}, profileResponse.profile));
29711
+ setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
29712
+ }
29713
+ }, [profileResponse, isLoading]);
29714
+ // NOTE: Currently sending and receiving values as string, but will parse it to number for payload
29715
+ var handleProfileInputChange = function (_a) {
29144
29716
  var action = _a.action, data = _a.data;
29145
- var selectedIds = (_d = data === null || data === void 0 ? void 0 : data.identifierIds) !== null && _d !== void 0 ? _d : [];
29146
- var identifierObject = (_e = data === null || data === void 0 ? void 0 : data.identifierObject) !== null && _e !== void 0 ? _e : {};
29717
+ var currentInput = __assign({}, profileInput);
29718
+ var currentInputErrors = __assign({}, profileInputErrors);
29719
+ var lastSavedConfiguration = profileResponse.profile.configurations;
29720
+ var currentConfiguration = currentInput.configurations;
29721
+ var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
29147
29722
  switch (action) {
29148
- case exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS:
29149
- setSelectedIdentifiers({});
29723
+ case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
29724
+ currentInput.description = value;
29725
+ currentInputErrors.description = validateDescription(value).message;
29150
29726
  break;
29151
- case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
29152
- setIdentifiersAfterClear(identifiers, selectedIds);
29727
+ case exports.BuildInfraMetaConfigTypes.NAME:
29728
+ currentInput.name = value;
29729
+ currentInputErrors.name = validateName(value).message;
29153
29730
  break;
29154
- }
29155
- case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS: {
29156
- setIdentifiersAfterClear(selectedIdentifiers, selectedIds);
29731
+ case exports.BuildInfraConfigTypes.CPU_LIMIT: {
29732
+ currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
29733
+ var _c = validateRequestLimit({
29734
+ request: {
29735
+ value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
29736
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
29737
+ },
29738
+ limit: {
29739
+ value: value,
29740
+ unit: unit,
29741
+ },
29742
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
29743
+ }), request = _c.request, limit = _c.limit;
29744
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
29745
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
29157
29746
  break;
29158
29747
  }
29159
- case exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES: {
29160
- if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
29161
- return;
29162
- }
29163
- var selectedIdentifiersLength = Object.keys(selectedIdentifiers).length;
29164
- if (selectedIdentifiersLength > 0 && getSelectAllDialogStatus() === exports.SelectAllDialogStatus.OPEN) {
29165
- return;
29166
- }
29167
- setSelectedIdentifiers((_b = {},
29168
- _b[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
29169
- _b));
29748
+ case exports.BuildInfraConfigTypes.CPU_REQUEST: {
29749
+ currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
29750
+ var _d = validateRequestLimit({
29751
+ request: {
29752
+ value: value,
29753
+ unit: unit,
29754
+ },
29755
+ limit: {
29756
+ value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
29757
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
29758
+ },
29759
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
29760
+ }), request = _d.request, limit = _d.limit;
29761
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
29762
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
29170
29763
  break;
29171
29764
  }
29172
- case exports.BulkSelectionEvents.CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES:
29173
- setSelectedIdentifiers((_c = {},
29174
- _c[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
29175
- _c));
29765
+ case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
29766
+ currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
29767
+ var _e = validateRequestLimit({
29768
+ request: {
29769
+ value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
29770
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
29771
+ },
29772
+ limit: {
29773
+ value: value,
29774
+ unit: unit,
29775
+ },
29776
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
29777
+ }), request = _e.request, limit = _e.limit;
29778
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
29779
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
29176
29780
  break;
29177
- case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
29178
- setIdentifiersAfterPageSelection(identifiers);
29781
+ }
29782
+ case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
29783
+ currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
29784
+ var _f = validateRequestLimit({
29785
+ request: {
29786
+ value: value,
29787
+ unit: unit,
29788
+ },
29789
+ limit: {
29790
+ value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
29791
+ unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
29792
+ },
29793
+ unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
29794
+ }), request = _f.request, limit = _f.limit;
29795
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
29796
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
29179
29797
  break;
29180
29798
  }
29181
- case exports.BulkSelectionEvents.SELECT_IDENTIFIER: {
29182
- setIdentifiersAfterPageSelection(identifierObject);
29799
+ case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
29800
+ currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
29801
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveInteger(value).message;
29183
29802
  break;
29184
29803
  }
29804
+ case exports.BuildInfraInheritActions.ACTIVATE_CPU:
29805
+ 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 });
29806
+ 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 });
29807
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
29808
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
29809
+ break;
29810
+ case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
29811
+ 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 });
29812
+ 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 });
29813
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
29814
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
29815
+ break;
29816
+ case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
29817
+ 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 });
29818
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
29819
+ break;
29820
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
29821
+ // Reverting the value and unit to defaultValues
29822
+ 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 });
29823
+ currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
29824
+ break;
29825
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
29826
+ 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 });
29827
+ 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 });
29828
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
29829
+ currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
29830
+ break;
29831
+ case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
29832
+ 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 });
29833
+ 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 });
29834
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
29835
+ currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
29836
+ break;
29185
29837
  default:
29186
- throw new Error(getInvalidActionMessage(action));
29838
+ throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
29187
29839
  }
29840
+ setProfileInput(currentInput);
29841
+ setProfileInputErrors(currentInputErrors);
29188
29842
  };
29843
+ var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
29844
+ var hasErrors, err_1;
29845
+ return __generator(this, function (_a) {
29846
+ switch (_a.label) {
29847
+ case 0:
29848
+ e.preventDefault();
29849
+ hasErrors = Object.keys(profileInputErrors).filter(function (item) { return profileInputErrors[item] !== null && profileInputErrors[item] !== undefined; }).length > 0;
29850
+ if (hasErrors) {
29851
+ toast.error(BUILD_INFRA_TEXT.INVALID_FORM_MESSAGE);
29852
+ return [2 /*return*/];
29853
+ }
29854
+ setLoadingActionRequest(true);
29855
+ _a.label = 1;
29856
+ case 1:
29857
+ _a.trys.push([1, 6, , 7]);
29858
+ if (!editProfile) return [3 /*break*/, 3];
29859
+ return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
29860
+ case 2:
29861
+ _a.sent();
29862
+ return [3 /*break*/, 5];
29863
+ case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
29864
+ case 4:
29865
+ _a.sent();
29866
+ _a.label = 5;
29867
+ case 5:
29868
+ setLoadingActionRequest(false);
29869
+ toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
29870
+ if (handleSuccessRedirection) {
29871
+ handleSuccessRedirection();
29872
+ }
29873
+ else {
29874
+ reloadRequest();
29875
+ }
29876
+ return [3 /*break*/, 7];
29877
+ case 6:
29878
+ err_1 = _a.sent();
29879
+ showError(err_1);
29880
+ setLoadingActionRequest(false);
29881
+ return [3 /*break*/, 7];
29882
+ case 7: return [2 /*return*/];
29883
+ }
29884
+ });
29885
+ }); };
29189
29886
  return {
29190
- handleBulkSelection: handleBulkSelection,
29191
- selectedIdentifiers: selectedIdentifiers,
29887
+ isLoading: isLoading,
29888
+ profileResponse: profileResponse,
29889
+ responseError: responseError,
29890
+ reloadRequest: reloadRequest,
29891
+ profileInput: profileInput,
29892
+ profileInputErrors: profileInputErrors,
29893
+ handleProfileInputChange: handleProfileInputChange,
29894
+ loadingActionRequest: loadingActionRequest,
29895
+ handleSubmit: handleSubmit,
29192
29896
  };
29897
+ };
29898
+ var getOptionBackgroundColor = function (isFocused, isSelected) {
29899
+ if (isSelected) {
29900
+ return 'var(--B100)';
29901
+ }
29902
+ if (isFocused) {
29903
+ return 'var(--N50)';
29904
+ }
29905
+ return 'var(--white)';
29906
+ };
29907
+ var unitSelectorStyles = function () {
29908
+ return getCommonSelectStyle({
29909
+ control: function (base, state) { return (__assign(__assign({}, base), { borderRadius: 0, backgroundColor: 'var(--N0)', border: state.isFocused ? '1px solid var(--B500) !important' : '1px solid var(--N200)', alignItems: 'center', cursor: 'pointer', borderTopRightRadius: '4px', borderBottomRightRadius: '4px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', outline: 'none', boxShadow: 'none', '&:hover': {
29910
+ border: '1px solid var(--N400)',
29911
+ } })); },
29912
+ indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
29913
+ dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
29914
+ 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' })); },
29915
+ valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
29916
+ menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
29917
+ });
29918
+ };
29919
+
29920
+ /**
29921
+ * In case need arise for variants break this CustomInput and Select as a separate component
29922
+ */
29923
+ var BuildInfraFormAction = function (_a) {
29924
+ 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;
29925
+ var handleUnitChange = function (selectedUnit) {
29926
+ var data = {
29927
+ unit: selectedUnit.label,
29928
+ value: currentValue,
29929
+ };
29930
+ handleProfileInputChange({ action: actionType, data: data });
29931
+ };
29932
+ var handleInputChange = function (e) {
29933
+ var data = {
29934
+ unit: currentUnitName,
29935
+ value: e.currentTarget.value,
29936
+ };
29937
+ handleProfileInputChange({ action: actionType, data: data });
29938
+ };
29939
+ var unitOptions = React.useMemo(function () {
29940
+ var _a, _b;
29941
+ var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
29942
+ label: unit.name,
29943
+ value: String(unit.conversionFactor),
29944
+ }); })) !== null && _b !== void 0 ? _b : [];
29945
+ return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
29946
+ }, [profileUnitsMap]);
29947
+ var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
29948
+ return (jsxRuntime.jsxs("div", __assign({ className: "flexbox-col dc__gap-4 dc__mxw-420 w-100 dc__align-start" }, { children: [jsxRuntime.jsx("label", __assign({ htmlFor: "".concat(actionType, "-input"), className: "fs-13 fw-4 lh-20 cn-7 ".concat(isRequired ? 'dc__required-field' : '') }, { children: label })), jsxRuntime.jsxs("div", __assign({ className: "w-100 flexbox dc__align-items-center" }, { children: [jsxRuntime.jsx("div", __assign({ className: "flex-grow-1" }, { children: jsxRuntime.jsx("input", { "data-testid": "".concat(actionType, "-input-field"), name: actionType, type: "number", step: BUILD_INFRA_INPUT_CONSTRAINTS.STEP, min: BUILD_INFRA_INPUT_CONSTRAINTS.MIN, className: "form__input dc__no-right-border dc__no-right-radius", placeholder: placeholder, value: currentValue, onChange: handleInputChange, required: isRequired, autoComplete: "off", id: "".concat(actionType, "-input") }) })), profileUnitsMap && (jsxRuntime.jsx(ReactSelect, { name: "".concat(actionType, "-unit"), className: "bcn-0 dc__mxw-120", options: unitOptions, value: currentUnit, onChange: handleUnitChange, isSearchable: false, components: {
29949
+ IndicatorSeparator: null,
29950
+ ClearIndicator: null,
29951
+ }, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
29952
+ };
29953
+
29954
+ var BuildInfraFormItem = function (_a) {
29955
+ 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;
29956
+ var handleActivationChange = function (e) {
29957
+ var checked = e.currentTarget.checked;
29958
+ var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
29959
+ handleProfileInputChange({ action: action });
29960
+ };
29961
+ var renderMarker = function () {
29962
+ if (isDefaultProfile) {
29963
+ return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
29964
+ }
29965
+ return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
29966
+ };
29967
+ // If in configuration active is false, means it is inheriting values from other profile
29968
+ 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" })] }));
29969
+ };
29970
+
29971
+ var BuildInfraProfileDescriptionField = function (_a) {
29972
+ var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
29973
+ var handleChange = function (e) {
29974
+ handleProfileInputChange({
29975
+ action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
29976
+ data: { value: e.currentTarget.value },
29977
+ });
29978
+ };
29979
+ 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] })))] })));
29980
+ };
29981
+
29982
+ var BuildInfraProfileNameField = function (_a) {
29983
+ var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
29984
+ var handleChange = function (e) {
29985
+ handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
29986
+ };
29987
+ 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" }) })));
29988
+ };
29989
+
29990
+ var InheritingHeader = function (_a) {
29991
+ var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
29992
+ var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
29993
+ if (isDefaultProfile || !isInheriting) {
29994
+ // For typing issues
29995
+ // eslint-disable-next-line react/jsx-no-useless-fragment
29996
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
29997
+ }
29998
+ return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__content-space w-100" }, { children: [defaultHeading, jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space w-100" }, { children: [jsxRuntime.jsx("span", __assign({ className: "m-0 pt-0 pb-0 pl-4 pr-4 fs-13 lh-20 fw-4 cn-9 dc__ellipsis-right dc__word-break-all flex-grow-1" }, { children: inheritingDataString })), jsxRuntime.jsx("p", __assign({ className: "m-0 cn-7 fs-13 fw-4 lh-20 dc__no-shrink" }, { children: BUILD_INFRA_TEXT.INHERITING_HEADING_DESCRIPTION }))] }))] })));
29999
+ };
30000
+ var BuildInfraConfigForm = function (_a) {
30001
+ var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
30002
+ var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
30003
+ // will get the desired configuration from the currentConfigurations and then check if it is active or not
30004
+ var isInheritingProfileValues = function (actions) {
30005
+ return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
30006
+ };
30007
+ // Had to show loader for an instance due to batching of state updates not working as expected :/
30008
+ if (!currentConfigurations) {
30009
+ return jsxRuntime.jsx(Progressing, { pageLoader: true });
30010
+ }
30011
+ 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],
30012
+ // Assumption is for default profiles all input fields are required
30013
+ isRequired: true, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
29193
30014
  };
29194
30015
 
30016
+ exports.APIResponseHandler = APIResponseHandler;
29195
30017
  exports.AddCDButton = AddCDButton;
29196
30018
  exports.AppStatus = AppStatus;
30019
+ exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
30020
+ exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
30021
+ exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
30022
+ exports.BUILD_INFRA_TEST_IDS = BUILD_INFRA_TEST_IDS;
30023
+ exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
29197
30024
  exports.BULK_DROPDOWN_TEST_ID = BULK_DROPDOWN_TEST_ID;
30025
+ exports.BULK_SELECTION_CONTEXT_ERROR = BULK_SELECTION_CONTEXT_ERROR;
29198
30026
  exports.BreadCrumb = BreadCrumb;
29199
30027
  exports.BreadcrumbStore = Store;
30028
+ exports.BuildInfraConfigActionMap = BuildInfraConfigActionMap;
30029
+ exports.BuildInfraConfigForm = BuildInfraConfigForm;
30030
+ exports.BuildInfraDescriptor = Descriptor;
30031
+ exports.BuildInfraFooter = Footer;
29200
30032
  exports.BuildStageVariable = BuildStageVariable;
29201
30033
  exports.BulkSelection = BulkSelection;
29202
30034
  exports.BulkSelectionOptionsLabels = BulkSelectionOptionsLabels;
30035
+ exports.BulkSelectionProvider = BulkSelectionProvider;
29203
30036
  exports.CDModalTab = CDModalTab;
30037
+ exports.CREATE_MODE_REQUIRED_INPUT_FIELDS = CREATE_MODE_REQUIRED_INPUT_FIELDS;
30038
+ exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
30039
+ exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
29204
30040
  exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
29205
30041
  exports.Checkbox = Checkbox$1;
29206
30042
  exports.ClearIndicator = ClearIndicator;
@@ -29209,7 +30045,7 @@ exports.ConditionalWrap = ConditionalWrap;
29209
30045
  exports.ConfirmationDialog = ConfirmationDialog;
29210
30046
  exports.CustomInput = CustomInput;
29211
30047
  exports.CustomSelect = CustomSelect;
29212
- exports.DEFAULT_BASE_PAGE_SIZE = DEFAULT_BASE_PAGE_SIZE;
30048
+ exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
29213
30049
  exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
29214
30050
  exports.DOCUMENTATION = DOCUMENTATION;
29215
30051
  exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
@@ -29243,6 +30079,7 @@ exports.MultiValueRemove = MultiValueRemove;
29243
30079
  exports.OpaqueModal = OpaqueModal;
29244
30080
  exports.Option = Option;
29245
30081
  exports.PATTERNS = PATTERNS;
30082
+ exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
29246
30083
  exports.Pagination = Pagination;
29247
30084
  exports.PopupMenu = PopupMenu;
29248
30085
  exports.Progressing = Progressing;
@@ -29260,10 +30097,10 @@ exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
29260
30097
  exports.SELECT_ALL_ACROSS_PAGES_LOCATOR = SELECT_ALL_ACROSS_PAGES_LOCATOR;
29261
30098
  exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
29262
30099
  exports.SearchBar = SearchBar;
30100
+ exports.SelectOption = SelectOption;
29263
30101
  exports.ServerError = ServerError;
29264
30102
  exports.ServerErrors = ServerErrors;
29265
30103
  exports.SingleSelectOption = SingleSelectOption;
29266
- exports.SortableTableHeaderCell = SortableTableHeaderCell;
29267
30104
  exports.SourceTypeMap = SourceTypeMap;
29268
30105
  exports.StyledRadioGroup = RadioGroup;
29269
30106
  exports.TOAST_ACCESS_DENIED = TOAST_ACCESS_DENIED;
@@ -29283,6 +30120,7 @@ exports.VisibleModal2 = VisibleModal2;
29283
30120
  exports.abortPreviousRequests = abortPreviousRequests;
29284
30121
  exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
29285
30122
  exports.copyToClipboard = copyToClipboard;
30123
+ exports.createBuildInfraProfile = createBuildInfraProfile;
29286
30124
  exports.createGitCommitUrl = createGitCommitUrl;
29287
30125
  exports.customStyles = customStyles;
29288
30126
  exports.debounce = debounce$2;
@@ -29291,7 +30129,10 @@ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
29291
30129
  exports.genericCDMaterialsService = genericCDMaterialsService;
29292
30130
  exports.get = get;
29293
30131
  exports.getAlphabetIcon = getAlphabetIcon;
30132
+ exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
30133
+ exports.getCommonSelectStyle = getCommonSelectStyle;
29294
30134
  exports.getCookie = getCookie;
30135
+ exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
29295
30136
  exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
29296
30137
  exports.getFilteredChartVersions = getFilteredChartVersions;
29297
30138
  exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
@@ -29302,11 +30143,13 @@ exports.getLoginInfo = getLoginInfo;
29302
30143
  exports.getRandomColor = getRandomColor;
29303
30144
  exports.getRedirectionProps = getRedirectionProps;
29304
30145
  exports.getTeamListMin = getTeamListMin;
30146
+ exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
29305
30147
  exports.getUnlockedJSON = getUnlockedJSON;
29306
30148
  exports.getUrlWithSearchParams = getUrlWithSearchParams;
29307
30149
  exports.getUserRole = getUserRole;
29308
30150
  exports.handleAddCD = handleAddCD;
29309
30151
  exports.handleUTCTime = handleUTCTime;
30152
+ exports.highlightSearchText = highlightSearchText;
29310
30153
  exports.logExceptionToSentry = logExceptionToSentry;
29311
30154
  exports.multiSelectStyles = multiSelectStyles;
29312
30155
  exports.noop = noop$1;
@@ -29320,8 +30163,11 @@ exports.sortCallback = sortCallback;
29320
30163
  exports.stopPropagation = stopPropagation;
29321
30164
  exports.toastAccessDenied = toastAccessDenied;
29322
30165
  exports.trash = trash;
30166
+ exports.unitSelectorStyles = unitSelectorStyles;
30167
+ exports.updateBuildInfraProfile = updateBuildInfraProfile;
29323
30168
  exports.useAsync = useAsync;
29324
30169
  exports.useBreadcrumb = useBreadcrumb;
30170
+ exports.useBuildInfraForm = useBuildInfraForm;
29325
30171
  exports.useBulkSelection = useBulkSelection;
29326
30172
  exports.useClickOutside = useClickOutside;
29327
30173
  exports.useEffectAfterMount = useEffectAfterMount;
@@ -29329,5 +30175,9 @@ exports.useForm = useForm;
29329
30175
  exports.useSearchString = useSearchString;
29330
30176
  exports.useSuperAdmin = useSuperAdmin;
29331
30177
  exports.useThrottledEffect = useThrottledEffect;
29332
- exports.useUrlFilters = useUrlFilters;
29333
30178
  exports.useWindowSize = useWindowSize;
30179
+ exports.validateDescription = validateDescription;
30180
+ exports.validateName = validateName;
30181
+ exports.validateRequestLimit = validateRequestLimit;
30182
+ exports.validateRequiredPositiveInteger = validateRequiredPositiveInteger;
30183
+ exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;