@devtron-labs/devtron-fe-common-lib 0.0.12 → 0.0.13-beta-1
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/Common.service.d.ts +10 -1
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/ImageTags.Types.d.ts +39 -0
- package/dist/Common/ImageTags.d.ts +4 -0
- package/dist/Common/Types.d.ts +32 -24
- package/dist/Common/index.d.ts +2 -0
- package/dist/index.js +554 -110
- package/package.json +1 -1
- package/src/Assets/Icon/ic-arrow-counter-clockwise.svg +5 -0
- package/src/Assets/Icon/ic-enter.svg +3 -0
- package/src/Assets/Icon/ic-error-exclamation.svg +6 -0
- package/src/Assets/Icon/ic-minus.svg +3 -0
- package/src/Assets/Icon/ic-pencil.svg +3 -0
- package/src/Common/Common.service.ts +18 -3
- package/src/Common/Constants.ts +2 -0
- package/src/Common/ImageTags.Types.ts +43 -0
- package/src/Common/ImageTags.tsx +586 -0
- package/src/Common/Types.ts +38 -26
- package/src/Common/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -42,6 +42,8 @@ var URLS = {
|
|
|
42
42
|
};
|
|
43
43
|
var ROUTES = {
|
|
44
44
|
PROJECT_LIST_MIN: 'team/autocomplete',
|
|
45
|
+
USER_CHECK_ROLE: 'user/check/roles',
|
|
46
|
+
IMAGE_TAGGING: 'app/image-tagging',
|
|
45
47
|
};
|
|
46
48
|
exports.KEY_VALUE = void 0;
|
|
47
49
|
(function (KEY_VALUE) {
|
|
@@ -508,15 +510,15 @@ function styleInject(css, ref) {
|
|
|
508
510
|
var css_248z$6 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n height: 40%;\n max-height: 200px;\n width: auto;\n max-width: 250px;\n}\n.empty-state svg {\n height: 40%;\n max-height: 200px;\n width: auto;\n}\n.empty-state h1,\n.empty-state h2,\n.empty-state h3,\n.empty-state h4,\n.empty-state h5,\n.empty-state h6 {\n color: var(--N900);\n}\n.empty-state .subtitle {\n font-size: 13px;\n width: 300px;\n font-weight: 400;\n text-align: center;\n line-height: 1.5;\n margin-bottom: 20px;\n}\n.empty-state .cta {\n height: 36px;\n}\n.empty-state p {\n width: 300px;\n text-align: center;\n font-size: 13px;\n color: var(--N700);\n}\n.empty-state strong {\n font-size: 16px;\n margin-bottom: 4px;\n color: var(--N900);\n font-weight: normal;\n}\n.empty-state .select-popup {\n height: min-content;\n max-height: 250px;\n overflow: auto;\n padding: 8px 0;\n}\n.empty-state .empty-state__loader {\n width: 34px;\n height: 34px;\n margin-bottom: 16px;\n}\n.empty-state .empty-state__loading-text {\n font-size: 12px;\n width: 200px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n text-align: center;\n color: var(--N900);\n}\n.empty-state .button__icon {\n width: 16px;\n height: 16px;\n margin-left: 8px;\n}";
|
|
509
511
|
styleInject(css_248z$6);
|
|
510
512
|
|
|
511
|
-
var _g$
|
|
512
|
-
function _extends$
|
|
513
|
+
var _g$5;
|
|
514
|
+
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); }
|
|
513
515
|
var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
514
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
516
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
515
517
|
xmlns: "http://www.w3.org/2000/svg",
|
|
516
518
|
viewBox: "0 0 24 24",
|
|
517
519
|
width: "1em",
|
|
518
520
|
height: "1em"
|
|
519
|
-
}, props), _g$
|
|
521
|
+
}, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
520
522
|
fill: "none"
|
|
521
523
|
}, /*#__PURE__*/React__namespace.createElement("animateTransform", {
|
|
522
524
|
attributeName: "transform",
|
|
@@ -563,8 +565,8 @@ EmptyState.Loading = Loading;
|
|
|
563
565
|
|
|
564
566
|
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}
|
|
565
567
|
|
|
566
|
-
function _extends$
|
|
567
|
-
_extends$
|
|
568
|
+
function _extends$h() {
|
|
569
|
+
_extends$h = Object.assign || function (target) {
|
|
568
570
|
for (var i = 1; i < arguments.length; i++) {
|
|
569
571
|
var source = arguments[i];
|
|
570
572
|
|
|
@@ -578,7 +580,7 @@ function _extends$b() {
|
|
|
578
580
|
return target;
|
|
579
581
|
};
|
|
580
582
|
|
|
581
|
-
return _extends$
|
|
583
|
+
return _extends$h.apply(this, arguments);
|
|
582
584
|
}
|
|
583
585
|
|
|
584
586
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
@@ -1304,7 +1306,7 @@ function ProgressBar(_ref) {
|
|
|
1304
1306
|
isIn = _ref.isIn,
|
|
1305
1307
|
theme = _ref.theme;
|
|
1306
1308
|
|
|
1307
|
-
var style = _extends$
|
|
1309
|
+
var style = _extends$h({}, userStyle, {
|
|
1308
1310
|
animationDuration: delay + "ms",
|
|
1309
1311
|
animationPlayState: isRunning ? 'running' : 'paused',
|
|
1310
1312
|
opacity: hide ? 0 : 1
|
|
@@ -1581,9 +1583,9 @@ var ToastContainer = function ToastContainer(props) {
|
|
|
1581
1583
|
,
|
|
1582
1584
|
id: containerId
|
|
1583
1585
|
}, getToastToRender(function (position, toastList) {
|
|
1584
|
-
var containerStyle = !toastList.length ? _extends$
|
|
1586
|
+
var containerStyle = !toastList.length ? _extends$h({}, style, {
|
|
1585
1587
|
pointerEvents: 'none'
|
|
1586
|
-
}) : _extends$
|
|
1588
|
+
}) : _extends$h({}, style);
|
|
1587
1589
|
return React.createElement("div", {
|
|
1588
1590
|
className: getClassName(position),
|
|
1589
1591
|
style: containerStyle,
|
|
@@ -1690,7 +1692,7 @@ function dispatchToast(content, options) {
|
|
|
1690
1692
|
|
|
1691
1693
|
|
|
1692
1694
|
function mergeOptions(type, options) {
|
|
1693
|
-
return _extends$
|
|
1695
|
+
return _extends$h({}, options, {
|
|
1694
1696
|
type: options && options.type || type,
|
|
1695
1697
|
toastId: getToastId(options)
|
|
1696
1698
|
});
|
|
@@ -1707,7 +1709,7 @@ function toast(content, options) {
|
|
|
1707
1709
|
}
|
|
1708
1710
|
|
|
1709
1711
|
toast.loading = function (content, options) {
|
|
1710
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
1712
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$h({
|
|
1711
1713
|
isLoading: true,
|
|
1712
1714
|
autoClose: false,
|
|
1713
1715
|
closeOnClick: false,
|
|
@@ -1723,7 +1725,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1723
1725
|
var id;
|
|
1724
1726
|
|
|
1725
1727
|
if (pending) {
|
|
1726
|
-
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$
|
|
1728
|
+
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$h({}, options, pending));
|
|
1727
1729
|
}
|
|
1728
1730
|
|
|
1729
1731
|
var resetParams = {
|
|
@@ -1742,7 +1744,7 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1742
1744
|
return;
|
|
1743
1745
|
}
|
|
1744
1746
|
|
|
1745
|
-
var baseParams = _extends$
|
|
1747
|
+
var baseParams = _extends$h({
|
|
1746
1748
|
type: type
|
|
1747
1749
|
}, resetParams, options, {
|
|
1748
1750
|
data: result
|
|
@@ -1753,10 +1755,10 @@ function handlePromise(promise, _ref2, options) {
|
|
|
1753
1755
|
} : input; // if the id is set we know that it's an update
|
|
1754
1756
|
|
|
1755
1757
|
if (id) {
|
|
1756
|
-
toast.update(id, _extends$
|
|
1758
|
+
toast.update(id, _extends$h({}, baseParams, params));
|
|
1757
1759
|
} else {
|
|
1758
1760
|
// using toast.promise without loading
|
|
1759
|
-
toast(params.render, _extends$
|
|
1761
|
+
toast(params.render, _extends$h({}, baseParams, params));
|
|
1760
1762
|
}
|
|
1761
1763
|
|
|
1762
1764
|
return result;
|
|
@@ -1780,7 +1782,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
|
|
|
1780
1782
|
toast.warn = toast.warning;
|
|
1781
1783
|
|
|
1782
1784
|
toast.dark = function (content, options) {
|
|
1783
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$
|
|
1785
|
+
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$h({
|
|
1784
1786
|
theme: 'dark'
|
|
1785
1787
|
}, options)));
|
|
1786
1788
|
};
|
|
@@ -1837,7 +1839,7 @@ toast.update = function (toastId, options) {
|
|
|
1837
1839
|
var oldOptions = toast.props,
|
|
1838
1840
|
oldContent = toast.content;
|
|
1839
1841
|
|
|
1840
|
-
var nextOptions = _extends$
|
|
1842
|
+
var nextOptions = _extends$h({}, oldOptions, options, {
|
|
1841
1843
|
toastId: options.toastId || toastId,
|
|
1842
1844
|
updateId: generateToastId()
|
|
1843
1845
|
});
|
|
@@ -3932,15 +3934,15 @@ function captureException(exception, captureContext) {
|
|
|
3932
3934
|
return getCurrentHub().captureException(exception, { captureContext });
|
|
3933
3935
|
}
|
|
3934
3936
|
|
|
3935
|
-
var _g$
|
|
3936
|
-
function _extends$
|
|
3937
|
+
var _g$4;
|
|
3938
|
+
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); }
|
|
3937
3939
|
var SvgIcWarning = function SvgIcWarning(props) {
|
|
3938
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3940
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
3939
3941
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3940
3942
|
width: "1em",
|
|
3941
3943
|
height: "1em",
|
|
3942
3944
|
viewBox: "0 0 32 32"
|
|
3943
|
-
}, props), _g$
|
|
3945
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
3944
3946
|
fill: "none",
|
|
3945
3947
|
fillRule: "evenodd"
|
|
3946
3948
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10033,16 +10035,16 @@ var Modal = function (_a) {
|
|
|
10033
10035
|
}, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
|
|
10034
10036
|
};
|
|
10035
10037
|
|
|
10036
|
-
var _path$
|
|
10037
|
-
function _extends$
|
|
10038
|
+
var _path$a;
|
|
10039
|
+
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); }
|
|
10038
10040
|
var SvgIcCross = function SvgIcCross(props) {
|
|
10039
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10041
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
10040
10042
|
width: "1em",
|
|
10041
10043
|
height: "1em",
|
|
10042
10044
|
viewBox: "0 0 24 24",
|
|
10043
10045
|
fill: "none",
|
|
10044
10046
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10045
|
-
}, props), _path$
|
|
10047
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10046
10048
|
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",
|
|
10047
10049
|
fill: "#596168"
|
|
10048
10050
|
})));
|
|
@@ -14341,30 +14343,30 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
14341
14343
|
|
|
14342
14344
|
var Tippy = index;
|
|
14343
14345
|
|
|
14344
|
-
var _path$
|
|
14345
|
-
function _extends$
|
|
14346
|
+
var _path$9;
|
|
14347
|
+
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); }
|
|
14346
14348
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
14347
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14349
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
14348
14350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14349
14351
|
width: "1em",
|
|
14350
14352
|
height: "1em",
|
|
14351
14353
|
viewBox: "0 0 24 24"
|
|
14352
|
-
}, props), _path$
|
|
14354
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14353
14355
|
fill: "#767D84",
|
|
14354
14356
|
fillRule: "evenodd",
|
|
14355
14357
|
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"
|
|
14356
14358
|
})));
|
|
14357
14359
|
};
|
|
14358
14360
|
|
|
14359
|
-
var _path$
|
|
14360
|
-
function _extends$
|
|
14361
|
+
var _path$8;
|
|
14362
|
+
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); }
|
|
14361
14363
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
14362
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14364
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
14363
14365
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14364
14366
|
viewBox: "0 0 17 16",
|
|
14365
14367
|
width: "1em",
|
|
14366
14368
|
height: "1em"
|
|
14367
|
-
}, props), _path$
|
|
14369
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14368
14370
|
fill: "#767D84",
|
|
14369
14371
|
fillRule: "evenodd",
|
|
14370
14372
|
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"
|
|
@@ -14415,16 +14417,16 @@ function TippyCustomized(props) {
|
|
|
14415
14417
|
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 })));
|
|
14416
14418
|
}
|
|
14417
14419
|
|
|
14418
|
-
var _path$
|
|
14419
|
-
function _extends$
|
|
14420
|
+
var _path$7, _circle, _path2$1;
|
|
14421
|
+
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); }
|
|
14420
14422
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
14421
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14423
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
14422
14424
|
width: "1em",
|
|
14423
14425
|
height: "1em",
|
|
14424
14426
|
viewBox: "0 0 20 20",
|
|
14425
14427
|
fill: "none",
|
|
14426
14428
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14427
|
-
}, props), _path$
|
|
14429
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14428
14430
|
d: "M10 10H3.333",
|
|
14429
14431
|
stroke: "#596168",
|
|
14430
14432
|
strokeWidth: 1.5,
|
|
@@ -14435,7 +14437,7 @@ var SvgInjectTag = function SvgInjectTag(props) {
|
|
|
14435
14437
|
cy: 10,
|
|
14436
14438
|
r: 1.667,
|
|
14437
14439
|
fill: "#596168"
|
|
14438
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14440
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14439
14441
|
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",
|
|
14440
14442
|
stroke: "#596168",
|
|
14441
14443
|
strokeWidth: 1.5,
|
|
@@ -14452,15 +14454,15 @@ function PropagateTagInfo(_a) {
|
|
|
14452
14454
|
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" })] })) })));
|
|
14453
14455
|
}
|
|
14454
14456
|
|
|
14455
|
-
var _path$
|
|
14456
|
-
function _extends$
|
|
14457
|
+
var _path$6;
|
|
14458
|
+
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); }
|
|
14457
14459
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
14458
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14460
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
14459
14461
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14460
14462
|
width: "1em",
|
|
14461
14463
|
height: "1em",
|
|
14462
14464
|
viewBox: "0 0 20 20"
|
|
14463
|
-
}, props), _path$
|
|
14465
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14464
14466
|
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",
|
|
14465
14467
|
fill: "#06C",
|
|
14466
14468
|
fillRule: "evenodd"
|
|
@@ -14688,15 +14690,15 @@ var TagDetails = function (_a) {
|
|
|
14688
14690
|
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" }) }))] })));
|
|
14689
14691
|
};
|
|
14690
14692
|
|
|
14691
|
-
var _path$
|
|
14692
|
-
function _extends$
|
|
14693
|
+
var _path$5;
|
|
14694
|
+
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); }
|
|
14693
14695
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
14694
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14696
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
14695
14697
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14696
14698
|
width: "1em",
|
|
14697
14699
|
height: "1em",
|
|
14698
14700
|
viewBox: "0 0 24 24"
|
|
14699
|
-
}, props), _path$
|
|
14701
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14700
14702
|
className: "ic-add_svg__fill-color",
|
|
14701
14703
|
fill: "#999",
|
|
14702
14704
|
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"
|
|
@@ -14814,8 +14816,8 @@ function ForceDeleteDialog(_a) {
|
|
|
14814
14816
|
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?" })] }) })) }));
|
|
14815
14817
|
}
|
|
14816
14818
|
|
|
14817
|
-
function _extends$
|
|
14818
|
-
_extends$
|
|
14819
|
+
function _extends$9() {
|
|
14820
|
+
_extends$9 = Object.assign ? Object.assign.bind() : function (target) {
|
|
14819
14821
|
for (var i = 1; i < arguments.length; i++) {
|
|
14820
14822
|
var source = arguments[i];
|
|
14821
14823
|
for (var key in source) {
|
|
@@ -14826,7 +14828,7 @@ function _extends$3() {
|
|
|
14826
14828
|
}
|
|
14827
14829
|
return target;
|
|
14828
14830
|
};
|
|
14829
|
-
return _extends$
|
|
14831
|
+
return _extends$9.apply(this, arguments);
|
|
14830
14832
|
}
|
|
14831
14833
|
|
|
14832
14834
|
/*
|
|
@@ -18367,7 +18369,7 @@ var Menu = function Menu(props) {
|
|
|
18367
18369
|
getStyles = props.getStyles,
|
|
18368
18370
|
innerRef = props.innerRef,
|
|
18369
18371
|
innerProps = props.innerProps;
|
|
18370
|
-
return jsx("div", _extends$
|
|
18372
|
+
return jsx("div", _extends$9({
|
|
18371
18373
|
css: getStyles('menu', props),
|
|
18372
18374
|
className: cx({
|
|
18373
18375
|
menu: true
|
|
@@ -18399,7 +18401,7 @@ var MenuList = function MenuList(props) {
|
|
|
18399
18401
|
innerProps = props.innerProps,
|
|
18400
18402
|
innerRef = props.innerRef,
|
|
18401
18403
|
isMulti = props.isMulti;
|
|
18402
|
-
return jsx("div", _extends$
|
|
18404
|
+
return jsx("div", _extends$9({
|
|
18403
18405
|
css: getStyles('menuList', props),
|
|
18404
18406
|
className: cx({
|
|
18405
18407
|
'menu-list': true,
|
|
@@ -18430,7 +18432,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
18430
18432
|
cx = props.cx,
|
|
18431
18433
|
getStyles = props.getStyles,
|
|
18432
18434
|
innerProps = props.innerProps;
|
|
18433
|
-
return jsx("div", _extends$
|
|
18435
|
+
return jsx("div", _extends$9({
|
|
18434
18436
|
css: getStyles('noOptionsMessage', props),
|
|
18435
18437
|
className: cx({
|
|
18436
18438
|
'menu-notice': true,
|
|
@@ -18447,7 +18449,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
18447
18449
|
cx = props.cx,
|
|
18448
18450
|
getStyles = props.getStyles,
|
|
18449
18451
|
innerProps = props.innerProps;
|
|
18450
|
-
return jsx("div", _extends$
|
|
18452
|
+
return jsx("div", _extends$9({
|
|
18451
18453
|
css: getStyles('loadingMessage', props),
|
|
18452
18454
|
className: cx({
|
|
18453
18455
|
'menu-notice': true,
|
|
@@ -18535,7 +18537,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
18535
18537
|
rect: rect
|
|
18536
18538
|
}; // same wrapper element whether fixed or portalled
|
|
18537
18539
|
|
|
18538
|
-
var menuWrapper = jsx("div", _extends$
|
|
18540
|
+
var menuWrapper = jsx("div", _extends$9({
|
|
18539
18541
|
css: getStyles('menuPortal', state),
|
|
18540
18542
|
className: cx({
|
|
18541
18543
|
'menu-portal': true
|
|
@@ -18571,7 +18573,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
18571
18573
|
innerProps = props.innerProps,
|
|
18572
18574
|
isDisabled = props.isDisabled,
|
|
18573
18575
|
isRtl = props.isRtl;
|
|
18574
|
-
return jsx("div", _extends$
|
|
18576
|
+
return jsx("div", _extends$9({
|
|
18575
18577
|
css: getStyles('container', props),
|
|
18576
18578
|
className: cx({
|
|
18577
18579
|
'--is-disabled': isDisabled,
|
|
@@ -18606,7 +18608,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
18606
18608
|
isMulti = props.isMulti,
|
|
18607
18609
|
getStyles = props.getStyles,
|
|
18608
18610
|
hasValue = props.hasValue;
|
|
18609
|
-
return jsx("div", _extends$
|
|
18611
|
+
return jsx("div", _extends$9({
|
|
18610
18612
|
css: getStyles('valueContainer', props),
|
|
18611
18613
|
className: cx({
|
|
18612
18614
|
'value-container': true,
|
|
@@ -18632,7 +18634,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
18632
18634
|
cx = props.cx,
|
|
18633
18635
|
innerProps = props.innerProps,
|
|
18634
18636
|
getStyles = props.getStyles;
|
|
18635
|
-
return jsx("div", _extends$
|
|
18637
|
+
return jsx("div", _extends$9({
|
|
18636
18638
|
css: getStyles('indicatorsContainer', props),
|
|
18637
18639
|
className: cx({
|
|
18638
18640
|
indicators: true
|
|
@@ -18663,7 +18665,7 @@ var Svg = function Svg(_ref) {
|
|
|
18663
18665
|
var size = _ref.size,
|
|
18664
18666
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
18665
18667
|
|
|
18666
|
-
return jsx("svg", _extends$
|
|
18668
|
+
return jsx("svg", _extends$9({
|
|
18667
18669
|
height: size,
|
|
18668
18670
|
width: size,
|
|
18669
18671
|
viewBox: "0 0 20 20",
|
|
@@ -18674,14 +18676,14 @@ var Svg = function Svg(_ref) {
|
|
|
18674
18676
|
};
|
|
18675
18677
|
|
|
18676
18678
|
var CrossIcon = function CrossIcon(props) {
|
|
18677
|
-
return jsx(Svg, _extends$
|
|
18679
|
+
return jsx(Svg, _extends$9({
|
|
18678
18680
|
size: 20
|
|
18679
18681
|
}, props), jsx("path", {
|
|
18680
18682
|
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"
|
|
18681
18683
|
}));
|
|
18682
18684
|
};
|
|
18683
18685
|
var DownChevron = function DownChevron(props) {
|
|
18684
|
-
return jsx(Svg, _extends$
|
|
18686
|
+
return jsx(Svg, _extends$9({
|
|
18685
18687
|
size: 20
|
|
18686
18688
|
}, props), jsx("path", {
|
|
18687
18689
|
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"
|
|
@@ -18714,7 +18716,7 @@ var DropdownIndicator = function DropdownIndicator(props) {
|
|
|
18714
18716
|
cx = props.cx,
|
|
18715
18717
|
getStyles = props.getStyles,
|
|
18716
18718
|
innerProps = props.innerProps;
|
|
18717
|
-
return jsx("div", _extends$
|
|
18719
|
+
return jsx("div", _extends$9({
|
|
18718
18720
|
css: getStyles('dropdownIndicator', props),
|
|
18719
18721
|
className: cx({
|
|
18720
18722
|
indicator: true,
|
|
@@ -18729,7 +18731,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
18729
18731
|
cx = props.cx,
|
|
18730
18732
|
getStyles = props.getStyles,
|
|
18731
18733
|
innerProps = props.innerProps;
|
|
18732
|
-
return jsx("div", _extends$
|
|
18734
|
+
return jsx("div", _extends$9({
|
|
18733
18735
|
css: getStyles('clearIndicator', props),
|
|
18734
18736
|
className: cx({
|
|
18735
18737
|
indicator: true,
|
|
@@ -18759,7 +18761,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
18759
18761
|
cx = props.cx,
|
|
18760
18762
|
getStyles = props.getStyles,
|
|
18761
18763
|
innerProps = props.innerProps;
|
|
18762
|
-
return jsx("span", _extends$
|
|
18764
|
+
return jsx("span", _extends$9({}, innerProps, {
|
|
18763
18765
|
css: getStyles('indicatorSeparator', props),
|
|
18764
18766
|
className: cx({
|
|
18765
18767
|
'indicator-separator': true
|
|
@@ -18814,7 +18816,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
18814
18816
|
getStyles = props.getStyles,
|
|
18815
18817
|
innerProps = props.innerProps,
|
|
18816
18818
|
isRtl = props.isRtl;
|
|
18817
|
-
return jsx("div", _extends$
|
|
18819
|
+
return jsx("div", _extends$9({
|
|
18818
18820
|
css: getStyles('loadingIndicator', props),
|
|
18819
18821
|
className: cx({
|
|
18820
18822
|
indicator: true,
|
|
@@ -18875,7 +18877,7 @@ var Control = function Control(props) {
|
|
|
18875
18877
|
innerRef = props.innerRef,
|
|
18876
18878
|
innerProps = props.innerProps,
|
|
18877
18879
|
menuIsOpen = props.menuIsOpen;
|
|
18878
|
-
return jsx("div", _extends$
|
|
18880
|
+
return jsx("div", _extends$9({
|
|
18879
18881
|
ref: innerRef,
|
|
18880
18882
|
css: getStyles('control', props),
|
|
18881
18883
|
className: cx({
|
|
@@ -18907,12 +18909,12 @@ var Group = function Group(props) {
|
|
|
18907
18909
|
label = props.label,
|
|
18908
18910
|
theme = props.theme,
|
|
18909
18911
|
selectProps = props.selectProps;
|
|
18910
|
-
return jsx("div", _extends$
|
|
18912
|
+
return jsx("div", _extends$9({
|
|
18911
18913
|
css: getStyles('group', props),
|
|
18912
18914
|
className: cx({
|
|
18913
18915
|
group: true
|
|
18914
18916
|
}, className)
|
|
18915
|
-
}, innerProps), jsx(Heading, _extends$
|
|
18917
|
+
}, innerProps), jsx(Heading, _extends$9({}, headingProps, {
|
|
18916
18918
|
selectProps: selectProps,
|
|
18917
18919
|
theme: theme,
|
|
18918
18920
|
getStyles: getStyles,
|
|
@@ -18944,7 +18946,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
18944
18946
|
_cleanCommonProps.data;
|
|
18945
18947
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
18946
18948
|
|
|
18947
|
-
return jsx("div", _extends$
|
|
18949
|
+
return jsx("div", _extends$9({
|
|
18948
18950
|
css: getStyles('groupHeading', props),
|
|
18949
18951
|
className: cx({
|
|
18950
18952
|
'group-heading': true
|
|
@@ -19020,7 +19022,7 @@ var Input = function Input(props) {
|
|
|
19020
19022
|
}, className),
|
|
19021
19023
|
css: getStyles('input', props),
|
|
19022
19024
|
"data-value": value || ''
|
|
19023
|
-
}, jsx("input", _extends$
|
|
19025
|
+
}, jsx("input", _extends$9({
|
|
19024
19026
|
className: cx({
|
|
19025
19027
|
input: true
|
|
19026
19028
|
}, inputClassName),
|
|
@@ -19090,7 +19092,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
19090
19092
|
function MultiValueRemove$1(_ref5) {
|
|
19091
19093
|
var children = _ref5.children,
|
|
19092
19094
|
innerProps = _ref5.innerProps;
|
|
19093
|
-
return jsx("div", _extends$
|
|
19095
|
+
return jsx("div", _extends$9({
|
|
19094
19096
|
role: "button"
|
|
19095
19097
|
}, innerProps), children || jsx(CrossIcon, {
|
|
19096
19098
|
size: 14
|
|
@@ -19179,7 +19181,7 @@ var Option$1 = function Option(props) {
|
|
|
19179
19181
|
isSelected = props.isSelected,
|
|
19180
19182
|
innerRef = props.innerRef,
|
|
19181
19183
|
innerProps = props.innerProps;
|
|
19182
|
-
return jsx("div", _extends$
|
|
19184
|
+
return jsx("div", _extends$9({
|
|
19183
19185
|
css: getStyles('option', props),
|
|
19184
19186
|
className: cx({
|
|
19185
19187
|
option: true,
|
|
@@ -19211,7 +19213,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
19211
19213
|
cx = props.cx,
|
|
19212
19214
|
getStyles = props.getStyles,
|
|
19213
19215
|
innerProps = props.innerProps;
|
|
19214
|
-
return jsx("div", _extends$
|
|
19216
|
+
return jsx("div", _extends$9({
|
|
19215
19217
|
css: getStyles('placeholder', props),
|
|
19216
19218
|
className: cx({
|
|
19217
19219
|
placeholder: true
|
|
@@ -19244,7 +19246,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
19244
19246
|
getStyles = props.getStyles,
|
|
19245
19247
|
isDisabled = props.isDisabled,
|
|
19246
19248
|
innerProps = props.innerProps;
|
|
19247
|
-
return jsx("div", _extends$
|
|
19249
|
+
return jsx("div", _extends$9({
|
|
19248
19250
|
css: getStyles('singleValue', props),
|
|
19249
19251
|
className: cx({
|
|
19250
19252
|
'single-value': true,
|
|
@@ -19492,7 +19494,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
19492
19494
|
};
|
|
19493
19495
|
|
|
19494
19496
|
var A11yText = function A11yText(props) {
|
|
19495
|
-
return jsx("span", _extends$
|
|
19497
|
+
return jsx("span", _extends$9({
|
|
19496
19498
|
css: _ref
|
|
19497
19499
|
}, props));
|
|
19498
19500
|
};
|
|
@@ -20028,7 +20030,7 @@ function DummyInput(_ref) {
|
|
|
20028
20030
|
var innerRef = _ref.innerRef,
|
|
20029
20031
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20030
20032
|
|
|
20031
|
-
return jsx("input", _extends$
|
|
20033
|
+
return jsx("input", _extends$9({
|
|
20032
20034
|
ref: innerRef
|
|
20033
20035
|
}, props, {
|
|
20034
20036
|
css: /*#__PURE__*/css$2({
|
|
@@ -21663,7 +21665,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21663
21665
|
|
|
21664
21666
|
if (!isSearchable) {
|
|
21665
21667
|
// use a dummy input to maintain focus/blur functionality
|
|
21666
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
21668
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$9({
|
|
21667
21669
|
id: id,
|
|
21668
21670
|
innerRef: this.getInputRef,
|
|
21669
21671
|
onBlur: this.onInputBlur,
|
|
@@ -21677,7 +21679,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21677
21679
|
}, ariaAttributes));
|
|
21678
21680
|
}
|
|
21679
21681
|
|
|
21680
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
21682
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$9({}, commonProps, {
|
|
21681
21683
|
autoCapitalize: "none",
|
|
21682
21684
|
autoComplete: "off",
|
|
21683
21685
|
autoCorrect: "off",
|
|
@@ -21721,7 +21723,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21721
21723
|
isFocused = _this$state5.isFocused;
|
|
21722
21724
|
|
|
21723
21725
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
21724
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
21726
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$9({}, commonProps, {
|
|
21725
21727
|
key: "placeholder",
|
|
21726
21728
|
isDisabled: isDisabled,
|
|
21727
21729
|
isFocused: isFocused,
|
|
@@ -21735,7 +21737,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21735
21737
|
return selectValue.map(function (opt, index) {
|
|
21736
21738
|
var isOptionFocused = opt === focusedValue;
|
|
21737
21739
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
21738
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
21740
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$9({}, commonProps, {
|
|
21739
21741
|
components: {
|
|
21740
21742
|
Container: MultiValueContainer,
|
|
21741
21743
|
Label: MultiValueLabel,
|
|
@@ -21767,7 +21769,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21767
21769
|
}
|
|
21768
21770
|
|
|
21769
21771
|
var singleValue = selectValue[0];
|
|
21770
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
21772
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$9({}, commonProps, {
|
|
21771
21773
|
data: singleValue,
|
|
21772
21774
|
isDisabled: isDisabled
|
|
21773
21775
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -21793,7 +21795,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21793
21795
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
21794
21796
|
'aria-hidden': 'true'
|
|
21795
21797
|
};
|
|
21796
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
21798
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$9({}, commonProps, {
|
|
21797
21799
|
innerProps: innerProps,
|
|
21798
21800
|
isFocused: isFocused
|
|
21799
21801
|
}));
|
|
@@ -21813,7 +21815,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21813
21815
|
var innerProps = {
|
|
21814
21816
|
'aria-hidden': 'true'
|
|
21815
21817
|
};
|
|
21816
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
21818
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$9({}, commonProps, {
|
|
21817
21819
|
innerProps: innerProps,
|
|
21818
21820
|
isDisabled: isDisabled,
|
|
21819
21821
|
isFocused: isFocused
|
|
@@ -21831,7 +21833,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21831
21833
|
var commonProps = this.commonProps;
|
|
21832
21834
|
var isDisabled = this.props.isDisabled;
|
|
21833
21835
|
var isFocused = this.state.isFocused;
|
|
21834
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
21836
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$9({}, commonProps, {
|
|
21835
21837
|
isDisabled: isDisabled,
|
|
21836
21838
|
isFocused: isFocused
|
|
21837
21839
|
}));
|
|
@@ -21851,7 +21853,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21851
21853
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
21852
21854
|
'aria-hidden': 'true'
|
|
21853
21855
|
};
|
|
21854
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
21856
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$9({}, commonProps, {
|
|
21855
21857
|
innerProps: innerProps,
|
|
21856
21858
|
isDisabled: isDisabled,
|
|
21857
21859
|
isFocused: isFocused
|
|
@@ -21914,7 +21916,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21914
21916
|
onMouseOver: onHover,
|
|
21915
21917
|
tabIndex: -1
|
|
21916
21918
|
};
|
|
21917
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
21919
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$9({}, commonProps, {
|
|
21918
21920
|
innerProps: innerProps,
|
|
21919
21921
|
data: data,
|
|
21920
21922
|
isDisabled: isDisabled,
|
|
@@ -21938,7 +21940,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21938
21940
|
groupIndex = item.index;
|
|
21939
21941
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
21940
21942
|
var headingId = "".concat(groupId, "-heading");
|
|
21941
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
21943
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$9({}, commonProps, {
|
|
21942
21944
|
key: groupId,
|
|
21943
21945
|
data: _data,
|
|
21944
21946
|
options: options,
|
|
@@ -21977,12 +21979,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21977
21979
|
menuPosition: menuPosition,
|
|
21978
21980
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
21979
21981
|
};
|
|
21980
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
21982
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$9({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
21981
21983
|
var ref = _ref4.ref,
|
|
21982
21984
|
_ref4$placerProps = _ref4.placerProps,
|
|
21983
21985
|
placement = _ref4$placerProps.placement,
|
|
21984
21986
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
21985
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
21987
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$9({}, commonProps, menuPlacementProps, {
|
|
21986
21988
|
innerRef: ref,
|
|
21987
21989
|
innerProps: {
|
|
21988
21990
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -21997,7 +21999,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
21997
21999
|
onBottomArrive: onMenuScrollToBottom,
|
|
21998
22000
|
lockEnabled: menuShouldBlockScroll
|
|
21999
22001
|
}, function (scrollTargetRef) {
|
|
22000
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
22002
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$9({}, commonProps, {
|
|
22001
22003
|
innerRef: function innerRef(instance) {
|
|
22002
22004
|
_this4.getMenuListRef(instance);
|
|
22003
22005
|
|
|
@@ -22012,7 +22014,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22012
22014
|
// so we use the same component. the actual portalling logic is forked
|
|
22013
22015
|
// within the component based on `menuPosition`
|
|
22014
22016
|
|
|
22015
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
22017
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$9({}, commonProps, {
|
|
22016
22018
|
appendTo: menuPortalTarget,
|
|
22017
22019
|
controlElement: this.controlRef,
|
|
22018
22020
|
menuPlacement: menuPlacement,
|
|
@@ -22077,7 +22079,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22077
22079
|
isFocused = _this$state6.isFocused,
|
|
22078
22080
|
selectValue = _this$state6.selectValue;
|
|
22079
22081
|
var focusableOptions = this.getFocusableOptions();
|
|
22080
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
22082
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$9({}, commonProps, {
|
|
22081
22083
|
id: this.getElementId('live-region'),
|
|
22082
22084
|
ariaSelection: ariaSelection,
|
|
22083
22085
|
focusedOption: focusedOption,
|
|
@@ -22103,7 +22105,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22103
22105
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
22104
22106
|
var isFocused = this.state.isFocused;
|
|
22105
22107
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
22106
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
22108
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$9({}, commonProps, {
|
|
22107
22109
|
className: className,
|
|
22108
22110
|
innerProps: {
|
|
22109
22111
|
id: id,
|
|
@@ -22111,7 +22113,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22111
22113
|
},
|
|
22112
22114
|
isDisabled: isDisabled,
|
|
22113
22115
|
isFocused: isFocused
|
|
22114
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
22116
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$9({}, commonProps, {
|
|
22115
22117
|
innerRef: this.getControlRef,
|
|
22116
22118
|
innerProps: {
|
|
22117
22119
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -22120,9 +22122,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22120
22122
|
isDisabled: isDisabled,
|
|
22121
22123
|
isFocused: isFocused,
|
|
22122
22124
|
menuIsOpen: menuIsOpen
|
|
22123
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
22125
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$9({}, commonProps, {
|
|
22124
22126
|
isDisabled: isDisabled
|
|
22125
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
22127
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$9({}, commonProps, {
|
|
22126
22128
|
isDisabled: isDisabled
|
|
22127
22129
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
22128
22130
|
}
|
|
@@ -22195,22 +22197,22 @@ Select$1.defaultProps = defaultProps;
|
|
|
22195
22197
|
|
|
22196
22198
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22197
22199
|
var baseSelectProps = useStateManager(props);
|
|
22198
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
22200
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$9({
|
|
22199
22201
|
ref: ref
|
|
22200
22202
|
}, baseSelectProps));
|
|
22201
22203
|
});
|
|
22202
22204
|
|
|
22203
22205
|
var Select = StateManagedSelect;
|
|
22204
22206
|
|
|
22205
|
-
var _g$
|
|
22206
|
-
function _extends$
|
|
22207
|
+
var _g$3;
|
|
22208
|
+
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); }
|
|
22207
22209
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
22208
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22210
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
22209
22211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22210
22212
|
viewBox: "0 0 28 28",
|
|
22211
22213
|
width: "1em",
|
|
22212
22214
|
height: "1em"
|
|
22213
|
-
}, props), _g$
|
|
22215
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22214
22216
|
fill: "none",
|
|
22215
22217
|
fillRule: "evenodd",
|
|
22216
22218
|
transform: "translate(2 2)"
|
|
@@ -22226,15 +22228,15 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
22226
22228
|
}))));
|
|
22227
22229
|
};
|
|
22228
22230
|
|
|
22229
|
-
var _path;
|
|
22230
|
-
function _extends$
|
|
22231
|
+
var _path$4;
|
|
22232
|
+
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); }
|
|
22231
22233
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
22232
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22234
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
22233
22235
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22234
22236
|
width: "1em",
|
|
22235
22237
|
height: "1em",
|
|
22236
22238
|
viewBox: "0 0 24 24"
|
|
22237
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22239
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22238
22240
|
stroke: "#06C",
|
|
22239
22241
|
strokeLinecap: "round",
|
|
22240
22242
|
strokeLinejoin: "round",
|
|
@@ -22245,15 +22247,15 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
22245
22247
|
})));
|
|
22246
22248
|
};
|
|
22247
22249
|
|
|
22248
|
-
var _g;
|
|
22249
|
-
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); }
|
|
22250
|
+
var _g$2;
|
|
22251
|
+
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); }
|
|
22250
22252
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
22251
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
22253
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
22252
22254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22253
22255
|
width: "1em",
|
|
22254
22256
|
height: "1em",
|
|
22255
22257
|
viewBox: "0 0 20 21"
|
|
22256
|
-
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22258
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22257
22259
|
fill: "none",
|
|
22258
22260
|
fillRule: "evenodd"
|
|
22259
22261
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -22350,7 +22352,13 @@ var getTeamListMin = function () {
|
|
|
22350
22352
|
result: list,
|
|
22351
22353
|
};
|
|
22352
22354
|
});
|
|
22353
|
-
};
|
|
22355
|
+
};
|
|
22356
|
+
function getUserRole(appName) {
|
|
22357
|
+
return get("".concat(ROUTES.USER_CHECK_ROLE).concat(appName ? "?appName=".concat(appName) : ''));
|
|
22358
|
+
}
|
|
22359
|
+
function setImageTags(request, pipelineId, artifactId) {
|
|
22360
|
+
return post("".concat(ROUTES.IMAGE_TAGGING, "/").concat(pipelineId, "/").concat(artifactId), request);
|
|
22361
|
+
}
|
|
22354
22362
|
|
|
22355
22363
|
/*
|
|
22356
22364
|
Valid States of Checkbox:
|
|
@@ -22509,6 +22517,27 @@ exports.ConsequenceAction = void 0;
|
|
|
22509
22517
|
ConsequenceAction["ALLOW_FOREVER"] = "ALLOW_FOREVER";
|
|
22510
22518
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
22511
22519
|
|
|
22520
|
+
var _g$1;
|
|
22521
|
+
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); }
|
|
22522
|
+
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
22523
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
22524
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22525
|
+
width: "1em",
|
|
22526
|
+
height: "1em",
|
|
22527
|
+
viewBox: "0 0 32 32"
|
|
22528
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22529
|
+
fill: "none",
|
|
22530
|
+
fillRule: "evenodd"
|
|
22531
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
22532
|
+
d: "M0 0h32v32H0z"
|
|
22533
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
22534
|
+
fill: "#06C",
|
|
22535
|
+
d: "M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667z"
|
|
22536
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
22537
|
+
fill: "#FFF",
|
|
22538
|
+
d: "M16 14.667c.736 0 1.333.597 1.333 1.333v5.333a1.333 1.333 0 1 1-2.666 0V16c0-.736.597-1.333 1.333-1.333zm0-5.334A1.333 1.333 0 1 1 16 12a1.333 1.333 0 0 1 0-2.667z"
|
|
22539
|
+
}))));
|
|
22540
|
+
};
|
|
22512
22541
|
var info = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2032%2032%22%3E%20%20%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%200h32v32H0z%22%2F%3E%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2306C%22%20d%3D%22M16%202.667C8.64%202.667%202.667%208.64%202.667%2016S8.64%2029.333%2016%2029.333%2029.333%2023.36%2029.333%2016%2023.36%202.667%2016%202.667z%22%2F%3E%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M16%2014.667c.736%200%201.333.597%201.333%201.333v5.333a1.333%201.333%200%201%201-2.666%200V16c0-.736.597-1.333%201.333-1.333zm0-5.334A1.333%201.333%200%201%201%2016%2012a1.333%201.333%200%200%201%200-2.667z%22%2F%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
22513
22542
|
|
|
22514
22543
|
function DeleteComponent(_a) {
|
|
@@ -22570,6 +22599,417 @@ function DeleteComponent(_a) {
|
|
|
22570
22599
|
return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
|
|
22571
22600
|
}
|
|
22572
22601
|
|
|
22602
|
+
var _path$3;
|
|
22603
|
+
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); }
|
|
22604
|
+
var SvgIcPencil = function SvgIcPencil(props) {
|
|
22605
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
22606
|
+
width: "1em",
|
|
22607
|
+
height: "1em",
|
|
22608
|
+
viewBox: "0 0 20 20",
|
|
22609
|
+
fill: "none",
|
|
22610
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22611
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22612
|
+
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",
|
|
22613
|
+
stroke: "#596168",
|
|
22614
|
+
strokeWidth: 1.5,
|
|
22615
|
+
strokeLinecap: "round",
|
|
22616
|
+
strokeLinejoin: "round"
|
|
22617
|
+
})));
|
|
22618
|
+
};
|
|
22619
|
+
|
|
22620
|
+
var _path$2, _path2, _path3;
|
|
22621
|
+
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); }
|
|
22622
|
+
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
22623
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
22624
|
+
width: "1em",
|
|
22625
|
+
height: "1em",
|
|
22626
|
+
viewBox: "0 0 12 12",
|
|
22627
|
+
fill: "none",
|
|
22628
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22629
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22630
|
+
d: "M3.742 4.674h-2.25v-2.25",
|
|
22631
|
+
fill: "#767D84"
|
|
22632
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22633
|
+
d: "M3.742 4.674h-2.25v-2.25",
|
|
22634
|
+
stroke: "#596168",
|
|
22635
|
+
strokeWidth: 1.5,
|
|
22636
|
+
strokeLinecap: "round",
|
|
22637
|
+
strokeLinejoin: "round"
|
|
22638
|
+
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22639
|
+
d: "M3.083 8.917a4.125 4.125 0 1 0 0-5.834l-1.59 1.591",
|
|
22640
|
+
stroke: "#596168",
|
|
22641
|
+
strokeWidth: 1.5,
|
|
22642
|
+
strokeLinecap: "round",
|
|
22643
|
+
strokeLinejoin: "round"
|
|
22644
|
+
})));
|
|
22645
|
+
};
|
|
22646
|
+
|
|
22647
|
+
var _path$1;
|
|
22648
|
+
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); }
|
|
22649
|
+
var SvgIcMinus = function SvgIcMinus(props) {
|
|
22650
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
22651
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22652
|
+
width: "1em",
|
|
22653
|
+
height: "1em",
|
|
22654
|
+
viewBox: "0 0 14 14"
|
|
22655
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22656
|
+
fill: "#959BA1",
|
|
22657
|
+
className: "ic-minus_svg__fill-color",
|
|
22658
|
+
fillRule: "evenodd",
|
|
22659
|
+
d: "M10.5 7.583h-7a.582.582 0 1 1 0-1.166h7a.582.582 0 1 1 0 1.166z"
|
|
22660
|
+
})));
|
|
22661
|
+
};
|
|
22662
|
+
|
|
22663
|
+
var _g;
|
|
22664
|
+
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); }
|
|
22665
|
+
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
22666
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
22667
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22668
|
+
width: "1em",
|
|
22669
|
+
height: "1em",
|
|
22670
|
+
viewBox: "0 0 20 20"
|
|
22671
|
+
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22672
|
+
fill: "none",
|
|
22673
|
+
fillRule: "evenodd"
|
|
22674
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
22675
|
+
fill: "#FFF",
|
|
22676
|
+
d: "M5 5h10v10H5z"
|
|
22677
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
22678
|
+
fill: "#F33E3E",
|
|
22679
|
+
d: "M10 18.333c-4.6 0-8.333-3.733-8.333-8.333S5.4 1.667 10 1.667 18.333 5.4 18.333 10 14.6 18.333 10 18.333zm0-12.5a.833.833 0 0 0-.833.834V10a.833.833 0 0 0 1.666 0V6.667A.834.834 0 0 0 10 5.833zm0 6.667a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666z"
|
|
22680
|
+
}))));
|
|
22681
|
+
};
|
|
22682
|
+
|
|
22683
|
+
var _path;
|
|
22684
|
+
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); }
|
|
22685
|
+
var SvgIcEnter = function SvgIcEnter(props) {
|
|
22686
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
22687
|
+
width: "1em",
|
|
22688
|
+
height: "1em",
|
|
22689
|
+
viewBox: "0 0 16 16",
|
|
22690
|
+
fill: "none",
|
|
22691
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22692
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22693
|
+
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",
|
|
22694
|
+
fill: "#3B444C"
|
|
22695
|
+
})));
|
|
22696
|
+
};
|
|
22697
|
+
|
|
22698
|
+
var ImageTagsContainer = function (_a) {
|
|
22699
|
+
var ciPipelineId = _a.ciPipelineId, artifactId = _a.artifactId, imageComment = _a.imageComment, imageReleaseTags = _a.imageReleaseTags, updateCurrentAppMaterial = _a.updateCurrentAppMaterial, appReleaseTagNames = _a.appReleaseTagNames, setAppReleaseTagNames = _a.setAppReleaseTagNames, tagsEditable = _a.tagsEditable, setTagsEditable = _a.setTagsEditable, toggleCardMode = _a.toggleCardMode, hideHardDelete = _a.hideHardDelete, forceReInit = _a.forceReInit;
|
|
22700
|
+
var _b = __read(React.useState(imageReleaseTags ? imageReleaseTags : []), 2), initialTags = _b[0], setInitialTags = _b[1];
|
|
22701
|
+
var _c = __read(React.useState(imageComment ? imageComment.comment : ''), 2), initialDescription = _c[0], setInitialDescription = _c[1];
|
|
22702
|
+
var _d = __read(React.useState(appReleaseTagNames ? appReleaseTagNames : []), 2), existingTags = _d[0], setExistingTags = _d[1];
|
|
22703
|
+
var _e = __read(React.useState(imageComment ? imageComment.comment : ''), 2), newDescription = _e[0], setNewDescription = _e[1];
|
|
22704
|
+
var _f = __read(React.useState(false), 2), isEditing = _f[0], setIsEditing = _f[1];
|
|
22705
|
+
var _g = __read(React.useState(false), 2), showTagsWarning = _g[0], setShowTagsWarning = _g[1];
|
|
22706
|
+
var _h = __read(React.useState(imageReleaseTags ? imageReleaseTags : []), 2), displayedTags = _h[0], setDisplayedTags = _h[1];
|
|
22707
|
+
var _j = __read(React.useState(''), 2), tagErrorMessage = _j[0], setTagErrorMessage = _j[1];
|
|
22708
|
+
var _k = __read(React.useState([]), 2), createTags = _k[0], setCreateTags = _k[1];
|
|
22709
|
+
var _l = __read(React.useState([]), 2), softDeleteTags = _l[0], setSoftDeleteTags = _l[1];
|
|
22710
|
+
var _m = __read(React.useState([]), 2), hardDeleteTags = _m[0], setHardDeleteTags = _m[1];
|
|
22711
|
+
var _o = __read(React.useState(false), 2), isSuperAdmin = _o[0], setSuperAdmin = _o[1];
|
|
22712
|
+
var _p = __read(React.useState(''), 2), descriptionValidationMessage = _p[0], setDescriptionValidationMessage = _p[1];
|
|
22713
|
+
var _q = __read(React.useState(''), 2), textInput = _q[0], setTextInput = _q[1];
|
|
22714
|
+
React.useEffect(function () {
|
|
22715
|
+
initialise();
|
|
22716
|
+
}, []);
|
|
22717
|
+
React.useEffect(function () {
|
|
22718
|
+
reInitState();
|
|
22719
|
+
}, [imageReleaseTags, imageComment, tagsEditable]);
|
|
22720
|
+
React.useEffect(function () {
|
|
22721
|
+
setExistingTags(appReleaseTagNames ? appReleaseTagNames : []);
|
|
22722
|
+
}, [appReleaseTagNames]);
|
|
22723
|
+
function initialise() {
|
|
22724
|
+
var _a, _b;
|
|
22725
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
22726
|
+
var userRole, superAdmin, err_1;
|
|
22727
|
+
return __generator(this, function (_c) {
|
|
22728
|
+
switch (_c.label) {
|
|
22729
|
+
case 0:
|
|
22730
|
+
_c.trys.push([0, 2, , 3]);
|
|
22731
|
+
return [4 /*yield*/, getUserRole()];
|
|
22732
|
+
case 1:
|
|
22733
|
+
userRole = _c.sent();
|
|
22734
|
+
superAdmin = (_b = (_a = userRole === null || userRole === void 0 ? void 0 : userRole.result) === null || _a === void 0 ? void 0 : _a.roles) === null || _b === void 0 ? void 0 : _b.includes('role:super-admin___');
|
|
22735
|
+
setSuperAdmin(superAdmin);
|
|
22736
|
+
return [3 /*break*/, 3];
|
|
22737
|
+
case 2:
|
|
22738
|
+
err_1 = _c.sent();
|
|
22739
|
+
showError(err_1);
|
|
22740
|
+
return [3 /*break*/, 3];
|
|
22741
|
+
case 3: return [2 /*return*/];
|
|
22742
|
+
}
|
|
22743
|
+
});
|
|
22744
|
+
});
|
|
22745
|
+
}
|
|
22746
|
+
var reInitState = function () {
|
|
22747
|
+
if (forceReInit || !isEditing) {
|
|
22748
|
+
setInitialTags(imageReleaseTags ? imageReleaseTags : []);
|
|
22749
|
+
setInitialDescription(imageComment ? imageComment.comment : '');
|
|
22750
|
+
setNewDescription(imageComment ? imageComment.comment : '');
|
|
22751
|
+
setDisplayedTags(imageReleaseTags ? imageReleaseTags : []);
|
|
22752
|
+
setIsEditing(false);
|
|
22753
|
+
}
|
|
22754
|
+
};
|
|
22755
|
+
var handleEditClick = function () {
|
|
22756
|
+
setIsEditing(!isEditing);
|
|
22757
|
+
if (typeof toggleCardMode === 'function') {
|
|
22758
|
+
toggleCardMode(artifactId);
|
|
22759
|
+
}
|
|
22760
|
+
};
|
|
22761
|
+
var handleDescriptionChange = function (e) {
|
|
22762
|
+
var description = e.target.value;
|
|
22763
|
+
(description === null || description === void 0 ? void 0 : description.length) > 500
|
|
22764
|
+
? setDescriptionValidationMessage('comment length cannot exceed 500 characters')
|
|
22765
|
+
: setDescriptionValidationMessage('');
|
|
22766
|
+
setNewDescription(description);
|
|
22767
|
+
};
|
|
22768
|
+
var handleCancel = function () {
|
|
22769
|
+
setDisplayedTags(initialTags);
|
|
22770
|
+
setNewDescription(initialDescription);
|
|
22771
|
+
setCreateTags([]);
|
|
22772
|
+
setSoftDeleteTags([]);
|
|
22773
|
+
setHardDeleteTags([]);
|
|
22774
|
+
handleEditClick();
|
|
22775
|
+
setShowTagsWarning(false);
|
|
22776
|
+
setTagErrorMessage('');
|
|
22777
|
+
};
|
|
22778
|
+
var validateTag = function (lowercaseValue) {
|
|
22779
|
+
if (lowercaseValue.length == 0 ||
|
|
22780
|
+
lowercaseValue.length >= 128 ||
|
|
22781
|
+
lowercaseValue[0] == '.' ||
|
|
22782
|
+
lowercaseValue[0] == '-') {
|
|
22783
|
+
setTagErrorMessage('tag name cannot be empty or exceed 128 characters or cannot start with . or -');
|
|
22784
|
+
return false;
|
|
22785
|
+
}
|
|
22786
|
+
setTagErrorMessage('');
|
|
22787
|
+
var isTagExistsInExistingTags = existingTags.includes(lowercaseValue);
|
|
22788
|
+
var isTagExistsInDisplayedTags = false;
|
|
22789
|
+
for (var i = 0; i < (displayedTags === null || displayedTags === void 0 ? void 0 : displayedTags.length); i++) {
|
|
22790
|
+
if (displayedTags[i].tagName.toLowerCase() === lowercaseValue)
|
|
22791
|
+
isTagExistsInDisplayedTags = true;
|
|
22792
|
+
}
|
|
22793
|
+
if (isTagExistsInExistingTags || isTagExistsInDisplayedTags || lowercaseValue === 'latest') {
|
|
22794
|
+
setTagErrorMessage('This tag is already being used in this application');
|
|
22795
|
+
return false;
|
|
22796
|
+
}
|
|
22797
|
+
return true;
|
|
22798
|
+
};
|
|
22799
|
+
var handleTagCreate = function (newValue) {
|
|
22800
|
+
var lowercaseValue = newValue.toLowerCase().trim();
|
|
22801
|
+
if (validateTag(lowercaseValue)) {
|
|
22802
|
+
var newTag = {
|
|
22803
|
+
id: 0,
|
|
22804
|
+
tagName: lowercaseValue,
|
|
22805
|
+
appId: 0,
|
|
22806
|
+
deleted: false,
|
|
22807
|
+
artifactId: 0,
|
|
22808
|
+
duplicateTag: false,
|
|
22809
|
+
};
|
|
22810
|
+
setCreateTags(__spreadArray(__spreadArray([], __read(createTags), false), [newTag], false));
|
|
22811
|
+
setDisplayedTags(__spreadArray(__spreadArray([], __read(displayedTags), false), [newTag], false));
|
|
22812
|
+
setShowTagsWarning(true);
|
|
22813
|
+
setTextInput('');
|
|
22814
|
+
}
|
|
22815
|
+
};
|
|
22816
|
+
var handleTagSoftDelete = function (index) {
|
|
22817
|
+
var updatedTags = __spreadArray([], __read(displayedTags), false);
|
|
22818
|
+
updatedTags[index] = __assign(__assign({}, updatedTags[index]), { deleted: !updatedTags[index].deleted });
|
|
22819
|
+
var updatedTag = updatedTags[index];
|
|
22820
|
+
var updatedSoftDeleteTags = __spreadArray([], __read(softDeleteTags), false);
|
|
22821
|
+
var tagIndex = updatedSoftDeleteTags.findIndex(function (tag) { return tag.tagName === updatedTag.tagName; });
|
|
22822
|
+
if (tagIndex !== -1) {
|
|
22823
|
+
// Tag already exists in softDeleteTags array, remove it
|
|
22824
|
+
updatedSoftDeleteTags.splice(tagIndex, 1);
|
|
22825
|
+
}
|
|
22826
|
+
else {
|
|
22827
|
+
// Tag doesn't exist in softDeleteTags array, add it
|
|
22828
|
+
updatedSoftDeleteTags.push(updatedTag);
|
|
22829
|
+
}
|
|
22830
|
+
setDisplayedTags(updatedTags);
|
|
22831
|
+
setSoftDeleteTags(updatedSoftDeleteTags);
|
|
22832
|
+
};
|
|
22833
|
+
var handleTagHardDelete = function (index) {
|
|
22834
|
+
var deletedTag = displayedTags[index];
|
|
22835
|
+
var updatedCreateTags = createTags.filter(function (tag) { return tag.tagName !== deletedTag.tagName; });
|
|
22836
|
+
setCreateTags(updatedCreateTags);
|
|
22837
|
+
var updatedDisplayedTags = __spreadArray([], __read(displayedTags), false);
|
|
22838
|
+
updatedDisplayedTags.splice(index, 1);
|
|
22839
|
+
setDisplayedTags(updatedDisplayedTags);
|
|
22840
|
+
var updatedExistingTags = existingTags.filter(function (tag) { return tag.toLowerCase() !== deletedTag.tagName.toLowerCase(); });
|
|
22841
|
+
setExistingTags(updatedExistingTags);
|
|
22842
|
+
if (deletedTag.id !== 0) {
|
|
22843
|
+
var updatedHardDeleteTags = __spreadArray(__spreadArray([], __read(hardDeleteTags), false), [deletedTag], false);
|
|
22844
|
+
setHardDeleteTags(updatedHardDeleteTags);
|
|
22845
|
+
}
|
|
22846
|
+
};
|
|
22847
|
+
var errorStateHandling = function (err) {
|
|
22848
|
+
err.forEach(function (_a) {
|
|
22849
|
+
var userMessage = _a.userMessage;
|
|
22850
|
+
var tagList = createTags.map(function (tags) {
|
|
22851
|
+
var _a;
|
|
22852
|
+
if ((_a = userMessage === null || userMessage === void 0 ? void 0 : userMessage.appReleaseTags) === null || _a === void 0 ? void 0 : _a.includes(tags.tagName)) {
|
|
22853
|
+
return __assign(__assign({}, tags), { duplicateTag: true });
|
|
22854
|
+
}
|
|
22855
|
+
return tags;
|
|
22856
|
+
});
|
|
22857
|
+
setCreateTags(tagList);
|
|
22858
|
+
var displayList = displayedTags.map(function (obj) {
|
|
22859
|
+
var matchingTag = tagList.find(function (tag) { return tag.tagName === obj.tagName; });
|
|
22860
|
+
if (matchingTag) {
|
|
22861
|
+
return __assign(__assign({}, obj), { duplicateTag: matchingTag.duplicateTag });
|
|
22862
|
+
}
|
|
22863
|
+
return obj;
|
|
22864
|
+
});
|
|
22865
|
+
setDisplayedTags(displayList);
|
|
22866
|
+
});
|
|
22867
|
+
};
|
|
22868
|
+
var handleSave = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
22869
|
+
var payload;
|
|
22870
|
+
return __generator(this, function (_a) {
|
|
22871
|
+
if (tagErrorMessage)
|
|
22872
|
+
return [2 /*return*/];
|
|
22873
|
+
payload = {
|
|
22874
|
+
createTags: createTags,
|
|
22875
|
+
softDeleteTags: softDeleteTags,
|
|
22876
|
+
imageComment: {
|
|
22877
|
+
id: 0,
|
|
22878
|
+
comment: newDescription.trim(),
|
|
22879
|
+
artifactId: 0,
|
|
22880
|
+
},
|
|
22881
|
+
hardDeleteTags: hardDeleteTags,
|
|
22882
|
+
};
|
|
22883
|
+
// set loading state true
|
|
22884
|
+
setImageTags(payload, ciPipelineId, artifactId)
|
|
22885
|
+
.then(function (res) {
|
|
22886
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
22887
|
+
var tags = (_b = (_a = res.result) === null || _a === void 0 ? void 0 : _a.imageReleaseTags) === null || _b === void 0 ? void 0 : _b.map(function (tag) { return ({
|
|
22888
|
+
id: tag.id,
|
|
22889
|
+
tagName: tag.tagName,
|
|
22890
|
+
deleted: tag.deleted,
|
|
22891
|
+
appId: 0,
|
|
22892
|
+
artifactId: 0,
|
|
22893
|
+
}); });
|
|
22894
|
+
if (setAppReleaseTagNames) {
|
|
22895
|
+
setAppReleaseTagNames((_c = res.result) === null || _c === void 0 ? void 0 : _c.appReleaseTags);
|
|
22896
|
+
}
|
|
22897
|
+
if (setTagsEditable) {
|
|
22898
|
+
setTagsEditable((_d = res.result) === null || _d === void 0 ? void 0 : _d.tagsEditable);
|
|
22899
|
+
}
|
|
22900
|
+
setInitialTags(tags);
|
|
22901
|
+
setInitialDescription((_f = (_e = res.result) === null || _e === void 0 ? void 0 : _e.imageComment) === null || _f === void 0 ? void 0 : _f.comment);
|
|
22902
|
+
setDisplayedTags(tags);
|
|
22903
|
+
setNewDescription((_h = (_g = res.result) === null || _g === void 0 ? void 0 : _g.imageComment) === null || _h === void 0 ? void 0 : _h.comment);
|
|
22904
|
+
setCreateTags([]);
|
|
22905
|
+
setSoftDeleteTags([]);
|
|
22906
|
+
setHardDeleteTags([]);
|
|
22907
|
+
handleEditClick();
|
|
22908
|
+
setShowTagsWarning(false);
|
|
22909
|
+
setTagErrorMessage('');
|
|
22910
|
+
if (updateCurrentAppMaterial)
|
|
22911
|
+
updateCurrentAppMaterial(artifactId, tags, (_j = res.result) === null || _j === void 0 ? void 0 : _j.imageComment);
|
|
22912
|
+
})
|
|
22913
|
+
.catch(function (err) {
|
|
22914
|
+
var _a, _b, _c, _d, _e, _f;
|
|
22915
|
+
// Fix toast message
|
|
22916
|
+
if ((_d = (_c = (_b = (_a = err.errors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.userMessage) === null || _c === void 0 ? void 0 : _c.appReleaseTags) === null || _d === void 0 ? void 0 : _d.length) {
|
|
22917
|
+
toast.error((_f = (_e = err.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.internalMessage);
|
|
22918
|
+
errorStateHandling(err.errors);
|
|
22919
|
+
}
|
|
22920
|
+
else {
|
|
22921
|
+
showError(err);
|
|
22922
|
+
}
|
|
22923
|
+
});
|
|
22924
|
+
return [2 /*return*/];
|
|
22925
|
+
});
|
|
22926
|
+
}); };
|
|
22927
|
+
var renderInfoCard = function () {
|
|
22928
|
+
return (jsxRuntime.jsx(TippyCustomized, __assign({ theme: exports.TippyTheme.white, className: "w-300 fcv-5", placement: "right", Icon: SvgIcHelp, heading: "Release tags", showCloseButton: true, trigger: "click", interactive: true, additionalContent: getBuildContextAdditionalContent() }, { children: jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 fcn-5 ml-8 cursor" }, { children: jsxRuntime.jsx(SvgIcHelpOutline, {}) })) })));
|
|
22929
|
+
};
|
|
22930
|
+
var getBuildContextAdditionalContent = function () {
|
|
22931
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "h-250 fs-13 dc__overflow-scroll p-12" }, { children: [jsxRuntime.jsx("div", { children: "Release tags allow you to tag container images with readable and relatable tags eg. v1.0." }), jsxRuntime.jsxs("ul", __assign({ className: "pl-20 mt-8" }, { children: [jsxRuntime.jsx("li", { children: "A release tag can only be added if a workflow has CD pipelines deploying to Production environments." }), jsxRuntime.jsx("li", { children: "Multiple tags can be added to an image." }), jsxRuntime.jsx("li", { children: "Multiple images in an application cannot have the same tag." }), jsxRuntime.jsx("li", { children: "Tags cannot be deleted once saved. Although, you can soft delete a tag if an unwanted tag has been added." })] }))] })));
|
|
22932
|
+
};
|
|
22933
|
+
var creatableRef = React.useRef(null);
|
|
22934
|
+
if (newDescription === '' && displayedTags.length === 0 && !isEditing) {
|
|
22935
|
+
return tagsEditable ? (jsxRuntime.jsx("div", __assign({ className: "bcn-0 mt-8 add-image-button" }, { children: jsxRuntime.jsx(AddImageButton, { handleEditClick: handleEditClick }) }))) : (jsxRuntime.jsx("div", {}));
|
|
22936
|
+
}
|
|
22937
|
+
var handleKeydown = function (event) {
|
|
22938
|
+
if (event.key === 'Enter' && event.target.value.trim()) {
|
|
22939
|
+
handleTagCreate(event.target.value.trim());
|
|
22940
|
+
}
|
|
22941
|
+
};
|
|
22942
|
+
var setInputValue = function (e) {
|
|
22943
|
+
e.target.value && validateTag(e.target.value);
|
|
22944
|
+
setTextInput(e.target.value);
|
|
22945
|
+
};
|
|
22946
|
+
var enterTagCreate = function (e) {
|
|
22947
|
+
stopPropagation(e);
|
|
22948
|
+
if (textInput.trim()) {
|
|
22949
|
+
handleTagCreate(textInput.trim());
|
|
22950
|
+
}
|
|
22951
|
+
};
|
|
22952
|
+
var onClickSave = function () {
|
|
22953
|
+
if (textInput.trim()) {
|
|
22954
|
+
handleTagCreate(textInput);
|
|
22955
|
+
}
|
|
22956
|
+
handleSave();
|
|
22957
|
+
};
|
|
22958
|
+
return (jsxRuntime.jsx("div", __assign({ className: "mt-8" }, { children: isEditing && tagsEditable ? (jsxRuntime.jsxs("div", __assign({ className: "bcn-0 dc__border-top-n1 " }, { children: [jsxRuntime.jsxs("div", __assign({ className: "cn-7 mt-12 flex left" }, { children: [jsxRuntime.jsx("span", { children: "Release tags (eg. v1.0)" }), jsxRuntime.jsx("div", __assign({ className: "flex row ml-0" }, { children: renderInfoCard() }))] })), jsxRuntime.jsxs("div", __assign({ className: "mt-6 dc__position-rel-imp", "data-testid": "add-tag-text-area" }, { children: [jsxRuntime.jsx("input", { className: "form__input", value: textInput, onChange: setInputValue, placeholder: "Type a tag and press enter", onKeyDown: handleKeydown, onBlur: setInputValue, ref: creatableRef }), textInput.length > 0 && (jsxRuntime.jsxs("div", __assign({ onClick: enterTagCreate, className: "dc__position-abs bcn-0 flex cursor pt-2 pb-2 pr-4 pl-4 br-2 cn-7 dc__border dc__border-bottom-2", style: {
|
|
22959
|
+
top: '50%',
|
|
22960
|
+
fontFamily: 'monospace',
|
|
22961
|
+
right: '8px',
|
|
22962
|
+
transform: 'translateY(-50%)',
|
|
22963
|
+
} }, { children: [jsxRuntime.jsx(SvgIcEnter, { className: "icon-dim-16 mr-4" }), "Enter"] })))] })), tagErrorMessage && (jsxRuntime.jsxs("div", __assign({ className: "flex left" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), jsxRuntime.jsx("div", __assign({ className: "form__error" }, { children: tagErrorMessage }))] }))), jsxRuntime.jsx("div", __assign({ className: "flex-wrap mt-8 flex left" }, { children: displayedTags === null || displayedTags === void 0 ? void 0 : displayedTags.map(function (tag, index) { return (jsxRuntime.jsx(ImageTagButton, { text: tag === null || tag === void 0 ? void 0 : tag.tagName, isSoftDeleted: tag === null || tag === void 0 ? void 0 : tag.deleted, isEditing: isEditing, onSoftDeleteClick: function (e) {
|
|
22964
|
+
stopPropagation(e);
|
|
22965
|
+
handleTagSoftDelete(index);
|
|
22966
|
+
}, onHardDeleteClick: function (e) {
|
|
22967
|
+
stopPropagation(e);
|
|
22968
|
+
handleTagHardDelete(index);
|
|
22969
|
+
}, tagId: tag.id, softDeleteTags: softDeleteTags, isSuperAdmin: isSuperAdmin, duplicateTag: tag === null || tag === void 0 ? void 0 : tag.duplicateTag, hideHardDelete: hideHardDelete }, tag.id)); }) })), showTagsWarning && (jsxRuntime.jsxs("div", __assign({ className: "cn-7 mb-8 flex left" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon--info icon-dim-16 mr-2" }), "Tags cannot be edited/removed later"] }))), jsxRuntime.jsx("div", __assign({ className: "cn-7 mt-12" }, { children: "Comment" })), jsxRuntime.jsx("div", __assign({ className: "flex left flex-wrap dc__gap-8 w-100 mt-6 mb-12", "data-testid": "add-image-comment-text-area" }, { children: jsxRuntime.jsx("textarea", { value: newDescription, onChange: handleDescriptionChange, className: "flex left flex-wrap dc__gap-8 dc__description-textarea", style: { height: '90px !important' } }) })), descriptionValidationMessage !== '' && (jsxRuntime.jsxs("div", __assign({ className: "flex left" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), jsxRuntime.jsx("div", __assign({ className: "form__error" }, { children: descriptionValidationMessage }))] }))), jsxRuntime.jsxs("div", __assign({ className: "w-100 flex right mt-12" }, { children: [jsxRuntime.jsx("button", __assign({ className: "cta flex cancel h-32 lh-32-imp", type: "button", onClick: function (e) {
|
|
22970
|
+
stopPropagation(e);
|
|
22971
|
+
handleCancel();
|
|
22972
|
+
} }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ className: "cta flex h-32 lh-32-imp ml-12", "data-testid": "save-tags-button", type: "button", onClick: function (e) {
|
|
22973
|
+
stopPropagation(e);
|
|
22974
|
+
onClickSave();
|
|
22975
|
+
} }, { children: "Save" }))] }))] }))) : (jsxRuntime.jsxs("div", __assign({ className: "top br-4 bcn-0 image-tags-container flexbox" }, { children: [jsxRuntime.jsx("div", __assign({ className: "flex left image-tag-left-border w-100 mt-8 mb-8 pr-10 pl-10", "data-testid": "image-tags-container-hover" }, { children: jsxRuntime.jsxs("div", __assign({ className: 'w-100' }, { children: [initialDescription && jsxRuntime.jsx("div", __assign({ className: "mb-6 fs-13 dc__word-break-all" }, { children: initialDescription })), jsxRuntime.jsx("div", __assign({ className: "flex-wrap flex left" }, { children: initialTags === null || initialTags === void 0 ? void 0 : initialTags.map(function (tag, index) { return (jsxRuntime.jsx(ImageTagButton, { text: tag === null || tag === void 0 ? void 0 : tag.tagName, isSoftDeleted: tag === null || tag === void 0 ? void 0 : tag.deleted, isEditing: isEditing, onSoftDeleteClick: function (e) {
|
|
22976
|
+
stopPropagation(e);
|
|
22977
|
+
handleTagSoftDelete(index);
|
|
22978
|
+
}, onHardDeleteClick: function (e) {
|
|
22979
|
+
stopPropagation(e);
|
|
22980
|
+
handleTagHardDelete(index);
|
|
22981
|
+
}, tagId: tag.id, softDeleteTags: softDeleteTags, isSuperAdmin: isSuperAdmin, duplicateTag: tag === null || tag === void 0 ? void 0 : tag.duplicateTag, hideHardDelete: hideHardDelete }, tag === null || tag === void 0 ? void 0 : tag.id)); }) }))] })) })), jsxRuntime.jsx("div", __assign({ className: "mt-8 mr-6 icon-dim-16" }, { children: tagsEditable && (jsxRuntime.jsx(SvgIcPencil, { className: "icon-dim-16 image-tags-container-edit__icon cursor", "data-testid": "edit-tags-icon", onClick: function (e) {
|
|
22982
|
+
stopPropagation(e);
|
|
22983
|
+
handleEditClick();
|
|
22984
|
+
} })) }))] }))) })));
|
|
22985
|
+
};
|
|
22986
|
+
var ImageTagButton = function (_a) {
|
|
22987
|
+
var text = _a.text, isSoftDeleted = _a.isSoftDeleted, isEditing = _a.isEditing, onSoftDeleteClick = _a.onSoftDeleteClick, onHardDeleteClick = _a.onHardDeleteClick, tagId = _a.tagId, softDeleteTags = _a.softDeleteTags, isSuperAdmin = _a.isSuperAdmin, duplicateTag = _a.duplicateTag, hideHardDelete = _a.hideHardDelete;
|
|
22988
|
+
var IconComponent = isSoftDeleted ? SvgIcArrowCounterClockwise : SvgIcMinus;
|
|
22989
|
+
var isInSoftDeleteTags = isSoftDeleted && softDeleteTags.some(function (tag) { return tag.tagName === text; });
|
|
22990
|
+
var canTagBeHardDelete = tagId === 0 || (isSuperAdmin && !hideHardDelete);
|
|
22991
|
+
var tabColor = function () {
|
|
22992
|
+
if (duplicateTag) {
|
|
22993
|
+
return 'cr-5 bcr-1 er-2';
|
|
22994
|
+
}
|
|
22995
|
+
else if (isSoftDeleted) {
|
|
22996
|
+
return 'cy-7 bcy-1 dc__strike-through ey-2';
|
|
22997
|
+
}
|
|
22998
|
+
else {
|
|
22999
|
+
return 'cn-9';
|
|
23000
|
+
}
|
|
23001
|
+
};
|
|
23002
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "br-4 en-2 bw-1 mr-8 bcn-0 mb-4 pt-2 pr-8 pb-2 pl-8 tag-class dc__word-break-all flex ".concat(isEditing ? 'icon-hover' : '', " ").concat(tabColor()) }, { children: [duplicateTag ? (jsxRuntime.jsx(SvgIcErrorExclamation, { className: "icon-dim-12 mr-4" })) : (jsxRuntime.jsx(Tippy, __assign({ className: "default-tt", arrow: true, placement: "top", content: isInSoftDeleteTags ? 'Restore tag' : 'Soft delete tag' }, { children: jsxRuntime.jsx("div", __assign({ className: "action-icon mr-4 lh-16 pt-3 ".concat(isInSoftDeleteTags || (tagId !== 0 && !isSoftDeleted) ? 'show-icon' : '') }, { children: jsxRuntime.jsx(IconComponent, { className: "icon-dim-12 cursor".concat(isSoftDeleted ? 'scn-6' : 'fcn-6', " "), "data-testid": "".concat(text, "-tag-soft-delete"), onClick: onSoftDeleteClick }) })) }))), text, jsxRuntime.jsx(Tippy, __assign({ className: "default-tt", arrow: true, placement: "top", content: "Remove tag" }, { children: jsxRuntime.jsx("div", __assign({ className: "action-icon ml-4 lh-16 pt-3 ".concat(canTagBeHardDelete ? 'show-icon' : '') }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-12 fcn-6 cursor", "data-testid": "".concat(text, "-tag-hard-delete"), onClick: onHardDeleteClick }) })) }))] })));
|
|
23003
|
+
};
|
|
23004
|
+
var AddImageButton = function (_a) {
|
|
23005
|
+
var handleEditClick = _a.handleEditClick;
|
|
23006
|
+
var handleClick = function (e) {
|
|
23007
|
+
stopPropagation(e);
|
|
23008
|
+
handleEditClick();
|
|
23009
|
+
};
|
|
23010
|
+
return (jsxRuntime.jsx("div", __assign({ className: "add-tag-button flex pt-12 pr-12", "data-testid": "add-tags-button", onClick: handleClick }, { children: jsxRuntime.jsxs("div", __assign({ className: "lh-16 flex" }, { children: [jsxRuntime.jsx(SvgIcAdd, { className: "icon-dim-16 cn-6" }), jsxRuntime.jsx("span", __assign({ className: "cn-7" }, { children: "Add tags/comment" }))] })) })));
|
|
23011
|
+
};
|
|
23012
|
+
|
|
22573
23013
|
exports.BreadCrumb = BreadCrumb;
|
|
22574
23014
|
exports.BreadcrumbStore = Store;
|
|
22575
23015
|
exports.BuildStageVariable = BuildStageVariable;
|
|
@@ -22596,6 +23036,8 @@ exports.ErrorScreenNotAuthorized = ErrorScreenNotAuthorized;
|
|
|
22596
23036
|
exports.ForceDeleteDialog = ForceDeleteDialog;
|
|
22597
23037
|
exports.GenericEmptyState = GenericEmptyState;
|
|
22598
23038
|
exports.Host = Host;
|
|
23039
|
+
exports.ImageTagButton = ImageTagButton;
|
|
23040
|
+
exports.ImageTagsContainer = ImageTagsContainer;
|
|
22599
23041
|
exports.InfoColourBar = InfoColourBar;
|
|
22600
23042
|
exports.Modal = Modal;
|
|
22601
23043
|
exports.MultiValueChipContainer = MultiValueChipContainer;
|
|
@@ -22639,12 +23081,14 @@ exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
|
|
|
22639
23081
|
exports.getLoginInfo = getLoginInfo;
|
|
22640
23082
|
exports.getRandomColor = getRandomColor;
|
|
22641
23083
|
exports.getTeamListMin = getTeamListMin;
|
|
23084
|
+
exports.getUserRole = getUserRole;
|
|
22642
23085
|
exports.handleUTCTime = handleUTCTime;
|
|
22643
23086
|
exports.multiSelectStyles = multiSelectStyles;
|
|
22644
23087
|
exports.noop = noop$1;
|
|
22645
23088
|
exports.not = not;
|
|
22646
23089
|
exports.post = post;
|
|
22647
23090
|
exports.put = put;
|
|
23091
|
+
exports.setImageTags = setImageTags;
|
|
22648
23092
|
exports.showError = showError;
|
|
22649
23093
|
exports.sortCallback = sortCallback;
|
|
22650
23094
|
exports.stopPropagation = stopPropagation;
|