@devtron-labs/devtron-fe-common-lib 0.0.6-beta-23 → 0.0.6-beta-24

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.
@@ -1,2 +1,3 @@
1
1
  export * from './TagLabelSelect';
2
2
  export * from './TagLabelValueSelector';
3
+ export * from './ResizableTagTextArea';
@@ -20,11 +20,12 @@ export declare enum TippyTheme {
20
20
  white = "white"
21
21
  }
22
22
  export interface TagType {
23
+ id?: number;
23
24
  key: string;
24
25
  value?: string;
25
26
  description?: string;
26
27
  propagate: boolean;
27
- mandatoryProjectIdsCsv?: string[];
28
+ mandatoryProjectIdsCsv?: string;
28
29
  isInvalidKey?: boolean;
29
30
  isInvalidValue?: boolean;
30
31
  }
@@ -24,3 +24,4 @@ export * from './MultiSelectCustomization';
24
24
  export { default as InfoColourBar } from './InfoColorBar/InfoColourbar';
25
25
  export * from './Common.service';
26
26
  export * from './Checkbox';
27
+ export { default as EmptyState } from './EmptyState/EmptyState';
package/dist/index.js CHANGED
@@ -8420,7 +8420,7 @@ function TippyCustomized(props) {
8420
8420
  };
8421
8421
  var getTippyContent = function () {
8422
8422
  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;
8423
- 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') }, { 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
8423
+ 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
8424
8424
  ? 'p-12'
8425
8425
  : "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' })) })))] }));
8426
8426
  };
@@ -8602,11 +8602,11 @@ function ResizableTagTextArea(_a) {
8602
8602
  var handleOnBlur = function (event) {
8603
8603
  refVar.current.style.height = 'auto';
8604
8604
  dependentRef.current.style.height = 'auto';
8605
- onBlur(event);
8605
+ onBlur && onBlur(event);
8606
8606
  };
8607
8607
  var handleOnFocus = function (event) {
8608
8608
  reInitHeight();
8609
- onFocus(event);
8609
+ onFocus && onFocus(event);
8610
8610
  };
8611
8611
  return (jsxRuntime.jsx("textarea", { rows: 1, ref: refVar, value: text, placeholder: placeholder, className: "".concat(className || '', " lh-20"), style: { resize: 'none' }, onChange: handleChange, onBlur: handleOnBlur, onFocus: handleOnFocus, tabIndex: tabIndex }));
8612
8612
  }
@@ -16378,6 +16378,7 @@ exports.DialogForm = DialogForm;
16378
16378
  exports.DialogFormSubmit = DialogFormSubmit;
16379
16379
  exports.Drawer = Drawer;
16380
16380
  exports.ERROR_EMPTY_SCREEN = ERROR_EMPTY_SCREEN;
16381
+ exports.EmptyState = EmptyState;
16381
16382
  exports.ErrorScreenManager = ErrorScreenManager;
16382
16383
  exports.ErrorScreenNotAuthorized = ErrorScreenNotAuthorized;
16383
16384
  exports.ForceDeleteDialog = ForceDeleteDialog;
@@ -16396,6 +16397,7 @@ exports.ROUTES = ROUTES;
16396
16397
  exports.RadioGroup = RadioGroup;
16397
16398
  exports.RadioGroupItem = RadioGroupItem;
16398
16399
  exports.RequestTimeout = RequestTimeout;
16400
+ exports.ResizableTagTextArea = ResizableTagTextArea;
16399
16401
  exports.ServerError = ServerError;
16400
16402
  exports.ServerErrors = ServerErrors;
16401
16403
  exports.SingleSelectOption = SingleSelectOption;
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-23",
3
+ "version": "0.0.6-beta-24",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -49,12 +49,12 @@ export function ResizableTagTextArea({
49
49
  const handleOnBlur = (event) => {
50
50
  refVar.current.style.height = 'auto'
51
51
  dependentRef.current.style.height = 'auto'
52
- onBlur(event)
52
+ onBlur && onBlur(event)
53
53
  }
54
54
 
55
55
  const handleOnFocus = (event) => {
56
56
  reInitHeight()
57
- onFocus(event)
57
+ onFocus && onFocus(event)
58
58
  }
59
59
 
60
60
  return (
@@ -1,2 +1,3 @@
1
1
  export * from './TagLabelSelect'
2
- export * from './TagLabelValueSelector'
2
+ export * from './TagLabelValueSelector'
3
+ export * from './ResizableTagTextArea'
@@ -79,7 +79,7 @@ export function TippyCustomized(props: TippyCustomizedProps) {
79
79
  <>
80
80
  <div
81
81
  className={`dc__word-break dc__hyphens-auto flex left ${
82
- isWhiteTheme ? 'p-12 dc__border-bottom-n1 cn-9' : 'pt-20 pb-12 pr-20 pl-20 cn-0'
82
+ isWhiteTheme ? 'p-12 dc__border-bottom-n1 cn-9' : 'pt-20 pb-12 pr-20 pl-20 cn-0 top'
83
83
  }`}
84
84
  >
85
85
  {iconPath ? (
@@ -24,67 +24,68 @@ export enum TippyTheme {
24
24
  }
25
25
 
26
26
  export interface TagType {
27
- key: string
28
- value?: string
29
- description?: string
30
- propagate: boolean
31
- mandatoryProjectIdsCsv?: string[]
32
- isInvalidKey?: boolean
33
- isInvalidValue?: boolean
27
+ id?: number
28
+ key: string
29
+ value?: string
30
+ description?: string
31
+ propagate: boolean
32
+ mandatoryProjectIdsCsv?: string
33
+ isInvalidKey?: boolean
34
+ isInvalidValue?: boolean
34
35
  }
35
36
 
36
37
  export interface TagErrorType {
37
- isValid: boolean
38
- messages: string[]
38
+ isValid: boolean
39
+ messages: string[]
39
40
  }
40
41
  export interface TagLabelSelectType {
41
- isCreateApp?: boolean
42
- labelTags: TagType[]
43
- setLabelTags: (tagList: TagType[]) => void
44
- tabIndex?: number
42
+ isCreateApp?: boolean
43
+ labelTags: TagType[]
44
+ setLabelTags: (tagList: TagType[]) => void
45
+ tabIndex?: number
45
46
  }
46
47
 
47
48
  export interface TagDetailType {
48
- index: number
49
- tagData: TagType
50
- setTagData: (index: number, tagData: TagType) => void
51
- removeTag: (index: number) => void
52
- tabIndex?: number
49
+ index: number
50
+ tagData: TagType
51
+ setTagData: (index: number, tagData: TagType) => void
52
+ removeTag: (index: number) => void
53
+ tabIndex?: number
53
54
  }
54
55
 
55
56
  export interface TagLabelValueSelectorType {
56
- selectedTagIndex: number
57
- tagData: TagType
58
- setTagData: (index: number, tagData: TagType) => void
59
- tagOptions?: OptionType[]
60
- isRequired?: boolean
61
- tagInputType?: KEY_VALUE
62
- placeholder?: string
63
- tabIndex?: number
64
- refVar?: React.MutableRefObject<HTMLTextAreaElement>
65
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
57
+ selectedTagIndex: number
58
+ tagData: TagType
59
+ setTagData: (index: number, tagData: TagType) => void
60
+ tagOptions?: OptionType[]
61
+ isRequired?: boolean
62
+ tagInputType?: KEY_VALUE
63
+ placeholder?: string
64
+ tabIndex?: number
65
+ refVar?: React.MutableRefObject<HTMLTextAreaElement>
66
+ dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
66
67
  }
67
68
 
68
69
  export interface ResizableTagTextAreaProps {
69
- className?: string
70
- minHeight?: number
71
- maxHeight?: number
72
- value?: string
73
- onChange?: (e) => void
74
- onBlur?: (e) => void
75
- onFocus?: (e) => void
76
- placeholder?: string
77
- tabIndex?: number
78
- refVar?: React.MutableRefObject<HTMLTextAreaElement>
79
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
70
+ className?: string
71
+ minHeight?: number
72
+ maxHeight?: number
73
+ value?: string
74
+ onChange?: (e) => void
75
+ onBlur?: (e) => void
76
+ onFocus?: (e) => void
77
+ placeholder?: string
78
+ tabIndex?: number
79
+ refVar?: React.MutableRefObject<HTMLTextAreaElement>
80
+ dependentRef?: React.MutableRefObject<HTMLTextAreaElement>
80
81
  }
81
82
 
82
83
  export interface TeamList extends ResponseType {
83
- result: Teams[];
84
+ result: Teams[]
84
85
  }
85
86
 
86
87
  export interface Teams {
87
- id: number;
88
- name: string;
89
- active: boolean;
90
- }
88
+ id: number
89
+ name: string
90
+ active: boolean
91
+ }
@@ -21,6 +21,7 @@ export * from './TippyCustomized'
21
21
  export * from './CustomTagSelector'
22
22
  export * from './Dialogs'
23
23
  export * from './MultiSelectCustomization'
24
- export {default as InfoColourBar} from './InfoColorBar/InfoColourbar'
24
+ export { default as InfoColourBar } from './InfoColorBar/InfoColourbar'
25
25
  export * from './Common.service'
26
- export * from './Checkbox'
26
+ export * from './Checkbox'
27
+ export { default as EmptyState } from './EmptyState/EmptyState'