@devtron-labs/devtron-fe-common-lib 0.5.2-beta-6 → 0.5.2-beta-7

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 (79) hide show
  1. package/dist/Common/CIPipeline.Types.d.ts +1 -0
  2. package/dist/Common/Constants.d.ts +3 -0
  3. package/dist/Common/Policy.Types.d.ts +20 -49
  4. package/dist/Common/Types.d.ts +11 -12
  5. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/DTApplicationMetricsFormField.d.ts +3 -0
  6. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/constants.d.ts +2 -0
  7. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/index.d.ts +4 -0
  8. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/service.d.ts +4 -0
  9. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +171 -0
  10. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +2 -0
  11. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/constants.d.ts +5 -0
  12. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/index.d.ts +5 -0
  13. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +27 -0
  14. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +2 -0
  15. package/dist/Pages/{CDPipeline → Applications/DevtronApps/Details/CDPipeline}/types.d.ts +4 -4
  16. package/dist/Pages/{App → Applications/DevtronApps/Details}/index.d.ts +1 -0
  17. package/dist/Pages/Applications/DevtronApps/index.d.ts +1 -0
  18. package/dist/Pages/Applications/index.d.ts +1 -0
  19. package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +2 -2
  20. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +1 -1
  21. package/dist/Pages/index.d.ts +1 -2
  22. package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
  23. package/dist/Shared/Components/Button/types.d.ts +6 -0
  24. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiff.d.ts +1 -1
  25. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiffCompare.d.ts +1 -1
  26. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +1 -1
  27. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/types.d.ts +2 -3
  28. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +1 -1
  29. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +1 -1
  30. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +4 -2
  31. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +1 -1
  32. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
  33. package/dist/Shared/Components/FeatureDescription/index.d.ts +0 -1
  34. package/dist/Shared/Components/FeatureDescription/types.d.ts +0 -6
  35. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  36. package/dist/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.d.ts +3 -0
  37. package/dist/Shared/Components/InvalidYAMLTippy/constants.d.ts +1 -0
  38. package/dist/Shared/Components/InvalidYAMLTippy/index.d.ts +2 -0
  39. package/dist/Shared/Components/InvalidYAMLTippy/types.d.ts +6 -0
  40. package/dist/Shared/Components/InvalidYAMLTippy/utils.d.ts +2 -0
  41. package/dist/Shared/Components/Plugin/service.d.ts +3 -3
  42. package/dist/Shared/Components/Plugin/types.d.ts +2 -19
  43. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  44. package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
  45. package/dist/Shared/Components/SelectPicker/constants.d.ts +5 -0
  46. package/dist/Shared/Components/SelectPicker/type.d.ts +15 -23
  47. package/dist/Shared/Components/SelectPicker/utils.d.ts +1 -2
  48. package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +9 -1
  49. package/dist/Shared/Components/index.d.ts +1 -0
  50. package/dist/Shared/Hooks/useForm/useForm.d.ts +29 -26
  51. package/dist/Shared/Hooks/useForm/useForm.types.d.ts +15 -8
  52. package/dist/Shared/Hooks/useForm/useForm.utils.d.ts +1 -1
  53. package/dist/Shared/Services/app.types.d.ts +35 -22
  54. package/dist/Shared/constants.d.ts +3 -1
  55. package/dist/Shared/types.d.ts +13 -4
  56. package/dist/Shared/validations.d.ts +0 -3
  57. package/dist/assets/index.css +1 -1
  58. package/dist/{cssMode-DfmQev0b.js → cssMode-BzAJNNfO.js} +1 -1
  59. package/dist/{freemarker2-BUbjZvd6.js → freemarker2-C5v7rdGk.js} +1 -1
  60. package/dist/{handlebars-CpIW24AH.js → handlebars-Cl_Athu7.js} +1 -1
  61. package/dist/{html-CI5uIkug.js → html-BhmbKvsl.js} +1 -1
  62. package/dist/{htmlMode-D-jvXMLS.js → htmlMode-Eh-qZm_q.js} +1 -1
  63. package/dist/{index-CAwcOytl.js → index-B3Nto1wx.js} +24783 -24619
  64. package/dist/index.d.ts +0 -1
  65. package/dist/index.js +545 -527
  66. package/dist/{javascript-zzz_OdE1.js → javascript-C9CMizZO.js} +1 -1
  67. package/dist/{jsonMode-B4f5UJjc.js → jsonMode-CrNdCxMf.js} +1 -1
  68. package/dist/{liquid-BJ7l4LRn.js → liquid-OSTTmxyA.js} +1 -1
  69. package/dist/{mdx-mgJriR82.js → mdx-Bl4Q7X-Y.js} +1 -1
  70. package/dist/{python-BgwhELJY.js → python-BRbo-lxI.js} +1 -1
  71. package/dist/{razor-CT2-n1-P.js → razor-CH6gsgck.js} +1 -1
  72. package/dist/{tsMode-DqTzAnCd.js → tsMode-CD1RkTWx.js} +1 -1
  73. package/dist/{typescript-CO631RmF.js → typescript-CiU-skWG.js} +1 -1
  74. package/dist/{xml-_9tqHjHQ.js → xml-BKlUFTP7.js} +1 -1
  75. package/dist/{yaml-Bnn975os.js → yaml-B98Fk6S4.js} +1 -1
  76. package/package.json +1 -1
  77. package/dist/Pages/App/AppConfigurations/index.d.ts +0 -1
  78. package/dist/Pages/App/AppConfigurations/utils.d.ts +0 -2
  79. /package/dist/Pages/{CDPipeline → Applications/DevtronApps/Details/CDPipeline}/index.d.ts +0 -0
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_INVALID_YAML_ERROR = "The provided YAML is invalid. Please provide valid YAML.";
@@ -0,0 +1,2 @@
1
+ export { default as InvalidYAMLTippyWrapper } from './InvalidYAMLTippyWrapper';
2
+ export { getInvalidTippyContent } from './utils';
@@ -0,0 +1,6 @@
1
+ import { TooltipProps } from '@Common/Tooltip/types';
2
+ export interface InvalidYAMLTippyWrapperProps {
3
+ parsingError: string;
4
+ restoreLastSavedYAML?: () => void;
5
+ children: TooltipProps['children'];
6
+ }
@@ -0,0 +1,2 @@
1
+ import { InvalidYAMLTippyWrapperProps } from './types';
2
+ export declare const getInvalidTippyContent: ({ parsingError, restoreLastSavedYAML, }: Pick<InvalidYAMLTippyWrapperProps, "parsingError" | "restoreLastSavedYAML">) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ResponseType } from '../../../Common';
2
- import { GetParentPluginListPayloadType, GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
3
- export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, signal, shouldShowError, parentPluginIdentifiers, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, "pluginStore">>;
2
+ import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
3
+ export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, signal, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, "pluginStore">>;
4
4
  export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
5
5
  export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
6
- export declare const getParentPluginList: (params?: Partial<GetParentPluginListPayloadType>) => Promise<ResponseType<MinParentPluginDTO[]>>;
6
+ export declare const getParentPluginList: (appId?: number) => Promise<ResponseType<MinParentPluginDTO[]>>;
@@ -1,5 +1,5 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { ConsequenceType, VariableType } from '../../../Common';
2
+ import { VariableType } from '../../../Common';
3
3
  import { BaseFilterQueryParams } from '../../types';
4
4
  import { ImageWithFallbackProps } from '../ImageWithFallback';
5
5
  import { getPluginStoreData } from './service';
@@ -13,7 +13,6 @@ export interface PluginAPIBaseQueryParamsType {
13
13
  export interface GetPluginTagsPayloadType extends PluginAPIBaseQueryParamsType {
14
14
  }
15
15
  export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType {
16
- type?: 'ALL';
17
16
  }
18
17
  export interface PluginTagNamesDTO {
19
18
  tagNames: string[];
@@ -51,7 +50,7 @@ export interface ParentPluginDTO {
51
50
  pluginVersions: PluginVersionsDTO;
52
51
  pluginIdentifier: string;
53
52
  }
54
- export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon' | 'pluginIdentifier'> {
53
+ export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon'> {
55
54
  }
56
55
  export interface PluginDetailDTO {
57
56
  parentPlugins: ParentPluginDTO[];
@@ -61,7 +60,6 @@ export interface PluginDetailServiceParamsType {
61
60
  appId: number;
62
61
  pluginIds?: number[];
63
62
  parentPluginIds?: number[];
64
- parentPluginIdentifiers?: string[];
65
63
  /**
66
64
  * @default true
67
65
  */
@@ -71,7 +69,6 @@ export interface PluginDetailServiceParamsType {
71
69
  export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
72
70
  pluginId?: PluginDetailServiceParamsType['pluginIds'];
73
71
  parentPluginId?: PluginDetailServiceParamsType['parentPluginIds'];
74
- parentPluginIdentifier?: PluginDetailServiceParamsType['parentPluginIdentifiers'][number];
75
72
  }
76
73
  export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
77
74
  selectedTags: string[];
@@ -187,18 +184,4 @@ export interface PluginTagsContainerProps {
187
184
  export interface PluginImageContainerProps extends Pick<ImageWithFallbackProps, 'imageProps'> {
188
185
  fallbackImageClassName?: string;
189
186
  }
190
- export declare enum TaskActionModalType {
191
- DELETE = "DELETE",
192
- MOVE_PLUGIN = "MOVE_PLUGIN"
193
- }
194
- export interface TaskActionModalStateType {
195
- type: TaskActionModalType;
196
- pluginId: PluginDetailType['id'];
197
- taskIndex: number;
198
- }
199
- export interface MandatoryPluginNodeType {
200
- isOffendingMandatoryPlugin: boolean;
201
- isTriggerBlocked: boolean;
202
- pluginBlockState: ConsequenceType;
203
- }
204
187
  export {};
@@ -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, inputValue, onInputChange, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, ...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;
@@ -2,7 +2,7 @@ import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps,
2
2
  import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
3
3
  export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
4
4
  export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
5
- export declare const SelectPickerControl: <OptionValue>(props: ControlProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
5
+ export declare const SelectPickerControl: <OptionValue, IsMulti extends boolean>({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "icon" | "showSelectedOptionIcon">) => JSX.Element;
6
6
  export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount" | "customSelectedOptionsCount">) => JSX.Element;
7
7
  export declare const SelectPickerLoadingIndicator: () => JSX.Element;
8
8
  export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+ import { SelectPickerProps } from './type';
3
+ export declare const SELECT_PICKER_FONT_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['fontSize']>;
4
+ export declare const SELECT_PICKER_ICON_SIZE_MAP: Record<SelectPickerProps['size'], Pick<CSSProperties, 'width' | 'height'>>;
5
+ export declare const SELECT_PICKER_CONTROL_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['minHeight']>;
@@ -44,24 +44,17 @@ declare module 'react-select/base' {
44
44
  * Imp Note: The menu open/close needs to handled by the consumer in this case
45
45
  */
46
46
  renderCustomOptions?: () => ReactElement;
47
- /**
48
- * Icon to be rendered in the control
49
- */
50
- icon?: ReactElement;
51
- /**
52
- * If true, the selected option icon is shown in the container.
53
- * startIcon has higher priority than endIcon.
54
- *
55
- * @default 'true'
56
- */
57
- showSelectedOptionIcon?: boolean;
58
47
  }
59
48
  }
60
49
  export declare enum SelectPickerVariantType {
61
50
  DEFAULT = "default",
62
51
  BORDER_LESS = "border-less"
63
52
  }
64
- 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' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
53
+ 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'>> & {
54
+ /**
55
+ * Icon to be rendered in the control
56
+ */
57
+ icon?: ReactElement;
65
58
  /**
66
59
  * Error message for the select
67
60
  */
@@ -74,16 +67,23 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
74
67
  * Label for the select. if required is added, the corresponding * is also added
75
68
  */
76
69
  label?: ReactNode;
70
+ /**
71
+ * If true, the selected option icon is shown in the container.
72
+ * startIcon has higher priority than endIcon.
73
+ *
74
+ * @default 'true'
75
+ */
76
+ showSelectedOptionIcon?: boolean;
77
77
  /**
78
78
  * Custom selected options count for use cases like filters
79
79
  */
80
80
  customSelectedOptionsCount?: number;
81
81
  /**
82
- * Height of the dropdown
82
+ * Size of select
83
83
  *
84
84
  * @default 'ComponentSizeType.medium'
85
85
  */
86
- size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
86
+ size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large | ComponentSizeType.small>;
87
87
  /**
88
88
  * Content to be shown in a tippy when disabled
89
89
  */
@@ -145,14 +145,6 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
145
145
  * @default false
146
146
  */
147
147
  isCreatable?: boolean;
148
- /**
149
- * If false, the no options message is not shown
150
- *
151
- * Note: Handling for the menu distortion needs to be handled explicitly in this case
152
- *
153
- * @default true
154
- */
155
- shouldShowNoOptionsMessage?: boolean;
156
148
  } & (IsMulti extends true ? {
157
149
  isMulti: IsMulti | boolean;
158
150
  multiSelectProps?: {
@@ -176,7 +168,7 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
176
168
  export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
177
169
  isGroupHeadingSelectable: boolean;
178
170
  };
179
- 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' | 'getOptionValue'> {
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'> {
180
172
  appliedFilterOptions: SelectPickerOptionType[];
181
173
  handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
182
174
  }
@@ -9,7 +9,6 @@ export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: r
9
9
  * @param optionsList - The list of options or groups of options.
10
10
  * @param value - The value to compare against the options' values.
11
11
  * @param defaultOption - The default option to return if no match is found.
12
- * @param getOptionValue - Override the default value for the option
13
12
  * @returns The matched option or the default option if no match is found.
14
13
  */
15
- export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>, getOptionValue?: SelectPickerProps<OptionValue>["getOptionValue"]) => SelectPickerOptionType<OptionValue>;
14
+ export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
@@ -1,6 +1,7 @@
1
1
  import { LinkProps, NavLinkProps } from 'react-router-dom';
2
2
  import { ComponentSizeType } from '../../constants';
3
3
  import { DataAttributes } from '../../types';
4
+ import { TooltipProps } from '@Common/Tooltip/types';
4
5
  type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
5
6
  type ConditionalTabType = {
6
7
  /**
@@ -56,6 +57,13 @@ type ConditionalTabType = {
56
57
  */
57
58
  active?: never | false;
58
59
  };
60
+ type TabTooltipProps = {
61
+ shouldWrapTooltip: boolean;
62
+ tooltipProps: TooltipProps;
63
+ } | {
64
+ shouldWrapTooltip?: never;
65
+ tooltipProps?: never;
66
+ };
59
67
  export type TabProps = {
60
68
  /**
61
69
  * Unique identifier for the tab.
@@ -97,7 +105,7 @@ export type TabProps = {
97
105
  * Disables the tab, preventing interaction and indicating an inactive state.
98
106
  */
99
107
  disabled?: boolean;
100
- } & ConditionalTabType;
108
+ } & ConditionalTabType & TabTooltipProps;
101
109
  export interface TabGroupProps {
102
110
  /**
103
111
  * Array of tabs to be rendered.
@@ -40,3 +40,4 @@ export * from './EditImageFormField';
40
40
  export * from './Collapse';
41
41
  export * from './Security';
42
42
  export * from './Button';
43
+ export * from './InvalidYAMLTippy';
@@ -1,5 +1,5 @@
1
- import { ChangeEvent, FormEvent } from 'react';
2
- import { UseFormSubmitHandler, UseFormValidations } from './useForm.types';
1
+ import { BaseSyntheticEvent, ChangeEvent } from 'react';
2
+ import { UseFormSubmitHandler, UseFormValidations, UseFormErrorHandler } from './useForm.types';
3
3
  /**
4
4
  * A custom hook to manage form state, validation, and submission handling.
5
5
  *
@@ -16,20 +16,19 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
16
16
  * - 'onBlur': Validation occurs when the input loses focus.
17
17
  * @default 'onChange'
18
18
  */
19
- validationMode?: "onChange" | "onBlur";
19
+ validationMode?: "onChange" | "onBlur" | "onSubmit";
20
20
  }) => {
21
21
  /** The current form data. */
22
22
  data: T;
23
23
  /** An object containing validation errors for each form field. */
24
- errors: Partial<Record<keyof T, string | string[]>>;
25
- /**
26
- * Registers form input fields with onChange, onBlur and onFocus handlers.
27
- *
28
- * @param name - The key of the form field to register.
29
- * @param sanitizeFn - An optional function to sanitize the input value.
30
- * @returns An object containing form field `name`, `onChange`, `onBlur` and `onFocus` event handlers.
31
- */
32
- register: <V extends unknown = string, S extends unknown = unknown>(name: keyof T, sanitizeFn?: (value: V) => S, registerOptions?: {
24
+ errors: Partial<Record<keyof T, string[]>>;
25
+ register: <Value extends unknown, SFnReturnType extends unknown, CustomComponent extends boolean>(name: keyof T, registerOptions?: {
26
+ /**
27
+ * A function to sanitize the input value.
28
+ * @param value The input value.
29
+ * @returns The sanitized value.
30
+ */
31
+ sanitizeFn?: (value: CustomComponent extends true ? Value : string) => SFnReturnType;
33
32
  /**
34
33
  * Prevents the input value from being trimmed.
35
34
  *
@@ -39,26 +38,30 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
39
38
  * @default false - By default, the input will be trimmed.
40
39
  */
41
40
  noTrim?: boolean;
41
+ /** A boolean flag indicating if the input is a custom component. */
42
+ isCustomComponent?: CustomComponent;
42
43
  }) => {
43
- onChange: (e: ChangeEvent<HTMLInputElement>) => void;
44
+ onChange: (e: CustomComponent extends true ? Value : ChangeEvent<HTMLInputElement>) => void;
44
45
  onBlur: () => void;
45
46
  onFocus: () => void;
46
47
  name: keyof T;
47
48
  };
48
- /**
49
- * Handles form submission, validates all form fields, and calls the provided `onValid` function if valid.
50
- *
51
- * @param onValid - A function to handle valid form data on submission.
52
- * @returns The event handler for form submission.
53
- */
54
- handleSubmit: (onValid: UseFormSubmitHandler<T>) => (e: FormEvent<HTMLFormElement>) => void;
55
- /**
56
- * Manually triggers validation for specific form fields.
57
- *
58
- * @param name - The key(s) of the form field(s) to validate.
59
- * @returns The validation error(s), if any.
60
- */
49
+ handleSubmit: (onValid: UseFormSubmitHandler<T>, onError?: UseFormErrorHandler<T>) => (e?: BaseSyntheticEvent) => Promise<void>;
61
50
  trigger: (name: keyof T | (keyof T)[]) => (string | string[]) | (string | string[])[];
51
+ setValue: (name: keyof T, value: T[keyof T], valueOptions?: {
52
+ /** A boolean indicating whether to mark the field as dirty after setting the value. */
53
+ shouldDirty?: boolean;
54
+ /** A boolean indicating whether to mark the field as touched after setting the value. */
55
+ shouldTouch?: boolean;
56
+ }) => void;
57
+ reset: (formData: T, resetOptions?: {
58
+ /** A boolean indicating whether to retain the current dirty state of the form fields. */
59
+ keepDirty?: boolean;
60
+ /** A boolean indicating whether to retain the current touched state of the form fields. */
61
+ keepTouched?: boolean;
62
+ /** A boolean indicating whether to retain the current error state of the form fields. */
63
+ keepErrors?: boolean;
64
+ }) => void;
62
65
  /** An object representing additional form state. */
63
66
  formState: {
64
67
  /** An object indicating which fields have been touched (interacted with). */
@@ -1,4 +1,4 @@
1
- import { FormEvent } from 'react';
1
+ import { BaseSyntheticEvent } from 'react';
2
2
  /**
3
3
  * Describes the "required" validation rule.
4
4
  * It can be a simple boolean or an object containing a boolean value and an error message.
@@ -24,10 +24,10 @@ type ValidationPattern = {
24
24
  * If validation fails, an error message is provided.
25
25
  */
26
26
  type ValidationCustom = {
27
- isValid: (value: string) => boolean;
27
+ isValid: (value: any) => boolean;
28
28
  message: string;
29
29
  } | {
30
- isValid: (value: string) => boolean;
30
+ isValid: (value: any) => boolean;
31
31
  message: string;
32
32
  }[];
33
33
  /**
@@ -41,9 +41,9 @@ export interface UseFormValidation {
41
41
  }
42
42
  /**
43
43
  * Represents the structure for form validation errors.
44
- * Maps each field to an error message or an array of error messages.
44
+ * Maps each field to an array of error messages.
45
45
  */
46
- export type UseFormErrors<T> = Partial<Record<keyof T, string | string[]>>;
46
+ export type UseFormErrors<T> = Partial<Record<keyof T, string[]>>;
47
47
  /**
48
48
  * Represents the fields that have been modified ("dirty") in the form.
49
49
  * Maps each field to a boolean value indicating whether it has been changed.
@@ -58,12 +58,19 @@ export type TouchedFields<T> = Partial<Record<keyof T, boolean>>;
58
58
  * Defines the structure for form validations.
59
59
  * Maps each form field to its corresponding validation rules.
60
60
  */
61
- export type UseFormValidations<T extends {}> = Partial<Record<keyof T, UseFormValidation>>;
61
+ export type UseFormValidations<T extends {}> = ((formData: T) => Partial<Record<keyof T, UseFormValidation>>) | Partial<Record<keyof T, UseFormValidation>>;
62
62
  /**
63
63
  * Describes the function signature for handling form submission.
64
64
  *
65
65
  * @param data - The form data collected during submission.
66
- * @param e - The form event, optionally passed when the form is submitted.
66
+ * @param e - The event, optionally passed when `handleSubmit` is called.
67
67
  */
68
- export type UseFormSubmitHandler<T extends {}> = (data: T, e?: FormEvent<HTMLFormElement>) => void;
68
+ export type UseFormSubmitHandler<T extends {}> = (data: T, e?: BaseSyntheticEvent) => void;
69
+ /**
70
+ * A type defining the function signature for handling form validation errors.
71
+ *
72
+ * @param errors - An object containing the validation errors for form fields.
73
+ * @param e - The event, optionally passed when `handleSubmit` is called.
74
+ */
75
+ export type UseFormErrorHandler<T extends {}> = (errors: UseFormErrors<T>, e?: BaseSyntheticEvent) => void;
69
76
  export {};
@@ -7,4 +7,4 @@ import { UseFormValidation } from './useForm.types';
7
7
  * @param validation - The validation rules for the form field.
8
8
  * @returns Returns error message(s) or null if valid.
9
9
  */
10
- export declare const checkValidation: <T extends Record<keyof T, any> = {}>(value: T[keyof T], validation: UseFormValidation) => string | string[] | null;
10
+ export declare const checkValidation: <T extends Record<keyof T, any> = {}>(value: T[keyof T], validation: UseFormValidation) => string[] | null;
@@ -99,12 +99,23 @@ export declare enum AppEnvDeploymentConfigType {
99
99
  PREVIOUS_DEPLOYMENTS = "PreviousDeployments",
100
100
  DEFAULT_VERSION = "DefaultVersion"
101
101
  }
102
+ export declare enum DraftState {
103
+ Init = 1,
104
+ Discarded = 2,
105
+ Published = 3,
106
+ AwaitApproval = 4
107
+ }
108
+ export declare enum DraftAction {
109
+ Add = 1,
110
+ Update = 2,
111
+ Delete = 3
112
+ }
102
113
  export interface DraftMetadataDTO {
103
114
  appId: number;
104
115
  envId: number;
105
116
  resource: number;
106
117
  resourceName: string;
107
- action: number;
118
+ action: DraftAction;
108
119
  data: string;
109
120
  userComment: string;
110
121
  changeProposed: boolean;
@@ -113,7 +124,7 @@ export interface DraftMetadataDTO {
113
124
  };
114
125
  draftId: number;
115
126
  draftVersionId: number;
116
- draftState: number;
127
+ draftState: DraftState;
117
128
  draftResolvedValue: string;
118
129
  approvers: string[];
119
130
  canApprove: boolean;
@@ -121,24 +132,37 @@ export interface DraftMetadataDTO {
121
132
  dataEncrypted: boolean;
122
133
  isAppAdmin: boolean;
123
134
  }
135
+ export declare enum CMSecretExternalType {
136
+ Internal = "",
137
+ KubernetesConfigMap = "KubernetesConfigMap",
138
+ KubernetesSecret = "KubernetesSecret",
139
+ AWSSecretsManager = "AWSSecretsManager",
140
+ AWSSystemManager = "AWSSystemManager",
141
+ HashiCorpVault = "HashiCorpVault",
142
+ ESO_GoogleSecretsManager = "ESO_GoogleSecretsManager",
143
+ ESO_AWSSecretsManager = "ESO_AWSSecretsManager",
144
+ ESO_AzureSecretsManager = "ESO_AzureSecretsManager",
145
+ ESO_HashiCorpVault = "ESO_HashiCorpVault"
146
+ }
124
147
  export interface ConfigDatum {
125
148
  name: string;
126
149
  type: string;
127
150
  external: boolean;
128
- data: Record<string, string>;
129
- defaultData: Record<string, string>;
151
+ data: Record<string, any>;
152
+ defaultData: Record<string, any>;
130
153
  global: boolean;
131
- externalType: string;
132
- esoSecretData: {};
133
- defaultESOSecretData: {};
134
- secretData: Record<string, string>;
135
- defaultSecretData: Record<string, string>;
154
+ externalType: CMSecretExternalType;
155
+ esoSecretData: Record<string, any>;
156
+ defaultESOSecretData: Record<string, any>;
157
+ secretData: Record<string, any>[];
158
+ defaultSecretData: Record<string, any>[];
136
159
  roleARN: string;
137
160
  subPath: boolean;
138
161
  filePermission: string;
139
162
  overridden: boolean;
140
- mountPath?: string;
141
- defaultMountPath?: string;
163
+ mountPath: string;
164
+ defaultMountPath: string;
165
+ esoSubPath: string[];
142
166
  }
143
167
  export interface ConfigMapSecretDataConfigDatumDTO extends ConfigDatum {
144
168
  draftMetadata: DraftMetadataDTO;
@@ -220,17 +244,6 @@ export interface TemplateListDTO {
220
244
  pipelineId?: number;
221
245
  wfrId?: number;
222
246
  }
223
- export interface ManifestTemplateDTO {
224
- data: string;
225
- resolvedData: string;
226
- variableSnapshot: null;
227
- }
228
- export declare enum DraftState {
229
- Init = 1,
230
- Discarded = 2,
231
- Published = 3,
232
- AwaitApproval = 4
233
- }
234
247
  export declare enum EnvResourceType {
235
248
  ConfigMap = "configmap",
236
249
  Secret = "secrets",
@@ -1,5 +1,5 @@
1
1
  import { OptionType } from '../Common/Types';
2
- import { CDMaterialSidebarType } from './types';
2
+ import { CDMaterialSidebarType, ConfigKeysWithLockType, ConfigurationType } from './types';
3
3
  export declare const ARTIFACT_STATUS: {
4
4
  PROGRESSING: string;
5
5
  DEGRADED: string;
@@ -411,3 +411,5 @@ export declare enum SelectAllGroupedResourceIdentifiers {
411
411
  }
412
412
  export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
413
413
  export declare const TRIGGER_STATUS_PROGRESSING: string[];
414
+ export declare const CONFIGURATION_TYPE_VALUES: ConfigurationType[];
415
+ export declare const DEFAULT_LOCKED_KEYS_CONFIG: Readonly<ConfigKeysWithLockType>;
@@ -376,7 +376,6 @@ export declare enum ResourceKindType {
376
376
  installation = "installation",
377
377
  environment = "environment",
378
378
  cdPipeline = "cd-pipeline",
379
- ciPipeline = "ci-pipeline",
380
379
  project = "project"
381
380
  }
382
381
  /**
@@ -396,9 +395,7 @@ export interface SeverityCount {
396
395
  unknown: number;
397
396
  }
398
397
  export declare enum PolicyKindType {
399
- lockConfiguration = "lock-configuration",
400
- imagePromotion = "image-promotion",
401
- plugins = "plugin"
398
+ lockConfiguration = "lock-configuration"
402
399
  }
403
400
  export interface LastExecutionResultType {
404
401
  lastExecution: string;
@@ -575,6 +572,18 @@ export type BaseFilterQueryParams<T> = {
575
572
  */
576
573
  showAll?: boolean;
577
574
  } & SortingParams<T>;
575
+ export declare enum ConfigurationType {
576
+ GUI = "GUI",
577
+ YAML = "YAML"
578
+ }
579
+ export interface BaseURLParams {
580
+ appId: string;
581
+ envId: string;
582
+ }
583
+ export interface ConfigKeysWithLockType {
584
+ config: string[];
585
+ allowed: boolean;
586
+ }
578
587
  export type DataAttributes = Record<`data-${string}`, unknown>;
579
588
  export interface RuntimeParamsListItemType extends KeyValueListType {
580
589
  id: number;
@@ -14,8 +14,6 @@ export declare const MESSAGES: {
14
14
  VALID_POSITIVE_INTEGER: string;
15
15
  MAX_SAFE_INTEGER: string;
16
16
  INVALID_SEMANTIC_VERSION: string;
17
- INVALID_DATE: string;
18
- DATE_BEFORE_CURRENT_TIME: string;
19
17
  };
20
18
  export declare const requiredField: (value: string) => ValidationResponseType;
21
19
  export declare const validateName: (name: string) => ValidationResponseType;
@@ -44,4 +42,3 @@ export declare const validateSemanticVersioning: (version: string) => Validation
44
42
  */
45
43
  export declare const validateDisplayName: (name: string) => ValidationResponseType;
46
44
  export declare const validateJSON: (json: string) => ValidationResponseType;
47
- export declare const validateDateAndTime: (date: Date) => ValidationResponseType;