@devtron-labs/devtron-fe-common-lib 0.2.2-beta-12 → 0.2.2-beta-13

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 (29) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +2 -1
  2. package/dist/Common/Constants.d.ts +4 -0
  3. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -55
  4. package/dist/Shared/Components/SelectPicker/common.d.ts +8 -11
  5. package/dist/Shared/Components/SelectPicker/index.d.ts +0 -2
  6. package/dist/Shared/Components/SelectPicker/type.d.ts +5 -90
  7. package/dist/Shared/Components/SelectPicker/utils.d.ts +2 -13
  8. package/dist/Shared/types.d.ts +7 -0
  9. package/dist/Shared/validations.d.ts +3 -0
  10. package/dist/{cssMode-1bb0db54.js → cssMode-f76f6eb4.js} +1 -1
  11. package/dist/{freemarker2-e0e171de.js → freemarker2-7ca37c07.js} +1 -1
  12. package/dist/{handlebars-d999277c.js → handlebars-d3bd646b.js} +1 -1
  13. package/dist/{html-e01f2816.js → html-974af54b.js} +1 -1
  14. package/dist/{htmlMode-32133fb2.js → htmlMode-05be0b53.js} +1 -1
  15. package/dist/{index-219f5050.js → index-782880a9.js} +37726 -42195
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.js +354 -355
  18. package/dist/{javascript-7c68d400.js → javascript-e5fdf32c.js} +1 -1
  19. package/dist/{jsonMode-345fc744.js → jsonMode-30386984.js} +1 -1
  20. package/dist/{liquid-8e910217.js → liquid-e1488c1c.js} +1 -1
  21. package/dist/{mdx-7ea6bf08.js → mdx-3e24a3b9.js} +1 -1
  22. package/dist/{python-cba4e250.js → python-5588557e.js} +1 -1
  23. package/dist/{razor-95775edf.js → razor-6d86f48c.js} +1 -1
  24. package/dist/{tsMode-77cee255.js → tsMode-6c3ed4ab.js} +1 -1
  25. package/dist/{typescript-7c5f7fb4.js → typescript-9eb4183d.js} +1 -1
  26. package/dist/{xml-ea16f1dc.js → xml-007d2604.js} +1 -1
  27. package/dist/{yaml-91fdc87a.js → yaml-49c51fdf.js} +1 -1
  28. package/package.json +5 -5
  29. package/dist/Shared/Components/SelectPicker/FilterSelectPicker.d.ts +0 -4
@@ -62,7 +62,8 @@ export declare enum CodeEditorThemesKeys {
62
62
  vsDarkDT = "vs-dark--dt",
63
63
  deleteDraft = "delete-draft",
64
64
  unpublished = "unpublished",
65
- vs = "vs"
65
+ vs = "vs",
66
+ networkStatusInterface = "network-status-interface"
66
67
  }
67
68
  export interface CodeEditorInitialValueType {
68
69
  mode: string;
@@ -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
+ NETWORK_STATUS_INTERFACE: string;
46
47
  };
47
48
  export declare const ROUTES: {
48
49
  APP: string;
@@ -76,6 +77,9 @@ export declare const ROUTES: {
76
77
  CONFIG_CD_PIPELINE: string;
77
78
  MODULE_CONFIGURED: string;
78
79
  RESOURCE_HISTORY_DEPLOYMENT: string;
80
+ ATTRIBUTES: string;
81
+ ATTRIBUTES_CREATE: string;
82
+ ATTRIBUTES_UPDATE: string;
79
83
  APP_LIST_MIN: string;
80
84
  CLUSTER_LIST_MIN: string;
81
85
  PLUGIN_GLOBAL_LIST_DETAIL_V2: string;
@@ -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, ...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, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "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
  */
@@ -75,85 +70,5 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
75
70
  * @default 'ComponentSizeType.small'
76
71
  */
77
72
  menuSize?: ComponentSizeType;
78
- /**
79
- * Variant of the select.
80
- *
81
- * @default SelectPickerVariantType.DEFAULT
82
- */
83
- variant?: SelectPickerVariantType;
84
- /**
85
- * Disables the ellipsis on description, it will be shown in full width, wrapped if required.
86
- *
87
- * @default false
88
- */
89
- disableDescriptionEllipsis?: boolean;
90
- /**
91
- * Ref for the select picker
92
- */
93
- selectRef?: IsMulti extends true ? MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>, true>> : MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>>>;
94
- /**
95
- * If true, the menu is aligned at the right end to prevent going outside of viewport
96
- * in case of menu being larger than the control
97
- *
98
- * @default false
99
- */
100
- shouldMenuAlignRight?: boolean;
101
- /**
102
- * If true, the select spans to the max available width
103
- *
104
- * @default false
105
- */
106
- fullWidth?: boolean;
107
- } & (IsMulti extends true ? {
108
- isMulti: IsMulti | boolean;
109
- multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
110
- /**
111
- * If true, the select picker creates the new option
112
- * Only applicable for IsMulti: true
113
- *
114
- * @default false
115
- */
116
- isCreatable?: boolean;
117
- /**
118
- * If true, the group heading can be selected
119
- *
120
- * Only applicable for IsMulti: true
121
- *
122
- * @default false
123
- */
124
- isGroupHeadingSelectable?: boolean;
125
- /**
126
- * Callback handler to check if the given selection is valid or not
127
- */
128
- getIsOptionValid?: (option: SelectPickerOptionType<OptionValue>) => boolean;
129
- };
130
- } : {
131
- isMulti?: never;
132
- multiSelectProps?: never;
133
- }) & ({
134
- /**
135
- * If true, custom options are rendered in the menuList component of react select
136
- *
137
- * Note: renderCustomOptions is required to be passed; renderMenuListFooter is also not called
138
- *
139
- * @default false
140
- */
141
- shouldRenderCustomOptions: boolean;
142
- /**
143
- * Callback handler for custom options
144
- *
145
- * Imp Note: The menu open/close needs to handled by the consumer in this case
146
- */
147
- renderCustomOptions: () => ReactElement;
148
- } | {
149
- shouldRenderCustomOptions?: never;
150
- renderCustomOptions?: never;
151
- });
152
- export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
153
- isGroupHeadingSelectable: boolean;
154
- };
155
- export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight'> {
156
- appliedFilterOptions: SelectPickerProps<number | string, true>['options'];
157
- handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
158
73
  }
159
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>;
@@ -536,6 +536,13 @@ export interface BatchConfigType {
536
536
  export interface scrollableInterface {
537
537
  autoBottomScroll: boolean;
538
538
  }
539
+ export declare enum URLProtocolType {
540
+ HTTP = "http:",
541
+ HTTPS = "https:",
542
+ SSH = "ssh:",
543
+ SMTP = "smtp:",
544
+ S3 = "s3:"
545
+ }
539
546
  export type BaseFilterQueryParams<T> = {
540
547
  /**
541
548
  * Offset for the list result
@@ -1,3 +1,5 @@
1
+ import { URLProtocolType } from './types';
2
+
1
3
  export interface ValidationResponseType {
2
4
  isValid: boolean;
3
5
  message?: string;
@@ -20,6 +22,7 @@ export declare const validateStringLength: (value: string, maxLimit: number, min
20
22
  export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;
21
23
  export declare const validateRequiredPositiveInteger: (value: string | number) => ValidationResponseType;
22
24
  export declare const validateURL: (url: string, allowBase64Url?: boolean) => ValidationResponseType;
25
+ export declare const validateProtocols: (url: string, protocols: URLProtocolType[], isRequired?: boolean) => ValidationResponseType;
23
26
  export declare const validateIfImageExist: (url: string) => Promise<ValidationResponseType>;
24
27
  export declare const validateUniqueKeys: (keys: string[]) => {
25
28
  isValid: boolean;
@@ -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-219f5050.js";
4
+ import { m as Ne } from "./index-782880a9.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-219f5050.js";
1
+ import { m as F } from "./index-782880a9.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-219f5050.js";
1
+ import { m as i } from "./index-782880a9.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-219f5050.js";
1
+ import { m as d } from "./index-782880a9.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-219f5050.js";
4
+ import { m as Qe } from "./index-782880a9.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)