@devtron-labs/devtron-fe-common-lib 0.0.58-beta-8 → 0.0.58-beta-9
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 +14 -1
- package/dist/Common/Hooks/index.d.ts +1 -0
- package/dist/Common/Hooks/useUrlFilters/constants.d.ts +8 -0
- package/dist/Common/Hooks/useUrlFilters/index.d.ts +2 -0
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +6 -0
- package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +32 -0
- package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +18 -0
- package/dist/Common/SortableTableHeaderCell/index.d.ts +2 -0
- package/dist/Common/SortableTableHeaderCell/types.d.ts +25 -0
- package/dist/Common/Types.d.ts +15 -4
- package/dist/Common/index.d.ts +1 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +357 -1121
- package/package.json +1 -1
- package/src/Assets/Icon/ic-arrow-up-down.svg +3 -0
- package/src/Assets/Icon/ic-sort-arrow-down.svg +3 -0
- package/src/Common/Api.ts +21 -0
- package/src/Common/BreadCrumb/Types.ts +1 -0
- package/src/Common/Checkbox.tsx +0 -1
- package/src/Common/Constants.ts +18 -3
- package/src/Common/CustomInput/CustomInput.tsx +1 -2
- package/src/Common/DraggableWrapper/DraggableWrapper.tsx +1 -3
- package/src/Common/Hooks/index.ts +1 -0
- package/src/Common/Hooks/useUrlFilters/constants.ts +9 -0
- package/src/Common/Hooks/useUrlFilters/index.ts +2 -0
- package/src/Common/Hooks/useUrlFilters/types.ts +6 -0
- package/src/Common/Hooks/useUrlFilters/useUrlFilters.ts +120 -0
- package/src/Common/RJSF/utils.ts +0 -3
- package/src/Common/SearchBar/SearchBar.component.tsx +13 -26
- package/src/Common/SearchBar/searchBar.scss +1 -1
- package/src/Common/SortableTableHeaderCell/SortableTableHeaderCell.tsx +44 -0
- package/src/Common/SortableTableHeaderCell/index.ts +2 -0
- package/src/Common/SortableTableHeaderCell/types.ts +26 -0
- package/src/Common/Types.ts +14 -3
- package/src/Common/index.ts +1 -0
- package/src/index.ts +1 -3
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +0 -4
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +0 -4
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +0 -7
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +0 -4
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +0 -4
- package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +0 -4
- package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +0 -4
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +0 -47
- package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +0 -7
- package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +0 -13
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +0 -281
- package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +0 -12
- package/dist/Pages/GlobalConfigurations/index.d.ts +0 -1
- package/dist/Pages/index.d.ts +0 -1
- package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +0 -4
- package/dist/Shared/Components/APIResponseHandler/index.d.ts +0 -2
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +0 -37
- package/dist/Shared/Components/ReactSelect/index.d.ts +0 -1
- package/dist/Shared/Components/ReactSelect/utils.d.ts +0 -12
- package/dist/Shared/Components/index.d.ts +0 -2
- package/dist/Shared/index.d.ts +0 -2
- package/dist/Shared/validations.d.ts +0 -7
- package/src/Assets/Icon/ic-cpu.svg +0 -4
- package/src/Assets/Icon/ic-memory.svg +0 -3
- package/src/Assets/Icon/ic-timer.svg +0 -3
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +0 -121
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +0 -44
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +0 -106
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +0 -55
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +0 -32
- package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +0 -38
- package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +0 -45
- package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +0 -4
- package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +0 -136
- package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +0 -7
- package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +0 -183
- package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +0 -334
- package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +0 -494
- package/src/Pages/GlobalConfigurations/index.ts +0 -1
- package/src/Pages/index.ts +0 -1
- package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +0 -39
- package/src/Shared/Components/APIResponseHandler/index.ts +0 -2
- package/src/Shared/Components/APIResponseHandler/types.tsx +0 -39
- package/src/Shared/Components/ReactSelect/index.ts +0 -1
- package/src/Shared/Components/ReactSelect/utils.tsx +0 -97
- package/src/Shared/Components/index.ts +0 -2
- package/src/Shared/index.ts +0 -2
- package/src/Shared/validations.tsx +0 -72
package/dist/index.js
CHANGED
|
@@ -50,8 +50,7 @@ var ROUTES = {
|
|
|
50
50
|
USER_CHECK_ROLE: 'user/check/roles',
|
|
51
51
|
IMAGE_TAGGING: 'app/image-tagging',
|
|
52
52
|
CD_MATERIAL_GET: 'app/cd-pipeline',
|
|
53
|
-
DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
|
|
54
|
-
INFRA_CONFIG_PROFILE: 'infra-config/profile',
|
|
53
|
+
DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
|
|
55
54
|
};
|
|
56
55
|
exports.KEY_VALUE = void 0;
|
|
57
56
|
(function (KEY_VALUE) {
|
|
@@ -268,7 +267,22 @@ var MAX_Z_INDEX = 2147483647;
|
|
|
268
267
|
var SELECTED_APPROVAL_TAB_STATE = {
|
|
269
268
|
APPROVAL: 'approval',
|
|
270
269
|
PENDING: 'pending',
|
|
271
|
-
};
|
|
270
|
+
};
|
|
271
|
+
exports.SortingOrder = void 0;
|
|
272
|
+
(function (SortingOrder) {
|
|
273
|
+
/**
|
|
274
|
+
* Ascending order
|
|
275
|
+
*/
|
|
276
|
+
SortingOrder["ASC"] = "ASC";
|
|
277
|
+
/**
|
|
278
|
+
* Descending order
|
|
279
|
+
*/
|
|
280
|
+
SortingOrder["DESC"] = "DESC";
|
|
281
|
+
})(exports.SortingOrder || (exports.SortingOrder = {}));
|
|
282
|
+
/**
|
|
283
|
+
* Base page size for pagination
|
|
284
|
+
*/
|
|
285
|
+
var DEFAULT_BASE_PAGE_SIZE = 20;
|
|
272
286
|
|
|
273
287
|
/******************************************************************************
|
|
274
288
|
Copyright (c) Microsoft Corporation.
|
|
@@ -430,7 +444,6 @@ exports.CHECKBOX_VALUE = void 0;
|
|
|
430
444
|
(function (CHECKBOX_VALUE) {
|
|
431
445
|
CHECKBOX_VALUE["CHECKED"] = "CHECKED";
|
|
432
446
|
CHECKBOX_VALUE["INTERMEDIATE"] = "INTERMEDIATE";
|
|
433
|
-
CHECKBOX_VALUE["BULK_CHECKED"] = "BULK_CHECKED";
|
|
434
447
|
})(exports.CHECKBOX_VALUE || (exports.CHECKBOX_VALUE = {}));
|
|
435
448
|
exports.ImageType = void 0;
|
|
436
449
|
(function (ImageType) {
|
|
@@ -734,6 +747,22 @@ var get = function (url, options) {
|
|
|
734
747
|
};
|
|
735
748
|
var trash = function (url, data, options) {
|
|
736
749
|
return fetchInTime(url, 'DELETE', data, options);
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Aborts the previous request before triggering next request
|
|
753
|
+
*/
|
|
754
|
+
var abortPreviousRequests = function (callback, abortControllerRef) {
|
|
755
|
+
abortControllerRef.current.abort();
|
|
756
|
+
// eslint-disable-next-line no-param-reassign
|
|
757
|
+
abortControllerRef.current = new AbortController();
|
|
758
|
+
return callback();
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Returns true if the error is due to a aborted request
|
|
762
|
+
*/
|
|
763
|
+
var getIsRequestAborted = function (error) {
|
|
764
|
+
// The 0 code is common for aborted and blocked requests
|
|
765
|
+
return error && error.code === 0 && error.message === 'The user aborted a request.';
|
|
737
766
|
};
|
|
738
767
|
|
|
739
768
|
function styleInject(css, ref) {
|
|
@@ -767,9 +796,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
|
|
|
767
796
|
styleInject(css_248z$9);
|
|
768
797
|
|
|
769
798
|
var _g$7;
|
|
770
|
-
function _extends$
|
|
799
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
771
800
|
var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
772
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
801
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
773
802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
774
803
|
viewBox: "0 0 24 24",
|
|
775
804
|
width: "1em",
|
|
@@ -821,8 +850,8 @@ EmptyState.Loading = Loading;
|
|
|
821
850
|
|
|
822
851
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
823
852
|
|
|
824
|
-
function _extends$
|
|
825
|
-
_extends$
|
|
853
|
+
function _extends$p() {
|
|
854
|
+
_extends$p = Object.assign || function (target) {
|
|
826
855
|
for (var i = 1; i < arguments.length; i++) {
|
|
827
856
|
var source = arguments[i];
|
|
828
857
|
|
|
@@ -836,7 +865,7 @@ function _extends$q() {
|
|
|
836
865
|
return target;
|
|
837
866
|
};
|
|
838
867
|
|
|
839
|
-
return _extends$
|
|
868
|
+
return _extends$p.apply(this, arguments);
|
|
840
869
|
}
|
|
841
870
|
|
|
842
871
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
@@ -1562,7 +1591,7 @@ function ProgressBar(_ref) {
|
|
|
1562
1591
|
isIn = _ref.isIn,
|
|
1563
1592
|
theme = _ref.theme;
|
|
1564
1593
|
|
|
1565
|
-
var style = _extends$
|
|
1594
|
+
var style = _extends$p({}, userStyle, {
|
|
1566
1595
|
animationDuration: delay + "ms",
|
|
1567
1596
|
animationPlayState: isRunning ? 'running' : 'paused',
|
|
1568
1597
|
opacity: hide ? 0 : 1
|
|
@@ -1839,9 +1868,9 @@ var ToastContainer = function ToastContainer(props) {
|
|
|
1839
1868
|
,
|
|
1840
1869
|
id: containerId
|
|
1841
1870
|
}, getToastToRender(function (position, toastList) {
|
|
1842
|
-
var containerStyle = !toastList.length ? _extends$
|
|
1871
|
+
var containerStyle = !toastList.length ? _extends$p({}, style, {
|
|
1843
1872
|
pointerEvents: 'none'
|
|
1844
|
-
}) : _extends$
|
|
1873
|
+
}) : _extends$p({}, style);
|
|
1845
1874
|
return React.createElement("div", {
|
|
1846
1875
|
className: getClassName(position),
|
|
1847
1876
|
style: containerStyle,
|
|
@@ -1948,7 +1977,7 @@ function dispatchToast(content, options) {
|
|
|
1948
1977
|
|
|
1949
1978
|
|
|
1950
1979
|
function mergeOptions(type, options) {
|
|
1951
|
-
return _extends$
|
|
1980
|
+
return _extends$p({}, options, {
|
|
1952
1981
|
type: options && options.type || type,
|
|
1953
1982
|
toastId: getToastId(options)
|
|
1954
1983
|
});
|
|
@@ -1965,7 +1994,7 @@ function toast(content, options) {
|
|
|
1965
1994
|
}
|
|
1966
1995
|
|
|
1967
1996
|
toast.loading = function (content, options) {
|
|
1968
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
1997
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$p({
|
|
1969
1998
|
isLoading: true,
|
|
1970
1999
|
autoClose: false,
|
|
1971
2000
|
closeOnClick: false,
|
|
@@ -1981,7 +2010,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1981
2010
|
var id;
|
|
1982
2011
|
|
|
1983
2012
|
if (pending) {
|
|
1984
|
-
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$
|
|
2013
|
+
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$p({}, options, pending));
|
|
1985
2014
|
}
|
|
1986
2015
|
|
|
1987
2016
|
var resetParams = {
|
|
@@ -2000,7 +2029,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2000
2029
|
return;
|
|
2001
2030
|
}
|
|
2002
2031
|
|
|
2003
|
-
var baseParams = _extends$
|
|
2032
|
+
var baseParams = _extends$p({
|
|
2004
2033
|
type: type
|
|
2005
2034
|
}, resetParams, options, {
|
|
2006
2035
|
data: result
|
|
@@ -2011,10 +2040,10 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2011
2040
|
} : input; // if the id is set we know that it's an update
|
|
2012
2041
|
|
|
2013
2042
|
if (id) {
|
|
2014
|
-
toast.update(id, _extends$
|
|
2043
|
+
toast.update(id, _extends$p({}, baseParams, params));
|
|
2015
2044
|
} else {
|
|
2016
2045
|
// using toast.promise without loading
|
|
2017
|
-
toast(params.render, _extends$
|
|
2046
|
+
toast(params.render, _extends$p({}, baseParams, params));
|
|
2018
2047
|
}
|
|
2019
2048
|
|
|
2020
2049
|
return result;
|
|
@@ -2038,7 +2067,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
|
|
|
2038
2067
|
toast.warn = toast.warning;
|
|
2039
2068
|
|
|
2040
2069
|
toast.dark = function (content, options) {
|
|
2041
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
2070
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$p({
|
|
2042
2071
|
theme: 'dark'
|
|
2043
2072
|
}, options)));
|
|
2044
2073
|
};
|
|
@@ -2095,7 +2124,7 @@ toast.update = function (toastId, options) {
|
|
|
2095
2124
|
var oldOptions = toast.props,
|
|
2096
2125
|
oldContent = toast.content;
|
|
2097
2126
|
|
|
2098
|
-
var nextOptions = _extends$
|
|
2127
|
+
var nextOptions = _extends$p({}, oldOptions, options, {
|
|
2099
2128
|
toastId: options.toastId || toastId,
|
|
2100
2129
|
updateId: generateToastId()
|
|
2101
2130
|
});
|
|
@@ -12012,16 +12041,16 @@ var Modal = function (_a) {
|
|
|
12012
12041
|
}, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
|
|
12013
12042
|
};
|
|
12014
12043
|
|
|
12015
|
-
var _path$
|
|
12016
|
-
function _extends$
|
|
12044
|
+
var _path$f;
|
|
12045
|
+
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
12017
12046
|
var SvgIcCross = function SvgIcCross(props) {
|
|
12018
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12047
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
12019
12048
|
width: "1em",
|
|
12020
12049
|
height: "1em",
|
|
12021
12050
|
viewBox: "0 0 24 24",
|
|
12022
12051
|
fill: "none",
|
|
12023
12052
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12024
|
-
}, props), _path$
|
|
12053
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12025
12054
|
d: "M19.28 5.78a.75.75 0 0 0-1.06-1.06l1.06 1.06ZM4.72 18.22a.75.75 0 1 0 1.06 1.06l-1.06-1.06Zm13.5 1.06a.75.75 0 1 0 1.06-1.06l-1.06 1.06ZM5.78 4.72a.75.75 0 0 0-1.06 1.06l1.06-1.06Zm12.44 0-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm-6.75 6.75-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm7.81 6.75-6.75-6.75-1.06 1.06 6.75 6.75 1.06-1.06Zm-6.75-6.75L5.78 4.72 4.72 5.78l6.75 6.75 1.06-1.06Z",
|
|
12026
12055
|
fill: "#596168"
|
|
12027
12056
|
})));
|
|
@@ -16320,30 +16349,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
16320
16349
|
|
|
16321
16350
|
var Tippy = index;
|
|
16322
16351
|
|
|
16323
|
-
var _path$
|
|
16324
|
-
function _extends$
|
|
16352
|
+
var _path$e;
|
|
16353
|
+
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
16325
16354
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
16326
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16355
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
16327
16356
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16328
16357
|
width: "1em",
|
|
16329
16358
|
height: "1em",
|
|
16330
16359
|
viewBox: "0 0 24 24"
|
|
16331
|
-
}, props), _path$
|
|
16360
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16332
16361
|
fill: "#767D84",
|
|
16333
16362
|
fillRule: "evenodd",
|
|
16334
16363
|
d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm-.205 12.868c-.615 0-1.12.505-1.12 1.12 0 .617.505 1.121 1.12 1.121.615 0 1.12-.504 1.12-1.12 0-.616-.506-1.12-1.12-1.12zM11.863 7c-1.667 0-3.197 1.187-3.196 2.527 0 .546.41.833.888.833 1.325 0 .642-1.803 2.39-1.803.82 0 1.311.438 1.311 1.175 0 1.34-2.39 1.708-2.39 3.334 0 .438.287.915.874.915.902 0 .792-.67 1.12-1.148.438-.642 2.473-1.325 2.473-3.101 0-1.927-1.721-2.732-3.47-2.732z"
|
|
16335
16364
|
})));
|
|
16336
16365
|
};
|
|
16337
16366
|
|
|
16338
|
-
var _path$
|
|
16339
|
-
function _extends$
|
|
16367
|
+
var _path$d;
|
|
16368
|
+
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
16340
16369
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
16341
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16370
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
16342
16371
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16343
16372
|
viewBox: "0 0 17 16",
|
|
16344
16373
|
width: "1em",
|
|
16345
16374
|
height: "1em"
|
|
16346
|
-
}, props), _path$
|
|
16375
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16347
16376
|
fill: "#767D84",
|
|
16348
16377
|
fillRule: "evenodd",
|
|
16349
16378
|
d: "M9 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 9 1.333zm0 1.334C6.054 2.667 3.667 5.054 3.667 8S6.054 13.333 9 13.333 14.333 10.946 14.333 8 11.946 2.667 9 2.667zm-.137 7.245c.41 0 .747.337.747.747s-.337.747-.747.747-.747-.336-.747-.747a.75.75 0 0 1 .747-.747zm.046-5.245c1.166 0 2.313.537 2.313 1.82 0 1.185-1.357 1.64-1.648 2.068-.22.319-.146.766-.747.766-.392 0-.583-.319-.583-.61 0-1.085 1.593-1.33 1.593-2.223 0-.492-.327-.783-.873-.783-1.166 0-.711 1.202-1.594 1.202-.319 0-.592-.191-.592-.556 0-.893 1.02-1.684 2.13-1.684z"
|
|
@@ -16395,16 +16424,16 @@ function TippyCustomized(props) {
|
|
|
16395
16424
|
return (jsxRuntime.jsx(Tippy, __assign({ className: "".concat(isWhiteTheme ? 'tippy-white-container default-white' : 'tippy-black-container default-black', " no-content-padding tippy-shadow ").concat(className), arrow: arrow || false, interactive: interactive || false, placement: placement || 'top', content: getTippyContent(), trigger: trigger || 'mouseenter', onMount: onTippyMount, onClickOutside: closeTippy, showOnCreate: showOnCreate || false, animation: animation || 'fade', duration: duration || 300, visible: props.visible }, { children: children })));
|
|
16396
16425
|
}
|
|
16397
16426
|
|
|
16398
|
-
var _path$
|
|
16399
|
-
function _extends$
|
|
16427
|
+
var _path$c, _circle, _path2$1;
|
|
16428
|
+
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
16400
16429
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
16401
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16430
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
16402
16431
|
width: "1em",
|
|
16403
16432
|
height: "1em",
|
|
16404
16433
|
viewBox: "0 0 20 20",
|
|
16405
16434
|
fill: "none",
|
|
16406
16435
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16407
|
-
}, props), _path$
|
|
16436
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16408
16437
|
d: "M10 10H3.333",
|
|
16409
16438
|
stroke: "#596168",
|
|
16410
16439
|
strokeWidth: 1.5,
|
|
@@ -16415,7 +16444,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
|
|
|
16415
16444
|
cy: 10,
|
|
16416
16445
|
r: 1.667,
|
|
16417
16446
|
fill: "#596168"
|
|
16418
|
-
})), _path2$
|
|
16447
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16419
16448
|
d: "m4.415 6.403 5.347-3.008a.486.486 0 0 1 .476 0l5.348 3.008a.486.486 0 0 1 .247.424v5.994a.485.485 0 0 1-.247.424l-5.348 3.007a.485.485 0 0 1-.476 0l-5.347-3.007",
|
|
16420
16449
|
stroke: "#596168",
|
|
16421
16450
|
strokeWidth: 1.5,
|
|
@@ -16432,15 +16461,15 @@ function PropagateTagInfo(_a) {
|
|
|
16432
16461
|
return (jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300", placement: "top", Icon: SvgInjectTag, heading: 'Propagate tags to K8s resources', infoText: "", additionalContent: additionalInfo(), showCloseButton: true, trigger: "click", interactive: true, documentationLink: isCreateApp ? DOCUMENTATION.APP_TAGS : DOCUMENTATION.APP_OVERVIEW_TAGS, documentationLinkText: "View Documentation" }, { children: jsxRuntime.jsxs("div", __assign({ className: "flexbox cursor" }, { children: [jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-16 mt-2 mr-4" }), jsxRuntime.jsx("span", { children: "Propagate tags" }), jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-16 mt-2 ml-4" })] })) })));
|
|
16433
16462
|
}
|
|
16434
16463
|
|
|
16435
|
-
var _path$
|
|
16436
|
-
function _extends$
|
|
16464
|
+
var _path$b;
|
|
16465
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
16437
16466
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
16438
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16467
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
16439
16468
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16440
16469
|
width: "1em",
|
|
16441
16470
|
height: "1em",
|
|
16442
16471
|
viewBox: "0 0 20 20"
|
|
16443
|
-
}, props), _path$
|
|
16472
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16444
16473
|
d: "M10 1.667c4.6 0 8.333 3.733 8.333 8.333S14.6 18.333 10 18.333 1.667 14.6 1.667 10 5.4 1.667 10 1.667zm0 1.666A6.67 6.67 0 0 0 3.333 10 6.67 6.67 0 0 0 10 16.667 6.67 6.67 0 0 0 16.667 10 6.67 6.67 0 0 0 10 3.333zm0 5.834c.46 0 .833.373.833.833v3.333a.834.834 0 1 1-1.666 0V10c0-.46.373-.833.833-.833zm0-3.334A.833.833 0 1 1 10 7.5a.833.833 0 0 1 0-1.667z",
|
|
16445
16474
|
fill: "#06C",
|
|
16446
16475
|
fillRule: "evenodd"
|
|
@@ -16674,15 +16703,15 @@ var TagDetails = function (_a) {
|
|
|
16674
16703
|
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox mb-8" }, { children: [jsxRuntime.jsx("div", __assign({ className: "dc__border h-30 pl-4 pr-4 br-4 mr-8 pointer ".concat(tagData.propagate ? 'bcn-7' : '', " ").concat(tagData.key.startsWith("devtron.ai/") ? 'cursor-not-allowed bcn-1' : ''), onClick: propagateTagToResource, "data-testid": "propagate-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-20 mt-4 ".concat(tagData.propagate ? 'scn-0' : '') }) })), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.KEY, placeholder: "Enter key", tabIndex: tabIndex - 1, refVar: keyRef, dependentRef: valueRef, tagOptions: suggestedTagsOptions }), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.VALUE, placeholder: "Enter value", tabIndex: tabIndex, refVar: valueRef, dependentRef: keyRef }), jsxRuntime.jsx("div", __assign({ className: "dc__border pl-4 pr-4 dc__right-radius-4 pointer flex top", onClick: deleteTag, "data-testid": "delete-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-20 mt-4" }) }))] })));
|
|
16675
16704
|
};
|
|
16676
16705
|
|
|
16677
|
-
var _path$
|
|
16678
|
-
function _extends$
|
|
16706
|
+
var _path$a;
|
|
16707
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
16679
16708
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
16680
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16709
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
16681
16710
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16682
16711
|
width: "1em",
|
|
16683
16712
|
height: "1em",
|
|
16684
16713
|
viewBox: "0 0 24 24"
|
|
16685
|
-
}, props), _path$
|
|
16714
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16686
16715
|
className: "ic-add_svg__fill-color",
|
|
16687
16716
|
fill: "#999",
|
|
16688
16717
|
d: "M18 13h-5v5a1 1 0 0 1-2 0v-5H6a1 1 0 0 1 0-2h5V6a1 1 0 0 1 2 0v5h5a1 1 0 0 1 0 2z"
|
|
@@ -16812,8 +16841,8 @@ function ForceDeleteDialog(_a) {
|
|
|
16812
16841
|
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(DeleteDialog, __assign({ title: forceDeleteDialogTitle, delete: onClickDelete, closeDelete: closeDeleteModal, deletePrefix: "Force " }, { children: jsxRuntime.jsxs(DeleteDialog.Description, { children: [jsxRuntime.jsxs("p", __assign({ className: "mt-12 mb-12 p-8 dc__break-word dc__window-bg" }, { children: ["Error: ", forceDeleteDialogMessage] })), jsxRuntime.jsx("p", { children: "Do you want to force delete?" })] }) })) }));
|
|
16813
16842
|
}
|
|
16814
16843
|
|
|
16815
|
-
function _extends$
|
|
16816
|
-
_extends$
|
|
16844
|
+
function _extends$i() {
|
|
16845
|
+
_extends$i = Object.assign ? Object.assign.bind() : function (target) {
|
|
16817
16846
|
for (var i = 1; i < arguments.length; i++) {
|
|
16818
16847
|
var source = arguments[i];
|
|
16819
16848
|
for (var key in source) {
|
|
@@ -16824,7 +16853,7 @@ function _extends$j() {
|
|
|
16824
16853
|
}
|
|
16825
16854
|
return target;
|
|
16826
16855
|
};
|
|
16827
|
-
return _extends$
|
|
16856
|
+
return _extends$i.apply(this, arguments);
|
|
16828
16857
|
}
|
|
16829
16858
|
|
|
16830
16859
|
/*
|
|
@@ -20365,7 +20394,7 @@ var Menu = function Menu(props) {
|
|
|
20365
20394
|
getStyles = props.getStyles,
|
|
20366
20395
|
innerRef = props.innerRef,
|
|
20367
20396
|
innerProps = props.innerProps;
|
|
20368
|
-
return jsx("div", _extends$
|
|
20397
|
+
return jsx("div", _extends$i({
|
|
20369
20398
|
css: getStyles('menu', props),
|
|
20370
20399
|
className: cx({
|
|
20371
20400
|
menu: true
|
|
@@ -20397,7 +20426,7 @@ var MenuList$1 = function MenuList(props) {
|
|
|
20397
20426
|
innerProps = props.innerProps,
|
|
20398
20427
|
innerRef = props.innerRef,
|
|
20399
20428
|
isMulti = props.isMulti;
|
|
20400
|
-
return jsx("div", _extends$
|
|
20429
|
+
return jsx("div", _extends$i({
|
|
20401
20430
|
css: getStyles('menuList', props),
|
|
20402
20431
|
className: cx({
|
|
20403
20432
|
'menu-list': true,
|
|
@@ -20428,7 +20457,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
20428
20457
|
cx = props.cx,
|
|
20429
20458
|
getStyles = props.getStyles,
|
|
20430
20459
|
innerProps = props.innerProps;
|
|
20431
|
-
return jsx("div", _extends$
|
|
20460
|
+
return jsx("div", _extends$i({
|
|
20432
20461
|
css: getStyles('noOptionsMessage', props),
|
|
20433
20462
|
className: cx({
|
|
20434
20463
|
'menu-notice': true,
|
|
@@ -20445,7 +20474,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
20445
20474
|
cx = props.cx,
|
|
20446
20475
|
getStyles = props.getStyles,
|
|
20447
20476
|
innerProps = props.innerProps;
|
|
20448
|
-
return jsx("div", _extends$
|
|
20477
|
+
return jsx("div", _extends$i({
|
|
20449
20478
|
css: getStyles('loadingMessage', props),
|
|
20450
20479
|
className: cx({
|
|
20451
20480
|
'menu-notice': true,
|
|
@@ -20533,7 +20562,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
20533
20562
|
rect: rect
|
|
20534
20563
|
}; // same wrapper element whether fixed or portalled
|
|
20535
20564
|
|
|
20536
|
-
var menuWrapper = jsx("div", _extends$
|
|
20565
|
+
var menuWrapper = jsx("div", _extends$i({
|
|
20537
20566
|
css: getStyles('menuPortal', state),
|
|
20538
20567
|
className: cx({
|
|
20539
20568
|
'menu-portal': true
|
|
@@ -20569,7 +20598,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
20569
20598
|
innerProps = props.innerProps,
|
|
20570
20599
|
isDisabled = props.isDisabled,
|
|
20571
20600
|
isRtl = props.isRtl;
|
|
20572
|
-
return jsx("div", _extends$
|
|
20601
|
+
return jsx("div", _extends$i({
|
|
20573
20602
|
css: getStyles('container', props),
|
|
20574
20603
|
className: cx({
|
|
20575
20604
|
'--is-disabled': isDisabled,
|
|
@@ -20604,7 +20633,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
20604
20633
|
isMulti = props.isMulti,
|
|
20605
20634
|
getStyles = props.getStyles,
|
|
20606
20635
|
hasValue = props.hasValue;
|
|
20607
|
-
return jsx("div", _extends$
|
|
20636
|
+
return jsx("div", _extends$i({
|
|
20608
20637
|
css: getStyles('valueContainer', props),
|
|
20609
20638
|
className: cx({
|
|
20610
20639
|
'value-container': true,
|
|
@@ -20630,7 +20659,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
20630
20659
|
cx = props.cx,
|
|
20631
20660
|
innerProps = props.innerProps,
|
|
20632
20661
|
getStyles = props.getStyles;
|
|
20633
|
-
return jsx("div", _extends$
|
|
20662
|
+
return jsx("div", _extends$i({
|
|
20634
20663
|
css: getStyles('indicatorsContainer', props),
|
|
20635
20664
|
className: cx({
|
|
20636
20665
|
indicators: true
|
|
@@ -20661,7 +20690,7 @@ var Svg = function Svg(_ref) {
|
|
|
20661
20690
|
var size = _ref.size,
|
|
20662
20691
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
20663
20692
|
|
|
20664
|
-
return jsx("svg", _extends$
|
|
20693
|
+
return jsx("svg", _extends$i({
|
|
20665
20694
|
height: size,
|
|
20666
20695
|
width: size,
|
|
20667
20696
|
viewBox: "0 0 20 20",
|
|
@@ -20672,14 +20701,14 @@ var Svg = function Svg(_ref) {
|
|
|
20672
20701
|
};
|
|
20673
20702
|
|
|
20674
20703
|
var CrossIcon = function CrossIcon(props) {
|
|
20675
|
-
return jsx(Svg, _extends$
|
|
20704
|
+
return jsx(Svg, _extends$i({
|
|
20676
20705
|
size: 20
|
|
20677
20706
|
}, props), jsx("path", {
|
|
20678
20707
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
20679
20708
|
}));
|
|
20680
20709
|
};
|
|
20681
20710
|
var DownChevron = function DownChevron(props) {
|
|
20682
|
-
return jsx(Svg, _extends$
|
|
20711
|
+
return jsx(Svg, _extends$i({
|
|
20683
20712
|
size: 20
|
|
20684
20713
|
}, props), jsx("path", {
|
|
20685
20714
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
@@ -20712,7 +20741,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
|
|
|
20712
20741
|
cx = props.cx,
|
|
20713
20742
|
getStyles = props.getStyles,
|
|
20714
20743
|
innerProps = props.innerProps;
|
|
20715
|
-
return jsx("div", _extends$
|
|
20744
|
+
return jsx("div", _extends$i({
|
|
20716
20745
|
css: getStyles('dropdownIndicator', props),
|
|
20717
20746
|
className: cx({
|
|
20718
20747
|
indicator: true,
|
|
@@ -20727,7 +20756,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
20727
20756
|
cx = props.cx,
|
|
20728
20757
|
getStyles = props.getStyles,
|
|
20729
20758
|
innerProps = props.innerProps;
|
|
20730
|
-
return jsx("div", _extends$
|
|
20759
|
+
return jsx("div", _extends$i({
|
|
20731
20760
|
css: getStyles('clearIndicator', props),
|
|
20732
20761
|
className: cx({
|
|
20733
20762
|
indicator: true,
|
|
@@ -20757,7 +20786,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
20757
20786
|
cx = props.cx,
|
|
20758
20787
|
getStyles = props.getStyles,
|
|
20759
20788
|
innerProps = props.innerProps;
|
|
20760
|
-
return jsx("span", _extends$
|
|
20789
|
+
return jsx("span", _extends$i({}, innerProps, {
|
|
20761
20790
|
css: getStyles('indicatorSeparator', props),
|
|
20762
20791
|
className: cx({
|
|
20763
20792
|
'indicator-separator': true
|
|
@@ -20812,7 +20841,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
20812
20841
|
getStyles = props.getStyles,
|
|
20813
20842
|
innerProps = props.innerProps,
|
|
20814
20843
|
isRtl = props.isRtl;
|
|
20815
|
-
return jsx("div", _extends$
|
|
20844
|
+
return jsx("div", _extends$i({
|
|
20816
20845
|
css: getStyles('loadingIndicator', props),
|
|
20817
20846
|
className: cx({
|
|
20818
20847
|
indicator: true,
|
|
@@ -20873,7 +20902,7 @@ var Control = function Control(props) {
|
|
|
20873
20902
|
innerRef = props.innerRef,
|
|
20874
20903
|
innerProps = props.innerProps,
|
|
20875
20904
|
menuIsOpen = props.menuIsOpen;
|
|
20876
|
-
return jsx("div", _extends$
|
|
20905
|
+
return jsx("div", _extends$i({
|
|
20877
20906
|
ref: innerRef,
|
|
20878
20907
|
css: getStyles('control', props),
|
|
20879
20908
|
className: cx({
|
|
@@ -20905,12 +20934,12 @@ var Group = function Group(props) {
|
|
|
20905
20934
|
label = props.label,
|
|
20906
20935
|
theme = props.theme,
|
|
20907
20936
|
selectProps = props.selectProps;
|
|
20908
|
-
return jsx("div", _extends$
|
|
20937
|
+
return jsx("div", _extends$i({
|
|
20909
20938
|
css: getStyles('group', props),
|
|
20910
20939
|
className: cx({
|
|
20911
20940
|
group: true
|
|
20912
20941
|
}, className)
|
|
20913
|
-
}, innerProps), jsx(Heading, _extends$
|
|
20942
|
+
}, innerProps), jsx(Heading, _extends$i({}, headingProps, {
|
|
20914
20943
|
selectProps: selectProps,
|
|
20915
20944
|
theme: theme,
|
|
20916
20945
|
getStyles: getStyles,
|
|
@@ -20942,7 +20971,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
20942
20971
|
_cleanCommonProps.data;
|
|
20943
20972
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
20944
20973
|
|
|
20945
|
-
return jsx("div", _extends$
|
|
20974
|
+
return jsx("div", _extends$i({
|
|
20946
20975
|
css: getStyles('groupHeading', props),
|
|
20947
20976
|
className: cx({
|
|
20948
20977
|
'group-heading': true
|
|
@@ -21018,7 +21047,7 @@ var Input = function Input(props) {
|
|
|
21018
21047
|
}, className),
|
|
21019
21048
|
css: getStyles('input', props),
|
|
21020
21049
|
"data-value": value || ''
|
|
21021
|
-
}, jsx("input", _extends$
|
|
21050
|
+
}, jsx("input", _extends$i({
|
|
21022
21051
|
className: cx({
|
|
21023
21052
|
input: true
|
|
21024
21053
|
}, inputClassName),
|
|
@@ -21088,7 +21117,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
21088
21117
|
function MultiValueRemove$1(_ref5) {
|
|
21089
21118
|
var children = _ref5.children,
|
|
21090
21119
|
innerProps = _ref5.innerProps;
|
|
21091
|
-
return jsx("div", _extends$
|
|
21120
|
+
return jsx("div", _extends$i({
|
|
21092
21121
|
role: "button"
|
|
21093
21122
|
}, innerProps), children || jsx(CrossIcon, {
|
|
21094
21123
|
size: 14
|
|
@@ -21177,7 +21206,7 @@ var Option$1 = function Option(props) {
|
|
|
21177
21206
|
isSelected = props.isSelected,
|
|
21178
21207
|
innerRef = props.innerRef,
|
|
21179
21208
|
innerProps = props.innerProps;
|
|
21180
|
-
return jsx("div", _extends$
|
|
21209
|
+
return jsx("div", _extends$i({
|
|
21181
21210
|
css: getStyles('option', props),
|
|
21182
21211
|
className: cx({
|
|
21183
21212
|
option: true,
|
|
@@ -21209,7 +21238,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
21209
21238
|
cx = props.cx,
|
|
21210
21239
|
getStyles = props.getStyles,
|
|
21211
21240
|
innerProps = props.innerProps;
|
|
21212
|
-
return jsx("div", _extends$
|
|
21241
|
+
return jsx("div", _extends$i({
|
|
21213
21242
|
css: getStyles('placeholder', props),
|
|
21214
21243
|
className: cx({
|
|
21215
21244
|
placeholder: true
|
|
@@ -21242,7 +21271,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
21242
21271
|
getStyles = props.getStyles,
|
|
21243
21272
|
isDisabled = props.isDisabled,
|
|
21244
21273
|
innerProps = props.innerProps;
|
|
21245
|
-
return jsx("div", _extends$
|
|
21274
|
+
return jsx("div", _extends$i({
|
|
21246
21275
|
css: getStyles('singleValue', props),
|
|
21247
21276
|
className: cx({
|
|
21248
21277
|
'single-value': true,
|
|
@@ -21490,7 +21519,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
21490
21519
|
};
|
|
21491
21520
|
|
|
21492
21521
|
var A11yText = function A11yText(props) {
|
|
21493
|
-
return jsx("span", _extends$
|
|
21522
|
+
return jsx("span", _extends$i({
|
|
21494
21523
|
css: _ref
|
|
21495
21524
|
}, props));
|
|
21496
21525
|
};
|
|
@@ -22026,7 +22055,7 @@ function DummyInput(_ref) {
|
|
|
22026
22055
|
var innerRef = _ref.innerRef,
|
|
22027
22056
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22028
22057
|
|
|
22029
|
-
return jsx("input", _extends$
|
|
22058
|
+
return jsx("input", _extends$i({
|
|
22030
22059
|
ref: innerRef
|
|
22031
22060
|
}, props, {
|
|
22032
22061
|
css: /*#__PURE__*/css$2({
|
|
@@ -23661,7 +23690,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23661
23690
|
|
|
23662
23691
|
if (!isSearchable) {
|
|
23663
23692
|
// use a dummy input to maintain focus/blur functionality
|
|
23664
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
23693
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$i({
|
|
23665
23694
|
id: id,
|
|
23666
23695
|
innerRef: this.getInputRef,
|
|
23667
23696
|
onBlur: this.onInputBlur,
|
|
@@ -23675,7 +23704,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23675
23704
|
}, ariaAttributes));
|
|
23676
23705
|
}
|
|
23677
23706
|
|
|
23678
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
23707
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$i({}, commonProps, {
|
|
23679
23708
|
autoCapitalize: "none",
|
|
23680
23709
|
autoComplete: "off",
|
|
23681
23710
|
autoCorrect: "off",
|
|
@@ -23719,7 +23748,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23719
23748
|
isFocused = _this$state5.isFocused;
|
|
23720
23749
|
|
|
23721
23750
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
23722
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
23751
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$i({}, commonProps, {
|
|
23723
23752
|
key: "placeholder",
|
|
23724
23753
|
isDisabled: isDisabled,
|
|
23725
23754
|
isFocused: isFocused,
|
|
@@ -23733,7 +23762,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23733
23762
|
return selectValue.map(function (opt, index) {
|
|
23734
23763
|
var isOptionFocused = opt === focusedValue;
|
|
23735
23764
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
23736
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
23765
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$i({}, commonProps, {
|
|
23737
23766
|
components: {
|
|
23738
23767
|
Container: MultiValueContainer,
|
|
23739
23768
|
Label: MultiValueLabel,
|
|
@@ -23765,7 +23794,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23765
23794
|
}
|
|
23766
23795
|
|
|
23767
23796
|
var singleValue = selectValue[0];
|
|
23768
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
23797
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$i({}, commonProps, {
|
|
23769
23798
|
data: singleValue,
|
|
23770
23799
|
isDisabled: isDisabled
|
|
23771
23800
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -23791,7 +23820,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23791
23820
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
23792
23821
|
'aria-hidden': 'true'
|
|
23793
23822
|
};
|
|
23794
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
23823
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$i({}, commonProps, {
|
|
23795
23824
|
innerProps: innerProps,
|
|
23796
23825
|
isFocused: isFocused
|
|
23797
23826
|
}));
|
|
@@ -23811,7 +23840,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23811
23840
|
var innerProps = {
|
|
23812
23841
|
'aria-hidden': 'true'
|
|
23813
23842
|
};
|
|
23814
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
23843
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$i({}, commonProps, {
|
|
23815
23844
|
innerProps: innerProps,
|
|
23816
23845
|
isDisabled: isDisabled,
|
|
23817
23846
|
isFocused: isFocused
|
|
@@ -23829,7 +23858,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23829
23858
|
var commonProps = this.commonProps;
|
|
23830
23859
|
var isDisabled = this.props.isDisabled;
|
|
23831
23860
|
var isFocused = this.state.isFocused;
|
|
23832
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
23861
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$i({}, commonProps, {
|
|
23833
23862
|
isDisabled: isDisabled,
|
|
23834
23863
|
isFocused: isFocused
|
|
23835
23864
|
}));
|
|
@@ -23849,7 +23878,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23849
23878
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
23850
23879
|
'aria-hidden': 'true'
|
|
23851
23880
|
};
|
|
23852
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
23881
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$i({}, commonProps, {
|
|
23853
23882
|
innerProps: innerProps,
|
|
23854
23883
|
isDisabled: isDisabled,
|
|
23855
23884
|
isFocused: isFocused
|
|
@@ -23912,7 +23941,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23912
23941
|
onMouseOver: onHover,
|
|
23913
23942
|
tabIndex: -1
|
|
23914
23943
|
};
|
|
23915
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
23944
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$i({}, commonProps, {
|
|
23916
23945
|
innerProps: innerProps,
|
|
23917
23946
|
data: data,
|
|
23918
23947
|
isDisabled: isDisabled,
|
|
@@ -23936,7 +23965,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23936
23965
|
groupIndex = item.index;
|
|
23937
23966
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
23938
23967
|
var headingId = "".concat(groupId, "-heading");
|
|
23939
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
23968
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$i({}, commonProps, {
|
|
23940
23969
|
key: groupId,
|
|
23941
23970
|
data: _data,
|
|
23942
23971
|
options: options,
|
|
@@ -23975,12 +24004,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23975
24004
|
menuPosition: menuPosition,
|
|
23976
24005
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
23977
24006
|
};
|
|
23978
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
24007
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$i({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
23979
24008
|
var ref = _ref4.ref,
|
|
23980
24009
|
_ref4$placerProps = _ref4.placerProps,
|
|
23981
24010
|
placement = _ref4$placerProps.placement,
|
|
23982
24011
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
23983
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
24012
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$i({}, commonProps, menuPlacementProps, {
|
|
23984
24013
|
innerRef: ref,
|
|
23985
24014
|
innerProps: {
|
|
23986
24015
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -23995,7 +24024,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23995
24024
|
onBottomArrive: onMenuScrollToBottom,
|
|
23996
24025
|
lockEnabled: menuShouldBlockScroll
|
|
23997
24026
|
}, function (scrollTargetRef) {
|
|
23998
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
24027
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$i({}, commonProps, {
|
|
23999
24028
|
innerRef: function innerRef(instance) {
|
|
24000
24029
|
_this4.getMenuListRef(instance);
|
|
24001
24030
|
|
|
@@ -24010,7 +24039,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24010
24039
|
// so we use the same component. the actual portalling logic is forked
|
|
24011
24040
|
// within the component based on `menuPosition`
|
|
24012
24041
|
|
|
24013
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
24042
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$i({}, commonProps, {
|
|
24014
24043
|
appendTo: menuPortalTarget,
|
|
24015
24044
|
controlElement: this.controlRef,
|
|
24016
24045
|
menuPlacement: menuPlacement,
|
|
@@ -24075,7 +24104,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24075
24104
|
isFocused = _this$state6.isFocused,
|
|
24076
24105
|
selectValue = _this$state6.selectValue;
|
|
24077
24106
|
var focusableOptions = this.getFocusableOptions();
|
|
24078
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
24107
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$i({}, commonProps, {
|
|
24079
24108
|
id: this.getElementId('live-region'),
|
|
24080
24109
|
ariaSelection: ariaSelection,
|
|
24081
24110
|
focusedOption: focusedOption,
|
|
@@ -24101,7 +24130,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24101
24130
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
24102
24131
|
var isFocused = this.state.isFocused;
|
|
24103
24132
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
24104
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
24133
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$i({}, commonProps, {
|
|
24105
24134
|
className: className,
|
|
24106
24135
|
innerProps: {
|
|
24107
24136
|
id: id,
|
|
@@ -24109,7 +24138,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24109
24138
|
},
|
|
24110
24139
|
isDisabled: isDisabled,
|
|
24111
24140
|
isFocused: isFocused
|
|
24112
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
24141
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$i({}, commonProps, {
|
|
24113
24142
|
innerRef: this.getControlRef,
|
|
24114
24143
|
innerProps: {
|
|
24115
24144
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -24118,9 +24147,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24118
24147
|
isDisabled: isDisabled,
|
|
24119
24148
|
isFocused: isFocused,
|
|
24120
24149
|
menuIsOpen: menuIsOpen
|
|
24121
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
24150
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$i({}, commonProps, {
|
|
24122
24151
|
isDisabled: isDisabled
|
|
24123
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
24152
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$i({}, commonProps, {
|
|
24124
24153
|
isDisabled: isDisabled
|
|
24125
24154
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
24126
24155
|
}
|
|
@@ -24193,7 +24222,7 @@ Select$1.defaultProps = defaultProps;
|
|
|
24193
24222
|
|
|
24194
24223
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24195
24224
|
var baseSelectProps = useStateManager(props);
|
|
24196
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
24225
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$i({
|
|
24197
24226
|
ref: ref
|
|
24198
24227
|
}, baseSelectProps));
|
|
24199
24228
|
});
|
|
@@ -24201,9 +24230,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24201
24230
|
var ReactSelect = StateManagedSelect;
|
|
24202
24231
|
|
|
24203
24232
|
var _g$6;
|
|
24204
|
-
function _extends$
|
|
24233
|
+
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
24205
24234
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
24206
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24235
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
24207
24236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24208
24237
|
viewBox: "0 0 28 28",
|
|
24209
24238
|
width: "1em",
|
|
@@ -24224,15 +24253,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
24224
24253
|
}))));
|
|
24225
24254
|
};
|
|
24226
24255
|
|
|
24227
|
-
var _path$
|
|
24228
|
-
function _extends$
|
|
24256
|
+
var _path$9;
|
|
24257
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
24229
24258
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
24230
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24259
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
24231
24260
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24232
24261
|
width: "1em",
|
|
24233
24262
|
height: "1em",
|
|
24234
24263
|
viewBox: "0 0 24 24"
|
|
24235
|
-
}, props), _path$
|
|
24264
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24236
24265
|
stroke: "#06C",
|
|
24237
24266
|
strokeLinecap: "round",
|
|
24238
24267
|
strokeLinejoin: "round",
|
|
@@ -24244,9 +24273,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
24244
24273
|
};
|
|
24245
24274
|
|
|
24246
24275
|
var _g$5;
|
|
24247
|
-
function _extends$
|
|
24276
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
24248
24277
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
24249
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24278
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
24250
24279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24251
24280
|
width: "1em",
|
|
24252
24281
|
height: "1em",
|
|
@@ -24575,7 +24604,6 @@ Valid States of Checkbox:
|
|
|
24575
24604
|
5. disabled: false, checked: true, value: INTERMIDIATE
|
|
24576
24605
|
6. disabled: false, checked: true, value: CHECKED
|
|
24577
24606
|
*/
|
|
24578
|
-
// TODO: Associate label with input element
|
|
24579
24607
|
var Checkbox$1 = /** @class */ (function (_super) {
|
|
24580
24608
|
__extends$1(Checkbox, _super);
|
|
24581
24609
|
function Checkbox() {
|
|
@@ -24590,9 +24618,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
|
|
|
24590
24618
|
}(React.Component));
|
|
24591
24619
|
|
|
24592
24620
|
var _g$4;
|
|
24593
|
-
function _extends$
|
|
24621
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
24594
24622
|
var SvgIcSearch = function SvgIcSearch(props) {
|
|
24595
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24623
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
24596
24624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24597
24625
|
viewBox: "0 0 24 24",
|
|
24598
24626
|
width: "1em",
|
|
@@ -24609,9 +24637,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
|
|
|
24609
24637
|
};
|
|
24610
24638
|
|
|
24611
24639
|
var _g$3;
|
|
24612
|
-
function _extends$
|
|
24640
|
+
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
24613
24641
|
var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
24614
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24642
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
24615
24643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24616
24644
|
width: "1em",
|
|
24617
24645
|
height: "1em",
|
|
@@ -24633,7 +24661,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
|
24633
24661
|
}))));
|
|
24634
24662
|
};
|
|
24635
24663
|
|
|
24636
|
-
var css_248z$5 = ".search-bar:focus, .search-bar:focus-within {\n outline: none;\n border: solid 1px var(--B500)
|
|
24664
|
+
var css_248z$5 = ".search-bar:focus, .search-bar:focus-within {\n outline: none;\n border: solid 1px var(--B500);\n}\n.search-bar__input:focus, .search-bar__input:focus-visible {\n border: none;\n outline: none;\n}\n.search-bar__icon {\n z-index: 1;\n top: 50%;\n left: 8px;\n transform: translateY(-50%);\n}\n.search-bar__clear-button {\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}";
|
|
24637
24665
|
styleInject(css_248z$5);
|
|
24638
24666
|
|
|
24639
24667
|
/**
|
|
@@ -24678,26 +24706,9 @@ var SearchBar = function (_a) {
|
|
|
24678
24706
|
handleSearchChange,
|
|
24679
24707
|
debounceTimeout,
|
|
24680
24708
|
]);
|
|
24681
|
-
// In most case would reset the state by doing history.push('/')
|
|
24682
|
-
React.useEffect(function () {
|
|
24683
|
-
inputRef.current.value = initialSearchText;
|
|
24684
|
-
}, [initialSearchText]);
|
|
24685
|
-
var _applySearch = function (value) {
|
|
24686
|
-
handleSearchChange(value);
|
|
24687
|
-
handleEnter(value);
|
|
24688
|
-
};
|
|
24689
|
-
var clearSearch = function () {
|
|
24690
|
-
inputRef.current.value = '';
|
|
24691
|
-
_applySearch('');
|
|
24692
|
-
setShowClearButton(false);
|
|
24693
|
-
};
|
|
24694
24709
|
var handleChange = function (e) {
|
|
24695
24710
|
var value = e.target.value;
|
|
24696
24711
|
setShowClearButton(!!value);
|
|
24697
|
-
if (!value) {
|
|
24698
|
-
clearSearch();
|
|
24699
|
-
return;
|
|
24700
|
-
}
|
|
24701
24712
|
if (shouldDebounce) {
|
|
24702
24713
|
debouncedSearchChange(value);
|
|
24703
24714
|
}
|
|
@@ -24705,6 +24716,10 @@ var SearchBar = function (_a) {
|
|
|
24705
24716
|
handleSearchChange(value);
|
|
24706
24717
|
}
|
|
24707
24718
|
};
|
|
24719
|
+
var _applySearch = function (value) {
|
|
24720
|
+
handleSearchChange(value);
|
|
24721
|
+
handleEnter(value);
|
|
24722
|
+
};
|
|
24708
24723
|
var handleKeyDown = function (e) {
|
|
24709
24724
|
var key = e.key;
|
|
24710
24725
|
if (key === 'Enter') {
|
|
@@ -24713,7 +24728,66 @@ var SearchBar = function (_a) {
|
|
|
24713
24728
|
_applySearch(value);
|
|
24714
24729
|
}
|
|
24715
24730
|
};
|
|
24716
|
-
|
|
24731
|
+
var clearSearch = function () {
|
|
24732
|
+
inputRef.current.value = '';
|
|
24733
|
+
_applySearch('');
|
|
24734
|
+
};
|
|
24735
|
+
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" }) })))] })) })));
|
|
24736
|
+
};
|
|
24737
|
+
|
|
24738
|
+
var _path$8;
|
|
24739
|
+
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); }
|
|
24740
|
+
var SvgIcArrowUpDown = function SvgIcArrowUpDown(props) {
|
|
24741
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
24742
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24743
|
+
width: "1em",
|
|
24744
|
+
height: "1em",
|
|
24745
|
+
viewBox: "0 0 12 12",
|
|
24746
|
+
fill: "none"
|
|
24747
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24748
|
+
d: "M4.125 8.5 6 10.75 7.875 8.5m-3.75-5L6 1.25 7.875 3.5",
|
|
24749
|
+
stroke: "#3B444C",
|
|
24750
|
+
strokeWidth: 1.5,
|
|
24751
|
+
strokeLinecap: "round",
|
|
24752
|
+
strokeLinejoin: "round"
|
|
24753
|
+
})));
|
|
24754
|
+
};
|
|
24755
|
+
|
|
24756
|
+
var _path$7;
|
|
24757
|
+
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); }
|
|
24758
|
+
var SvgIcSortArrowDown = function SvgIcSortArrowDown(props) {
|
|
24759
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
24760
|
+
width: "1em",
|
|
24761
|
+
height: "1em",
|
|
24762
|
+
viewBox: "0 0 12 12",
|
|
24763
|
+
fill: "none",
|
|
24764
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
24765
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24766
|
+
d: "M3.5 7.5 6 10m0 0 2.5-2.5M6 10V2",
|
|
24767
|
+
stroke: "#596168",
|
|
24768
|
+
strokeWidth: 1.5,
|
|
24769
|
+
strokeLinecap: "round",
|
|
24770
|
+
strokeLinejoin: "round"
|
|
24771
|
+
})));
|
|
24772
|
+
};
|
|
24773
|
+
|
|
24774
|
+
/**
|
|
24775
|
+
* Reusable component for the table header cell with support for sorting icons
|
|
24776
|
+
*
|
|
24777
|
+
* @example Usage
|
|
24778
|
+
* ```tsx
|
|
24779
|
+
* <SortableTableHeaderCell
|
|
24780
|
+
* isSorted={currentSortedCell === 'cell'}
|
|
24781
|
+
* triggerSorting={() => {}}
|
|
24782
|
+
* sortOrder={SortingOrder.ASC}
|
|
24783
|
+
* title="Header Cell"
|
|
24784
|
+
* disabled={isDisabled}
|
|
24785
|
+
* />
|
|
24786
|
+
* ```
|
|
24787
|
+
*/
|
|
24788
|
+
var SortableTableHeaderCell = function (_a) {
|
|
24789
|
+
var isSorted = _a.isSorted, triggerSorting = _a.triggerSorting, sortOrder = _a.sortOrder, title = _a.title, disabled = _a.disabled;
|
|
24790
|
+
return (jsxRuntime.jsxs("button", __assign({ type: "button", className: "dc__transparent p-0 bcn-0 cn-7 flex dc__content-start dc__gap-4 cursor", onClick: triggerSorting, disabled: disabled }, { children: [jsxRuntime.jsx("span", __assign({ className: "dc__uppercase dc__ellipsis-right" }, { children: title })), isSorted ? (jsxRuntime.jsx(SvgIcSortArrowDown, { className: "icon-dim-12 mw-12 scn-7 ".concat(sortOrder === exports.SortingOrder.DESC ? 'dc__flip-180' : '') })) : (jsxRuntime.jsx(SvgIcArrowUpDown, { className: "icon-dim-12 mw-12 scn-7" }))] })));
|
|
24717
24791
|
};
|
|
24718
24792
|
|
|
24719
24793
|
var css_248z$4 = ".toggle__switch {\n position: relative;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.toggle__switch.disabled {\n cursor: not-allowed;\n}\n.toggle__switch.disabled .toggle__slider {\n cursor: not-allowed;\n}\n\n/* Hide default HTML checkbox */\n.toggle__switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n/* The slider */\n.toggle__slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: all 0.4s ease;\n}\n.toggle__slider.round {\n border-radius: 34px;\n}\n.toggle__slider.round:before {\n border-radius: 50%;\n}\n.toggle__slider:before {\n position: absolute;\n content: \"\";\n height: calc(100% - 8px);\n width: calc(50% - 4px);\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: all 0.4s ease;\n}\n.toggle__slider.with-icon {\n background-color: var(--N000) !important;\n}\n.toggle__slider.with-icon svg {\n position: absolute;\n content: \"\";\n top: -1px;\n left: -1px;\n background-color: var(--N300);\n transition: all 0.4s ease;\n}\n\ninput:checked + .toggle__slider {\n background-color: var(--color);\n}\ninput:checked + .toggle__slider:before {\n transform: translateX(100%);\n}\ninput:checked + .toggle__slider.with-icon svg {\n transform: translateX(100%);\n background-color: var(--color);\n}\n\ninput:focus + .toggle__slider {\n box-shadow: 0 0 1px var(--color);\n}";
|
|
@@ -24852,9 +24926,9 @@ exports.ConsequenceAction = void 0;
|
|
|
24852
24926
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
24853
24927
|
|
|
24854
24928
|
var _g$2;
|
|
24855
|
-
function _extends$
|
|
24929
|
+
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
24856
24930
|
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
24857
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24931
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
24858
24932
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24859
24933
|
width: "1em",
|
|
24860
24934
|
height: "1em",
|
|
@@ -24933,16 +25007,16 @@ function DeleteComponent(_a) {
|
|
|
24933
25007
|
return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
|
|
24934
25008
|
}
|
|
24935
25009
|
|
|
24936
|
-
var _path$
|
|
24937
|
-
function _extends$
|
|
25010
|
+
var _path$6;
|
|
25011
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
24938
25012
|
var SvgIcPencil = function SvgIcPencil(props) {
|
|
24939
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25013
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
24940
25014
|
width: "1em",
|
|
24941
25015
|
height: "1em",
|
|
24942
25016
|
viewBox: "0 0 20 20",
|
|
24943
25017
|
fill: "none",
|
|
24944
25018
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24945
|
-
}, props), _path$
|
|
25019
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24946
25020
|
d: "M10.625 5 15 9.375m-7.5 7.5H3.75a.625.625 0 0 1-.625-.625v-3.491a.625.625 0 0 1 .183-.442l9.375-9.375a.625.625 0 0 1 .884 0l3.491 3.491a.625.625 0 0 1 0 .884L7.5 16.875Z",
|
|
24947
25021
|
stroke: "#596168",
|
|
24948
25022
|
strokeWidth: 1.5,
|
|
@@ -24951,19 +25025,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
|
|
|
24951
25025
|
})));
|
|
24952
25026
|
};
|
|
24953
25027
|
|
|
24954
|
-
var _path$
|
|
24955
|
-
function _extends$
|
|
25028
|
+
var _path$5, _path2, _path3;
|
|
25029
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
24956
25030
|
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
24957
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25031
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
24958
25032
|
width: "1em",
|
|
24959
25033
|
height: "1em",
|
|
24960
25034
|
viewBox: "0 0 12 12",
|
|
24961
25035
|
fill: "none",
|
|
24962
25036
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24963
|
-
}, props), _path$
|
|
25037
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24964
25038
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
24965
25039
|
fill: "#767D84"
|
|
24966
|
-
})), _path2
|
|
25040
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24967
25041
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
24968
25042
|
stroke: "#596168",
|
|
24969
25043
|
strokeWidth: 1.5,
|
|
@@ -24978,15 +25052,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
|
24978
25052
|
})));
|
|
24979
25053
|
};
|
|
24980
25054
|
|
|
24981
|
-
var _path$
|
|
24982
|
-
function _extends$
|
|
25055
|
+
var _path$4;
|
|
25056
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
24983
25057
|
var SvgIcMinus = function SvgIcMinus(props) {
|
|
24984
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25058
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
24985
25059
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24986
25060
|
width: "1em",
|
|
24987
25061
|
height: "1em",
|
|
24988
25062
|
viewBox: "0 0 14 14"
|
|
24989
|
-
}, props), _path$
|
|
25063
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24990
25064
|
fill: "#959BA1",
|
|
24991
25065
|
className: "ic-minus_svg__fill-color",
|
|
24992
25066
|
fillRule: "evenodd",
|
|
@@ -24995,9 +25069,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
|
|
|
24995
25069
|
};
|
|
24996
25070
|
|
|
24997
25071
|
var _g$1;
|
|
24998
|
-
function _extends$
|
|
25072
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
24999
25073
|
var SvgIcWarning = function SvgIcWarning(props) {
|
|
25000
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25074
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
25001
25075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25002
25076
|
width: "1em",
|
|
25003
25077
|
height: "1em",
|
|
@@ -25017,9 +25091,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
|
|
|
25017
25091
|
};
|
|
25018
25092
|
|
|
25019
25093
|
var _g;
|
|
25020
|
-
function _extends$
|
|
25094
|
+
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
25021
25095
|
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
25022
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25096
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
25023
25097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25024
25098
|
width: "1em",
|
|
25025
25099
|
height: "1em",
|
|
@@ -25036,16 +25110,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
|
25036
25110
|
}))));
|
|
25037
25111
|
};
|
|
25038
25112
|
|
|
25039
|
-
var _path$
|
|
25040
|
-
function _extends$
|
|
25113
|
+
var _path$3;
|
|
25114
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
25041
25115
|
var SvgIcEnter = function SvgIcEnter(props) {
|
|
25042
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25116
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
25043
25117
|
width: "1em",
|
|
25044
25118
|
height: "1em",
|
|
25045
25119
|
viewBox: "0 0 16 16",
|
|
25046
25120
|
fill: "none",
|
|
25047
25121
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25048
|
-
}, props), _path$
|
|
25122
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25049
25123
|
d: "M12.667 4a.667.667 0 0 0-.667.667v2.666a.667.667 0 0 1-.667.667H4.94l.867-.86a.67.67 0 1 0-.947-.947l-2 2a.667.667 0 0 0-.14.22.667.667 0 0 0 0 .507c.032.082.08.157.14.22l2 2a.666.666 0 0 0 .947 0 .667.667 0 0 0 0-.947l-.867-.86h6.393a2 2 0 0 0 2-2V4.667A.667.667 0 0 0 12.667 4Z",
|
|
25050
25124
|
fill: "#3B444C"
|
|
25051
25125
|
})));
|
|
@@ -25451,15 +25525,15 @@ function Grid(_a) {
|
|
|
25451
25525
|
return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
|
|
25452
25526
|
}
|
|
25453
25527
|
|
|
25454
|
-
var _path$
|
|
25455
|
-
function _extends$
|
|
25528
|
+
var _path$2;
|
|
25529
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
25456
25530
|
var SvgIcCopy = function SvgIcCopy(props) {
|
|
25457
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25531
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
25458
25532
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25459
25533
|
width: "1em",
|
|
25460
25534
|
height: "1em",
|
|
25461
25535
|
viewBox: "0 0 20 20"
|
|
25462
|
-
}, props), _path$
|
|
25536
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25463
25537
|
fill: "#767D84",
|
|
25464
25538
|
fillRule: "evenodd",
|
|
25465
25539
|
d: "M15.833 6.917a2.5 2.5 0 0 1 2.5 2.5v6.416a2.5 2.5 0 0 1-2.5 2.5H9.417a2.5 2.5 0 0 1-2.5-2.5V9.417a2.5 2.5 0 0 1 2.5-2.5zm0 1.666H9.417a.833.833 0 0 0-.834.834v6.416c0 .46.373.834.834.834h6.416c.46 0 .834-.373.834-.834V9.417a.833.833 0 0 0-.834-.834zM10.75 1.667c1.24 0 2.256.968 2.33 2.19l.003.143v.75a.833.833 0 0 1-1.66.097l-.006-.097V4c0-.34-.255-.62-.583-.661l-.084-.006H4c-.34 0-.62.255-.661.583L3.333 4v6.75c0 .34.255.62.583.661l.084.006h.75a.833.833 0 0 1 .097 1.66l-.097.006H4a2.333 2.333 0 0 1-2.33-2.19l-.003-.143V4c0-1.24.968-2.256 2.19-2.33L4 1.668h6.75z"
|
|
@@ -25556,6 +25630,115 @@ var useWindowSize = function () {
|
|
|
25556
25630
|
return windowSize;
|
|
25557
25631
|
};
|
|
25558
25632
|
|
|
25633
|
+
var DEFAULT_PAGE_NUMBER = 1;
|
|
25634
|
+
var URL_FILTER_KEYS = {
|
|
25635
|
+
PAGE_SIZE: 'pageSize',
|
|
25636
|
+
PAGE_NUMBER: 'pageNumber',
|
|
25637
|
+
SEARCH_KEY: 'searchKey',
|
|
25638
|
+
SORT_BY: 'sortBy',
|
|
25639
|
+
SORT_ORDER: 'sortOrder',
|
|
25640
|
+
};
|
|
25641
|
+
|
|
25642
|
+
var PAGE_SIZE = URL_FILTER_KEYS.PAGE_SIZE, PAGE_NUMBER = URL_FILTER_KEYS.PAGE_NUMBER, SEARCH_KEY = URL_FILTER_KEYS.SEARCH_KEY, SORT_BY = URL_FILTER_KEYS.SORT_BY, SORT_ORDER = URL_FILTER_KEYS.SORT_ORDER;
|
|
25643
|
+
/**
|
|
25644
|
+
* Generic hook for implementing URL based filters.
|
|
25645
|
+
* eg: pagination, search, sort.
|
|
25646
|
+
*
|
|
25647
|
+
* The exposed handlers can be consumed directly without the need for explicit state management
|
|
25648
|
+
*
|
|
25649
|
+
* @example Default Usage:
|
|
25650
|
+
* ```tsx
|
|
25651
|
+
* const { pageSize, changePage, ...rest } = useUrlFilters()
|
|
25652
|
+
* ```
|
|
25653
|
+
*
|
|
25654
|
+
* @example Usage with custom type for sort keys and initial sort key:
|
|
25655
|
+
* ```tsx
|
|
25656
|
+
* const { sortBy, sortOrder } = useUrlFilters<'email' | 'name'>({ initialSortKey: 'email' })
|
|
25657
|
+
* ```
|
|
25658
|
+
*
|
|
25659
|
+
*/
|
|
25660
|
+
var useUrlFilters = function (_a) {
|
|
25661
|
+
var _b = _a === void 0 ? {} : _a, initialSortKey = _b.initialSortKey;
|
|
25662
|
+
var location = reactRouterDom.useLocation();
|
|
25663
|
+
var history = reactRouterDom.useHistory();
|
|
25664
|
+
var searchParams = new URLSearchParams(location.search);
|
|
25665
|
+
var _c = React.useMemo(function () {
|
|
25666
|
+
var _pageSize = searchParams.get(PAGE_SIZE);
|
|
25667
|
+
var _pageNumber = searchParams.get(PAGE_NUMBER);
|
|
25668
|
+
var _searchKey = searchParams.get(SEARCH_KEY);
|
|
25669
|
+
var _sortOrder = searchParams.get(SORT_ORDER);
|
|
25670
|
+
var _sortBy = searchParams.get(SORT_BY);
|
|
25671
|
+
var sortByKey = (_sortBy || initialSortKey || '');
|
|
25672
|
+
// Fallback to ascending order
|
|
25673
|
+
var sortByOrder = Object.values(exports.SortingOrder).includes(_sortOrder) ? _sortOrder : exports.SortingOrder.ASC;
|
|
25674
|
+
return {
|
|
25675
|
+
pageSize: Number(_pageSize) || DEFAULT_BASE_PAGE_SIZE,
|
|
25676
|
+
pageNumber: Number(_pageNumber) || DEFAULT_PAGE_NUMBER,
|
|
25677
|
+
searchKey: _searchKey || '',
|
|
25678
|
+
sortBy: sortByKey,
|
|
25679
|
+
// sort order should only be applied if the key is available
|
|
25680
|
+
sortOrder: (sortByKey ? sortByOrder : ''),
|
|
25681
|
+
};
|
|
25682
|
+
}, [searchParams]), pageSize = _c.pageSize, pageNumber = _c.pageNumber, searchKey = _c.searchKey, sortBy = _c.sortBy, sortOrder = _c.sortOrder;
|
|
25683
|
+
/**
|
|
25684
|
+
* Used for getting the required result from the API
|
|
25685
|
+
*/
|
|
25686
|
+
var offset = pageSize * (pageNumber - 1);
|
|
25687
|
+
/**
|
|
25688
|
+
* Update and replace the search params in the URL.
|
|
25689
|
+
*
|
|
25690
|
+
* Note: Currently only primitive data types are supported
|
|
25691
|
+
*/
|
|
25692
|
+
var _updateSearchParam = function (key, value) {
|
|
25693
|
+
searchParams.set(key, String(value));
|
|
25694
|
+
history.replace({ search: searchParams.toString() });
|
|
25695
|
+
};
|
|
25696
|
+
var _resetPageNumber = function () {
|
|
25697
|
+
_updateSearchParam(PAGE_NUMBER, DEFAULT_PAGE_NUMBER);
|
|
25698
|
+
};
|
|
25699
|
+
var changePage = function (page) {
|
|
25700
|
+
_updateSearchParam(PAGE_NUMBER, page);
|
|
25701
|
+
};
|
|
25702
|
+
var changePageSize = function (_pageSize) {
|
|
25703
|
+
_updateSearchParam(PAGE_SIZE, _pageSize);
|
|
25704
|
+
_resetPageNumber();
|
|
25705
|
+
};
|
|
25706
|
+
var handleSearch = function (searchTerm) {
|
|
25707
|
+
_updateSearchParam(SEARCH_KEY, searchTerm);
|
|
25708
|
+
};
|
|
25709
|
+
var handleSorting = function (_sortBy) {
|
|
25710
|
+
var order;
|
|
25711
|
+
if (_sortBy === sortBy && sortOrder === exports.SortingOrder.ASC) {
|
|
25712
|
+
order = exports.SortingOrder.DESC;
|
|
25713
|
+
}
|
|
25714
|
+
else {
|
|
25715
|
+
order = exports.SortingOrder.ASC;
|
|
25716
|
+
}
|
|
25717
|
+
_updateSearchParam(SORT_BY, _sortBy);
|
|
25718
|
+
_updateSearchParam(SORT_ORDER, order);
|
|
25719
|
+
// Reset page number on sorting change
|
|
25720
|
+
_resetPageNumber();
|
|
25721
|
+
};
|
|
25722
|
+
var clearFilters = function () {
|
|
25723
|
+
Object.values(URL_FILTER_KEYS).forEach(function (key) {
|
|
25724
|
+
searchParams.delete(key);
|
|
25725
|
+
});
|
|
25726
|
+
history.replace({ search: searchParams.toString() });
|
|
25727
|
+
};
|
|
25728
|
+
return {
|
|
25729
|
+
pageSize: pageSize,
|
|
25730
|
+
changePage: changePage,
|
|
25731
|
+
changePageSize: changePageSize,
|
|
25732
|
+
searchKey: searchKey,
|
|
25733
|
+
handleSearch: handleSearch,
|
|
25734
|
+
offset: offset,
|
|
25735
|
+
sortBy: sortBy,
|
|
25736
|
+
sortOrder: sortOrder,
|
|
25737
|
+
handleSorting: handleSorting,
|
|
25738
|
+
clearFilters: clearFilters,
|
|
25739
|
+
};
|
|
25740
|
+
};
|
|
25741
|
+
|
|
25559
25742
|
var StatusConstants = {
|
|
25560
25743
|
NOT_DEPLOYED: {
|
|
25561
25744
|
noSpaceLower: 'notdeployed',
|
|
@@ -28239,10 +28422,9 @@ var translateString = function (stringToTranslate, params) {
|
|
|
28239
28422
|
return utils.englishStringTranslator(stringToTranslate, params);
|
|
28240
28423
|
}
|
|
28241
28424
|
};
|
|
28242
|
-
|
|
28243
|
-
var getCommonSelectStyle$1 = function (styleOverrides) {
|
|
28425
|
+
var getCommonSelectStyle = function (styleOverrides) {
|
|
28244
28426
|
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
28245
|
-
return __assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0
|
|
28427
|
+
return __assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0 })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base, state) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400', color: state.selectProps.menuIsOpen ? 'var(--N500)' : base.color })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, multiValue: function (base, state) {
|
|
28246
28428
|
return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
|
|
28247
28429
|
} }, styleOverrides);
|
|
28248
28430
|
};
|
|
@@ -28292,15 +28474,15 @@ var getInferredTypeFromValueType = function (value) {
|
|
|
28292
28474
|
}
|
|
28293
28475
|
};
|
|
28294
28476
|
|
|
28295
|
-
var _path$
|
|
28296
|
-
function _extends$
|
|
28477
|
+
var _path$1;
|
|
28478
|
+
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
28297
28479
|
var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
28298
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28480
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
28299
28481
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28300
28482
|
width: "1em",
|
|
28301
28483
|
height: "1em",
|
|
28302
28484
|
viewBox: "0 0 24 24"
|
|
28303
|
-
}, props), _path$
|
|
28485
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28304
28486
|
fill: "#999",
|
|
28305
28487
|
className: "ic-chevron-down_svg__fill-color",
|
|
28306
28488
|
fillRule: "nonzero",
|
|
@@ -28308,7 +28490,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
|
28308
28490
|
})));
|
|
28309
28491
|
};
|
|
28310
28492
|
|
|
28311
|
-
var commonStyles = getCommonSelectStyle
|
|
28493
|
+
var commonStyles = getCommonSelectStyle();
|
|
28312
28494
|
var MenuList = function (_a) {
|
|
28313
28495
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
28314
28496
|
return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
|
|
@@ -28360,9 +28542,9 @@ var validator = RJSFValidator.default;
|
|
|
28360
28542
|
var RJSFForm = function (props) { return (jsxRuntime.jsx(Form, __assign({ noHtml5Validate: true, showErrorList: false, autoComplete: "off" }, props, { validator: validator, templates: __assign(__assign({}, templates), props.templates), widgets: __assign(__assign({}, widgets), props.widgets), translateString: translateString }))); };
|
|
28361
28543
|
|
|
28362
28544
|
var _style, _rect;
|
|
28363
|
-
function _extends$
|
|
28545
|
+
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
28364
28546
|
var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
|
|
28365
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28547
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
28366
28548
|
width: "1em",
|
|
28367
28549
|
height: "1em",
|
|
28368
28550
|
viewBox: "0 0 100 100",
|
|
@@ -28497,9 +28679,8 @@ var handleAddCD = function (_a) {
|
|
|
28497
28679
|
handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
|
|
28498
28680
|
};
|
|
28499
28681
|
|
|
28500
|
-
// TODO: label association with input
|
|
28501
28682
|
function CustomInput(_a) {
|
|
28502
|
-
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ?
|
|
28683
|
+
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 1 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo, _r = _a.inputWrapClassName, inputWrapClassName = _r === void 0 ? '' : _r;
|
|
28503
28684
|
function handleError(error) {
|
|
28504
28685
|
if (!Array.isArray(error)) {
|
|
28505
28686
|
return [error];
|
|
@@ -28630,26 +28811,23 @@ function DraggableWrapper(_a) {
|
|
|
28630
28811
|
y: data.y,
|
|
28631
28812
|
});
|
|
28632
28813
|
}
|
|
28633
|
-
return (
|
|
28634
|
-
// Since we are using position fixed so we need to disable click on the div so that it does not interfere with the click of other elements
|
|
28635
|
-
jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
|
|
28814
|
+
return (jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed", style: {
|
|
28636
28815
|
zIndex: zIndex,
|
|
28637
28816
|
} }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
|
|
28638
28817
|
zIndex: zIndex,
|
|
28639
|
-
pointerEvents: 'auto',
|
|
28640
28818
|
} }, { children: children })) })) })));
|
|
28641
28819
|
}
|
|
28642
28820
|
|
|
28643
|
-
var _path
|
|
28644
|
-
function _extends
|
|
28821
|
+
var _path;
|
|
28822
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
28645
28823
|
var SvgIcDrag = function SvgIcDrag(props) {
|
|
28646
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends
|
|
28824
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
28647
28825
|
width: "1em",
|
|
28648
28826
|
height: "1em",
|
|
28649
28827
|
viewBox: "0 0 16 16",
|
|
28650
28828
|
fill: "none",
|
|
28651
28829
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28652
|
-
}, props), _path
|
|
28830
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28653
28831
|
d: "M10.334 9.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 9.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM10.334 5.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 5.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM10.334 13.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 13.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
|
|
28654
28832
|
fill: "#596168"
|
|
28655
28833
|
})));
|
|
@@ -28771,942 +28949,12 @@ var Pagination = function (_a) {
|
|
|
28771
28949
|
jsxRuntime.jsxs("div", __assign({ className: rootClassName || '' }, { children: [jsxRuntime.jsxs("div", __assign({ className: "page-number" }, { children: [offset + 1, " - ", lastPageNo, " of ", size] })), jsxRuntime.jsxs("ul", __assign({ className: "pagination" }, { children: [jsxRuntime.jsx("li", __assign({ className: "page" }, { children: jsxRuntime.jsx("button", __assign({ className: "page__button page__button--icon", disabled: !pageNoIndex, onClick: selectPreviousPage, type: "button", "aria-label": "Previous page" }, { children: jsxRuntime.jsx("span", __assign({ className: "left-icon" }, { children: jsxRuntime.jsx("i", { className: "fa fa-chevron-left" }) })) })) })), visiblePages.map(function (page) { return (jsxRuntime.jsx(PageValueItem, { value: page.value, isSelected: page.selected, selectPage: selectPage }, page.value)); }), jsxRuntime.jsx("li", __assign({ className: "page" }, { children: jsxRuntime.jsx("button", __assign({ className: "page__button page__button--icon", disabled: pageNoIndex === pages.length - 1, onClick: selectNextPage, type: "button", "aria-label": "Next page" }, { children: jsxRuntime.jsx("span", __assign({ className: "left-icon" }, { children: jsxRuntime.jsx("i", { className: "fa fa-chevron-right" }) })) })) }))] })), !isPageSizeFix && (jsxRuntime.jsxs("div", __assign({ className: "select" }, { children: [jsxRuntime.jsx("span", __assign({ className: "select__placeholder" }, { children: "Rows per page" })), jsxRuntime.jsx(PageSizeSelector, { pageSizeOptions: pageSizeOptions, pageSize: pageSize, changePageSize: changePageSize })] })))] })));
|
|
28772
28950
|
};
|
|
28773
28951
|
|
|
28774
|
-
var _path$2, _path2;
|
|
28775
|
-
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
28776
|
-
var SvgIcCpu = function SvgIcCpu(props) {
|
|
28777
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
28778
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
28779
|
-
width: "1em",
|
|
28780
|
-
height: "1em",
|
|
28781
|
-
viewBox: "0 0 20 20",
|
|
28782
|
-
fill: "none"
|
|
28783
|
-
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28784
|
-
d: "M12.5 5.625h-5m5 2.5h-5m8.125-5v13.75c0 .345-.28.625-.625.625H5a.625.625 0 0 1-.625-.625V3.125c0-.345.28-.625.625-.625h10c.345 0 .625.28.625.625Z",
|
|
28785
|
-
stroke: "#596168",
|
|
28786
|
-
strokeWidth: 1.5,
|
|
28787
|
-
strokeLinecap: "round",
|
|
28788
|
-
strokeLinejoin: "round"
|
|
28789
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28790
|
-
d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
|
|
28791
|
-
fill: "#596168"
|
|
28792
|
-
})));
|
|
28793
|
-
};
|
|
28794
|
-
|
|
28795
|
-
var _path$1;
|
|
28796
|
-
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
28797
|
-
var SvgIcMemory = function SvgIcMemory(props) {
|
|
28798
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
28799
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
28800
|
-
width: "1em",
|
|
28801
|
-
height: "1em",
|
|
28802
|
-
viewBox: "0 0 20 20",
|
|
28803
|
-
fill: "none"
|
|
28804
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28805
|
-
d: "M16.25 8.125h1.875m-1.875 3.75h1.875m-16.25-3.75H3.75m-1.875 3.75H3.75m8.125 4.375v1.875m-3.75-1.875v1.875m3.75-16.25V3.75m-3.75-1.875V3.75m-.313 4.063h4.375v4.375H7.814V7.811ZM4.376 3.75h11.25c.345 0 .625.28.625.625v11.25c0 .345-.28.625-.625.625H4.375a.625.625 0 0 1-.625-.625V4.375c0-.345.28-.625.625-.625Z",
|
|
28806
|
-
stroke: "#596168",
|
|
28807
|
-
strokeWidth: 1.5,
|
|
28808
|
-
strokeLinecap: "round",
|
|
28809
|
-
strokeLinejoin: "round"
|
|
28810
|
-
})));
|
|
28811
|
-
};
|
|
28812
|
-
|
|
28813
|
-
var _path;
|
|
28814
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
28815
|
-
var SvgIcTimer = function SvgIcTimer(props) {
|
|
28816
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
28817
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
28818
|
-
width: "1em",
|
|
28819
|
-
height: "1em",
|
|
28820
|
-
viewBox: "0 0 20 20",
|
|
28821
|
-
fill: "none"
|
|
28822
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28823
|
-
d: "m10 11.041 3.094-3.093M8.125 1.666h3.75m5 9.376a6.875 6.875 0 1 1-13.75 0 6.875 6.875 0 0 1 13.75 0Z",
|
|
28824
|
-
stroke: "#596168",
|
|
28825
|
-
strokeWidth: 1.5,
|
|
28826
|
-
strokeLinecap: "round",
|
|
28827
|
-
strokeLinejoin: "round"
|
|
28828
|
-
})));
|
|
28829
|
-
};
|
|
28830
|
-
|
|
28831
|
-
var _a$1;
|
|
28832
|
-
/**
|
|
28833
|
-
* Unique actions that will be dispatched and,
|
|
28834
|
-
* Keeping some values (cpu_limit, etc) in sync with backend
|
|
28835
|
-
*/
|
|
28836
|
-
exports.BuildInfraConfigTypes = void 0;
|
|
28837
|
-
(function (BuildInfraConfigTypes) {
|
|
28838
|
-
BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
|
|
28839
|
-
BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
|
|
28840
|
-
BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
|
|
28841
|
-
BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
|
|
28842
|
-
BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
|
|
28843
|
-
})(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
|
|
28844
|
-
/**
|
|
28845
|
-
* Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
|
|
28846
|
-
*/
|
|
28847
|
-
exports.BuildInfraMetaConfigTypes = void 0;
|
|
28848
|
-
(function (BuildInfraMetaConfigTypes) {
|
|
28849
|
-
BuildInfraMetaConfigTypes["NAME"] = "name";
|
|
28850
|
-
BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
|
|
28851
|
-
})(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
|
|
28852
|
-
/**
|
|
28853
|
-
* Would be used as key for few components and would be appending activate and de_activate actions to it
|
|
28854
|
-
*/
|
|
28855
|
-
exports.BuildInfraLocators = void 0;
|
|
28856
|
-
(function (BuildInfraLocators) {
|
|
28857
|
-
BuildInfraLocators["CPU"] = "cpu";
|
|
28858
|
-
BuildInfraLocators["MEMORY"] = "memory";
|
|
28859
|
-
// This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
|
|
28860
|
-
BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
|
|
28861
|
-
})(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
|
|
28862
|
-
// FIXME: Derive this from BuildInfraLocators
|
|
28863
|
-
// Appending the locators from above
|
|
28864
|
-
exports.BuildInfraInheritActions = void 0;
|
|
28865
|
-
(function (BuildInfraInheritActions) {
|
|
28866
|
-
BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
|
|
28867
|
-
BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
|
|
28868
|
-
BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
|
|
28869
|
-
BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
|
|
28870
|
-
BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_build_timeout";
|
|
28871
|
-
BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_build_timeout";
|
|
28872
|
-
})(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
|
|
28873
|
-
// TODO: Better name would be BuildInfraConfigActionMap
|
|
28874
|
-
var BuildInfraLocatorsActionMap = (_a$1 = {},
|
|
28875
|
-
_a$1[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
28876
|
-
_a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
|
|
28877
|
-
_a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
|
|
28878
|
-
_a$1[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
|
|
28879
|
-
_a$1[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
|
|
28880
|
-
_a$1);
|
|
28881
|
-
exports.BuildInfraProfileVariants = void 0;
|
|
28882
|
-
(function (BuildInfraProfileVariants) {
|
|
28883
|
-
BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
|
|
28884
|
-
BuildInfraProfileVariants["NORMAL"] = "NORMAL";
|
|
28885
|
-
BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
|
|
28886
|
-
})(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
|
|
28887
|
-
|
|
28888
|
-
var _a;
|
|
28889
|
-
var BUILD_INFRA_TEXT = {
|
|
28890
|
-
HEADING: 'Build Infra Configuration',
|
|
28891
|
-
EDIT_SUBMIT: 'Save changes',
|
|
28892
|
-
SAVE_SUBMIT: 'Save',
|
|
28893
|
-
EDIT_CANCEL: 'Cancel',
|
|
28894
|
-
EDIT_DEFAULT_TOOLTIP: 'Efficiently control infrastructure settings such as CPU, Memory, and Build timeout for your build pipelines. Streamline resource management to optimise build time and cost effortlessly.',
|
|
28895
|
-
DESCRIPTION_LABEL: 'Description',
|
|
28896
|
-
DESCRIPTION_PLACEHOLDER: 'Enter a description here',
|
|
28897
|
-
PROFILE_LABEL: 'Profile name',
|
|
28898
|
-
PROFILE_PLACEHOLDER: 'Eg. Java or Node',
|
|
28899
|
-
INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
|
|
28900
|
-
SUBMIT_BUTTON_TIPPY: {
|
|
28901
|
-
INVALID_INPUT: 'Valid input is required for all mandatory fields.',
|
|
28902
|
-
REQUEST_IN_PROGRESS: 'Request in progress.',
|
|
28903
|
-
},
|
|
28904
|
-
VALIDATE_REQUEST_LIMIT: {
|
|
28905
|
-
NEGATIVE_REQUEST: 'Request should be a positive number.',
|
|
28906
|
-
NEGATIVE_LIMIT: 'Limit should be a positive number.',
|
|
28907
|
-
REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
|
|
28908
|
-
CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
|
|
28909
|
-
REQUEST_DECIMAL_PLACES: 'Request should be upto 2 decimal places.',
|
|
28910
|
-
LIMIT_DECIMAL_PLACES: 'Limit should be upto 2 decimal places.',
|
|
28911
|
-
},
|
|
28912
|
-
getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
|
|
28913
|
-
getSubmitSuccessMessage: function (profileName, isEdited) {
|
|
28914
|
-
return "".concat(profileName, " is ").concat(isEdited ? 'updated' : 'created');
|
|
28915
|
-
},
|
|
28916
|
-
PROFILE_NOT_FOUND: {
|
|
28917
|
-
title: 'Profile not found',
|
|
28918
|
-
subTitle: 'The profile you are looking for does not exist.',
|
|
28919
|
-
},
|
|
28920
|
-
};
|
|
28921
|
-
var BUILD_INFRA_BREADCRUMB = {
|
|
28922
|
-
alias: {
|
|
28923
|
-
'global-config': null,
|
|
28924
|
-
'build-infra': {
|
|
28925
|
-
component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
|
|
28926
|
-
linked: false,
|
|
28927
|
-
},
|
|
28928
|
-
},
|
|
28929
|
-
};
|
|
28930
|
-
var BUILD_INFRA_FORM_FIELDS = [
|
|
28931
|
-
{
|
|
28932
|
-
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20" }, { children: "CPU (Request - Limit)" })),
|
|
28933
|
-
marker: SvgIcCpu,
|
|
28934
|
-
actions: [
|
|
28935
|
-
{
|
|
28936
|
-
actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
|
|
28937
|
-
label: 'Request',
|
|
28938
|
-
placeholder: 'Type CPU request',
|
|
28939
|
-
},
|
|
28940
|
-
{
|
|
28941
|
-
actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
|
|
28942
|
-
label: 'Limit',
|
|
28943
|
-
placeholder: 'Type CPU limit',
|
|
28944
|
-
},
|
|
28945
|
-
],
|
|
28946
|
-
locator: exports.BuildInfraLocators.CPU,
|
|
28947
|
-
},
|
|
28948
|
-
{
|
|
28949
|
-
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20" }, { children: "Memory (Request - Limit)" })),
|
|
28950
|
-
marker: SvgIcMemory,
|
|
28951
|
-
actions: [
|
|
28952
|
-
{
|
|
28953
|
-
actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
|
|
28954
|
-
label: 'Request',
|
|
28955
|
-
placeholder: 'Type memory request',
|
|
28956
|
-
},
|
|
28957
|
-
{
|
|
28958
|
-
actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
|
|
28959
|
-
label: 'Limit',
|
|
28960
|
-
placeholder: 'Type memory limit',
|
|
28961
|
-
},
|
|
28962
|
-
],
|
|
28963
|
-
locator: exports.BuildInfraLocators.MEMORY,
|
|
28964
|
-
},
|
|
28965
|
-
{
|
|
28966
|
-
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20" }, { children: "Build timeout" })),
|
|
28967
|
-
marker: SvgIcTimer,
|
|
28968
|
-
actions: [
|
|
28969
|
-
{
|
|
28970
|
-
actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
|
|
28971
|
-
label: 'Timeout',
|
|
28972
|
-
placeholder: 'Type build timeout',
|
|
28973
|
-
},
|
|
28974
|
-
],
|
|
28975
|
-
locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
28976
|
-
},
|
|
28977
|
-
];
|
|
28978
|
-
// TODO: Handle the case of create profile to disable save button initially and enable it when all the fields are filled
|
|
28979
|
-
var PROFILE_INPUT_ERROR_FIELDS = __assign({}, Object.fromEntries(Object.keys(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (key) { return [key, null]; })));
|
|
28980
|
-
// All fields in BuildInfraConfigTypes are required and name in BuildInfraMetaConfigTypes is required
|
|
28981
|
-
var REQUIRED_INPUT_FIELDS = __spreadArray(__spreadArray([], __read(Object.keys(exports.BuildInfraConfigTypes)), false), [exports.BuildInfraMetaConfigTypes.NAME], false);
|
|
28982
|
-
var DEFAULT_PROFILE_NAME = 'default';
|
|
28983
|
-
var CREATE_PROFILE_BASE_VALUE = {
|
|
28984
|
-
name: '',
|
|
28985
|
-
description: '',
|
|
28986
|
-
type: exports.BuildInfraProfileVariants.NORMAL,
|
|
28987
|
-
appCount: 0,
|
|
28988
|
-
};
|
|
28989
|
-
var CREATE_VIEW_CHECKED_CONFIGS = (_a = {},
|
|
28990
|
-
_a[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
|
|
28991
|
-
_a[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
|
|
28992
|
-
_a);
|
|
28993
|
-
var BUILD_INFRA_INPUT_CONSTRAINTS = {
|
|
28994
|
-
STEP: 0.01,
|
|
28995
|
-
MIN: 0,
|
|
28996
|
-
DECIMAL_PLACES: 2,
|
|
28997
|
-
};
|
|
28998
|
-
|
|
28999
|
-
var Descriptor = function (_a) {
|
|
29000
|
-
var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children;
|
|
29001
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space dc__align-items-center w-100 ".concat(additionalContainerClasses !== null && additionalContainerClasses !== void 0 ? additionalContainerClasses : '') }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__gap-4" }, { children: [jsxRuntime.jsx(BreadCrumb, { breadcrumbs: breadCrumbs }), jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300 h-100 dc__align-left", placement: "right", Icon: SvgIcHelp, iconClass: "fcv-5", infoText: BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP, heading: BUILD_INFRA_TEXT.HEADING, showCloseButton: true, trigger: "click", interactive: true }, { children: jsxRuntime.jsx("button", __assign({ className: "p-0 h-20 dc__no-background dc__no-border dc__tab-focus", type: "button", "aria-label": "build-infra-info" }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) })) }))] })), children] })));
|
|
29002
|
-
};
|
|
29003
|
-
|
|
29004
|
-
var Footer = function (_a) {
|
|
29005
|
-
var disabled = _a.disabled, hideCancelButton = _a.hideCancelButton, editProfile = _a.editProfile, loading = _a.loading;
|
|
29006
|
-
var disableMessage = disabled
|
|
29007
|
-
? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
|
|
29008
|
-
: BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
|
|
29009
|
-
var getButtonText = function () {
|
|
29010
|
-
if (editProfile) {
|
|
29011
|
-
return BUILD_INFRA_TEXT.EDIT_SUBMIT;
|
|
29012
|
-
}
|
|
29013
|
-
return BUILD_INFRA_TEXT.SAVE_SUBMIT;
|
|
29014
|
-
};
|
|
29015
|
-
var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
|
|
29016
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flex pl pr pb pt h-64 dc__gap-12 dc__border-top dc__content-start" }, { children: [jsxRuntime.jsx(ConditionalWrap, __assign({ condition: disabled || loading, wrap: renderTippy }, { children: jsxRuntime.jsx("div", __assign({ className: "flexbox dc__align-items-center" }, { children: jsxRuntime.jsx("button", __assign({ type: "submit", className: "cta submit h-32 flex", disabled: disabled || loading }, { children: loading ? jsxRuntime.jsx(Progressing, { size: 16 }) : getButtonText() })) })) })), !hideCancelButton && (jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel h-32 flex" }, { children: BUILD_INFRA_TEXT.EDIT_CANCEL })))] })));
|
|
29017
|
-
};
|
|
29018
|
-
|
|
29019
|
-
var getBaseProfileObject = function (fromCreateView, profile) {
|
|
29020
|
-
if (fromCreateView) {
|
|
29021
|
-
return CREATE_PROFILE_BASE_VALUE;
|
|
29022
|
-
}
|
|
29023
|
-
return {
|
|
29024
|
-
id: profile.id,
|
|
29025
|
-
name: profile.name,
|
|
29026
|
-
description: profile.description,
|
|
29027
|
-
type: profile.type,
|
|
29028
|
-
appCount: profile.appCount,
|
|
29029
|
-
};
|
|
29030
|
-
};
|
|
29031
|
-
// Would receive a single profile and return transformed response
|
|
29032
|
-
var getTransformedBuildInfraProfileResponse = function (_a) {
|
|
29033
|
-
var _b, _c, _d;
|
|
29034
|
-
var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
|
|
29035
|
-
// Assuming would contain all the keys
|
|
29036
|
-
var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
|
|
29037
|
-
acc[configuration.key] = configuration;
|
|
29038
|
-
return acc;
|
|
29039
|
-
}, {})) !== null && _b !== void 0 ? _b : {};
|
|
29040
|
-
var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
|
|
29041
|
-
acc[configuration.key] = configuration;
|
|
29042
|
-
return acc;
|
|
29043
|
-
}, {})) !== null && _d !== void 0 ? _d : {};
|
|
29044
|
-
// traversing defaultConfigurationsMap and if key is present in profileConfigurations then use that else use defaultConfigurationsMap
|
|
29045
|
-
var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
|
|
29046
|
-
var _a;
|
|
29047
|
-
var defaultConfiguration = defaultConfigurationsMap[key];
|
|
29048
|
-
var profileConfiguration = profileConfigurations[key];
|
|
29049
|
-
if (fromCreateView) {
|
|
29050
|
-
acc[key] = {
|
|
29051
|
-
key: key,
|
|
29052
|
-
value: defaultConfiguration.value,
|
|
29053
|
-
unit: defaultConfiguration.unit,
|
|
29054
|
-
active: (_a = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _a !== void 0 ? _a : false,
|
|
29055
|
-
};
|
|
29056
|
-
}
|
|
29057
|
-
else if (profileConfiguration) {
|
|
29058
|
-
acc[key] = profileConfiguration;
|
|
29059
|
-
}
|
|
29060
|
-
else {
|
|
29061
|
-
// Removing id from it since we do not have a configuration
|
|
29062
|
-
// While generating payload, we will check on the basis of id and active flag.
|
|
29063
|
-
acc[key] = {
|
|
29064
|
-
key: key,
|
|
29065
|
-
value: defaultConfiguration.value,
|
|
29066
|
-
// saving profile name as undefined and this would be a check, if we are deriving from default or not
|
|
29067
|
-
unit: defaultConfiguration.unit,
|
|
29068
|
-
active: false,
|
|
29069
|
-
};
|
|
29070
|
-
}
|
|
29071
|
-
acc[key].defaultValue = {
|
|
29072
|
-
value: defaultConfiguration.value,
|
|
29073
|
-
unit: defaultConfiguration.unit,
|
|
29074
|
-
};
|
|
29075
|
-
return acc;
|
|
29076
|
-
}, {});
|
|
29077
|
-
return {
|
|
29078
|
-
configurationUnits: configurationUnits,
|
|
29079
|
-
profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
|
|
29080
|
-
};
|
|
29081
|
-
};
|
|
29082
|
-
var getBuildInfraProfileByName = function (_a) {
|
|
29083
|
-
var name = _a.name, fromCreateView = _a.fromCreateView;
|
|
29084
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
29085
|
-
var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
|
|
29086
|
-
return __generator(this, function (_c) {
|
|
29087
|
-
switch (_c.label) {
|
|
29088
|
-
case 0:
|
|
29089
|
-
_c.trys.push([0, 2, , 3]);
|
|
29090
|
-
return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
|
|
29091
|
-
case 1:
|
|
29092
|
-
response = _c.sent();
|
|
29093
|
-
_b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
|
|
29094
|
-
return [2 /*return*/, getTransformedBuildInfraProfileResponse({
|
|
29095
|
-
configurationUnits: configurationUnits,
|
|
29096
|
-
defaultConfigurations: defaultConfigurations,
|
|
29097
|
-
profile: profile,
|
|
29098
|
-
fromCreateView: fromCreateView,
|
|
29099
|
-
})];
|
|
29100
|
-
case 2:
|
|
29101
|
-
error_1 = _c.sent();
|
|
29102
|
-
showError(error_1);
|
|
29103
|
-
throw error_1;
|
|
29104
|
-
case 3: return [2 /*return*/];
|
|
29105
|
-
}
|
|
29106
|
-
});
|
|
29107
|
-
});
|
|
29108
|
-
};
|
|
29109
|
-
var getBuildInfraProfilePayload = function (profileInput) {
|
|
29110
|
-
var currentConfigurations = profileInput.configurations;
|
|
29111
|
-
var configurationKeys = Object.keys(currentConfigurations);
|
|
29112
|
-
// would only keep the configurations with id or active flag as true
|
|
29113
|
-
var configurations = configurationKeys.reduce(function (acc, key) {
|
|
29114
|
-
var configuration = currentConfigurations[key];
|
|
29115
|
-
if (configuration.id || configuration.active) {
|
|
29116
|
-
acc.push({
|
|
29117
|
-
id: configuration.id,
|
|
29118
|
-
key: key,
|
|
29119
|
-
value: Number(configuration.value),
|
|
29120
|
-
unit: configuration.unit,
|
|
29121
|
-
active: configuration.active,
|
|
29122
|
-
});
|
|
29123
|
-
}
|
|
29124
|
-
return acc;
|
|
29125
|
-
}, []);
|
|
29126
|
-
var payload = {
|
|
29127
|
-
name: profileInput.name,
|
|
29128
|
-
description: profileInput.description,
|
|
29129
|
-
type: profileInput.type,
|
|
29130
|
-
configurations: configurations,
|
|
29131
|
-
};
|
|
29132
|
-
return payload;
|
|
29133
|
-
};
|
|
29134
|
-
var updateBuildInfraProfile = function (_a) {
|
|
29135
|
-
var name = _a.name, profileInput = _a.profileInput;
|
|
29136
|
-
var payload = getBuildInfraProfilePayload(profileInput);
|
|
29137
|
-
// TODO: Would remove this
|
|
29138
|
-
console.log(payload, 'edit payload');
|
|
29139
|
-
return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
|
|
29140
|
-
};
|
|
29141
|
-
var createBuildInfraProfile = function (_a) {
|
|
29142
|
-
var profileInput = _a.profileInput;
|
|
29143
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
29144
|
-
var payload;
|
|
29145
|
-
return __generator(this, function (_b) {
|
|
29146
|
-
switch (_b.label) {
|
|
29147
|
-
case 0:
|
|
29148
|
-
// Adding a timeout to show the loader
|
|
29149
|
-
// eslint-disable-next-line no-promise-executor-return
|
|
29150
|
-
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })];
|
|
29151
|
-
case 1:
|
|
29152
|
-
// Adding a timeout to show the loader
|
|
29153
|
-
// eslint-disable-next-line no-promise-executor-return
|
|
29154
|
-
_b.sent();
|
|
29155
|
-
payload = getBuildInfraProfilePayload(profileInput);
|
|
29156
|
-
// TODO: Remove this
|
|
29157
|
-
console.log(payload, 'create payload');
|
|
29158
|
-
return [2 /*return*/, Promise.resolve({
|
|
29159
|
-
code: 200,
|
|
29160
|
-
result: profileInput,
|
|
29161
|
-
})
|
|
29162
|
-
// return post(`${ROUTES}/${name}`, payload)
|
|
29163
|
-
];
|
|
29164
|
-
}
|
|
29165
|
-
});
|
|
29166
|
-
});
|
|
29167
|
-
};
|
|
29168
|
-
var deleteBuildInfraProfileByName = function (name) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29169
|
-
return __generator(this, function (_a) {
|
|
29170
|
-
switch (_a.label) {
|
|
29171
|
-
case 0:
|
|
29172
|
-
// Adding a timeout to show the loader
|
|
29173
|
-
// eslint-disable-next-line no-promise-executor-return
|
|
29174
|
-
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })];
|
|
29175
|
-
case 1:
|
|
29176
|
-
// Adding a timeout to show the loader
|
|
29177
|
-
// eslint-disable-next-line no-promise-executor-return
|
|
29178
|
-
_a.sent();
|
|
29179
|
-
return [2 /*return*/, Promise.resolve({
|
|
29180
|
-
code: 200,
|
|
29181
|
-
result: null,
|
|
29182
|
-
})
|
|
29183
|
-
// return trash(`${ROUTES}/${name}`)
|
|
29184
|
-
];
|
|
29185
|
-
}
|
|
29186
|
-
});
|
|
29187
|
-
}); };
|
|
29188
|
-
|
|
29189
|
-
var APIResponseHandler = function (_a) {
|
|
29190
|
-
var _b, _c;
|
|
29191
|
-
var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
|
|
29192
|
-
// keeping it above loading since, not expected to send a call if not authorized
|
|
29193
|
-
if (notAuthorized) {
|
|
29194
|
-
return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
|
|
29195
|
-
}
|
|
29196
|
-
if (isLoading) {
|
|
29197
|
-
return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
|
|
29198
|
-
}
|
|
29199
|
-
if (error) {
|
|
29200
|
-
if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
|
|
29201
|
-
return (jsxRuntime.jsx(GenericEmptyState, { title: (_b = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.title) !== null && _b !== void 0 ? _b : 'Data not found', subTitle: (_c = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.subTitle) !== null && _c !== void 0 ? _c : 'The data you are looking for does not exist' }));
|
|
29202
|
-
}
|
|
29203
|
-
return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
|
|
29204
|
-
}
|
|
29205
|
-
// Had to add this since while using it is throwing ts error
|
|
29206
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
29207
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
29208
|
-
};
|
|
29209
|
-
|
|
29210
|
-
var getCommonSelectStyle = function (styleOverrides) {
|
|
29211
|
-
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29212
|
-
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));
|
|
29213
|
-
};
|
|
29214
|
-
var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
|
|
29215
|
-
if (isSelected) {
|
|
29216
|
-
return 'var(--B100)';
|
|
29217
|
-
}
|
|
29218
|
-
if (isFocused) {
|
|
29219
|
-
return 'var(--N50)';
|
|
29220
|
-
}
|
|
29221
|
-
return 'var(--white)';
|
|
29222
|
-
};
|
|
29223
|
-
var getCustomOptionSelectionStyle = function (styleOverrides) {
|
|
29224
|
-
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29225
|
-
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)); };
|
|
29226
|
-
};
|
|
29227
|
-
var SelectOption = function (props) {
|
|
29228
|
-
var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
|
|
29229
|
-
selectProps.styles.option = getCustomOptionSelectionStyle(style);
|
|
29230
|
-
var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
|
|
29231
|
-
return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
|
|
29232
|
-
};
|
|
29233
|
-
|
|
29234
|
-
var validateName = function (name) {
|
|
29235
|
-
if (!/^.{3,50}$/.test(name)) {
|
|
29236
|
-
return {
|
|
29237
|
-
isValid: false,
|
|
29238
|
-
message: 'Minimum 3 and maximum 50 characters allowed',
|
|
29239
|
-
};
|
|
29240
|
-
}
|
|
29241
|
-
if (!/^[a-z0-9-._]+$/.test(name)) {
|
|
29242
|
-
return {
|
|
29243
|
-
isValid: false,
|
|
29244
|
-
message: 'Only lowercase alphanumeric characters, -, _ or . allowed',
|
|
29245
|
-
};
|
|
29246
|
-
}
|
|
29247
|
-
if (!/^(?![-._]).*[^-._]$/.test(name)) {
|
|
29248
|
-
return {
|
|
29249
|
-
isValid: false,
|
|
29250
|
-
message: 'Cannot start/end with -, _ or .',
|
|
29251
|
-
};
|
|
29252
|
-
}
|
|
29253
|
-
return {
|
|
29254
|
-
isValid: true,
|
|
29255
|
-
};
|
|
29256
|
-
};
|
|
29257
|
-
var validateDescription = function (description) {
|
|
29258
|
-
if ((description === null || description === void 0 ? void 0 : description.length) > 300) {
|
|
29259
|
-
return {
|
|
29260
|
-
isValid: false,
|
|
29261
|
-
message: 'Maximum 300 characters are allowed',
|
|
29262
|
-
};
|
|
29263
|
-
}
|
|
29264
|
-
return {
|
|
29265
|
-
isValid: true,
|
|
29266
|
-
};
|
|
29267
|
-
};
|
|
29268
|
-
var validateRequiredPositiveNumber = function (value) {
|
|
29269
|
-
if (!value) {
|
|
29270
|
-
return {
|
|
29271
|
-
isValid: false,
|
|
29272
|
-
message: 'This field is required',
|
|
29273
|
-
};
|
|
29274
|
-
}
|
|
29275
|
-
// TODO: Look if regex is available for this, since 0002 is not a valid number
|
|
29276
|
-
if (!/^\d+(\.\d+)?$/.test(value.toString())) {
|
|
29277
|
-
return {
|
|
29278
|
-
isValid: false,
|
|
29279
|
-
message: 'This field should be a valid positive number',
|
|
29280
|
-
};
|
|
29281
|
-
}
|
|
29282
|
-
if (Number(value) <= 0) {
|
|
29283
|
-
return {
|
|
29284
|
-
isValid: false,
|
|
29285
|
-
message: 'Only positive numbers are allowed',
|
|
29286
|
-
};
|
|
29287
|
-
}
|
|
29288
|
-
return {
|
|
29289
|
-
isValid: true,
|
|
29290
|
-
};
|
|
29291
|
-
};
|
|
29292
|
-
|
|
29293
|
-
var validateRequestLimit = function (_a) {
|
|
29294
|
-
var _b, _c, _d, _e;
|
|
29295
|
-
var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
|
|
29296
|
-
// Request <= Limit
|
|
29297
|
-
// Request and Limit should be numbers can be decimals
|
|
29298
|
-
// Request and Limit should be positive numbers
|
|
29299
|
-
// Request and Limit should be less than Number.MAX_SAFE_INTEGER
|
|
29300
|
-
// Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
|
|
29301
|
-
// Both request and limit should be there
|
|
29302
|
-
var requestNumber = Number(request.value);
|
|
29303
|
-
var limitNumber = Number(limit.value);
|
|
29304
|
-
var requestUnit = Number(unitsMap[request.unit].conversionFactor);
|
|
29305
|
-
var limitUnit = Number(unitsMap[limit.unit].conversionFactor);
|
|
29306
|
-
var requestLimitValidationResponse = {
|
|
29307
|
-
request: {
|
|
29308
|
-
isValid: true,
|
|
29309
|
-
},
|
|
29310
|
-
limit: {
|
|
29311
|
-
isValid: true,
|
|
29312
|
-
},
|
|
29313
|
-
};
|
|
29314
|
-
var isRequestValidNumber = validateRequiredPositiveNumber(request.value).isValid;
|
|
29315
|
-
var isLimitValidNumber = validateRequiredPositiveNumber(limit.value).isValid;
|
|
29316
|
-
if (!isRequestValidNumber) {
|
|
29317
|
-
requestLimitValidationResponse.request = {
|
|
29318
|
-
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.NEGATIVE_REQUEST,
|
|
29319
|
-
isValid: false,
|
|
29320
|
-
};
|
|
29321
|
-
}
|
|
29322
|
-
if (!isLimitValidNumber) {
|
|
29323
|
-
requestLimitValidationResponse.limit = {
|
|
29324
|
-
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.NEGATIVE_LIMIT,
|
|
29325
|
-
isValid: false,
|
|
29326
|
-
};
|
|
29327
|
-
}
|
|
29328
|
-
if (!isRequestValidNumber || !isLimitValidNumber) {
|
|
29329
|
-
return requestLimitValidationResponse;
|
|
29330
|
-
}
|
|
29331
|
-
// only two decimal places are allowed
|
|
29332
|
-
var requestDecimalPlaces = (_c = (_b = String(request.value).split('.')[1]) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
|
|
29333
|
-
var limitDecimalPlaces = (_e = (_d = String(limit.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
|
|
29334
|
-
if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29335
|
-
requestLimitValidationResponse.request = {
|
|
29336
|
-
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
|
|
29337
|
-
isValid: false,
|
|
29338
|
-
};
|
|
29339
|
-
return requestLimitValidationResponse;
|
|
29340
|
-
}
|
|
29341
|
-
if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29342
|
-
requestLimitValidationResponse.limit = {
|
|
29343
|
-
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
|
|
29344
|
-
isValid: false,
|
|
29345
|
-
};
|
|
29346
|
-
return requestLimitValidationResponse;
|
|
29347
|
-
}
|
|
29348
|
-
var limitRequestUnitFactor = limitUnit / requestUnit;
|
|
29349
|
-
var limitRequestFactor = limitNumber / requestNumber;
|
|
29350
|
-
var isProductSafe = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
|
|
29351
|
-
if (!isProductSafe) {
|
|
29352
|
-
requestLimitValidationResponse.request = {
|
|
29353
|
-
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
|
|
29354
|
-
isValid: false,
|
|
29355
|
-
};
|
|
29356
|
-
return requestLimitValidationResponse;
|
|
29357
|
-
}
|
|
29358
|
-
if (limitRequestUnitFactor * limitRequestFactor < 1) {
|
|
29359
|
-
requestLimitValidationResponse.request = {
|
|
29360
|
-
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
|
|
29361
|
-
isValid: false,
|
|
29362
|
-
};
|
|
29363
|
-
return requestLimitValidationResponse;
|
|
29364
|
-
}
|
|
29365
|
-
return requestLimitValidationResponse;
|
|
29366
|
-
};
|
|
29367
|
-
var getInitialProfileInputErrors = function (fromCreateView) {
|
|
29368
|
-
if (fromCreateView) {
|
|
29369
|
-
var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29370
|
-
REQUIRED_INPUT_FIELDS.forEach(function (field) {
|
|
29371
|
-
initialProfileInputErrors_1[field] = '';
|
|
29372
|
-
});
|
|
29373
|
-
return initialProfileInputErrors_1;
|
|
29374
|
-
}
|
|
29375
|
-
return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29376
|
-
};
|
|
29377
|
-
var useBuildInfraForm = function (_a) {
|
|
29378
|
-
var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
|
|
29379
|
-
var fromCreateView = !name;
|
|
29380
|
-
var _b = __read(useAsync(function () {
|
|
29381
|
-
return getBuildInfraProfileByName({
|
|
29382
|
-
name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
|
|
29383
|
-
fromCreateView: fromCreateView,
|
|
29384
|
-
});
|
|
29385
|
-
}, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
|
|
29386
|
-
// If configuration is existing and is active then use it else use default from profileResponse
|
|
29387
|
-
var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
|
|
29388
|
-
var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
|
|
29389
|
-
var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
|
|
29390
|
-
React.useEffect(function () {
|
|
29391
|
-
if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
|
|
29392
|
-
setProfileInput(__assign({}, profileResponse.profile));
|
|
29393
|
-
setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
|
|
29394
|
-
}
|
|
29395
|
-
}, [profileResponse, isLoading]);
|
|
29396
|
-
// NOTE: Currently sending and receiving values as string, but will parse it to number for payload
|
|
29397
|
-
var handleProfileInputChange = function (_a) {
|
|
29398
|
-
var action = _a.action, data = _a.data;
|
|
29399
|
-
var currentInput = __assign({}, profileInput);
|
|
29400
|
-
var currentInputErrors = __assign({}, profileInputErrors);
|
|
29401
|
-
var lastSavedConfiguration = profileResponse.profile.configurations;
|
|
29402
|
-
var currentConfiguration = currentInput.configurations;
|
|
29403
|
-
var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
|
|
29404
|
-
switch (action) {
|
|
29405
|
-
case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
|
|
29406
|
-
currentInput.description = value;
|
|
29407
|
-
currentInputErrors.description = validateDescription(value).message;
|
|
29408
|
-
break;
|
|
29409
|
-
case exports.BuildInfraMetaConfigTypes.NAME:
|
|
29410
|
-
currentInput.name = value;
|
|
29411
|
-
currentInputErrors.name = validateName(value).message;
|
|
29412
|
-
break;
|
|
29413
|
-
case exports.BuildInfraConfigTypes.CPU_LIMIT: {
|
|
29414
|
-
currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
|
|
29415
|
-
var _c = validateRequestLimit({
|
|
29416
|
-
request: {
|
|
29417
|
-
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
|
|
29418
|
-
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
|
|
29419
|
-
},
|
|
29420
|
-
limit: {
|
|
29421
|
-
value: value,
|
|
29422
|
-
unit: unit,
|
|
29423
|
-
},
|
|
29424
|
-
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29425
|
-
}), request = _c.request, limit = _c.limit;
|
|
29426
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29427
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29428
|
-
break;
|
|
29429
|
-
}
|
|
29430
|
-
case exports.BuildInfraConfigTypes.CPU_REQUEST: {
|
|
29431
|
-
currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
|
|
29432
|
-
var _d = validateRequestLimit({
|
|
29433
|
-
request: {
|
|
29434
|
-
value: value,
|
|
29435
|
-
unit: unit,
|
|
29436
|
-
},
|
|
29437
|
-
limit: {
|
|
29438
|
-
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
|
|
29439
|
-
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
|
|
29440
|
-
},
|
|
29441
|
-
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29442
|
-
}), request = _d.request, limit = _d.limit;
|
|
29443
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29444
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29445
|
-
break;
|
|
29446
|
-
}
|
|
29447
|
-
case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
|
|
29448
|
-
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
|
|
29449
|
-
var _e = validateRequestLimit({
|
|
29450
|
-
request: {
|
|
29451
|
-
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
|
|
29452
|
-
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
|
|
29453
|
-
},
|
|
29454
|
-
limit: {
|
|
29455
|
-
value: value,
|
|
29456
|
-
unit: unit,
|
|
29457
|
-
},
|
|
29458
|
-
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29459
|
-
}), request = _e.request, limit = _e.limit;
|
|
29460
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29461
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29462
|
-
break;
|
|
29463
|
-
}
|
|
29464
|
-
case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
|
|
29465
|
-
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
|
|
29466
|
-
var _f = validateRequestLimit({
|
|
29467
|
-
request: {
|
|
29468
|
-
value: value,
|
|
29469
|
-
unit: unit,
|
|
29470
|
-
},
|
|
29471
|
-
limit: {
|
|
29472
|
-
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
|
|
29473
|
-
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
|
|
29474
|
-
},
|
|
29475
|
-
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29476
|
-
}), request = _f.request, limit = _f.limit;
|
|
29477
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29478
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29479
|
-
break;
|
|
29480
|
-
}
|
|
29481
|
-
case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
|
|
29482
|
-
currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
|
|
29483
|
-
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveNumber(value).message;
|
|
29484
|
-
break;
|
|
29485
|
-
}
|
|
29486
|
-
case exports.BuildInfraInheritActions.ACTIVATE_CPU:
|
|
29487
|
-
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 });
|
|
29488
|
-
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 });
|
|
29489
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
29490
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
29491
|
-
break;
|
|
29492
|
-
case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
|
|
29493
|
-
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 });
|
|
29494
|
-
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 });
|
|
29495
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
29496
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
29497
|
-
break;
|
|
29498
|
-
case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
|
|
29499
|
-
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 });
|
|
29500
|
-
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
29501
|
-
break;
|
|
29502
|
-
case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
|
|
29503
|
-
// Reverting the value and unit to defaultValues
|
|
29504
|
-
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 });
|
|
29505
|
-
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
29506
|
-
break;
|
|
29507
|
-
case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
|
|
29508
|
-
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 });
|
|
29509
|
-
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 });
|
|
29510
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
29511
|
-
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
29512
|
-
break;
|
|
29513
|
-
case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
|
|
29514
|
-
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 });
|
|
29515
|
-
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 });
|
|
29516
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
29517
|
-
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
29518
|
-
break;
|
|
29519
|
-
default:
|
|
29520
|
-
throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
|
|
29521
|
-
}
|
|
29522
|
-
setProfileInput(currentInput);
|
|
29523
|
-
setProfileInputErrors(currentInputErrors);
|
|
29524
|
-
};
|
|
29525
|
-
var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29526
|
-
var err_1;
|
|
29527
|
-
return __generator(this, function (_a) {
|
|
29528
|
-
switch (_a.label) {
|
|
29529
|
-
case 0:
|
|
29530
|
-
e.preventDefault();
|
|
29531
|
-
setLoadingActionRequest(true);
|
|
29532
|
-
_a.label = 1;
|
|
29533
|
-
case 1:
|
|
29534
|
-
_a.trys.push([1, 6, , 7]);
|
|
29535
|
-
if (!editProfile) return [3 /*break*/, 3];
|
|
29536
|
-
return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
|
|
29537
|
-
case 2:
|
|
29538
|
-
_a.sent();
|
|
29539
|
-
return [3 /*break*/, 5];
|
|
29540
|
-
case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
|
|
29541
|
-
case 4:
|
|
29542
|
-
_a.sent();
|
|
29543
|
-
_a.label = 5;
|
|
29544
|
-
case 5:
|
|
29545
|
-
setLoadingActionRequest(false);
|
|
29546
|
-
toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
|
|
29547
|
-
if (handleSuccessRedirection) {
|
|
29548
|
-
handleSuccessRedirection();
|
|
29549
|
-
}
|
|
29550
|
-
else {
|
|
29551
|
-
reloadRequest();
|
|
29552
|
-
}
|
|
29553
|
-
return [3 /*break*/, 7];
|
|
29554
|
-
case 6:
|
|
29555
|
-
err_1 = _a.sent();
|
|
29556
|
-
showError(err_1);
|
|
29557
|
-
setLoadingActionRequest(false);
|
|
29558
|
-
return [3 /*break*/, 7];
|
|
29559
|
-
case 7: return [2 /*return*/];
|
|
29560
|
-
}
|
|
29561
|
-
});
|
|
29562
|
-
}); };
|
|
29563
|
-
return {
|
|
29564
|
-
isLoading: isLoading,
|
|
29565
|
-
profileResponse: profileResponse,
|
|
29566
|
-
responseError: responseError,
|
|
29567
|
-
reloadRequest: reloadRequest,
|
|
29568
|
-
profileInput: profileInput,
|
|
29569
|
-
profileInputErrors: profileInputErrors,
|
|
29570
|
-
handleProfileInputChange: handleProfileInputChange,
|
|
29571
|
-
loadingActionRequest: loadingActionRequest,
|
|
29572
|
-
handleSubmit: handleSubmit,
|
|
29573
|
-
};
|
|
29574
|
-
};
|
|
29575
|
-
var getOptionBackgroundColor = function (isFocused, isSelected) {
|
|
29576
|
-
if (isSelected) {
|
|
29577
|
-
return 'var(--B100)';
|
|
29578
|
-
}
|
|
29579
|
-
if (isFocused) {
|
|
29580
|
-
return 'var(--N50)';
|
|
29581
|
-
}
|
|
29582
|
-
return 'var(--white)';
|
|
29583
|
-
};
|
|
29584
|
-
var unitSelectorStyles = function () {
|
|
29585
|
-
return getCommonSelectStyle({
|
|
29586
|
-
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': {
|
|
29587
|
-
border: '1px solid var(--N400)',
|
|
29588
|
-
} })); },
|
|
29589
|
-
indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
|
|
29590
|
-
dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
|
|
29591
|
-
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' })); },
|
|
29592
|
-
valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
|
|
29593
|
-
menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
|
|
29594
|
-
});
|
|
29595
|
-
};
|
|
29596
|
-
|
|
29597
|
-
/**
|
|
29598
|
-
* In case need arise for variants break this CustomInput and Select as a separate component
|
|
29599
|
-
*/
|
|
29600
|
-
var BuildInfraFormAction = function (_a) {
|
|
29601
|
-
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;
|
|
29602
|
-
var handleUnitChange = function (selectedUnit) {
|
|
29603
|
-
var data = {
|
|
29604
|
-
unit: selectedUnit.label,
|
|
29605
|
-
value: currentValue,
|
|
29606
|
-
};
|
|
29607
|
-
handleProfileInputChange({ action: actionType, data: data });
|
|
29608
|
-
};
|
|
29609
|
-
var handleInputChange = function (e) {
|
|
29610
|
-
var data = {
|
|
29611
|
-
unit: currentUnitName,
|
|
29612
|
-
value: e.currentTarget.value,
|
|
29613
|
-
};
|
|
29614
|
-
handleProfileInputChange({ action: actionType, data: data });
|
|
29615
|
-
};
|
|
29616
|
-
var unitOptions = React.useMemo(function () {
|
|
29617
|
-
var _a, _b;
|
|
29618
|
-
var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
|
|
29619
|
-
label: unit.name,
|
|
29620
|
-
value: String(unit.conversionFactor),
|
|
29621
|
-
}); })) !== null && _b !== void 0 ? _b : [];
|
|
29622
|
-
return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
|
|
29623
|
-
}, [profileUnitsMap]);
|
|
29624
|
-
var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
|
|
29625
|
-
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: {
|
|
29626
|
-
IndicatorSeparator: null,
|
|
29627
|
-
ClearIndicator: null,
|
|
29628
|
-
}, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
|
|
29629
|
-
};
|
|
29630
|
-
|
|
29631
|
-
var BuildInfraFormItem = function (_a) {
|
|
29632
|
-
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;
|
|
29633
|
-
var handleActivationChange = function (e) {
|
|
29634
|
-
var checked = e.currentTarget.checked;
|
|
29635
|
-
var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
|
|
29636
|
-
handleProfileInputChange({ action: action });
|
|
29637
|
-
};
|
|
29638
|
-
var renderMarker = function () {
|
|
29639
|
-
if (isDefaultProfile) {
|
|
29640
|
-
return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
|
|
29641
|
-
}
|
|
29642
|
-
return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
|
|
29643
|
-
};
|
|
29644
|
-
// If in configuration active is false, means it is inheriting values from other profile
|
|
29645
|
-
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" })] }));
|
|
29646
|
-
};
|
|
29647
|
-
|
|
29648
|
-
var BuildInfraProfileDescriptionField = function (_a) {
|
|
29649
|
-
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
29650
|
-
var handleChange = function (e) {
|
|
29651
|
-
handleProfileInputChange({
|
|
29652
|
-
action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
|
|
29653
|
-
data: { value: e.currentTarget.value },
|
|
29654
|
-
});
|
|
29655
|
-
};
|
|
29656
|
-
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] })))] })));
|
|
29657
|
-
};
|
|
29658
|
-
|
|
29659
|
-
var BuildInfraProfileNameField = function (_a) {
|
|
29660
|
-
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
29661
|
-
var handleChange = function (e) {
|
|
29662
|
-
handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
|
|
29663
|
-
};
|
|
29664
|
-
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" }) })));
|
|
29665
|
-
};
|
|
29666
|
-
|
|
29667
|
-
var InheritingHeader = function (_a) {
|
|
29668
|
-
var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
|
|
29669
|
-
var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
|
|
29670
|
-
if (isDefaultProfile || !isInheriting) {
|
|
29671
|
-
// For typing issues
|
|
29672
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
29673
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
|
|
29674
|
-
}
|
|
29675
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__content-space w-100" }, { children: [defaultHeading, jsxRuntime.jsx("p", __assign({ className: "m-0 flexbox pt-0 pb-0 pl-4 pr-4 fs-13 lh-20 fw-4 cn-9" }, { children: inheritingDataString })), jsxRuntime.jsx("p", __assign({ className: "m-0 cn-7 fs-13 fw-4 lh-20" }, { children: BUILD_INFRA_TEXT.INHERITING_HEADING_DESCRIPTION }))] })));
|
|
29676
|
-
};
|
|
29677
|
-
var BuildInfraConfigForm = function (_a) {
|
|
29678
|
-
var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
|
|
29679
|
-
var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
|
|
29680
|
-
// will get the desired configuration from the currentConfigurations and then check if it is active or not
|
|
29681
|
-
var isInheritingProfileValues = function (actions) {
|
|
29682
|
-
return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
|
|
29683
|
-
};
|
|
29684
|
-
// Had to show loader for an instance due to batching of state updates not working as expected :/
|
|
29685
|
-
if (!currentConfigurations) {
|
|
29686
|
-
return jsxRuntime.jsx(Progressing, { pageLoader: true });
|
|
29687
|
-
}
|
|
29688
|
-
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],
|
|
29689
|
-
// Assumption is for default profiles all input fields are required
|
|
29690
|
-
isRequired: isDefaultProfile, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
|
|
29691
|
-
};
|
|
29692
|
-
|
|
29693
|
-
exports.APIResponseHandler = APIResponseHandler;
|
|
29694
28952
|
exports.AddCDButton = AddCDButton;
|
|
29695
28953
|
exports.AppStatus = AppStatus;
|
|
29696
|
-
exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
|
|
29697
|
-
exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
|
|
29698
|
-
exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
|
|
29699
|
-
exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
|
|
29700
28954
|
exports.BreadCrumb = BreadCrumb;
|
|
29701
28955
|
exports.BreadcrumbStore = Store;
|
|
29702
|
-
exports.BuildInfraConfigForm = BuildInfraConfigForm;
|
|
29703
|
-
exports.BuildInfraDescriptor = Descriptor;
|
|
29704
|
-
exports.BuildInfraFooter = Footer;
|
|
29705
|
-
exports.BuildInfraLocatorsActionMap = BuildInfraLocatorsActionMap;
|
|
29706
28956
|
exports.BuildStageVariable = BuildStageVariable;
|
|
29707
28957
|
exports.CDModalTab = CDModalTab;
|
|
29708
|
-
exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
|
|
29709
|
-
exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
|
|
29710
28958
|
exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
|
|
29711
28959
|
exports.Checkbox = Checkbox$1;
|
|
29712
28960
|
exports.ClearIndicator = ClearIndicator;
|
|
@@ -29715,7 +28963,7 @@ exports.ConditionalWrap = ConditionalWrap;
|
|
|
29715
28963
|
exports.ConfirmationDialog = ConfirmationDialog;
|
|
29716
28964
|
exports.CustomInput = CustomInput;
|
|
29717
28965
|
exports.CustomSelect = CustomSelect;
|
|
29718
|
-
exports.
|
|
28966
|
+
exports.DEFAULT_BASE_PAGE_SIZE = DEFAULT_BASE_PAGE_SIZE;
|
|
29719
28967
|
exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
|
|
29720
28968
|
exports.DOCUMENTATION = DOCUMENTATION;
|
|
29721
28969
|
exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
|
|
@@ -29749,13 +28997,11 @@ exports.MultiValueRemove = MultiValueRemove;
|
|
|
29749
28997
|
exports.OpaqueModal = OpaqueModal;
|
|
29750
28998
|
exports.Option = Option;
|
|
29751
28999
|
exports.PATTERNS = PATTERNS;
|
|
29752
|
-
exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
|
|
29753
29000
|
exports.Pagination = Pagination;
|
|
29754
29001
|
exports.PopupMenu = PopupMenu;
|
|
29755
29002
|
exports.Progressing = Progressing;
|
|
29756
29003
|
exports.PropagateTagInfo = PropagateTagInfo;
|
|
29757
29004
|
exports.REGISTRY_TYPE_MAP = REGISTRY_TYPE_MAP;
|
|
29758
|
-
exports.REQUIRED_INPUT_FIELDS = REQUIRED_INPUT_FIELDS;
|
|
29759
29005
|
exports.RJSFForm = RJSFForm;
|
|
29760
29006
|
exports.ROUTES = ROUTES;
|
|
29761
29007
|
exports.RadioGroup = RadioGroup$1;
|
|
@@ -29767,10 +29013,10 @@ exports.ResizableTextarea = ResizableTextarea;
|
|
|
29767
29013
|
exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
|
|
29768
29014
|
exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
|
|
29769
29015
|
exports.SearchBar = SearchBar;
|
|
29770
|
-
exports.SelectOption = SelectOption;
|
|
29771
29016
|
exports.ServerError = ServerError;
|
|
29772
29017
|
exports.ServerErrors = ServerErrors;
|
|
29773
29018
|
exports.SingleSelectOption = SingleSelectOption;
|
|
29019
|
+
exports.SortableTableHeaderCell = SortableTableHeaderCell;
|
|
29774
29020
|
exports.SourceTypeMap = SourceTypeMap;
|
|
29775
29021
|
exports.StyledRadioGroup = RadioGroup;
|
|
29776
29022
|
exports.TOAST_ACCESS_DENIED = TOAST_ACCESS_DENIED;
|
|
@@ -29787,31 +29033,27 @@ exports.TriggerTypeMap = TriggerTypeMap;
|
|
|
29787
29033
|
exports.URLS = URLS;
|
|
29788
29034
|
exports.VisibleModal = VisibleModal;
|
|
29789
29035
|
exports.VisibleModal2 = VisibleModal2;
|
|
29036
|
+
exports.abortPreviousRequests = abortPreviousRequests;
|
|
29790
29037
|
exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
|
|
29791
29038
|
exports.copyToClipboard = copyToClipboard;
|
|
29792
|
-
exports.createBuildInfraProfile = createBuildInfraProfile;
|
|
29793
29039
|
exports.createGitCommitUrl = createGitCommitUrl;
|
|
29794
29040
|
exports.customStyles = customStyles;
|
|
29795
29041
|
exports.debounce = debounce$2;
|
|
29796
|
-
exports.deleteBuildInfraProfileByName = deleteBuildInfraProfileByName;
|
|
29797
29042
|
exports.extractImage = extractImage;
|
|
29798
29043
|
exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
|
|
29799
29044
|
exports.genericCDMaterialsService = genericCDMaterialsService;
|
|
29800
29045
|
exports.get = get;
|
|
29801
29046
|
exports.getAlphabetIcon = getAlphabetIcon;
|
|
29802
|
-
exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
|
|
29803
|
-
exports.getCommonSelectStyle = getCommonSelectStyle;
|
|
29804
29047
|
exports.getCookie = getCookie;
|
|
29805
|
-
exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
|
|
29806
29048
|
exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
|
|
29807
29049
|
exports.getFilteredChartVersions = getFilteredChartVersions;
|
|
29808
29050
|
exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
|
|
29051
|
+
exports.getIsRequestAborted = getIsRequestAborted;
|
|
29809
29052
|
exports.getLockedJSON = getLockedJSON;
|
|
29810
29053
|
exports.getLoginInfo = getLoginInfo;
|
|
29811
29054
|
exports.getRandomColor = getRandomColor;
|
|
29812
29055
|
exports.getRedirectionProps = getRedirectionProps;
|
|
29813
29056
|
exports.getTeamListMin = getTeamListMin;
|
|
29814
|
-
exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
|
|
29815
29057
|
exports.getUnlockedJSON = getUnlockedJSON;
|
|
29816
29058
|
exports.getUrlWithSearchParams = getUrlWithSearchParams;
|
|
29817
29059
|
exports.getUserRole = getUserRole;
|
|
@@ -29830,19 +29072,13 @@ exports.sortCallback = sortCallback;
|
|
|
29830
29072
|
exports.stopPropagation = stopPropagation;
|
|
29831
29073
|
exports.toastAccessDenied = toastAccessDenied;
|
|
29832
29074
|
exports.trash = trash;
|
|
29833
|
-
exports.unitSelectorStyles = unitSelectorStyles;
|
|
29834
|
-
exports.updateBuildInfraProfile = updateBuildInfraProfile;
|
|
29835
29075
|
exports.useAsync = useAsync;
|
|
29836
29076
|
exports.useBreadcrumb = useBreadcrumb;
|
|
29837
|
-
exports.useBuildInfraForm = useBuildInfraForm;
|
|
29838
29077
|
exports.useClickOutside = useClickOutside;
|
|
29839
29078
|
exports.useEffectAfterMount = useEffectAfterMount;
|
|
29840
29079
|
exports.useForm = useForm;
|
|
29841
29080
|
exports.useSearchString = useSearchString;
|
|
29842
29081
|
exports.useSuperAdmin = useSuperAdmin;
|
|
29843
29082
|
exports.useThrottledEffect = useThrottledEffect;
|
|
29083
|
+
exports.useUrlFilters = useUrlFilters;
|
|
29844
29084
|
exports.useWindowSize = useWindowSize;
|
|
29845
|
-
exports.validateDescription = validateDescription;
|
|
29846
|
-
exports.validateName = validateName;
|
|
29847
|
-
exports.validateRequestLimit = validateRequestLimit;
|
|
29848
|
-
exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;
|