@devtron-labs/devtron-fe-common-lib 0.0.9-beta-7 → 0.0.9-beta-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,8 +48,3 @@ export declare const TriggerTypeMap: {
48
48
  automatic: string;
49
49
  manual: string;
50
50
  };
51
- export declare const BuildStageVariable: {
52
- PreBuild: string;
53
- Build: string;
54
- PostBuild: string;
55
- };
@@ -8,7 +8,6 @@ export interface DeleteDialogProps {
8
8
  deletePostfix?: string;
9
9
  apiCallInProgress?: boolean;
10
10
  dataTestId?: string;
11
- buttonPrimaryText?: string;
12
11
  }
13
12
  export interface ForceDeleteDialogType {
14
13
  onClickDelete: () => void;
@@ -46,8 +46,6 @@ export interface TippyCustomizedProps {
46
46
  theme: TippyTheme;
47
47
  visible?: boolean;
48
48
  heading?: ReactNode | string;
49
- headingInfo?: ReactNode | string;
50
- noHeadingBorder?: boolean;
51
49
  infoTextHeading?: string;
52
50
  placement: Placement;
53
51
  className?: string;
@@ -236,18 +234,12 @@ export interface CommonNodeAttr {
236
234
  approvalUsers?: string[];
237
235
  userApprovalConfig?: UserApprovalConfigType;
238
236
  requestedUserId?: number;
239
- showPluginWarning?: boolean;
240
237
  helmPackageName?: string;
241
238
  isVirtualEnvironment?: boolean;
242
- isCITriggerBlocked?: boolean;
243
- ciBlockState?: {
244
- action: any;
245
- metadataField: string;
246
- };
247
239
  }
248
240
  export interface VulnerabilityType {
249
241
  name: string;
250
- severity: 'CRITICAL' | 'MODERATE' | 'LOW';
242
+ severity: "CRITICAL" | "MODERATE" | "LOW";
251
243
  package: string;
252
244
  version: string;
253
245
  fixedVersion: string;
@@ -297,5 +289,7 @@ export interface CDMaterialResponseType {
297
289
  materials: any[];
298
290
  userApprovalConfig: UserApprovalConfigType;
299
291
  requestedUserId: number;
292
+ tagsEditable: boolean;
293
+ appReleaseTagNames: string[];
300
294
  }
301
295
  export {};
@@ -29,6 +29,4 @@ export { default as GenericEmptyState } from './EmptyState/GenericEmptyState';
29
29
  export { default as Toggle } from './Toggle/Toggle';
30
30
  export { default as ScanVulnerabilitiesTable } from './Security/ScanVulnerabilitiesTable';
31
31
  export { default as StyledRadioGroup } from './RadioGroup/RadioGroup';
32
- export * from './CIPipeline.Types';
33
- export * from './Policy.Types';
34
32
  export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent';
package/dist/index.js CHANGED
@@ -6,20 +6,20 @@ var ReactDOM = require('react-dom');
6
6
  var reactRouterDom = require('react-router-dom');
7
7
 
8
8
  function _interopNamespaceDefault(e) {
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
17
19
  });
18
- }
19
- });
20
- }
21
- n.default = e;
22
- return Object.freeze(n);
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
23
  }
24
24
 
25
25
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
@@ -75,11 +75,6 @@ var TOKEN_COOKIE_NAME = 'argocd.token';
75
75
  var TriggerTypeMap = {
76
76
  automatic: 'Auto',
77
77
  manual: 'Manual',
78
- };
79
- var BuildStageVariable = {
80
- PreBuild: 'preBuildStage',
81
- Build: 'buildStage',
82
- PostBuild: 'postBuildStage',
83
78
  };
84
79
 
85
80
  /******************************************************************************
@@ -509,9 +504,9 @@ var css_248z$6 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
509
504
  styleInject(css_248z$6);
510
505
 
511
506
  var _g$3;
512
- 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); }
507
+ 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); }
513
508
  var SvgIcProgressing = function SvgIcProgressing(props) {
514
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
509
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
515
510
  xmlns: "http://www.w3.org/2000/svg",
516
511
  viewBox: "0 0 24 24",
517
512
  width: "1em",
@@ -563,8 +558,8 @@ EmptyState.Loading = Loading;
563
558
 
564
559
  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
560
 
566
- function _extends$b() {
567
- _extends$b = Object.assign || function (target) {
561
+ function _extends$a() {
562
+ _extends$a = Object.assign || function (target) {
568
563
  for (var i = 1; i < arguments.length; i++) {
569
564
  var source = arguments[i];
570
565
 
@@ -578,7 +573,7 @@ function _extends$b() {
578
573
  return target;
579
574
  };
580
575
 
581
- return _extends$b.apply(this, arguments);
576
+ return _extends$a.apply(this, arguments);
582
577
  }
583
578
 
584
579
  function _objectWithoutPropertiesLoose$2(source, excluded) {
@@ -1304,7 +1299,7 @@ function ProgressBar(_ref) {
1304
1299
  isIn = _ref.isIn,
1305
1300
  theme = _ref.theme;
1306
1301
 
1307
- var style = _extends$b({}, userStyle, {
1302
+ var style = _extends$a({}, userStyle, {
1308
1303
  animationDuration: delay + "ms",
1309
1304
  animationPlayState: isRunning ? 'running' : 'paused',
1310
1305
  opacity: hide ? 0 : 1
@@ -1581,9 +1576,9 @@ var ToastContainer = function ToastContainer(props) {
1581
1576
  ,
1582
1577
  id: containerId
1583
1578
  }, getToastToRender(function (position, toastList) {
1584
- var containerStyle = !toastList.length ? _extends$b({}, style, {
1579
+ var containerStyle = !toastList.length ? _extends$a({}, style, {
1585
1580
  pointerEvents: 'none'
1586
- }) : _extends$b({}, style);
1581
+ }) : _extends$a({}, style);
1587
1582
  return React.createElement("div", {
1588
1583
  className: getClassName(position),
1589
1584
  style: containerStyle,
@@ -1690,7 +1685,7 @@ function dispatchToast(content, options) {
1690
1685
 
1691
1686
 
1692
1687
  function mergeOptions(type, options) {
1693
- return _extends$b({}, options, {
1688
+ return _extends$a({}, options, {
1694
1689
  type: options && options.type || type,
1695
1690
  toastId: getToastId(options)
1696
1691
  });
@@ -1707,7 +1702,7 @@ function toast(content, options) {
1707
1702
  }
1708
1703
 
1709
1704
  toast.loading = function (content, options) {
1710
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$b({
1705
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$a({
1711
1706
  isLoading: true,
1712
1707
  autoClose: false,
1713
1708
  closeOnClick: false,
@@ -1723,7 +1718,7 @@ function handlePromise(promise, _ref2, options) {
1723
1718
  var id;
1724
1719
 
1725
1720
  if (pending) {
1726
- id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$b({}, options, pending));
1721
+ id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$a({}, options, pending));
1727
1722
  }
1728
1723
 
1729
1724
  var resetParams = {
@@ -1742,7 +1737,7 @@ function handlePromise(promise, _ref2, options) {
1742
1737
  return;
1743
1738
  }
1744
1739
 
1745
- var baseParams = _extends$b({
1740
+ var baseParams = _extends$a({
1746
1741
  type: type
1747
1742
  }, resetParams, options, {
1748
1743
  data: result
@@ -1753,10 +1748,10 @@ function handlePromise(promise, _ref2, options) {
1753
1748
  } : input; // if the id is set we know that it's an update
1754
1749
 
1755
1750
  if (id) {
1756
- toast.update(id, _extends$b({}, baseParams, params));
1751
+ toast.update(id, _extends$a({}, baseParams, params));
1757
1752
  } else {
1758
1753
  // using toast.promise without loading
1759
- toast(params.render, _extends$b({}, baseParams, params));
1754
+ toast(params.render, _extends$a({}, baseParams, params));
1760
1755
  }
1761
1756
 
1762
1757
  return result;
@@ -1780,7 +1775,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
1780
1775
  toast.warn = toast.warning;
1781
1776
 
1782
1777
  toast.dark = function (content, options) {
1783
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$b({
1778
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$a({
1784
1779
  theme: 'dark'
1785
1780
  }, options)));
1786
1781
  };
@@ -1837,7 +1832,7 @@ toast.update = function (toastId, options) {
1837
1832
  var oldOptions = toast.props,
1838
1833
  oldContent = toast.content;
1839
1834
 
1840
- var nextOptions = _extends$b({}, oldOptions, options, {
1835
+ var nextOptions = _extends$a({}, oldOptions, options, {
1841
1836
  toastId: options.toastId || toastId,
1842
1837
  updateId: generateToastId()
1843
1838
  });
@@ -3933,9 +3928,9 @@ function captureException(exception, captureContext) {
3933
3928
  }
3934
3929
 
3935
3930
  var _g$2;
3936
- 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); }
3931
+ 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); }
3937
3932
  var SvgIcWarning = function SvgIcWarning(props) {
3938
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
3933
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
3939
3934
  xmlns: "http://www.w3.org/2000/svg",
3940
3935
  width: "1em",
3941
3936
  height: "1em",
@@ -4323,16 +4318,16 @@ var Modal = function (_a) {
4323
4318
  }, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
4324
4319
  };
4325
4320
 
4326
- var _path$6;
4327
- 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); }
4321
+ var _path$5;
4322
+ 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); }
4328
4323
  var SvgIcCross = function SvgIcCross(props) {
4329
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
4324
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
4330
4325
  width: "1em",
4331
4326
  height: "1em",
4332
4327
  viewBox: "0 0 24 24",
4333
4328
  fill: "none",
4334
4329
  xmlns: "http://www.w3.org/2000/svg"
4335
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
4330
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
4336
4331
  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",
4337
4332
  fill: "#596168"
4338
4333
  })));
@@ -8631,36 +8626,6 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
8631
8626
 
8632
8627
  var Tippy = index;
8633
8628
 
8634
- var _path$5;
8635
- 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); }
8636
- var SvgIcHelp = function SvgIcHelp(props) {
8637
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
8638
- xmlns: "http://www.w3.org/2000/svg",
8639
- width: "1em",
8640
- height: "1em",
8641
- viewBox: "0 0 24 24"
8642
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
8643
- fill: "#767D84",
8644
- fillRule: "evenodd",
8645
- 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"
8646
- })));
8647
- };
8648
-
8649
- var _path$4;
8650
- 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); }
8651
- var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
8652
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
8653
- xmlns: "http://www.w3.org/2000/svg",
8654
- viewBox: "0 0 17 16",
8655
- width: "1em",
8656
- height: "1em"
8657
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
8658
- fill: "#767D84",
8659
- fillRule: "evenodd",
8660
- 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"
8661
- })));
8662
- };
8663
-
8664
8629
  var css_248z$4 = ".tippy-box[data-animation=shift-toward-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=top][data-state=hidden]{transform:translateY(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=bottom][data-state=hidden]{transform:translateY(5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=left][data-state=hidden]{transform:translateX(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=right][data-state=hidden]{transform:translateX(5px)}";
8665
8630
  styleInject(css_248z$4);
8666
8631
 
@@ -8668,7 +8633,6 @@ styleInject(css_248z$4);
8668
8633
  // So this can be updated to support further for new features or interactions
8669
8634
  function TippyCustomized(props) {
8670
8635
  var tippyRef = React.useRef(null);
8671
- var _a = __read(React.useState(false), 2), showHeadingInfo = _a[0], setShowHeadingInfo = _a[1];
8672
8636
  var isWhiteTheme = props.theme === exports.TippyTheme.white;
8673
8637
  var onTippyMount = function (tippyInstance) {
8674
8638
  tippyRef.current = tippyInstance;
@@ -8683,21 +8647,15 @@ function TippyCustomized(props) {
8683
8647
  props.onClose();
8684
8648
  }
8685
8649
  }
8686
- setShowHeadingInfo(false);
8687
8650
  };
8688
8651
  var closeOnEsc = function (e) {
8689
8652
  if (e.keyCode === 27) {
8690
8653
  closeTippy();
8691
8654
  }
8692
8655
  };
8693
- var toggleHeadingInfo = function (e) {
8694
- setShowHeadingInfo(not);
8695
- };
8696
8656
  var getTippyContent = function () {
8697
- var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading, headingInfo = props.headingInfo, infoTextHeading = props.infoTextHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
8698
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
8699
- ? "p-12 cn-9 ".concat(props.noHeadingBorder ? '' : 'dc__border-bottom-n1')
8700
- : 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt: "Heading", onError: onImageLoadError })) : (Icon && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-".concat(iconSize || 20, " mr-6") }, { children: jsxRuntime.jsx(Icon, { className: "icon-dim-".concat(iconSize || 20, " ").concat(iconClass || '') }) })))), heading && jsxRuntime.jsx("span", __assign({ className: "fs-14 fw-6 lh-20 ".concat(showCloseButton ? 'mr-6' : '') }, { children: heading })), headingInfo && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 cursor", onClick: toggleHeadingInfo }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) }))), showCloseButton && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 ml-auto" }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-16 cursor ".concat(isWhiteTheme ? 'fcn-9' : 'fcn-0'), onClick: closeTippy }) })))] })), showHeadingInfo && (jsxRuntime.jsxs("div", __assign({ className: "flex left top bcv-1 fs-13 fw-4 lh-20 pt-8 pb-8 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: [jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 mr-8" }, { children: jsxRuntime.jsx(SvgIcHelp, { className: "icon-dim-20 fcv-5" }) })), jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto" }, { children: headingInfo }))] }))), infoTextHeading && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-14 fw-6 lh-20 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: infoTextHeading }))), infoText && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-13 fw-4 lh-20 ".concat(isWhiteTheme
8657
+ var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading, infoTextHeading = props.infoTextHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
8658
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme ? 'p-12 dc__border-bottom-n1 cn-9' : 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt: "Heading", onError: onImageLoadError })) : (Icon && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-".concat(iconSize || 20, " mr-6") }, { children: jsxRuntime.jsx(Icon, { className: "icon-dim-".concat(iconSize || 20, " ").concat(iconClass || '') }) })))), heading && jsxRuntime.jsx("span", __assign({ className: "fs-14 fw-6 lh-20 ".concat(showCloseButton ? 'mr-6' : '') }, { children: heading })), showCloseButton && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 ml-auto" }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-16 cursor ".concat(isWhiteTheme ? 'fcn-9' : 'fcn-0'), onClick: closeTippy }) })))] })), infoTextHeading && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-14 fw-6 lh-20 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: infoTextHeading }))), infoText && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-13 fw-4 lh-20 ".concat(isWhiteTheme
8701
8659
  ? 'p-12'
8702
8660
  : "pl-20 pr-20 pt-4 ".concat(additionalContent && documentationLink ? 'pb-12' : 'pb-20')) }, { children: infoText }))), additionalContent, documentationLink && (jsxRuntime.jsx("div", __assign({ className: "pl-12 pb-12" }, { children: jsxRuntime.jsx("a", __assign({ href: documentationLink, target: "_blank", rel: "noreferrer noopener", className: "fs-13 cb-5", onClick: closeTippy }, { children: documentationLinkText || 'Learn more' })) })))] }));
8703
8661
  };
@@ -8705,16 +8663,16 @@ function TippyCustomized(props) {
8705
8663
  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 })));
8706
8664
  }
8707
8665
 
8708
- var _path$3, _circle, _path2;
8709
- 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); }
8666
+ var _path$4, _circle, _path2;
8667
+ 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); }
8710
8668
  var SvgInjectTag = function SvgInjectTag(props) {
8711
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
8669
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
8712
8670
  width: "1em",
8713
8671
  height: "1em",
8714
8672
  viewBox: "0 0 20 20",
8715
8673
  fill: "none",
8716
8674
  xmlns: "http://www.w3.org/2000/svg"
8717
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
8675
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
8718
8676
  d: "M10 10H3.333",
8719
8677
  stroke: "#596168",
8720
8678
  strokeWidth: 1.5,
@@ -8734,6 +8692,21 @@ var SvgInjectTag = function SvgInjectTag(props) {
8734
8692
  })));
8735
8693
  };
8736
8694
 
8695
+ var _path$3;
8696
+ 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); }
8697
+ var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
8698
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
8699
+ xmlns: "http://www.w3.org/2000/svg",
8700
+ viewBox: "0 0 17 16",
8701
+ width: "1em",
8702
+ height: "1em"
8703
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
8704
+ fill: "#767D84",
8705
+ fillRule: "evenodd",
8706
+ 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"
8707
+ })));
8708
+ };
8709
+
8737
8710
  function PropagateTagInfo(_a) {
8738
8711
  var isCreateApp = _a.isCreateApp;
8739
8712
  var additionalInfo = function () {
@@ -9040,7 +9013,7 @@ ConfirmationDialog.ButtonGroup = ButtonGroup;
9040
9013
  var warn = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2248%22%20height%3D%2248%22%20viewBox%3D%220%200%2048%2048%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%200h48v48H0z%22%2F%3E%20%20%20%20%20%20%20%20%3Cg%20fill%3D%22%23FFEBEB%22%20stroke%3D%22%23F33E3E%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2024h24v17a4%204%200%200%201-4%204H11a4%204%200%200%201-4-4V24z%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M19%2029.5v10M24%2029.5v10M14%2029.5v10%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3Cpath%20stroke%3D%22%23F33E3E%22%20stroke-dasharray%3D%2217%2C3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M42%2010a3%203%200%200%201%200%206H31M38%2023a3%203%200%200%200-3-3h-8%22%2F%3E%20%20%20%20%20%20%20%20%3Cg%20stroke%3D%22%23F33E3E%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20transform%3D%22rotate%28-10%2036.29%20-8.86%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20width%3D%2230%22%20height%3D%225%22%20y%3D%226%22%20fill%3D%22%23FFEBEB%22%20rx%3D%221%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11%200h8a2%202%200%200%201%202%202v4H9V2a2%202%200%200%201%202-2z%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
9041
9014
 
9042
9015
  var DeleteDialog = function (props) {
9043
- return (jsxRuntime.jsxs(ConfirmationDialog, __assign({ className: "confirmation-dialog__body--w-400" }, { children: [jsxRuntime.jsx(ConfirmationDialog.Icon, { src: warn }), jsxRuntime.jsx(ConfirmationDialog.Body, __assign({ title: props.title }, { children: jsxRuntime.jsxs("div", __assign({ className: "fs-13 cn-7 lh-1-54 w-100" }, { children: [props.description ? props.description : null, props.children] })) })), jsxRuntime.jsx(ConfirmationDialog.ButtonGroup, { children: jsxRuntime.jsxs("div", __assign({ className: "flex right" }, { children: [jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel cta-cd-delete-modal ml-16", onClick: props.closeDelete, disabled: props.apiCallInProgress, "data-testid": "dialog-cancel" }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ type: "button", className: "cta delete cta-cd-delete-modal ml-16", onClick: function () { return props.delete(); }, disabled: props.apiCallInProgress, "data-testid": "dialog-delete" }, { children: props.apiCallInProgress ? (jsxRuntime.jsx(Progressing, {})) : ("".concat(props.deletePrefix || '').concat(props.buttonPrimaryText ? props.buttonPrimaryText : 'Delete').concat(props.deletePostfix || '')) }))] })) })] })));
9016
+ return jsxRuntime.jsxs(ConfirmationDialog, __assign({ className: "confirmation-dialog__body--w-400" }, { children: [jsxRuntime.jsx(ConfirmationDialog.Icon, { src: warn }), jsxRuntime.jsx(ConfirmationDialog.Body, __assign({ title: props.title }, { children: jsxRuntime.jsxs("div", __assign({ className: "fs-13 cn-7 lh-1-54 w-100" }, { children: [props.description ? props.description : null, props.children] })) })), jsxRuntime.jsx(ConfirmationDialog.ButtonGroup, { children: jsxRuntime.jsxs("div", __assign({ className: "flex right" }, { children: [jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel cta-cd-delete-modal ml-16", onClick: props.closeDelete, disabled: props.apiCallInProgress, "data-testid": "dialog-cancel" }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ type: "button", className: "cta delete cta-cd-delete-modal ml-16", onClick: function () { return props.delete(); }, disabled: props.apiCallInProgress, "data-testid": "dialog-delete" }, { children: props.apiCallInProgress ? jsxRuntime.jsx(Progressing, {}) : "".concat(props.deletePrefix || '', "Delete").concat(props.deletePostfix || '') }))] })) })] }));
9044
9017
  };
9045
9018
  function DeleteDialogDescription(props) {
9046
9019
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.children });
@@ -16739,66 +16712,6 @@ function Radio(_a) {
16739
16712
  }
16740
16713
  RadioGroup.Radio = Radio;
16741
16714
 
16742
- exports.RefVariableType = void 0;
16743
- (function (RefVariableType) {
16744
- RefVariableType["GLOBAL"] = "GLOBAL";
16745
- RefVariableType["FROM_PREVIOUS_STEP"] = "FROM_PREVIOUS_STEP";
16746
- RefVariableType["NEW"] = "NEW";
16747
- })(exports.RefVariableType || (exports.RefVariableType = {}));
16748
- exports.PluginType = void 0;
16749
- (function (PluginType) {
16750
- PluginType["INLINE"] = "INLINE";
16751
- PluginType["PLUGIN_REF"] = "REF_PLUGIN";
16752
- })(exports.PluginType || (exports.PluginType = {}));
16753
- exports.ScriptType = void 0;
16754
- (function (ScriptType) {
16755
- ScriptType["SHELL"] = "SHELL";
16756
- ScriptType["DOCKERFILE"] = "DOCKERFILE";
16757
- ScriptType["CONTAINERIMAGE"] = "CONTAINER_IMAGE";
16758
- })(exports.ScriptType || (exports.ScriptType = {}));
16759
- exports.MountPath = void 0;
16760
- (function (MountPath) {
16761
- MountPath["TRUE"] = "Yes";
16762
- MountPath["FALSE"] = "No";
16763
- })(exports.MountPath || (exports.MountPath = {}));
16764
- exports.ConditionType = void 0;
16765
- (function (ConditionType) {
16766
- ConditionType["SKIP"] = "SKIP";
16767
- ConditionType["TRIGGER"] = "TRIGGER";
16768
- ConditionType["PASS"] = "PASS";
16769
- ConditionType["FAIL"] = "FAIL";
16770
- })(exports.ConditionType || (exports.ConditionType = {}));
16771
- exports.RefVariableStageType = void 0;
16772
- (function (RefVariableStageType) {
16773
- RefVariableStageType["PRE_CI"] = "PRE_CI";
16774
- RefVariableStageType["POST_CI"] = "POST_CI";
16775
- })(exports.RefVariableStageType || (exports.RefVariableStageType = {}));
16776
- exports.CIBuildType = void 0;
16777
- (function (CIBuildType) {
16778
- CIBuildType["SELF_DOCKERFILE_BUILD_TYPE"] = "self-dockerfile-build";
16779
- CIBuildType["MANAGED_DOCKERFILE_BUILD_TYPE"] = "managed-dockerfile-build";
16780
- CIBuildType["BUILDPACK_BUILD_TYPE"] = "buildpack-build";
16781
- })(exports.CIBuildType || (exports.CIBuildType = {}));
16782
-
16783
- exports.ApplyPolicyToStage = void 0;
16784
- (function (ApplyPolicyToStage) {
16785
- ApplyPolicyToStage["PRE_CI"] = "PRE_CI";
16786
- ApplyPolicyToStage["POST_CI"] = "POST_CI";
16787
- ApplyPolicyToStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
16788
- })(exports.ApplyPolicyToStage || (exports.ApplyPolicyToStage = {}));
16789
- exports.PluginRequiredStage = void 0;
16790
- (function (PluginRequiredStage) {
16791
- PluginRequiredStage["PRE_CI"] = "preBuildStage";
16792
- PluginRequiredStage["POST_CI"] = "postBuildStage";
16793
- PluginRequiredStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
16794
- })(exports.PluginRequiredStage || (exports.PluginRequiredStage = {}));
16795
- exports.ConsequenceAction = void 0;
16796
- (function (ConsequenceAction) {
16797
- ConsequenceAction["BLOCK"] = "BLOCK";
16798
- ConsequenceAction["ALLOW_UNTIL_TIME"] = "ALLOW_UNTIL_TIME";
16799
- ConsequenceAction["ALLOW_FOREVER"] = "ALLOW_FOREVER";
16800
- })(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
16801
-
16802
16715
  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";
16803
16716
 
16804
16717
  function DeleteComponent(_a) {
@@ -16862,7 +16775,6 @@ function DeleteComponent(_a) {
16862
16775
 
16863
16776
  exports.BreadCrumb = BreadCrumb;
16864
16777
  exports.BreadcrumbStore = Store;
16865
- exports.BuildStageVariable = BuildStageVariable;
16866
16778
  exports.CDModalTab = CDModalTab;
16867
16779
  exports.Checkbox = Checkbox;
16868
16780
  exports.ClearIndicator = ClearIndicator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.9-beta-7",
3
+ "version": "0.0.9-beta-9",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -57,10 +57,4 @@ export const TOKEN_COOKIE_NAME = 'argocd.token'
57
57
  export const TriggerTypeMap = {
58
58
  automatic: 'Auto',
59
59
  manual: 'Manual',
60
- }
61
-
62
- export const BuildStageVariable = {
63
- PreBuild: 'preBuildStage',
64
- Build: 'buildStage',
65
- PostBuild: 'postBuildStage',
66
60
  }
@@ -1,53 +1,35 @@
1
- import React from 'react'
2
- import warn from '../../Assets/Img/delete-medium.svg'
1
+ import React from 'react';
2
+ import warn from '../../Assets/Img/warning-medium.svg';
3
3
  import { Progressing } from '../Progressing'
4
- import ConfirmationDialog from './ConfirmationDialog'
5
- import { DeleteDialogProps } from './Types'
4
+ import ConfirmationDialog from './ConfirmationDialog';
5
+ import { DeleteDialogProps } from './Types';
6
6
 
7
7
  export const DeleteDialog: React.FC<DeleteDialogProps> & { Description?: React.FC<any> } = function (props) {
8
- return (
9
- <ConfirmationDialog className="confirmation-dialog__body--w-400">
10
- <ConfirmationDialog.Icon src={warn} />
11
- <ConfirmationDialog.Body title={props.title}>
12
- <div className="fs-13 cn-7 lh-1-54 w-100">
13
- {props.description ? props.description : null}
14
- {props.children}
15
- </div>
16
- </ConfirmationDialog.Body>
17
- <ConfirmationDialog.ButtonGroup>
18
- <div className="flex right">
19
- <button
20
- type="button"
21
- className="cta cancel cta-cd-delete-modal ml-16"
22
- onClick={props.closeDelete}
23
- disabled={props.apiCallInProgress}
24
- data-testid="dialog-cancel"
25
- >
26
- Cancel
27
- </button>
28
- <button
29
- type="button"
30
- className="cta delete cta-cd-delete-modal ml-16"
31
- onClick={() => props.delete()}
32
- disabled={props.apiCallInProgress}
33
- data-testid="dialog-delete"
34
- >
35
- {props.apiCallInProgress ? (
36
- <Progressing />
37
- ) : (
38
- `${props.deletePrefix || ''}${
39
- props.buttonPrimaryText ? props.buttonPrimaryText : 'Delete'
40
- }${props.deletePostfix || ''}`
41
- )}
42
- </button>
43
- </div>
44
- </ConfirmationDialog.ButtonGroup>
45
- </ConfirmationDialog>
46
- )
8
+
9
+ return <ConfirmationDialog className="confirmation-dialog__body--w-400">
10
+ <ConfirmationDialog.Icon src={warn} />
11
+ <ConfirmationDialog.Body title={props.title}>
12
+ <div className="fs-13 cn-7 lh-1-54 w-100">
13
+ {props.description ? props.description : null}
14
+ {props.children}
15
+ </div>
16
+ </ConfirmationDialog.Body>
17
+ <ConfirmationDialog.ButtonGroup>
18
+ <div className="flex right">
19
+ <button type="button" className="cta cancel cta-cd-delete-modal ml-16" onClick={props.closeDelete} disabled={props.apiCallInProgress} data-testid="dialog-cancel">Cancel</button>
20
+ <button type="button" className="cta delete cta-cd-delete-modal ml-16" onClick={() => props.delete()} disabled={props.apiCallInProgress} data-testid="dialog-delete">
21
+ {props.apiCallInProgress ? <Progressing /> : `${props.deletePrefix || ''}Delete${props.deletePostfix || ''}`}
22
+ </button>
23
+ </div>
24
+ </ConfirmationDialog.ButtonGroup>
25
+ </ConfirmationDialog >
47
26
  }
48
27
 
49
28
  function DeleteDialogDescription(props) {
50
- return <>{props.children}</>
29
+
30
+ return <>
31
+ {props.children}
32
+ </>
51
33
  }
52
34
 
53
- DeleteDialog.Description = DeleteDialogDescription
35
+ DeleteDialog.Description = DeleteDialogDescription;
@@ -9,7 +9,6 @@ export interface DeleteDialogProps {
9
9
  deletePostfix?: string
10
10
  apiCallInProgress?: boolean
11
11
  dataTestId?: string
12
- buttonPrimaryText?: string
13
12
  }
14
13
 
15
14
  export interface ForceDeleteDialogType {