@devtron-labs/devtron-fe-common-lib 0.0.48-beta-7 → 0.0.48-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.
Files changed (127) hide show
  1. package/.eslintrc.js +16 -84
  2. package/.github/workflows/release-package.yml +3 -2
  3. package/dist/Common/BreadCrumb/BreadCrumb.d.ts +1 -1
  4. package/dist/Common/BreadCrumb/BreadcrumbStore.d.ts +2 -2
  5. package/dist/Common/Constants.d.ts +5 -1
  6. package/dist/Common/CustomInput/CustomInput.d.ts +1 -1
  7. package/dist/Common/CustomInput/Types.d.ts +2 -2
  8. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
  9. package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +1 -1
  10. package/dist/Common/DevtronProgressing/DevtronProgressing.d.ts +1 -1
  11. package/dist/Common/Dialogs/ConfirmationDialog.d.ts +6 -6
  12. package/dist/Common/Dialogs/DeleteDialog.d.ts +1 -1
  13. package/dist/Common/Dialogs/ForceDeleteDialog.d.ts +1 -1
  14. package/dist/Common/Dialogs/Types.d.ts +1 -1
  15. package/dist/Common/EmptyState/EmptyState.d.ts +17 -20
  16. package/dist/Common/EmptyState/GenericEmptyState.d.ts +1 -1
  17. package/dist/Common/Error.d.ts +1 -2
  18. package/dist/Common/ErrorScreenNotFound.d.ts +1 -1
  19. package/dist/Common/Helper.d.ts +1 -1
  20. package/dist/Common/ImageTags.d.ts +1 -1
  21. package/dist/Common/InfoColorBar/InfoColourbar.d.ts +1 -1
  22. package/dist/Common/Modals/Modal.d.ts +2 -2
  23. package/dist/Common/Modals/OpaqueModal.d.ts +3 -3
  24. package/dist/Common/Modals/VisibleModal.d.ts +3 -3
  25. package/dist/Common/Modals/VisibleModal2.d.ts +3 -3
  26. package/dist/Common/MultiSelectCustomization.d.ts +1 -1
  27. package/dist/Common/Policy.Types.d.ts +2 -2
  28. package/dist/Common/PopupMenu.d.ts +5 -5
  29. package/dist/Common/Progressing.d.ts +2 -2
  30. package/dist/Common/RadioGroup/RadioGroup.d.ts +1 -1
  31. package/dist/Common/ResizableTextarea.d.ts +1 -1
  32. package/dist/Common/TippyCustomized.d.ts +1 -1
  33. package/dist/Common/ToastBody.d.ts +5 -5
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +351 -266
  36. package/package.json +2 -19
  37. package/src/Common/AddCDButton/AddCDButton.tsx +2 -1
  38. package/src/Common/Api.ts +26 -21
  39. package/src/Common/AppStatus/AppStatus.tsx +12 -12
  40. package/src/Common/AppStatus/utils.ts +5 -6
  41. package/src/Common/BreadCrumb/BreadCrumb.tsx +28 -32
  42. package/src/Common/BreadCrumb/BreadcrumbStore.tsx +2 -2
  43. package/src/Common/BreadCrumb/Types.ts +12 -11
  44. package/src/Common/Checkbox.tsx +19 -17
  45. package/src/Common/ClipboardButton/ClipboardButton.tsx +1 -1
  46. package/src/Common/ClipboardButton/__tests__/ClipboardButton.test.tsx +1 -0
  47. package/src/Common/Common.service.ts +64 -59
  48. package/src/Common/Constants.ts +14 -9
  49. package/src/Common/CustomInput/CustomInput.tsx +29 -22
  50. package/src/Common/CustomInput/Types.ts +4 -4
  51. package/src/Common/CustomInput/index.ts +1 -1
  52. package/src/Common/CustomTagSelector/PropagateTagInfo.tsx +18 -15
  53. package/src/Common/CustomTagSelector/ResizableTagTextArea.tsx +9 -9
  54. package/src/Common/CustomTagSelector/TagDetails.tsx +3 -9
  55. package/src/Common/CustomTagSelector/TagLabelSelect.tsx +9 -7
  56. package/src/Common/CustomTagSelector/TagLabelValueSelector.tsx +35 -31
  57. package/src/Common/CustomTagSelector/TagSelector.utils.ts +3 -2
  58. package/src/Common/CustomTagSelector/Types.ts +1 -1
  59. package/src/Common/CustomTagSelector/ValidationRules.ts +22 -18
  60. package/src/Common/CustomTagSelector/index.ts +2 -2
  61. package/src/Common/DebouncedSearch/DebouncedSearch.tsx +1 -2
  62. package/src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx +1 -0
  63. package/src/Common/DeleteComponentModal/DeleteComponent.tsx +32 -27
  64. package/src/Common/DeleteComponentModal/types.ts +1 -1
  65. package/src/Common/DevtronProgressing/DevtronProgressing.tsx +8 -5
  66. package/src/Common/Dialogs/ConfirmationDialog.tsx +24 -24
  67. package/src/Common/Dialogs/DeleteDialog.tsx +5 -3
  68. package/src/Common/Dialogs/DialogForm.tsx +35 -31
  69. package/src/Common/Dialogs/ForceDeleteDialog.tsx +7 -13
  70. package/src/Common/Dialogs/Types.ts +12 -12
  71. package/src/Common/Dialogs/index.ts +1 -1
  72. package/src/Common/Drawer/Drawer.tsx +1 -1
  73. package/src/Common/EmptyState/EmptyState.tsx +17 -13
  74. package/src/Common/EmptyState/GenericEmptyState.tsx +21 -7
  75. package/src/Common/Error.tsx +5 -5
  76. package/src/Common/ErrorScreenNotFound.tsx +12 -9
  77. package/src/Common/Grid/Grid.tsx +2 -1
  78. package/src/Common/Helper.tsx +24 -23
  79. package/src/Common/Hooks/UseClickOutside/UseClickOutside.tsx +1 -1
  80. package/src/Common/Hooks/UseSuperAdmin/UseSuperAdmin.tsx +1 -1
  81. package/src/Common/ImageTags.Types.ts +3 -2
  82. package/src/Common/ImageTags.tsx +66 -61
  83. package/src/Common/InfoColorBar/InfoColourbar.tsx +5 -10
  84. package/src/Common/Modals/Modal.tsx +3 -3
  85. package/src/Common/Modals/OpaqueModal.tsx +18 -25
  86. package/src/Common/Modals/VisibleModal.tsx +3 -7
  87. package/src/Common/Modals/VisibleModal2.tsx +15 -20
  88. package/src/Common/MultiSelectCustomization.tsx +13 -9
  89. package/src/Common/Policy.Types.ts +38 -38
  90. package/src/Common/PopupMenu.tsx +9 -10
  91. package/src/Common/Progressing.tsx +18 -15
  92. package/src/Common/RJSF/Form.tsx +1 -0
  93. package/src/Common/RJSF/common/FieldRow.tsx +1 -0
  94. package/src/Common/RJSF/config.ts +1 -0
  95. package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +1 -1
  96. package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +1 -0
  97. package/src/Common/RJSF/templates/BaseInput.tsx +1 -0
  98. package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +1 -0
  99. package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +1 -0
  100. package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +6 -1
  101. package/src/Common/RJSF/templates/Description.tsx +1 -0
  102. package/src/Common/RJSF/templates/Field.tsx +3 -14
  103. package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +9 -6
  104. package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +7 -5
  105. package/src/Common/RJSF/templates/TitleField.tsx +1 -0
  106. package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +1 -0
  107. package/src/Common/RJSF/utils.ts +57 -53
  108. package/src/Common/RJSF/widgets/Checkbox.tsx +2 -2
  109. package/src/Common/RJSF/widgets/Select.tsx +1 -0
  110. package/src/Common/RadioGroup/RadioGroup.tsx +23 -18
  111. package/src/Common/RadioGroup.tsx +23 -24
  112. package/src/Common/Reload.tsx +1 -0
  113. package/src/Common/ResizableTextarea.tsx +17 -18
  114. package/src/Common/Security/ScanVulnerabilitiesTable.tsx +34 -29
  115. package/src/Common/ServerError.ts +1 -5
  116. package/src/Common/TippyCustomized.tsx +38 -41
  117. package/src/Common/ToastBody.tsx +7 -6
  118. package/src/Common/Toggle/Toggle.tsx +3 -3
  119. package/src/Common/Types.ts +12 -12
  120. package/src/custom.d.ts +7 -7
  121. package/src/index.ts +1 -1
  122. package/.eslintignore +0 -75
  123. package/.github/pull_request_template.md +0 -25
  124. package/.github/workflows/ci.yml +0 -31
  125. package/.husky/pre-commit +0 -4
  126. package/.lintstagedrc +0 -5
  127. package/.nvmrc +0 -1
@@ -1,36 +1,39 @@
1
+ import React from 'react'
1
2
  import { ScanVulnerabilitiesTableProps, VulnerabilityType } from '../Types'
2
3
  import './scanVulnerabilities.css'
3
4
 
4
5
  export default function ScanVulnerabilitiesTable({ vulnerabilities }: ScanVulnerabilitiesTableProps) {
5
- const renderRow = (vulnerability: VulnerabilityType) => (
6
- <tr
7
- className="dc__security-tab__table-row cursor"
8
- onClick={(e) => {
9
- window.open(`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${vulnerability.name}`, '_blank')
10
- }}
11
- >
12
- <td className="security-tab__cell-cve dc__cve-cell">
13
- <a
14
- href={`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${vulnerability.name}`}
15
- rel="noopener noreferrer"
16
- target="_blank"
17
- >
18
- {vulnerability.name}
19
- </a>
20
- </td>
21
- <td className="security-tab__cell-severity">
22
- <span className={`fill-${vulnerability.severity?.toLowerCase()}`}>{vulnerability.severity}</span>
23
- </td>
24
- <td className="security-tab__cell-package">{vulnerability.package}</td>
25
- <td className="security-tab__cell-current-ver">{vulnerability.version}</td>
26
- <td className="security-tab__cell-fixed-ver">{vulnerability.fixedVersion}</td>
27
- <td
28
- className={`security-tab__cell-policy security-tab__cell-policy--${vulnerability.policy?.toLowerCase()}`}
6
+ const renderRow = (vulnerability: VulnerabilityType) => {
7
+ return (
8
+ <tr
9
+ className="dc__security-tab__table-row cursor"
10
+ onClick={(e) => {
11
+ window.open(`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${vulnerability.name}`, '_blank')
12
+ }}
29
13
  >
30
- {vulnerability.policy?.toLowerCase()}
31
- </td>
32
- </tr>
33
- )
14
+ <td className="security-tab__cell-cve dc__cve-cell">
15
+ <a
16
+ href={`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${vulnerability.name}`}
17
+ rel="noopener noreferrer"
18
+ target="_blank"
19
+ >
20
+ {vulnerability.name}
21
+ </a>
22
+ </td>
23
+ <td className="security-tab__cell-severity">
24
+ <span className={`fill-${vulnerability.severity?.toLowerCase()}`}>{vulnerability.severity}</span>
25
+ </td>
26
+ <td className="security-tab__cell-package">{vulnerability.package}</td>
27
+ <td className="security-tab__cell-current-ver">{vulnerability.version}</td>
28
+ <td className="security-tab__cell-fixed-ver">{vulnerability.fixedVersion}</td>
29
+ <td
30
+ className={`security-tab__cell-policy security-tab__cell-policy--${vulnerability.policy?.toLowerCase()}`}
31
+ >
32
+ {vulnerability.policy?.toLowerCase()}
33
+ </td>
34
+ </tr>
35
+ )
36
+ }
34
37
 
35
38
  return (
36
39
  <table className="security-tab__table">
@@ -43,7 +46,9 @@ export default function ScanVulnerabilitiesTable({ vulnerabilities }: ScanVulner
43
46
  <th className="security-cell-header security-tab__cell-fixed-ver">Fixed In Version</th>
44
47
  <th className="security-cell-header security-tab__cell-policy">Policy</th>
45
48
  </tr>
46
- {vulnerabilities.map((vulnerability) => renderRow(vulnerability))}
49
+ {vulnerabilities.map((vulnerability) => {
50
+ return renderRow(vulnerability)
51
+ })}
47
52
  </tbody>
48
53
  </table>
49
54
  )
@@ -1,10 +1,7 @@
1
1
  export class ServerError {
2
2
  code: number
3
-
4
3
  internalMessage: string | null
5
-
6
4
  userMessage: string | null
7
-
8
5
  moreInfo?: string | null
9
6
 
10
7
  constructor(error) {
@@ -17,13 +14,12 @@ export class ServerError {
17
14
 
18
15
  export class ServerErrors extends Error {
19
16
  code: number
20
-
21
17
  errors: ServerError[]
22
18
 
23
19
  constructor(obj: { code: number; errors: ServerError[] }) {
24
20
  super()
25
21
  this.code = obj.code
26
- const message = obj.errors.reduce((str: string, err: ServerError) => {
22
+ let message = obj.errors.reduce((str: string, err: ServerError) => {
27
23
  str += `${err.internalMessage || err.userMessage}`
28
24
  return str
29
25
  }, '')
@@ -1,4 +1,4 @@
1
- import { useRef, useState } from 'react'
1
+ import React, { useRef, useState } from 'react'
2
2
  import Tippy from '@tippyjs/react'
3
3
  import { ReactComponent as CloseIcon } from '../Assets/Icon/ic-cross.svg'
4
4
  import { ReactComponent as QuestionFilled } from '../Assets/Icon/ic-help.svg'
@@ -9,7 +9,7 @@ import { not } from './Helper'
9
9
 
10
10
  // This component will handle some of the new tippy designs and interactions
11
11
  // So this can be updated to support further for new features or interactions
12
- export const TippyCustomized = (props: TippyCustomizedProps) => {
12
+ export function TippyCustomized(props: TippyCustomizedProps) {
13
13
  const tippyRef = useRef(null)
14
14
  const [showHeadingInfo, setShowHeadingInfo] = useState(false)
15
15
  const isWhiteTheme = props.theme === TippyTheme.white
@@ -60,46 +60,43 @@ export const TippyCustomized = (props: TippyCustomizedProps) => {
60
60
  } = props
61
61
  return (
62
62
  <>
63
- {!hideHeading && (
64
- <div
65
- className={`dc__word-break dc__hyphens-auto flex left ${
66
- isWhiteTheme
67
- ? `p-12 cn-9 ${props.noHeadingBorder ? '' : 'dc__border-bottom-n1'}`
68
- : 'pt-20 pb-12 pr-20 pl-20 cn-0 top'
69
- }`}
70
- >
71
- {iconPath ? (
72
- <img
73
- className={`icon-dim-${iconSize || 20} mr-6 ${iconClass || ''}`}
74
- src={iconPath}
75
- alt="Heading"
76
- onError={onImageLoadError}
77
- />
78
- ) : (
79
- Icon && (
80
- <div className={`icon-dim-${iconSize || 20} mr-6`}>
81
- <Icon className={`icon-dim-${iconSize || 20} ${iconClass || ''}`} />
82
- </div>
83
- )
84
- )}
85
- {heading && (
86
- <span className={`fs-14 fw-6 lh-20 ${showCloseButton ? 'mr-6' : ''}`}>{heading}</span>
87
- )}
88
- {headingInfo && (
89
- <div className="icon-dim-20 cursor" onClick={toggleHeadingInfo}>
90
- <Question className="icon-dim-20" />
91
- </div>
92
- )}
93
- {showCloseButton && (
94
- <div className="icon-dim-16 ml-auto">
95
- <CloseIcon
96
- className={`icon-dim-16 cursor ${isWhiteTheme ? 'fcn-9' : 'fcn-0'}`}
97
- onClick={closeTippy}
98
- />
63
+ {!hideHeading &&
64
+ <div
65
+ className={`dc__word-break dc__hyphens-auto flex left ${
66
+ isWhiteTheme
67
+ ? `p-12 cn-9 ${props.noHeadingBorder ? '' : 'dc__border-bottom-n1'}`
68
+ : 'pt-20 pb-12 pr-20 pl-20 cn-0 top'
69
+ }`}
70
+ >
71
+ {iconPath ? (
72
+ <img
73
+ className={`icon-dim-${iconSize || 20} mr-6 ${iconClass || ''}`}
74
+ src={iconPath}
75
+ alt="Heading"
76
+ onError={onImageLoadError}
77
+ />
78
+ ) : (
79
+ Icon && (
80
+ <div className={`icon-dim-${iconSize || 20} mr-6`}>
81
+ <Icon className={`icon-dim-${iconSize || 20} ${iconClass || ''}`} />
99
82
  </div>
100
- )}
101
- </div>
102
- )}
83
+ )
84
+ )}
85
+ {heading && <span className={`fs-14 fw-6 lh-20 ${showCloseButton ? 'mr-6' : ''}`}>{heading}</span>}
86
+ {headingInfo && (
87
+ <div className="icon-dim-20 cursor" onClick={toggleHeadingInfo}>
88
+ <Question className="icon-dim-20" />
89
+ </div>
90
+ )}
91
+ {showCloseButton && (
92
+ <div className="icon-dim-16 ml-auto">
93
+ <CloseIcon
94
+ className={`icon-dim-16 cursor ${isWhiteTheme ? 'fcn-9' : 'fcn-0'}`}
95
+ onClick={closeTippy}
96
+ />
97
+ </div>
98
+ )}
99
+ </div>}
103
100
  {showHeadingInfo && (
104
101
  <div
105
102
  className={`flex left top bcv-1 fs-13 fw-4 lh-20 pt-8 pb-8 ${
@@ -1,8 +1,8 @@
1
- import { Component } from 'react'
1
+ import React from 'react'
2
2
  import { toast } from 'react-toastify'
3
3
  import { TOAST_ACCESS_DENIED } from './Constants'
4
4
 
5
- export class ToastBody extends Component<{
5
+ export class ToastBody extends React.Component<{
6
6
  title: string
7
7
  subtitle?: string
8
8
  }> {
@@ -16,7 +16,7 @@ export class ToastBody extends Component<{
16
16
  }
17
17
  }
18
18
 
19
- export class ToastBody3 extends Component<{
19
+ export class ToastBody3 extends React.Component<{
20
20
  text: string
21
21
  onClick: (...args) => void
22
22
  buttonText: string
@@ -33,7 +33,7 @@ export class ToastBody3 extends Component<{
33
33
  }
34
34
  }
35
35
 
36
- export class ToastBodyWithButton extends Component<{
36
+ export class ToastBodyWithButton extends React.Component<{
37
37
  title: string
38
38
  subtitle?: string
39
39
  onClick: (...args) => void
@@ -52,10 +52,11 @@ export class ToastBodyWithButton extends Component<{
52
52
  }
53
53
  }
54
54
 
55
- export const toastAccessDenied = (title?: string, subtitle?: string) =>
56
- toast.info(
55
+ export const toastAccessDenied = (title?: string, subtitle?: string) => {
56
+ return toast.info(
57
57
  <ToastBody title={title || TOAST_ACCESS_DENIED.TITLE} subtitle={subtitle || TOAST_ACCESS_DENIED.SUBTITLE} />,
58
58
  {
59
59
  className: 'devtron-toast unauthorized',
60
60
  },
61
61
  )
62
+ }
@@ -1,4 +1,4 @@
1
- import { useState } from 'react'
1
+ import React from 'react'
2
2
  import { useEffectAfterMount } from '../Helper'
3
3
  import './Toggle.scss'
4
4
 
@@ -10,10 +10,10 @@ const Toggle = ({
10
10
  disabled = false,
11
11
  dataTestId = 'handle-toggle-button',
12
12
  Icon = null,
13
- iconClass = '',
13
+ iconClass= '',
14
14
  ...props
15
15
  }) => {
16
- const [active, setActive] = useState(selected)
16
+ const [active, setActive] = React.useState(selected)
17
17
 
18
18
  useEffectAfterMount(() => {
19
19
  if (typeof onSelect === 'function') {
@@ -229,7 +229,7 @@ export enum FilterStates {
229
229
  }
230
230
 
231
231
  export enum MaterialDataSource {
232
- EXTERNAL = 'ext',
232
+ EXTERNAL = "ext"
233
233
  }
234
234
 
235
235
  export interface CDMaterialType {
@@ -240,7 +240,7 @@ export interface CDMaterialType {
240
240
  scanEnabled: boolean
241
241
  scanned: boolean
242
242
  vulnerabilitiesLoading: boolean
243
- lastExecution: string // timestamp
243
+ lastExecution: string //timestamp
244
244
  vulnerabilities: VulnerabilityType[]
245
245
  vulnerable: boolean
246
246
  deployedTime: string
@@ -258,7 +258,7 @@ export interface CDMaterialType {
258
258
  imageReleaseTags?: ReleaseTag[]
259
259
  artifactStatus?: string
260
260
  filterState: FilterStates
261
- registryType?: string
261
+ registryType?: string;
262
262
  imagePath?: string
263
263
  registryName?: string
264
264
  // Not even coming from API but required in CDMaterials for Security which makes its own api call but stores data in CDMaterials
@@ -277,12 +277,12 @@ export enum CDMaterialServiceEnum {
277
277
  }
278
278
 
279
279
  export enum CDMaterialResourceQuery {
280
- PENDING_APPROVAL = 'PENDING_APPROVAL',
280
+ PENDING_APPROVAL = 'PENDING_APPROVAL'
281
281
  }
282
282
 
283
283
  export enum CDMaterialFilterQuery {
284
284
  RESOURCE = 'ELIGIBLE_RESOURCES',
285
- ALL = 'ALL_RESOURCES',
285
+ ALL = 'ALL_RESOURCES'
286
286
  }
287
287
 
288
288
  export interface CDMaterialServiceQueryParams {
@@ -324,18 +324,18 @@ export interface CommonNodeAttr {
324
324
  isLinkedCI?: boolean
325
325
  isLinkedCD?: boolean
326
326
  isJobCI?: boolean // used for Job type CI in Devtron Apps
327
- environmentName?: string // used for CDs
327
+ environmentName?: string //used for CDs
328
328
  environmentId?: number
329
329
  inputMaterialList?: any[]
330
- rollbackMaterialList?: any[] // used for CDs
331
- linkedCount?: number // used for CI
330
+ rollbackMaterialList?: any[] //used for CDs
331
+ linkedCount?: number //used for CI
332
332
  deploymentStrategy?: string
333
333
  height: number
334
334
  width: number
335
- preNode?: CommonNodeAttr // used for CDs
336
- postNode?: CommonNodeAttr // used for CDs
337
- stageIndex?: number // used for CDs
338
- sourceNodes?: Array<CommonNodeAttr> // used for CI
335
+ preNode?: CommonNodeAttr //used for CDs
336
+ postNode?: CommonNodeAttr //used for CDs
337
+ stageIndex?: number //used for CDs
338
+ sourceNodes?: Array<CommonNodeAttr> //used for CI
339
339
  downstreamNodes?: Array<CommonNodeAttr>
340
340
  parentPipelineId?: string
341
341
  parentPipelineType?: string
package/src/custom.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  declare module '*.svg' {
2
- import * as React from 'react'
2
+ import * as React from 'react';
3
3
 
4
- export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
4
+ export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
5
5
 
6
- const src: string
7
- export default src
6
+ const src: string;
7
+ export default src;
8
8
  }
9
9
 
10
10
  declare module '*.png' {
11
- const src: string
12
- export default src
13
- }
11
+ const src: string;
12
+ export default src;
13
+ }
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './Common'
1
+ export * from "./Common"
package/.eslintignore DELETED
@@ -1,75 +0,0 @@
1
- .eslintrc.js
2
-
3
- # Files with ESLint errors/warnings
4
- src/Common/AddCDButton/AddCDButton.tsx
5
- src/Common/AddCDButton/utils.tsx
6
- src/Common/Api.ts
7
- src/Common/AppStatus/AppStatus.tsx
8
- src/Common/AppStatus/index.ts
9
- src/Common/AppStatus/utils.ts
10
- src/Common/BreadCrumb/BreadCrumb.tsx
11
- src/Common/BreadCrumb/BreadcrumbStore.tsx
12
- src/Common/CIPipeline.Types.ts
13
- src/Common/Checkbox.tsx
14
- src/Common/ClipboardButton/ClipboardButton.tsx
15
- src/Common/ClipboardButton/__tests__/ClipboardButton.test.tsx
16
- src/Common/Common.service.ts
17
- src/Common/CustomInput/CustomInput.tsx
18
- src/Common/CustomTagSelector/PropagateTagInfo.tsx
19
- src/Common/CustomTagSelector/ResizableTagTextArea.tsx
20
- src/Common/CustomTagSelector/TagDetails.tsx
21
- src/Common/CustomTagSelector/TagLabelSelect.tsx
22
- src/Common/CustomTagSelector/TagLabelValueSelector.tsx
23
- src/Common/CustomTagSelector/TagSelector.utils.ts
24
- src/Common/CustomTagSelector/ValidationRules.ts
25
- src/Common/DebouncedSearch/DebouncedSearch.tsx
26
- src/Common/DebouncedSearch/Utils.ts
27
- src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx
28
- src/Common/DeleteComponentModal/DeleteComponent.tsx
29
- src/Common/DevtronProgressing/DevtronProgressing.tsx
30
- src/Common/Dialogs/DeleteDialog.tsx
31
- src/Common/Dialogs/DialogForm.tsx
32
- src/Common/Dialogs/ForceDeleteDialog.tsx
33
- src/Common/Drawer/Drawer.tsx
34
- src/Common/EmptyState/EmptyState.tsx
35
- src/Common/Error.tsx
36
- src/Common/ErrorScreenNotFound.tsx
37
- src/Common/Grid/Grid.tsx
38
- src/Common/Helper.tsx
39
- src/Common/Hooks/UseClickOutside/UseClickOutside.tsx
40
- src/Common/Hooks/UseSuperAdmin/UseSuperAdmin.tsx
41
- src/Common/ImageTags.tsx
42
- src/Common/Modals/Modal.tsx
43
- src/Common/Modals/OpaqueModal.tsx
44
- src/Common/Modals/VisibleModal.tsx
45
- src/Common/Modals/VisibleModal2.tsx
46
- src/Common/MultiSelectCustomization.tsx
47
- src/Common/PopupMenu.tsx
48
- src/Common/Progressing.tsx
49
- src/Common/RJSF/Form.tsx
50
- src/Common/RJSF/common/FieldRow.tsx
51
- src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx
52
- src/Common/RJSF/templates/ArrayFieldTemplate.tsx
53
- src/Common/RJSF/templates/BaseInput.tsx
54
- src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx
55
- src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx
56
- src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx
57
- src/Common/RJSF/templates/Description.tsx
58
- src/Common/RJSF/templates/Field.tsx
59
- src/Common/RJSF/templates/FieldErrorTemplate.tsx
60
- src/Common/RJSF/templates/ObjectFieldTemplate.tsx
61
- src/Common/RJSF/templates/TitleField.tsx
62
- src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx
63
- src/Common/RJSF/utils.ts
64
- src/Common/RJSF/widgets/Checkbox.tsx
65
- src/Common/RJSF/widgets/Select.tsx
66
- src/Common/RadioGroup.tsx
67
- src/Common/RadioGroup/RadioGroup.tsx
68
- src/Common/Reload.tsx
69
- src/Common/ResizableTextarea.tsx
70
- src/Common/Security/ScanVulnerabilitiesTable.tsx
71
- src/Common/ServerError.ts
72
- src/Common/TippyCustomized.tsx
73
- src/Common/ToastBody.tsx
74
- src/Common/Toggle/Toggle.tsx
75
- src/Common/Types.ts
@@ -1,25 +0,0 @@
1
- # Description
2
-
3
- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4
-
5
- ## Type of change
6
-
7
- - [ ] Bug fix (non-breaking change which fixes an issue)
8
- - [ ] New feature (non-breaking change which adds functionality)
9
- - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10
- - [ ] This change requires a documentation update
11
-
12
- ## How Has This Been Tested?
13
-
14
- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
15
-
16
- - [ ] Test A
17
- - [ ] Test B
18
-
19
- ## Checklist
20
-
21
- - [ ] The title of the PR states what changed and the related issues number (used for the release note).
22
- - [ ] Does this PR require documentation updates?
23
- - [ ] I've updated documentation as required by this PR.
24
- - [ ] I have performed a self-review of my own code
25
- - [ ] I have commented my code, particularly in hard-to-understand areas
@@ -1,31 +0,0 @@
1
- name: Common Lib CI
2
-
3
- on:
4
- pull_request:
5
- types:
6
- - opened
7
- - synchronize
8
- - edited
9
- - reopened
10
-
11
- jobs:
12
- ci:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - name: Checkout repository
16
- uses: actions/checkout@v3
17
-
18
- - name: Use Node.js
19
- uses: actions/setup-node@v3
20
- with:
21
- node-version-file: '.nvmrc'
22
- cache: 'npm'
23
-
24
- - name: Install dependencies
25
- run: npm ci
26
-
27
- - name: Check linting issues
28
- run: npm run lint
29
-
30
- - name: Build Lib
31
- run: npm run build-lib
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npm run lint-staged
package/.lintstagedrc DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "*.{js,jsx,ts,tsx}": [
3
- "npx eslint --max-warnings 0"
4
- ]
5
- }
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v16