@devtron-labs/devtron-fe-common-lib 0.0.6-beta-25 → 0.0.7

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.
@@ -24,6 +24,7 @@ export declare const DEFAULT_TAG_DATA: {
24
24
  propagate: boolean;
25
25
  isInvalidKey: boolean;
26
26
  isInvalidValue: boolean;
27
+ isSuggested: boolean;
27
28
  };
28
29
  export declare const TOAST_ACCESS_DENIED: {
29
30
  TITLE: string;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { ResizableTagTextAreaProps } from '../Types';
2
+ import { ResizableTagTextAreaProps } from './Types';
3
3
  export declare function ResizableTagTextArea({ className, minHeight, maxHeight, value, onChange, onBlur, onFocus, placeholder, tabIndex, refVar, dependentRef, }: ResizableTagTextAreaProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { TagDetailType } from '../Types';
3
- export default function TagDetails({ index, tagData, setTagData, removeTag, tabIndex, suggestedTagsOptions, }: TagDetailType): JSX.Element;
2
+ import { TagDetailType } from './Types';
3
+ export declare const TagDetails: ({ index, tagData, setTagData, removeTag, tabIndex, suggestedTagsOptions, }: TagDetailType) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { TagLabelSelectType } from '../Types';
3
- export declare const TagLabelSelect: ({ isCreateApp, labelTags, setLabelTags, tabIndex, suggestedTagsOptions, }: TagLabelSelectType) => JSX.Element;
2
+ import { TagLabelSelectType } from './Types';
3
+ export declare const TagLabelSelect: ({ isCreateApp, labelTags, setLabelTags, tabIndex }: TagLabelSelectType) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { TagLabelValueSelectorType } from '../Types';
2
+ import { TagLabelValueSelectorType } from './Types';
3
3
  export declare const TagLabelValueSelector: ({ selectedTagIndex, tagData, setTagData, tagOptions, isRequired, tagInputType, placeholder, tabIndex, refVar, dependentRef, }: TagLabelValueSelectorType) => JSX.Element;
@@ -0,0 +1,59 @@
1
+ /// <reference types="react" />
2
+ import { KEY_VALUE } from '../Constants';
3
+ import { OptionType } from '../Types';
4
+ export interface TagType {
5
+ id?: number;
6
+ key: string;
7
+ value?: string;
8
+ description?: string;
9
+ propagate: boolean;
10
+ mandatoryProjectIdsCsv?: string;
11
+ isInvalidKey?: boolean;
12
+ isInvalidValue?: boolean;
13
+ isSuggested?: boolean;
14
+ }
15
+ export interface TagErrorType {
16
+ isValid: boolean;
17
+ messages: string[];
18
+ }
19
+ export interface TagLabelSelectType {
20
+ isCreateApp?: boolean;
21
+ labelTags: TagType[];
22
+ setLabelTags: (tagList: TagType[]) => void;
23
+ tabIndex?: number;
24
+ selectedProjectId?: number;
25
+ suggestedTagsOptions?: OptionType[];
26
+ }
27
+ export interface TagDetailType {
28
+ index: number;
29
+ tagData: TagType;
30
+ setTagData: (index: number, tagData: TagType) => void;
31
+ removeTag?: (index: number) => void;
32
+ tabIndex?: number;
33
+ suggestedTagsOptions?: OptionType[];
34
+ }
35
+ export interface TagLabelValueSelectorType {
36
+ selectedTagIndex: number;
37
+ tagData: TagType;
38
+ setTagData: (index: number, tagData: TagType) => void;
39
+ tagOptions?: OptionType[];
40
+ isRequired?: boolean;
41
+ tagInputType?: KEY_VALUE;
42
+ placeholder?: string;
43
+ tabIndex?: number;
44
+ refVar?: React.MutableRefObject<HTMLTextAreaElement>;
45
+ dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
46
+ }
47
+ export interface ResizableTagTextAreaProps {
48
+ className?: string;
49
+ minHeight?: number;
50
+ maxHeight?: number;
51
+ value?: string;
52
+ onChange?: (e: any) => void;
53
+ onBlur?: (e: any) => void;
54
+ onFocus?: (e: any) => void;
55
+ placeholder?: string;
56
+ tabIndex?: number;
57
+ refVar?: React.MutableRefObject<HTMLTextAreaElement>;
58
+ dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
59
+ }
@@ -1,3 +1,6 @@
1
+ export { default as PropagateTagInfo } from './PropagateTagInfo';
2
+ export * from './TagDetails';
1
3
  export * from './TagLabelSelect';
2
4
  export * from './TagLabelValueSelector';
3
5
  export * from './ResizableTagTextArea';
6
+ export * from './Types';
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- import { KEY_VALUE } from './Constants';
3
1
  export interface ResponseType {
4
2
  code: number;
5
3
  status: string;
@@ -19,61 +17,6 @@ export declare enum TippyTheme {
19
17
  black = "black",
20
18
  white = "white"
21
19
  }
22
- export interface TagType {
23
- id?: number;
24
- key: string;
25
- value?: string;
26
- description?: string;
27
- propagate: boolean;
28
- mandatoryProjectIdsCsv?: string;
29
- isInvalidKey?: boolean;
30
- isInvalidValue?: boolean;
31
- }
32
- export interface TagErrorType {
33
- isValid: boolean;
34
- messages: string[];
35
- }
36
- export interface TagLabelSelectType {
37
- isCreateApp?: boolean;
38
- labelTags: TagType[];
39
- setLabelTags: (tagList: TagType[]) => void;
40
- tabIndex?: number;
41
- selectedProjectId?: number;
42
- suggestedTagsOptions?: OptionType[];
43
- }
44
- export interface TagDetailType {
45
- index: number;
46
- tagData: TagType;
47
- setTagData: (index: number, tagData: TagType) => void;
48
- removeTag?: (index: number) => void;
49
- tabIndex?: number;
50
- suggestedTagsOptions?: OptionType[];
51
- }
52
- export interface TagLabelValueSelectorType {
53
- selectedTagIndex: number;
54
- tagData: TagType;
55
- setTagData: (index: number, tagData: TagType) => void;
56
- tagOptions?: OptionType[];
57
- isRequired?: boolean;
58
- tagInputType?: KEY_VALUE;
59
- placeholder?: string;
60
- tabIndex?: number;
61
- refVar?: React.MutableRefObject<HTMLTextAreaElement>;
62
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
63
- }
64
- export interface ResizableTagTextAreaProps {
65
- className?: string;
66
- minHeight?: number;
67
- maxHeight?: number;
68
- value?: string;
69
- onChange?: (e: any) => void;
70
- onBlur?: (e: any) => void;
71
- onFocus?: (e: any) => void;
72
- placeholder?: string;
73
- tabIndex?: number;
74
- refVar?: React.MutableRefObject<HTMLTextAreaElement>;
75
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
76
- }
77
20
  export interface TeamList extends ResponseType {
78
21
  result: Teams[];
79
22
  }
package/dist/index.js CHANGED
@@ -7,20 +7,20 @@ var reactRouter = require('react-router');
7
7
  var reactRouterDom = require('react-router-dom');
8
8
 
9
9
  function _interopNamespaceDefault(e) {
10
- var n = Object.create(null);
11
- if (e) {
12
- Object.keys(e).forEach(function (k) {
13
- if (k !== 'default') {
14
- var d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: function () { return e[k]; }
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
18
20
  });
19
- }
20
- });
21
- }
22
- n.default = e;
23
- return Object.freeze(n);
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
24
  }
25
25
 
26
26
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
@@ -46,7 +46,14 @@ exports.KEY_VALUE = void 0;
46
46
  KEY_VALUE["KEY"] = "key";
47
47
  KEY_VALUE["VALUE"] = "value";
48
48
  })(exports.KEY_VALUE || (exports.KEY_VALUE = {}));
49
- var DEFAULT_TAG_DATA = { key: '', value: '', propagate: false, isInvalidKey: false, isInvalidValue: false };
49
+ var DEFAULT_TAG_DATA = {
50
+ key: '',
51
+ value: '',
52
+ propagate: false,
53
+ isInvalidKey: false,
54
+ isInvalidValue: false,
55
+ isSuggested: true,
56
+ };
50
57
  var TOAST_ACCESS_DENIED = {
51
58
  TITLE: 'Access denied',
52
59
  SUBTITLE: 'You do not have required access to perform this action',
@@ -459,9 +466,9 @@ var css_248z$3 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n heig
459
466
  styleInject(css_248z$3);
460
467
 
461
468
  var _g$2;
462
- 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); }
469
+ 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); }
463
470
  var SvgIcProgressing = function SvgIcProgressing(props) {
464
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
471
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
465
472
  xmlns: "http://www.w3.org/2000/svg",
466
473
  viewBox: "0 0 24 24",
467
474
  width: "1em",
@@ -513,8 +520,8 @@ EmptyState.Loading = Loading;
513
520
 
514
521
  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}
515
522
 
516
- function _extends$a() {
517
- _extends$a = Object.assign || function (target) {
523
+ function _extends$9() {
524
+ _extends$9 = Object.assign || function (target) {
518
525
  for (var i = 1; i < arguments.length; i++) {
519
526
  var source = arguments[i];
520
527
 
@@ -528,7 +535,7 @@ function _extends$a() {
528
535
  return target;
529
536
  };
530
537
 
531
- return _extends$a.apply(this, arguments);
538
+ return _extends$9.apply(this, arguments);
532
539
  }
533
540
 
534
541
  function _objectWithoutPropertiesLoose$2(source, excluded) {
@@ -1254,7 +1261,7 @@ function ProgressBar(_ref) {
1254
1261
  isIn = _ref.isIn,
1255
1262
  theme = _ref.theme;
1256
1263
 
1257
- var style = _extends$a({}, userStyle, {
1264
+ var style = _extends$9({}, userStyle, {
1258
1265
  animationDuration: delay + "ms",
1259
1266
  animationPlayState: isRunning ? 'running' : 'paused',
1260
1267
  opacity: hide ? 0 : 1
@@ -1531,9 +1538,9 @@ var ToastContainer = function ToastContainer(props) {
1531
1538
  ,
1532
1539
  id: containerId
1533
1540
  }, getToastToRender(function (position, toastList) {
1534
- var containerStyle = !toastList.length ? _extends$a({}, style, {
1541
+ var containerStyle = !toastList.length ? _extends$9({}, style, {
1535
1542
  pointerEvents: 'none'
1536
- }) : _extends$a({}, style);
1543
+ }) : _extends$9({}, style);
1537
1544
  return React.createElement("div", {
1538
1545
  className: getClassName(position),
1539
1546
  style: containerStyle,
@@ -1640,7 +1647,7 @@ function dispatchToast(content, options) {
1640
1647
 
1641
1648
 
1642
1649
  function mergeOptions(type, options) {
1643
- return _extends$a({}, options, {
1650
+ return _extends$9({}, options, {
1644
1651
  type: options && options.type || type,
1645
1652
  toastId: getToastId(options)
1646
1653
  });
@@ -1657,7 +1664,7 @@ function toast(content, options) {
1657
1664
  }
1658
1665
 
1659
1666
  toast.loading = function (content, options) {
1660
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$a({
1667
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$9({
1661
1668
  isLoading: true,
1662
1669
  autoClose: false,
1663
1670
  closeOnClick: false,
@@ -1673,7 +1680,7 @@ function handlePromise(promise, _ref2, options) {
1673
1680
  var id;
1674
1681
 
1675
1682
  if (pending) {
1676
- id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$a({}, options, pending));
1683
+ id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends$9({}, options, pending));
1677
1684
  }
1678
1685
 
1679
1686
  var resetParams = {
@@ -1692,7 +1699,7 @@ function handlePromise(promise, _ref2, options) {
1692
1699
  return;
1693
1700
  }
1694
1701
 
1695
- var baseParams = _extends$a({
1702
+ var baseParams = _extends$9({
1696
1703
  type: type
1697
1704
  }, resetParams, options, {
1698
1705
  data: result
@@ -1703,10 +1710,10 @@ function handlePromise(promise, _ref2, options) {
1703
1710
  } : input; // if the id is set we know that it's an update
1704
1711
 
1705
1712
  if (id) {
1706
- toast.update(id, _extends$a({}, baseParams, params));
1713
+ toast.update(id, _extends$9({}, baseParams, params));
1707
1714
  } else {
1708
1715
  // using toast.promise without loading
1709
- toast(params.render, _extends$a({}, baseParams, params));
1716
+ toast(params.render, _extends$9({}, baseParams, params));
1710
1717
  }
1711
1718
 
1712
1719
  return result;
@@ -1730,7 +1737,7 @@ toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
1730
1737
  toast.warn = toast.warning;
1731
1738
 
1732
1739
  toast.dark = function (content, options) {
1733
- return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$a({
1740
+ return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends$9({
1734
1741
  theme: 'dark'
1735
1742
  }, options)));
1736
1743
  };
@@ -1787,7 +1794,7 @@ toast.update = function (toastId, options) {
1787
1794
  var oldOptions = toast.props,
1788
1795
  oldContent = toast.content;
1789
1796
 
1790
- var nextOptions = _extends$a({}, oldOptions, options, {
1797
+ var nextOptions = _extends$9({}, oldOptions, options, {
1791
1798
  toastId: options.toastId || toastId,
1792
1799
  updateId: generateToastId()
1793
1800
  });
@@ -4063,25 +4070,6 @@ var Modal = function (_a) {
4063
4070
  }, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
4064
4071
  };
4065
4072
 
4066
- var _defs, _use;
4067
- 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); }
4068
- var SvgIcClose = function SvgIcClose(props) {
4069
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
4070
- xmlns: "http://www.w3.org/2000/svg",
4071
- xmlnsXlink: "http://www.w3.org/1999/xlink",
4072
- width: "1em",
4073
- height: "1em",
4074
- viewBox: "0 0 24 24"
4075
- }, props), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("path", {
4076
- id: "ic-close_svg__a",
4077
- className: "ic-close_svg__stroke-color",
4078
- d: "M18.295 5.705a.997.997 0 0 0-1.41 0L12 10.59 7.115 5.705a.997.997 0 1 0-1.41 1.41L10.59 12l-4.885 4.885a.997.997 0 1 0 1.41 1.41L12 13.41l4.885 4.885a.997.997 0 0 0 1.41-1.41L13.41 12l4.885-4.885a.997.997 0 0 0 0-1.41z"
4079
- }))), _use || (_use = /*#__PURE__*/React__namespace.createElement("use", {
4080
- fill: "#999",
4081
- xlinkHref: "#ic-close_svg__a",
4082
- fillRule: "evenodd"
4083
- })));
4084
- };
4085
4073
  var close = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpath%20id%3D%22a%22%20class%3D%22stroke-color%22%20d%3D%22M18.295%205.705a.997.997%200%200%200-1.41%200L12%2010.59%207.115%205.705a.997.997%200%201%200-1.41%201.41L10.59%2012l-4.885%204.885a.997.997%200%201%200%201.41%201.41L12%2013.41l4.885%204.885a.997.997%200%200%200%201.41-1.41L13.41%2012l4.885-4.885a.997.997%200%200%200%200-1.41z%22%2F%3E%20%20%20%20%3C%2Fdefs%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%22%22%2F%3E%20%20%20%20%20%20%20%20%3Cuse%20fill%3D%22%23999%22%20xlink%3Ahref%3D%22%23a%22%2F%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
4086
4074
 
4087
4075
  var OpaqueModal = /** @class */ (function (_super) {
@@ -8480,21 +8468,6 @@ function PropagateTagInfo(_a) {
8480
8468
  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" })] })) })));
8481
8469
  }
8482
8470
 
8483
- var _path$2;
8484
- 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); }
8485
- var SvgIcAdd = function SvgIcAdd(props) {
8486
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
8487
- xmlns: "http://www.w3.org/2000/svg",
8488
- width: "1em",
8489
- height: "1em",
8490
- viewBox: "0 0 24 24"
8491
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
8492
- className: "ic-add_svg__fill-color",
8493
- fill: "#999",
8494
- 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"
8495
- })));
8496
- };
8497
-
8498
8471
  var validateTagValue = function (value) {
8499
8472
  var errorList = [];
8500
8473
  if (value.length > 63) {
@@ -8555,15 +8528,15 @@ var ValidationRules = /** @class */ (function () {
8555
8528
  return ValidationRules;
8556
8529
  }());
8557
8530
 
8558
- var _path$1;
8559
- 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); }
8531
+ var _path$2;
8532
+ 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); }
8560
8533
  var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
8561
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
8534
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
8562
8535
  xmlns: "http://www.w3.org/2000/svg",
8563
8536
  width: "1em",
8564
8537
  height: "1em",
8565
8538
  viewBox: "0 0 20 20"
8566
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
8539
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
8567
8540
  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",
8568
8541
  fill: "#06C",
8569
8542
  fillRule: "evenodd"
@@ -8636,7 +8609,7 @@ var TagLabelValueSelector = function (_a) {
8636
8609
  ? !validationRules.propagateTagKey(selectedValue).isValid
8637
8610
  : _tagData.value !== '';
8638
8611
  }
8639
- else if (selectedValue) {
8612
+ else if (selectedValue || isRequired) {
8640
8613
  _tagData.isInvalidValue = !validationRules.propagateTagValue(selectedValue).isValid;
8641
8614
  _tagData.isInvalidKey = !_tagData.key || _tagData.isInvalidKey;
8642
8615
  }
@@ -8675,7 +8648,7 @@ var TagLabelValueSelector = function (_a) {
8675
8648
  if (tagOptions === null || tagOptions === void 0 ? void 0 : tagOptions.length) {
8676
8649
  var filteredTags = tagOptions.filter(function (tag) { return tag.value.indexOf(selectedValue) >= 0; });
8677
8650
  if (filteredTags.length) {
8678
- return (jsxRuntime.jsx("div", __assign({ className: "p-8" }, { children: filteredTags.map(function (tag, index) { return (jsxRuntime.jsx("div", __assign({ "data-key": tag.label, className: "cursor", onClick: onSelectValue }, { children: tag.label }), "".concat(tag.value, "-").concat(index))); }) })));
8651
+ return (jsxRuntime.jsx("div", { children: filteredTags.map(function (tag, index) { return (jsxRuntime.jsx("div", __assign({ "data-key": tag.label, className: "dc__hover-n50 lh-20 fs-13 fw-4 pt-6 pr-8 pb-6 pl-8 cursor", onClick: onSelectValue }, { children: tag.label }), "".concat(tag.value, "-").concat(index))); }) }));
8679
8652
  }
8680
8653
  }
8681
8654
  return renderValidationsSuggestions();
@@ -8687,7 +8660,7 @@ var TagLabelValueSelector = function (_a) {
8687
8660
  : ''), value: selectedValue, onChange: handleInputChange, onBlur: handleOnBlur, onFocus: handleOnFocus, placeholder: placeholder, tabIndex: tabIndex, refVar: refVar, dependentRef: dependentRef }) })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) && renderSuggestions() }))] })));
8688
8661
  };
8689
8662
 
8690
- function TagDetails(_a) {
8663
+ var TagDetails = function (_a) {
8691
8664
  var index = _a.index, tagData = _a.tagData, setTagData = _a.setTagData, removeTag = _a.removeTag, _b = _a.tabIndex, tabIndex = _b === void 0 ? 1 : _b, suggestedTagsOptions = _a.suggestedTagsOptions;
8692
8665
  var keyRef = React.useRef(null);
8693
8666
  var valueRef = React.useRef(null);
@@ -8700,11 +8673,26 @@ function TagDetails(_a) {
8700
8673
  _tagData.propagate = !_tagData.propagate;
8701
8674
  setTagData(index, _tagData);
8702
8675
  };
8703
- 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' : ''), onClick: propagateTagToResource }, { 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 }, { children: jsxRuntime.jsx(SvgIcClose, { className: "icon-dim-20 mt-4" }) }))] })));
8704
- }
8676
+ 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' : ''), onClick: propagateTagToResource }, { 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 }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-20 mt-4" }) }))] })));
8677
+ };
8678
+
8679
+ var _path$1;
8680
+ 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); }
8681
+ var SvgIcAdd = function SvgIcAdd(props) {
8682
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
8683
+ xmlns: "http://www.w3.org/2000/svg",
8684
+ width: "1em",
8685
+ height: "1em",
8686
+ viewBox: "0 0 24 24"
8687
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
8688
+ className: "ic-add_svg__fill-color",
8689
+ fill: "#999",
8690
+ 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"
8691
+ })));
8692
+ };
8705
8693
 
8706
8694
  var TagLabelSelect = function (_a) {
8707
- var isCreateApp = _a.isCreateApp, labelTags = _a.labelTags, setLabelTags = _a.setLabelTags, _b = _a.tabIndex, tabIndex = _b === void 0 ? 0 : _b, suggestedTagsOptions = _a.suggestedTagsOptions;
8695
+ var isCreateApp = _a.isCreateApp, labelTags = _a.labelTags, setLabelTags = _a.setLabelTags, _b = _a.tabIndex, tabIndex = _b === void 0 ? 0 : _b;
8708
8696
  var setTagData = function (index, tagValue) {
8709
8697
  var _tags = __spreadArray([], __read(labelTags), false);
8710
8698
  _tags[index] = tagValue;
@@ -8720,7 +8708,7 @@ var TagLabelSelect = function (_a) {
8720
8708
  _tags.splice(index, 1);
8721
8709
  setLabelTags(_tags);
8722
8710
  };
8723
- return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space mb-8" }, { children: [jsxRuntime.jsx("span", { children: "Tags" }), jsxRuntime.jsx(PropagateTagInfo, { isCreateApp: isCreateApp })] })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign({ className: "dc_width-max-content cb-5 fw-6 fs-13 flexbox mr-20 mb-8 cursor", onClick: addNewTag }, { children: [jsxRuntime.jsx(SvgIcAdd, { className: "icon-dim-20 fcb-5" }), " Add tag"] })), jsxRuntime.jsx("div", __assign({ className: "mb-8" }, { children: labelTags === null || labelTags === void 0 ? void 0 : labelTags.map(function (tagData, index) { return (jsxRuntime.jsx(TagDetails, { index: index, tagData: tagData, setTagData: setTagData, removeTag: removeTag, tabIndex: tabIndex + (index + 2), suggestedTagsOptions: suggestedTagsOptions }, "tag-".concat(index))); }) }))] })] }));
8711
+ return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign({ className: "flexbox dc__content-space mb-8" }, { children: [jsxRuntime.jsx("span", { children: "Tags" }), jsxRuntime.jsx(PropagateTagInfo, { isCreateApp: isCreateApp })] })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign({ className: "dc_width-max-content cb-5 fw-6 fs-13 flexbox mr-20 mb-8 cursor", onClick: addNewTag }, { children: [jsxRuntime.jsx(SvgIcAdd, { className: "icon-dim-20 fcb-5" }), " Add tag"] })), jsxRuntime.jsx("div", __assign({ className: "mb-8" }, { children: labelTags === null || labelTags === void 0 ? void 0 : labelTags.map(function (tagData, index) { return (jsxRuntime.jsx(TagDetails, { index: index, tagData: tagData, setTagData: setTagData, removeTag: removeTag, tabIndex: tabIndex + (index + 2) }, "tag-".concat(index))); }) }))] })] }));
8724
8712
  };
8725
8713
 
8726
8714
  function ConfirmationDialog(_a) {
@@ -16391,6 +16379,7 @@ exports.Option = Option;
16391
16379
  exports.PATTERNS = PATTERNS;
16392
16380
  exports.PopupMenu = PopupMenu;
16393
16381
  exports.Progressing = Progressing;
16382
+ exports.PropagateTagInfo = PropagateTagInfo;
16394
16383
  exports.ROUTES = ROUTES;
16395
16384
  exports.RadioGroup = RadioGroup;
16396
16385
  exports.RadioGroupItem = RadioGroupItem;
@@ -16400,6 +16389,7 @@ exports.ServerError = ServerError;
16400
16389
  exports.ServerErrors = ServerErrors;
16401
16390
  exports.SingleSelectOption = SingleSelectOption;
16402
16391
  exports.TOAST_ACCESS_DENIED = TOAST_ACCESS_DENIED;
16392
+ exports.TagDetails = TagDetails;
16403
16393
  exports.TagLabelSelect = TagLabelSelect;
16404
16394
  exports.TagLabelValueSelector = TagLabelValueSelector;
16405
16395
  exports.TippyCustomized = TippyCustomized;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.6-beta-25",
3
+ "version": "0.0.7",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -8,31 +8,38 @@ export const DOCUMENTATION = {
8
8
  }
9
9
 
10
10
  export const PATTERNS = {
11
- KUBERNETES_KEY_PREFIX: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/,
12
- KUBERNETES_KEY_NAME: /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$/,
13
- START_END_ALPHANUMERIC: /^([Az09].*[A-Za-z0-9])$|[A-Za-z0-9]$/,
14
- ALPHANUMERIC_WITH_SPECIAL_CHAR: /^[A-Za-z0-9._-]+$/, // allow alphanumeric,(.) ,(-),(_)
11
+ KUBERNETES_KEY_PREFIX: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/,
12
+ KUBERNETES_KEY_NAME: /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$/,
13
+ START_END_ALPHANUMERIC: /^([Az09].*[A-Za-z0-9])$|[A-Za-z0-9]$/,
14
+ ALPHANUMERIC_WITH_SPECIAL_CHAR: /^[A-Za-z0-9._-]+$/, // allow alphanumeric,(.) ,(-),(_)
15
15
  }
16
16
 
17
17
  export const ROUTES = {
18
- PROJECT_LIST_MIN: 'team/autocomplete',
18
+ PROJECT_LIST_MIN: 'team/autocomplete',
19
19
  }
20
20
 
21
21
  export enum KEY_VALUE {
22
- KEY= 'key',
23
- VALUE= 'value'
22
+ KEY = 'key',
23
+ VALUE = 'value',
24
24
  }
25
25
 
26
- export const DEFAULT_TAG_DATA = { key: '', value: '', propagate: false, isInvalidKey: false, isInvalidValue: false }
26
+ export const DEFAULT_TAG_DATA = {
27
+ key: '',
28
+ value: '',
29
+ propagate: false,
30
+ isInvalidKey: false,
31
+ isInvalidValue: false,
32
+ isSuggested: true,
33
+ }
27
34
 
28
35
  export const TOAST_ACCESS_DENIED = {
29
- TITLE: 'Access denied',
30
- SUBTITLE: 'You do not have required access to perform this action',
36
+ TITLE: 'Access denied',
37
+ SUBTITLE: 'You do not have required access to perform this action',
31
38
  }
32
39
 
33
40
  // Empty state messgaes
34
41
  export const ERROR_EMPTY_SCREEN = {
35
- PAGE_NOT_FOUND: 'We could not find this page',
36
- PAGE_NOT_EXIST: 'This page doesn’t exist or was removed. We suggest you go back to home',
37
- TAKE_BACK_HOME: 'Take me home',
38
- }
42
+ PAGE_NOT_FOUND: 'We could not find this page',
43
+ PAGE_NOT_EXIST: 'This page doesn’t exist or was removed. We suggest you go back to home',
44
+ TAKE_BACK_HOME: 'Take me home',
45
+ }
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react'
2
2
  import { useThrottledEffect } from '../Helper'
3
- import { ResizableTagTextAreaProps } from '../Types'
3
+ import { ResizableTagTextAreaProps } from './Types'
4
4
 
5
5
  export function ResizableTagTextArea({
6
6
  className,
@@ -1,19 +1,19 @@
1
1
  import React, { useRef } from 'react'
2
- import { ReactComponent as DeleteCross } from '../../Assets/Icon/ic-close.svg'
2
+ import { ReactComponent as DeleteCross } from '../../Assets/Icon/ic-cross.svg'
3
3
  import { ReactComponent as InjectTag } from '../../Assets/Icon/inject-tag.svg'
4
- import { TagDetailType } from '../Types'
5
4
  import { TagLabelValueSelector } from './TagLabelValueSelector'
6
5
  import { KEY_VALUE } from '../Constants'
7
6
  import { stopPropagation } from '../Helper'
7
+ import { TagDetailType } from './Types'
8
8
 
9
- export default function TagDetails({
9
+ export const TagDetails = ({
10
10
  index,
11
11
  tagData,
12
12
  setTagData,
13
13
  removeTag,
14
14
  tabIndex = 1,
15
15
  suggestedTagsOptions,
16
- }: TagDetailType) {
16
+ }: TagDetailType) => {
17
17
  const keyRef = useRef(null)
18
18
  const valueRef = useRef(null)
19
19
 
@@ -1,16 +1,15 @@
1
1
  import React from 'react'
2
2
  import PropagateTagInfo from './PropagateTagInfo'
3
3
  import { ReactComponent as Add } from '../../Assets/Icon/ic-add.svg'
4
- import TagDetails from './TagDetails'
5
- import { TagLabelSelectType } from '../Types'
6
4
  import { DEFAULT_TAG_DATA } from '../Constants'
5
+ import { TagLabelSelectType } from './Types'
6
+ import { TagDetails } from './TagDetails'
7
7
 
8
8
  export const TagLabelSelect = ({
9
9
  isCreateApp,
10
10
  labelTags,
11
11
  setLabelTags,
12
- tabIndex = 0,
13
- suggestedTagsOptions,
12
+ tabIndex = 0
14
13
  }: TagLabelSelectType) => {
15
14
  const setTagData = (index, tagValue): void => {
16
15
  const _tags = [...labelTags]
@@ -49,7 +48,6 @@ export const TagLabelSelect = ({
49
48
  setTagData={setTagData}
50
49
  removeTag={removeTag}
51
50
  tabIndex={tabIndex + (index + 2)}
52
- suggestedTagsOptions={suggestedTagsOptions}
53
51
  />
54
52
  ))}
55
53
  </div>
@@ -1,5 +1,4 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { TagLabelValueSelectorType } from '../Types'
3
2
  import PopupMenu from '../PopupMenu'
4
3
  import { ValidationRules } from './ValidationRules'
5
4
  import { ReactComponent as ErrorCross } from '../../Assets/Icon/ic-cross.svg'
@@ -7,6 +6,7 @@ import { ReactComponent as Info } from '../../Assets/Icon/ic-info-outlined.svg'
7
6
  import { KEY_VALUE } from '../Constants'
8
7
  import { stopPropagation } from '../Helper'
9
8
  import { ResizableTagTextArea } from './ResizableTagTextArea'
9
+ import { TagLabelValueSelectorType } from './Types'
10
10
 
11
11
  export const TagLabelValueSelector = ({
12
12
  selectedTagIndex,
@@ -46,7 +46,7 @@ export const TagLabelValueSelector = ({
46
46
  _tagData.isInvalidKey = selectedValue
47
47
  ? !validationRules.propagateTagKey(selectedValue).isValid
48
48
  : _tagData.value !== ''
49
- } else if (selectedValue) {
49
+ } else if (selectedValue || isRequired) {
50
50
  _tagData.isInvalidValue = !validationRules.propagateTagValue(selectedValue).isValid
51
51
  _tagData.isInvalidKey = !_tagData.key || _tagData.isInvalidKey
52
52
  } else {
@@ -107,12 +107,12 @@ export const TagLabelValueSelector = ({
107
107
  const filteredTags = tagOptions.filter((tag) => tag.value.indexOf(selectedValue) >= 0)
108
108
  if (filteredTags.length) {
109
109
  return (
110
- <div className="p-8">
110
+ <div>
111
111
  {filteredTags.map((tag, index) => (
112
112
  <div
113
113
  key={`${tag.value}-${index}`}
114
114
  data-key={tag.label}
115
- className="cursor"
115
+ className="dc__hover-n50 lh-20 fs-13 fw-4 pt-6 pr-8 pb-6 pl-8 cursor"
116
116
  onClick={onSelectValue}
117
117
  >
118
118
  {tag.label}
@@ -0,0 +1,63 @@
1
+ import { KEY_VALUE } from '../Constants'
2
+ import { OptionType } from '../Types'
3
+
4
+ export interface TagType {
5
+ id?: number
6
+ key: string
7
+ value?: string
8
+ description?: string
9
+ propagate: boolean
10
+ mandatoryProjectIdsCsv?: string
11
+ isInvalidKey?: boolean
12
+ isInvalidValue?: boolean
13
+ isSuggested?: boolean
14
+ }
15
+
16
+ export interface TagErrorType {
17
+ isValid: boolean
18
+ messages: string[]
19
+ }
20
+ export interface TagLabelSelectType {
21
+ isCreateApp?: boolean
22
+ labelTags: TagType[]
23
+ setLabelTags: (tagList: TagType[]) => void
24
+ tabIndex?: number
25
+ selectedProjectId?: number
26
+ suggestedTagsOptions?: OptionType[]
27
+ }
28
+
29
+ export interface TagDetailType {
30
+ index: number
31
+ tagData: TagType
32
+ setTagData: (index: number, tagData: TagType) => void
33
+ removeTag?: (index: number) => void
34
+ tabIndex?: number
35
+ suggestedTagsOptions?: OptionType[]
36
+ }
37
+
38
+ export interface TagLabelValueSelectorType {
39
+ selectedTagIndex: number
40
+ tagData: TagType
41
+ setTagData: (index: number, tagData: TagType) => void
42
+ tagOptions?: OptionType[]
43
+ isRequired?: boolean
44
+ tagInputType?: KEY_VALUE
45
+ placeholder?: string
46
+ tabIndex?: number
47
+ refVar?: React.MutableRefObject<HTMLTextAreaElement>
48
+ dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
49
+ }
50
+
51
+ export interface ResizableTagTextAreaProps {
52
+ className?: string
53
+ minHeight?: number
54
+ maxHeight?: number
55
+ value?: string
56
+ onChange?: (e) => void
57
+ onBlur?: (e) => void
58
+ onFocus?: (e) => void
59
+ placeholder?: string
60
+ tabIndex?: number
61
+ refVar?: React.MutableRefObject<HTMLTextAreaElement>
62
+ dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
63
+ }
@@ -1,3 +1,6 @@
1
+ export {default as PropagateTagInfo} from './PropagateTagInfo'
2
+ export * from './TagDetails'
1
3
  export * from './TagLabelSelect'
2
4
  export * from './TagLabelValueSelector'
3
- export * from './ResizableTagTextArea'
5
+ export * from './ResizableTagTextArea'
6
+ export * from './Types'
@@ -1,5 +1,3 @@
1
- import { KEY_VALUE } from './Constants'
2
-
3
1
  export interface ResponseType {
4
2
  code: number
5
3
  status: string
@@ -22,67 +20,6 @@ export enum TippyTheme {
22
20
  black = 'black',
23
21
  white = 'white',
24
22
  }
25
-
26
- export interface TagType {
27
- id?: number
28
- key: string
29
- value?: string
30
- description?: string
31
- propagate: boolean
32
- mandatoryProjectIdsCsv?: string
33
- isInvalidKey?: boolean
34
- isInvalidValue?: boolean
35
- }
36
-
37
- export interface TagErrorType {
38
- isValid: boolean
39
- messages: string[]
40
- }
41
- export interface TagLabelSelectType {
42
- isCreateApp?: boolean
43
- labelTags: TagType[]
44
- setLabelTags: (tagList: TagType[]) => void
45
- tabIndex?: number
46
- selectedProjectId?: number
47
- suggestedTagsOptions?: OptionType[]
48
- }
49
-
50
- export interface TagDetailType {
51
- index: number
52
- tagData: TagType
53
- setTagData: (index: number, tagData: TagType) => void
54
- removeTag?: (index: number) => void
55
- tabIndex?: number
56
- suggestedTagsOptions?: OptionType[]
57
- }
58
-
59
- export interface TagLabelValueSelectorType {
60
- selectedTagIndex: number
61
- tagData: TagType
62
- setTagData: (index: number, tagData: TagType) => void
63
- tagOptions?: OptionType[]
64
- isRequired?: boolean
65
- tagInputType?: KEY_VALUE
66
- placeholder?: string
67
- tabIndex?: number
68
- refVar?: React.MutableRefObject<HTMLTextAreaElement>
69
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
70
- }
71
-
72
- export interface ResizableTagTextAreaProps {
73
- className?: string
74
- minHeight?: number
75
- maxHeight?: number
76
- value?: string
77
- onChange?: (e) => void
78
- onBlur?: (e) => void
79
- onFocus?: (e) => void
80
- placeholder?: string
81
- tabIndex?: number
82
- refVar?: React.MutableRefObject<HTMLTextAreaElement>
83
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
84
- }
85
-
86
23
  export interface TeamList extends ResponseType {
87
24
  result: Teams[]
88
25
  }