@devtron-labs/devtron-fe-common-lib 0.0.60 → 0.0.61-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/Api.d.ts +9 -0
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/Types.d.ts +3 -2
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +7 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +4 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +50 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +7 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +6 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +286 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +12 -0
- package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
- package/dist/Pages/index.d.ts +1 -0
- package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +4 -0
- package/dist/Shared/Components/APIResponseHandler/constants.d.ts +4 -0
- package/dist/Shared/Components/APIResponseHandler/index.d.ts +2 -0
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +37 -0
- package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/BulkSelectionDropdownItems.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/BulkSelectionProvider.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/constants.d.ts +9 -0
- package/dist/Shared/Components/BulkSelection/index.d.ts +4 -0
- package/dist/Shared/Components/BulkSelection/types.d.ts +54 -0
- package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +12 -0
- package/dist/Shared/Components/index.d.ts +3 -0
- package/dist/Shared/Helpers.d.ts +16 -0
- package/dist/Shared/index.d.ts +3 -0
- package/dist/Shared/validations.d.ts +8 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1457 -158
- package/package.json +1 -1
- package/src/Assets/Icon/ic-check-all.svg +5 -0
- package/src/Assets/Icon/ic-check-square.svg +4 -0
- package/src/Assets/Icon/ic-close.svg +9 -0
- package/src/Assets/Icon/ic-cpu.svg +4 -0
- package/src/Assets/Icon/ic-memory.svg +3 -0
- package/src/Assets/Icon/ic-timer.svg +3 -0
- package/src/Common/Api.ts +21 -0
- package/src/Common/BreadCrumb/Types.ts +0 -1
- package/src/Common/Checkbox.tsx +1 -0
- package/src/Common/Constants.ts +2 -1
- package/src/Common/CustomInput/CustomInput.tsx +2 -1
- package/src/Common/DraggableWrapper/DraggableWrapper.tsx +3 -1
- package/src/Common/RJSF/utils.ts +2 -0
- package/src/Common/SearchBar/SearchBar.component.tsx +23 -11
- package/src/Common/SearchBar/searchBar.scss +1 -1
- package/src/Common/Types.ts +3 -1
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.tsx +128 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.tsx +44 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.tsx +106 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.tsx +55 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.tsx +32 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx +45 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Footer.tsx +56 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/Readme.md +4 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/constants.tsx +139 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/index.ts +7 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/services.tsx +167 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +339 -0
- package/src/Pages/GlobalConfigurations/BuildInfra/utils.tsx +509 -0
- package/src/Pages/GlobalConfigurations/index.ts +1 -0
- package/src/Pages/index.ts +1 -0
- package/src/Shared/Components/APIResponseHandler/APIResponseHandler.tsx +41 -0
- package/src/Shared/Components/APIResponseHandler/constants.tsx +5 -0
- package/src/Shared/Components/APIResponseHandler/index.ts +2 -0
- package/src/Shared/Components/APIResponseHandler/types.tsx +39 -0
- package/src/Shared/Components/BulkSelection/BulkSelection.tsx +77 -0
- package/src/Shared/Components/BulkSelection/BulkSelectionDropdownItems.tsx +31 -0
- package/src/Shared/Components/BulkSelection/BulkSelectionProvider.tsx +160 -0
- package/src/Shared/Components/BulkSelection/constants.tsx +13 -0
- package/src/Shared/Components/BulkSelection/index.ts +4 -0
- package/src/Shared/Components/BulkSelection/types.tsx +65 -0
- package/src/Shared/Components/ReactSelect/index.ts +1 -0
- package/src/Shared/Components/ReactSelect/utils.tsx +97 -0
- package/src/Shared/Components/index.ts +3 -0
- package/src/Shared/Helpers.tsx +29 -0
- package/src/Shared/index.ts +3 -0
- package/src/Shared/validations.tsx +130 -0
- package/src/index.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -50,7 +50,8 @@ var ROUTES = {
|
|
|
50
50
|
USER_CHECK_ROLE: 'user/check/roles',
|
|
51
51
|
IMAGE_TAGGING: 'app/image-tagging',
|
|
52
52
|
CD_MATERIAL_GET: 'app/cd-pipeline',
|
|
53
|
-
DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
|
|
53
|
+
DEPLOYMENT_TEMPLATE_LIST: 'app/template/list',
|
|
54
|
+
INFRA_CONFIG_PROFILE: 'infra-config/profile',
|
|
54
55
|
};
|
|
55
56
|
exports.KEY_VALUE = void 0;
|
|
56
57
|
(function (KEY_VALUE) {
|
|
@@ -429,6 +430,7 @@ exports.CHECKBOX_VALUE = void 0;
|
|
|
429
430
|
(function (CHECKBOX_VALUE) {
|
|
430
431
|
CHECKBOX_VALUE["CHECKED"] = "CHECKED";
|
|
431
432
|
CHECKBOX_VALUE["INTERMEDIATE"] = "INTERMEDIATE";
|
|
433
|
+
CHECKBOX_VALUE["BULK_CHECKED"] = "BULK_CHECKED";
|
|
432
434
|
})(exports.CHECKBOX_VALUE || (exports.CHECKBOX_VALUE = {}));
|
|
433
435
|
exports.ImageType = void 0;
|
|
434
436
|
(function (ImageType) {
|
|
@@ -732,6 +734,22 @@ var get = function (url, options) {
|
|
|
732
734
|
};
|
|
733
735
|
var trash = function (url, data, options) {
|
|
734
736
|
return fetchInTime(url, 'DELETE', data, options);
|
|
737
|
+
};
|
|
738
|
+
/**
|
|
739
|
+
* Aborts the previous request before triggering next request
|
|
740
|
+
*/
|
|
741
|
+
var abortPreviousRequests = function (callback, abortControllerRef) {
|
|
742
|
+
abortControllerRef.current.abort();
|
|
743
|
+
// eslint-disable-next-line no-param-reassign
|
|
744
|
+
abortControllerRef.current = new AbortController();
|
|
745
|
+
return callback();
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* Returns true if the error is due to a aborted request
|
|
749
|
+
*/
|
|
750
|
+
var getIsRequestAborted = function (error) {
|
|
751
|
+
// The 0 code is common for aborted and blocked requests
|
|
752
|
+
return error && error.code === 0 && error.message === 'The user aborted a request.';
|
|
735
753
|
};
|
|
736
754
|
|
|
737
755
|
function styleInject(css, ref) {
|
|
@@ -765,9 +783,9 @@ var css_248z$9 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
|
|
|
765
783
|
styleInject(css_248z$9);
|
|
766
784
|
|
|
767
785
|
var _g$7;
|
|
768
|
-
function _extends$
|
|
786
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
769
787
|
var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
770
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
788
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
771
789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
772
790
|
viewBox: "0 0 24 24",
|
|
773
791
|
width: "1em",
|
|
@@ -819,8 +837,8 @@ EmptyState.Loading = Loading;
|
|
|
819
837
|
|
|
820
838
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
821
839
|
|
|
822
|
-
function _extends$
|
|
823
|
-
_extends$
|
|
840
|
+
function _extends$t() {
|
|
841
|
+
_extends$t = Object.assign || function (target) {
|
|
824
842
|
for (var i = 1; i < arguments.length; i++) {
|
|
825
843
|
var source = arguments[i];
|
|
826
844
|
|
|
@@ -834,7 +852,7 @@ function _extends$n() {
|
|
|
834
852
|
return target;
|
|
835
853
|
};
|
|
836
854
|
|
|
837
|
-
return _extends$
|
|
855
|
+
return _extends$t.apply(this, arguments);
|
|
838
856
|
}
|
|
839
857
|
|
|
840
858
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
@@ -1560,7 +1578,7 @@ function ProgressBar(_ref) {
|
|
|
1560
1578
|
isIn = _ref.isIn,
|
|
1561
1579
|
theme = _ref.theme;
|
|
1562
1580
|
|
|
1563
|
-
var style = _extends$
|
|
1581
|
+
var style = _extends$t({}, userStyle, {
|
|
1564
1582
|
animationDuration: delay + "ms",
|
|
1565
1583
|
animationPlayState: isRunning ? 'running' : 'paused',
|
|
1566
1584
|
opacity: hide ? 0 : 1
|
|
@@ -1837,9 +1855,9 @@ var ToastContainer = function ToastContainer(props) {
|
|
|
1837
1855
|
,
|
|
1838
1856
|
id: containerId
|
|
1839
1857
|
}, getToastToRender(function (position, toastList) {
|
|
1840
|
-
var containerStyle = !toastList.length ? _extends$
|
|
1858
|
+
var containerStyle = !toastList.length ? _extends$t({}, style, {
|
|
1841
1859
|
pointerEvents: 'none'
|
|
1842
|
-
}) : _extends$
|
|
1860
|
+
}) : _extends$t({}, style);
|
|
1843
1861
|
return React.createElement("div", {
|
|
1844
1862
|
className: getClassName(position),
|
|
1845
1863
|
style: containerStyle,
|
|
@@ -1946,7 +1964,7 @@ function dispatchToast(content, options) {
|
|
|
1946
1964
|
|
|
1947
1965
|
|
|
1948
1966
|
function mergeOptions(type, options) {
|
|
1949
|
-
return _extends$
|
|
1967
|
+
return _extends$t({}, options, {
|
|
1950
1968
|
type: options && options.type || type,
|
|
1951
1969
|
toastId: getToastId(options)
|
|
1952
1970
|
});
|
|
@@ -1963,7 +1981,7 @@ function toast(content, options) {
|
|
|
1963
1981
|
}
|
|
1964
1982
|
|
|
1965
1983
|
toast.loading = function (content, options) {
|
|
1966
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
1984
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$t({
|
|
1967
1985
|
isLoading: true,
|
|
1968
1986
|
autoClose: false,
|
|
1969
1987
|
closeOnClick: false,
|
|
@@ -1979,7 +1997,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1979
1997
|
var id;
|
|
1980
1998
|
|
|
1981
1999
|
if (pending) {
|
|
1982
|
-
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$
|
|
2000
|
+
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$t({}, options, pending));
|
|
1983
2001
|
}
|
|
1984
2002
|
|
|
1985
2003
|
var resetParams = {
|
|
@@ -1998,7 +2016,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1998
2016
|
return;
|
|
1999
2017
|
}
|
|
2000
2018
|
|
|
2001
|
-
var baseParams = _extends$
|
|
2019
|
+
var baseParams = _extends$t({
|
|
2002
2020
|
type: type
|
|
2003
2021
|
}, resetParams, options, {
|
|
2004
2022
|
data: result
|
|
@@ -2009,10 +2027,10 @@ function handlePromise(promise, _ref2, options) {
|
|
|
2009
2027
|
} : input; // if the id is set we know that it's an update
|
|
2010
2028
|
|
|
2011
2029
|
if (id) {
|
|
2012
|
-
toast.update(id, _extends$
|
|
2030
|
+
toast.update(id, _extends$t({}, baseParams, params));
|
|
2013
2031
|
} else {
|
|
2014
2032
|
// using toast.promise without loading
|
|
2015
|
-
toast(params.render, _extends$
|
|
2033
|
+
toast(params.render, _extends$t({}, baseParams, params));
|
|
2016
2034
|
}
|
|
2017
2035
|
|
|
2018
2036
|
return result;
|
|
@@ -2036,7 +2054,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
|
|
|
2036
2054
|
toast.warn = toast.warning;
|
|
2037
2055
|
|
|
2038
2056
|
toast.dark = function (content, options) {
|
|
2039
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
2057
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$t({
|
|
2040
2058
|
theme: 'dark'
|
|
2041
2059
|
}, options)));
|
|
2042
2060
|
};
|
|
@@ -2093,7 +2111,7 @@ toast.update = function (toastId, options) {
|
|
|
2093
2111
|
var oldOptions = toast.props,
|
|
2094
2112
|
oldContent = toast.content;
|
|
2095
2113
|
|
|
2096
|
-
var nextOptions = _extends$
|
|
2114
|
+
var nextOptions = _extends$t({}, oldOptions, options, {
|
|
2097
2115
|
toastId: options.toastId || toastId,
|
|
2098
2116
|
updateId: generateToastId()
|
|
2099
2117
|
});
|
|
@@ -12027,16 +12045,16 @@ var Modal = function (_a) {
|
|
|
12027
12045
|
}, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
|
|
12028
12046
|
};
|
|
12029
12047
|
|
|
12030
|
-
var _path$
|
|
12031
|
-
function _extends$
|
|
12048
|
+
var _path$i;
|
|
12049
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
12032
12050
|
var SvgIcCross = function SvgIcCross(props) {
|
|
12033
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12051
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
12034
12052
|
width: "1em",
|
|
12035
12053
|
height: "1em",
|
|
12036
12054
|
viewBox: "0 0 24 24",
|
|
12037
12055
|
fill: "none",
|
|
12038
12056
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12039
|
-
}, props), _path$
|
|
12057
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12040
12058
|
d: "M19.28 5.78a.75.75 0 0 0-1.06-1.06l1.06 1.06ZM4.72 18.22a.75.75 0 1 0 1.06 1.06l-1.06-1.06Zm13.5 1.06a.75.75 0 1 0 1.06-1.06l-1.06 1.06ZM5.78 4.72a.75.75 0 0 0-1.06 1.06l1.06-1.06Zm12.44 0-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm-6.75 6.75-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm7.81 6.75-6.75-6.75-1.06 1.06 6.75 6.75 1.06-1.06Zm-6.75-6.75L5.78 4.72 4.72 5.78l6.75 6.75 1.06-1.06Z",
|
|
12041
12059
|
fill: "#596168"
|
|
12042
12060
|
})));
|
|
@@ -16335,30 +16353,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
16335
16353
|
|
|
16336
16354
|
var Tippy = index;
|
|
16337
16355
|
|
|
16338
|
-
var _path$
|
|
16339
|
-
function _extends$
|
|
16356
|
+
var _path$h;
|
|
16357
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
16340
16358
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
16341
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16359
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
16342
16360
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16343
16361
|
width: "1em",
|
|
16344
16362
|
height: "1em",
|
|
16345
16363
|
viewBox: "0 0 24 24"
|
|
16346
|
-
}, props), _path$
|
|
16364
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16347
16365
|
fill: "#767D84",
|
|
16348
16366
|
fillRule: "evenodd",
|
|
16349
16367
|
d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm-.205 12.868c-.615 0-1.12.505-1.12 1.12 0 .617.505 1.121 1.12 1.121.615 0 1.12-.504 1.12-1.12 0-.616-.506-1.12-1.12-1.12zM11.863 7c-1.667 0-3.197 1.187-3.196 2.527 0 .546.41.833.888.833 1.325 0 .642-1.803 2.39-1.803.82 0 1.311.438 1.311 1.175 0 1.34-2.39 1.708-2.39 3.334 0 .438.287.915.874.915.902 0 .792-.67 1.12-1.148.438-.642 2.473-1.325 2.473-3.101 0-1.927-1.721-2.732-3.47-2.732z"
|
|
16350
16368
|
})));
|
|
16351
16369
|
};
|
|
16352
16370
|
|
|
16353
|
-
var _path$
|
|
16354
|
-
function _extends$
|
|
16371
|
+
var _path$g;
|
|
16372
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
16355
16373
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
16356
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16374
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
16357
16375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16358
16376
|
viewBox: "0 0 17 16",
|
|
16359
16377
|
width: "1em",
|
|
16360
16378
|
height: "1em"
|
|
16361
|
-
}, props), _path$
|
|
16379
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16362
16380
|
fill: "#767D84",
|
|
16363
16381
|
fillRule: "evenodd",
|
|
16364
16382
|
d: "M9 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 9 1.333zm0 1.334C6.054 2.667 3.667 5.054 3.667 8S6.054 13.333 9 13.333 14.333 10.946 14.333 8 11.946 2.667 9 2.667zm-.137 7.245c.41 0 .747.337.747.747s-.337.747-.747.747-.747-.336-.747-.747a.75.75 0 0 1 .747-.747zm.046-5.245c1.166 0 2.313.537 2.313 1.82 0 1.185-1.357 1.64-1.648 2.068-.22.319-.146.766-.747.766-.392 0-.583-.319-.583-.61 0-1.085 1.593-1.33 1.593-2.223 0-.492-.327-.783-.873-.783-1.166 0-.711 1.202-1.594 1.202-.319 0-.592-.191-.592-.556 0-.893 1.02-1.684 2.13-1.684z"
|
|
@@ -16410,16 +16428,16 @@ function TippyCustomized(props) {
|
|
|
16410
16428
|
return (jsxRuntime.jsx(Tippy, __assign({ className: "".concat(isWhiteTheme ? 'tippy-white-container default-white' : 'tippy-black-container default-black', " no-content-padding tippy-shadow ").concat(className), arrow: arrow || false, interactive: interactive || false, placement: placement || 'top', content: getTippyContent(), trigger: trigger || 'mouseenter', onMount: onTippyMount, onClickOutside: closeTippy, showOnCreate: showOnCreate || false, animation: animation || 'fade', duration: duration || 300, visible: props.visible }, { children: children })));
|
|
16411
16429
|
}
|
|
16412
16430
|
|
|
16413
|
-
var _path$
|
|
16414
|
-
function _extends$
|
|
16431
|
+
var _path$f, _circle, _path2$2;
|
|
16432
|
+
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
16415
16433
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
16416
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16434
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
16417
16435
|
width: "1em",
|
|
16418
16436
|
height: "1em",
|
|
16419
16437
|
viewBox: "0 0 20 20",
|
|
16420
16438
|
fill: "none",
|
|
16421
16439
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16422
|
-
}, props), _path$
|
|
16440
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16423
16441
|
d: "M10 10H3.333",
|
|
16424
16442
|
stroke: "#596168",
|
|
16425
16443
|
strokeWidth: 1.5,
|
|
@@ -16430,7 +16448,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
|
|
|
16430
16448
|
cy: 10,
|
|
16431
16449
|
r: 1.667,
|
|
16432
16450
|
fill: "#596168"
|
|
16433
|
-
})), _path2$
|
|
16451
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16434
16452
|
d: "m4.415 6.403 5.347-3.008a.486.486 0 0 1 .476 0l5.348 3.008a.486.486 0 0 1 .247.424v5.994a.485.485 0 0 1-.247.424l-5.348 3.007a.485.485 0 0 1-.476 0l-5.347-3.007",
|
|
16435
16453
|
stroke: "#596168",
|
|
16436
16454
|
strokeWidth: 1.5,
|
|
@@ -16447,15 +16465,15 @@ function PropagateTagInfo(_a) {
|
|
|
16447
16465
|
return (jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300", placement: "top", Icon: SvgInjectTag, heading: 'Propagate tags to K8s resources', infoText: "", additionalContent: additionalInfo(), showCloseButton: true, trigger: "click", interactive: true, documentationLink: isCreateApp ? DOCUMENTATION.APP_TAGS : DOCUMENTATION.APP_OVERVIEW_TAGS, documentationLinkText: "View Documentation" }, { children: jsxRuntime.jsxs("div", __assign({ className: "flexbox cursor" }, { children: [jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-16 mt-2 mr-4" }), jsxRuntime.jsx("span", { children: "Propagate tags" }), jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-16 mt-2 ml-4" })] })) })));
|
|
16448
16466
|
}
|
|
16449
16467
|
|
|
16450
|
-
var _path$
|
|
16451
|
-
function _extends$
|
|
16468
|
+
var _path$e;
|
|
16469
|
+
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
16452
16470
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
16453
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16471
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
16454
16472
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16455
16473
|
width: "1em",
|
|
16456
16474
|
height: "1em",
|
|
16457
16475
|
viewBox: "0 0 20 20"
|
|
16458
|
-
}, props), _path$
|
|
16476
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16459
16477
|
d: "M10 1.667c4.6 0 8.333 3.733 8.333 8.333S14.6 18.333 10 18.333 1.667 14.6 1.667 10 5.4 1.667 10 1.667zm0 1.666A6.67 6.67 0 0 0 3.333 10 6.67 6.67 0 0 0 10 16.667 6.67 6.67 0 0 0 16.667 10 6.67 6.67 0 0 0 10 3.333zm0 5.834c.46 0 .833.373.833.833v3.333a.834.834 0 1 1-1.666 0V10c0-.46.373-.833.833-.833zm0-3.334A.833.833 0 1 1 10 7.5a.833.833 0 0 1 0-1.667z",
|
|
16460
16478
|
fill: "#06C",
|
|
16461
16479
|
fillRule: "evenodd"
|
|
@@ -16689,15 +16707,15 @@ var TagDetails = function (_a) {
|
|
|
16689
16707
|
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox mb-8" }, { children: [jsxRuntime.jsx("div", __assign({ className: "dc__border h-30 pl-4 pr-4 br-4 mr-8 pointer ".concat(tagData.propagate ? 'bcn-7' : '', " ").concat(tagData.key.startsWith("devtron.ai/") ? 'cursor-not-allowed bcn-1' : ''), onClick: propagateTagToResource, "data-testid": "propagate-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgInjectTag, { className: "icon-dim-20 mt-4 ".concat(tagData.propagate ? 'scn-0' : '') }) })), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.KEY, placeholder: "Enter key", tabIndex: tabIndex - 1, refVar: keyRef, dependentRef: valueRef, tagOptions: suggestedTagsOptions }), jsxRuntime.jsx(TagLabelValueSelector, { selectedTagIndex: index, tagData: tagData, setTagData: setTagData, tagInputType: exports.KEY_VALUE.VALUE, placeholder: "Enter value", tabIndex: tabIndex, refVar: valueRef, dependentRef: keyRef }), jsxRuntime.jsx("div", __assign({ className: "dc__border pl-4 pr-4 dc__right-radius-4 pointer flex top", onClick: deleteTag, "data-testid": "delete-tag-".concat(index) }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-20 mt-4" }) }))] })));
|
|
16690
16708
|
};
|
|
16691
16709
|
|
|
16692
|
-
var _path$
|
|
16693
|
-
function _extends$
|
|
16710
|
+
var _path$d;
|
|
16711
|
+
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
16694
16712
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
16695
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16713
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
16696
16714
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16697
16715
|
width: "1em",
|
|
16698
16716
|
height: "1em",
|
|
16699
16717
|
viewBox: "0 0 24 24"
|
|
16700
|
-
}, props), _path$
|
|
16718
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16701
16719
|
className: "ic-add_svg__fill-color",
|
|
16702
16720
|
fill: "#999",
|
|
16703
16721
|
d: "M18 13h-5v5a1 1 0 0 1-2 0v-5H6a1 1 0 0 1 0-2h5V6a1 1 0 0 1 2 0v5h5a1 1 0 0 1 0 2z"
|
|
@@ -16827,8 +16845,8 @@ function ForceDeleteDialog(_a) {
|
|
|
16827
16845
|
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(DeleteDialog, __assign({ title: forceDeleteDialogTitle, delete: onClickDelete, closeDelete: closeDeleteModal, deletePrefix: "Force " }, { children: jsxRuntime.jsxs(DeleteDialog.Description, { children: [jsxRuntime.jsxs("p", __assign({ className: "mt-12 mb-12 p-8 dc__break-word dc__window-bg" }, { children: ["Error: ", forceDeleteDialogMessage] })), jsxRuntime.jsx("p", { children: "Do you want to force delete?" })] }) })) }));
|
|
16828
16846
|
}
|
|
16829
16847
|
|
|
16830
|
-
function _extends$
|
|
16831
|
-
_extends$
|
|
16848
|
+
function _extends$m() {
|
|
16849
|
+
_extends$m = Object.assign ? Object.assign.bind() : function (target) {
|
|
16832
16850
|
for (var i = 1; i < arguments.length; i++) {
|
|
16833
16851
|
var source = arguments[i];
|
|
16834
16852
|
for (var key in source) {
|
|
@@ -16839,7 +16857,7 @@ function _extends$g() {
|
|
|
16839
16857
|
}
|
|
16840
16858
|
return target;
|
|
16841
16859
|
};
|
|
16842
|
-
return _extends$
|
|
16860
|
+
return _extends$m.apply(this, arguments);
|
|
16843
16861
|
}
|
|
16844
16862
|
|
|
16845
16863
|
/*
|
|
@@ -20380,7 +20398,7 @@ var Menu = function Menu(props) {
|
|
|
20380
20398
|
getStyles = props.getStyles,
|
|
20381
20399
|
innerRef = props.innerRef,
|
|
20382
20400
|
innerProps = props.innerProps;
|
|
20383
|
-
return jsx("div", _extends$
|
|
20401
|
+
return jsx("div", _extends$m({
|
|
20384
20402
|
css: getStyles('menu', props),
|
|
20385
20403
|
className: cx({
|
|
20386
20404
|
menu: true
|
|
@@ -20412,7 +20430,7 @@ var MenuList$1 = function MenuList(props) {
|
|
|
20412
20430
|
innerProps = props.innerProps,
|
|
20413
20431
|
innerRef = props.innerRef,
|
|
20414
20432
|
isMulti = props.isMulti;
|
|
20415
|
-
return jsx("div", _extends$
|
|
20433
|
+
return jsx("div", _extends$m({
|
|
20416
20434
|
css: getStyles('menuList', props),
|
|
20417
20435
|
className: cx({
|
|
20418
20436
|
'menu-list': true,
|
|
@@ -20443,7 +20461,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
20443
20461
|
cx = props.cx,
|
|
20444
20462
|
getStyles = props.getStyles,
|
|
20445
20463
|
innerProps = props.innerProps;
|
|
20446
|
-
return jsx("div", _extends$
|
|
20464
|
+
return jsx("div", _extends$m({
|
|
20447
20465
|
css: getStyles('noOptionsMessage', props),
|
|
20448
20466
|
className: cx({
|
|
20449
20467
|
'menu-notice': true,
|
|
@@ -20460,7 +20478,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
20460
20478
|
cx = props.cx,
|
|
20461
20479
|
getStyles = props.getStyles,
|
|
20462
20480
|
innerProps = props.innerProps;
|
|
20463
|
-
return jsx("div", _extends$
|
|
20481
|
+
return jsx("div", _extends$m({
|
|
20464
20482
|
css: getStyles('loadingMessage', props),
|
|
20465
20483
|
className: cx({
|
|
20466
20484
|
'menu-notice': true,
|
|
@@ -20548,7 +20566,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
20548
20566
|
rect: rect
|
|
20549
20567
|
}; // same wrapper element whether fixed or portalled
|
|
20550
20568
|
|
|
20551
|
-
var menuWrapper = jsx("div", _extends$
|
|
20569
|
+
var menuWrapper = jsx("div", _extends$m({
|
|
20552
20570
|
css: getStyles('menuPortal', state),
|
|
20553
20571
|
className: cx({
|
|
20554
20572
|
'menu-portal': true
|
|
@@ -20584,7 +20602,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
20584
20602
|
innerProps = props.innerProps,
|
|
20585
20603
|
isDisabled = props.isDisabled,
|
|
20586
20604
|
isRtl = props.isRtl;
|
|
20587
|
-
return jsx("div", _extends$
|
|
20605
|
+
return jsx("div", _extends$m({
|
|
20588
20606
|
css: getStyles('container', props),
|
|
20589
20607
|
className: cx({
|
|
20590
20608
|
'--is-disabled': isDisabled,
|
|
@@ -20619,7 +20637,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
20619
20637
|
isMulti = props.isMulti,
|
|
20620
20638
|
getStyles = props.getStyles,
|
|
20621
20639
|
hasValue = props.hasValue;
|
|
20622
|
-
return jsx("div", _extends$
|
|
20640
|
+
return jsx("div", _extends$m({
|
|
20623
20641
|
css: getStyles('valueContainer', props),
|
|
20624
20642
|
className: cx({
|
|
20625
20643
|
'value-container': true,
|
|
@@ -20645,7 +20663,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
20645
20663
|
cx = props.cx,
|
|
20646
20664
|
innerProps = props.innerProps,
|
|
20647
20665
|
getStyles = props.getStyles;
|
|
20648
|
-
return jsx("div", _extends$
|
|
20666
|
+
return jsx("div", _extends$m({
|
|
20649
20667
|
css: getStyles('indicatorsContainer', props),
|
|
20650
20668
|
className: cx({
|
|
20651
20669
|
indicators: true
|
|
@@ -20676,7 +20694,7 @@ var Svg = function Svg(_ref) {
|
|
|
20676
20694
|
var size = _ref.size,
|
|
20677
20695
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
20678
20696
|
|
|
20679
|
-
return jsx("svg", _extends$
|
|
20697
|
+
return jsx("svg", _extends$m({
|
|
20680
20698
|
height: size,
|
|
20681
20699
|
width: size,
|
|
20682
20700
|
viewBox: "0 0 20 20",
|
|
@@ -20687,14 +20705,14 @@ var Svg = function Svg(_ref) {
|
|
|
20687
20705
|
};
|
|
20688
20706
|
|
|
20689
20707
|
var CrossIcon = function CrossIcon(props) {
|
|
20690
|
-
return jsx(Svg, _extends$
|
|
20708
|
+
return jsx(Svg, _extends$m({
|
|
20691
20709
|
size: 20
|
|
20692
20710
|
}, props), jsx("path", {
|
|
20693
20711
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
20694
20712
|
}));
|
|
20695
20713
|
};
|
|
20696
20714
|
var DownChevron = function DownChevron(props) {
|
|
20697
|
-
return jsx(Svg, _extends$
|
|
20715
|
+
return jsx(Svg, _extends$m({
|
|
20698
20716
|
size: 20
|
|
20699
20717
|
}, props), jsx("path", {
|
|
20700
20718
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
@@ -20727,7 +20745,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
|
|
|
20727
20745
|
cx = props.cx,
|
|
20728
20746
|
getStyles = props.getStyles,
|
|
20729
20747
|
innerProps = props.innerProps;
|
|
20730
|
-
return jsx("div", _extends$
|
|
20748
|
+
return jsx("div", _extends$m({
|
|
20731
20749
|
css: getStyles('dropdownIndicator', props),
|
|
20732
20750
|
className: cx({
|
|
20733
20751
|
indicator: true,
|
|
@@ -20742,7 +20760,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
20742
20760
|
cx = props.cx,
|
|
20743
20761
|
getStyles = props.getStyles,
|
|
20744
20762
|
innerProps = props.innerProps;
|
|
20745
|
-
return jsx("div", _extends$
|
|
20763
|
+
return jsx("div", _extends$m({
|
|
20746
20764
|
css: getStyles('clearIndicator', props),
|
|
20747
20765
|
className: cx({
|
|
20748
20766
|
indicator: true,
|
|
@@ -20772,7 +20790,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
20772
20790
|
cx = props.cx,
|
|
20773
20791
|
getStyles = props.getStyles,
|
|
20774
20792
|
innerProps = props.innerProps;
|
|
20775
|
-
return jsx("span", _extends$
|
|
20793
|
+
return jsx("span", _extends$m({}, innerProps, {
|
|
20776
20794
|
css: getStyles('indicatorSeparator', props),
|
|
20777
20795
|
className: cx({
|
|
20778
20796
|
'indicator-separator': true
|
|
@@ -20827,7 +20845,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
20827
20845
|
getStyles = props.getStyles,
|
|
20828
20846
|
innerProps = props.innerProps,
|
|
20829
20847
|
isRtl = props.isRtl;
|
|
20830
|
-
return jsx("div", _extends$
|
|
20848
|
+
return jsx("div", _extends$m({
|
|
20831
20849
|
css: getStyles('loadingIndicator', props),
|
|
20832
20850
|
className: cx({
|
|
20833
20851
|
indicator: true,
|
|
@@ -20888,7 +20906,7 @@ var Control = function Control(props) {
|
|
|
20888
20906
|
innerRef = props.innerRef,
|
|
20889
20907
|
innerProps = props.innerProps,
|
|
20890
20908
|
menuIsOpen = props.menuIsOpen;
|
|
20891
|
-
return jsx("div", _extends$
|
|
20909
|
+
return jsx("div", _extends$m({
|
|
20892
20910
|
ref: innerRef,
|
|
20893
20911
|
css: getStyles('control', props),
|
|
20894
20912
|
className: cx({
|
|
@@ -20920,12 +20938,12 @@ var Group = function Group(props) {
|
|
|
20920
20938
|
label = props.label,
|
|
20921
20939
|
theme = props.theme,
|
|
20922
20940
|
selectProps = props.selectProps;
|
|
20923
|
-
return jsx("div", _extends$
|
|
20941
|
+
return jsx("div", _extends$m({
|
|
20924
20942
|
css: getStyles('group', props),
|
|
20925
20943
|
className: cx({
|
|
20926
20944
|
group: true
|
|
20927
20945
|
}, className)
|
|
20928
|
-
}, innerProps), jsx(Heading, _extends$
|
|
20946
|
+
}, innerProps), jsx(Heading, _extends$m({}, headingProps, {
|
|
20929
20947
|
selectProps: selectProps,
|
|
20930
20948
|
theme: theme,
|
|
20931
20949
|
getStyles: getStyles,
|
|
@@ -20957,7 +20975,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
20957
20975
|
_cleanCommonProps.data;
|
|
20958
20976
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
20959
20977
|
|
|
20960
|
-
return jsx("div", _extends$
|
|
20978
|
+
return jsx("div", _extends$m({
|
|
20961
20979
|
css: getStyles('groupHeading', props),
|
|
20962
20980
|
className: cx({
|
|
20963
20981
|
'group-heading': true
|
|
@@ -21033,7 +21051,7 @@ var Input = function Input(props) {
|
|
|
21033
21051
|
}, className),
|
|
21034
21052
|
css: getStyles('input', props),
|
|
21035
21053
|
"data-value": value || ''
|
|
21036
|
-
}, jsx("input", _extends$
|
|
21054
|
+
}, jsx("input", _extends$m({
|
|
21037
21055
|
className: cx({
|
|
21038
21056
|
input: true
|
|
21039
21057
|
}, inputClassName),
|
|
@@ -21103,7 +21121,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
21103
21121
|
function MultiValueRemove$1(_ref5) {
|
|
21104
21122
|
var children = _ref5.children,
|
|
21105
21123
|
innerProps = _ref5.innerProps;
|
|
21106
|
-
return jsx("div", _extends$
|
|
21124
|
+
return jsx("div", _extends$m({
|
|
21107
21125
|
role: "button"
|
|
21108
21126
|
}, innerProps), children || jsx(CrossIcon, {
|
|
21109
21127
|
size: 14
|
|
@@ -21192,7 +21210,7 @@ var Option$1 = function Option(props) {
|
|
|
21192
21210
|
isSelected = props.isSelected,
|
|
21193
21211
|
innerRef = props.innerRef,
|
|
21194
21212
|
innerProps = props.innerProps;
|
|
21195
|
-
return jsx("div", _extends$
|
|
21213
|
+
return jsx("div", _extends$m({
|
|
21196
21214
|
css: getStyles('option', props),
|
|
21197
21215
|
className: cx({
|
|
21198
21216
|
option: true,
|
|
@@ -21224,7 +21242,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
21224
21242
|
cx = props.cx,
|
|
21225
21243
|
getStyles = props.getStyles,
|
|
21226
21244
|
innerProps = props.innerProps;
|
|
21227
|
-
return jsx("div", _extends$
|
|
21245
|
+
return jsx("div", _extends$m({
|
|
21228
21246
|
css: getStyles('placeholder', props),
|
|
21229
21247
|
className: cx({
|
|
21230
21248
|
placeholder: true
|
|
@@ -21257,7 +21275,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
21257
21275
|
getStyles = props.getStyles,
|
|
21258
21276
|
isDisabled = props.isDisabled,
|
|
21259
21277
|
innerProps = props.innerProps;
|
|
21260
|
-
return jsx("div", _extends$
|
|
21278
|
+
return jsx("div", _extends$m({
|
|
21261
21279
|
css: getStyles('singleValue', props),
|
|
21262
21280
|
className: cx({
|
|
21263
21281
|
'single-value': true,
|
|
@@ -21505,7 +21523,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
21505
21523
|
};
|
|
21506
21524
|
|
|
21507
21525
|
var A11yText = function A11yText(props) {
|
|
21508
|
-
return jsx("span", _extends$
|
|
21526
|
+
return jsx("span", _extends$m({
|
|
21509
21527
|
css: _ref
|
|
21510
21528
|
}, props));
|
|
21511
21529
|
};
|
|
@@ -22041,7 +22059,7 @@ function DummyInput(_ref) {
|
|
|
22041
22059
|
var innerRef = _ref.innerRef,
|
|
22042
22060
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22043
22061
|
|
|
22044
|
-
return jsx("input", _extends$
|
|
22062
|
+
return jsx("input", _extends$m({
|
|
22045
22063
|
ref: innerRef
|
|
22046
22064
|
}, props, {
|
|
22047
22065
|
css: /*#__PURE__*/css$2({
|
|
@@ -23676,7 +23694,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23676
23694
|
|
|
23677
23695
|
if (!isSearchable) {
|
|
23678
23696
|
// use a dummy input to maintain focus/blur functionality
|
|
23679
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
23697
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$m({
|
|
23680
23698
|
id: id,
|
|
23681
23699
|
innerRef: this.getInputRef,
|
|
23682
23700
|
onBlur: this.onInputBlur,
|
|
@@ -23690,7 +23708,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23690
23708
|
}, ariaAttributes));
|
|
23691
23709
|
}
|
|
23692
23710
|
|
|
23693
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
23711
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$m({}, commonProps, {
|
|
23694
23712
|
autoCapitalize: "none",
|
|
23695
23713
|
autoComplete: "off",
|
|
23696
23714
|
autoCorrect: "off",
|
|
@@ -23734,7 +23752,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23734
23752
|
isFocused = _this$state5.isFocused;
|
|
23735
23753
|
|
|
23736
23754
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
23737
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
23755
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$m({}, commonProps, {
|
|
23738
23756
|
key: "placeholder",
|
|
23739
23757
|
isDisabled: isDisabled,
|
|
23740
23758
|
isFocused: isFocused,
|
|
@@ -23748,7 +23766,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23748
23766
|
return selectValue.map(function (opt, index) {
|
|
23749
23767
|
var isOptionFocused = opt === focusedValue;
|
|
23750
23768
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
23751
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
23769
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$m({}, commonProps, {
|
|
23752
23770
|
components: {
|
|
23753
23771
|
Container: MultiValueContainer,
|
|
23754
23772
|
Label: MultiValueLabel,
|
|
@@ -23780,7 +23798,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23780
23798
|
}
|
|
23781
23799
|
|
|
23782
23800
|
var singleValue = selectValue[0];
|
|
23783
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
23801
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$m({}, commonProps, {
|
|
23784
23802
|
data: singleValue,
|
|
23785
23803
|
isDisabled: isDisabled
|
|
23786
23804
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -23806,7 +23824,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23806
23824
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
23807
23825
|
'aria-hidden': 'true'
|
|
23808
23826
|
};
|
|
23809
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
23827
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$m({}, commonProps, {
|
|
23810
23828
|
innerProps: innerProps,
|
|
23811
23829
|
isFocused: isFocused
|
|
23812
23830
|
}));
|
|
@@ -23826,7 +23844,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23826
23844
|
var innerProps = {
|
|
23827
23845
|
'aria-hidden': 'true'
|
|
23828
23846
|
};
|
|
23829
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
23847
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$m({}, commonProps, {
|
|
23830
23848
|
innerProps: innerProps,
|
|
23831
23849
|
isDisabled: isDisabled,
|
|
23832
23850
|
isFocused: isFocused
|
|
@@ -23844,7 +23862,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23844
23862
|
var commonProps = this.commonProps;
|
|
23845
23863
|
var isDisabled = this.props.isDisabled;
|
|
23846
23864
|
var isFocused = this.state.isFocused;
|
|
23847
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
23865
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$m({}, commonProps, {
|
|
23848
23866
|
isDisabled: isDisabled,
|
|
23849
23867
|
isFocused: isFocused
|
|
23850
23868
|
}));
|
|
@@ -23864,7 +23882,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23864
23882
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
23865
23883
|
'aria-hidden': 'true'
|
|
23866
23884
|
};
|
|
23867
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
23885
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$m({}, commonProps, {
|
|
23868
23886
|
innerProps: innerProps,
|
|
23869
23887
|
isDisabled: isDisabled,
|
|
23870
23888
|
isFocused: isFocused
|
|
@@ -23927,7 +23945,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23927
23945
|
onMouseOver: onHover,
|
|
23928
23946
|
tabIndex: -1
|
|
23929
23947
|
};
|
|
23930
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
23948
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$m({}, commonProps, {
|
|
23931
23949
|
innerProps: innerProps,
|
|
23932
23950
|
data: data,
|
|
23933
23951
|
isDisabled: isDisabled,
|
|
@@ -23951,7 +23969,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23951
23969
|
groupIndex = item.index;
|
|
23952
23970
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
23953
23971
|
var headingId = "".concat(groupId, "-heading");
|
|
23954
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
23972
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$m({}, commonProps, {
|
|
23955
23973
|
key: groupId,
|
|
23956
23974
|
data: _data,
|
|
23957
23975
|
options: options,
|
|
@@ -23990,12 +24008,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
23990
24008
|
menuPosition: menuPosition,
|
|
23991
24009
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
23992
24010
|
};
|
|
23993
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
24011
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$m({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
23994
24012
|
var ref = _ref4.ref,
|
|
23995
24013
|
_ref4$placerProps = _ref4.placerProps,
|
|
23996
24014
|
placement = _ref4$placerProps.placement,
|
|
23997
24015
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
23998
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
24016
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$m({}, commonProps, menuPlacementProps, {
|
|
23999
24017
|
innerRef: ref,
|
|
24000
24018
|
innerProps: {
|
|
24001
24019
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -24010,7 +24028,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24010
24028
|
onBottomArrive: onMenuScrollToBottom,
|
|
24011
24029
|
lockEnabled: menuShouldBlockScroll
|
|
24012
24030
|
}, function (scrollTargetRef) {
|
|
24013
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
24031
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$m({}, commonProps, {
|
|
24014
24032
|
innerRef: function innerRef(instance) {
|
|
24015
24033
|
_this4.getMenuListRef(instance);
|
|
24016
24034
|
|
|
@@ -24025,7 +24043,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24025
24043
|
// so we use the same component. the actual portalling logic is forked
|
|
24026
24044
|
// within the component based on `menuPosition`
|
|
24027
24045
|
|
|
24028
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
24046
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$m({}, commonProps, {
|
|
24029
24047
|
appendTo: menuPortalTarget,
|
|
24030
24048
|
controlElement: this.controlRef,
|
|
24031
24049
|
menuPlacement: menuPlacement,
|
|
@@ -24090,7 +24108,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24090
24108
|
isFocused = _this$state6.isFocused,
|
|
24091
24109
|
selectValue = _this$state6.selectValue;
|
|
24092
24110
|
var focusableOptions = this.getFocusableOptions();
|
|
24093
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
24111
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$m({}, commonProps, {
|
|
24094
24112
|
id: this.getElementId('live-region'),
|
|
24095
24113
|
ariaSelection: ariaSelection,
|
|
24096
24114
|
focusedOption: focusedOption,
|
|
@@ -24116,7 +24134,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24116
24134
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
24117
24135
|
var isFocused = this.state.isFocused;
|
|
24118
24136
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
24119
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
24137
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$m({}, commonProps, {
|
|
24120
24138
|
className: className,
|
|
24121
24139
|
innerProps: {
|
|
24122
24140
|
id: id,
|
|
@@ -24124,7 +24142,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24124
24142
|
},
|
|
24125
24143
|
isDisabled: isDisabled,
|
|
24126
24144
|
isFocused: isFocused
|
|
24127
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
24145
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$m({}, commonProps, {
|
|
24128
24146
|
innerRef: this.getControlRef,
|
|
24129
24147
|
innerProps: {
|
|
24130
24148
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -24133,9 +24151,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24133
24151
|
isDisabled: isDisabled,
|
|
24134
24152
|
isFocused: isFocused,
|
|
24135
24153
|
menuIsOpen: menuIsOpen
|
|
24136
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
24154
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$m({}, commonProps, {
|
|
24137
24155
|
isDisabled: isDisabled
|
|
24138
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
24156
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$m({}, commonProps, {
|
|
24139
24157
|
isDisabled: isDisabled
|
|
24140
24158
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
24141
24159
|
}
|
|
@@ -24208,7 +24226,7 @@ Select$1.defaultProps = defaultProps;
|
|
|
24208
24226
|
|
|
24209
24227
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24210
24228
|
var baseSelectProps = useStateManager(props);
|
|
24211
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
24229
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$m({
|
|
24212
24230
|
ref: ref
|
|
24213
24231
|
}, baseSelectProps));
|
|
24214
24232
|
});
|
|
@@ -24216,9 +24234,9 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24216
24234
|
var ReactSelect = StateManagedSelect;
|
|
24217
24235
|
|
|
24218
24236
|
var _g$6;
|
|
24219
|
-
function _extends$
|
|
24237
|
+
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
24220
24238
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
24221
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24239
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
24222
24240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24223
24241
|
viewBox: "0 0 28 28",
|
|
24224
24242
|
width: "1em",
|
|
@@ -24239,15 +24257,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
24239
24257
|
}))));
|
|
24240
24258
|
};
|
|
24241
24259
|
|
|
24242
|
-
var _path$
|
|
24243
|
-
function _extends$
|
|
24260
|
+
var _path$c;
|
|
24261
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
24244
24262
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
24245
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24263
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
24246
24264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24247
24265
|
width: "1em",
|
|
24248
24266
|
height: "1em",
|
|
24249
24267
|
viewBox: "0 0 24 24"
|
|
24250
|
-
}, props), _path$
|
|
24268
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24251
24269
|
stroke: "#06C",
|
|
24252
24270
|
strokeLinecap: "round",
|
|
24253
24271
|
strokeLinejoin: "round",
|
|
@@ -24259,9 +24277,9 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
24259
24277
|
};
|
|
24260
24278
|
|
|
24261
24279
|
var _g$5;
|
|
24262
|
-
function _extends$
|
|
24280
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
24263
24281
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
24264
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24282
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
24265
24283
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24266
24284
|
width: "1em",
|
|
24267
24285
|
height: "1em",
|
|
@@ -24590,6 +24608,7 @@ Valid States of Checkbox:
|
|
|
24590
24608
|
5. disabled: false, checked: true, value: INTERMIDIATE
|
|
24591
24609
|
6. disabled: false, checked: true, value: CHECKED
|
|
24592
24610
|
*/
|
|
24611
|
+
// TODO: Associate label with input element
|
|
24593
24612
|
var Checkbox$1 = /** @class */ (function (_super) {
|
|
24594
24613
|
__extends$1(Checkbox, _super);
|
|
24595
24614
|
function Checkbox() {
|
|
@@ -24604,9 +24623,9 @@ var Checkbox$1 = /** @class */ (function (_super) {
|
|
|
24604
24623
|
}(React.Component));
|
|
24605
24624
|
|
|
24606
24625
|
var _g$4;
|
|
24607
|
-
function _extends$
|
|
24626
|
+
function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
|
|
24608
24627
|
var SvgIcSearch = function SvgIcSearch(props) {
|
|
24609
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24628
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
24610
24629
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24611
24630
|
viewBox: "0 0 24 24",
|
|
24612
24631
|
width: "1em",
|
|
@@ -24623,9 +24642,9 @@ var SvgIcSearch = function SvgIcSearch(props) {
|
|
|
24623
24642
|
};
|
|
24624
24643
|
|
|
24625
24644
|
var _g$3;
|
|
24626
|
-
function _extends$
|
|
24645
|
+
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
24627
24646
|
var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
24628
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24647
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
24629
24648
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24630
24649
|
width: "1em",
|
|
24631
24650
|
height: "1em",
|
|
@@ -24647,7 +24666,7 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
|
|
|
24647
24666
|
}))));
|
|
24648
24667
|
};
|
|
24649
24668
|
|
|
24650
|
-
var css_248z$5 = ".search-bar:focus, .search-bar:focus-within {\n outline: none;\n border: solid 1px var(--B500);\n}\n.search-bar__input:focus, .search-bar__input:focus-visible {\n border: none;\n outline: none;\n}\n.search-bar__icon {\n z-index: 1;\n top: 50%;\n left: 8px;\n transform: translateY(-50%);\n}\n.search-bar__clear-button {\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}";
|
|
24669
|
+
var css_248z$5 = ".search-bar:focus, .search-bar:focus-within {\n outline: none;\n border: solid 1px var(--B500) !important;\n}\n.search-bar__input:focus, .search-bar__input:focus-visible {\n border: none;\n outline: none;\n}\n.search-bar__icon {\n z-index: 1;\n top: 50%;\n left: 8px;\n transform: translateY(-50%);\n}\n.search-bar__clear-button {\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}";
|
|
24651
24670
|
styleInject(css_248z$5);
|
|
24652
24671
|
|
|
24653
24672
|
/**
|
|
@@ -24692,6 +24711,21 @@ var SearchBar = function (_a) {
|
|
|
24692
24711
|
handleSearchChange,
|
|
24693
24712
|
debounceTimeout,
|
|
24694
24713
|
]);
|
|
24714
|
+
// assuming initialSearchText will change if we are changing history otherwise will be constant and will not change
|
|
24715
|
+
// since on changing history we expect to make api call using useAsync so not applying handleEnter
|
|
24716
|
+
React.useEffect(function () {
|
|
24717
|
+
inputRef.current.value = initialSearchText;
|
|
24718
|
+
setShowClearButton(!!initialSearchText);
|
|
24719
|
+
}, [initialSearchText]);
|
|
24720
|
+
var _applySearch = function (value) {
|
|
24721
|
+
handleSearchChange(value);
|
|
24722
|
+
handleEnter(value);
|
|
24723
|
+
};
|
|
24724
|
+
var clearSearch = function () {
|
|
24725
|
+
inputRef.current.value = '';
|
|
24726
|
+
_applySearch('');
|
|
24727
|
+
setShowClearButton(false);
|
|
24728
|
+
};
|
|
24695
24729
|
var handleChange = function (e) {
|
|
24696
24730
|
var value = e.target.value;
|
|
24697
24731
|
setShowClearButton(!!value);
|
|
@@ -24702,23 +24736,16 @@ var SearchBar = function (_a) {
|
|
|
24702
24736
|
handleSearchChange(value);
|
|
24703
24737
|
}
|
|
24704
24738
|
};
|
|
24705
|
-
var _applySearch = function (value) {
|
|
24706
|
-
handleSearchChange(value);
|
|
24707
|
-
handleEnter(value);
|
|
24708
|
-
};
|
|
24709
24739
|
var handleKeyDown = function (e) {
|
|
24710
24740
|
var key = e.key;
|
|
24711
24741
|
if (key === 'Enter') {
|
|
24742
|
+
e.preventDefault();
|
|
24712
24743
|
var inputTarget = e.target;
|
|
24713
24744
|
var value = inputTarget.value.trim();
|
|
24714
24745
|
_applySearch(value);
|
|
24715
24746
|
}
|
|
24716
24747
|
};
|
|
24717
|
-
|
|
24718
|
-
inputRef.current.value = '';
|
|
24719
|
-
_applySearch('');
|
|
24720
|
-
};
|
|
24721
|
-
return (jsxRuntime.jsx("div", __assign({ className: containerClassName }, { children: jsxRuntime.jsxs("div", __assign({ className: "search-bar bc-n50 focus-within-border-b5 dc__hover-border-n300 dc__block w-100 min-w-200 dc__position-rel en-2 bw-1 br-4 h-32" }, { children: [jsxRuntime.jsx(SvgIcSearch, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-16" }), jsxRuntime.jsx("input", __assign({ placeholder: "Search", "data-testid": "search-bar", type: "text" }, inputProps, { defaultValue: initialSearchText, className: "search-bar__input dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ".concat(showClearButton ? 'pr-30' : 'pr-10'), onChange: handleChange, onKeyDown: handleKeyDown, ref: inputRef })), showClearButton && (jsxRuntime.jsx("button", __assign({ className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5", type: "button", onClick: clearSearch, "aria-label": "Clear search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-16 icon-n4 dc__vertical-align-middle" }) })))] })) })));
|
|
24748
|
+
return (jsxRuntime.jsx("div", __assign({ className: containerClassName }, { children: jsxRuntime.jsxs("div", __assign({ className: "search-bar bc-n50 focus-within-border-b5 dc__hover-border-n300 dc__block w-100 min-w-200 dc__position-rel en-2 bw-1 br-4 h-32" }, { children: [jsxRuntime.jsx(SvgIcSearch, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-16" }), jsxRuntime.jsx("input", __assign({ placeholder: "Search", "data-testid": "search-bar", type: "text" }, inputProps, { defaultValue: initialSearchText, className: "search-bar__input bc-n50 dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ".concat(showClearButton ? 'pr-30' : 'pr-10'), onChange: handleChange, onKeyDown: handleKeyDown, ref: inputRef })), showClearButton && (jsxRuntime.jsx("button", __assign({ className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5", type: "button", onClick: clearSearch, "aria-label": "Clear search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-16 icon-n4 dc__vertical-align-middle" }) })))] })) })));
|
|
24722
24749
|
};
|
|
24723
24750
|
|
|
24724
24751
|
var css_248z$4 = ".toggle__switch {\n position: relative;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.toggle__switch.disabled {\n cursor: not-allowed;\n}\n.toggle__switch.disabled .toggle__slider {\n cursor: not-allowed;\n}\n\n/* Hide default HTML checkbox */\n.toggle__switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n/* The slider */\n.toggle__slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: all 0.4s ease;\n}\n.toggle__slider.round {\n border-radius: 34px;\n}\n.toggle__slider.round:before {\n border-radius: 50%;\n}\n.toggle__slider:before {\n position: absolute;\n content: \"\";\n height: calc(100% - 8px);\n width: calc(50% - 4px);\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: all 0.4s ease;\n}\n.toggle__slider.with-icon {\n background-color: var(--N000) !important;\n}\n.toggle__slider.with-icon svg {\n position: absolute;\n content: \"\";\n top: -1px;\n left: -1px;\n background-color: var(--N300);\n transition: all 0.4s ease;\n}\n\ninput:checked + .toggle__slider {\n background-color: var(--color);\n}\ninput:checked + .toggle__slider:before {\n transform: translateX(100%);\n}\ninput:checked + .toggle__slider.with-icon svg {\n transform: translateX(100%);\n background-color: var(--color);\n}\n\ninput:focus + .toggle__slider {\n box-shadow: 0 0 1px var(--color);\n}";
|
|
@@ -24857,9 +24884,9 @@ exports.ConsequenceAction = void 0;
|
|
|
24857
24884
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
24858
24885
|
|
|
24859
24886
|
var _g$2;
|
|
24860
|
-
function _extends$
|
|
24887
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
24861
24888
|
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
24862
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24889
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
24863
24890
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24864
24891
|
width: "1em",
|
|
24865
24892
|
height: "1em",
|
|
@@ -24938,16 +24965,16 @@ function DeleteComponent(_a) {
|
|
|
24938
24965
|
return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
|
|
24939
24966
|
}
|
|
24940
24967
|
|
|
24941
|
-
var _path$
|
|
24942
|
-
function _extends$
|
|
24968
|
+
var _path$b;
|
|
24969
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
24943
24970
|
var SvgIcPencil = function SvgIcPencil(props) {
|
|
24944
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24971
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
24945
24972
|
width: "1em",
|
|
24946
24973
|
height: "1em",
|
|
24947
24974
|
viewBox: "0 0 20 20",
|
|
24948
24975
|
fill: "none",
|
|
24949
24976
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24950
|
-
}, props), _path$
|
|
24977
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24951
24978
|
d: "M10.625 5 15 9.375m-7.5 7.5H3.75a.625.625 0 0 1-.625-.625v-3.491a.625.625 0 0 1 .183-.442l9.375-9.375a.625.625 0 0 1 .884 0l3.491 3.491a.625.625 0 0 1 0 .884L7.5 16.875Z",
|
|
24952
24979
|
stroke: "#596168",
|
|
24953
24980
|
strokeWidth: 1.5,
|
|
@@ -24956,19 +24983,19 @@ var SvgIcPencil = function SvgIcPencil(props) {
|
|
|
24956
24983
|
})));
|
|
24957
24984
|
};
|
|
24958
24985
|
|
|
24959
|
-
var _path$
|
|
24960
|
-
function _extends$
|
|
24986
|
+
var _path$a, _path2$1, _path3;
|
|
24987
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
24961
24988
|
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
24962
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24989
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
24963
24990
|
width: "1em",
|
|
24964
24991
|
height: "1em",
|
|
24965
24992
|
viewBox: "0 0 12 12",
|
|
24966
24993
|
fill: "none",
|
|
24967
24994
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24968
|
-
}, props), _path$
|
|
24995
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24969
24996
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
24970
24997
|
fill: "#767D84"
|
|
24971
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24998
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24972
24999
|
d: "M3.742 4.674h-2.25v-2.25",
|
|
24973
25000
|
stroke: "#596168",
|
|
24974
25001
|
strokeWidth: 1.5,
|
|
@@ -24983,15 +25010,15 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
|
24983
25010
|
})));
|
|
24984
25011
|
};
|
|
24985
25012
|
|
|
24986
|
-
var _path$
|
|
24987
|
-
function _extends$
|
|
25013
|
+
var _path$9;
|
|
25014
|
+
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
24988
25015
|
var SvgIcMinus = function SvgIcMinus(props) {
|
|
24989
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25016
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
24990
25017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24991
25018
|
width: "1em",
|
|
24992
25019
|
height: "1em",
|
|
24993
25020
|
viewBox: "0 0 14 14"
|
|
24994
|
-
}, props), _path$
|
|
25021
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24995
25022
|
fill: "#959BA1",
|
|
24996
25023
|
className: "ic-minus_svg__fill-color",
|
|
24997
25024
|
fillRule: "evenodd",
|
|
@@ -25000,9 +25027,9 @@ var SvgIcMinus = function SvgIcMinus(props) {
|
|
|
25000
25027
|
};
|
|
25001
25028
|
|
|
25002
25029
|
var _g$1;
|
|
25003
|
-
function _extends$
|
|
25030
|
+
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
25004
25031
|
var SvgIcWarning = function SvgIcWarning(props) {
|
|
25005
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25032
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
25006
25033
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25007
25034
|
width: "1em",
|
|
25008
25035
|
height: "1em",
|
|
@@ -25022,9 +25049,9 @@ var SvgIcWarning = function SvgIcWarning(props) {
|
|
|
25022
25049
|
};
|
|
25023
25050
|
|
|
25024
25051
|
var _g;
|
|
25025
|
-
function _extends$
|
|
25052
|
+
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
25026
25053
|
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
25027
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25054
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
25028
25055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25029
25056
|
width: "1em",
|
|
25030
25057
|
height: "1em",
|
|
@@ -25041,16 +25068,16 @@ var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
|
25041
25068
|
}))));
|
|
25042
25069
|
};
|
|
25043
25070
|
|
|
25044
|
-
var _path$
|
|
25045
|
-
function _extends$
|
|
25071
|
+
var _path$8;
|
|
25072
|
+
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
25046
25073
|
var SvgIcEnter = function SvgIcEnter(props) {
|
|
25047
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25074
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
25048
25075
|
width: "1em",
|
|
25049
25076
|
height: "1em",
|
|
25050
25077
|
viewBox: "0 0 16 16",
|
|
25051
25078
|
fill: "none",
|
|
25052
25079
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25053
|
-
}, props), _path$
|
|
25080
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25054
25081
|
d: "M12.667 4a.667.667 0 0 0-.667.667v2.666a.667.667 0 0 1-.667.667H4.94l.867-.86a.67.67 0 1 0-.947-.947l-2 2a.667.667 0 0 0-.14.22.667.667 0 0 0 0 .507c.032.082.08.157.14.22l2 2a.666.666 0 0 0 .947 0 .667.667 0 0 0 0-.947l-.867-.86h6.393a2 2 0 0 0 2-2V4.667A.667.667 0 0 0 12.667 4Z",
|
|
25055
25082
|
fill: "#3B444C"
|
|
25056
25083
|
})));
|
|
@@ -25456,15 +25483,15 @@ function Grid(_a) {
|
|
|
25456
25483
|
return (jsxRuntime.jsx("div", __assign({ className: "flex-wrap flexbox ".concat(container ? containerClass : ''), style: containerStyles }, containerDivProps, { children: children })));
|
|
25457
25484
|
}
|
|
25458
25485
|
|
|
25459
|
-
var _path$
|
|
25460
|
-
function _extends$
|
|
25486
|
+
var _path$7;
|
|
25487
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
25461
25488
|
var SvgIcCopy = function SvgIcCopy(props) {
|
|
25462
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25489
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
25463
25490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25464
25491
|
width: "1em",
|
|
25465
25492
|
height: "1em",
|
|
25466
25493
|
viewBox: "0 0 20 20"
|
|
25467
|
-
}, props), _path$
|
|
25494
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25468
25495
|
fill: "#767D84",
|
|
25469
25496
|
fillRule: "evenodd",
|
|
25470
25497
|
d: "M15.833 6.917a2.5 2.5 0 0 1 2.5 2.5v6.416a2.5 2.5 0 0 1-2.5 2.5H9.417a2.5 2.5 0 0 1-2.5-2.5V9.417a2.5 2.5 0 0 1 2.5-2.5zm0 1.666H9.417a.833.833 0 0 0-.834.834v6.416c0 .46.373.834.834.834h6.416c.46 0 .834-.373.834-.834V9.417a.833.833 0 0 0-.834-.834zM10.75 1.667c1.24 0 2.256.968 2.33 2.19l.003.143v.75a.833.833 0 0 1-1.66.097l-.006-.097V4c0-.34-.255-.62-.583-.661l-.084-.006H4c-.34 0-.62.255-.661.583L3.333 4v6.75c0 .34.255.62.583.661l.084.006h.75a.833.833 0 0 1 .097 1.66l-.097.006H4a2.333 2.333 0 0 1-2.33-2.19l-.003-.143V4c0-1.24.968-2.256 2.19-2.33L4 1.668h6.75z"
|
|
@@ -28244,9 +28271,9 @@ var translateString = function (stringToTranslate, params) {
|
|
|
28244
28271
|
return utils.englishStringTranslator(stringToTranslate, params);
|
|
28245
28272
|
}
|
|
28246
28273
|
};
|
|
28247
|
-
var getCommonSelectStyle = function (styleOverrides) {
|
|
28274
|
+
var getCommonSelectStyle$1 = function (styleOverrides) {
|
|
28248
28275
|
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
28249
|
-
return __assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0 })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base, state) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400', color: state.selectProps.menuIsOpen ? 'var(--N500)' : base.color })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, multiValue: function (base, state) {
|
|
28276
|
+
return __assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0, cursor: 'pointer' })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px', cursor: 'pointer' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base, state) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400', color: state.selectProps.menuIsOpen ? 'var(--N500)' : base.color })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, multiValue: function (base, state) {
|
|
28250
28277
|
return __assign(__assign({}, base), { border: "1px solid var(--N200)", borderRadius: "4px", background: 'white', height: '28px', marginRight: '8px', padding: '2px', fontSize: '12px' });
|
|
28251
28278
|
} }, styleOverrides);
|
|
28252
28279
|
};
|
|
@@ -28296,15 +28323,15 @@ var getInferredTypeFromValueType = function (value) {
|
|
|
28296
28323
|
}
|
|
28297
28324
|
};
|
|
28298
28325
|
|
|
28299
|
-
var _path$
|
|
28300
|
-
function _extends$
|
|
28326
|
+
var _path$6;
|
|
28327
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
28301
28328
|
var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
28302
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28329
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
28303
28330
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28304
28331
|
width: "1em",
|
|
28305
28332
|
height: "1em",
|
|
28306
28333
|
viewBox: "0 0 24 24"
|
|
28307
|
-
}, props), _path$
|
|
28334
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28308
28335
|
fill: "#999",
|
|
28309
28336
|
className: "ic-chevron-down_svg__fill-color",
|
|
28310
28337
|
fillRule: "nonzero",
|
|
@@ -28312,7 +28339,7 @@ var SvgIcChevronDown = function SvgIcChevronDown(props) {
|
|
|
28312
28339
|
})));
|
|
28313
28340
|
};
|
|
28314
28341
|
|
|
28315
|
-
var commonStyles = getCommonSelectStyle();
|
|
28342
|
+
var commonStyles = getCommonSelectStyle$1();
|
|
28316
28343
|
var MenuList = function (_a) {
|
|
28317
28344
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
28318
28345
|
return (jsxRuntime.jsx(components.MenuList, __assign({}, props, { children: Array.isArray(children) ? children.slice(0, 20) : children })));
|
|
@@ -28363,16 +28390,16 @@ var Form = RJSF.default;
|
|
|
28363
28390
|
var validator = RJSFValidator.default;
|
|
28364
28391
|
var RJSFForm = function (props) { return (jsxRuntime.jsx(Form, __assign({ noHtml5Validate: true, showErrorList: false, autoComplete: "off" }, props, { validator: validator, templates: __assign(__assign({}, templates), props.templates), widgets: __assign(__assign({}, widgets), props.widgets), translateString: translateString }))); };
|
|
28365
28392
|
|
|
28366
|
-
var _style, _rect;
|
|
28367
|
-
function _extends$
|
|
28393
|
+
var _style, _rect$2;
|
|
28394
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
28368
28395
|
var SvgIcRotateDevtron = function SvgIcRotateDevtron(props) {
|
|
28369
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
28396
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
28370
28397
|
width: "1em",
|
|
28371
28398
|
height: "1em",
|
|
28372
28399
|
viewBox: "0 0 100 100",
|
|
28373
28400
|
fill: "none",
|
|
28374
28401
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28375
|
-
}, props), _style || (_style = /*#__PURE__*/React__namespace.createElement("style", null, "@keyframes path-fill{0%,30%,to{fill:#3989d9}45%{fill:#abcff3}}@keyframes top-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(-6px) translateY(-6px) rotate(15deg);transform-origin:center center}}@keyframes bottom-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(6px) translateY(6px) rotate(15deg);transform-origin:center center}}@keyframes rotate-group{0%,44%{transform:rotate(0deg)}to{transform:rotate(360deg);animation-timing-function:ease-in-out}}")), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
28402
|
+
}, props), _style || (_style = /*#__PURE__*/React__namespace.createElement("style", null, "@keyframes path-fill{0%,30%,to{fill:#3989d9}45%{fill:#abcff3}}@keyframes top-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(-6px) translateY(-6px) rotate(15deg);transform-origin:center center}}@keyframes bottom-shape{0%,to{transform:translateX(0) translateY(0) rotate(0deg);transform-origin:center center}30%{transform:translateX(0) translateY(0) rotate(10deg);transform-origin:center center}45%{transform:translateX(6px) translateY(6px) rotate(15deg);transform-origin:center center}}@keyframes rotate-group{0%,44%{transform:rotate(0deg)}to{transform:rotate(360deg);animation-timing-function:ease-in-out}}")), _rect$2 || (_rect$2 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
28376
28403
|
width: 100,
|
|
28377
28404
|
height: 100,
|
|
28378
28405
|
rx: 20,
|
|
@@ -28501,8 +28528,9 @@ var handleAddCD = function (_a) {
|
|
|
28501
28528
|
handleCDSelect(workflowId, ciPipelineId, pipelineType, startNode.id, isWebhookCD, endNodeId, addPipelineType);
|
|
28502
28529
|
};
|
|
28503
28530
|
|
|
28531
|
+
// TODO: label association with input
|
|
28504
28532
|
function CustomInput(_a) {
|
|
28505
|
-
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 ?
|
|
28533
|
+
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 0 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo, _r = _a.inputWrapClassName, inputWrapClassName = _r === void 0 ? '' : _r, _s = _a.inputProps, inputProps = _s === void 0 ? {} : _s;
|
|
28506
28534
|
function handleError(error) {
|
|
28507
28535
|
if (!Array.isArray(error)) {
|
|
28508
28536
|
return [error];
|
|
@@ -28633,23 +28661,26 @@ function DraggableWrapper(_a) {
|
|
|
28633
28661
|
y: data.y,
|
|
28634
28662
|
});
|
|
28635
28663
|
}
|
|
28636
|
-
return (
|
|
28664
|
+
return (
|
|
28665
|
+
// Since we are using position fixed so we need to disable click on the div so that it does not interfere with the click of other elements
|
|
28666
|
+
jsxRuntime.jsx("div", __assign({ className: "dc__position-fixed dc__disable-click", style: {
|
|
28637
28667
|
zIndex: zIndex,
|
|
28638
28668
|
} }, { children: jsxRuntime.jsx(Draggable, __assign({ handle: dragSelector, nodeRef: nodeRef, position: position, onDrag: handlePositionChange }, { children: jsxRuntime.jsx("div", __assign({ ref: nodeRef }, childDivProps, { style: {
|
|
28639
28669
|
zIndex: zIndex,
|
|
28670
|
+
pointerEvents: 'auto',
|
|
28640
28671
|
} }, { children: children })) })) })));
|
|
28641
28672
|
}
|
|
28642
28673
|
|
|
28643
|
-
var _path;
|
|
28644
|
-
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); }
|
|
28674
|
+
var _path$5;
|
|
28675
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
28645
28676
|
var SvgIcDrag = function SvgIcDrag(props) {
|
|
28646
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
28677
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
28647
28678
|
width: "1em",
|
|
28648
28679
|
height: "1em",
|
|
28649
28680
|
viewBox: "0 0 16 16",
|
|
28650
28681
|
fill: "none",
|
|
28651
28682
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28652
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28683
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28653
28684
|
d: "M10.334 9.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 9.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM10.334 5.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 5.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM10.334 13.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 13.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
|
|
28654
28685
|
fill: "#596168"
|
|
28655
28686
|
})));
|
|
@@ -28771,12 +28802,1258 @@ var Pagination = function (_a) {
|
|
|
28771
28802
|
jsxRuntime.jsxs("div", __assign({ className: rootClassName || '' }, { children: [jsxRuntime.jsxs("div", __assign({ className: "page-number" }, { children: [offset + 1, " - ", lastPageNo, " of ", size] })), jsxRuntime.jsxs("ul", __assign({ className: "pagination" }, { children: [jsxRuntime.jsx("li", __assign({ className: "page" }, { children: jsxRuntime.jsx("button", __assign({ className: "page__button page__button--icon", disabled: !pageNoIndex, onClick: selectPreviousPage, type: "button", "aria-label": "Previous page" }, { children: jsxRuntime.jsx("span", __assign({ className: "left-icon" }, { children: jsxRuntime.jsx("i", { className: "fa fa-chevron-left" }) })) })) })), visiblePages.map(function (page) { return (jsxRuntime.jsx(PageValueItem, { value: page.value, isSelected: page.selected, selectPage: selectPage }, page.value)); }), jsxRuntime.jsx("li", __assign({ className: "page" }, { children: jsxRuntime.jsx("button", __assign({ className: "page__button page__button--icon", disabled: pageNoIndex === pages.length - 1, onClick: selectNextPage, type: "button", "aria-label": "Next page" }, { children: jsxRuntime.jsx("span", __assign({ className: "left-icon" }, { children: jsxRuntime.jsx("i", { className: "fa fa-chevron-right" }) })) })) }))] })), !isPageSizeFix && (jsxRuntime.jsxs("div", __assign({ className: "select" }, { children: [jsxRuntime.jsx("span", __assign({ className: "select__placeholder" }, { children: "Rows per page" })), jsxRuntime.jsx(PageSizeSelector, { pageSizeOptions: pageSizeOptions, pageSize: pageSize, changePageSize: changePageSize })] })))] })));
|
|
28772
28803
|
};
|
|
28773
28804
|
|
|
28805
|
+
var _path$4, _path2;
|
|
28806
|
+
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
28807
|
+
var SvgIcCpu = function SvgIcCpu(props) {
|
|
28808
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
28809
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28810
|
+
width: "1em",
|
|
28811
|
+
height: "1em",
|
|
28812
|
+
viewBox: "0 0 20 20",
|
|
28813
|
+
fill: "none"
|
|
28814
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28815
|
+
d: "M12.5 5.625h-5m5 2.5h-5m8.125-5v13.75c0 .345-.28.625-.625.625H5a.625.625 0 0 1-.625-.625V3.125c0-.345.28-.625.625-.625h10c.345 0 .625.28.625.625Z",
|
|
28816
|
+
stroke: "#596168",
|
|
28817
|
+
strokeWidth: 1.5,
|
|
28818
|
+
strokeLinecap: "round",
|
|
28819
|
+
strokeLinejoin: "round"
|
|
28820
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28821
|
+
d: "M10 15a.937.937 0 1 0 0-1.875A.937.937 0 0 0 10 15Z",
|
|
28822
|
+
fill: "#596168"
|
|
28823
|
+
})));
|
|
28824
|
+
};
|
|
28825
|
+
|
|
28826
|
+
var _path$3;
|
|
28827
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
28828
|
+
var SvgIcMemory = function SvgIcMemory(props) {
|
|
28829
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
28830
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28831
|
+
width: "1em",
|
|
28832
|
+
height: "1em",
|
|
28833
|
+
viewBox: "0 0 20 20",
|
|
28834
|
+
fill: "none"
|
|
28835
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28836
|
+
d: "M16.25 8.125h1.875m-1.875 3.75h1.875m-16.25-3.75H3.75m-1.875 3.75H3.75m8.125 4.375v1.875m-3.75-1.875v1.875m3.75-16.25V3.75m-3.75-1.875V3.75m-.313 4.063h4.375v4.375H7.814V7.811ZM4.376 3.75h11.25c.345 0 .625.28.625.625v11.25c0 .345-.28.625-.625.625H4.375a.625.625 0 0 1-.625-.625V4.375c0-.345.28-.625.625-.625Z",
|
|
28837
|
+
stroke: "#596168",
|
|
28838
|
+
strokeWidth: 1.5,
|
|
28839
|
+
strokeLinecap: "round",
|
|
28840
|
+
strokeLinejoin: "round"
|
|
28841
|
+
})));
|
|
28842
|
+
};
|
|
28843
|
+
|
|
28844
|
+
var _path$2;
|
|
28845
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
28846
|
+
var SvgIcTimer = function SvgIcTimer(props) {
|
|
28847
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
28848
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28849
|
+
width: "1em",
|
|
28850
|
+
height: "1em",
|
|
28851
|
+
viewBox: "0 0 20 20",
|
|
28852
|
+
fill: "none"
|
|
28853
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
28854
|
+
d: "m10 11.041 3.094-3.093M8.125 1.666h3.75m5 9.376a6.875 6.875 0 1 1-13.75 0 6.875 6.875 0 0 1 13.75 0Z",
|
|
28855
|
+
stroke: "#596168",
|
|
28856
|
+
strokeWidth: 1.5,
|
|
28857
|
+
strokeLinecap: "round",
|
|
28858
|
+
strokeLinejoin: "round"
|
|
28859
|
+
})));
|
|
28860
|
+
};
|
|
28861
|
+
|
|
28862
|
+
var _a$2;
|
|
28863
|
+
/**
|
|
28864
|
+
* Unique actions that will be dispatched and,
|
|
28865
|
+
* Keeping some values (cpu_limit, etc) in sync with backend
|
|
28866
|
+
*/
|
|
28867
|
+
exports.BuildInfraConfigTypes = void 0;
|
|
28868
|
+
(function (BuildInfraConfigTypes) {
|
|
28869
|
+
BuildInfraConfigTypes["CPU_LIMIT"] = "cpu_limit";
|
|
28870
|
+
BuildInfraConfigTypes["CPU_REQUEST"] = "cpu_request";
|
|
28871
|
+
BuildInfraConfigTypes["MEMORY_LIMIT"] = "memory_limit";
|
|
28872
|
+
BuildInfraConfigTypes["MEMORY_REQUEST"] = "memory_request";
|
|
28873
|
+
BuildInfraConfigTypes["BUILD_TIMEOUT"] = "timeout";
|
|
28874
|
+
})(exports.BuildInfraConfigTypes || (exports.BuildInfraConfigTypes = {}));
|
|
28875
|
+
/**
|
|
28876
|
+
* Combination of BuildInfraConfigTypes and BuildInfraMetaConfigTypes is going to derive error state and actions(actions will also be derived with BuildInfraInheritActions)
|
|
28877
|
+
*/
|
|
28878
|
+
exports.BuildInfraMetaConfigTypes = void 0;
|
|
28879
|
+
(function (BuildInfraMetaConfigTypes) {
|
|
28880
|
+
BuildInfraMetaConfigTypes["NAME"] = "name";
|
|
28881
|
+
BuildInfraMetaConfigTypes["DESCRIPTION"] = "description";
|
|
28882
|
+
})(exports.BuildInfraMetaConfigTypes || (exports.BuildInfraMetaConfigTypes = {}));
|
|
28883
|
+
/**
|
|
28884
|
+
* Would be used as key for few components and would be appending activate and de_activate actions to it
|
|
28885
|
+
*/
|
|
28886
|
+
exports.BuildInfraLocators = void 0;
|
|
28887
|
+
(function (BuildInfraLocators) {
|
|
28888
|
+
BuildInfraLocators["CPU"] = "cpu";
|
|
28889
|
+
BuildInfraLocators["MEMORY"] = "memory";
|
|
28890
|
+
// This name can be also different from BuildInfraConfigTypes[BUILD_TIMEOUT] in case we want to show different label
|
|
28891
|
+
BuildInfraLocators["BUILD_TIMEOUT"] = "timeout";
|
|
28892
|
+
})(exports.BuildInfraLocators || (exports.BuildInfraLocators = {}));
|
|
28893
|
+
// FIXME: Derive this from BuildInfraLocators
|
|
28894
|
+
// Appending the locators from above
|
|
28895
|
+
exports.BuildInfraInheritActions = void 0;
|
|
28896
|
+
(function (BuildInfraInheritActions) {
|
|
28897
|
+
BuildInfraInheritActions["ACTIVATE_CPU"] = "activate_cpu";
|
|
28898
|
+
BuildInfraInheritActions["DE_ACTIVATE_CPU"] = "de_activate_cpu";
|
|
28899
|
+
BuildInfraInheritActions["ACTIVATE_MEMORY"] = "activate_memory";
|
|
28900
|
+
BuildInfraInheritActions["DE_ACTIVATE_MEMORY"] = "de_activate_memory";
|
|
28901
|
+
BuildInfraInheritActions["ACTIVATE_BUILD_TIMEOUT"] = "activate_timeout";
|
|
28902
|
+
BuildInfraInheritActions["DE_ACTIVATE_BUILD_TIMEOUT"] = "de_activate_timeout";
|
|
28903
|
+
})(exports.BuildInfraInheritActions || (exports.BuildInfraInheritActions = {}));
|
|
28904
|
+
var BuildInfraConfigActionMap = (_a$2 = {},
|
|
28905
|
+
_a$2[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
28906
|
+
_a$2[exports.BuildInfraConfigTypes.CPU_LIMIT] = exports.BuildInfraLocators.CPU,
|
|
28907
|
+
_a$2[exports.BuildInfraConfigTypes.CPU_REQUEST] = exports.BuildInfraLocators.CPU,
|
|
28908
|
+
_a$2[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = exports.BuildInfraLocators.MEMORY,
|
|
28909
|
+
_a$2[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = exports.BuildInfraLocators.MEMORY,
|
|
28910
|
+
_a$2);
|
|
28911
|
+
exports.BuildInfraProfileVariants = void 0;
|
|
28912
|
+
(function (BuildInfraProfileVariants) {
|
|
28913
|
+
BuildInfraProfileVariants["DEFAULT"] = "DEFAULT";
|
|
28914
|
+
BuildInfraProfileVariants["NORMAL"] = "NORMAL";
|
|
28915
|
+
BuildInfraProfileVariants["CUSTOM"] = "CUSTOM";
|
|
28916
|
+
})(exports.BuildInfraProfileVariants || (exports.BuildInfraProfileVariants = {}));
|
|
28917
|
+
|
|
28918
|
+
var _a$1;
|
|
28919
|
+
var BUILD_INFRA_INPUT_CONSTRAINTS = {
|
|
28920
|
+
// Will not enforce any decimal specification on input field
|
|
28921
|
+
STEP: 'any',
|
|
28922
|
+
MIN: 0,
|
|
28923
|
+
DECIMAL_PLACES: 2,
|
|
28924
|
+
};
|
|
28925
|
+
var BUILD_INFRA_TEXT = {
|
|
28926
|
+
HEADING: 'Build Infra Configuration',
|
|
28927
|
+
EDIT_SUBMIT: 'Save changes',
|
|
28928
|
+
SAVE_SUBMIT: 'Save',
|
|
28929
|
+
EDIT_CANCEL: 'Cancel',
|
|
28930
|
+
EDIT_DEFAULT_TOOLTIP: 'Efficiently control infrastructure settings such as CPU, Memory, and Build timeout for your build pipelines. Streamline resource management to optimise build time and cost effortlessly.',
|
|
28931
|
+
DESCRIPTION_LABEL: 'Description',
|
|
28932
|
+
DESCRIPTION_PLACEHOLDER: 'Enter a description here',
|
|
28933
|
+
PROFILE_LABEL: 'Profile name',
|
|
28934
|
+
PROFILE_PLACEHOLDER: 'Eg. java or node',
|
|
28935
|
+
INHERITING_HEADING_DESCRIPTION: 'Inheriting from default',
|
|
28936
|
+
SUBMIT_BUTTON_TIPPY: {
|
|
28937
|
+
INVALID_INPUT: 'Valid input is required for all mandatory fields.',
|
|
28938
|
+
REQUEST_IN_PROGRESS: 'Request in progress.',
|
|
28939
|
+
},
|
|
28940
|
+
VALIDATE_REQUEST_LIMIT: {
|
|
28941
|
+
REQUEST_LESS_THAN_LIMIT: 'Request should be less than or equal to limit.',
|
|
28942
|
+
CAN_NOT_COMPUTE: 'Request and limit value diff are too high to validate.',
|
|
28943
|
+
REQUEST_DECIMAL_PLACES: "Request should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
|
|
28944
|
+
LIMIT_DECIMAL_PLACES: "Limit should be upto ".concat(BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES, " decimal places."),
|
|
28945
|
+
},
|
|
28946
|
+
getInvalidActionMessage: function (action) { return "Invalid action type: ".concat(action); },
|
|
28947
|
+
getSubmitSuccessMessage: function (profileName, isEdited) {
|
|
28948
|
+
return "".concat(profileName, " profile is ").concat(isEdited ? 'updated' : 'created');
|
|
28949
|
+
},
|
|
28950
|
+
PROFILE_NOT_FOUND: {
|
|
28951
|
+
title: 'Profile not found',
|
|
28952
|
+
subTitle: 'The profile you are looking for does not exist.',
|
|
28953
|
+
},
|
|
28954
|
+
INVALID_FORM_MESSAGE: 'Valid input is required for all mandatory fields.',
|
|
28955
|
+
};
|
|
28956
|
+
var BUILD_INFRA_BREADCRUMB = {
|
|
28957
|
+
alias: {
|
|
28958
|
+
'global-config': null,
|
|
28959
|
+
'build-infra': {
|
|
28960
|
+
component: jsxRuntime.jsx("h2", __assign({ className: "m-0 cn-9 fs-16 fw-6 lh-32" }, { children: BUILD_INFRA_TEXT.HEADING })),
|
|
28961
|
+
linked: false,
|
|
28962
|
+
},
|
|
28963
|
+
},
|
|
28964
|
+
};
|
|
28965
|
+
// TODO: move heading to component itself
|
|
28966
|
+
var BUILD_INFRA_FORM_FIELDS = [
|
|
28967
|
+
{
|
|
28968
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "CPU (Request - Limit)" })),
|
|
28969
|
+
marker: SvgIcCpu,
|
|
28970
|
+
actions: [
|
|
28971
|
+
{
|
|
28972
|
+
actionType: exports.BuildInfraConfigTypes.CPU_REQUEST,
|
|
28973
|
+
label: 'Request',
|
|
28974
|
+
placeholder: 'Type CPU request',
|
|
28975
|
+
},
|
|
28976
|
+
{
|
|
28977
|
+
actionType: exports.BuildInfraConfigTypes.CPU_LIMIT,
|
|
28978
|
+
label: 'Limit',
|
|
28979
|
+
placeholder: 'Type CPU limit',
|
|
28980
|
+
},
|
|
28981
|
+
],
|
|
28982
|
+
locator: exports.BuildInfraLocators.CPU,
|
|
28983
|
+
},
|
|
28984
|
+
{
|
|
28985
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Memory (Request - Limit)" })),
|
|
28986
|
+
marker: SvgIcMemory,
|
|
28987
|
+
actions: [
|
|
28988
|
+
{
|
|
28989
|
+
actionType: exports.BuildInfraConfigTypes.MEMORY_REQUEST,
|
|
28990
|
+
label: 'Request',
|
|
28991
|
+
placeholder: 'Type memory request',
|
|
28992
|
+
},
|
|
28993
|
+
{
|
|
28994
|
+
actionType: exports.BuildInfraConfigTypes.MEMORY_LIMIT,
|
|
28995
|
+
label: 'Limit',
|
|
28996
|
+
placeholder: 'Type memory limit',
|
|
28997
|
+
},
|
|
28998
|
+
],
|
|
28999
|
+
locator: exports.BuildInfraLocators.MEMORY,
|
|
29000
|
+
},
|
|
29001
|
+
{
|
|
29002
|
+
heading: jsxRuntime.jsx("h3", __assign({ className: "m-0 cn-9 fs-13 fw-6 lh-20 w-240 dc__no-shrink" }, { children: "Build timeout" })),
|
|
29003
|
+
marker: SvgIcTimer,
|
|
29004
|
+
actions: [
|
|
29005
|
+
{
|
|
29006
|
+
actionType: exports.BuildInfraConfigTypes.BUILD_TIMEOUT,
|
|
29007
|
+
label: 'Timeout',
|
|
29008
|
+
placeholder: 'Type build timeout',
|
|
29009
|
+
},
|
|
29010
|
+
],
|
|
29011
|
+
locator: exports.BuildInfraLocators.BUILD_TIMEOUT,
|
|
29012
|
+
},
|
|
29013
|
+
];
|
|
29014
|
+
var PROFILE_INPUT_ERROR_FIELDS = Object.fromEntries(Object.values(__assign(__assign({}, exports.BuildInfraConfigTypes), exports.BuildInfraMetaConfigTypes)).map(function (value) { return [value, null]; }));
|
|
29015
|
+
// fields required to be filled before submitting the form in create view, since we pre-populate the form with default values so no need in configs
|
|
29016
|
+
var CREATE_MODE_REQUIRED_INPUT_FIELDS = [exports.BuildInfraMetaConfigTypes.NAME];
|
|
29017
|
+
var DEFAULT_PROFILE_NAME = 'default';
|
|
29018
|
+
var CREATE_PROFILE_BASE_VALUE = {
|
|
29019
|
+
name: '',
|
|
29020
|
+
description: '',
|
|
29021
|
+
type: exports.BuildInfraProfileVariants.NORMAL,
|
|
29022
|
+
appCount: 0,
|
|
29023
|
+
};
|
|
29024
|
+
var CREATE_VIEW_CHECKED_CONFIGS = (_a$1 = {},
|
|
29025
|
+
_a$1[exports.BuildInfraConfigTypes.CPU_REQUEST] = true,
|
|
29026
|
+
_a$1[exports.BuildInfraConfigTypes.CPU_LIMIT] = true,
|
|
29027
|
+
_a$1);
|
|
29028
|
+
var BUILD_INFRA_TEST_IDS = {
|
|
29029
|
+
SUBMIT_BUTTON: 'build-infra-submit-button',
|
|
29030
|
+
CANCEL_BUTTON: 'build-infra-cancel-button',
|
|
29031
|
+
};
|
|
29032
|
+
|
|
29033
|
+
var Descriptor = function (_a) {
|
|
29034
|
+
var additionalContainerClasses = _a.additionalContainerClasses, breadCrumbs = _a.breadCrumbs, children = _a.children, tippyInfoText = _a.tippyInfoText, tippyAdditionalContent = _a.tippyAdditionalContent;
|
|
29035
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space dc__align-items-center w-100 ".concat(additionalContainerClasses !== null && additionalContainerClasses !== void 0 ? additionalContainerClasses : '') }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__gap-4" }, { children: [jsxRuntime.jsx(BreadCrumb, { breadcrumbs: breadCrumbs }), jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300 h-100 dc__align-left", placement: "right", Icon: SvgIcHelp, iconClass: "fcv-5", infoText: tippyInfoText !== null && tippyInfoText !== void 0 ? tippyInfoText : BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP, additionalContent: tippyAdditionalContent, heading: BUILD_INFRA_TEXT.HEADING, showCloseButton: true, trigger: "click", interactive: true }, { children: jsxRuntime.jsx("button", __assign({ className: "p-0 h-20 dc__no-background dc__no-border dc__tab-focus", type: "button", "aria-label": "build-infra-info" }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) })) }))] })), children] })));
|
|
29036
|
+
};
|
|
29037
|
+
|
|
29038
|
+
var Footer = function (_a) {
|
|
29039
|
+
var disabled = _a.disabled, handleCancel = _a.handleCancel, editProfile = _a.editProfile, loading = _a.loading;
|
|
29040
|
+
var disableMessage = disabled
|
|
29041
|
+
? BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.INVALID_INPUT
|
|
29042
|
+
: BUILD_INFRA_TEXT.SUBMIT_BUTTON_TIPPY.REQUEST_IN_PROGRESS;
|
|
29043
|
+
var getButtonText = function () {
|
|
29044
|
+
if (editProfile) {
|
|
29045
|
+
return BUILD_INFRA_TEXT.EDIT_SUBMIT;
|
|
29046
|
+
}
|
|
29047
|
+
return BUILD_INFRA_TEXT.SAVE_SUBMIT;
|
|
29048
|
+
};
|
|
29049
|
+
var renderTippy = function (children) { return (jsxRuntime.jsx(Tippy, __assign({ content: disableMessage, placement: "top", className: "default-tt", arrow: false }, { children: children }))); };
|
|
29050
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex pl pr pb pt h-64 dc__gap-12 dc__border-top dc__content-start" }, { children: [jsxRuntime.jsx(ConditionalWrap, __assign({ condition: disabled || loading, wrap: renderTippy }, { children: jsxRuntime.jsx("div", __assign({ className: "flexbox dc__align-items-center" }, { children: jsxRuntime.jsx("button", __assign({ type: "submit", className: "cta submit h-32 flex", disabled: disabled || loading, "data-testid": BUILD_INFRA_TEST_IDS.SUBMIT_BUTTON }, { children: loading ? jsxRuntime.jsx(Progressing, { size: 16 }) : getButtonText() })) })) })), handleCancel && (jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel h-32 flex", disabled: loading, "data-testid": BUILD_INFRA_TEST_IDS.CANCEL_BUTTON, onClick: handleCancel }, { children: BUILD_INFRA_TEXT.EDIT_CANCEL })))] })));
|
|
29051
|
+
};
|
|
29052
|
+
|
|
29053
|
+
var getBaseProfileObject = function (fromCreateView, profile) {
|
|
29054
|
+
if (fromCreateView) {
|
|
29055
|
+
return CREATE_PROFILE_BASE_VALUE;
|
|
29056
|
+
}
|
|
29057
|
+
return {
|
|
29058
|
+
id: profile.id,
|
|
29059
|
+
name: profile.name,
|
|
29060
|
+
description: profile.description,
|
|
29061
|
+
type: profile.type,
|
|
29062
|
+
appCount: profile.appCount,
|
|
29063
|
+
};
|
|
29064
|
+
};
|
|
29065
|
+
// Would receive a single profile and return transformed response
|
|
29066
|
+
var getTransformedBuildInfraProfileResponse = function (_a) {
|
|
29067
|
+
var _b, _c, _d;
|
|
29068
|
+
var configurationUnits = _a.configurationUnits, defaultConfigurations = _a.defaultConfigurations, profile = _a.profile, fromCreateView = _a.fromCreateView;
|
|
29069
|
+
// Assuming would contain all the keys
|
|
29070
|
+
var defaultConfigurationsMap = (_b = defaultConfigurations === null || defaultConfigurations === void 0 ? void 0 : defaultConfigurations.reduce(function (acc, configuration) {
|
|
29071
|
+
acc[configuration.key] = configuration;
|
|
29072
|
+
return acc;
|
|
29073
|
+
}, {})) !== null && _b !== void 0 ? _b : {};
|
|
29074
|
+
var profileConfigurations = (_d = (_c = profile === null || profile === void 0 ? void 0 : profile.configurations) === null || _c === void 0 ? void 0 : _c.reduce(function (acc, configuration) {
|
|
29075
|
+
acc[configuration.key] = configuration;
|
|
29076
|
+
return acc;
|
|
29077
|
+
}, {})) !== null && _d !== void 0 ? _d : {};
|
|
29078
|
+
var configurations = Object.keys(defaultConfigurationsMap).reduce(function (acc, key) {
|
|
29079
|
+
var _a, _b;
|
|
29080
|
+
var defaultConfiguration = defaultConfigurationsMap[key];
|
|
29081
|
+
var profileConfiguration = ((_a = profileConfigurations[key]) === null || _a === void 0 ? void 0 : _a.profileName) === (profile === null || profile === void 0 ? void 0 : profile.name) ? profileConfigurations[key] : null;
|
|
29082
|
+
// Pushing default value in configurations in case we de-activate the configuration
|
|
29083
|
+
var defaultValue = {
|
|
29084
|
+
value: defaultConfiguration.value,
|
|
29085
|
+
unit: defaultConfiguration.unit,
|
|
29086
|
+
};
|
|
29087
|
+
if (fromCreateView) {
|
|
29088
|
+
acc[key] = {
|
|
29089
|
+
key: key,
|
|
29090
|
+
value: defaultConfiguration.value,
|
|
29091
|
+
unit: defaultConfiguration.unit,
|
|
29092
|
+
active: (_b = CREATE_VIEW_CHECKED_CONFIGS[key]) !== null && _b !== void 0 ? _b : false,
|
|
29093
|
+
defaultValue: defaultValue,
|
|
29094
|
+
};
|
|
29095
|
+
return acc;
|
|
29096
|
+
}
|
|
29097
|
+
if (profileConfiguration) {
|
|
29098
|
+
acc[key] = __assign(__assign({}, profileConfiguration), { defaultValue: defaultValue });
|
|
29099
|
+
return acc;
|
|
29100
|
+
}
|
|
29101
|
+
// Removing id from it since we do not have a configuration
|
|
29102
|
+
// While generating payload, we will check on the basis of id and active flag.
|
|
29103
|
+
acc[key] = {
|
|
29104
|
+
key: key,
|
|
29105
|
+
value: defaultConfiguration.value,
|
|
29106
|
+
// saving profile name as undefined and this would be a check, if we are deriving from default or not
|
|
29107
|
+
unit: defaultConfiguration.unit,
|
|
29108
|
+
active: false,
|
|
29109
|
+
defaultValue: defaultValue,
|
|
29110
|
+
};
|
|
29111
|
+
return acc;
|
|
29112
|
+
}, {});
|
|
29113
|
+
return {
|
|
29114
|
+
configurationUnits: configurationUnits,
|
|
29115
|
+
profile: __assign(__assign({}, (profile && getBaseProfileObject(fromCreateView, profile))), { configurations: configurations }),
|
|
29116
|
+
};
|
|
29117
|
+
};
|
|
29118
|
+
var getBuildInfraProfileByName = function (_a) {
|
|
29119
|
+
var name = _a.name, fromCreateView = _a.fromCreateView;
|
|
29120
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
29121
|
+
var response, _b, configurationUnits, defaultConfigurations, profile, error_1;
|
|
29122
|
+
return __generator(this, function (_c) {
|
|
29123
|
+
switch (_c.label) {
|
|
29124
|
+
case 0:
|
|
29125
|
+
_c.trys.push([0, 2, , 3]);
|
|
29126
|
+
return [4 /*yield*/, get("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name))];
|
|
29127
|
+
case 1:
|
|
29128
|
+
response = _c.sent();
|
|
29129
|
+
_b = response.result, configurationUnits = _b.configurationUnits, defaultConfigurations = _b.defaultConfigurations, profile = _b.profile;
|
|
29130
|
+
return [2 /*return*/, getTransformedBuildInfraProfileResponse({
|
|
29131
|
+
configurationUnits: configurationUnits,
|
|
29132
|
+
defaultConfigurations: defaultConfigurations,
|
|
29133
|
+
profile: profile,
|
|
29134
|
+
fromCreateView: fromCreateView,
|
|
29135
|
+
})];
|
|
29136
|
+
case 2:
|
|
29137
|
+
error_1 = _c.sent();
|
|
29138
|
+
showError(error_1);
|
|
29139
|
+
throw error_1;
|
|
29140
|
+
case 3: return [2 /*return*/];
|
|
29141
|
+
}
|
|
29142
|
+
});
|
|
29143
|
+
});
|
|
29144
|
+
};
|
|
29145
|
+
var getBuildInfraProfilePayload = function (profileInput) {
|
|
29146
|
+
var currentConfigurations = profileInput.configurations;
|
|
29147
|
+
var configurationKeys = Object.keys(currentConfigurations);
|
|
29148
|
+
// would only keep the configurations with id or active flag as true
|
|
29149
|
+
var configurations = configurationKeys.reduce(function (acc, key) {
|
|
29150
|
+
var configuration = currentConfigurations[key];
|
|
29151
|
+
if (configuration.id || configuration.active) {
|
|
29152
|
+
acc.push({
|
|
29153
|
+
id: configuration.id,
|
|
29154
|
+
key: key,
|
|
29155
|
+
value: Number(configuration.value),
|
|
29156
|
+
unit: configuration.unit,
|
|
29157
|
+
active: configuration.active,
|
|
29158
|
+
});
|
|
29159
|
+
}
|
|
29160
|
+
return acc;
|
|
29161
|
+
}, []);
|
|
29162
|
+
var payload = {
|
|
29163
|
+
name: profileInput.name,
|
|
29164
|
+
description: profileInput.description,
|
|
29165
|
+
type: profileInput.type,
|
|
29166
|
+
configurations: configurations,
|
|
29167
|
+
};
|
|
29168
|
+
return payload;
|
|
29169
|
+
};
|
|
29170
|
+
var updateBuildInfraProfile = function (_a) {
|
|
29171
|
+
var name = _a.name, profileInput = _a.profileInput;
|
|
29172
|
+
var payload = getBuildInfraProfilePayload(profileInput);
|
|
29173
|
+
return put("".concat(ROUTES.INFRA_CONFIG_PROFILE, "/").concat(name), payload);
|
|
29174
|
+
};
|
|
29175
|
+
var createBuildInfraProfile = function (_a) {
|
|
29176
|
+
var profileInput = _a.profileInput;
|
|
29177
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
29178
|
+
var payload;
|
|
29179
|
+
return __generator(this, function (_b) {
|
|
29180
|
+
payload = getBuildInfraProfilePayload(profileInput);
|
|
29181
|
+
return [2 /*return*/, post(ROUTES.INFRA_CONFIG_PROFILE, payload)];
|
|
29182
|
+
});
|
|
29183
|
+
});
|
|
29184
|
+
};
|
|
29185
|
+
|
|
29186
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
29187
|
+
var NOT_FOUND_DEFAULT_TEXT = {
|
|
29188
|
+
title: 'Resource not found',
|
|
29189
|
+
subTitle: 'The resource you are looking for does not exist',
|
|
29190
|
+
};
|
|
29191
|
+
|
|
29192
|
+
var APIResponseHandler = function (_a) {
|
|
29193
|
+
var _b, _c;
|
|
29194
|
+
var isLoading = _a.isLoading, progressingProps = _a.progressingProps, error = _a.error, notAuthorized = _a.notAuthorized, notFoundText = _a.notFoundText, reloadProps = _a.reloadProps, children = _a.children;
|
|
29195
|
+
// keeping it above loading since, not expected to send a call if not authorized
|
|
29196
|
+
if (notAuthorized) {
|
|
29197
|
+
return jsxRuntime.jsx(ErrorScreenNotAuthorized, {});
|
|
29198
|
+
}
|
|
29199
|
+
if (isLoading) {
|
|
29200
|
+
return jsxRuntime.jsx(Progressing, __assign({}, progressingProps));
|
|
29201
|
+
}
|
|
29202
|
+
if (error) {
|
|
29203
|
+
// TODO: Can extend ErrorScreenNotFound
|
|
29204
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 404) {
|
|
29205
|
+
return (jsxRuntime.jsx(GenericEmptyState, { title: (_b = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.title) !== null && _b !== void 0 ? _b : NOT_FOUND_DEFAULT_TEXT.title, subTitle: (_c = notFoundText === null || notFoundText === void 0 ? void 0 : notFoundText.subTitle) !== null && _c !== void 0 ? _c : NOT_FOUND_DEFAULT_TEXT.subTitle }));
|
|
29206
|
+
}
|
|
29207
|
+
return jsxRuntime.jsx(Reload, __assign({}, reloadProps));
|
|
29208
|
+
}
|
|
29209
|
+
// Had to add this since while using it is throwing ts error
|
|
29210
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
29211
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
29212
|
+
};
|
|
29213
|
+
|
|
29214
|
+
var getCommonSelectStyle = function (styleOverrides) {
|
|
29215
|
+
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29216
|
+
return (__assign({ menuList: function (base) { return (__assign(__assign({}, base), { paddingTop: 0, paddingBottom: 0 })); }, control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', backgroundColor: 'var(--N50)', border: state.isFocused ? '1px solid var(--B500)' : '1px solid var(--N200)', cursor: 'pointer' })); }, option: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N900)', backgroundColor: state.isFocused ? 'var(--N100)' : 'white', padding: '10px 12px' })); }, dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); }, valueContainer: function (base) { return (__assign(__assign({}, base), { padding: '0 8px', fontWeight: '400' })); }, loadingMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); }, noOptionsMessage: function (base) { return (__assign(__assign({}, base), { color: 'var(--N600)' })); } }, styleOverrides));
|
|
29217
|
+
};
|
|
29218
|
+
var getCustomOptionBackgroundColor = function (isSelected, isFocused) {
|
|
29219
|
+
if (isSelected) {
|
|
29220
|
+
return 'var(--B100)';
|
|
29221
|
+
}
|
|
29222
|
+
if (isFocused) {
|
|
29223
|
+
return 'var(--N50)';
|
|
29224
|
+
}
|
|
29225
|
+
return 'var(--white)';
|
|
29226
|
+
};
|
|
29227
|
+
var getCustomOptionSelectionStyle = function (styleOverrides) {
|
|
29228
|
+
if (styleOverrides === void 0) { styleOverrides = {}; }
|
|
29229
|
+
return function (base, state) { return (__assign(__assign(__assign({}, base), { backgroundColor: getCustomOptionBackgroundColor(state.isSelected, state.isFocused), color: state.isSelected ? 'var(--B500)' : 'var(--N900)', textOverflow: 'ellipsis', fontWeight: '500', overflow: 'hidden', textAlign: 'left', whiteSpace: 'nowrap', cursor: 'pointer', fontSize: '13px' }), styleOverrides)); };
|
|
29230
|
+
};
|
|
29231
|
+
var SelectOption = function (props) {
|
|
29232
|
+
var selectProps = props.selectProps, data = props.data, showTippy = props.showTippy, style = props.style, placement = props.placement, tippyContent = props.tippyContent, tippyClass = props.tippyClass;
|
|
29233
|
+
selectProps.styles.option = getCustomOptionSelectionStyle(style);
|
|
29234
|
+
var getOption = function () { return (jsxRuntime.jsx("div", __assign({ onClick: stopPropagation }, { children: jsxRuntime.jsx(components.Option, __assign({}, props)) }))); };
|
|
29235
|
+
return showTippy ? (jsxRuntime.jsx(Tippy, __assign({ className: tippyClass || 'default-white', arrow: false, placement: placement || 'right', content: tippyContent || data.label }, { children: getOption() }))) : (getOption());
|
|
29236
|
+
};
|
|
29237
|
+
|
|
29238
|
+
var BulkSelectionDropdownItems = function (_a) {
|
|
29239
|
+
var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
|
|
29240
|
+
var handleSelect = function () {
|
|
29241
|
+
handleBulkSelection({
|
|
29242
|
+
action: locator,
|
|
29243
|
+
});
|
|
29244
|
+
};
|
|
29245
|
+
return (jsxRuntime.jsxs("button", __assign({ "data-testid": "bulk-action-".concat(locator), onClick: handleSelect, className: "dc__no-border dc__outline-none-imp w-100 flexbox h-32 dc__align-items-center pt-6 pr-8 pb-6 pl-8 dc__gap-8 ".concat(isSelected ? 'cb-5 bcb-2 fs-13 fw-6 lh-20' : 'dc__no-background cn-9 fs-13 fw-4 lh-20 dc__hover-n50'), type: "button" }, { children: [jsxRuntime.jsx(Icon, { className: "icon-dim-16" }), label] })));
|
|
29246
|
+
};
|
|
29247
|
+
|
|
29248
|
+
exports.BulkSelectionEvents = void 0;
|
|
29249
|
+
(function (BulkSelectionEvents) {
|
|
29250
|
+
BulkSelectionEvents["CLEAR_ALL_SELECTIONS"] = "CLEAR_ALL_SELECTIONS";
|
|
29251
|
+
BulkSelectionEvents["CLEAR_IDENTIFIERS"] = "CLEAR_IDENTIFIERS";
|
|
29252
|
+
BulkSelectionEvents["SELECT_ALL_ACROSS_PAGES"] = "SELECT_ALL_ACROSS_PAGES";
|
|
29253
|
+
BulkSelectionEvents["SELECT_ALL_ON_PAGE"] = "SELECT_ALL_ON_PAGE";
|
|
29254
|
+
BulkSelectionEvents["SELECT_IDENTIFIER"] = "SELECT_IDENTIFIER";
|
|
29255
|
+
BulkSelectionEvents["CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION"] = "CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION";
|
|
29256
|
+
BulkSelectionEvents["CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES"] = "CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES";
|
|
29257
|
+
})(exports.BulkSelectionEvents || (exports.BulkSelectionEvents = {}));
|
|
29258
|
+
exports.SelectAllDialogStatus = void 0;
|
|
29259
|
+
(function (SelectAllDialogStatus) {
|
|
29260
|
+
SelectAllDialogStatus["OPEN"] = "OPEN";
|
|
29261
|
+
SelectAllDialogStatus["CLOSED"] = "CLOSED";
|
|
29262
|
+
})(exports.SelectAllDialogStatus || (exports.SelectAllDialogStatus = {}));
|
|
29263
|
+
|
|
29264
|
+
var _a;
|
|
29265
|
+
var BULK_DROPDOWN_TEST_ID = 'bulk-selection-pop-up-menu';
|
|
29266
|
+
var BulkSelectionOptionsLabels = (_a = {},
|
|
29267
|
+
_a[exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE] = 'All on this page',
|
|
29268
|
+
_a[exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES] = 'All across pages',
|
|
29269
|
+
_a[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS] = 'Clear selection',
|
|
29270
|
+
_a);
|
|
29271
|
+
// Considering application can not be named as *
|
|
29272
|
+
var SELECT_ALL_ACROSS_PAGES_LOCATOR = '*';
|
|
29273
|
+
var getInvalidActionMessage = function (action) { return "Invalid action ".concat(action, " passed to useBulkSelection"); };
|
|
29274
|
+
var BULK_SELECTION_CONTEXT_ERROR = 'useBulkSelection must be used within BulkSelectionContext';
|
|
29275
|
+
|
|
29276
|
+
// giving type any here since not exporting this context, rather using it through useBulkSelection hook which is typed
|
|
29277
|
+
var BulkSelectionContext = React.createContext({
|
|
29278
|
+
selectedIdentifiers: {},
|
|
29279
|
+
handleBulkSelection: noop$1,
|
|
29280
|
+
isChecked: false,
|
|
29281
|
+
checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
|
|
29282
|
+
});
|
|
29283
|
+
var useBulkSelection = function () {
|
|
29284
|
+
var context = React.useContext(BulkSelectionContext);
|
|
29285
|
+
if (!context) {
|
|
29286
|
+
throw new Error(BULK_SELECTION_CONTEXT_ERROR);
|
|
29287
|
+
}
|
|
29288
|
+
return context;
|
|
29289
|
+
};
|
|
29290
|
+
var BulkSelectionProvider = function (_a) {
|
|
29291
|
+
var children = _a.children, identifiers = _a.identifiers, getSelectAllDialogStatus = _a.getSelectAllDialogStatus;
|
|
29292
|
+
var _b = __read(React.useState({}), 2), selectedIdentifiers = _b[0], setSelectedIdentifiers = _b[1];
|
|
29293
|
+
var setIdentifiersAfterClear = function (newIdentifiers, selectedIds) {
|
|
29294
|
+
var _newIdentifiers = JSON.parse(JSON.stringify(newIdentifiers));
|
|
29295
|
+
selectedIds.forEach(function (id) {
|
|
29296
|
+
delete _newIdentifiers[id];
|
|
29297
|
+
});
|
|
29298
|
+
setSelectedIdentifiers(_newIdentifiers);
|
|
29299
|
+
};
|
|
29300
|
+
var setIdentifiersAfterPageSelection = function (baseObject) {
|
|
29301
|
+
var _selectedIdentifiers = JSON.parse(JSON.stringify(selectedIdentifiers));
|
|
29302
|
+
// removing bulk selection across pages if present
|
|
29303
|
+
if (_selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29304
|
+
delete _selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR];
|
|
29305
|
+
}
|
|
29306
|
+
setSelectedIdentifiers(__assign(__assign({}, _selectedIdentifiers), baseObject));
|
|
29307
|
+
};
|
|
29308
|
+
var handleBulkSelection = function (_a) {
|
|
29309
|
+
var _b, _c;
|
|
29310
|
+
var _d, _e;
|
|
29311
|
+
var action = _a.action, data = _a.data;
|
|
29312
|
+
var selectedIds = (_d = data === null || data === void 0 ? void 0 : data.identifierIds) !== null && _d !== void 0 ? _d : [];
|
|
29313
|
+
var identifierObject = (_e = data === null || data === void 0 ? void 0 : data.identifierObject) !== null && _e !== void 0 ? _e : {};
|
|
29314
|
+
switch (action) {
|
|
29315
|
+
case exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS:
|
|
29316
|
+
setSelectedIdentifiers({});
|
|
29317
|
+
break;
|
|
29318
|
+
case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS_AFTER_ACROSS_SELECTION: {
|
|
29319
|
+
setIdentifiersAfterClear(identifiers, selectedIds);
|
|
29320
|
+
break;
|
|
29321
|
+
}
|
|
29322
|
+
case exports.BulkSelectionEvents.CLEAR_IDENTIFIERS: {
|
|
29323
|
+
setIdentifiersAfterClear(selectedIdentifiers, selectedIds);
|
|
29324
|
+
break;
|
|
29325
|
+
}
|
|
29326
|
+
case exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES: {
|
|
29327
|
+
if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29328
|
+
return;
|
|
29329
|
+
}
|
|
29330
|
+
var selectedIdentifiersLength = Object.keys(selectedIdentifiers).length;
|
|
29331
|
+
if (selectedIdentifiersLength > 0 && getSelectAllDialogStatus() === exports.SelectAllDialogStatus.OPEN) {
|
|
29332
|
+
return;
|
|
29333
|
+
}
|
|
29334
|
+
setSelectedIdentifiers((_b = {},
|
|
29335
|
+
_b[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
|
|
29336
|
+
_b));
|
|
29337
|
+
break;
|
|
29338
|
+
}
|
|
29339
|
+
case exports.BulkSelectionEvents.CLEAR_SELECTIONS_AND_SELECT_ALL_ACROSS_PAGES:
|
|
29340
|
+
setSelectedIdentifiers((_c = {},
|
|
29341
|
+
_c[SELECT_ALL_ACROSS_PAGES_LOCATOR] = true,
|
|
29342
|
+
_c));
|
|
29343
|
+
break;
|
|
29344
|
+
case exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE: {
|
|
29345
|
+
setIdentifiersAfterPageSelection(identifiers);
|
|
29346
|
+
break;
|
|
29347
|
+
}
|
|
29348
|
+
case exports.BulkSelectionEvents.SELECT_IDENTIFIER: {
|
|
29349
|
+
setIdentifiersAfterPageSelection(identifierObject);
|
|
29350
|
+
break;
|
|
29351
|
+
}
|
|
29352
|
+
default:
|
|
29353
|
+
throw new Error(getInvalidActionMessage(action));
|
|
29354
|
+
}
|
|
29355
|
+
};
|
|
29356
|
+
var getBulkSelectionCheckboxValues = function () {
|
|
29357
|
+
var selectedIdentifiersArray = Object.keys(selectedIdentifiers);
|
|
29358
|
+
if (selectedIdentifiersArray.length === 0) {
|
|
29359
|
+
return {
|
|
29360
|
+
isChecked: false,
|
|
29361
|
+
checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
|
|
29362
|
+
};
|
|
29363
|
+
}
|
|
29364
|
+
// if selectedIdentifiers contains select all across pages locator then it means all are selected
|
|
29365
|
+
if (selectedIdentifiers[SELECT_ALL_ACROSS_PAGES_LOCATOR]) {
|
|
29366
|
+
return {
|
|
29367
|
+
isChecked: true,
|
|
29368
|
+
checkboxValue: exports.CHECKBOX_VALUE.BULK_CHECKED,
|
|
29369
|
+
};
|
|
29370
|
+
}
|
|
29371
|
+
// if all the identifiers are selected then CHECKED else intermediate
|
|
29372
|
+
var areAllPresentIdentifiersSelected = Object.keys(identifiers).every(function (identifierId) { return selectedIdentifiers[identifierId]; });
|
|
29373
|
+
if (areAllPresentIdentifiersSelected) {
|
|
29374
|
+
return {
|
|
29375
|
+
isChecked: true,
|
|
29376
|
+
checkboxValue: exports.CHECKBOX_VALUE.CHECKED,
|
|
29377
|
+
};
|
|
29378
|
+
}
|
|
29379
|
+
return {
|
|
29380
|
+
isChecked: true,
|
|
29381
|
+
checkboxValue: exports.CHECKBOX_VALUE.INTERMEDIATE,
|
|
29382
|
+
};
|
|
29383
|
+
};
|
|
29384
|
+
var _c = getBulkSelectionCheckboxValues(), isChecked = _c.isChecked, checkboxValue = _c.checkboxValue;
|
|
29385
|
+
var value = React.useMemo(function () { return ({
|
|
29386
|
+
selectedIdentifiers: selectedIdentifiers,
|
|
29387
|
+
handleBulkSelection: handleBulkSelection,
|
|
29388
|
+
isChecked: isChecked,
|
|
29389
|
+
checkboxValue: checkboxValue,
|
|
29390
|
+
}); }, [selectedIdentifiers, handleBulkSelection, isChecked, checkboxValue]);
|
|
29391
|
+
return jsxRuntime.jsx(BulkSelectionContext.Provider, __assign({ value: value }, { children: children }));
|
|
29392
|
+
};
|
|
29393
|
+
|
|
29394
|
+
var _rect$1, _path$1;
|
|
29395
|
+
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); }
|
|
29396
|
+
var SvgIcCheckSquare = function SvgIcCheckSquare(props) {
|
|
29397
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
29398
|
+
width: "1em",
|
|
29399
|
+
height: "1em",
|
|
29400
|
+
viewBox: "0 0 16 16",
|
|
29401
|
+
fill: "none",
|
|
29402
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29403
|
+
}, props), _rect$1 || (_rect$1 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
29404
|
+
x: 2,
|
|
29405
|
+
y: 2,
|
|
29406
|
+
width: 12,
|
|
29407
|
+
height: 12,
|
|
29408
|
+
rx: 2,
|
|
29409
|
+
stroke: "#596168",
|
|
29410
|
+
strokeWidth: 1.5,
|
|
29411
|
+
strokeLinecap: "round",
|
|
29412
|
+
strokeLinejoin: "round"
|
|
29413
|
+
})), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29414
|
+
d: "m11.208 5.958-4.083 4.083L5.083 8",
|
|
29415
|
+
stroke: "#596168",
|
|
29416
|
+
strokeWidth: 1.5,
|
|
29417
|
+
strokeLinecap: "round",
|
|
29418
|
+
strokeLinejoin: "round"
|
|
29419
|
+
})));
|
|
29420
|
+
};
|
|
29421
|
+
|
|
29422
|
+
var _rect, _path;
|
|
29423
|
+
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); }
|
|
29424
|
+
var SvgIcCheckAll = function SvgIcCheckAll(props) {
|
|
29425
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
29426
|
+
width: "1em",
|
|
29427
|
+
height: "1em",
|
|
29428
|
+
viewBox: "0 0 17 17",
|
|
29429
|
+
fill: "none",
|
|
29430
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29431
|
+
}, props), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
29432
|
+
x: 2,
|
|
29433
|
+
y: 2,
|
|
29434
|
+
width: 11.2,
|
|
29435
|
+
height: 11.2,
|
|
29436
|
+
rx: 2,
|
|
29437
|
+
stroke: "#596168",
|
|
29438
|
+
strokeWidth: 1.5,
|
|
29439
|
+
strokeLinecap: "round",
|
|
29440
|
+
strokeLinejoin: "round"
|
|
29441
|
+
})), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29442
|
+
d: "M15.467 5.866v5.6a4 4 0 0 1-4 4h-5.6M10.35 5.85l-3.5 3.5L5.1 7.6",
|
|
29443
|
+
stroke: "#596168",
|
|
29444
|
+
strokeWidth: 1.5,
|
|
29445
|
+
strokeLinecap: "round",
|
|
29446
|
+
strokeLinejoin: "round"
|
|
29447
|
+
})));
|
|
29448
|
+
};
|
|
29449
|
+
|
|
29450
|
+
var _defs, _use;
|
|
29451
|
+
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); }
|
|
29452
|
+
var SvgIcClose = function SvgIcClose(props) {
|
|
29453
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
29454
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29455
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
29456
|
+
width: "1em",
|
|
29457
|
+
height: "1em",
|
|
29458
|
+
viewBox: "0 0 24 24"
|
|
29459
|
+
}, props), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
29460
|
+
id: "ic-close_svg__a",
|
|
29461
|
+
className: "ic-close_svg__stroke-color",
|
|
29462
|
+
d: "M18.295 5.705a.997.997 0 0 0-1.41 0L12 10.59 7.115 5.705a.997.997 0 1 0-1.41 1.41L10.59 12l-4.885 4.885a.997.997 0 1 0 1.41 1.41L12 13.41l4.885 4.885a.997.997 0 0 0 1.41-1.41L13.41 12l4.885-4.885a.997.997 0 0 0 0-1.41z"
|
|
29463
|
+
}))), _use || (_use = /*#__PURE__*/React__namespace.createElement("use", {
|
|
29464
|
+
fill: "#999",
|
|
29465
|
+
xlinkHref: "#ic-close_svg__a",
|
|
29466
|
+
fillRule: "evenodd"
|
|
29467
|
+
})));
|
|
29468
|
+
};
|
|
29469
|
+
|
|
29470
|
+
var BulkSelection = function (_a) {
|
|
29471
|
+
var showPagination = _a.showPagination;
|
|
29472
|
+
var _b = useBulkSelection(), handleBulkSelection = _b.handleBulkSelection, selectedIdentifiers = _b.selectedIdentifiers, isChecked = _b.isChecked, checkboxValue = _b.checkboxValue;
|
|
29473
|
+
var areOptionsSelected = Object.keys(selectedIdentifiers).length > 0;
|
|
29474
|
+
var BulkSelectionItems = __spreadArray(__spreadArray([
|
|
29475
|
+
{
|
|
29476
|
+
locator: exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE,
|
|
29477
|
+
label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.SELECT_ALL_ON_PAGE],
|
|
29478
|
+
isSelected: isChecked && checkboxValue === exports.CHECKBOX_VALUE.CHECKED,
|
|
29479
|
+
icon: SvgIcCheckSquare,
|
|
29480
|
+
}
|
|
29481
|
+
], __read((showPagination
|
|
29482
|
+
? [
|
|
29483
|
+
{
|
|
29484
|
+
locator: exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES,
|
|
29485
|
+
label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.SELECT_ALL_ACROSS_PAGES],
|
|
29486
|
+
isSelected: isChecked && checkboxValue === exports.CHECKBOX_VALUE.BULK_CHECKED,
|
|
29487
|
+
icon: SvgIcCheckAll,
|
|
29488
|
+
},
|
|
29489
|
+
]
|
|
29490
|
+
: [])), false), __read((areOptionsSelected
|
|
29491
|
+
? [
|
|
29492
|
+
{
|
|
29493
|
+
locator: exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS,
|
|
29494
|
+
label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS],
|
|
29495
|
+
isSelected: false,
|
|
29496
|
+
icon: SvgIcClose,
|
|
29497
|
+
},
|
|
29498
|
+
]
|
|
29499
|
+
: [])), false);
|
|
29500
|
+
return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true }, { children: [jsxRuntime.jsxs(PopupMenu.Button, __assign({ isKebab: true, rootClassName: "h-20 flexbox p-0 dc__no-background dc__no-border dc__outline-none-imp", dataTestId: BULK_DROPDOWN_TEST_ID }, { children: [jsxRuntime.jsx(Checkbox$1, { isChecked: isChecked, onChange: noop$1, rootClassName: "icon-dim-20 m-0", value: checkboxValue }), jsxRuntime.jsx(SvgIcChevronDown, { className: "icon-dim-20 fcn-6 dc__no-shrink" })] })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "dc__top-22 w-150 dc__right-0 pt-4 pb-4 pl-0 pr-0 bcn-0 flex column dc__content-start dc__align-start dc__position-abs bcn-0 dc__border dc__border-radius-4-imp" }, { children: BulkSelectionItems.map(function (item) { return (jsxRuntime.jsx(BulkSelectionDropdownItems, { locator: item.locator, label: item.label, isSelected: item.isSelected, icon: item.icon, handleBulkSelection: handleBulkSelection }, item.locator)); }) }))] })));
|
|
29501
|
+
};
|
|
29502
|
+
|
|
29503
|
+
var MESSAGES = {
|
|
29504
|
+
PROVIDE_A_NUMBER: 'Please provide a number',
|
|
29505
|
+
LOWERCASE_ALPHANUMERIC: 'Only lowercase alphanumeric characters, -, _ or . allowed',
|
|
29506
|
+
CAN_NOT_START_END_WITH_SEPARATORS: 'Cannot start/end with -, _ or .',
|
|
29507
|
+
getMinMaxCharMessage: function (min, max) { return "Minimum ".concat(min, " and maximum ").concat(max, " characters allowed"); },
|
|
29508
|
+
getMaxCharMessage: function (max) { return "Maximum ".concat(max, " characters are allowed"); },
|
|
29509
|
+
VALID_POSITIVE_NUMBER: 'This field should be a valid positive number',
|
|
29510
|
+
VALID_POSITIVE_INTEGER: 'This field should be a valid positive integer',
|
|
29511
|
+
MAX_SAFE_INTEGER: "Maximum allowed value is ".concat(Number.MAX_SAFE_INTEGER),
|
|
29512
|
+
};
|
|
29513
|
+
var MAX_DESCRIPTION_LENGTH = 300;
|
|
29514
|
+
var validateName = function (name) {
|
|
29515
|
+
if (!/^.{3,50}$/.test(name)) {
|
|
29516
|
+
return {
|
|
29517
|
+
isValid: false,
|
|
29518
|
+
message: MESSAGES.getMinMaxCharMessage(3, 50),
|
|
29519
|
+
};
|
|
29520
|
+
}
|
|
29521
|
+
if (!/^[a-z0-9-._]+$/.test(name)) {
|
|
29522
|
+
return {
|
|
29523
|
+
isValid: false,
|
|
29524
|
+
message: MESSAGES.LOWERCASE_ALPHANUMERIC,
|
|
29525
|
+
};
|
|
29526
|
+
}
|
|
29527
|
+
if (!/^(?![-._]).*[^-._]$/.test(name)) {
|
|
29528
|
+
return {
|
|
29529
|
+
isValid: false,
|
|
29530
|
+
message: MESSAGES.CAN_NOT_START_END_WITH_SEPARATORS,
|
|
29531
|
+
};
|
|
29532
|
+
}
|
|
29533
|
+
return {
|
|
29534
|
+
isValid: true,
|
|
29535
|
+
};
|
|
29536
|
+
};
|
|
29537
|
+
var validateDescription = function (description) {
|
|
29538
|
+
if ((description === null || description === void 0 ? void 0 : description.length) > MAX_DESCRIPTION_LENGTH) {
|
|
29539
|
+
return {
|
|
29540
|
+
isValid: false,
|
|
29541
|
+
message: MESSAGES.getMaxCharMessage(MAX_DESCRIPTION_LENGTH),
|
|
29542
|
+
};
|
|
29543
|
+
}
|
|
29544
|
+
return {
|
|
29545
|
+
isValid: true,
|
|
29546
|
+
};
|
|
29547
|
+
};
|
|
29548
|
+
var validateRequiredPositiveNumber = function (value) {
|
|
29549
|
+
if (!value) {
|
|
29550
|
+
return {
|
|
29551
|
+
isValid: false,
|
|
29552
|
+
message: MESSAGES.PROVIDE_A_NUMBER,
|
|
29553
|
+
};
|
|
29554
|
+
}
|
|
29555
|
+
// TODO: Look if regex is available for this, since 0002 is not a valid number
|
|
29556
|
+
if (!/^\d+(\.\d+)?$/.test(value.toString())) {
|
|
29557
|
+
return {
|
|
29558
|
+
isValid: false,
|
|
29559
|
+
message: MESSAGES.VALID_POSITIVE_NUMBER,
|
|
29560
|
+
};
|
|
29561
|
+
}
|
|
29562
|
+
var numericValue = Number(value);
|
|
29563
|
+
if (numericValue > Number.MAX_SAFE_INTEGER) {
|
|
29564
|
+
return {
|
|
29565
|
+
isValid: false,
|
|
29566
|
+
message: MESSAGES.MAX_SAFE_INTEGER,
|
|
29567
|
+
};
|
|
29568
|
+
}
|
|
29569
|
+
if (numericValue <= 0) {
|
|
29570
|
+
return {
|
|
29571
|
+
isValid: false,
|
|
29572
|
+
message: MESSAGES.VALID_POSITIVE_NUMBER,
|
|
29573
|
+
};
|
|
29574
|
+
}
|
|
29575
|
+
return {
|
|
29576
|
+
isValid: true,
|
|
29577
|
+
};
|
|
29578
|
+
};
|
|
29579
|
+
var validateRequiredPositiveInteger = function (value) {
|
|
29580
|
+
if (!value) {
|
|
29581
|
+
return {
|
|
29582
|
+
isValid: false,
|
|
29583
|
+
message: MESSAGES.PROVIDE_A_NUMBER,
|
|
29584
|
+
};
|
|
29585
|
+
}
|
|
29586
|
+
if (!/^\d+$/.test(value.toString())) {
|
|
29587
|
+
return {
|
|
29588
|
+
isValid: false,
|
|
29589
|
+
message: MESSAGES.VALID_POSITIVE_INTEGER,
|
|
29590
|
+
};
|
|
29591
|
+
}
|
|
29592
|
+
var numericValue = Number(value);
|
|
29593
|
+
if (numericValue > Number.MAX_SAFE_INTEGER) {
|
|
29594
|
+
return {
|
|
29595
|
+
isValid: false,
|
|
29596
|
+
message: MESSAGES.MAX_SAFE_INTEGER,
|
|
29597
|
+
};
|
|
29598
|
+
}
|
|
29599
|
+
if (numericValue <= 0) {
|
|
29600
|
+
return {
|
|
29601
|
+
isValid: false,
|
|
29602
|
+
message: MESSAGES.VALID_POSITIVE_INTEGER,
|
|
29603
|
+
};
|
|
29604
|
+
}
|
|
29605
|
+
return {
|
|
29606
|
+
isValid: true,
|
|
29607
|
+
};
|
|
29608
|
+
};
|
|
29609
|
+
|
|
29610
|
+
// Disabling default export since this is a helper function and we would have to export a lot of functions in future.
|
|
29611
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
29612
|
+
var highlightSearchText = function (_a) {
|
|
29613
|
+
var searchText = _a.searchText, text = _a.text, highlightClasses = _a.highlightClasses;
|
|
29614
|
+
if (!searchText) {
|
|
29615
|
+
return text;
|
|
29616
|
+
}
|
|
29617
|
+
try {
|
|
29618
|
+
var regex = new RegExp(searchText, 'gi');
|
|
29619
|
+
return text.replace(regex, function (match) { return "<span class=\"".concat(highlightClasses, "\">").concat(match, "</span>"); });
|
|
29620
|
+
}
|
|
29621
|
+
catch (error) {
|
|
29622
|
+
return text;
|
|
29623
|
+
}
|
|
29624
|
+
};
|
|
29625
|
+
|
|
29626
|
+
var validateRequestLimit = function (_a) {
|
|
29627
|
+
var _b, _c, _d, _e, _f, _g;
|
|
29628
|
+
var request = _a.request, limit = _a.limit, unitsMap = _a.unitsMap;
|
|
29629
|
+
// Request <= Limit
|
|
29630
|
+
// Request and Limit should be numbers can be decimals
|
|
29631
|
+
// Request and Limit should be positive numbers
|
|
29632
|
+
// Request and Limit should be less than Number.MAX_SAFE_INTEGER
|
|
29633
|
+
// Request and Limit should can have at most BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES
|
|
29634
|
+
// Both request and limit should be there
|
|
29635
|
+
var requestNumber = Number(request.value);
|
|
29636
|
+
var limitNumber = Number(limit.value);
|
|
29637
|
+
var requestUnit = Number((_b = unitsMap[request.unit]) === null || _b === void 0 ? void 0 : _b.conversionFactor);
|
|
29638
|
+
var limitUnit = Number((_c = unitsMap[limit.unit]) === null || _c === void 0 ? void 0 : _c.conversionFactor);
|
|
29639
|
+
var requestLimitValidationResponse = {
|
|
29640
|
+
request: {
|
|
29641
|
+
isValid: true,
|
|
29642
|
+
},
|
|
29643
|
+
limit: {
|
|
29644
|
+
isValid: true,
|
|
29645
|
+
},
|
|
29646
|
+
};
|
|
29647
|
+
var requestValidationMessage = validateRequiredPositiveNumber(request.value).message;
|
|
29648
|
+
var limitValidationMessage = validateRequiredPositiveNumber(limit.value).message;
|
|
29649
|
+
if (requestValidationMessage) {
|
|
29650
|
+
requestLimitValidationResponse.request = {
|
|
29651
|
+
message: requestValidationMessage,
|
|
29652
|
+
isValid: false,
|
|
29653
|
+
};
|
|
29654
|
+
}
|
|
29655
|
+
if (limitValidationMessage) {
|
|
29656
|
+
requestLimitValidationResponse.limit = {
|
|
29657
|
+
message: limitValidationMessage,
|
|
29658
|
+
isValid: false,
|
|
29659
|
+
};
|
|
29660
|
+
}
|
|
29661
|
+
if (limitValidationMessage || requestValidationMessage) {
|
|
29662
|
+
return requestLimitValidationResponse;
|
|
29663
|
+
}
|
|
29664
|
+
// only two decimal places are allowed
|
|
29665
|
+
var requestDecimalPlaces = (_e = (_d = String(request.value).split('.')[1]) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
|
|
29666
|
+
var limitDecimalPlaces = (_g = (_f = String(limit.value).split('.')[1]) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0;
|
|
29667
|
+
if (requestDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29668
|
+
requestLimitValidationResponse.request = {
|
|
29669
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_DECIMAL_PLACES,
|
|
29670
|
+
isValid: false,
|
|
29671
|
+
};
|
|
29672
|
+
return requestLimitValidationResponse;
|
|
29673
|
+
}
|
|
29674
|
+
if (limitDecimalPlaces > BUILD_INFRA_INPUT_CONSTRAINTS.DECIMAL_PLACES) {
|
|
29675
|
+
requestLimitValidationResponse.limit = {
|
|
29676
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.LIMIT_DECIMAL_PLACES,
|
|
29677
|
+
isValid: false,
|
|
29678
|
+
};
|
|
29679
|
+
return requestLimitValidationResponse;
|
|
29680
|
+
}
|
|
29681
|
+
// Assuming requestUnit and requestNumber are not 0
|
|
29682
|
+
// TODO: Communicate this assumption to the backend
|
|
29683
|
+
var limitRequestUnitFactor = limitUnit / requestUnit;
|
|
29684
|
+
var limitRequestFactor = limitNumber / requestNumber;
|
|
29685
|
+
var isDifferenceBigNumber = limitRequestUnitFactor * limitRequestFactor <= Number.MAX_SAFE_INTEGER;
|
|
29686
|
+
if (!isDifferenceBigNumber) {
|
|
29687
|
+
requestLimitValidationResponse.request = {
|
|
29688
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.CAN_NOT_COMPUTE,
|
|
29689
|
+
isValid: false,
|
|
29690
|
+
};
|
|
29691
|
+
return requestLimitValidationResponse;
|
|
29692
|
+
}
|
|
29693
|
+
if (limitRequestUnitFactor * limitRequestFactor < 1) {
|
|
29694
|
+
requestLimitValidationResponse.request = {
|
|
29695
|
+
message: BUILD_INFRA_TEXT.VALIDATE_REQUEST_LIMIT.REQUEST_LESS_THAN_LIMIT,
|
|
29696
|
+
isValid: false,
|
|
29697
|
+
};
|
|
29698
|
+
return requestLimitValidationResponse;
|
|
29699
|
+
}
|
|
29700
|
+
return requestLimitValidationResponse;
|
|
29701
|
+
};
|
|
29702
|
+
var getInitialProfileInputErrors = function (fromCreateView) {
|
|
29703
|
+
if (fromCreateView) {
|
|
29704
|
+
var initialProfileInputErrors_1 = __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29705
|
+
CREATE_MODE_REQUIRED_INPUT_FIELDS.forEach(function (field) {
|
|
29706
|
+
initialProfileInputErrors_1[field] = '';
|
|
29707
|
+
});
|
|
29708
|
+
return initialProfileInputErrors_1;
|
|
29709
|
+
}
|
|
29710
|
+
return __assign({}, PROFILE_INPUT_ERROR_FIELDS);
|
|
29711
|
+
};
|
|
29712
|
+
var useBuildInfraForm = function (_a) {
|
|
29713
|
+
var name = _a.name, editProfile = _a.editProfile, handleSuccessRedirection = _a.handleSuccessRedirection;
|
|
29714
|
+
var fromCreateView = !name;
|
|
29715
|
+
var _b = __read(useAsync(function () {
|
|
29716
|
+
return getBuildInfraProfileByName({
|
|
29717
|
+
name: name !== null && name !== void 0 ? name : DEFAULT_PROFILE_NAME,
|
|
29718
|
+
fromCreateView: fromCreateView,
|
|
29719
|
+
});
|
|
29720
|
+
}, [name]), 4), isLoading = _b[0], profileResponse = _b[1], responseError = _b[2], reloadRequest = _b[3];
|
|
29721
|
+
// If configuration is existing and is active then use it else use default from profileResponse
|
|
29722
|
+
var _c = __read(React.useState(null), 2), profileInput = _c[0], setProfileInput = _c[1];
|
|
29723
|
+
var _d = __read(React.useState(__assign({}, PROFILE_INPUT_ERROR_FIELDS)), 2), profileInputErrors = _d[0], setProfileInputErrors = _d[1];
|
|
29724
|
+
var _e = __read(React.useState(false), 2), loadingActionRequest = _e[0], setLoadingActionRequest = _e[1];
|
|
29725
|
+
React.useEffect(function () {
|
|
29726
|
+
if (!isLoading && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.configurationUnits) && (profileResponse === null || profileResponse === void 0 ? void 0 : profileResponse.profile)) {
|
|
29727
|
+
setProfileInput(__assign({}, profileResponse.profile));
|
|
29728
|
+
setProfileInputErrors(getInitialProfileInputErrors(fromCreateView));
|
|
29729
|
+
}
|
|
29730
|
+
}, [profileResponse, isLoading]);
|
|
29731
|
+
// NOTE: Currently sending and receiving values as string, but will parse it to number for payload
|
|
29732
|
+
var handleProfileInputChange = function (_a) {
|
|
29733
|
+
var action = _a.action, data = _a.data;
|
|
29734
|
+
var currentInput = __assign({}, profileInput);
|
|
29735
|
+
var currentInputErrors = __assign({}, profileInputErrors);
|
|
29736
|
+
var lastSavedConfiguration = profileResponse.profile.configurations;
|
|
29737
|
+
var currentConfiguration = currentInput.configurations;
|
|
29738
|
+
var _b = data !== null && data !== void 0 ? data : { value: null, unit: null }, value = _b.value, unit = _b.unit;
|
|
29739
|
+
switch (action) {
|
|
29740
|
+
case exports.BuildInfraMetaConfigTypes.DESCRIPTION:
|
|
29741
|
+
currentInput.description = value;
|
|
29742
|
+
currentInputErrors.description = validateDescription(value).message;
|
|
29743
|
+
break;
|
|
29744
|
+
case exports.BuildInfraMetaConfigTypes.NAME:
|
|
29745
|
+
currentInput.name = value;
|
|
29746
|
+
currentInputErrors.name = validateName(value).message;
|
|
29747
|
+
break;
|
|
29748
|
+
case exports.BuildInfraConfigTypes.CPU_LIMIT: {
|
|
29749
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT]), { value: value, unit: unit });
|
|
29750
|
+
var _c = validateRequestLimit({
|
|
29751
|
+
request: {
|
|
29752
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].value,
|
|
29753
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST].unit,
|
|
29754
|
+
},
|
|
29755
|
+
limit: {
|
|
29756
|
+
value: value,
|
|
29757
|
+
unit: unit,
|
|
29758
|
+
},
|
|
29759
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29760
|
+
}), request = _c.request, limit = _c.limit;
|
|
29761
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29762
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29763
|
+
break;
|
|
29764
|
+
}
|
|
29765
|
+
case exports.BuildInfraConfigTypes.CPU_REQUEST: {
|
|
29766
|
+
currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.CPU_REQUEST]), { value: value, unit: unit });
|
|
29767
|
+
var _d = validateRequestLimit({
|
|
29768
|
+
request: {
|
|
29769
|
+
value: value,
|
|
29770
|
+
unit: unit,
|
|
29771
|
+
},
|
|
29772
|
+
limit: {
|
|
29773
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].value,
|
|
29774
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.CPU_LIMIT].unit,
|
|
29775
|
+
},
|
|
29776
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.CPU_LIMIT],
|
|
29777
|
+
}), request = _d.request, limit = _d.limit;
|
|
29778
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = limit.message;
|
|
29779
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = request.message;
|
|
29780
|
+
break;
|
|
29781
|
+
}
|
|
29782
|
+
case exports.BuildInfraConfigTypes.MEMORY_LIMIT: {
|
|
29783
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT]), { value: value, unit: unit });
|
|
29784
|
+
var _e = validateRequestLimit({
|
|
29785
|
+
request: {
|
|
29786
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].value,
|
|
29787
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST].unit,
|
|
29788
|
+
},
|
|
29789
|
+
limit: {
|
|
29790
|
+
value: value,
|
|
29791
|
+
unit: unit,
|
|
29792
|
+
},
|
|
29793
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29794
|
+
}), request = _e.request, limit = _e.limit;
|
|
29795
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29796
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29797
|
+
break;
|
|
29798
|
+
}
|
|
29799
|
+
case exports.BuildInfraConfigTypes.MEMORY_REQUEST: {
|
|
29800
|
+
currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_REQUEST]), { value: value, unit: unit });
|
|
29801
|
+
var _f = validateRequestLimit({
|
|
29802
|
+
request: {
|
|
29803
|
+
value: value,
|
|
29804
|
+
unit: unit,
|
|
29805
|
+
},
|
|
29806
|
+
limit: {
|
|
29807
|
+
value: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].value,
|
|
29808
|
+
unit: currentConfiguration[exports.BuildInfraConfigTypes.MEMORY_LIMIT].unit,
|
|
29809
|
+
},
|
|
29810
|
+
unitsMap: profileResponse.configurationUnits[exports.BuildInfraConfigTypes.MEMORY_LIMIT],
|
|
29811
|
+
}), request = _f.request, limit = _f.limit;
|
|
29812
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = limit.message;
|
|
29813
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = request.message;
|
|
29814
|
+
break;
|
|
29815
|
+
}
|
|
29816
|
+
case exports.BuildInfraConfigTypes.BUILD_TIMEOUT: {
|
|
29817
|
+
currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = __assign(__assign({}, currentConfiguration[exports.BuildInfraConfigTypes.BUILD_TIMEOUT]), { value: value, unit: unit });
|
|
29818
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveInteger(value).message;
|
|
29819
|
+
break;
|
|
29820
|
+
}
|
|
29821
|
+
case exports.BuildInfraInheritActions.ACTIVATE_CPU:
|
|
29822
|
+
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 });
|
|
29823
|
+
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 });
|
|
29824
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
29825
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
29826
|
+
break;
|
|
29827
|
+
case exports.BuildInfraInheritActions.ACTIVATE_MEMORY:
|
|
29828
|
+
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 });
|
|
29829
|
+
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 });
|
|
29830
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
29831
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
29832
|
+
break;
|
|
29833
|
+
case exports.BuildInfraInheritActions.ACTIVATE_BUILD_TIMEOUT:
|
|
29834
|
+
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 });
|
|
29835
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
29836
|
+
break;
|
|
29837
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_BUILD_TIMEOUT:
|
|
29838
|
+
// Reverting the value and unit to defaultValues
|
|
29839
|
+
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 });
|
|
29840
|
+
currentInputErrors[exports.BuildInfraConfigTypes.BUILD_TIMEOUT] = null;
|
|
29841
|
+
break;
|
|
29842
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_CPU:
|
|
29843
|
+
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 });
|
|
29844
|
+
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 });
|
|
29845
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_LIMIT] = null;
|
|
29846
|
+
currentInputErrors[exports.BuildInfraConfigTypes.CPU_REQUEST] = null;
|
|
29847
|
+
break;
|
|
29848
|
+
case exports.BuildInfraInheritActions.DE_ACTIVATE_MEMORY:
|
|
29849
|
+
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 });
|
|
29850
|
+
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 });
|
|
29851
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_LIMIT] = null;
|
|
29852
|
+
currentInputErrors[exports.BuildInfraConfigTypes.MEMORY_REQUEST] = null;
|
|
29853
|
+
break;
|
|
29854
|
+
default:
|
|
29855
|
+
throw new Error(BUILD_INFRA_TEXT.getInvalidActionMessage(action));
|
|
29856
|
+
}
|
|
29857
|
+
setProfileInput(currentInput);
|
|
29858
|
+
setProfileInputErrors(currentInputErrors);
|
|
29859
|
+
};
|
|
29860
|
+
var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29861
|
+
var hasErrors, err_1;
|
|
29862
|
+
return __generator(this, function (_a) {
|
|
29863
|
+
switch (_a.label) {
|
|
29864
|
+
case 0:
|
|
29865
|
+
e.preventDefault();
|
|
29866
|
+
hasErrors = Object.keys(profileInputErrors).filter(function (item) { return profileInputErrors[item] !== null && profileInputErrors[item] !== undefined; }).length > 0;
|
|
29867
|
+
if (hasErrors) {
|
|
29868
|
+
toast.error(BUILD_INFRA_TEXT.INVALID_FORM_MESSAGE);
|
|
29869
|
+
return [2 /*return*/];
|
|
29870
|
+
}
|
|
29871
|
+
setLoadingActionRequest(true);
|
|
29872
|
+
_a.label = 1;
|
|
29873
|
+
case 1:
|
|
29874
|
+
_a.trys.push([1, 6, , 7]);
|
|
29875
|
+
if (!editProfile) return [3 /*break*/, 3];
|
|
29876
|
+
return [4 /*yield*/, updateBuildInfraProfile({ name: name, profileInput: profileInput })];
|
|
29877
|
+
case 2:
|
|
29878
|
+
_a.sent();
|
|
29879
|
+
return [3 /*break*/, 5];
|
|
29880
|
+
case 3: return [4 /*yield*/, createBuildInfraProfile({ profileInput: profileInput })];
|
|
29881
|
+
case 4:
|
|
29882
|
+
_a.sent();
|
|
29883
|
+
_a.label = 5;
|
|
29884
|
+
case 5:
|
|
29885
|
+
setLoadingActionRequest(false);
|
|
29886
|
+
toast.success(BUILD_INFRA_TEXT.getSubmitSuccessMessage(profileInput.name, editProfile));
|
|
29887
|
+
if (handleSuccessRedirection) {
|
|
29888
|
+
handleSuccessRedirection();
|
|
29889
|
+
}
|
|
29890
|
+
else {
|
|
29891
|
+
reloadRequest();
|
|
29892
|
+
}
|
|
29893
|
+
return [3 /*break*/, 7];
|
|
29894
|
+
case 6:
|
|
29895
|
+
err_1 = _a.sent();
|
|
29896
|
+
showError(err_1);
|
|
29897
|
+
setLoadingActionRequest(false);
|
|
29898
|
+
return [3 /*break*/, 7];
|
|
29899
|
+
case 7: return [2 /*return*/];
|
|
29900
|
+
}
|
|
29901
|
+
});
|
|
29902
|
+
}); };
|
|
29903
|
+
return {
|
|
29904
|
+
isLoading: isLoading,
|
|
29905
|
+
profileResponse: profileResponse,
|
|
29906
|
+
responseError: responseError,
|
|
29907
|
+
reloadRequest: reloadRequest,
|
|
29908
|
+
profileInput: profileInput,
|
|
29909
|
+
profileInputErrors: profileInputErrors,
|
|
29910
|
+
handleProfileInputChange: handleProfileInputChange,
|
|
29911
|
+
loadingActionRequest: loadingActionRequest,
|
|
29912
|
+
handleSubmit: handleSubmit,
|
|
29913
|
+
};
|
|
29914
|
+
};
|
|
29915
|
+
var getOptionBackgroundColor = function (isFocused, isSelected) {
|
|
29916
|
+
if (isSelected) {
|
|
29917
|
+
return 'var(--B100)';
|
|
29918
|
+
}
|
|
29919
|
+
if (isFocused) {
|
|
29920
|
+
return 'var(--N50)';
|
|
29921
|
+
}
|
|
29922
|
+
return 'var(--white)';
|
|
29923
|
+
};
|
|
29924
|
+
var unitSelectorStyles = function () {
|
|
29925
|
+
return getCommonSelectStyle({
|
|
29926
|
+
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': {
|
|
29927
|
+
border: '1px solid var(--N400)',
|
|
29928
|
+
} })); },
|
|
29929
|
+
indicatorContainer: function (base) { return (__assign(__assign({}, base), { padding: '0px' })); },
|
|
29930
|
+
dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N600)', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
|
|
29931
|
+
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' })); },
|
|
29932
|
+
valueContainer: function (base) { return (__assign(__assign({}, base), { color: 'var(--N900)', fontSize: '13px', fontWeight: '400', lineHeight: '20px' })); },
|
|
29933
|
+
menuList: function (base) { return (__assign(__assign({}, base), { maxHeight: '164px', height: '100%' })); },
|
|
29934
|
+
});
|
|
29935
|
+
};
|
|
29936
|
+
|
|
29937
|
+
/**
|
|
29938
|
+
* In case need arise for variants break this CustomInput and Select as a separate component
|
|
29939
|
+
*/
|
|
29940
|
+
var BuildInfraFormAction = function (_a) {
|
|
29941
|
+
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;
|
|
29942
|
+
var handleUnitChange = function (selectedUnit) {
|
|
29943
|
+
var data = {
|
|
29944
|
+
unit: selectedUnit.label,
|
|
29945
|
+
value: currentValue,
|
|
29946
|
+
};
|
|
29947
|
+
handleProfileInputChange({ action: actionType, data: data });
|
|
29948
|
+
};
|
|
29949
|
+
var handleInputChange = function (e) {
|
|
29950
|
+
var data = {
|
|
29951
|
+
unit: currentUnitName,
|
|
29952
|
+
value: e.currentTarget.value,
|
|
29953
|
+
};
|
|
29954
|
+
handleProfileInputChange({ action: actionType, data: data });
|
|
29955
|
+
};
|
|
29956
|
+
var unitOptions = React.useMemo(function () {
|
|
29957
|
+
var _a, _b;
|
|
29958
|
+
var units = (_b = (_a = Object.values(profileUnitsMap)) === null || _a === void 0 ? void 0 : _a.map(function (unit) { return ({
|
|
29959
|
+
label: unit.name,
|
|
29960
|
+
value: String(unit.conversionFactor),
|
|
29961
|
+
}); })) !== null && _b !== void 0 ? _b : [];
|
|
29962
|
+
return units.sort(function (a, b) { return Number(a.value) - Number(b.value); });
|
|
29963
|
+
}, [profileUnitsMap]);
|
|
29964
|
+
var currentUnit = React.useMemo(function () { return unitOptions.find(function (unit) { return unit.label === currentUnitName; }); }, [unitOptions, currentUnitName]);
|
|
29965
|
+
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: {
|
|
29966
|
+
IndicatorSeparator: null,
|
|
29967
|
+
ClearIndicator: null,
|
|
29968
|
+
}, styles: unitSelectorStyles() }))] })), error && (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })))] })));
|
|
29969
|
+
};
|
|
29970
|
+
|
|
29971
|
+
var BuildInfraFormItem = function (_a) {
|
|
29972
|
+
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;
|
|
29973
|
+
var handleActivationChange = function (e) {
|
|
29974
|
+
var checked = e.currentTarget.checked;
|
|
29975
|
+
var action = (checked ? "activate_".concat(locator) : "de_activate_".concat(locator));
|
|
29976
|
+
handleProfileInputChange({ action: action });
|
|
29977
|
+
};
|
|
29978
|
+
var renderMarker = function () {
|
|
29979
|
+
if (isDefaultProfile) {
|
|
29980
|
+
return jsxRuntime.jsx(Marker, { className: "icon-dim-20 dc__no-shrink" });
|
|
29981
|
+
}
|
|
29982
|
+
return (jsxRuntime.jsx(Checkbox$1, { onChange: handleActivationChange, isChecked: !isInheriting, value: exports.CHECKBOX_VALUE.CHECKED, dataTestId: "".concat(locator, "_marker") }));
|
|
29983
|
+
};
|
|
29984
|
+
// If in configuration active is false, means it is inheriting values from other profile
|
|
29985
|
+
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" })] }));
|
|
29986
|
+
};
|
|
29987
|
+
|
|
29988
|
+
var BuildInfraProfileDescriptionField = function (_a) {
|
|
29989
|
+
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
29990
|
+
var handleChange = function (e) {
|
|
29991
|
+
handleProfileInputChange({
|
|
29992
|
+
action: exports.BuildInfraMetaConfigTypes.DESCRIPTION,
|
|
29993
|
+
data: { value: e.currentTarget.value },
|
|
29994
|
+
});
|
|
29995
|
+
};
|
|
29996
|
+
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] })))] })));
|
|
29997
|
+
};
|
|
29998
|
+
|
|
29999
|
+
var BuildInfraProfileNameField = function (_a) {
|
|
30000
|
+
var handleProfileInputChange = _a.handleProfileInputChange, currentValue = _a.currentValue, error = _a.error;
|
|
30001
|
+
var handleChange = function (e) {
|
|
30002
|
+
handleProfileInputChange({ action: exports.BuildInfraMetaConfigTypes.NAME, data: { value: e.currentTarget.value } });
|
|
30003
|
+
};
|
|
30004
|
+
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" }) })));
|
|
30005
|
+
};
|
|
30006
|
+
|
|
30007
|
+
var InheritingHeader = function (_a) {
|
|
30008
|
+
var defaultHeading = _a.defaultHeading, inheritingData = _a.inheritingData, isInheriting = _a.isInheriting, isDefaultProfile = _a.isDefaultProfile;
|
|
30009
|
+
var inheritingDataString = inheritingData.map(function (data) { var _a; return "".concat(data.value, " ").concat((_a = data.unit) !== null && _a !== void 0 ? _a : ''); }).join(' - ');
|
|
30010
|
+
if (isDefaultProfile || !isInheriting) {
|
|
30011
|
+
// For typing issues
|
|
30012
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
30013
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultHeading });
|
|
30014
|
+
}
|
|
30015
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__align-items-center dc__content-space w-100" }, { children: [defaultHeading, jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space w-100" }, { children: [jsxRuntime.jsx("span", __assign({ className: "m-0 pt-0 pb-0 pl-4 pr-4 fs-13 lh-20 fw-4 cn-9 dc__ellipsis-right dc__word-break-all flex-grow-1" }, { children: inheritingDataString })), jsxRuntime.jsx("p", __assign({ className: "m-0 cn-7 fs-13 fw-4 lh-20 dc__no-shrink" }, { children: BUILD_INFRA_TEXT.INHERITING_HEADING_DESCRIPTION }))] }))] })));
|
|
30016
|
+
};
|
|
30017
|
+
var BuildInfraConfigForm = function (_a) {
|
|
30018
|
+
var profileInput = _a.profileInput, profileInputErrors = _a.profileInputErrors, handleProfileInputChange = _a.handleProfileInputChange, isDefaultProfile = _a.isDefaultProfile, unitsMap = _a.unitsMap, configurationContainerLabel = _a.configurationContainerLabel;
|
|
30019
|
+
var currentConfigurations = profileInput === null || profileInput === void 0 ? void 0 : profileInput.configurations;
|
|
30020
|
+
// will get the desired configuration from the currentConfigurations and then check if it is active or not
|
|
30021
|
+
var isInheritingProfileValues = function (actions) {
|
|
30022
|
+
return actions.some(function (action) { return !currentConfigurations[action.actionType].active; });
|
|
30023
|
+
};
|
|
30024
|
+
// Had to show loader for an instance due to batching of state updates not working as expected :/
|
|
30025
|
+
if (!currentConfigurations) {
|
|
30026
|
+
return jsxRuntime.jsx(Progressing, { pageLoader: true });
|
|
30027
|
+
}
|
|
30028
|
+
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],
|
|
30029
|
+
// Assumption is for default profiles all input fields are required
|
|
30030
|
+
isRequired: true, profileUnitsMap: unitsMap[action.actionType], handleProfileInputChange: handleProfileInputChange, currentUnitName: currentConfigurations[action.actionType].unit, currentValue: currentConfigurations[action.actionType].value }, action.actionType)); }) })) }), field.locator)); }) }))] }))] })));
|
|
30031
|
+
};
|
|
30032
|
+
|
|
30033
|
+
exports.APIResponseHandler = APIResponseHandler;
|
|
28774
30034
|
exports.AddCDButton = AddCDButton;
|
|
28775
30035
|
exports.AppStatus = AppStatus;
|
|
30036
|
+
exports.BUILD_INFRA_BREADCRUMB = BUILD_INFRA_BREADCRUMB;
|
|
30037
|
+
exports.BUILD_INFRA_FORM_FIELDS = BUILD_INFRA_FORM_FIELDS;
|
|
30038
|
+
exports.BUILD_INFRA_INPUT_CONSTRAINTS = BUILD_INFRA_INPUT_CONSTRAINTS;
|
|
30039
|
+
exports.BUILD_INFRA_TEST_IDS = BUILD_INFRA_TEST_IDS;
|
|
30040
|
+
exports.BUILD_INFRA_TEXT = BUILD_INFRA_TEXT;
|
|
30041
|
+
exports.BULK_DROPDOWN_TEST_ID = BULK_DROPDOWN_TEST_ID;
|
|
30042
|
+
exports.BULK_SELECTION_CONTEXT_ERROR = BULK_SELECTION_CONTEXT_ERROR;
|
|
28776
30043
|
exports.BreadCrumb = BreadCrumb;
|
|
28777
30044
|
exports.BreadcrumbStore = Store;
|
|
30045
|
+
exports.BuildInfraConfigActionMap = BuildInfraConfigActionMap;
|
|
30046
|
+
exports.BuildInfraConfigForm = BuildInfraConfigForm;
|
|
30047
|
+
exports.BuildInfraDescriptor = Descriptor;
|
|
30048
|
+
exports.BuildInfraFooter = Footer;
|
|
28778
30049
|
exports.BuildStageVariable = BuildStageVariable;
|
|
30050
|
+
exports.BulkSelection = BulkSelection;
|
|
30051
|
+
exports.BulkSelectionOptionsLabels = BulkSelectionOptionsLabels;
|
|
30052
|
+
exports.BulkSelectionProvider = BulkSelectionProvider;
|
|
28779
30053
|
exports.CDModalTab = CDModalTab;
|
|
30054
|
+
exports.CREATE_MODE_REQUIRED_INPUT_FIELDS = CREATE_MODE_REQUIRED_INPUT_FIELDS;
|
|
30055
|
+
exports.CREATE_PROFILE_BASE_VALUE = CREATE_PROFILE_BASE_VALUE;
|
|
30056
|
+
exports.CREATE_VIEW_CHECKED_CONFIGS = CREATE_VIEW_CHECKED_CONFIGS;
|
|
28780
30057
|
exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
|
|
28781
30058
|
exports.Checkbox = Checkbox$1;
|
|
28782
30059
|
exports.ClearIndicator = ClearIndicator;
|
|
@@ -28785,6 +30062,7 @@ exports.ConditionalWrap = ConditionalWrap;
|
|
|
28785
30062
|
exports.ConfirmationDialog = ConfirmationDialog;
|
|
28786
30063
|
exports.CustomInput = CustomInput;
|
|
28787
30064
|
exports.CustomSelect = CustomSelect;
|
|
30065
|
+
exports.DEFAULT_PROFILE_NAME = DEFAULT_PROFILE_NAME;
|
|
28788
30066
|
exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
|
|
28789
30067
|
exports.DOCUMENTATION = DOCUMENTATION;
|
|
28790
30068
|
exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
|
|
@@ -28818,6 +30096,7 @@ exports.MultiValueRemove = MultiValueRemove;
|
|
|
28818
30096
|
exports.OpaqueModal = OpaqueModal;
|
|
28819
30097
|
exports.Option = Option;
|
|
28820
30098
|
exports.PATTERNS = PATTERNS;
|
|
30099
|
+
exports.PROFILE_INPUT_ERROR_FIELDS = PROFILE_INPUT_ERROR_FIELDS;
|
|
28821
30100
|
exports.Pagination = Pagination;
|
|
28822
30101
|
exports.PopupMenu = PopupMenu;
|
|
28823
30102
|
exports.Progressing = Progressing;
|
|
@@ -28832,8 +30111,10 @@ exports.RepositoryAction = RepositoryAction;
|
|
|
28832
30111
|
exports.ResizableTagTextArea = ResizableTagTextArea;
|
|
28833
30112
|
exports.ResizableTextarea = ResizableTextarea;
|
|
28834
30113
|
exports.SELECTED_APPROVAL_TAB_STATE = SELECTED_APPROVAL_TAB_STATE;
|
|
30114
|
+
exports.SELECT_ALL_ACROSS_PAGES_LOCATOR = SELECT_ALL_ACROSS_PAGES_LOCATOR;
|
|
28835
30115
|
exports.ScanVulnerabilitiesTable = ScanVulnerabilitiesTable;
|
|
28836
30116
|
exports.SearchBar = SearchBar;
|
|
30117
|
+
exports.SelectOption = SelectOption;
|
|
28837
30118
|
exports.ServerError = ServerError;
|
|
28838
30119
|
exports.ServerErrors = ServerErrors;
|
|
28839
30120
|
exports.SingleSelectOption = SingleSelectOption;
|
|
@@ -28853,8 +30134,10 @@ exports.TriggerTypeMap = TriggerTypeMap;
|
|
|
28853
30134
|
exports.URLS = URLS;
|
|
28854
30135
|
exports.VisibleModal = VisibleModal;
|
|
28855
30136
|
exports.VisibleModal2 = VisibleModal2;
|
|
30137
|
+
exports.abortPreviousRequests = abortPreviousRequests;
|
|
28856
30138
|
exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
|
|
28857
30139
|
exports.copyToClipboard = copyToClipboard;
|
|
30140
|
+
exports.createBuildInfraProfile = createBuildInfraProfile;
|
|
28858
30141
|
exports.createGitCommitUrl = createGitCommitUrl;
|
|
28859
30142
|
exports.customStyles = customStyles;
|
|
28860
30143
|
exports.debounce = debounce$2;
|
|
@@ -28863,20 +30146,27 @@ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
|
|
|
28863
30146
|
exports.genericCDMaterialsService = genericCDMaterialsService;
|
|
28864
30147
|
exports.get = get;
|
|
28865
30148
|
exports.getAlphabetIcon = getAlphabetIcon;
|
|
30149
|
+
exports.getBuildInfraProfileByName = getBuildInfraProfileByName;
|
|
30150
|
+
exports.getCommonSelectStyle = getCommonSelectStyle;
|
|
28866
30151
|
exports.getCookie = getCookie;
|
|
30152
|
+
exports.getCustomOptionSelectionStyle = getCustomOptionSelectionStyle;
|
|
28867
30153
|
exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
|
|
28868
30154
|
exports.getFilteredChartVersions = getFilteredChartVersions;
|
|
28869
30155
|
exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
|
|
30156
|
+
exports.getInvalidActionMessage = getInvalidActionMessage;
|
|
30157
|
+
exports.getIsRequestAborted = getIsRequestAborted;
|
|
28870
30158
|
exports.getLockedJSON = getLockedJSON;
|
|
28871
30159
|
exports.getLoginInfo = getLoginInfo;
|
|
28872
30160
|
exports.getRandomColor = getRandomColor;
|
|
28873
30161
|
exports.getRedirectionProps = getRedirectionProps;
|
|
28874
30162
|
exports.getTeamListMin = getTeamListMin;
|
|
30163
|
+
exports.getTransformedBuildInfraProfileResponse = getTransformedBuildInfraProfileResponse;
|
|
28875
30164
|
exports.getUnlockedJSON = getUnlockedJSON;
|
|
28876
30165
|
exports.getUrlWithSearchParams = getUrlWithSearchParams;
|
|
28877
30166
|
exports.getUserRole = getUserRole;
|
|
28878
30167
|
exports.handleAddCD = handleAddCD;
|
|
28879
30168
|
exports.handleUTCTime = handleUTCTime;
|
|
30169
|
+
exports.highlightSearchText = highlightSearchText;
|
|
28880
30170
|
exports.logExceptionToSentry = logExceptionToSentry;
|
|
28881
30171
|
exports.multiSelectStyles = multiSelectStyles;
|
|
28882
30172
|
exports.noop = noop$1;
|
|
@@ -28890,8 +30180,12 @@ exports.sortCallback = sortCallback;
|
|
|
28890
30180
|
exports.stopPropagation = stopPropagation;
|
|
28891
30181
|
exports.toastAccessDenied = toastAccessDenied;
|
|
28892
30182
|
exports.trash = trash;
|
|
30183
|
+
exports.unitSelectorStyles = unitSelectorStyles;
|
|
30184
|
+
exports.updateBuildInfraProfile = updateBuildInfraProfile;
|
|
28893
30185
|
exports.useAsync = useAsync;
|
|
28894
30186
|
exports.useBreadcrumb = useBreadcrumb;
|
|
30187
|
+
exports.useBuildInfraForm = useBuildInfraForm;
|
|
30188
|
+
exports.useBulkSelection = useBulkSelection;
|
|
28895
30189
|
exports.useClickOutside = useClickOutside;
|
|
28896
30190
|
exports.useEffectAfterMount = useEffectAfterMount;
|
|
28897
30191
|
exports.useForm = useForm;
|
|
@@ -28899,3 +30193,8 @@ exports.useSearchString = useSearchString;
|
|
|
28899
30193
|
exports.useSuperAdmin = useSuperAdmin;
|
|
28900
30194
|
exports.useThrottledEffect = useThrottledEffect;
|
|
28901
30195
|
exports.useWindowSize = useWindowSize;
|
|
30196
|
+
exports.validateDescription = validateDescription;
|
|
30197
|
+
exports.validateName = validateName;
|
|
30198
|
+
exports.validateRequestLimit = validateRequestLimit;
|
|
30199
|
+
exports.validateRequiredPositiveInteger = validateRequiredPositiveInteger;
|
|
30200
|
+
exports.validateRequiredPositiveNumber = validateRequiredPositiveNumber;
|