@devtron-labs/devtron-fe-common-lib 1.20.6-pre-52 → 1.20.6-pre-53

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 (31) hide show
  1. package/dist/{@code-editor-BXZDhTrP.js → @code-editor-wjk7c0jD.js} +7049 -7018
  2. package/dist/{@common-rjsf-BEOjsJmz.js → @common-rjsf-D2MznA8m.js} +22 -22
  3. package/dist/{@framer-motion-BbD0XILR.js → @framer-motion-CaO6VjZd.js} +61 -61
  4. package/dist/{@moment-CGWt8tF2.js → @moment-CwOqp704.js} +493 -524
  5. package/dist/{@react-select-CK9Bxd-k.js → @react-select-BYVRJYJS.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-J61SX97M.js → @react-virtualized-sticky-tree-D4k2yc2d.js} +1 -1
  7. package/dist/{@vendor-DEAetXNs.js → @vendor-CDaBE-BA.js} +28344 -32367
  8. package/dist/Common/Constants.d.ts +1 -4
  9. package/dist/Common/SegmentedBarChart/types.d.ts +2 -8
  10. package/dist/Common/SegmentedControl/types.d.ts +1 -1
  11. package/dist/Common/Types.d.ts +0 -1
  12. package/dist/Shared/Components/DatePicker/DateTimePicker.d.ts +1 -1
  13. package/dist/Shared/Components/DatePicker/constants.d.ts +2 -39
  14. package/dist/Shared/Components/DatePicker/index.d.ts +0 -1
  15. package/dist/Shared/Components/DatePicker/types.d.ts +34 -17
  16. package/dist/Shared/Components/DatePicker/utils.d.ts +1 -1
  17. package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +1 -1
  18. package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -1
  19. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +3 -3
  20. package/dist/Shared/Components/Security/index.d.ts +0 -1
  21. package/dist/Shared/Components/SelectPicker/index.d.ts +1 -1
  22. package/dist/Shared/Components/SelectPicker/utils.d.ts +0 -1
  23. package/dist/Shared/Hooks/useUserPreferences/types.d.ts +1 -1
  24. package/dist/assets/@code-editor.css +1 -1
  25. package/dist/assets/@vendor.css +1 -1
  26. package/dist/index.js +798 -802
  27. package/package.json +2 -7
  28. package/dist/@react-dates-DLCF81bK.js +0 -7634
  29. package/dist/Shared/Components/DatePicker/SingleDatePickerComponent.d.ts +0 -11
  30. package/dist/assets/@react-dates.css +0 -1
  31. package/dist/assets/ic-calender-blank.963e3423.svg +0 -19
@@ -86,10 +86,7 @@ export declare const URLS: {
86
86
  readonly COST_CONFIGURATIONS: "/cost-visibility/configurations";
87
87
  readonly SECURITY_CENTER: "/security-center";
88
88
  readonly SECURITY_CENTER_OVERVIEW: "/security-center/overview";
89
- readonly SECURITY_CENTER_VULNERABILITIES: "/security-center/vulnerabilities";
90
- readonly SECURITY_CENTER_VULNERABILITY_DEPLOYMENTS: "/security-center/vulnerabilities/deployments";
91
- readonly SECURITY_CENTER_VULNERABILITY_CVES: "/security-center/vulnerabilities/cves";
92
- readonly SECURITY_CENTER_SECURITY_ENABLEMENT: "/security-center/security-enablement";
89
+ readonly SECURITY_CENTER_SCANS: "/security-center/scans";
93
90
  readonly SECURITY_CENTER_POLICIES: "/security-center/policies";
94
91
  readonly AUTOMATION_AND_ENABLEMENT: "/automation-and-enablement";
95
92
  readonly AUTOMATION_AND_ENABLEMENT_JOB: "/automation-and-enablement/job";
@@ -13,20 +13,14 @@ type EntityPropType = {
13
13
  label?: never;
14
14
  }>[];
15
15
  };
16
- type ProportionalType = {
17
- isProportional?: true;
18
- hideTotal?: boolean;
19
- } | {
20
- isProportional?: false | never;
21
- hideTotal?: never;
22
- };
23
16
  export type SegmentedBarChartProps = {
24
17
  rootClassName?: string;
25
18
  countClassName?: string;
26
19
  labelClassName?: string;
20
+ isProportional?: boolean;
27
21
  swapLegendAndBar?: boolean;
28
22
  showAnimationOnBar?: boolean;
29
23
  isLoading?: boolean;
30
24
  size?: ComponentSizeType;
31
- } & EntityPropType & ProportionalType;
25
+ } & EntityPropType;
32
26
  export {};
@@ -53,7 +53,7 @@ export type SegmentedControlProps<T = string | number> = {
53
53
  * Please make sure this is unique
54
54
  */
55
55
  name: string;
56
- size?: Extract<ComponentSizeType, ComponentSizeType.xs | ComponentSizeType.small | ComponentSizeType.medium | ComponentSizeType.large>;
56
+ size?: Extract<ComponentSizeType, ComponentSizeType.xs | ComponentSizeType.small | ComponentSizeType.medium>;
57
57
  fullWidth?: boolean;
58
58
  disabled?: boolean;
59
59
  } & ({
@@ -944,7 +944,6 @@ export type AppsGroupedByProjectsType = {
944
944
  projectName: string;
945
945
  appList: {
946
946
  name: string;
947
- id: number;
948
947
  }[];
949
948
  }[];
950
949
  export type EnvironmentsGroupedByClustersType = {
@@ -1,3 +1,3 @@
1
1
  import { DateTimePickerProps } from './types';
2
- declare const DateTimePicker: ({ date: dateObject, onChange, timePickerProps, disabled, id, label, required, hideTimeSelect, readOnly, isTodayBlocked, dataTestIdForTime, dataTestidForDate, openDirection, error, }: DateTimePickerProps) => JSX.Element;
2
+ declare const DateTimePicker: ({ date: dateObject, dateRange, onChange, timePickerProps, disabled, id, label, required, hideTimeSelect, readOnly, dataTestIdForTime, error, isRangePicker, isTodayBlocked, blockPreviousDates, isOutsideRange, rangeShortcutOptions, }: DateTimePickerProps) => JSX.Element;
3
3
  export default DateTimePicker;
@@ -1,42 +1,4 @@
1
- export declare const customDayStyles: {
2
- selectedStartStyles: {
3
- background: string;
4
- color: string;
5
- hover: {
6
- background: string;
7
- color: string;
8
- };
9
- };
10
- selectedEndStyles: {
11
- background: string;
12
- color: string;
13
- hover: {
14
- background: string;
15
- color: string;
16
- };
17
- };
18
- hoveredSpanStyles: {
19
- background: string;
20
- color: string;
21
- };
22
- selectedSpanStyles: {
23
- background: string;
24
- color: string;
25
- hover: {
26
- background: string;
27
- color: string;
28
- };
29
- };
30
- selectedStyles: {
31
- background: string;
32
- color: string;
33
- hover: {
34
- background: string;
35
- color: string;
36
- };
37
- };
38
- border: string;
39
- };
1
+ import { CustomComponents } from 'react-day-picker';
40
2
  export declare const MONTHLY_DATES_CONFIG: {
41
3
  'Day 1': string;
42
4
  'Day 2': string;
@@ -132,3 +94,4 @@ export declare const DATE_PICKER_IDS: {
132
94
  MONTH: string;
133
95
  TIME: string;
134
96
  };
97
+ export declare const DATE_PICKER_CUSTOM_COMPONENTS: Partial<CustomComponents>;
@@ -1,7 +1,6 @@
1
1
  export * from './constants';
2
2
  export { default as DateTimePicker } from './DateTimePicker';
3
3
  export * from './MonthlySelect';
4
- export { default as SingleDatePickerComponent } from './SingleDatePickerComponent';
5
4
  export * from './TimeSelect';
6
5
  export * from './types';
7
6
  export * from './utils';
@@ -1,4 +1,3 @@
1
- import { SingleDatePickerShape } from 'react-dates';
2
1
  import { SelectInstance } from 'react-select';
3
2
  import { Moment } from 'moment';
4
3
  import { SelectPickerOptionType } from '../SelectPicker';
@@ -81,11 +80,13 @@ export interface TimeSelectProps {
81
80
  */
82
81
  selectedTimeOption: DateSelectPickerType;
83
82
  }
84
- export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime'>, Pick<SingleDatePickerShape, 'openDirection'> {
85
- /**
86
- * Props for the date picker
87
- */
88
- datePickerProps?: any;
83
+ interface DateRangeType {
84
+ from: Date;
85
+ to?: Date;
86
+ }
87
+ export type UpdateDateRangeType = (dateRange: DateRangeType) => void;
88
+ export type UpdateSingleDateType = (date: Date) => void;
89
+ export type DateTimePickerProps = Pick<TimeSelectProps, 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime'> & {
89
90
  /**
90
91
  * Id for the component
91
92
  */
@@ -98,10 +99,6 @@ export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'tim
98
99
  * If true, the field is required and asterisk is shown
99
100
  */
100
101
  required?: boolean;
101
- /**
102
- * To hide time selector
103
- */
104
- hideTimeSelect?: boolean;
105
102
  /**
106
103
  * To make the field read only
107
104
  */
@@ -110,12 +107,32 @@ export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'tim
110
107
  * To block today's date
111
108
  */
112
109
  isTodayBlocked?: boolean;
110
+ blockPreviousDates?: boolean;
111
+ isOutsideRange?: (day: Date) => boolean;
112
+ } & ({
113
+ isRangePicker: true;
114
+ hideTimeSelect: true;
115
+ dateRange: DateRangeType;
116
+ onChange: UpdateDateRangeType;
117
+ rangeShortcutOptions?: ({
118
+ label: string;
119
+ onClick: () => void;
120
+ value?: never;
121
+ } | {
122
+ label: string;
123
+ onClick?: never;
124
+ value: DateRangeType;
125
+ })[];
126
+ date?: never;
127
+ } | {
128
+ isRangePicker?: false;
129
+ date: TimeSelectProps['date'];
130
+ onChange: UpdateSingleDateType;
113
131
  /**
114
- * Data test id for date picker
115
- */
116
- dataTestidForDate?: string;
117
- /**
118
- * Function to handle date change
132
+ * To hide time selector
119
133
  */
120
- onChange: (date: Date) => void;
121
- }
134
+ hideTimeSelect?: boolean;
135
+ dateRange?: never;
136
+ rangeShortcutOptions?: never;
137
+ });
138
+ export {};
@@ -10,7 +10,7 @@ export declare const MONTHLY_DATE_OPTIONS: {
10
10
  * Return the options for the time in label and value format
11
11
  * @type {SelectPickerOptionType[]}
12
12
  */
13
- export declare const DEFAULT_TIME_OPTIONS: SelectPickerOptionType[];
13
+ export declare const DEFAULT_TIME_OPTIONS: SelectPickerOptionType<string>[];
14
14
  /**
15
15
  * Get the time value from the date object in the format: `hh:mm:ss`
16
16
  */
@@ -17,7 +17,7 @@ export declare const SUB_CATEGORY_LABELS: {
17
17
  readonly MISCONFIGURATIONS: "Misconfigurations";
18
18
  readonly EXPOSED_SECRETS: "Exposed Secrets";
19
19
  };
20
- export declare const SEVERITIES_LABEL_COLOR_MAP: {
20
+ export declare const SEVERITIES: {
21
21
  readonly critical: {
22
22
  readonly label: "Critical";
23
23
  readonly color: "var(--R700)";
@@ -1,5 +1,5 @@
1
1
  export { getProgressingStateForStatus, getSecurityModalSidebarChildFromId, getSecurityModalSidebarId, getSidebarData, } from './config';
2
- export { CATEGORY_LABELS, SEVERITIES_LABEL_COLOR_MAP } from './constants';
2
+ export { CATEGORY_LABELS } from './constants';
3
3
  export { default as SecurityModal } from './SecurityModal';
4
4
  export { getSecurityScan } from './service';
5
5
  export type { GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, ScanResultDTO, SidebarDataChildType, SidebarPropsType, } from './types';
@@ -1,11 +1,11 @@
1
- import { SEVERITIES_LABEL_COLOR_MAP } from './constants';
1
+ import { SEVERITIES } from './constants';
2
2
  import { GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, ScanResultDTO, SeveritiesDTO, VulnerabilityCountType } from './types';
3
- export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES_LABEL_COLOR_MAP, number>>) => {
3
+ export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
4
4
  color: "var(--Y500)" | "var(--R700)" | "var(--R500)" | "var(--G500)" | "var(--N300)" | "var(--O500)";
5
5
  label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
6
6
  value: number;
7
7
  }[];
8
- export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES_LABEL_COLOR_MAP, number>>) => string;
8
+ export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
9
9
  export declare const getSeverityWeight: (severity: SeveritiesDTO) => number;
10
10
  export declare const compareSeverity: (a: SeveritiesDTO, b: SeveritiesDTO) => number;
11
11
  export declare const getSecurityScanSeveritiesCount: (data: ScanResultDTO) => {
@@ -1,6 +1,5 @@
1
1
  export { SEVERITY_LABEL_MAP } from './constants';
2
2
  export * from './SecurityDetailsCards';
3
3
  export * from './SecurityModal';
4
- export { default as SeverityChip } from './SeverityChip';
5
4
  export * from './utils';
6
5
  export * from './Vulnerabilities';
@@ -4,4 +4,4 @@ export * from './GroupedFilterSelectPicker';
4
4
  export { default as SelectPicker } from './SelectPicker.component';
5
5
  export * from './SelectPickerTextArea.component';
6
6
  export * from './type';
7
- export { getSelectPickerOptionByValue, getSelectPickerOptionsByValue } from './utils';
7
+ export { getSelectPickerOptionByValue } from './utils';
@@ -13,4 +13,3 @@ export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: r
13
13
  * @returns The matched option or the default option if no match is found.
14
14
  */
15
15
  export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>, getOptionValue?: SelectPickerProps<OptionValue>["getOptionValue"]) => SelectPickerOptionType<OptionValue>;
16
- export declare const getSelectPickerOptionsByValue: <OptionValue>(optionsList: SelectPickerOptionType<OptionValue>[], values: OptionValue[]) => SelectPickerOptionType<OptionValue>[];
@@ -1,7 +1,7 @@
1
1
  import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants';
2
2
  import { AppThemeType, ThemeConfigType, ThemePreferenceType } from '../../Providers/ThemeProvider/types';
3
3
  import { ResourceKindType } from '../../types';
4
- export type NavigationItemID = 'application-management-overview' | 'application-management-devtron-applications' | 'application-management-application-groups' | 'application-management-bulk-edit' | 'application-management-application-templates' | 'application-management-projects' | 'application-management-configurations' | 'application-management-policies' | 'infrastructure-management-overview' | 'infrastructure-management-applications' | 'infrastructure-management-chart-store' | 'infrastructure-management-resource-browser' | 'infrastructure-management-resource-watcher' | 'infrastructure-management-catalog-framework' | 'software-release-management-overview' | 'software-release-management-release-hub' | 'software-release-management-tenants' | 'cost-visibility-overview' | 'cost-visibility-cost-breakdown' | 'cost-visibility-configurations' | 'security-center-overview' | 'security-center-security-vulnerabilities' | 'security-center-security-enablement' | 'security-center-security-policy' | 'automation-and-enablement-jobs' | 'automation-and-enablement-alerting' | 'automation-and-enablement-incident-response' | 'automation-and-enablement-api-portal' | 'automation-and-enablement-runbook-automation' | 'global-configuration-sso-login-services' | 'global-configuration-host-urls' | 'global-configuration-cluster-and-environments' | 'global-configuration-container-oci-registry' | 'global-configuration-authorization' | 'data-protection-overview' | 'data-protection-backup-and-schedule' | 'data-protection-restores' | 'data-protection-backup-repositories' | 'data-protection-backup-locations' | 'data-protection-history-and-logs' | 'ai-recommendations-overview';
4
+ export type NavigationItemID = 'application-management-overview' | 'application-management-devtron-applications' | 'application-management-application-groups' | 'application-management-bulk-edit' | 'application-management-application-templates' | 'application-management-projects' | 'application-management-configurations' | 'application-management-policies' | 'infrastructure-management-overview' | 'infrastructure-management-applications' | 'infrastructure-management-chart-store' | 'infrastructure-management-resource-browser' | 'infrastructure-management-resource-watcher' | 'infrastructure-management-catalog-framework' | 'software-release-management-overview' | 'software-release-management-release-hub' | 'software-release-management-tenants' | 'cost-visibility-overview' | 'cost-visibility-cost-breakdown' | 'cost-visibility-configurations' | 'security-center-overview' | 'security-center-security-scans' | 'security-center-security-policy' | 'automation-and-enablement-jobs' | 'automation-and-enablement-alerting' | 'automation-and-enablement-incident-response' | 'automation-and-enablement-api-portal' | 'automation-and-enablement-runbook-automation' | 'global-configuration-sso-login-services' | 'global-configuration-host-urls' | 'global-configuration-cluster-and-environments' | 'global-configuration-container-oci-registry' | 'global-configuration-authorization' | 'data-protection-overview' | 'data-protection-backup-and-schedule' | 'data-protection-restores' | 'data-protection-backup-repositories' | 'data-protection-backup-locations' | 'data-protection-history-and-logs' | 'ai-recommendations-overview';
5
5
  export type NavigationSubMenuItemID = 'application-management-configurations-gitops' | 'application-management-configurations-git-accounts' | 'application-management-configurations-external-links' | 'application-management-configurations-chart-repository' | 'application-management-configurations-deployment-charts' | 'application-management-configurations-notifications' | 'application-management-configurations-catalog-frameworks' | 'application-management-configurations-scoped-variables' | 'application-management-configurations-build-infra' | 'application-management-policies-deployment-window' | 'application-management-policies-approval-policy' | 'application-management-policies-plugin-policy' | 'application-management-policies-pull-image-digest' | 'application-management-policies-tag-policy' | 'application-management-policies-filter-conditions' | 'application-management-policies-image-promotion' | 'application-management-policies-lock-deployment-configuration' | 'cost-visibility-cost-breakdown-clusters' | 'cost-visibility-cost-breakdown-environments' | 'cost-visibility-cost-breakdown-projects' | 'cost-visibility-cost-breakdown-applications' | 'global-configuration-authorization-user-permissions' | 'global-configuration-authorization-permission-groups' | 'global-configuration-authorization-api-tokens';
6
6
  export interface GetUserPreferencesQueryParamsType {
7
7
  key: typeof USER_PREFERENCES_ATTRIBUTE_KEY;