@devtron-labs/devtron-fe-common-lib 0.2.2-beta-15 → 0.2.2-beta-17

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 (28) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +1 -0
  2. package/dist/Common/Constants.d.ts +1 -0
  3. package/dist/Common/RJSF/constants.d.ts +5 -0
  4. package/dist/Common/RJSF/index.d.ts +1 -0
  5. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -55
  6. package/dist/Shared/Components/SelectPicker/common.d.ts +8 -11
  7. package/dist/Shared/Components/SelectPicker/index.d.ts +0 -2
  8. package/dist/Shared/Components/SelectPicker/type.d.ts +6 -95
  9. package/dist/Shared/Components/SelectPicker/utils.d.ts +2 -13
  10. package/dist/{cssMode-79cf08a3.js → cssMode-62ddc175.js} +1 -1
  11. package/dist/{freemarker2-453bbf21.js → freemarker2-308f0c51.js} +1 -1
  12. package/dist/{handlebars-0c665205.js → handlebars-bd7cc20f.js} +1 -1
  13. package/dist/{html-6e3cbbc7.js → html-8e450585.js} +1 -1
  14. package/dist/{htmlMode-a8206d99.js → htmlMode-fcdbe206.js} +1 -1
  15. package/dist/{index-38725b26.js → index-d00df9d3.js} +37550 -42056
  16. package/dist/index.js +250 -252
  17. package/dist/{javascript-7eee0e52.js → javascript-8bbb7ab0.js} +1 -1
  18. package/dist/{jsonMode-a3c4da82.js → jsonMode-1045eb56.js} +1 -1
  19. package/dist/{liquid-63e5b997.js → liquid-0dd677cf.js} +1 -1
  20. package/dist/{mdx-9f100657.js → mdx-bfdb8af8.js} +1 -1
  21. package/dist/{python-b3af8c42.js → python-fcd3e584.js} +1 -1
  22. package/dist/{razor-f2c34363.js → razor-d9fdcf79.js} +1 -1
  23. package/dist/{tsMode-4fe88a41.js → tsMode-cb51e6e3.js} +1 -1
  24. package/dist/{typescript-a5364e45.js → typescript-7749fc44.js} +1 -1
  25. package/dist/{xml-ef45bc46.js → xml-36d66a9a.js} +1 -1
  26. package/dist/{yaml-c4ceccb8.js → yaml-8553fb6c.js} +1 -1
  27. package/package.json +5 -5
  28. package/dist/Shared/Components/SelectPicker/FilterSelectPicker.d.ts +0 -4
@@ -31,6 +31,7 @@ export interface CodeEditorInterface {
31
31
  isKubernetes?: boolean;
32
32
  cleanData?: boolean;
33
33
  chartVersion?: any;
34
+ adjustEditorHeightToContent?: boolean;
34
35
  }
35
36
  export interface CodeEditorHeaderInterface {
36
37
  children?: any;
@@ -43,6 +43,7 @@ export declare const URLS: {
43
43
  GLOBAL_CONFIG_DOCKER: string;
44
44
  DEPLOYMENT_HISTORY_CONFIGURATIONS: string;
45
45
  GLOBAL_CONFIG_SCOPED_VARIABLES: string;
46
+ GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
46
47
  };
47
48
  export declare const ROUTES: {
48
49
  APP: string;
@@ -4,3 +4,8 @@ export declare const PLACEHOLDERS: {
4
4
  OBJECT_KEY: string;
5
5
  };
6
6
  export declare const DEFAULT_FIELD_TITLE = "Key not available";
7
+ export declare const HideSubmitButtonUISchema: {
8
+ 'ui:submitButtonOptions': {
9
+ norender: boolean;
10
+ };
11
+ };
@@ -1,3 +1,4 @@
1
1
  export { RJSFForm } from './Form';
2
2
  export * from './types';
3
3
  export { getInferredTypeFromValueType, getRedirectionProps } from './utils';
4
+ export { HideSubmitButtonUISchema } from './constants';
@@ -80,60 +80,6 @@ import { SelectPickerProps } from './type';
80
80
  * ```tsx
81
81
  * <SelectPicker ... showSelectedOptionsCount />
82
82
  * ```
83
- * @example Multi Select
84
- * ```tsx
85
- * <SelectPicker ... isMulti />
86
- * ```
87
- *
88
- * @example Creatable Multi Select
89
- * ```tsx
90
- * <SelectPicker
91
- * ...
92
- * isMulti
93
- * multiSelectProps={{
94
- * isCreatable: true
95
- * }}
96
- * />
97
- * ```
98
- *
99
- * @example Multi Select with group heading selectable
100
- * ```tsx
101
- * <SelectPicker
102
- * ...
103
- * isMulti
104
- * multiSelectProps={{
105
- * isGroupHeadingSelectable: true
106
- * }}
107
- * />
108
- * ```
109
- *
110
- * @example Multi Select with selected option validator
111
- * ```tsx
112
- * <SelectPicker
113
- * ...
114
- * isMulti
115
- * multiSelectProps={{
116
- * getIsOptionValid: (option) => boolean
117
- * }}
118
- * />
119
- * ```
120
- *
121
- * @example Custom options rendering support (menuIsOpen needs to be handled by consumer)
122
- * ```tsx
123
- * <SelectPicker
124
- * ...
125
- * shouldRenderCustomOptions
126
- * renderCustomOptions={() => <div />}
127
- * />
128
- * ```
129
- *
130
- * @example Align the menu at the right most end
131
- * ```tsx
132
- * <SelectPicker
133
- * ...
134
- * shouldMenuAlignRight
135
- * />
136
- * ```
137
83
  */
138
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, renderCustomOptions, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
84
+ declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, ...props }: SelectPickerProps) => JSX.Element;
139
85
  export default SelectPicker;
@@ -1,13 +1,10 @@
1
- import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps } from 'react-select';
2
- import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
1
+ import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps } from 'react-select';
2
+ import { SelectPickerOptionType, SelectPickerProps } from './type';
3
3
 
4
- export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>>) => JSX.Element;
5
- export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>>) => JSX.Element;
6
- export declare const SelectPickerControl: <OptionValue, IsMulti extends boolean>({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "icon" | "showSelectedOptionIcon">) => JSX.Element;
7
- export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "customSelectedOptionsCount" | "showSelectedOptionsCount">) => JSX.Element;
4
+ export declare const SelectPickerDropdownIndicator: (props: DropdownIndicatorProps<SelectPickerOptionType>) => JSX.Element;
5
+ export declare const SelectPickerClearIndicator: (props: ClearIndicatorProps<SelectPickerOptionType>) => JSX.Element;
6
+ export declare const SelectPickerControl: ({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'icon' | 'showSelectedOptionIcon'>) => JSX.Element;
7
+ export declare const SelectPickerValueContainer: ({ showSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'showSelectedOptionsCount'>) => JSX.Element;
8
8
  export declare const SelectPickerLoadingIndicator: () => JSX.Element;
9
- export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
10
- export declare const SelectPickerMenuList: <OptionValue, IsMulti extends boolean>({ renderMenuListFooter, shouldRenderCustomOptions, renderCustomOptions, ...props }: MenuListProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "renderMenuListFooter" | "shouldRenderCustomOptions" | "renderCustomOptions">) => JSX.Element;
11
- export declare const SelectPickerMultiValueLabel: <OptionValue, IsMulti extends boolean>({ getIsOptionValid, ...props }: MultiValueProps<SelectPickerOptionType<OptionValue>, true, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid">) => JSX.Element;
12
- export declare const SelectPickerMultiValueRemove: (props: MultiValueRemoveProps) => JSX.Element;
13
- export declare const SelectPickerGroupHeading: <OptionValue>({ isGroupHeadingSelectable, ...props }: SelectPickerGroupHeadingProps<OptionValue>) => JSX.Element;
9
+ export declare const SelectPickerOption: (props: OptionProps<SelectPickerOptionType>) => JSX.Element;
10
+ export declare const SelectPickerMenuList: ({ renderMenuListFooter, ...props }: MenuListProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'renderMenuListFooter'>) => JSX.Element;
@@ -1,4 +1,2 @@
1
1
  export { default as SelectPicker } from './SelectPicker.component';
2
- export { default as FilterSelectPicker } from './FilterSelectPicker';
3
2
  export * from './type';
4
- export { getSelectPickerOptionByValue } from './utils';
@@ -1,10 +1,9 @@
1
1
  import { OptionType } from '../../../Common/Types';
2
2
  import { ComponentSizeType } from '../../constants';
3
- import { MutableRefObject, ReactElement, ReactNode } from 'react';
4
- import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select';
5
- import { CreatableProps } from 'react-select/creatable';
3
+ import { ReactElement, ReactNode } from 'react';
4
+ import { Props as ReactSelectProps } from 'react-select';
6
5
 
7
- export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
6
+ export interface SelectPickerOptionType extends OptionType<number | string, ReactNode> {
8
7
  /**
9
8
  * Description to be displayed for the option
10
9
  */
@@ -18,12 +17,8 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
18
17
  */
19
18
  endIcon?: ReactElement;
20
19
  }
21
- export declare enum SelectPickerVariantType {
22
- DEFAULT = "default",
23
- BORDER_LESS = "border-less"
24
- }
25
- type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
26
- export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus'> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
20
+ type SelectProps = ReactSelectProps<SelectPickerOptionType>;
21
+ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder'>, Required<Pick<SelectProps, 'classNamePrefix' | 'inputId' | 'name'>> {
27
22
  /**
28
23
  * Icon to be rendered in the control
29
24
  */
@@ -35,7 +30,7 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
35
30
  /**
36
31
  * Render function for the footer at the bottom of menu list. It is sticky by default
37
32
  */
38
- renderMenuListFooter?: (selectedOptions: SelectProps<OptionValue, IsMulti>['value']) => ReactNode;
33
+ renderMenuListFooter?: () => ReactNode;
39
34
  /**
40
35
  * Info text for the select, if any
41
36
  */
@@ -51,10 +46,6 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
51
46
  * @default 'true'
52
47
  */
53
48
  showSelectedOptionIcon?: boolean;
54
- /**
55
- * Custom selected options count for use cases like filters
56
- */
57
- customSelectedOptionsCount?: number;
58
49
  /**
59
50
  * Height of the dropdown
60
51
  *
@@ -79,85 +70,5 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
79
70
  * @default 'ComponentSizeType.small'
80
71
  */
81
72
  menuSize?: ComponentSizeType;
82
- /**
83
- * Variant of the select.
84
- *
85
- * @default SelectPickerVariantType.DEFAULT
86
- */
87
- variant?: SelectPickerVariantType;
88
- /**
89
- * Disables the ellipsis on description, it will be shown in full width, wrapped if required.
90
- *
91
- * @default false
92
- */
93
- disableDescriptionEllipsis?: boolean;
94
- /**
95
- * Ref for the select picker
96
- */
97
- selectRef?: IsMulti extends true ? MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>, true>> : MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>>>;
98
- /**
99
- * If true, the menu is aligned at the right end to prevent going outside of viewport
100
- * in case of menu being larger than the control
101
- *
102
- * @default false
103
- */
104
- shouldMenuAlignRight?: boolean;
105
- /**
106
- * If true, the select spans to the max available width
107
- *
108
- * @default false
109
- */
110
- fullWidth?: boolean;
111
- } & (IsMulti extends true ? {
112
- isMulti: IsMulti | boolean;
113
- multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
114
- /**
115
- * If true, the select picker creates the new option
116
- * Only applicable for IsMulti: true
117
- *
118
- * @default false
119
- */
120
- isCreatable?: boolean;
121
- /**
122
- * If true, the group heading can be selected
123
- *
124
- * Only applicable for IsMulti: true
125
- *
126
- * @default false
127
- */
128
- isGroupHeadingSelectable?: boolean;
129
- /**
130
- * Callback handler to check if the given selection is valid or not
131
- */
132
- getIsOptionValid?: (option: SelectPickerOptionType<OptionValue>) => boolean;
133
- };
134
- } : {
135
- isMulti?: never;
136
- multiSelectProps?: never;
137
- }) & ({
138
- /**
139
- * If true, custom options are rendered in the menuList component of react select
140
- *
141
- * Note: renderCustomOptions is required to be passed; renderMenuListFooter is also not called
142
- *
143
- * @default false
144
- */
145
- shouldRenderCustomOptions: boolean;
146
- /**
147
- * Callback handler for custom options
148
- *
149
- * Imp Note: The menu open/close needs to handled by the consumer in this case
150
- */
151
- renderCustomOptions: () => ReactElement;
152
- } | {
153
- shouldRenderCustomOptions?: never;
154
- renderCustomOptions?: never;
155
- });
156
- export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
157
- isGroupHeadingSelectable: boolean;
158
- };
159
- export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight'> {
160
- appliedFilterOptions: SelectPickerProps<number | string, true>['options'];
161
- handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
162
73
  }
163
74
  export {};
@@ -1,15 +1,4 @@
1
- import { CHECKBOX_VALUE } from '../../../Common/Types';
2
- import { GroupBase, MultiValue, OptionsOrGroups, StylesConfig } from 'react-select';
1
+ import { StylesConfig } from 'react-select';
3
2
  import { SelectPickerOptionType, SelectPickerProps } from './type';
4
3
 
5
- export declare const getCommonSelectStyle: <OptionValue, IsMulti extends boolean>({ error, size, menuSize, variant, getIsOptionValid, isGroupHeadingSelectable, shouldMenuAlignRight, }: Pick<SelectPickerProps<OptionValue, IsMulti>, "error" | "size" | "shouldMenuAlignRight" | "menuSize" | "variant"> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid" | "isGroupHeadingSelectable">) => StylesConfig<SelectPickerOptionType<OptionValue>, boolean, GroupBase<SelectPickerOptionType<OptionValue>>>;
6
- export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: readonly SelectPickerOptionType<OptionValue>[], selectedOptions: MultiValue<SelectPickerOptionType<OptionValue>>, getOptionValue: (option: SelectPickerOptionType<OptionValue>) => string) => CHECKBOX_VALUE.CHECKED | CHECKBOX_VALUE.INTERMEDIATE;
7
- /**
8
- * Retrieves an option from the options list based on the provided value.
9
- *
10
- * @param optionsList - The list of options or groups of options.
11
- * @param value - The value to compare against the options' values.
12
- * @param defaultOption - The default option to return if no match is found.
13
- * @returns The matched option or the default option if no match is found.
14
- */
15
- export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: string | number, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
4
+ export declare const getCommonSelectStyle: ({ error, size, menuSize, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize'>) => StylesConfig<SelectPickerOptionType>;
@@ -1,7 +1,7 @@
1
1
  var Le = Object.defineProperty;
2
2
  var je = (e, n, i) => n in e ? Le(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (je(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Ne } from "./index-38725b26.js";
4
+ import { m as Ne } from "./index-d00df9d3.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as F } from "./index-38725b26.js";
1
+ import { m as F } from "./index-d00df9d3.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as i } from "./index-38725b26.js";
1
+ import { m as i } from "./index-d00df9d3.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as d } from "./index-38725b26.js";
1
+ import { m as d } from "./index-d00df9d3.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var $e = Object.defineProperty;
2
2
  var qe = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (qe(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Qe } from "./index-38725b26.js";
4
+ import { m as Qe } from "./index-d00df9d3.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)