@devtron-labs/devtron-fe-common-lib 0.6.2-beta-2 → 0.6.2-beta-4

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 (35) hide show
  1. package/dist/Common/Constants.d.ts +0 -1
  2. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -18
  3. package/dist/Common/SortableTableHeaderCell/index.d.ts +0 -1
  4. package/dist/Common/SortableTableHeaderCell/types.d.ts +16 -49
  5. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +24 -0
  6. package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +1 -1
  7. package/dist/Shared/Components/CICDHistory/StatusFilterButtonComponent.d.ts +1 -1
  8. package/dist/Shared/Components/CICDHistory/types.d.ts +0 -6
  9. package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +2 -2
  10. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +14 -35
  11. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +2 -2
  12. package/dist/Shared/constants.d.ts +0 -1
  13. package/dist/Shared/types.d.ts +0 -1
  14. package/dist/assets/index.css +1 -1
  15. package/dist/{cssMode-wLDaunqY.js → cssMode-BgsQnQlX.js} +1 -1
  16. package/dist/{freemarker2-2YcTrs3e.js → freemarker2-djunybWy.js} +1 -1
  17. package/dist/{handlebars-BmateXUl.js → handlebars-D1nZIxCP.js} +1 -1
  18. package/dist/{html-BKNBqUAJ.js → html-CZWdzgjJ.js} +1 -1
  19. package/dist/{htmlMode-Chg2lF4B.js → htmlMode-CkAfoM0D.js} +1 -1
  20. package/dist/{index-DEv1lGRI.js → index-P6obYGmI.js} +19312 -19421
  21. package/dist/index.d.ts +0 -1
  22. package/dist/index.js +591 -594
  23. package/dist/{javascript-DmWATuGu.js → javascript-CcdzggLu.js} +1 -1
  24. package/dist/{jsonMode-DLBIXASe.js → jsonMode-D5Jsd8Kl.js} +1 -1
  25. package/dist/{liquid-REnjH_id.js → liquid-DoQANYNs.js} +1 -1
  26. package/dist/{mdx-D-guxXeV.js → mdx-23wMxVhr.js} +1 -1
  27. package/dist/{python-CmzVCBaF.js → python-CeAiGgEk.js} +1 -1
  28. package/dist/{razor-zZ5vZHx8.js → razor-BHzb66BL.js} +1 -1
  29. package/dist/{tsMode-CO66B2ZB.js → tsMode-CkOeWpbm.js} +1 -1
  30. package/dist/{typescript-B3XK7Tkb.js → typescript-urm_SAaC.js} +1 -1
  31. package/dist/{xml-COBMGisq.js → xml-CRIhopo1.js} +1 -1
  32. package/dist/{yaml-fZJmt2-w.js → yaml-CPkuFdfK.js} +1 -1
  33. package/package.json +2 -1
  34. package/dist/Common/SortableTableHeaderCell/constants.d.ts +0 -2
  35. package/dist/Common/SortableTableHeaderCell/useResizableTableConfig.d.ts +0 -6
@@ -45,7 +45,6 @@ export declare const URLS: {
45
45
  GLOBAL_CONFIG_SCOPED_VARIABLES: string;
46
46
  GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
47
47
  NETWORK_STATUS_INTERFACE: string;
48
- CONFIG_DRIFT: string;
49
48
  };
50
49
  export declare const ROUTES: {
51
50
  APP: string;
@@ -12,23 +12,6 @@ import { SortableTableHeaderCellProps } from './types';
12
12
  * disabled={isDisabled}
13
13
  * />
14
14
  * ```
15
- *
16
- * @example Non-sortable cell
17
- * ```tsx
18
- * <SortableTableHeaderCell
19
- * isSortable={false}
20
- * title="Header Cell"
21
- * />
22
- * ```
23
- *
24
- * * @example Resizable cell (Layout to be controlled externally using useResizableTableConfig)
25
- * ```tsx
26
- * <SortableTableHeaderCell
27
- * isSortable={false}
28
- * isResizable
29
- * title="Header Cell"
30
- * />
31
- * ```
32
15
  */
33
- declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, id, handleResize, isResizable, }: SortableTableHeaderCellProps) => JSX.Element;
16
+ declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
34
17
  export default SortableTableHeaderCell;
@@ -1,3 +1,2 @@
1
1
  export { default as SortableTableHeaderCell } from './SortableTableHeaderCell';
2
- export { default as useResizableTableConfig } from './useResizableTableConfig';
3
2
  export type { SortableTableHeaderCellProps } from './types';
@@ -1,68 +1,35 @@
1
1
  import { SortingOrder } from '../Constants';
2
- export type SortableTableHeaderCellProps = {
2
+ export interface SortableTableHeaderCellProps {
3
3
  /**
4
- * Label for the cell
5
- */
6
- title: string;
7
- /**
8
- * If true, the tippy is shown on Sortable header if text is truncated
9
- * @default false
4
+ * If true, the cell is sorted
10
5
  */
11
- showTippyOnTruncate?: boolean;
12
- } & ({
6
+ isSorted: boolean;
13
7
  /**
14
- * Unique identifier for the column
8
+ * Callback for handling the sorting of the cell
15
9
  */
16
- id: string | number;
10
+ triggerSorting: () => void;
17
11
  /**
18
- * If true, the cell is resizable
12
+ * Current sort order
19
13
  *
20
- * @default false
21
- */
22
- isResizable: true | boolean;
23
- /**
24
- * Resize handler for the table
14
+ * Note: On click, the sort order should be updated as required
25
15
  */
26
- handleResize: (id: string | number, deltaChange: number) => void;
27
- } | {
28
- id?: never;
29
- isResizable?: false | undefined;
30
- handleResize?: never;
31
- }) & ({
16
+ sortOrder: SortingOrder;
32
17
  /**
33
- * If false, the cell acts like normal table header cell
34
- * @default true
18
+ * Label for the cell
35
19
  */
36
- isSortable?: boolean | undefined;
20
+ title: string;
37
21
  /**
38
22
  * If true, the cell is disabled
39
23
  */
40
24
  disabled: boolean;
41
25
  /**
42
- * If true, the cell is sorted
43
- */
44
- isSorted: boolean;
45
- /**
46
- * Callback for handling the sorting of the cell
26
+ * If false, the cell acts like normal table header cell
27
+ * @default true
47
28
  */
48
- triggerSorting: () => void;
29
+ isSortable?: boolean;
49
30
  /**
50
- * Current sort order
51
- *
52
- * Note: On click, the sort order should be updated as required
31
+ * If true, the tippy is shown on Sortable header if text is truncated
32
+ * @default false
53
33
  */
54
- sortOrder: SortingOrder;
55
- } | {
56
- isSortable: false;
57
- disabled?: never;
58
- isSorted?: never;
59
- triggerSorting?: never;
60
- sortOrder?: never;
61
- });
62
- export interface UseResizableTableConfigProps {
63
- headersConfig: (Pick<SortableTableHeaderCellProps, 'id'> & {
64
- width: number | string;
65
- maxWidth?: number;
66
- minWidth?: number;
67
- })[];
34
+ showTippyOnTruncate?: boolean;
68
35
  }
@@ -1,4 +1,5 @@
1
1
  import { NodeType, Nodes } from '../../Shared/types';
2
+ import { RefObject } from 'react';
2
3
  export interface GVKType {
3
4
  Group: string;
4
5
  Version: string;
@@ -18,3 +19,26 @@ export interface K8SObjectBaseType {
18
19
  name: string;
19
20
  isExpanded: boolean;
20
21
  }
22
+ export interface BulkSelectionActionWidgetProps {
23
+ count: number;
24
+ handleOpenBulkDeleteModal: () => void;
25
+ handleClearBulkSelection: () => void;
26
+ handleOpenRestartWorkloadModal: () => void;
27
+ parentRef: RefObject<HTMLDivElement>;
28
+ showBulkRestartOption: boolean;
29
+ }
30
+ export interface BulkOperation {
31
+ name: string;
32
+ operation: (signal: AbortSignal, data?: unknown) => Promise<void>;
33
+ }
34
+ export type BulkOperationModalProps = {
35
+ operationType: 'restart' | 'delete';
36
+ clusterName: string;
37
+ operations: NonNullable<BulkOperation[]>;
38
+ handleModalClose: () => void;
39
+ resourceKind: string;
40
+ handleReloadDataAfterBulkOperation?: () => void;
41
+ hideResultsDrawer?: boolean;
42
+ shouldAllowForceOperation?: true;
43
+ };
44
+ export type BulkOperationModalState = BulkOperationModalProps['operationType'] | 'closed';
@@ -1,3 +1,3 @@
1
1
  import { AppStatusDetailsChartType } from './types';
2
- declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter, showConfigDriftInfo, onClose, }: AppStatusDetailsChartType) => JSX.Element;
2
+ declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter }: AppStatusDetailsChartType) => JSX.Element;
3
3
  export default AppStatusDetailsChart;
@@ -1,2 +1,2 @@
1
1
  import { StatusFilterButtonType } from './types';
2
- export declare const StatusFilterButtonComponent: ({ nodes, selectedTab, handleFilterClick }: StatusFilterButtonType) => JSX.Element;
2
+ export declare const StatusFilterButtonComponent: ({ nodes, handleFilterClick }: StatusFilterButtonType) => JSX.Element;
@@ -420,12 +420,9 @@ export interface DeploymentHistorySidebarType {
420
420
  export interface AppStatusDetailsChartType {
421
421
  filterRemoveHealth?: boolean;
422
422
  showFooter: boolean;
423
- showConfigDriftInfo?: boolean;
424
- onClose?: () => void;
425
423
  }
426
424
  export interface StatusFilterButtonType {
427
425
  nodes: Array<Node>;
428
- selectedTab: string;
429
426
  handleFilterClick?: (selectedFilter: string) => void;
430
427
  }
431
428
  export declare enum NodeStatus {
@@ -436,9 +433,6 @@ export declare enum NodeStatus {
436
433
  Suspended = "suspended",
437
434
  Unknown = "unknown"
438
435
  }
439
- export declare enum NodeFilters {
440
- drifted = "drifted"
441
- }
442
436
  type NodesMap = {
443
437
  [key in NodeType]?: Map<string, any>;
444
438
  };
@@ -1,2 +1,2 @@
1
- import { CollapsibleListProps, TabOptions } from './CollapsibleList.types';
2
- export declare const CollapsibleList: <TabType extends TabOptions>({ config, tabType, onCollapseBtnClick, }: CollapsibleListProps<TabType>) => JSX.Element;
1
+ import { CollapsibleListProps } from './CollapsibleList.types';
2
+ export declare const CollapsibleList: ({ config, onCollapseBtnClick }: CollapsibleListProps) => JSX.Element;
@@ -1,30 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { TippyProps } from '@tippyjs/react';
3
- interface ButtonTab {
4
- /**
5
- * Is tab active ( for button tab )
6
- */
7
- isActive: boolean;
8
- /**
9
- * The callback function to handle click events on the button.
10
- */
11
- onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
12
- href?: never;
13
- }
14
- interface NavLinkTab {
15
- /**
16
- * The URL of the nav link.
17
- */
18
- href: string;
19
- /**
20
- * The callback function to handle click events on the nav link.
21
- */
22
- onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
23
- isActive?: never;
24
- }
25
- export type TabOptions = 'button' | 'navLink';
26
- type ConditionalTabType<TabType extends TabOptions> = TabType extends 'button' ? ButtonTab : NavLinkTab;
27
- export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType<TabType> & {
3
+ export interface CollapsibleListItem {
28
4
  /**
29
5
  * The title of the list item.
30
6
  */
@@ -54,8 +30,16 @@ export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType
54
30
  */
55
31
  tooltipProps?: TippyProps;
56
32
  };
57
- };
58
- export interface CollapsibleListConfig<TabType extends 'button' | 'navLink'> {
33
+ /**
34
+ * The URL of the nav link.
35
+ */
36
+ href?: string;
37
+ /**
38
+ * The callback function to handle click events on the nav link.
39
+ */
40
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
41
+ }
42
+ export interface CollapsibleListConfig {
59
43
  /**
60
44
  * The unique identifier for the collapsible list.
61
45
  */
@@ -93,21 +77,17 @@ export interface CollapsibleListConfig<TabType extends 'button' | 'navLink'> {
93
77
  /**
94
78
  * An array of items to be displayed in the collapsible list.
95
79
  */
96
- items: CollapsibleListItem<TabType>[];
80
+ items: CollapsibleListItem[];
97
81
  /**
98
82
  * Boolean indicating whether the list is expanded or not.
99
83
  */
100
84
  isExpanded?: boolean;
101
85
  }
102
- export interface CollapsibleListProps<TabType extends TabOptions> {
86
+ export interface CollapsibleListProps {
103
87
  /**
104
88
  * An array of collapsible list configurations.
105
89
  */
106
- config: CollapsibleListConfig<TabType>[];
107
- /**
108
- * Type of tab list: button or navLink
109
- */
110
- tabType: TabType;
90
+ config: CollapsibleListConfig[];
111
91
  /**
112
92
  * Function to handle the collapse button click event.
113
93
  *
@@ -117,4 +97,3 @@ export interface CollapsibleListProps<TabType extends TabOptions> {
117
97
  */
118
98
  onCollapseBtnClick?: (id: string, e: React.MouseEvent<HTMLButtonElement>) => void;
119
99
  }
120
- export {};
@@ -37,11 +37,11 @@ export type DeploymentConfigDiffSelectPickerProps = {
37
37
  text?: never;
38
38
  selectPickerProps: SelectPickerProps;
39
39
  };
40
- export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem<'navLink'>, 'href' | 'title' | 'onClick'> {
40
+ export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
41
41
  Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
42
42
  diffState: DeploymentConfigListItem['diffState'];
43
43
  }
44
- export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig<'navLink'>, 'id' | 'header' | 'noItemsText'> {
44
+ export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
45
45
  items: DeploymentConfigDiffNavigationItem[];
46
46
  }
47
47
  export interface DeploymentConfigDiffProps {
@@ -413,4 +413,3 @@ export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType,
413
413
  export declare const TRIGGER_STATUS_PROGRESSING: string[];
414
414
  export declare const CONFIGURATION_TYPE_VALUES: ConfigurationType[];
415
415
  export declare const DEFAULT_LOCKED_KEYS_CONFIG: Readonly<ConfigKeysWithLockType>;
416
- export declare const ALL_RESOURCE_KIND_FILTER = "all";
@@ -104,7 +104,6 @@ export interface Node {
104
104
  port: number;
105
105
  canBeHibernated: boolean;
106
106
  isHibernated: boolean;
107
- hasDrift?: boolean;
108
107
  }
109
108
  export interface iNodes extends Array<iNode> {
110
109
  }