@devtron-labs/devtron-fe-common-lib 0.6.0 → 0.6.1-beta-1

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 (30) hide show
  1. package/dist/Common/Constants.d.ts +1 -0
  2. package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -0
  3. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
  4. package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +1 -1
  5. package/dist/Shared/Components/CICDHistory/types.d.ts +5 -0
  6. package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +2 -2
  7. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +35 -14
  8. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +2 -2
  9. package/dist/Shared/Components/SelectPicker/type.d.ts +1 -1
  10. package/dist/Shared/types.d.ts +1 -0
  11. package/dist/assets/index.css +1 -1
  12. package/dist/{cssMode-Cw5HNtTC.js → cssMode-CUmYQxLz.js} +1 -1
  13. package/dist/{freemarker2-AIX8xTMx.js → freemarker2-CwOpDCVs.js} +1 -1
  14. package/dist/{handlebars-C8ZkeKaj.js → handlebars-BZ0E1hiy.js} +1 -1
  15. package/dist/{html-Dxy9SvU0.js → html-CIcBuYxG.js} +1 -1
  16. package/dist/{htmlMode-BIaJBbA7.js → htmlMode-D6CnxQmw.js} +1 -1
  17. package/dist/{index-BdtnSW-i.js → index-C-yipnXk.js} +19327 -19258
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +350 -349
  20. package/dist/{javascript-BaN4GPsT.js → javascript-D1824o0r.js} +1 -1
  21. package/dist/{jsonMode-CwjQOd1-.js → jsonMode-dzChYL5x.js} +1 -1
  22. package/dist/{liquid-BFeuUBA4.js → liquid-ykLXGtZD.js} +1 -1
  23. package/dist/{mdx-QZKoVMX8.js → mdx-DMLBOCGI.js} +1 -1
  24. package/dist/{python-C4dYSjqY.js → python-CAybSjZ4.js} +1 -1
  25. package/dist/{razor-BADR1A4S.js → razor-CRWTug_f.js} +1 -1
  26. package/dist/{tsMode-D0dJyb-3.js → tsMode-CMbot5_p.js} +1 -1
  27. package/dist/{typescript-CKSV_nAk.js → typescript-B-VQV9_Z.js} +1 -1
  28. package/dist/{xml-DNpcQ7oQ.js → xml-G9juaMC_.js} +1 -1
  29. package/dist/{yaml-BLjm78z5.js → yaml-CoqLVwfu.js} +1 -1
  30. package/package.json +1 -2
@@ -45,6 +45,7 @@ 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;
48
49
  };
49
50
  export declare const ROUTES: {
50
51
  APP: string;
@@ -8,6 +8,7 @@ export interface UseUrlFiltersProps<T, K> {
8
8
  * Callback function for parsing the search params
9
9
  */
10
10
  parseSearchParams?: (searchParams: URLSearchParams) => K;
11
+ localStorageKey?: string;
11
12
  }
12
13
  export type UseUrlFiltersReturnType<T, K = unknown> = K & {
13
14
  /**
@@ -16,5 +16,5 @@ import { UseUrlFiltersProps, UseUrlFiltersReturnType } from './types';
16
16
  * ```
17
17
  *
18
18
  */
19
- declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
19
+ declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
20
20
  export default useUrlFilters;
@@ -1,3 +1,3 @@
1
1
  import { AppStatusDetailsChartType } from './types';
2
- declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter }: AppStatusDetailsChartType) => JSX.Element;
2
+ declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter, showConfigDriftInfo, onClose, }: AppStatusDetailsChartType) => JSX.Element;
3
3
  export default AppStatusDetailsChart;
@@ -420,6 +420,8 @@ export interface DeploymentHistorySidebarType {
420
420
  export interface AppStatusDetailsChartType {
421
421
  filterRemoveHealth?: boolean;
422
422
  showFooter: boolean;
423
+ showConfigDriftInfo?: boolean;
424
+ onClose?: () => void;
423
425
  }
424
426
  export interface StatusFilterButtonType {
425
427
  nodes: Array<Node>;
@@ -433,6 +435,9 @@ export declare enum NodeStatus {
433
435
  Suspended = "suspended",
434
436
  Unknown = "unknown"
435
437
  }
438
+ export declare enum NodeFilters {
439
+ drifted = "drifted"
440
+ }
436
441
  type NodesMap = {
437
442
  [key in NodeType]?: Map<string, any>;
438
443
  };
@@ -1,2 +1,2 @@
1
- import { CollapsibleListProps } from './CollapsibleList.types';
2
- export declare const CollapsibleList: ({ config, onCollapseBtnClick }: CollapsibleListProps) => JSX.Element;
1
+ import { CollapsibleListProps, TabOptions } from './CollapsibleList.types';
2
+ export declare const CollapsibleList: <TabType extends TabOptions>({ config, tabType, onCollapseBtnClick, }: CollapsibleListProps<TabType>) => JSX.Element;
@@ -1,6 +1,30 @@
1
1
  import { default as React } from 'react';
2
2
  import { TippyProps } from '@tippyjs/react';
3
- export interface CollapsibleListItem {
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> & {
4
28
  /**
5
29
  * The title of the list item.
6
30
  */
@@ -30,16 +54,8 @@ export interface CollapsibleListItem {
30
54
  */
31
55
  tooltipProps?: TippyProps;
32
56
  };
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 {
57
+ };
58
+ export interface CollapsibleListConfig<TabType extends 'button' | 'navLink'> {
43
59
  /**
44
60
  * The unique identifier for the collapsible list.
45
61
  */
@@ -77,17 +93,21 @@ export interface CollapsibleListConfig {
77
93
  /**
78
94
  * An array of items to be displayed in the collapsible list.
79
95
  */
80
- items: CollapsibleListItem[];
96
+ items: CollapsibleListItem<TabType>[];
81
97
  /**
82
98
  * Boolean indicating whether the list is expanded or not.
83
99
  */
84
100
  isExpanded?: boolean;
85
101
  }
86
- export interface CollapsibleListProps {
102
+ export interface CollapsibleListProps<TabType extends TabOptions> {
87
103
  /**
88
104
  * An array of collapsible list configurations.
89
105
  */
90
- config: CollapsibleListConfig[];
106
+ config: CollapsibleListConfig<TabType>[];
107
+ /**
108
+ * Type of tab list: button or navLink
109
+ */
110
+ tabType: TabType;
91
111
  /**
92
112
  * Function to handle the collapse button click event.
93
113
  *
@@ -97,3 +117,4 @@ export interface CollapsibleListProps {
97
117
  */
98
118
  onCollapseBtnClick?: (id: string, e: React.MouseEvent<HTMLButtonElement>) => void;
99
119
  }
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, 'href' | 'title' | 'onClick'> {
40
+ export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem<'navLink'>, '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, 'id' | 'header' | 'noItemsText'> {
44
+ export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig<'navLink'>, 'id' | 'header' | 'noItemsText'> {
45
45
  items: DeploymentConfigDiffNavigationItem[];
46
46
  }
47
47
  export interface DeploymentConfigDiffProps {
@@ -168,7 +168,7 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
168
168
  export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
169
169
  isGroupHeadingSelectable: boolean;
170
170
  };
171
- export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList'> {
171
+ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList' | 'isOptionDisabled'> {
172
172
  appliedFilterOptions: SelectPickerOptionType[];
173
173
  handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
174
174
  }
@@ -104,6 +104,7 @@ export interface Node {
104
104
  port: number;
105
105
  canBeHibernated: boolean;
106
106
  isHibernated: boolean;
107
+ hasDrift?: boolean;
107
108
  }
108
109
  export interface iNodes extends Array<iNode> {
109
110
  }