@devtron-labs/devtron-fe-common-lib 0.4.0-patch-1 → 4.0.1-beta-2

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 (32) hide show
  1. package/dist/Common/RJSF/widgets/Select.d.ts +1 -1
  2. package/dist/Common/RJSF/widgets/index.d.ts +1 -1
  3. package/dist/Shared/Components/CICDHistory/Artifacts.d.ts +1 -1
  4. package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +1 -1
  5. package/dist/Shared/Components/CICDHistory/types.d.ts +14 -2
  6. package/dist/Shared/Components/CICDHistory/utils.d.ts +1 -0
  7. package/dist/Shared/Components/DatePicker/types.d.ts +11 -6
  8. package/dist/Shared/Components/DatePicker/utils.d.ts +7 -18
  9. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +1 -1
  10. package/dist/Shared/Components/Security/utils.d.ts +1 -0
  11. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  12. package/dist/Shared/Components/SelectPicker/type.d.ts +8 -9
  13. package/dist/assets/index.css +1 -1
  14. package/dist/{cssMode-zy_eZXjb.js → cssMode-BKAw6Gjy.js} +1 -1
  15. package/dist/{freemarker2-CZwk_XZV.js → freemarker2-CaToeyV1.js} +1 -1
  16. package/dist/{handlebars-C99WQi52.js → handlebars-BcuRt7Wx.js} +1 -1
  17. package/dist/{html-XrThvtBe.js → html-BHs6br3H.js} +1 -1
  18. package/dist/{htmlMode-2UtuEei3.js → htmlMode-BHPPU3R8.js} +1 -1
  19. package/dist/{index-CTcxBJr3.js → index-ByQvKL1i.js} +129283 -129348
  20. package/dist/index.js +289 -289
  21. package/dist/{javascript-B9cmSzjk.js → javascript-CgB6Ukwh.js} +1 -1
  22. package/dist/{jsonMode-CP4mWpU3.js → jsonMode-BQ72p6WC.js} +1 -1
  23. package/dist/{liquid-cZLNKXd0.js → liquid-BSnWNlwJ.js} +1 -1
  24. package/dist/{mdx-Co2TDSC2.js → mdx-CmG3JYo6.js} +1 -1
  25. package/dist/{python-DNc78FUy.js → python-DsZUSBx9.js} +1 -1
  26. package/dist/{razor-Dkokg8PU.js → razor-DMf-FT32.js} +1 -1
  27. package/dist/{tsMode-3p4YcnJm.js → tsMode-DpDNESk7.js} +1 -1
  28. package/dist/{typescript-BAiXq7nT.js → typescript-fK9cd2PO.js} +1 -1
  29. package/dist/{xml-BTIatdiA.js → xml-DbdPKzSs.js} +1 -1
  30. package/dist/{yaml-Din5arJ_.js → yaml-Dn628uiu.js} +1 -1
  31. package/package.json +1 -1
  32. package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/utils.d.ts +0 -11
@@ -1,2 +1,2 @@
1
1
  import { WidgetProps } from '@rjsf/utils';
2
- export declare const Select: (props: WidgetProps) => JSX.Element;
2
+ export declare const SelectWidget: (props: WidgetProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { Checkbox as CheckboxWidget } from './Checkbox';
2
- export { Select as SelectWidget } from './Select';
2
+ export { SelectWidget } from './Select';
@@ -1,4 +1,4 @@
1
1
  import { ArtifactType, CIListItemType } from './types';
2
2
  export declare const CIListItem: ({ type, userApprovalMetadata, triggeredBy, children, ciPipelineId, artifactId, imageComment, imageReleaseTags, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, appliedFilters, isSuperAdmin, promotionApprovalMetadata, appliedFiltersTimestamp, selectedEnvironmentName, renderCIListHeader, }: CIListItemType) => JSX.Element;
3
- declare const Artifacts: ({ status, artifact, blobStorageEnabled, isArtifactUploaded, downloadArtifactUrl, ciPipelineId, artifactId, isJobView, isJobCI, imageComment, imageReleaseTags, type, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, rootClassName, renderCIListHeader, }: ArtifactType) => JSX.Element;
3
+ declare const Artifacts: ({ status, artifact, blobStorageEnabled, isArtifactUploaded, downloadArtifactUrl, ciPipelineId, artifactId, isJobCI, imageComment, imageReleaseTags, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, rootClassName, renderCIListHeader, }: ArtifactType) => JSX.Element;
4
4
  export default Artifacts;
@@ -1,3 +1,3 @@
1
1
  import { LogStageAccordionProps } from './types';
2
- declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, }: LogStageAccordionProps) => JSX.Element;
2
+ declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, searchIndex, }: LogStageAccordionProps) => JSX.Element;
3
3
  export default LogStageAccordion;
@@ -497,9 +497,7 @@ export interface ArtifactType {
497
497
  blobStorageEnabled: boolean;
498
498
  isArtifactUploaded?: boolean;
499
499
  downloadArtifactUrl?: string;
500
- isJobView?: boolean;
501
500
  isJobCI?: boolean;
502
- type: HistoryComponentType;
503
501
  ciPipelineId?: number;
504
502
  artifactId?: number;
505
503
  imageComment?: ImageComment;
@@ -637,11 +635,25 @@ export interface LogStageAccordionProps extends StageDetailType, Pick<LogsRender
637
635
  * A stage is loading if it is last in current stage list and event is not closed
638
636
  */
639
637
  isLoading: boolean;
638
+ searchIndex: string;
640
639
  }
641
640
  export interface CreateMarkupReturnType {
642
641
  __html: string;
643
642
  isSearchKeyPresent: boolean;
644
643
  }
644
+ export type CreateMarkupPropsType = {
645
+ log: string;
646
+ currentIndex?: never;
647
+ targetSearchKey?: never;
648
+ searchMatchResults?: never;
649
+ searchIndex?: never;
650
+ } | {
651
+ log: string;
652
+ currentIndex: number;
653
+ targetSearchKey: string;
654
+ searchMatchResults: string[];
655
+ searchIndex: string;
656
+ };
645
657
  export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
646
658
  export declare const terminalStatus: Set<string>;
647
659
  export declare const statusSet: Set<string>;
@@ -5,3 +5,4 @@ export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any,
5
5
  export declare const renderIcon: (iconState: string) => JSX.Element;
6
6
  export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
7
7
  export declare const getTriggerStatusIcon: (triggerDetailStatus: string) => JSX.Element;
8
+ export declare const getLogSearchIndex: ({ stageIndex, lineNumberInsideStage, }: Record<"stageIndex" | "lineNumberInsideStage", number>) => string;
@@ -1,7 +1,7 @@
1
1
  import { Moment } from 'moment';
2
2
  import { SelectInstance } from 'react-select';
3
3
  import { SingleDatePickerShape } from 'react-dates';
4
- import { OptionType } from '../../../Common';
4
+ import { SelectPickerOptionType } from '../SelectPicker';
5
5
  export interface SingleDatePickerProps {
6
6
  /**
7
7
  * Date value to be displayed
@@ -32,13 +32,14 @@ export interface SingleDatePickerProps {
32
32
  */
33
33
  dataTestId?: string;
34
34
  }
35
+ export type DateSelectPickerType = SelectPickerOptionType<string>;
35
36
  export interface MonthlySelectProps extends Pick<SingleDatePickerProps, 'dataTestId'> {
36
37
  /**
37
38
  * Current selected date object
38
39
  *
39
40
  * @default 'new Date()'
40
41
  */
41
- selectedMonthlyDate: OptionType;
42
+ selectedMonthlyDate: DateSelectPickerType;
42
43
  /**
43
44
  * Onchange handle picker type
44
45
  */
@@ -54,7 +55,7 @@ export interface TimeSelectProps {
54
55
  /**
55
56
  * Handler for updating the date from the parent component
56
57
  */
57
- onChange: (date: Date) => void;
58
+ onChange: (date: DateSelectPickerType) => void;
58
59
  /**
59
60
  * Props for the time picker
60
61
  */
@@ -70,7 +71,7 @@ export interface TimeSelectProps {
70
71
  /**
71
72
  * Id for the component
72
73
  */
73
- default12HourTime: OptionType;
74
+ default12HourTime: DateSelectPickerType;
74
75
  /**
75
76
  * Data test id for time picker
76
77
  */
@@ -78,9 +79,9 @@ export interface TimeSelectProps {
78
79
  /**
79
80
  * To hide time selector
80
81
  */
81
- selectedTimeOption: OptionType;
82
+ selectedTimeOption: DateSelectPickerType;
82
83
  }
83
- export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'onChange' | 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime'>, Pick<SingleDatePickerShape, 'openDirection'> {
84
+ export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime'>, Pick<SingleDatePickerShape, 'openDirection'> {
84
85
  /**
85
86
  * Props for the date picker
86
87
  */
@@ -113,4 +114,8 @@ export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'onC
113
114
  * Data test id for date picker
114
115
  */
115
116
  dataTestidForDate?: string;
117
+ /**
118
+ * Function to handle date change
119
+ */
120
+ onChange: (date: Date) => void;
116
121
  }
@@ -1,14 +1,4 @@
1
- import { OptionType } from '../../../Common';
2
- export declare const getTimePickerStyles: () => {
3
- container: (base: any) => any;
4
- control: (base: any, state: any) => any;
5
- menu: (base: any) => any;
6
- singleValue: (base: any) => any;
7
- placeholder: (base: any) => any;
8
- option: (base: any, state: any) => any;
9
- valueContainer: (base: any) => any;
10
- dropdownIndicator: (base: any) => any;
11
- };
1
+ import { SelectPickerOptionType } from '../SelectPicker';
12
2
  /**
13
3
  * Return the options for the dates in label and value format
14
4
  */
@@ -18,9 +8,9 @@ export declare const MONTHLY_DATE_OPTIONS: {
18
8
  }[];
19
9
  /**
20
10
  * Return the options for the time in label and value format
21
- * @type {OptionType[]}
11
+ * @type {SelectPickerOptionType[]}
22
12
  */
23
- export declare const DEFAULT_TIME_OPTIONS: OptionType[];
13
+ export declare const DEFAULT_TIME_OPTIONS: SelectPickerOptionType[];
24
14
  /**
25
15
  * Get the time value from the date object in the format: `hh:mm:ss`
26
16
  */
@@ -28,7 +18,10 @@ export declare const getTimeValue: (currentDateObj: Date) => string;
28
18
  /**
29
19
  * Updates the time in the given date object and returns the updated object
30
20
  */
31
- export declare const updateTime: (currentDateObj: Date, timeString: string) => Date;
21
+ export declare const updateTime: (currentDateObj: Date, timeString: string) => {
22
+ label: Date;
23
+ value: Date;
24
+ };
32
25
  /**
33
26
  * Updates the date in the given date object and returns the updated object
34
27
  */
@@ -39,7 +32,3 @@ export declare const updateDate: (currentDateObj: Date, newDate: Date) => Date;
39
32
  * @returns
40
33
  */
41
34
  export declare const getDefaultDateFromTimeToLive: (timeToLive: string, isTomorrow?: boolean) => Date;
42
- /**
43
- * Clock icon for the time picker
44
- */
45
- export declare const DropdownIndicatorTimePicker: (props: any) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { AppEnvDeploymentConfigListParams, DeploymentConfigDiffProps } from '..';
1
+ import { DeploymentConfigDiffProps, AppEnvDeploymentConfigListParams } from '..';
2
2
  import { ConfigMapSecretDataConfigDatumDTO, TemplateListDTO } from '../../Services/app.types';
3
3
  /**
4
4
  * Retrieves the draft data from the given configuration data object.
@@ -2,3 +2,4 @@ import { SeverityCount } from '../../types';
2
2
  import { SeveritiesDTO } from './SecurityModal/types';
3
3
  export declare const getTotalSeverityCount: (severityCount: SeverityCount) => number;
4
4
  export declare const getSeverityCountFromSummary: (scanResultSeverities: Partial<Record<SeveritiesDTO, number>>) => SeverityCount;
5
+ export declare const getCVEUrlFromCVEName: (cveName: string) => string;
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
134
134
  * />
135
135
  * ```
136
136
  */
137
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
137
+ declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, inputValue, onInputChange, isCreatable, onCreateOption, closeMenuOnSelect, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
138
138
  export default SelectPicker;
@@ -45,7 +45,7 @@ export declare enum SelectPickerVariantType {
45
45
  DEFAULT = "default",
46
46
  BORDER_LESS = "border-less"
47
47
  }
48
- export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
48
+ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
49
49
  /**
50
50
  * Icon to be rendered in the control
51
51
  */
@@ -134,16 +134,15 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
134
134
  * Would reload the option list when called in case optionListError is present
135
135
  */
136
136
  reloadOptionList?: () => void;
137
+ /**
138
+ * If true, the select picker creates the new option
139
+ *
140
+ * @default false
141
+ */
142
+ isCreatable?: boolean;
137
143
  } & (IsMulti extends true ? {
138
144
  isMulti: IsMulti | boolean;
139
- multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
140
- /**
141
- * If true, the select picker creates the new option
142
- * Only applicable for IsMulti: true
143
- *
144
- * @default false
145
- */
146
- isCreatable?: boolean;
145
+ multiSelectProps?: {
147
146
  /**
148
147
  * If true, the group heading can be selected
149
148
  *