@devtron-labs/devtron-fe-common-lib 0.0.58 → 0.0.59-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/Api.d.ts +9 -0
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/CustomInput/CustomInput.d.ts +1 -1
- package/dist/Common/CustomInput/Types.d.ts +2 -1
- package/dist/Common/SearchBar/types.d.ts +2 -2
- package/dist/Common/Types.d.ts +3 -2
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +7 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +52 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +7 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +6 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +286 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +12 -0
- package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
- package/dist/Pages/index.d.ts +1 -0
- package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +4 -0
- package/dist/Shared/Components/APIResponseHandler/constants.d.ts +4 -0
- package/dist/Shared/Components/APIResponseHandler/index.d.ts +2 -0
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +37 -0
- package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/BulkSelectionDropdownItems.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/UseBulkSelection.d.ts +3 -0
- package/dist/Shared/Components/BulkSelection/constants.d.ts +8 -0
- package/dist/Shared/Components/BulkSelection/index.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/types.d.ts +50 -0
- package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +12 -0
- package/dist/Shared/Components/index.d.ts +3 -0
- package/dist/Shared/Helpers.d.ts +16 -0
- package/dist/Shared/index.d.ts +3 -0
- package/dist/Shared/validations.d.ts +7 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1342 -160
- package/package.json +1 -1
- package/src/Assets/Icon/ic-check-all.svg +5 -0
- package/src/Assets/Icon/ic-check-square.svg +4 -0
- package/src/Assets/Icon/ic-cpu.svg +4 -0
- package/src/Assets/Icon/ic-memory.svg +3 -0
- package/src/Assets/Icon/ic-timer.svg +3 -0
- package/src/Common/Api.ts +21 -0
- package/src/Common/BreadCrumb/Types.ts +0 -1
- package/src/Common/Checkbox.tsx +1 -0
- package/src/Common/Constants.ts +2 -1
- package/src/Common/CustomInput/CustomInput.tsx +6 -2
- package/src/Common/CustomInput/Types.ts +4 -3
- package/src/Common/DraggableWrapper/DraggableWrapper.tsx +3 -1
- package/src/Common/RJSF/utils.ts +2 -0
- package/src/Common/SearchBar/SearchBar.component.tsx +26 -15
- package/src/Common/SearchBar/searchBar.scss +1 -1
- package/src/Common/SearchBar/types.ts +1 -3
- package/src/Common/Types.ts +2 -1
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +128 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +44 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +106 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +55 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +32 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +45 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +55 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +4 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +141 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +7 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +167 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +339 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +508 -0
- package/src/Pages/GlobalConfigurations/index.ts +1 -0
- package/src/Pages/index.ts +1 -0
- package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +41 -0
- package/src/Shared/Components/APIResponseHandler/constants.tsx +5 -0
- package/src/Shared/Components/APIResponseHandler/index.ts +2 -0
- package/src/Shared/Components/APIResponseHandler/types.tsx +39 -0
- package/src/Shared/Components/BulkSelection/BulkSelection.tsx +81 -0
- package/src/Shared/Components/BulkSelection/BulkSelectionDropdownItems.tsx +31 -0
- package/src/Shared/Components/BulkSelection/UseBulkSelection.tsx +99 -0
- package/src/Shared/Components/BulkSelection/constants.tsx +12 -0
- package/src/Shared/Components/BulkSelection/index.ts +4 -0
- package/src/Shared/Components/BulkSelection/types.tsx +58 -0
- package/src/Shared/Components/ReactSelect/index.ts +1 -0
- package/src/Shared/Components/ReactSelect/utils.tsx +97 -0
- package/src/Shared/Components/index.ts +3 -0
- package/src/Shared/Helpers.tsx +29 -0
- package/src/Shared/index.ts +3 -0
- package/src/Shared/validations.tsx +72 -0
- package/src/index.ts +3 -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) {
|
|
@@ -429,6 +430,7 @@ exports.CHECKBOX_VALUE = void 0;
|
|
|
429
430
|
(function (CHECKBOX_VALUE) {
|
|
430
431
|
CHECKBOX_VALUE["CHECKED"] = "CHECKED";
|
|
431
432
|
CHECKBOX_VALUE["INTERMEDIATE"] = "INTERMEDIATE";
|
|
433
|
+
CHECKBOX_VALUE["BULK_CHECKED"] = "BULK_CHECKED";
|
|
432
434
|
})(exports.CHECKBOX_VALUE || (exports.CHECKBOX_VALUE = {}));
|
|
433
435
|
exports.ImageType = void 0;
|
|
434
436
|
(function (ImageType) {
|
|
@@ -732,6 +734,22 @@ var get = function (url, options) {
|
|
|
732
734
|
};
|
|
733
735
|
var trash = function (url, data, options) {
|
|
734
736
|
return fetchInTime(url, 'DELETE', data, options);
|
|
737
|
+
};
|
|
738
|
+
/**
|
|
739
|
+
* Aborts the previous request before triggering next request
|
|
740
|
+
*/
|
|
741
|
+
var abortPreviousRequests = function (callback, abortControllerRef) {
|
|
742
|
+
abortControllerRef.current.abort();
|
|
743
|
+
// eslint-disable-next-line no-param-reassign
|
|
744
|
+
abortControllerRef.current = new AbortController();
|
|
745
|
+
return callback();
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* Returns true if the error is due to a aborted request
|
|
749
|
+
*/
|
|
750
|
+
var getIsRequestAborted = function (error) {
|
|
751
|
+
// The 0 code is common for aborted and blocked requests
|
|
752
|
+
return error && error.code === 0 && error.message === 'The user aborted a request.';
|
|
735
753
|
};
|
|
736
754
|
|
|
737
755
|
function styleInject(css, ref) {
|
|
@@ -765,9 +783,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
|
|
|
765
783
|
styleInject(css_248z$9);
|
|
766
784
|
|
|
767
785
|
var _g$7;
|
|
768
|
-
function _extends$
|
|
786
|
+
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); }
|
|
769
787
|
var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
770
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
788
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
771
789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
772
790
|
viewBox: "0 0 24 24",
|
|
773
791
|
width: "1em",
|
|
@@ -819,8 +837,8 @@ EmptyState.Loading = Loading;
|
|
|
819
837
|
|
|
820
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}
|
|
821
839
|
|
|
822
|
-
function _extends$
|
|
823
|
-
_extends$
|
|
840
|
+
function _extends$s() {
|
|
841
|
+
_extends$s = Object.assign || function (target) {
|
|
824
842
|
for (var i = 1; i < arguments.length; i++) {
|
|
825
843
|
var source = arguments[i];
|
|
826
844
|
|
|
@@ -834,7 +852,7 @@ function _extends$n() {
|
|
|
834
852
|
return target;
|
|
835
853
|
};
|
|
836
854
|
|
|
837
|
-
return _extends$
|
|
855
|
+
return _extends$s.apply(this, arguments);
|
|
838
856
|
}
|
|
839
857
|
|
|
840
858
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
@@ -1560,7 +1578,7 @@ function ProgressBar(_ref) {
|
|
|
1560
1578
|
isIn = _ref.isIn,
|
|
1561
1579
|
theme = _ref.theme;
|
|
1562
1580
|
|
|
1563
|
-
var style = _extends$
|
|
1581
|
+
var style = _extends$s({}, userStyle, {
|
|
1564
1582
|
animationDuration: delay + "ms",
|
|
1565
1583
|
animationPlayState: isRunning ? 'running' : 'paused',
|
|
1566
1584
|
opacity: hide ? 0 : 1
|
|
@@ -1837,9 +1855,9 @@ var ToastContainer = function ToastContainer(props) {
|
|
|
1837
1855
|
,
|
|
1838
1856
|
id: containerId
|
|
1839
1857
|
}, getToastToRender(function (position, toastList) {
|
|
1840
|
-
var containerStyle = !toastList.length ? _extends$
|
|
1858
|
+
var containerStyle = !toastList.length ? _extends$s({}, style, {
|
|
1841
1859
|
pointerEvents: 'none'
|
|
1842
|
-
}) : _extends$
|
|
1860
|
+
}) : _extends$s({}, style);
|
|
1843
1861
|
return React.createElement("div", {
|
|
1844
1862
|
className: getClassName(position),
|
|
1845
1863
|
style: containerStyle,
|
|
@@ -1946,7 +1964,7 @@ function dispatchToast(content, options) {
|
|
|
1946
1964
|
|
|
1947
1965
|
|
|
1948
1966
|
function mergeOptions(type, options) {
|
|
1949
|
-
return _extends$
|
|
1967
|
+
return _extends$s({}, options, {
|
|
1950
1968
|
type: options && options.type || type,
|
|
1951
1969
|
toastId: getToastId(options)
|
|
1952
1970
|
});
|
|
@@ -1963,7 +1981,7 @@ function toast(content, options) {
|
|
|
1963
1981
|
}
|
|
1964
1982
|
|
|
1965
1983
|
toast.loading = function (content, options) {
|
|
1966
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
1984
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$s({
|
|
1967
1985
|
isLoading: true,
|
|
1968
1986
|
autoClose: false,
|
|
1969
1987
|
closeOnClick: false,
|
|
@@ -1979,7 +1997,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1979
1997
|
var id;
|
|
1980
1998
|
|
|
1981
1999
|
if (pending) {
|
|
1982
|
-
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$
|
|
2000
|
+
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$s({}, options, pending));
|
|
1983
2001
|
}
|
|
1984
2002
|
|
|
1985
2003
|
var resetParams = {
|
|
@@ -1998,7 +2016,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1998
2016
|
return;
|
|
1999
2017
|
}
|
|
2000
2018
|
|
|
2001
|
-
var baseParams = _extends$
|
|
2019
|
+
var baseParams = _extends$s({
|
|
2002
2020
|
type: type
|
|
2003
2021
|
}, resetParams, options, {
|
|
2004
2022
|
data: result
|
|
@@ -2009,10 +2027,10 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2009
2027
|
} : input; // if the id is set we know that it's an update
|
|
2010
2028
|
|
|
2011
2029
|
if (id) {
|
|
2012
|
-
toast.update(id, _extends$
|
|
2030
|
+
toast.update(id, _extends$s({}, baseParams, params));
|
|
2013
2031
|
} else {
|
|
2014
2032
|
// using toast.promise without loading
|
|
2015
|
-
toast(params.render, _extends$
|
|
2033
|
+
toast(params.render, _extends$s({}, baseParams, params));
|
|
2016
2034
|
}
|
|
2017
2035
|
|
|
2018
2036
|
return result;
|
|
@@ -2036,7 +2054,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
|
|
|
2036
2054
|
toast.warn = toast.warning;
|
|
2037
2055
|
|
|
2038
2056
|
toast.dark = function (content, options) {
|
|
2039
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
2057
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$s({
|
|
2040
2058
|
theme: 'dark'
|
|
2041
2059
|
}, options)));
|
|
2042
2060
|
};
|
|
@@ -2093,7 +2111,7 @@ toast.update = function (toastId, options) {
|
|
|
2093
2111
|
var oldOptions = toast.props,
|
|
2094
2112
|
oldContent = toast.content;
|
|
2095
2113
|
|
|
2096
|
-
var nextOptions = _extends$
|
|
2114
|
+
var nextOptions = _extends$s({}, oldOptions, options, {
|
|
2097
2115
|
toastId: options.toastId || toastId,
|
|
2098
2116
|
updateId: generateToastId()
|
|
2099
2117
|
});
|
|
@@ -12010,16 +12028,16 @@ var Modal = function (_a) {
|
|
|
12010
12028
|
}, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
|
|
12011
12029
|
};
|
|
12012
12030
|
|
|
12013
|
-
var _path$
|
|
12014
|
-
function _extends$
|
|
12031
|
+
var _path$i;
|
|
12032
|
+
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); }
|
|
12015
12033
|
var SvgIcCross = function SvgIcCross(props) {
|
|
12016
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12034
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
12017
12035
|
width: "1em",
|
|
12018
12036
|
height: "1em",
|
|
12019
12037
|
viewBox: "0 0 24 24",
|
|
12020
12038
|
fill: "none",
|
|
12021
12039
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12022
|
-
}, props), _path$
|
|
12040
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12023
12041
|
d: "M19.28 5.78a.75.75 0 0 0-1.06-1.06l1.06 1.06ZM4.72 18.22a.75.75 0 1 0 1.06 1.06l-1.06-1.06Zm13.5 1.06a.75.75 0 1 0 1.06-1.06l-1.06 1.06ZM5.78 4.72a.75.75 0 0 0-1.06 1.06l1.06-1.06Zm12.44 0-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm-6.75 6.75-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm7.81 6.75-6.75-6.75-1.06 1.06 6.75 6.75 1.06-1.06Zm-6.75-6.75L5.78 4.72 4.72 5.78l6.75 6.75 1.06-1.06Z",
|
|
12024
12042
|
fill: "#596168"
|
|
12025
12043
|
})));
|
|
@@ -16318,30 +16336,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
16318
16336
|
|
|
16319
16337
|
var Tippy = index;
|
|
16320
16338
|
|
|
16321
|
-
var _path$
|
|
16322
|
-
function _extends$
|
|
16339
|
+
var _path$h;
|
|
16340
|
+
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); }
|
|
16323
16341
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
16324
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16342
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
16325
16343
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16326
16344
|
width: "1em",
|
|
16327
16345
|
height: "1em",
|
|
16328
16346
|
viewBox: "0 0 24 24"
|
|
16329
|
-
}, props), _path$
|
|
16347
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16330
16348
|
fill: "#767D84",
|
|
16331
16349
|
fillRule: "evenodd",
|
|
16332
16350
|
d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm-.205 12.868c-.615 0-1.12.505-1.12 1.12 0 .617.505 1.121 1.12 1.121.615 0 1.12-.504 1.12-1.12 0-.616-.506-1.12-1.12-1.12zM11.863 7c-1.667 0-3.197 1.187-3.196 2.527 0 .546.41.833.888.833 1.325 0 .642-1.803 2.39-1.803.82 0 1.311.438 1.311 1.175 0 1.34-2.39 1.708-2.39 3.334 0 .438.287.915.874.915.902 0 .792-.67 1.12-1.148.438-.642 2.473-1.325 2.473-3.101 0-1.927-1.721-2.732-3.47-2.732z"
|
|
16333
16351
|
})));
|
|
16334
16352
|
};
|
|
16335
16353
|
|
|
16336
|
-
var _path$
|
|
16337
|
-
function _extends$
|
|
16354
|
+
var _path$g;
|
|
16355
|
+
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); }
|
|
16338
16356
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
16339
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16357
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
16340
16358
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16341
16359
|
viewBox: "0 0 17 16",
|
|
16342
16360
|
width: "1em",
|
|
16343
16361
|
height: "1em"
|
|
16344
|
-
}, props), _path$
|
|
16362
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16345
16363
|
fill: "#767D84",
|
|
16346
16364
|
fillRule: "evenodd",
|
|
16347
16365
|
d: "M9 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 9 1.333zm0 1.334C6.054 2.667 3.667 5.054 3.667 8S6.054 13.333 9 13.333 14.333 10.946 14.333 8 11.946 2.667 9 2.667zm-.137 7.245c.41 0 .747.337.747.747s-.337.747-.747.747-.747-.336-.747-.747a.75.75 0 0 1 .747-.747zm.046-5.245c1.166 0 2.313.537 2.313 1.82 0 1.185-1.357 1.64-1.648 2.068-.22.319-.146.766-.747.766-.392 0-.583-.319-.583-.61 0-1.085 1.593-1.33 1.593-2.223 0-.492-.327-.783-.873-.783-1.166 0-.711 1.202-1.594 1.202-.319 0-.592-.191-.592-.556 0-.893 1.02-1.684 2.13-1.684z"
|
|
@@ -16393,16 +16411,16 @@ function TippyCustomized(props) {
|
|
|
16393
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 })));
|
|
16394
16412
|
}
|
|
16395
16413
|
|
|
16396
|
-
var _path$
|
|
16397
|
-
function _extends$
|
|
16414
|
+
var _path$f, _circle, _path2$2;
|
|
16415
|
+
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); }
|
|
16398
16416
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
16399
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16417
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
16400
16418
|
width: "1em",
|
|
16401
16419
|
height: "1em",
|
|
16402
16420
|
viewBox: "0 0 20 20",
|
|
16403
16421
|
fill: "none",
|
|
16404
16422
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16405
|
-
}, props), _path$
|
|
16423
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16406
16424
|
d: "M10 10H3.333",
|
|
16407
16425
|
stroke: "#596168",
|
|
16408
16426
|
strokeWidth: 1.5,
|
|
@@ -16413,7 +16431,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
|
|
|
16413
16431
|
cy: 10,
|
|
16414
16432
|
r: 1.667,
|
|
16415
16433
|
fill: "#596168"
|
|
16416
|
-
})), _path2$
|
|
16434
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16417
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",
|
|
16418
16436
|
stroke: "#596168",
|
|
16419
16437
|
strokeWidth: 1.5,
|
|
@@ -16430,15 +16448,15 @@ function PropagateTagInfo(_a) {
|
|
|
16430
16448
|
return (jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300", placement: "top", Icon: SvgInjectTag, heading: 'Propagate tags to K8s resources', infoText: "", additionalContent: additionalInfo(), showCloseButton: true, trigger: "click", interactive: true, documentationLink: isCreateApp ? DOCUMENTATION.APP_TAGS : DOCUMENTATION.APP_OVERVIEW_TAGS, documentationLinkText: "View Documentation" }, { children: jsxRuntime.jsxs("div", __assign({ className: "flexbox cursor" }, { children: [jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-16 mt-2 mr-4" }), jsxRuntime.jsx("span", { children: "Propagate tags" }), jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-16 mt-2 ml-4" })] })) })));
|
|
16431
16449
|
}
|
|
16432
16450
|
|
|
16433
|
-
var _path$
|
|
16434
|
-
function _extends$
|
|
16451
|
+
var _path$e;
|
|
16452
|
+
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); }
|
|
16435
16453
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
16436
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16454
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
16437
16455
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16438
16456
|
width: "1em",
|
|
16439
16457
|
height: "1em",
|
|
16440
16458
|
viewBox: "0 0 20 20"
|
|
16441
|
-
}, props), _path$
|
|
16459
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16442
16460
|
d: "M10 1.667c4.6 0 8.333 3.733 8.333 8.333S14.6 18.333 10 18.333 1.667 14.6 1.667 10 5.4 1.667 10 1.667zm0 1.666A6.67 6.67 0 0 0 3.333 10 6.67 6.67 0 0 0 10 16.667 6.67 6.67 0 0 0 16.667 10 6.67 6.67 0 0 0 10 3.333zm0 5.834c.46 0 .833.373.833.833v3.333a.834.834 0 1 1-1.666 0V10c0-.46.373-.833.833-.833zm0-3.334A.833.833 0 1 1 10 7.5a.833.833 0 0 1 0-1.667z",
|
|
16443
16461
|
fill: "#06C",
|
|
16444
16462
|
fillRule: "evenodd"
|
|
@@ -16672,15 +16690,15 @@ var TagDetails = function (_a) {
|
|
|
16672
16690
|
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox mb-8" }, { children: [jsxRuntime.jsx("div", __assign({ className: "dc__border h-30 pl-4 pr-4 br-4 mr-8 pointer ".concat(tagData.propagate ? 'bcn-7' : '', " ").concat(tagData.key.startsWith("devtron.ai/") ? 'cursor-not-allowed bcn-1' : ''), onClick: propagateTagToResource, "data-testid": "propagate-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-20 mt-4 ".concat(tagData.propagate ? 'scn-0' : '') }) })), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.KEY, placeholder: "Enter key", tabIndex: tabIndex - 1, refVar: keyRef, dependentRef: valueRef, tagOptions: suggestedTagsOptions }), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.VALUE, placeholder: "Enter value", tabIndex: tabIndex, refVar: valueRef, dependentRef: keyRef }), jsxRuntime.jsx("div", __assign({ className: "dc__border pl-4 pr-4 dc__right-radius-4 pointer flex top", onClick: deleteTag, "data-testid": "delete-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-20 mt-4" }) }))] })));
|
|
16673
16691
|
};
|
|
16674
16692
|
|
|
16675
|
-
var _path$
|
|
16676
|
-
function _extends$
|
|
16693
|
+
var _path$d;
|
|
16694
|
+
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); }
|
|
16677
16695
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
16678
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16696
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
16679
16697
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16680
16698
|
width: "1em",
|
|
16681
16699
|
height: "1em",
|
|
16682
16700
|
viewBox: "0 0 24 24"
|
|
16683
|
-
}, props), _path$
|
|
16701
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16684
16702
|
className: "ic-add_svg__fill-color",
|
|
16685
16703
|
fill: "#999",
|
|
16686
16704
|
d: "M18 13h-5v5a1 1 0 0 1-2 0v-5H6a1 1 0 0 1 0-2h5V6a1 1 0 0 1 2 0v5h5a1 1 0 0 1 0 2z"
|
|
@@ -16810,8 +16828,8 @@ function ForceDeleteDialog(_a) {
|
|
|
16810
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?" })] }) })) }));
|
|
16811
16829
|
}
|
|
16812
16830
|
|
|
16813
|
-
function _extends$
|
|
16814
|
-
_extends$
|
|
16831
|
+
function _extends$l() {
|
|
16832
|
+
_extends$l = Object.assign ? Object.assign.bind() : function (target) {
|
|
16815
16833
|
for (var i = 1; i < arguments.length; i++) {
|
|
16816
16834
|
var source = arguments[i];
|
|
16817
16835
|
for (var key in source) {
|
|
@@ -16822,7 +16840,7 @@ function _extends$g() {
|
|
|
16822
16840
|
}
|
|
16823
16841
|
return target;
|
|
16824
16842
|
};
|
|
16825
|
-
return _extends$
|
|
16843
|
+
return _extends$l.apply(this, arguments);
|
|
16826
16844
|
}
|
|
16827
16845
|
|
|
16828
16846
|
/*
|
|
@@ -20363,7 +20381,7 @@ var Menu = function Menu(props) {
|
|
|
20363
20381
|
getStyles = props.getStyles,
|
|
20364
20382
|
innerRef = props.innerRef,
|
|
20365
20383
|
innerProps = props.innerProps;
|
|
20366
|
-
return jsx("div", _extends$
|
|
20384
|
+
return jsx("div", _extends$l({
|
|
20367
20385
|
css: getStyles('menu', props),
|
|
20368
20386
|
className: cx({
|
|
20369
20387
|
menu: true
|
|
@@ -20395,7 +20413,7 @@ var MenuList$1 = function MenuList(props) {
|
|
|
20395
20413
|
innerProps = props.innerProps,
|
|
20396
20414
|
innerRef = props.innerRef,
|
|
20397
20415
|
isMulti = props.isMulti;
|
|
20398
|
-
return jsx("div", _extends$
|
|
20416
|
+
return jsx("div", _extends$l({
|
|
20399
20417
|
css: getStyles('menuList', props),
|
|
20400
20418
|
className: cx({
|
|
20401
20419
|
'menu-list': true,
|
|
@@ -20426,7 +20444,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
20426
20444
|
cx = props.cx,
|
|
20427
20445
|
getStyles = props.getStyles,
|
|
20428
20446
|
innerProps = props.innerProps;
|
|
20429
|
-
return jsx("div", _extends$
|
|
20447
|
+
return jsx("div", _extends$l({
|
|
20430
20448
|
css: getStyles('noOptionsMessage', props),
|
|
20431
20449
|
className: cx({
|
|
20432
20450
|
'menu-notice': true,
|
|
@@ -20443,7 +20461,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
20443
20461
|
cx = props.cx,
|
|
20444
20462
|
getStyles = props.getStyles,
|
|
20445
20463
|
innerProps = props.innerProps;
|
|
20446
|
-
return jsx("div", _extends$
|
|
20464
|
+
return jsx("div", _extends$l({
|
|
20447
20465
|
css: getStyles('loadingMessage', props),
|
|
20448
20466
|
className: cx({
|
|
20449
20467
|
'menu-notice': true,
|
|
@@ -20531,7 +20549,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
20531
20549
|
rect: rect
|
|
20532
20550
|
}; // same wrapper element whether fixed or portalled
|
|
20533
20551
|
|
|
20534
|
-
var menuWrapper = jsx("div", _extends$
|
|
20552
|
+
var menuWrapper = jsx("div", _extends$l({
|
|
20535
20553
|
css: getStyles('menuPortal', state),
|
|
20536
20554
|
className: cx({
|
|
20537
20555
|
'menu-portal': true
|
|
@@ -20567,7 +20585,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
20567
20585
|
innerProps = props.innerProps,
|
|
20568
20586
|
isDisabled = props.isDisabled,
|
|
20569
20587
|
isRtl = props.isRtl;
|
|
20570
|
-
return jsx("div", _extends$
|
|
20588
|
+
return jsx("div", _extends$l({
|
|
20571
20589
|
css: getStyles('container', props),
|
|
20572
20590
|
className: cx({
|
|
20573
20591
|
'--is-disabled': isDisabled,
|
|
@@ -20602,7 +20620,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
20602
20620
|
isMulti = props.isMulti,
|
|
20603
20621
|
getStyles = props.getStyles,
|
|
20604
20622
|
hasValue = props.hasValue;
|
|
20605
|
-
return jsx("div", _extends$
|
|
20623
|
+
return jsx("div", _extends$l({
|
|
20606
20624
|
css: getStyles('valueContainer', props),
|
|
20607
20625
|
className: cx({
|
|
20608
20626
|
'value-container': true,
|
|
@@ -20628,7 +20646,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
20628
20646
|
cx = props.cx,
|
|
20629
20647
|
innerProps = props.innerProps,
|
|
20630
20648
|
getStyles = props.getStyles;
|
|
20631
|
-
return jsx("div", _extends$
|
|
20649
|
+
return jsx("div", _extends$l({
|
|
20632
20650
|
css: getStyles('indicatorsContainer', props),
|
|
20633
20651
|
className: cx({
|
|
20634
20652
|
indicators: true
|
|
@@ -20659,7 +20677,7 @@ var Svg = function Svg(_ref) {
|
|
|
20659
20677
|
var size = _ref.size,
|
|
20660
20678
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
20661
20679
|
|
|
20662
|
-
return jsx("svg", _extends$
|
|
20680
|
+
return jsx("svg", _extends$l({
|
|
20663
20681
|
height: size,
|
|
20664
20682
|
width: size,
|
|
20665
20683
|
viewBox: "0 0 20 20",
|
|
@@ -20670,14 +20688,14 @@ var Svg = function Svg(_ref) {
|
|
|
20670
20688
|
};
|
|
20671
20689
|
|
|
20672
20690
|
var CrossIcon = function CrossIcon(props) {
|
|
20673
|
-
return jsx(Svg, _extends$
|
|
20691
|
+
return jsx(Svg, _extends$l({
|
|
20674
20692
|
size: 20
|
|
20675
20693
|
}, props), jsx("path", {
|
|
20676
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"
|
|
20677
20695
|
}));
|
|
20678
20696
|
};
|
|
20679
20697
|
var DownChevron = function DownChevron(props) {
|
|
20680
|
-
return jsx(Svg, _extends$
|
|
20698
|
+
return jsx(Svg, _extends$l({
|
|
20681
20699
|
size: 20
|
|
20682
20700
|
}, props), jsx("path", {
|
|
20683
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"
|
|
@@ -20710,7 +20728,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
|
|
|
20710
20728
|
cx = props.cx,
|
|
20711
20729
|
getStyles = props.getStyles,
|
|
20712
20730
|
innerProps = props.innerProps;
|
|
20713
|
-
return jsx("div", _extends$
|
|
20731
|
+
return jsx("div", _extends$l({
|
|
20714
20732
|
css: getStyles('dropdownIndicator', props),
|
|
20715
20733
|
className: cx({
|
|
20716
20734
|
indicator: true,
|
|
@@ -20725,7 +20743,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
20725
20743
|
cx = props.cx,
|
|
20726
20744
|
getStyles = props.getStyles,
|
|
20727
20745
|
innerProps = props.innerProps;
|
|
20728
|
-
return jsx("div", _extends$
|
|
20746
|
+
return jsx("div", _extends$l({
|
|
20729
20747
|
css: getStyles('clearIndicator', props),
|
|
20730
20748
|
className: cx({
|
|
20731
20749
|
indicator: true,
|
|
@@ -20755,7 +20773,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
20755
20773
|
cx = props.cx,
|
|
20756
20774
|
getStyles = props.getStyles,
|
|
20757
20775
|
innerProps = props.innerProps;
|
|
20758
|
-
return jsx("span", _extends$
|
|
20776
|
+
return jsx("span", _extends$l({}, innerProps, {
|
|
20759
20777
|
css: getStyles('indicatorSeparator', props),
|
|
20760
20778
|
className: cx({
|
|
20761
20779
|
'indicator-separator': true
|
|
@@ -20810,7 +20828,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
20810
20828
|
getStyles = props.getStyles,
|
|
20811
20829
|
innerProps = props.innerProps,
|
|
20812
20830
|
isRtl = props.isRtl;
|
|
20813
|
-
return jsx("div", _extends$
|
|
20831
|
+
return jsx("div", _extends$l({
|
|
20814
20832
|
css: getStyles('loadingIndicator', props),
|
|
20815
20833
|
className: cx({
|
|
20816
20834
|
indicator: true,
|
|
@@ -20871,7 +20889,7 @@ var Control = function Control(props) {
|
|
|
20871
20889
|
innerRef = props.innerRef,
|
|
20872
20890
|
innerProps = props.innerProps,
|
|
20873
20891
|
menuIsOpen = props.menuIsOpen;
|
|
20874
|
-
return jsx("div", _extends$
|
|
20892
|
+
return jsx("div", _extends$l({
|
|
20875
20893
|
ref: innerRef,
|
|
20876
20894
|
css: getStyles('control', props),
|
|
20877
20895
|
className: cx({
|
|
@@ -20903,12 +20921,12 @@ var Group = function Group(props) {
|
|
|
20903
20921
|
label = props.label,
|
|
20904
20922
|
theme = props.theme,
|
|
20905
20923
|
selectProps = props.selectProps;
|
|
20906
|
-
return jsx("div", _extends$
|
|
20924
|
+
return jsx("div", _extends$l({
|
|
20907
20925
|
css: getStyles('group', props),
|
|
20908
20926
|
className: cx({
|
|
20909
20927
|
group: true
|
|
20910
20928
|
}, className)
|
|
20911
|
-
}, innerProps), jsx(Heading, _extends$
|
|
20929
|
+
}, innerProps), jsx(Heading, _extends$l({}, headingProps, {
|
|
20912
20930
|
selectProps: selectProps,
|
|
20913
20931
|
theme: theme,
|
|
20914
20932
|
getStyles: getStyles,
|
|
@@ -20940,7 +20958,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
20940
20958
|
_cleanCommonProps.data;
|
|
20941
20959
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
20942
20960
|
|
|
20943
|
-
return jsx("div", _extends$
|
|
20961
|
+
return jsx("div", _extends$l({
|
|
20944
20962
|
css: getStyles('groupHeading', props),
|
|
20945
20963
|
className: cx({
|
|
20946
20964
|
'group-heading': true
|
|
@@ -21016,7 +21034,7 @@ var Input = function Input(props) {
|
|
|
21016
21034
|
}, className),
|
|
21017
21035
|
css: getStyles('input', props),
|
|
21018
21036
|
"data-value": value || ''
|
|
21019
|
-
}, jsx("input", _extends$
|
|
21037
|
+
}, jsx("input", _extends$l({
|
|
21020
21038
|
className: cx({
|
|
21021
21039
|
input: true
|
|
21022
21040
|
}, inputClassName),
|
|
@@ -21086,7 +21104,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
21086
21104
|
function MultiValueRemove$1(_ref5) {
|
|
21087
21105
|
var children = _ref5.children,
|
|
21088
21106
|
innerProps = _ref5.innerProps;
|
|
21089
|
-
return jsx("div", _extends$
|
|
21107
|
+
return jsx("div", _extends$l({
|
|
21090
21108
|
role: "button"
|
|
21091
21109
|
}, innerProps), children || jsx(CrossIcon, {
|
|
21092
21110
|
size: 14
|
|
@@ -21175,7 +21193,7 @@ var Option$1 = function Option(props) {
|
|
|
21175
21193
|
isSelected = props.isSelected,
|
|
21176
21194
|
innerRef = props.innerRef,
|
|
21177
21195
|
innerProps = props.innerProps;
|
|
21178
|
-
return jsx("div", _extends$
|
|
21196
|
+
return jsx("div", _extends$l({
|
|
21179
21197
|
css: getStyles('option', props),
|
|
21180
21198
|
className: cx({
|
|
21181
21199
|
option: true,
|
|
@@ -21207,7 +21225,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
21207
21225
|
cx = props.cx,
|
|
21208
21226
|
getStyles = props.getStyles,
|
|
21209
21227
|
innerProps = props.innerProps;
|
|
21210
|
-
return jsx("div", _extends$
|
|
21228
|
+
return jsx("div", _extends$l({
|
|
21211
21229
|
css: getStyles('placeholder', props),
|
|
21212
21230
|
className: cx({
|
|
21213
21231
|
placeholder: true
|
|
@@ -21240,7 +21258,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
21240
21258
|
getStyles = props.getStyles,
|
|
21241
21259
|
isDisabled = props.isDisabled,
|
|
21242
21260
|
innerProps = props.innerProps;
|
|
21243
|
-
return jsx("div", _extends$
|
|
21261
|
+
return jsx("div", _extends$l({
|
|
21244
21262
|
css: getStyles('singleValue', props),
|
|
21245
21263
|
className: cx({
|
|
21246
21264
|
'single-value': true,
|
|
@@ -21488,7 +21506,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
21488
21506
|
};
|
|
21489
21507
|
|
|
21490
21508
|
var A11yText = function A11yText(props) {
|
|
21491
|
-
return jsx("span", _extends$
|
|
21509
|
+
return jsx("span", _extends$l({
|
|
21492
21510
|
css: _ref
|
|
21493
21511
|
}, props));
|
|
21494
21512
|
};
|
|
@@ -22024,7 +22042,7 @@ function DummyInput(_ref) {
|
|
|
22024
22042
|
var innerRef = _ref.innerRef,
|
|
22025
22043
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22026
22044
|
|
|
22027
|
-
return jsx("input", _extends$
|
|
22045
|
+
return jsx("input", _extends$l({
|
|
22028
22046
|
ref: innerRef
|
|
22029
22047
|
}, props, {
|
|
22030
22048
|
css: /*#__PURE__*/css$2({
|
|
@@ -23659,7 +23677,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23659
23677
|
|
|
23660
23678
|
if (!isSearchable) {
|
|
23661
23679
|
// use a dummy input to maintain focus/blur functionality
|
|
23662
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
23680
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$l({
|
|
23663
23681
|
id: id,
|
|
23664
23682
|
innerRef: this.getInputRef,
|
|
23665
23683
|
onBlur: this.onInputBlur,
|
|
@@ -23673,7 +23691,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23673
23691
|
}, ariaAttributes));
|
|
23674
23692
|
}
|
|
23675
23693
|
|
|
23676
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
23694
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$l({}, commonProps, {
|
|
23677
23695
|
autoCapitalize: "none",
|
|
23678
23696
|
autoComplete: "off",
|
|
23679
23697
|
autoCorrect: "off",
|
|
@@ -23717,7 +23735,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23717
23735
|
isFocused = _this$state5.isFocused;
|
|
23718
23736
|
|
|
23719
23737
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
23720
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
23738
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$l({}, commonProps, {
|
|
23721
23739
|
key: "placeholder",
|
|
23722
23740
|
isDisabled: isDisabled,
|
|
23723
23741
|
isFocused: isFocused,
|
|
@@ -23731,7 +23749,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23731
23749
|
return selectValue.map(function (opt, index) {
|
|
23732
23750
|
var isOptionFocused = opt === focusedValue;
|
|
23733
23751
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
23734
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
23752
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$l({}, commonProps, {
|
|
23735
23753
|
components: {
|
|
23736
23754
|
Container: MultiValueContainer,
|
|
23737
23755
|
Label: MultiValueLabel,
|
|
@@ -23763,7 +23781,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23763
23781
|
}
|
|
23764
23782
|
|
|
23765
23783
|
var singleValue = selectValue[0];
|
|
23766
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
23784
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$l({}, commonProps, {
|
|
23767
23785
|
data: singleValue,
|
|
23768
23786
|
isDisabled: isDisabled
|
|
23769
23787
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -23789,7 +23807,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23789
23807
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
23790
23808
|
'aria-hidden': 'true'
|
|
23791
23809
|
};
|
|
23792
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
23810
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$l({}, commonProps, {
|
|
23793
23811
|
innerProps: innerProps,
|
|
23794
23812
|
isFocused: isFocused
|
|
23795
23813
|
}));
|
|
@@ -23809,7 +23827,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23809
23827
|
var innerProps = {
|
|
23810
23828
|
'aria-hidden': 'true'
|
|
23811
23829
|
};
|
|
23812
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
23830
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$l({}, commonProps, {
|
|
23813
23831
|
innerProps: innerProps,
|
|
23814
23832
|
isDisabled: isDisabled,
|
|
23815
23833
|
isFocused: isFocused
|
|
@@ -23827,7 +23845,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23827
23845
|
var commonProps = this.commonProps;
|
|
23828
23846
|
var isDisabled = this.props.isDisabled;
|
|
23829
23847
|
var isFocused = this.state.isFocused;
|
|
23830
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
23848
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$l({}, commonProps, {
|
|
23831
23849
|
isDisabled: isDisabled,
|
|
23832
23850
|
isFocused: isFocused
|
|
23833
23851
|
}));
|
|
@@ -23847,7 +23865,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23847
23865
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
23848
23866
|
'aria-hidden': 'true'
|
|
23849
23867
|
};
|
|
23850
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
23868
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$l({}, commonProps, {
|
|
23851
23869
|
innerProps: innerProps,
|
|
23852
23870
|
isDisabled: isDisabled,
|
|
23853
23871
|
isFocused: isFocused
|
|
@@ -23910,7 +23928,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23910
23928
|
onMouseOver: onHover,
|
|
23911
23929
|
tabIndex: -1
|
|
23912
23930
|
};
|
|
23913
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
23931
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$l({}, commonProps, {
|
|
23914
23932
|
innerProps: innerProps,
|
|
23915
23933
|
data: data,
|
|
23916
23934
|
isDisabled: isDisabled,
|
|
@@ -23934,7 +23952,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23934
23952
|
groupIndex = item.index;
|
|
23935
23953
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
23936
23954
|
var headingId = "".concat(groupId, "-heading");
|
|
23937
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
23955
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$l({}, commonProps, {
|
|
23938
23956
|
key: groupId,
|
|
23939
23957
|
data: _data,
|
|
23940
23958
|
options: options,
|
|
@@ -23973,12 +23991,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23973
23991
|
menuPosition: menuPosition,
|
|
23974
23992
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
23975
23993
|
};
|
|
23976
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
23994
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$l({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
23977
23995
|
var ref = _ref4.ref,
|
|
23978
23996
|
_ref4$placerProps = _ref4.placerProps,
|
|
23979
23997
|
placement = _ref4$placerProps.placement,
|
|
23980
23998
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
23981
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
23999
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$l({}, commonProps, menuPlacementProps, {
|
|
23982
24000
|
innerRef: ref,
|
|
23983
24001
|
innerProps: {
|
|
23984
24002
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -23993,7 +24011,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23993
24011
|
onBottomArrive: onMenuScrollToBottom,
|
|
23994
24012
|
lockEnabled: menuShouldBlockScroll
|
|
23995
24013
|
}, function (scrollTargetRef) {
|
|
23996
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
24014
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$l({}, commonProps, {
|
|
23997
24015
|
innerRef: function innerRef(instance) {
|
|
23998
24016
|
_this4.getMenuListRef(instance);
|
|
23999
24017
|
|
|
@@ -24008,7 +24026,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24008
24026
|
// so we use the same component. the actual portalling logic is forked
|
|
24009
24027
|
// within the component based on `menuPosition`
|
|
24010
24028
|
|
|
24011
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
24029
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$l({}, commonProps, {
|
|
24012
24030
|
appendTo: menuPortalTarget,
|
|
24013
24031
|
controlElement: this.controlRef,
|
|
24014
24032
|
menuPlacement: menuPlacement,
|
|
@@ -24073,7 +24091,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24073
24091
|
isFocused = _this$state6.isFocused,
|
|
24074
24092
|
selectValue = _this$state6.selectValue;
|
|
24075
24093
|
var focusableOptions = this.getFocusableOptions();
|
|
24076
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
24094
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$l({}, commonProps, {
|
|
24077
24095
|
id: this.getElementId('live-region'),
|
|
24078
24096
|
ariaSelection: ariaSelection,
|
|
24079
24097
|
focusedOption: focusedOption,
|
|
@@ -24099,7 +24117,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24099
24117
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
24100
24118
|
var isFocused = this.state.isFocused;
|
|
24101
24119
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
24102
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
24120
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$l({}, commonProps, {
|
|
24103
24121
|
className: className,
|
|
24104
24122
|
innerProps: {
|
|
24105
24123
|
id: id,
|
|
@@ -24107,7 +24125,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24107
24125
|
},
|
|
24108
24126
|
isDisabled: isDisabled,
|
|
24109
24127
|
isFocused: isFocused
|
|
24110
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
24128
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$l({}, commonProps, {
|
|
24111
24129
|
innerRef: this.getControlRef,
|
|
24112
24130
|
innerProps: {
|
|
24113
24131
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -24116,9 +24134,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24116
24134
|
isDisabled: isDisabled,
|
|
24117
24135
|
isFocused: isFocused,
|
|
24118
24136
|
menuIsOpen: menuIsOpen
|
|
24119
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
24137
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$l({}, commonProps, {
|
|
24120
24138
|
isDisabled: isDisabled
|
|
24121
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
24139
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$l({}, commonProps, {
|
|
24122
24140
|
isDisabled: isDisabled
|
|
24123
24141
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
24124
24142
|
}
|
|
@@ -24191,7 +24209,7 @@ Select$1.defaultProps = defaultProps;
|
|
|
24191
24209
|
|
|
24192
24210
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24193
24211
|
var baseSelectProps = useStateManager(props);
|
|
24194
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
24212
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$l({
|
|
24195
24213
|
ref: ref
|
|
24196
24214
|
}, baseSelectProps));
|
|
24197
24215
|
});
|
|
@@ -24199,9 +24217,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24199
24217
|
var ReactSelect = StateManagedSelect;
|
|
24200
24218
|
|
|
24201
24219
|
var _g$6;
|
|
24202
|
-
function _extends$
|
|
24220
|
+
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); }
|
|
24203
24221
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
24204
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24222
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
24205
24223
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24206
24224
|
viewBox: "0 0 28 28",
|
|
24207
24225
|
width: "1em",
|
|
@@ -24222,15 +24240,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
24222
24240
|
}))));
|
|
24223
24241
|
};
|
|
24224
24242
|
|
|
24225
|
-
var _path$
|
|
24226
|
-
function _extends$
|
|
24243
|
+
var _path$c;
|
|
24244
|
+
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); }
|
|
24227
24245
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
24228
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24246
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
24229
24247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24230
24248
|
width: "1em",
|
|
24231
24249
|
height: "1em",
|
|
24232
24250
|
viewBox: "0 0 24 24"
|
|
24233
|
-
}, props), _path$
|
|
24251
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24234
24252
|
stroke: "#06C",
|
|
24235
24253
|
strokeLinecap: "round",
|
|
24236
24254
|
strokeLinejoin: "round",
|
|
@@ -24242,9 +24260,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
24242
24260
|
};
|
|
24243
24261
|
|
|
24244
24262
|
var _g$5;
|
|
24245
|
-
function _extends$
|
|
24263
|
+
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); }
|
|
24246
24264
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
24247
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24265
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
24248
24266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24249
24267
|
width: "1em",
|
|
24250
24268
|
height: "1em",
|
|
@@ -24573,6 +24591,7 @@ Valid States of Checkbox:
|
|
|
24573
24591
|
5. disabled: false, checked: true, value: INTERMIDIATE
|
|
24574
24592
|
6. disabled: false, checked: true, value: CHECKED
|
|
24575
24593
|
*/
|
|
24594
|
+
// TODO: Associate label with input element
|
|
24576
24595
|
var Checkbox$1 = /** @class */ (function (_super) {
|
|
24577
24596
|
__extends$1(Checkbox, _super);
|
|
24578
24597
|
function Checkbox() {
|
|
@@ -24587,9 +24606,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
|
|
|
24587
24606
|
}(React.Component));
|
|
24588
24607
|
|
|
24589
24608
|
var _g$4;
|
|
24590
|
-
function _extends$
|
|
24609
|
+
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); }
|
|
24591
24610
|
var SvgIcSearch = function SvgIcSearch(props) {
|
|
24592
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24611
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
24593
24612
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24594
24613
|
viewBox: "0 0 24 24",
|
|
24595
24614
|
width: "1em",
|
|
@@ -24606,9 +24625,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
|
|
|
24606
24625
|
};
|
|
24607
24626
|
|
|
24608
24627
|
var _g$3;
|
|
24609
|
-
function _extends$
|
|
24628
|
+
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); }
|
|
24610
24629
|
var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
24611
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24630
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
24612
24631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24613
24632
|
width: "1em",
|
|
24614
24633
|
height: "1em",
|
|
@@ -24630,7 +24649,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
|
24630
24649
|
}))));
|
|
24631
24650
|
};
|
|
24632
24651
|
|
|
24633
|
-
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}";
|
|
24634
24653
|
styleInject(css_248z$5);
|
|
24635
24654
|
|
|
24636
24655
|
/**
|
|
@@ -24675,6 +24694,21 @@ var SearchBar = function (_a) {
|
|
|
24675
24694
|
handleSearchChange,
|
|
24676
24695
|
debounceTimeout,
|
|
24677
24696
|
]);
|
|
24697
|
+
// assuming initialSearchText will change if we are changing history otherwise will be constant and will not change
|
|
24698
|
+
// since on changing history we expect to make api call using useAsync so not applying handleEnter
|
|
24699
|
+
React.useEffect(function () {
|
|
24700
|
+
inputRef.current.value = initialSearchText;
|
|
24701
|
+
setShowClearButton(!!initialSearchText);
|
|
24702
|
+
}, [initialSearchText]);
|
|
24703
|
+
var _applySearch = function (value) {
|
|
24704
|
+
handleSearchChange(value);
|
|
24705
|
+
handleEnter(value);
|
|
24706
|
+
};
|
|
24707
|
+
var clearSearch = function () {
|
|
24708
|
+
inputRef.current.value = '';
|
|
24709
|
+
_applySearch('');
|
|
24710
|
+
setShowClearButton(false);
|
|
24711
|
+
};
|
|
24678
24712
|
var handleChange = function (e) {
|
|
24679
24713
|
var value = e.target.value;
|
|
24680
24714
|
setShowClearButton(!!value);
|
|
@@ -24685,23 +24719,16 @@ var SearchBar = function (_a) {
|
|
|
24685
24719
|
handleSearchChange(value);
|
|
24686
24720
|
}
|
|
24687
24721
|
};
|
|
24688
|
-
var _applySearch = function (value) {
|
|
24689
|
-
handleSearchChange(value);
|
|
24690
|
-
handleEnter(value);
|
|
24691
|
-
};
|
|
24692
24722
|
var handleKeyDown = function (e) {
|
|
24693
24723
|
var key = e.key;
|
|
24694
24724
|
if (key === 'Enter') {
|
|
24725
|
+
e.preventDefault();
|
|
24695
24726
|
var inputTarget = e.target;
|
|
24696
24727
|
var value = inputTarget.value.trim();
|
|
24697
24728
|
_applySearch(value);
|
|
24698
24729
|
}
|
|
24699
24730
|
};
|
|
24700
|
-
|
|
24701
|
-
inputRef.current.value = '';
|
|
24702
|
-
_applySearch('');
|
|
24703
|
-
};
|
|
24704
|
-
return (jsxRuntime.jsx("div", __assign({ className: containerClassName }, { children: jsxRuntime.jsxs("div", __assign({ className: "search-bar bcn-0 dc__block w-100 min-w-200 dc__position-rel en-2 bw-1 br-4 h-32" }, { children: [jsxRuntime.jsx(SvgIcSearch, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-18" }), jsxRuntime.jsx("input", __assign({ placeholder: "Search", "data-testid": "search-bar", type: "text" }, inputProps, { defaultValue: initialSearchText, className: "search-bar__input bcn-0 dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ".concat(showClearButton ? 'pr-30' : 'pr-10'), onChange: handleChange, onKeyDown: handleKeyDown, ref: inputRef })), showClearButton && (jsxRuntime.jsx("button", __assign({ className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5", type: "button", onClick: clearSearch, "aria-label": "Clear search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-18 icon-n4 dc__vertical-align-middle" }) })))] })) })));
|
|
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" }) })))] })) })));
|
|
24705
24732
|
};
|
|
24706
24733
|
|
|
24707
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}";
|
|
@@ -24840,9 +24867,9 @@ exports.ConsequenceAction = void 0;
|
|
|
24840
24867
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
24841
24868
|
|
|
24842
24869
|
var _g$2;
|
|
24843
|
-
function _extends$
|
|
24870
|
+
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); }
|
|
24844
24871
|
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
24845
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24872
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
24846
24873
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24847
24874
|
width: "1em",
|
|
24848
24875
|
height: "1em",
|
|
@@ -24921,16 +24948,16 @@ function DeleteComponent(_a) {
|
|
|
24921
24948
|
return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
|
|
24922
24949
|
}
|
|
24923
24950
|
|
|
24924
|
-
var _path$
|
|
24925
|
-
function _extends$
|
|
24951
|
+
var _path$b;
|
|
24952
|
+
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); }
|
|
24926
24953
|
var SvgIcPencil = function SvgIcPencil(props) {
|
|
24927
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24954
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
24928
24955
|
width: "1em",
|
|
24929
24956
|
height: "1em",
|
|
24930
24957
|
viewBox: "0 0 20 20",
|
|
24931
24958
|
fill: "none",
|
|
24932
24959
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24933
|
-
}, props), _path$
|
|
24960
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24934
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",
|
|
24935
24962
|
stroke: "#596168",
|
|
24936
24963
|
strokeWidth: 1.5,
|
|
@@ -24939,19 +24966,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
|
|
|
24939
24966
|
})));
|
|
24940
24967
|
};
|
|
24941
24968
|
|
|
24942
|
-
var _path$
|
|
24943
|
-
function _extends$
|
|
24969
|
+
var _path$a, _path2$1, _path3;
|
|
24970
|
+
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); }
|
|
24944
24971
|
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
24945
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24972
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
24946
24973
|
width: "1em",
|
|
24947
24974
|
height: "1em",
|
|
24948
24975
|
viewBox: "0 0 12 12",
|
|
24949
24976
|
fill: "none",
|
|
24950
24977
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24951
|
-
}, props), _path$
|
|
24978
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24952
24979
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
24953
24980
|
fill: "#767D84"
|
|
24954
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24981
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24955
24982
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
24956
24983
|
stroke: "#596168",
|
|
24957
24984
|
strokeWidth: 1.5,
|
|
@@ -24966,15 +24993,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
|
24966
24993
|
})));
|
|
24967
24994
|
};
|
|
24968
24995
|
|
|
24969
|
-
var _path$
|
|
24970
|
-
function _extends$
|
|
24996
|
+
var _path$9;
|
|
24997
|
+
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); }
|
|
24971
24998
|
var SvgIcMinus = function SvgIcMinus(props) {
|
|
24972
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24999
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
24973
25000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24974
25001
|
width: "1em",
|
|
24975
25002
|
height: "1em",
|
|
24976
25003
|
viewBox: "0 0 14 14"
|
|
24977
|
-
}, props), _path$
|
|
25004
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24978
25005
|
fill: "#959BA1",
|
|
24979
25006
|
className: "ic-minus_svg__fill-color",
|
|
24980
25007
|
fillRule: "evenodd",
|
|
@@ -24983,9 +25010,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
|
|
|
24983
25010
|
};
|
|
24984
25011
|
|
|
24985
25012
|
var _g$1;
|
|
24986
|
-
function _extends$
|
|
25013
|
+
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); }
|
|
24987
25014
|
var SvgIcWarning = function SvgIcWarning(props) {
|
|
24988
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25015
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
24989
25016
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24990
25017
|
width: "1em",
|
|
24991
25018
|
height: "1em",
|
|
@@ -25005,9 +25032,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
|
|
|
25005
25032
|
};
|
|
25006
25033
|
|
|
25007
25034
|
var _g;
|
|
25008
|
-
function _extends$
|
|
25035
|
+
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); }
|
|
25009
25036
|
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
25010
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25037
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
25011
25038
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25012
25039
|
width: "1em",
|
|
25013
25040
|
height: "1em",
|
|
@@ -25024,16 +25051,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
|
25024
25051
|
}))));
|
|
25025
25052
|
};
|
|
25026
25053
|
|
|
25027
|
-
var _path$
|
|
25028
|
-
function _extends$
|
|
25054
|
+
var _path$8;
|
|
25055
|
+
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); }
|
|
25029
25056
|
var SvgIcEnter = function SvgIcEnter(props) {
|
|
25030
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25057
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
25031
25058
|
width: "1em",
|
|
25032
25059
|
height: "1em",
|
|
25033
25060
|
viewBox: "0 0 16 16",
|
|
25034
25061
|
fill: "none",
|
|
25035
25062
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25036
|
-
}, props), _path$
|
|
25063
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25037
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",
|
|
25038
25065
|
fill: "#3B444C"
|
|
25039
25066
|
})));
|
|
@@ -25439,15 +25466,15 @@ function Grid(_a) {
|
|
|
25439
25466
|
return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
|
|
25440
25467
|
}
|
|
25441
25468
|
|
|
25442
|
-
var _path$
|
|
25443
|
-
function _extends$
|
|
25469
|
+
var _path$7;
|
|
25470
|
+
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); }
|
|
25444
25471
|
var SvgIcCopy = function SvgIcCopy(props) {
|
|
25445
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25472
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
25446
25473
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25447
25474
|
width: "1em",
|
|
25448
25475
|
height: "1em",
|
|
25449
25476
|
viewBox: "0 0 20 20"
|
|
25450
|
-
}, props), _path$
|
|
25477
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25451
25478
|
fill: "#767D84",
|
|
25452
25479
|
fillRule: "evenodd",
|
|
25453
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"
|
|
@@ -28227,9 +28254,9 @@ var translateString = function (stringToTranslate, params) {
|
|
|
28227
28254
|
return utils.englishStringTranslator(stringToTranslate, params);
|
|
28228
28255
|
}
|
|
28229
28256
|
};
|
|
28230
|
-
var getCommonSelectStyle = function (styleOverrides) {
|
|
28257
|
+
var getCommonSelectStyle$1 = function (styleOverrides) {
|
|
28231
28258
|
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
28232
|
-
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) {
|
|
28233
28260
|
return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
|
|
28234
28261
|
} }, styleOverrides);
|
|
28235
28262
|
};
|
|
@@ -28279,15 +28306,15 @@ var getInferredTypeFromValueType = function (value) {
|
|
|
28279
28306
|
}
|
|
28280
28307
|
};
|
|
28281
28308
|
|
|
28282
|
-
var _path$
|
|
28283
|
-
function _extends$
|
|
28309
|
+
var _path$6;
|
|
28310
|
+
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); }
|
|
28284
28311
|
var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
28285
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28312
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
28286
28313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28287
28314
|
width: "1em",
|
|
28288
28315
|
height: "1em",
|
|
28289
28316
|
viewBox: "0 0 24 24"
|
|
28290
|
-
}, props), _path$
|
|
28317
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28291
28318
|
fill: "#999",
|
|
28292
28319
|
className: "ic-chevron-down_svg__fill-color",
|
|
28293
28320
|
fillRule: "nonzero",
|
|
@@ -28295,7 +28322,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
|
28295
28322
|
})));
|
|
28296
28323
|
};
|
|
28297
28324
|
|
|
28298
|
-
var commonStyles = getCommonSelectStyle();
|
|
28325
|
+
var commonStyles = getCommonSelectStyle$1();
|
|
28299
28326
|
var MenuList = function (_a) {
|
|
28300
28327
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
28301
28328
|
return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
|
|
@@ -28346,16 +28373,16 @@ var Form = RJSF.default;
|
|
|
28346
28373
|
var validator = RJSFValidator.default;
|
|
28347
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 }))); };
|
|
28348
28375
|
|
|
28349
|
-
var _style, _rect;
|
|
28350
|
-
function _extends$
|
|
28376
|
+
var _style, _rect$2;
|
|
28377
|
+
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); }
|
|
28351
28378
|
var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
|
|
28352
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28379
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
28353
28380
|
width: "1em",
|
|
28354
28381
|
height: "1em",
|
|
28355
28382
|
viewBox: "0 0 100 100",
|
|
28356
28383
|
fill: "none",
|
|
28357
28384
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28358
|
-
}, props), _style || (_style = /*#__PURE__*/React__namespace.createElement("style", null, "@keyframes path-fill{0%,30%,to{fill:#3989d9}45%{fill:#abcff3}}@keyframes top-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(-6px) translateY(-6px) rotate(15deg);transform-origin:center center}}@keyframes bottom-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(6px) translateY(6px) rotate(15deg);transform-origin:center center}}@keyframes rotate-group{0%,44%{transform:rotate(0deg)}to{transform:rotate(360deg);animation-timing-function:ease-in-out}}")), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
28385
|
+
}, props), _style || (_style = /*#__PURE__*/React__namespace.createElement("style", null, "@keyframes path-fill{0%,30%,to{fill:#3989d9}45%{fill:#abcff3}}@keyframes top-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(-6px) translateY(-6px) rotate(15deg);transform-origin:center center}}@keyframes bottom-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(6px) translateY(6px) rotate(15deg);transform-origin:center center}}@keyframes rotate-group{0%,44%{transform:rotate(0deg)}to{transform:rotate(360deg);animation-timing-function:ease-in-out}}")), _rect$2 || (_rect$2 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
28359
28386
|
width: 100,
|
|
28360
28387
|
height: 100,
|
|
28361
28388
|
rx: 20,
|
|
@@ -28484,8 +28511,9 @@ var handleAddCD = function (_a) {
|
|
|
28484
28511
|
handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
|
|
28485
28512
|
};
|
|
28486
28513
|
|
|
28514
|
+
// TODO: label association with input
|
|
28487
28515
|
function CustomInput(_a) {
|
|
28488
|
-
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 ?
|
|
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;
|
|
28489
28517
|
function handleError(error) {
|
|
28490
28518
|
if (!Array.isArray(error)) {
|
|
28491
28519
|
return [error];
|
|
@@ -28534,10 +28562,10 @@ function CustomInput(_a) {
|
|
|
28534
28562
|
return (jsxRuntime.jsx("label", __assign({ className: "form__label ".concat(labelClassName), "data-testid": "label-".concat(dataTestid) }, { children: renderInputLabelConditionally() })));
|
|
28535
28563
|
}
|
|
28536
28564
|
};
|
|
28537
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top ".concat(inputWrapClassName) }, { children: [renderInputLabel(), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
|
|
28565
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top ".concat(inputWrapClassName) }, { children: [renderInputLabel(), jsxRuntime.jsx("input", __assign({ "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
|
|
28538
28566
|
e.persist();
|
|
28539
28567
|
onChange(e);
|
|
28540
|
-
}, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus, readOnly: readOnly, ref: ref, onKeyPress: onKeyPress, defaultValue: defaultValue, onKeyDown: onKeyDown, required: required }), getInputError(), helperText && (jsxRuntime.jsxs("div", __assign({ className: "form__text-field-info" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon form__icon--info" }), jsxRuntime.jsx("p", __assign({ className: "sentence-case" }, { children: helperText }))] })))] })));
|
|
28568
|
+
}, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus, readOnly: readOnly, ref: ref, onKeyPress: onKeyPress, defaultValue: defaultValue, onKeyDown: onKeyDown, required: required }, inputProps)), getInputError(), helperText && (jsxRuntime.jsxs("div", __assign({ className: "form__text-field-info" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon form__icon--info" }), jsxRuntime.jsx("p", __assign({ className: "sentence-case" }, { children: helperText }))] })))] })));
|
|
28541
28569
|
}
|
|
28542
28570
|
|
|
28543
28571
|
exports.DraggablePositionVariant = void 0;
|
|
@@ -28616,23 +28644,26 @@ function DraggableWrapper(_a) {
|
|
|
28616
28644
|
y: data.y,
|
|
28617
28645
|
});
|
|
28618
28646
|
}
|
|
28619
|
-
return (
|
|
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: {
|
|
28620
28650
|
zIndex: zIndex,
|
|
28621
28651
|
} }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
|
|
28622
28652
|
zIndex: zIndex,
|
|
28653
|
+
pointerEvents: 'auto',
|
|
28623
28654
|
} }, { children: children })) })) })));
|
|
28624
28655
|
}
|
|
28625
28656
|
|
|
28626
|
-
var _path;
|
|
28627
|
-
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); }
|
|
28657
|
+
var _path$5;
|
|
28658
|
+
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); }
|
|
28628
28659
|
var SvgIcDrag = function SvgIcDrag(props) {
|
|
28629
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
28660
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
28630
28661
|
width: "1em",
|
|
28631
28662
|
height: "1em",
|
|
28632
28663
|
viewBox: "0 0 16 16",
|
|
28633
28664
|
fill: "none",
|
|
28634
28665
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28635
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28666
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28636
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",
|
|
28637
28668
|
fill: "#596168"
|
|
28638
28669
|
})));
|
|
@@ -28754,12 +28785,1142 @@ var Pagination = function (_a) {
|
|
|
28754
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 })] })))] })));
|
|
28755
28786
|
};
|
|
28756
28787
|
|
|
28788
|
+
var _path$4, _path2;
|
|
28789
|
+
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); }
|
|
28790
|
+
var SvgIcCpu = function SvgIcCpu(props) {
|
|
28791
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
28792
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28793
|
+
width: "1em",
|
|
28794
|
+
height: "1em",
|
|
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",
|
|
28799
|
+
stroke: "#596168",
|
|
28800
|
+
strokeWidth: 1.5,
|
|
28801
|
+
strokeLinecap: "round",
|
|
28802
|
+
strokeLinejoin: "round"
|
|
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$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); }
|
|
28811
|
+
var SvgIcMemory = function SvgIcMemory(props) {
|
|
28812
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
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",
|
|
28820
|
+
stroke: "#596168",
|
|
28821
|
+
strokeWidth: 1.5,
|
|
28822
|
+
strokeLinecap: "round",
|
|
28823
|
+
strokeLinejoin: "round"
|
|
28824
|
+
})));
|
|
28825
|
+
};
|
|
28826
|
+
|
|
28827
|
+
var _path$2;
|
|
28828
|
+
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); }
|
|
28829
|
+
var SvgIcTimer = function SvgIcTimer(props) {
|
|
28830
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
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
|
+
STEP: 0.01,
|
|
28904
|
+
MIN: 0,
|
|
28905
|
+
DECIMAL_PLACES: 2,
|
|
28906
|
+
};
|
|
28907
|
+
var BUILD_INFRA_TEXT = {
|
|
28908
|
+
HEADING: 'Build Infra Configuration',
|
|
28909
|
+
EDIT_SUBMIT: 'Save changes',
|
|
28910
|
+
SAVE_SUBMIT: 'Save',
|
|
28911
|
+
EDIT_CANCEL: 'Cancel',
|
|
28912
|
+
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.',
|
|
28913
|
+
DESCRIPTION_LABEL: 'Description',
|
|
28914
|
+
DESCRIPTION_PLACEHOLDER: 'Enter a description here',
|
|
28915
|
+
PROFILE_LABEL: 'Profile name',
|
|
28916
|
+
PROFILE_PLACEHOLDER: 'Eg. java or node',
|
|
28917
|
+
INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
|
|
28918
|
+
SUBMIT_BUTTON_TIPPY: {
|
|
28919
|
+
INVALID_INPUT: 'Valid input is required for all mandatory fields.',
|
|
28920
|
+
REQUEST_IN_PROGRESS: 'Request in progress.',
|
|
28921
|
+
},
|
|
28922
|
+
VALIDATE_REQUEST_LIMIT: {
|
|
28923
|
+
// Might use the constants from BUILD_INFRA_INPUT_CONSTRAINTS even for NEGATIVE_REQUEST and NEGATIVE_LIMIT
|
|
28924
|
+
NEGATIVE_REQUEST: 'Request should be a positive number.',
|
|
28925
|
+
NEGATIVE_LIMIT: 'Limit should be a positive number.',
|
|
28926
|
+
REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
|
|
28927
|
+
CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
|
|
28928
|
+
REQUEST_DECIMAL_PLACES: "Request should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
|
|
28929
|
+
LIMIT_DECIMAL_PLACES: "Limit should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
|
|
28930
|
+
},
|
|
28931
|
+
getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
|
|
28932
|
+
getSubmitSuccessMessage: function (profileName, isEdited) {
|
|
28933
|
+
return "".concat(profileName, " profile is ").concat(isEdited ? 'updated' : 'created');
|
|
28934
|
+
},
|
|
28935
|
+
PROFILE_NOT_FOUND: {
|
|
28936
|
+
title: 'Profile not found',
|
|
28937
|
+
subTitle: 'The profile you are looking for does not exist.',
|
|
28938
|
+
},
|
|
28939
|
+
INVALID_FORM_MESSAGE: 'Valid input is required for all mandatory fields.',
|
|
28940
|
+
};
|
|
28941
|
+
var BUILD_INFRA_BREADCRUMB = {
|
|
28942
|
+
alias: {
|
|
28943
|
+
'global-config': null,
|
|
28944
|
+
'build-infra': {
|
|
28945
|
+
component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
|
|
28946
|
+
linked: false,
|
|
28947
|
+
},
|
|
28948
|
+
},
|
|
28949
|
+
};
|
|
28950
|
+
// TODO: move heading to component itself
|
|
28951
|
+
var BUILD_INFRA_FORM_FIELDS = [
|
|
28952
|
+
{
|
|
28953
|
+
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)" })),
|
|
28954
|
+
marker: SvgIcCpu,
|
|
28955
|
+
actions: [
|
|
28956
|
+
{
|
|
28957
|
+
actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
|
|
28958
|
+
label: 'Request',
|
|
28959
|
+
placeholder: 'Type CPU request',
|
|
28960
|
+
},
|
|
28961
|
+
{
|
|
28962
|
+
actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
|
|
28963
|
+
label: 'Limit',
|
|
28964
|
+
placeholder: 'Type CPU limit',
|
|
28965
|
+
},
|
|
28966
|
+
],
|
|
28967
|
+
locator: exports.BuildInfraLocators.CPU,
|
|
28968
|
+
},
|
|
28969
|
+
{
|
|
28970
|
+
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)" })),
|
|
28971
|
+
marker: SvgIcMemory,
|
|
28972
|
+
actions: [
|
|
28973
|
+
{
|
|
28974
|
+
actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
|
|
28975
|
+
label: 'Request',
|
|
28976
|
+
placeholder: 'Type memory request',
|
|
28977
|
+
},
|
|
28978
|
+
{
|
|
28979
|
+
actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
|
|
28980
|
+
label: 'Limit',
|
|
28981
|
+
placeholder: 'Type memory limit',
|
|
28982
|
+
},
|
|
28983
|
+
],
|
|
28984
|
+
locator: exports.BuildInfraLocators.MEMORY,
|
|
28985
|
+
},
|
|
28986
|
+
{
|
|
28987
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Build timeout" })),
|
|
28988
|
+
marker: SvgIcTimer,
|
|
28989
|
+
actions: [
|
|
28990
|
+
{
|
|
28991
|
+
actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
|
|
28992
|
+
label: 'Timeout',
|
|
28993
|
+
placeholder: 'Type build timeout',
|
|
28994
|
+
},
|
|
28995
|
+
],
|
|
28996
|
+
locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
28997
|
+
},
|
|
28998
|
+
];
|
|
28999
|
+
var PROFILE_INPUT_ERROR_FIELDS = Object.fromEntries(Object.values(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (value) { return [value, null]; }));
|
|
29000
|
+
// 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
|
|
29001
|
+
var CREATE_MODE_REQUIRED_INPUT_FIELDS = [exports.BuildInfraMetaConfigTypes.NAME];
|
|
29002
|
+
var DEFAULT_PROFILE_NAME = 'default';
|
|
29003
|
+
var CREATE_PROFILE_BASE_VALUE = {
|
|
29004
|
+
name: '',
|
|
29005
|
+
description: '',
|
|
29006
|
+
type: exports.BuildInfraProfileVariants.NORMAL,
|
|
29007
|
+
appCount: 0,
|
|
29008
|
+
};
|
|
29009
|
+
var CREATE_VIEW_CHECKED_CONFIGS = (_a$1 = {},
|
|
29010
|
+
_a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
|
|
29011
|
+
_a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
|
|
29012
|
+
_a$1);
|
|
29013
|
+
var BUILD_INFRA_TEST_IDS = {
|
|
29014
|
+
SUBMIT_BUTTON: 'build-infra-submit-button',
|
|
29015
|
+
CANCEL_BUTTON: 'build-infra-cancel-button',
|
|
29016
|
+
};
|
|
29017
|
+
|
|
29018
|
+
var Descriptor = function (_a) {
|
|
29019
|
+
var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children, tippyInfoText = _a.tippyInfoText, tippyAdditionalContent = _a.tippyAdditionalContent;
|
|
29020
|
+
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] })));
|
|
29021
|
+
};
|
|
29022
|
+
|
|
29023
|
+
var Footer = function (_a) {
|
|
29024
|
+
var disabled = _a.disabled, handleCancel = _a.handleCancel, editProfile = _a.editProfile, loading = _a.loading;
|
|
29025
|
+
var disableMessage = disabled
|
|
29026
|
+
? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
|
|
29027
|
+
: BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
|
|
29028
|
+
var getButtonText = function () {
|
|
29029
|
+
if (editProfile) {
|
|
29030
|
+
return BUILD_INFRA_TEXT.EDIT_SUBMIT;
|
|
29031
|
+
}
|
|
29032
|
+
return BUILD_INFRA_TEXT.SAVE_SUBMIT;
|
|
29033
|
+
};
|
|
29034
|
+
var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
|
|
29035
|
+
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 })))] })));
|
|
29036
|
+
};
|
|
29037
|
+
|
|
29038
|
+
var getBaseProfileObject = function (fromCreateView, profile) {
|
|
29039
|
+
if (fromCreateView) {
|
|
29040
|
+
return CREATE_PROFILE_BASE_VALUE;
|
|
29041
|
+
}
|
|
29042
|
+
return {
|
|
29043
|
+
id: profile.id,
|
|
29044
|
+
name: profile.name,
|
|
29045
|
+
description: profile.description,
|
|
29046
|
+
type: profile.type,
|
|
29047
|
+
appCount: profile.appCount,
|
|
29048
|
+
};
|
|
29049
|
+
};
|
|
29050
|
+
// Would receive a single profile and return transformed response
|
|
29051
|
+
var getTransformedBuildInfraProfileResponse = function (_a) {
|
|
29052
|
+
var _b, _c, _d;
|
|
29053
|
+
var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
|
|
29054
|
+
// Assuming would contain all the keys
|
|
29055
|
+
var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
|
|
29056
|
+
acc[configuration.key] = configuration;
|
|
29057
|
+
return acc;
|
|
29058
|
+
}, {})) !== null && _b !== void 0 ? _b : {};
|
|
29059
|
+
var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
|
|
29060
|
+
acc[configuration.key] = configuration;
|
|
29061
|
+
return acc;
|
|
29062
|
+
}, {})) !== null && _d !== void 0 ? _d : {};
|
|
29063
|
+
var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
|
|
29064
|
+
var _a, _b;
|
|
29065
|
+
var defaultConfiguration = defaultConfigurationsMap[key];
|
|
29066
|
+
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;
|
|
29067
|
+
// Pushing default value in configurations in case we de-activate the configuration
|
|
29068
|
+
var defaultValue = {
|
|
29069
|
+
value: defaultConfiguration.value,
|
|
29070
|
+
unit: defaultConfiguration.unit,
|
|
29071
|
+
};
|
|
29072
|
+
if (fromCreateView) {
|
|
29073
|
+
acc[key] = {
|
|
29074
|
+
key: key,
|
|
29075
|
+
value: defaultConfiguration.value,
|
|
29076
|
+
unit: defaultConfiguration.unit,
|
|
29077
|
+
active: (_b = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _b !== void 0 ? _b : false,
|
|
29078
|
+
defaultValue: defaultValue,
|
|
29079
|
+
};
|
|
29080
|
+
return acc;
|
|
29081
|
+
}
|
|
29082
|
+
if (profileConfiguration) {
|
|
29083
|
+
acc[key] = __assign(__assign({}, profileConfiguration), { defaultValue: defaultValue });
|
|
29084
|
+
return acc;
|
|
29085
|
+
}
|
|
29086
|
+
// Removing id from it since we do not have a configuration
|
|
29087
|
+
// While generating payload, we will check on the basis of id and active flag.
|
|
29088
|
+
acc[key] = {
|
|
29089
|
+
key: key,
|
|
29090
|
+
value: defaultConfiguration.value,
|
|
29091
|
+
// saving profile name as undefined and this would be a check, if we are deriving from default or not
|
|
29092
|
+
unit: defaultConfiguration.unit,
|
|
29093
|
+
active: false,
|
|
29094
|
+
defaultValue: defaultValue,
|
|
29095
|
+
};
|
|
29096
|
+
return acc;
|
|
29097
|
+
}, {});
|
|
29098
|
+
return {
|
|
29099
|
+
configurationUnits: configurationUnits,
|
|
29100
|
+
profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
|
|
29101
|
+
};
|
|
29102
|
+
};
|
|
29103
|
+
var getBuildInfraProfileByName = function (_a) {
|
|
29104
|
+
var name = _a.name, fromCreateView = _a.fromCreateView;
|
|
29105
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
29106
|
+
var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
|
|
29107
|
+
return __generator(this, function (_c) {
|
|
29108
|
+
switch (_c.label) {
|
|
29109
|
+
case 0:
|
|
29110
|
+
_c.trys.push([0, 2, , 3]);
|
|
29111
|
+
return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
|
|
29112
|
+
case 1:
|
|
29113
|
+
response = _c.sent();
|
|
29114
|
+
_b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
|
|
29115
|
+
return [2 /*return*/, getTransformedBuildInfraProfileResponse({
|
|
29116
|
+
configurationUnits: configurationUnits,
|
|
29117
|
+
defaultConfigurations: defaultConfigurations,
|
|
29118
|
+
profile: profile,
|
|
29119
|
+
fromCreateView: fromCreateView,
|
|
29120
|
+
})];
|
|
29121
|
+
case 2:
|
|
29122
|
+
error_1 = _c.sent();
|
|
29123
|
+
showError(error_1);
|
|
29124
|
+
throw error_1;
|
|
29125
|
+
case 3: return [2 /*return*/];
|
|
29126
|
+
}
|
|
29127
|
+
});
|
|
29128
|
+
});
|
|
29129
|
+
};
|
|
29130
|
+
var getBuildInfraProfilePayload = function (profileInput) {
|
|
29131
|
+
var currentConfigurations = profileInput.configurations;
|
|
29132
|
+
var configurationKeys = Object.keys(currentConfigurations);
|
|
29133
|
+
// would only keep the configurations with id or active flag as true
|
|
29134
|
+
var configurations = configurationKeys.reduce(function (acc, key) {
|
|
29135
|
+
var configuration = currentConfigurations[key];
|
|
29136
|
+
if (configuration.id || configuration.active) {
|
|
29137
|
+
acc.push({
|
|
29138
|
+
id: configuration.id,
|
|
29139
|
+
key: key,
|
|
29140
|
+
value: Number(configuration.value),
|
|
29141
|
+
unit: configuration.unit,
|
|
29142
|
+
active: configuration.active,
|
|
29143
|
+
});
|
|
29144
|
+
}
|
|
29145
|
+
return acc;
|
|
29146
|
+
}, []);
|
|
29147
|
+
var payload = {
|
|
29148
|
+
name: profileInput.name,
|
|
29149
|
+
description: profileInput.description,
|
|
29150
|
+
type: profileInput.type,
|
|
29151
|
+
configurations: configurations,
|
|
29152
|
+
};
|
|
29153
|
+
return payload;
|
|
29154
|
+
};
|
|
29155
|
+
var updateBuildInfraProfile = function (_a) {
|
|
29156
|
+
var name = _a.name, profileInput = _a.profileInput;
|
|
29157
|
+
var payload = getBuildInfraProfilePayload(profileInput);
|
|
29158
|
+
return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
|
|
29159
|
+
};
|
|
29160
|
+
var createBuildInfraProfile = function (_a) {
|
|
29161
|
+
var profileInput = _a.profileInput;
|
|
29162
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
29163
|
+
var payload;
|
|
29164
|
+
return __generator(this, function (_b) {
|
|
29165
|
+
payload = getBuildInfraProfilePayload(profileInput);
|
|
29166
|
+
return [2 /*return*/, post(ROUTES.INFRA_CONFIG_PROFILE, payload)];
|
|
29167
|
+
});
|
|
29168
|
+
});
|
|
29169
|
+
};
|
|
29170
|
+
|
|
29171
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
29172
|
+
var NOT_FOUND_DEFAULT_TEXT = {
|
|
29173
|
+
title: 'Resource not found',
|
|
29174
|
+
subTitle: 'The resource you are looking for does not exist',
|
|
29175
|
+
};
|
|
29176
|
+
|
|
29177
|
+
var APIResponseHandler = function (_a) {
|
|
29178
|
+
var _b, _c;
|
|
29179
|
+
var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
|
|
29180
|
+
// keeping it above loading since, not expected to send a call if not authorized
|
|
29181
|
+
if (notAuthorized) {
|
|
29182
|
+
return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
|
|
29183
|
+
}
|
|
29184
|
+
if (isLoading) {
|
|
29185
|
+
return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
|
|
29186
|
+
}
|
|
29187
|
+
if (error) {
|
|
29188
|
+
// TODO: Can extend ErrorScreenNotFound
|
|
29189
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
|
|
29190
|
+
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 }));
|
|
29191
|
+
}
|
|
29192
|
+
return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
|
|
29193
|
+
}
|
|
29194
|
+
// Had to add this since while using it is throwing ts error
|
|
29195
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
29196
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
29197
|
+
};
|
|
29198
|
+
|
|
29199
|
+
var getCommonSelectStyle = function (styleOverrides) {
|
|
29200
|
+
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29201
|
+
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));
|
|
29202
|
+
};
|
|
29203
|
+
var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
|
|
29204
|
+
if (isSelected) {
|
|
29205
|
+
return 'var(--B100)';
|
|
29206
|
+
}
|
|
29207
|
+
if (isFocused) {
|
|
29208
|
+
return 'var(--N50)';
|
|
29209
|
+
}
|
|
29210
|
+
return 'var(--white)';
|
|
29211
|
+
};
|
|
29212
|
+
var getCustomOptionSelectionStyle = function (styleOverrides) {
|
|
29213
|
+
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29214
|
+
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)); };
|
|
29215
|
+
};
|
|
29216
|
+
var SelectOption = function (props) {
|
|
29217
|
+
var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
|
|
29218
|
+
selectProps.styles.option = getCustomOptionSelectionStyle(style);
|
|
29219
|
+
var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
|
|
29220
|
+
return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
|
|
29221
|
+
};
|
|
29222
|
+
|
|
29223
|
+
var BulkSelectionDropdownItems = function (_a) {
|
|
29224
|
+
var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
|
|
29225
|
+
var handleSelect = function () {
|
|
29226
|
+
handleBulkSelection({
|
|
29227
|
+
action: locator,
|
|
29228
|
+
});
|
|
29229
|
+
};
|
|
29230
|
+
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 ".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] })));
|
|
29231
|
+
};
|
|
29232
|
+
|
|
29233
|
+
exports.BulkSelectionEvents = void 0;
|
|
29234
|
+
(function (BulkSelectionEvents) {
|
|
29235
|
+
BulkSelectionEvents["CLEAR_ALL_SELECTIONS"] = "CLEAR_ALL_SELECTIONS";
|
|
29236
|
+
BulkSelectionEvents["CLEAR_IDENTIFIERS"] = "CLEAR_IDENTIFIERS";
|
|
29237
|
+
BulkSelectionEvents["SELECT_ALL_ACROSS_PAGES"] = "SELECT_ALL_ACROSS_PAGES";
|
|
29238
|
+
BulkSelectionEvents["SELECT_ALL_ON_PAGE"] = "SELECT_ALL_ON_PAGE";
|
|
29239
|
+
BulkSelectionEvents["SELECT_IDENTIFIER"] = "SELECT_IDENTIFIER";
|
|
29240
|
+
BulkSelectionEvents["CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION"] = "CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION";
|
|
29241
|
+
BulkSelectionEvents["CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES"] = "CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES";
|
|
29242
|
+
})(exports.BulkSelectionEvents || (exports.BulkSelectionEvents = {}));
|
|
29243
|
+
exports.SelectAllDialogStatus = void 0;
|
|
29244
|
+
(function (SelectAllDialogStatus) {
|
|
29245
|
+
SelectAllDialogStatus["OPEN"] = "OPEN";
|
|
29246
|
+
SelectAllDialogStatus["CLOSED"] = "CLOSED";
|
|
29247
|
+
})(exports.SelectAllDialogStatus || (exports.SelectAllDialogStatus = {}));
|
|
29248
|
+
|
|
29249
|
+
var _a;
|
|
29250
|
+
var BULK_DROPDOWN_TEST_ID = 'bulk-selection-pop-up-menu';
|
|
29251
|
+
var BulkSelectionOptionsLabels = (_a = {},
|
|
29252
|
+
_a[exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE] = 'All on this page',
|
|
29253
|
+
_a[exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES] = 'All across pages',
|
|
29254
|
+
_a[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS] = 'Clear all selections',
|
|
29255
|
+
_a);
|
|
29256
|
+
// Considering application can not be named as *
|
|
29257
|
+
var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
|
|
29258
|
+
var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
|
|
29259
|
+
|
|
29260
|
+
var _rect$1, _path$1;
|
|
29261
|
+
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); }
|
|
29262
|
+
var SvgIcCheckSquare = function SvgIcCheckSquare(props) {
|
|
29263
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
29264
|
+
width: "1em",
|
|
29265
|
+
height: "1em",
|
|
29266
|
+
viewBox: "0 0 16 16",
|
|
29267
|
+
fill: "none",
|
|
29268
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29269
|
+
}, props), _rect$1 || (_rect$1 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
29270
|
+
x: 2,
|
|
29271
|
+
y: 2,
|
|
29272
|
+
width: 12,
|
|
29273
|
+
height: 12,
|
|
29274
|
+
rx: 2,
|
|
29275
|
+
stroke: "#596168",
|
|
29276
|
+
strokeWidth: 1.5,
|
|
29277
|
+
strokeLinecap: "round",
|
|
29278
|
+
strokeLinejoin: "round"
|
|
29279
|
+
})), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29280
|
+
d: "m11.208 5.958-4.083 4.083L5.083 8",
|
|
29281
|
+
stroke: "#596168",
|
|
29282
|
+
strokeWidth: 1.5,
|
|
29283
|
+
strokeLinecap: "round",
|
|
29284
|
+
strokeLinejoin: "round"
|
|
29285
|
+
})));
|
|
29286
|
+
};
|
|
29287
|
+
|
|
29288
|
+
var _rect, _path;
|
|
29289
|
+
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); }
|
|
29290
|
+
var SvgIcCheckAll = function SvgIcCheckAll(props) {
|
|
29291
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
29292
|
+
width: "1em",
|
|
29293
|
+
height: "1em",
|
|
29294
|
+
viewBox: "0 0 17 17",
|
|
29295
|
+
fill: "none",
|
|
29296
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29297
|
+
}, props), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
29298
|
+
x: 2,
|
|
29299
|
+
y: 2,
|
|
29300
|
+
width: 11.2,
|
|
29301
|
+
height: 11.2,
|
|
29302
|
+
rx: 2,
|
|
29303
|
+
stroke: "#596168",
|
|
29304
|
+
strokeWidth: 1.5,
|
|
29305
|
+
strokeLinecap: "round",
|
|
29306
|
+
strokeLinejoin: "round"
|
|
29307
|
+
})), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29308
|
+
d: "M15.467 5.866v5.6a4 4 0 0 1-4 4h-5.6M10.35 5.85l-3.5 3.5L5.1 7.6",
|
|
29309
|
+
stroke: "#596168",
|
|
29310
|
+
strokeWidth: 1.5,
|
|
29311
|
+
strokeLinecap: "round",
|
|
29312
|
+
strokeLinejoin: "round"
|
|
29313
|
+
})));
|
|
29314
|
+
};
|
|
29315
|
+
|
|
29316
|
+
var BulkSelection = function (_a) {
|
|
29317
|
+
var checkboxValue = _a.checkboxValue, isChecked = _a.isChecked, selectedIdentifiers = _a.selectedIdentifiers, handleBulkSelection = _a.handleBulkSelection, showPagination = _a.showPagination;
|
|
29318
|
+
var areOptionsSelected = Object.keys(selectedIdentifiers).length > 0;
|
|
29319
|
+
var BulkSelectionItems = __spreadArray(__spreadArray([
|
|
29320
|
+
{
|
|
29321
|
+
locator: exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE,
|
|
29322
|
+
label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE],
|
|
29323
|
+
isSelected: isChecked && checkboxValue === exports.CHECKBOX_VALUE.CHECKED,
|
|
29324
|
+
icon: SvgIcCheckSquare,
|
|
29325
|
+
}
|
|
29326
|
+
], __read((showPagination
|
|
29327
|
+
? [
|
|
29328
|
+
{
|
|
29329
|
+
locator: exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES,
|
|
29330
|
+
label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES],
|
|
29331
|
+
isSelected: isChecked && checkboxValue === exports.CHECKBOX_VALUE.BULK_CHECKED,
|
|
29332
|
+
icon: SvgIcCheckAll,
|
|
29333
|
+
},
|
|
29334
|
+
]
|
|
29335
|
+
: [])), false), __read((areOptionsSelected
|
|
29336
|
+
? [
|
|
29337
|
+
{
|
|
29338
|
+
locator: exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS,
|
|
29339
|
+
label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS],
|
|
29340
|
+
isSelected: false,
|
|
29341
|
+
icon: SvgIcCross,
|
|
29342
|
+
},
|
|
29343
|
+
]
|
|
29344
|
+
: [])), false);
|
|
29345
|
+
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)); }) }))] })));
|
|
29346
|
+
};
|
|
29347
|
+
|
|
29348
|
+
var useBulkSelection = function (_a) {
|
|
29349
|
+
var identifiers = _a.identifiers, getSelectAllDialogStatus = _a.getSelectAllDialogStatus;
|
|
29350
|
+
var _b = __read(React.useState({}), 2), selectedIdentifiers = _b[0], setSelectedIdentifiers = _b[1];
|
|
29351
|
+
var setIdentifiersAfterClear = function (newIdentifiers, selectedIds) {
|
|
29352
|
+
var _newIdentifiers = JSON.parse(JSON.stringify(newIdentifiers));
|
|
29353
|
+
selectedIds.forEach(function (id) {
|
|
29354
|
+
delete _newIdentifiers[id];
|
|
29355
|
+
});
|
|
29356
|
+
setSelectedIdentifiers(_newIdentifiers);
|
|
29357
|
+
};
|
|
29358
|
+
var setIdentifiersAfterPageSelection = function (baseObject) {
|
|
29359
|
+
var _selectedIdentifiers = JSON.parse(JSON.stringify(selectedIdentifiers));
|
|
29360
|
+
// removing bulk selection across pages if present
|
|
29361
|
+
if (_selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29362
|
+
delete _selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
|
|
29363
|
+
}
|
|
29364
|
+
setSelectedIdentifiers(__assign(__assign({}, _selectedIdentifiers), baseObject));
|
|
29365
|
+
};
|
|
29366
|
+
var handleBulkSelection = function (_a) {
|
|
29367
|
+
var _b, _c;
|
|
29368
|
+
var _d, _e;
|
|
29369
|
+
var action = _a.action, data = _a.data;
|
|
29370
|
+
var selectedIds = (_d = data === null || data === void 0 ? void 0 : data.identifierIds) !== null && _d !== void 0 ? _d : [];
|
|
29371
|
+
var identifierObject = (_e = data === null || data === void 0 ? void 0 : data.identifierObject) !== null && _e !== void 0 ? _e : {};
|
|
29372
|
+
switch (action) {
|
|
29373
|
+
case exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS:
|
|
29374
|
+
setSelectedIdentifiers({});
|
|
29375
|
+
break;
|
|
29376
|
+
case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
|
|
29377
|
+
setIdentifiersAfterClear(identifiers, selectedIds);
|
|
29378
|
+
break;
|
|
29379
|
+
}
|
|
29380
|
+
case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS: {
|
|
29381
|
+
setIdentifiersAfterClear(selectedIdentifiers, selectedIds);
|
|
29382
|
+
break;
|
|
29383
|
+
}
|
|
29384
|
+
case exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES: {
|
|
29385
|
+
if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29386
|
+
return;
|
|
29387
|
+
}
|
|
29388
|
+
var selectedIdentifiersLength = Object.keys(selectedIdentifiers).length;
|
|
29389
|
+
if (selectedIdentifiersLength > 0 && getSelectAllDialogStatus() === exports.SelectAllDialogStatus.OPEN) {
|
|
29390
|
+
return;
|
|
29391
|
+
}
|
|
29392
|
+
setSelectedIdentifiers((_b = {},
|
|
29393
|
+
_b[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
|
|
29394
|
+
_b));
|
|
29395
|
+
break;
|
|
29396
|
+
}
|
|
29397
|
+
case exports.BulkSelectionEvents.CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES:
|
|
29398
|
+
setSelectedIdentifiers((_c = {},
|
|
29399
|
+
_c[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
|
|
29400
|
+
_c));
|
|
29401
|
+
break;
|
|
29402
|
+
case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
|
|
29403
|
+
setIdentifiersAfterPageSelection(identifiers);
|
|
29404
|
+
break;
|
|
29405
|
+
}
|
|
29406
|
+
case exports.BulkSelectionEvents.SELECT_IDENTIFIER: {
|
|
29407
|
+
setIdentifiersAfterPageSelection(identifierObject);
|
|
29408
|
+
break;
|
|
29409
|
+
}
|
|
29410
|
+
default:
|
|
29411
|
+
throw new Error(getInvalidActionMessage(action));
|
|
29412
|
+
}
|
|
29413
|
+
};
|
|
29414
|
+
return {
|
|
29415
|
+
handleBulkSelection: handleBulkSelection,
|
|
29416
|
+
selectedIdentifiers: selectedIdentifiers,
|
|
29417
|
+
};
|
|
29418
|
+
};
|
|
29419
|
+
|
|
29420
|
+
var validateName = function (name) {
|
|
29421
|
+
if (!/^.{3,50}$/.test(name)) {
|
|
29422
|
+
return {
|
|
29423
|
+
isValid: false,
|
|
29424
|
+
message: 'Minimum 3 and maximum 50 characters allowed',
|
|
29425
|
+
};
|
|
29426
|
+
}
|
|
29427
|
+
if (!/^[a-z0-9-._]+$/.test(name)) {
|
|
29428
|
+
return {
|
|
29429
|
+
isValid: false,
|
|
29430
|
+
message: 'Only lowercase alphanumeric characters, -, _ or . allowed',
|
|
29431
|
+
};
|
|
29432
|
+
}
|
|
29433
|
+
if (!/^(?![-._]).*[^-._]$/.test(name)) {
|
|
29434
|
+
return {
|
|
29435
|
+
isValid: false,
|
|
29436
|
+
message: 'Cannot start/end with -, _ or .',
|
|
29437
|
+
};
|
|
29438
|
+
}
|
|
29439
|
+
return {
|
|
29440
|
+
isValid: true,
|
|
29441
|
+
};
|
|
29442
|
+
};
|
|
29443
|
+
var validateDescription = function (description) {
|
|
29444
|
+
if ((description === null || description === void 0 ? void 0 : description.length) > 300) {
|
|
29445
|
+
return {
|
|
29446
|
+
isValid: false,
|
|
29447
|
+
message: 'Maximum 300 characters are allowed',
|
|
29448
|
+
};
|
|
29449
|
+
}
|
|
29450
|
+
return {
|
|
29451
|
+
isValid: true,
|
|
29452
|
+
};
|
|
29453
|
+
};
|
|
29454
|
+
var validateRequiredPositiveNumber = function (value) {
|
|
29455
|
+
if (!value) {
|
|
29456
|
+
return {
|
|
29457
|
+
isValid: false,
|
|
29458
|
+
message: 'This field is required',
|
|
29459
|
+
};
|
|
29460
|
+
}
|
|
29461
|
+
// TODO: Look if regex is available for this, since 0002 is not a valid number
|
|
29462
|
+
if (!/^\d+(\.\d+)?$/.test(value.toString())) {
|
|
29463
|
+
return {
|
|
29464
|
+
isValid: false,
|
|
29465
|
+
message: 'This field should be a valid positive number',
|
|
29466
|
+
};
|
|
29467
|
+
}
|
|
29468
|
+
if (Number(value) <= 0) {
|
|
29469
|
+
return {
|
|
29470
|
+
isValid: false,
|
|
29471
|
+
message: 'Only positive numbers are allowed',
|
|
29472
|
+
};
|
|
29473
|
+
}
|
|
29474
|
+
return {
|
|
29475
|
+
isValid: true,
|
|
29476
|
+
};
|
|
29477
|
+
};
|
|
29478
|
+
|
|
29479
|
+
// Disabling default export since this is a helper function and we would have to export a lot of functions in future.
|
|
29480
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
29481
|
+
var highlightSearchText = function (_a) {
|
|
29482
|
+
var searchText = _a.searchText, text = _a.text, highlightClasses = _a.highlightClasses;
|
|
29483
|
+
if (!searchText) {
|
|
29484
|
+
return text;
|
|
29485
|
+
}
|
|
29486
|
+
try {
|
|
29487
|
+
var regex = new RegExp(searchText, 'gi');
|
|
29488
|
+
return text.replace(regex, function (match) { return "<span class=\"".concat(highlightClasses, "\">").concat(match, "</span>"); });
|
|
29489
|
+
}
|
|
29490
|
+
catch (error) {
|
|
29491
|
+
return text;
|
|
29492
|
+
}
|
|
29493
|
+
};
|
|
29494
|
+
|
|
29495
|
+
var validateRequestLimit = function (_a) {
|
|
29496
|
+
var _b, _c, _d, _e, _f, _g;
|
|
29497
|
+
var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
|
|
29498
|
+
// Request <= Limit
|
|
29499
|
+
// Request and Limit should be numbers can be decimals
|
|
29500
|
+
// Request and Limit should be positive numbers
|
|
29501
|
+
// Request and Limit should be less than Number.MAX_SAFE_INTEGER
|
|
29502
|
+
// Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
|
|
29503
|
+
// Both request and limit should be there
|
|
29504
|
+
var requestNumber = Number(request.value);
|
|
29505
|
+
var limitNumber = Number(limit.value);
|
|
29506
|
+
var requestUnit = Number((_b = unitsMap[request.unit]) === null || _b === void 0 ? void 0 : _b.conversionFactor);
|
|
29507
|
+
var limitUnit = Number((_c = unitsMap[limit.unit]) === null || _c === void 0 ? void 0 : _c.conversionFactor);
|
|
29508
|
+
var requestLimitValidationResponse = {
|
|
29509
|
+
request: {
|
|
29510
|
+
isValid: true,
|
|
29511
|
+
},
|
|
29512
|
+
limit: {
|
|
29513
|
+
isValid: true,
|
|
29514
|
+
},
|
|
29515
|
+
};
|
|
29516
|
+
var isRequestValidNumber = validateRequiredPositiveNumber(request.value).isValid;
|
|
29517
|
+
var isLimitValidNumber = validateRequiredPositiveNumber(limit.value).isValid;
|
|
29518
|
+
if (!isRequestValidNumber) {
|
|
29519
|
+
requestLimitValidationResponse.request = {
|
|
29520
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.NEGATIVE_REQUEST,
|
|
29521
|
+
isValid: false,
|
|
29522
|
+
};
|
|
29523
|
+
}
|
|
29524
|
+
if (!isLimitValidNumber) {
|
|
29525
|
+
requestLimitValidationResponse.limit = {
|
|
29526
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.NEGATIVE_LIMIT,
|
|
29527
|
+
isValid: false,
|
|
29528
|
+
};
|
|
29529
|
+
}
|
|
29530
|
+
if (!isRequestValidNumber || !isLimitValidNumber) {
|
|
29531
|
+
return requestLimitValidationResponse;
|
|
29532
|
+
}
|
|
29533
|
+
// only two decimal places are allowed
|
|
29534
|
+
var requestDecimalPlaces = (_e = (_d = String(request.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
|
|
29535
|
+
var limitDecimalPlaces = (_g = (_f = String(limit.value).split('.')[1]) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0;
|
|
29536
|
+
if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29537
|
+
requestLimitValidationResponse.request = {
|
|
29538
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
|
|
29539
|
+
isValid: false,
|
|
29540
|
+
};
|
|
29541
|
+
return requestLimitValidationResponse;
|
|
29542
|
+
}
|
|
29543
|
+
if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29544
|
+
requestLimitValidationResponse.limit = {
|
|
29545
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
|
|
29546
|
+
isValid: false,
|
|
29547
|
+
};
|
|
29548
|
+
return requestLimitValidationResponse;
|
|
29549
|
+
}
|
|
29550
|
+
// Assuming requestUnit and requestNumber are not 0
|
|
29551
|
+
// TODO: Communicate this assumption to the backend
|
|
29552
|
+
var limitRequestUnitFactor = limitUnit / requestUnit;
|
|
29553
|
+
var limitRequestFactor = limitNumber / requestNumber;
|
|
29554
|
+
var isDifferenceBigNumber = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
|
|
29555
|
+
if (!isDifferenceBigNumber) {
|
|
29556
|
+
requestLimitValidationResponse.request = {
|
|
29557
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
|
|
29558
|
+
isValid: false,
|
|
29559
|
+
};
|
|
29560
|
+
return requestLimitValidationResponse;
|
|
29561
|
+
}
|
|
29562
|
+
if (limitRequestUnitFactor * limitRequestFactor < 1) {
|
|
29563
|
+
requestLimitValidationResponse.request = {
|
|
29564
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
|
|
29565
|
+
isValid: false,
|
|
29566
|
+
};
|
|
29567
|
+
return requestLimitValidationResponse;
|
|
29568
|
+
}
|
|
29569
|
+
return requestLimitValidationResponse;
|
|
29570
|
+
};
|
|
29571
|
+
var getInitialProfileInputErrors = function (fromCreateView) {
|
|
29572
|
+
if (fromCreateView) {
|
|
29573
|
+
var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29574
|
+
CREATE_MODE_REQUIRED_INPUT_FIELDS.forEach(function (field) {
|
|
29575
|
+
initialProfileInputErrors_1[field] = '';
|
|
29576
|
+
});
|
|
29577
|
+
return initialProfileInputErrors_1;
|
|
29578
|
+
}
|
|
29579
|
+
return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29580
|
+
};
|
|
29581
|
+
var useBuildInfraForm = function (_a) {
|
|
29582
|
+
var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
|
|
29583
|
+
var fromCreateView = !name;
|
|
29584
|
+
var _b = __read(useAsync(function () {
|
|
29585
|
+
return getBuildInfraProfileByName({
|
|
29586
|
+
name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
|
|
29587
|
+
fromCreateView: fromCreateView,
|
|
29588
|
+
});
|
|
29589
|
+
}, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
|
|
29590
|
+
// If configuration is existing and is active then use it else use default from profileResponse
|
|
29591
|
+
var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
|
|
29592
|
+
var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
|
|
29593
|
+
var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
|
|
29594
|
+
React.useEffect(function () {
|
|
29595
|
+
if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
|
|
29596
|
+
setProfileInput(__assign({}, profileResponse.profile));
|
|
29597
|
+
setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
|
|
29598
|
+
}
|
|
29599
|
+
}, [profileResponse, isLoading]);
|
|
29600
|
+
// NOTE: Currently sending and receiving values as string, but will parse it to number for payload
|
|
29601
|
+
var handleProfileInputChange = function (_a) {
|
|
29602
|
+
var action = _a.action, data = _a.data;
|
|
29603
|
+
var currentInput = __assign({}, profileInput);
|
|
29604
|
+
var currentInputErrors = __assign({}, profileInputErrors);
|
|
29605
|
+
var lastSavedConfiguration = profileResponse.profile.configurations;
|
|
29606
|
+
var currentConfiguration = currentInput.configurations;
|
|
29607
|
+
var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
|
|
29608
|
+
switch (action) {
|
|
29609
|
+
case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
|
|
29610
|
+
currentInput.description = value;
|
|
29611
|
+
currentInputErrors.description = validateDescription(value).message;
|
|
29612
|
+
break;
|
|
29613
|
+
case exports.BuildInfraMetaConfigTypes.NAME:
|
|
29614
|
+
currentInput.name = value;
|
|
29615
|
+
currentInputErrors.name = validateName(value).message;
|
|
29616
|
+
break;
|
|
29617
|
+
case exports.BuildInfraConfigTypes.CPU_LIMIT: {
|
|
29618
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
|
|
29619
|
+
var _c = validateRequestLimit({
|
|
29620
|
+
request: {
|
|
29621
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
|
|
29622
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
|
|
29623
|
+
},
|
|
29624
|
+
limit: {
|
|
29625
|
+
value: value,
|
|
29626
|
+
unit: unit,
|
|
29627
|
+
},
|
|
29628
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29629
|
+
}), request = _c.request, limit = _c.limit;
|
|
29630
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29631
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29632
|
+
break;
|
|
29633
|
+
}
|
|
29634
|
+
case exports.BuildInfraConfigTypes.CPU_REQUEST: {
|
|
29635
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
|
|
29636
|
+
var _d = validateRequestLimit({
|
|
29637
|
+
request: {
|
|
29638
|
+
value: value,
|
|
29639
|
+
unit: unit,
|
|
29640
|
+
},
|
|
29641
|
+
limit: {
|
|
29642
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
|
|
29643
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
|
|
29644
|
+
},
|
|
29645
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29646
|
+
}), request = _d.request, limit = _d.limit;
|
|
29647
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29648
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29649
|
+
break;
|
|
29650
|
+
}
|
|
29651
|
+
case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
|
|
29652
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
|
|
29653
|
+
var _e = validateRequestLimit({
|
|
29654
|
+
request: {
|
|
29655
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
|
|
29656
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
|
|
29657
|
+
},
|
|
29658
|
+
limit: {
|
|
29659
|
+
value: value,
|
|
29660
|
+
unit: unit,
|
|
29661
|
+
},
|
|
29662
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29663
|
+
}), request = _e.request, limit = _e.limit;
|
|
29664
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29665
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29666
|
+
break;
|
|
29667
|
+
}
|
|
29668
|
+
case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
|
|
29669
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
|
|
29670
|
+
var _f = validateRequestLimit({
|
|
29671
|
+
request: {
|
|
29672
|
+
value: value,
|
|
29673
|
+
unit: unit,
|
|
29674
|
+
},
|
|
29675
|
+
limit: {
|
|
29676
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
|
|
29677
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
|
|
29678
|
+
},
|
|
29679
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29680
|
+
}), request = _f.request, limit = _f.limit;
|
|
29681
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29682
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29683
|
+
break;
|
|
29684
|
+
}
|
|
29685
|
+
case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
|
|
29686
|
+
currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
|
|
29687
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveNumber(value).message;
|
|
29688
|
+
break;
|
|
29689
|
+
}
|
|
29690
|
+
case exports.BuildInfraInheritActions.ACTIVATE_CPU:
|
|
29691
|
+
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 });
|
|
29692
|
+
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 });
|
|
29693
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
29694
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
29695
|
+
break;
|
|
29696
|
+
case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
|
|
29697
|
+
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 });
|
|
29698
|
+
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 });
|
|
29699
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
29700
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
29701
|
+
break;
|
|
29702
|
+
case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
|
|
29703
|
+
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 });
|
|
29704
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
29705
|
+
break;
|
|
29706
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
|
|
29707
|
+
// Reverting the value and unit to defaultValues
|
|
29708
|
+
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 });
|
|
29709
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
29710
|
+
break;
|
|
29711
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
|
|
29712
|
+
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 });
|
|
29713
|
+
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 });
|
|
29714
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
29715
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
29716
|
+
break;
|
|
29717
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
|
|
29718
|
+
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 });
|
|
29719
|
+
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 });
|
|
29720
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
29721
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
29722
|
+
break;
|
|
29723
|
+
default:
|
|
29724
|
+
throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
|
|
29725
|
+
}
|
|
29726
|
+
setProfileInput(currentInput);
|
|
29727
|
+
setProfileInputErrors(currentInputErrors);
|
|
29728
|
+
};
|
|
29729
|
+
var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29730
|
+
var hasErrors, err_1;
|
|
29731
|
+
return __generator(this, function (_a) {
|
|
29732
|
+
switch (_a.label) {
|
|
29733
|
+
case 0:
|
|
29734
|
+
e.preventDefault();
|
|
29735
|
+
hasErrors = Object.keys(profileInputErrors).filter(function (item) { return profileInputErrors[item] !== null && profileInputErrors[item] !== undefined; }).length > 0;
|
|
29736
|
+
if (hasErrors) {
|
|
29737
|
+
toast.error(BUILD_INFRA_TEXT.INVALID_FORM_MESSAGE);
|
|
29738
|
+
return [2 /*return*/];
|
|
29739
|
+
}
|
|
29740
|
+
setLoadingActionRequest(true);
|
|
29741
|
+
_a.label = 1;
|
|
29742
|
+
case 1:
|
|
29743
|
+
_a.trys.push([1, 6, , 7]);
|
|
29744
|
+
if (!editProfile) return [3 /*break*/, 3];
|
|
29745
|
+
return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
|
|
29746
|
+
case 2:
|
|
29747
|
+
_a.sent();
|
|
29748
|
+
return [3 /*break*/, 5];
|
|
29749
|
+
case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
|
|
29750
|
+
case 4:
|
|
29751
|
+
_a.sent();
|
|
29752
|
+
_a.label = 5;
|
|
29753
|
+
case 5:
|
|
29754
|
+
setLoadingActionRequest(false);
|
|
29755
|
+
toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
|
|
29756
|
+
if (handleSuccessRedirection) {
|
|
29757
|
+
handleSuccessRedirection();
|
|
29758
|
+
}
|
|
29759
|
+
else {
|
|
29760
|
+
reloadRequest();
|
|
29761
|
+
}
|
|
29762
|
+
return [3 /*break*/, 7];
|
|
29763
|
+
case 6:
|
|
29764
|
+
err_1 = _a.sent();
|
|
29765
|
+
showError(err_1);
|
|
29766
|
+
setLoadingActionRequest(false);
|
|
29767
|
+
return [3 /*break*/, 7];
|
|
29768
|
+
case 7: return [2 /*return*/];
|
|
29769
|
+
}
|
|
29770
|
+
});
|
|
29771
|
+
}); };
|
|
29772
|
+
return {
|
|
29773
|
+
isLoading: isLoading,
|
|
29774
|
+
profileResponse: profileResponse,
|
|
29775
|
+
responseError: responseError,
|
|
29776
|
+
reloadRequest: reloadRequest,
|
|
29777
|
+
profileInput: profileInput,
|
|
29778
|
+
profileInputErrors: profileInputErrors,
|
|
29779
|
+
handleProfileInputChange: handleProfileInputChange,
|
|
29780
|
+
loadingActionRequest: loadingActionRequest,
|
|
29781
|
+
handleSubmit: handleSubmit,
|
|
29782
|
+
};
|
|
29783
|
+
};
|
|
29784
|
+
var getOptionBackgroundColor = function (isFocused, isSelected) {
|
|
29785
|
+
if (isSelected) {
|
|
29786
|
+
return 'var(--B100)';
|
|
29787
|
+
}
|
|
29788
|
+
if (isFocused) {
|
|
29789
|
+
return 'var(--N50)';
|
|
29790
|
+
}
|
|
29791
|
+
return 'var(--white)';
|
|
29792
|
+
};
|
|
29793
|
+
var unitSelectorStyles = function () {
|
|
29794
|
+
return getCommonSelectStyle({
|
|
29795
|
+
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': {
|
|
29796
|
+
border: '1px solid var(--N400)',
|
|
29797
|
+
} })); },
|
|
29798
|
+
indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
|
|
29799
|
+
dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
|
|
29800
|
+
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' })); },
|
|
29801
|
+
valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
|
|
29802
|
+
menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
|
|
29803
|
+
});
|
|
29804
|
+
};
|
|
29805
|
+
|
|
29806
|
+
/**
|
|
29807
|
+
* In case need arise for variants break this CustomInput and Select as a separate component
|
|
29808
|
+
*/
|
|
29809
|
+
var BuildInfraFormAction = function (_a) {
|
|
29810
|
+
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;
|
|
29811
|
+
var handleUnitChange = function (selectedUnit) {
|
|
29812
|
+
var data = {
|
|
29813
|
+
unit: selectedUnit.label,
|
|
29814
|
+
value: currentValue,
|
|
29815
|
+
};
|
|
29816
|
+
handleProfileInputChange({ action: actionType, data: data });
|
|
29817
|
+
};
|
|
29818
|
+
var handleInputChange = function (e) {
|
|
29819
|
+
var data = {
|
|
29820
|
+
unit: currentUnitName,
|
|
29821
|
+
value: e.currentTarget.value,
|
|
29822
|
+
};
|
|
29823
|
+
handleProfileInputChange({ action: actionType, data: data });
|
|
29824
|
+
};
|
|
29825
|
+
var unitOptions = React.useMemo(function () {
|
|
29826
|
+
var _a, _b;
|
|
29827
|
+
var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
|
|
29828
|
+
label: unit.name,
|
|
29829
|
+
value: String(unit.conversionFactor),
|
|
29830
|
+
}); })) !== null && _b !== void 0 ? _b : [];
|
|
29831
|
+
return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
|
|
29832
|
+
}, [profileUnitsMap]);
|
|
29833
|
+
var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
|
|
29834
|
+
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: {
|
|
29835
|
+
IndicatorSeparator: null,
|
|
29836
|
+
ClearIndicator: null,
|
|
29837
|
+
}, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
|
|
29838
|
+
};
|
|
29839
|
+
|
|
29840
|
+
var BuildInfraFormItem = function (_a) {
|
|
29841
|
+
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;
|
|
29842
|
+
var handleActivationChange = function (e) {
|
|
29843
|
+
var checked = e.currentTarget.checked;
|
|
29844
|
+
var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
|
|
29845
|
+
handleProfileInputChange({ action: action });
|
|
29846
|
+
};
|
|
29847
|
+
var renderMarker = function () {
|
|
29848
|
+
if (isDefaultProfile) {
|
|
29849
|
+
return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
|
|
29850
|
+
}
|
|
29851
|
+
return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
|
|
29852
|
+
};
|
|
29853
|
+
// If in configuration active is false, means it is inheriting values from other profile
|
|
29854
|
+
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" })] }));
|
|
29855
|
+
};
|
|
29856
|
+
|
|
29857
|
+
var BuildInfraProfileDescriptionField = function (_a) {
|
|
29858
|
+
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
29859
|
+
var handleChange = function (e) {
|
|
29860
|
+
handleProfileInputChange({
|
|
29861
|
+
action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
|
|
29862
|
+
data: { value: e.currentTarget.value },
|
|
29863
|
+
});
|
|
29864
|
+
};
|
|
29865
|
+
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] })))] })));
|
|
29866
|
+
};
|
|
29867
|
+
|
|
29868
|
+
var BuildInfraProfileNameField = function (_a) {
|
|
29869
|
+
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
29870
|
+
var handleChange = function (e) {
|
|
29871
|
+
handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
|
|
29872
|
+
};
|
|
29873
|
+
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" }) })));
|
|
29874
|
+
};
|
|
29875
|
+
|
|
29876
|
+
var InheritingHeader = function (_a) {
|
|
29877
|
+
var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
|
|
29878
|
+
var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
|
|
29879
|
+
if (isDefaultProfile || !isInheriting) {
|
|
29880
|
+
// For typing issues
|
|
29881
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
29882
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
|
|
29883
|
+
}
|
|
29884
|
+
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 }))] }))] })));
|
|
29885
|
+
};
|
|
29886
|
+
var BuildInfraConfigForm = function (_a) {
|
|
29887
|
+
var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
|
|
29888
|
+
var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
|
|
29889
|
+
// will get the desired configuration from the currentConfigurations and then check if it is active or not
|
|
29890
|
+
var isInheritingProfileValues = function (actions) {
|
|
29891
|
+
return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
|
|
29892
|
+
};
|
|
29893
|
+
// Had to show loader for an instance due to batching of state updates not working as expected :/
|
|
29894
|
+
if (!currentConfigurations) {
|
|
29895
|
+
return jsxRuntime.jsx(Progressing, { pageLoader: true });
|
|
29896
|
+
}
|
|
29897
|
+
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],
|
|
29898
|
+
// Assumption is for default profiles all input fields are required
|
|
29899
|
+
isRequired: true, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
|
|
29900
|
+
};
|
|
29901
|
+
|
|
29902
|
+
exports.APIResponseHandler = APIResponseHandler;
|
|
28757
29903
|
exports.AddCDButton = AddCDButton;
|
|
28758
29904
|
exports.AppStatus = AppStatus;
|
|
29905
|
+
exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
|
|
29906
|
+
exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
|
|
29907
|
+
exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
|
|
29908
|
+
exports.BUILD_INFRA_TEST_IDS = BUILD_INFRA_TEST_IDS;
|
|
29909
|
+
exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
|
|
29910
|
+
exports.BULK_DROPDOWN_TEST_ID = BULK_DROPDOWN_TEST_ID;
|
|
28759
29911
|
exports.BreadCrumb = BreadCrumb;
|
|
28760
29912
|
exports.BreadcrumbStore = Store;
|
|
29913
|
+
exports.BuildInfraConfigActionMap = BuildInfraConfigActionMap;
|
|
29914
|
+
exports.BuildInfraConfigForm = BuildInfraConfigForm;
|
|
29915
|
+
exports.BuildInfraDescriptor = Descriptor;
|
|
29916
|
+
exports.BuildInfraFooter = Footer;
|
|
28761
29917
|
exports.BuildStageVariable = BuildStageVariable;
|
|
29918
|
+
exports.BulkSelection = BulkSelection;
|
|
29919
|
+
exports.BulkSelectionOptionsLabels = BulkSelectionOptionsLabels;
|
|
28762
29920
|
exports.CDModalTab = CDModalTab;
|
|
29921
|
+
exports.CREATE_MODE_REQUIRED_INPUT_FIELDS = CREATE_MODE_REQUIRED_INPUT_FIELDS;
|
|
29922
|
+
exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
|
|
29923
|
+
exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
|
|
28763
29924
|
exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
|
|
28764
29925
|
exports.Checkbox = Checkbox$1;
|
|
28765
29926
|
exports.ClearIndicator = ClearIndicator;
|
|
@@ -28768,6 +29929,7 @@ exports.ConditionalWrap = ConditionalWrap;
|
|
|
28768
29929
|
exports.ConfirmationDialog = ConfirmationDialog;
|
|
28769
29930
|
exports.CustomInput = CustomInput;
|
|
28770
29931
|
exports.CustomSelect = CustomSelect;
|
|
29932
|
+
exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
|
|
28771
29933
|
exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
|
|
28772
29934
|
exports.DOCUMENTATION = DOCUMENTATION;
|
|
28773
29935
|
exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
|
|
@@ -28801,6 +29963,7 @@ exports.MultiValueRemove = MultiValueRemove;
|
|
|
28801
29963
|
exports.OpaqueModal = OpaqueModal;
|
|
28802
29964
|
exports.Option = Option;
|
|
28803
29965
|
exports.PATTERNS = PATTERNS;
|
|
29966
|
+
exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
|
|
28804
29967
|
exports.Pagination = Pagination;
|
|
28805
29968
|
exports.PopupMenu = PopupMenu;
|
|
28806
29969
|
exports.Progressing = Progressing;
|
|
@@ -28815,8 +29978,10 @@ exports.RepositoryAction = RepositoryAction;
|
|
|
28815
29978
|
exports.ResizableTagTextArea = ResizableTagTextArea;
|
|
28816
29979
|
exports.ResizableTextarea = ResizableTextarea;
|
|
28817
29980
|
exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
|
|
29981
|
+
exports.SELECT_ALL_ACROSS_PAGES_LOCATOR = SELECT_ALL_ACROSS_PAGES_LOCATOR;
|
|
28818
29982
|
exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
|
|
28819
29983
|
exports.SearchBar = SearchBar;
|
|
29984
|
+
exports.SelectOption = SelectOption;
|
|
28820
29985
|
exports.ServerError = ServerError;
|
|
28821
29986
|
exports.ServerErrors = ServerErrors;
|
|
28822
29987
|
exports.SingleSelectOption = SingleSelectOption;
|
|
@@ -28836,8 +30001,10 @@ exports.TriggerTypeMap = TriggerTypeMap;
|
|
|
28836
30001
|
exports.URLS = URLS;
|
|
28837
30002
|
exports.VisibleModal = VisibleModal;
|
|
28838
30003
|
exports.VisibleModal2 = VisibleModal2;
|
|
30004
|
+
exports.abortPreviousRequests = abortPreviousRequests;
|
|
28839
30005
|
exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
|
|
28840
30006
|
exports.copyToClipboard = copyToClipboard;
|
|
30007
|
+
exports.createBuildInfraProfile = createBuildInfraProfile;
|
|
28841
30008
|
exports.createGitCommitUrl = createGitCommitUrl;
|
|
28842
30009
|
exports.customStyles = customStyles;
|
|
28843
30010
|
exports.debounce = debounce$2;
|
|
@@ -28846,20 +30013,27 @@ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
|
|
|
28846
30013
|
exports.genericCDMaterialsService = genericCDMaterialsService;
|
|
28847
30014
|
exports.get = get;
|
|
28848
30015
|
exports.getAlphabetIcon = getAlphabetIcon;
|
|
30016
|
+
exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
|
|
30017
|
+
exports.getCommonSelectStyle = getCommonSelectStyle;
|
|
28849
30018
|
exports.getCookie = getCookie;
|
|
30019
|
+
exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
|
|
28850
30020
|
exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
|
|
28851
30021
|
exports.getFilteredChartVersions = getFilteredChartVersions;
|
|
28852
30022
|
exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
|
|
30023
|
+
exports.getInvalidActionMessage = getInvalidActionMessage;
|
|
30024
|
+
exports.getIsRequestAborted = getIsRequestAborted;
|
|
28853
30025
|
exports.getLockedJSON = getLockedJSON;
|
|
28854
30026
|
exports.getLoginInfo = getLoginInfo;
|
|
28855
30027
|
exports.getRandomColor = getRandomColor;
|
|
28856
30028
|
exports.getRedirectionProps = getRedirectionProps;
|
|
28857
30029
|
exports.getTeamListMin = getTeamListMin;
|
|
30030
|
+
exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
|
|
28858
30031
|
exports.getUnlockedJSON = getUnlockedJSON;
|
|
28859
30032
|
exports.getUrlWithSearchParams = getUrlWithSearchParams;
|
|
28860
30033
|
exports.getUserRole = getUserRole;
|
|
28861
30034
|
exports.handleAddCD = handleAddCD;
|
|
28862
30035
|
exports.handleUTCTime = handleUTCTime;
|
|
30036
|
+
exports.highlightSearchText = highlightSearchText;
|
|
28863
30037
|
exports.logExceptionToSentry = logExceptionToSentry;
|
|
28864
30038
|
exports.multiSelectStyles = multiSelectStyles;
|
|
28865
30039
|
exports.noop = noop$1;
|
|
@@ -28873,8 +30047,12 @@ exports.sortCallback = sortCallback;
|
|
|
28873
30047
|
exports.stopPropagation = stopPropagation;
|
|
28874
30048
|
exports.toastAccessDenied = toastAccessDenied;
|
|
28875
30049
|
exports.trash = trash;
|
|
30050
|
+
exports.unitSelectorStyles = unitSelectorStyles;
|
|
30051
|
+
exports.updateBuildInfraProfile = updateBuildInfraProfile;
|
|
28876
30052
|
exports.useAsync = useAsync;
|
|
28877
30053
|
exports.useBreadcrumb = useBreadcrumb;
|
|
30054
|
+
exports.useBuildInfraForm = useBuildInfraForm;
|
|
30055
|
+
exports.useBulkSelection = useBulkSelection;
|
|
28878
30056
|
exports.useClickOutside = useClickOutside;
|
|
28879
30057
|
exports.useEffectAfterMount = useEffectAfterMount;
|
|
28880
30058
|
exports.useForm = useForm;
|
|
@@ -28882,3 +30060,7 @@ exports.useSearchString = useSearchString;
|
|
|
28882
30060
|
exports.useSuperAdmin = useSuperAdmin;
|
|
28883
30061
|
exports.useThrottledEffect = useThrottledEffect;
|
|
28884
30062
|
exports.useWindowSize = useWindowSize;
|
|
30063
|
+
exports.validateDescription = validateDescription;
|
|
30064
|
+
exports.validateName = validateName;
|
|
30065
|
+
exports.validateRequestLimit = validateRequestLimit;
|
|
30066
|
+
exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;
|