@devtron-labs/devtron-fe-common-lib 0.2.9-beta-2 → 0.2.10

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 (37) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +1 -0
  2. package/dist/Common/Constants.d.ts +2 -0
  3. package/dist/Common/Helper.d.ts +1 -1
  4. package/dist/Common/RJSF/constants.d.ts +5 -0
  5. package/dist/Common/RJSF/index.d.ts +1 -0
  6. package/dist/Pages/GlobalConfigurations/DeploymentCharts/basicViewSchema.json.d.ts +273 -0
  7. package/dist/Pages/GlobalConfigurations/DeploymentCharts/fallbackJobsNCronJobGuiSchema.json.d.ts +157 -0
  8. package/dist/Pages/GlobalConfigurations/DeploymentCharts/index.d.ts +2 -0
  9. package/dist/Pages/GlobalConfigurations/DeploymentCharts/types.d.ts +24 -0
  10. package/dist/Pages/GlobalConfigurations/DeploymentCharts/utils.d.ts +4 -0
  11. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
  12. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -55
  13. package/dist/Shared/Components/SelectPicker/common.d.ts +8 -11
  14. package/dist/Shared/Components/SelectPicker/index.d.ts +0 -1
  15. package/dist/Shared/Components/SelectPicker/type.d.ts +7 -80
  16. package/dist/Shared/Components/SelectPicker/utils.d.ts +3 -5
  17. package/dist/Shared/Helpers.d.ts +1 -0
  18. package/dist/Shared/validations.d.ts +1 -0
  19. package/dist/{cssMode-f51aca0f.js → cssMode-c662d6e3.js} +1 -1
  20. package/dist/{freemarker2-ffaae3eb.js → freemarker2-aa7e1cef.js} +1 -1
  21. package/dist/{handlebars-f016e02f.js → handlebars-4c137fcc.js} +1 -1
  22. package/dist/{html-b053da28.js → html-7d035382.js} +1 -1
  23. package/dist/{htmlMode-bfa76cea.js → htmlMode-62a2295e.js} +1 -1
  24. package/dist/{index-bf859529.js → index-c1965425.js} +38469 -42419
  25. package/dist/index.js +431 -426
  26. package/dist/{javascript-40d22d1b.js → javascript-164f5d29.js} +1 -1
  27. package/dist/{jsonMode-e6d67eb9.js → jsonMode-fe8f4e94.js} +1 -1
  28. package/dist/{liquid-82aa3bae.js → liquid-f1e74cbe.js} +1 -1
  29. package/dist/{mdx-b09f1c25.js → mdx-5c57e38c.js} +1 -1
  30. package/dist/{python-171eb4e4.js → python-d843b478.js} +1 -1
  31. package/dist/{razor-9ec2cf31.js → razor-cc78fc83.js} +1 -1
  32. package/dist/{tsMode-ef5c98ad.js → tsMode-38f892b6.js} +1 -1
  33. package/dist/{typescript-59e4e181.js → typescript-7d752a06.js} +1 -1
  34. package/dist/{xml-cf88fa42.js → xml-4bc85e14.js} +1 -1
  35. package/dist/{yaml-6991dfc0.js → yaml-c61dd5b2.js} +1 -1
  36. package/package.json +5 -5
  37. package/dist/Shared/Components/SelectPicker/FilterSelectPicker.d.ts +0 -4
@@ -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
  */
@@ -20,10 +19,10 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
20
19
  }
21
20
  export declare enum SelectPickerVariantType {
22
21
  DEFAULT = "default",
23
- BORDER_LESS = "border-less"
22
+ BORDERLESS = "borderless"
24
23
  }
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' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur'> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
24
+ type SelectProps = ReactSelectProps<SelectPickerOptionType>;
25
+ 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
26
  /**
28
27
  * Icon to be rendered in the control
29
28
  */
@@ -35,7 +34,7 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
35
34
  /**
36
35
  * Render function for the footer at the bottom of menu list. It is sticky by default
37
36
  */
38
- renderMenuListFooter?: (selectedOptions: SelectProps<OptionValue, IsMulti>['value']) => ReactNode;
37
+ renderMenuListFooter?: () => ReactNode;
39
38
  /**
40
39
  * Info text for the select, if any
41
40
  */
@@ -51,10 +50,6 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
51
50
  * @default 'true'
52
51
  */
53
52
  showSelectedOptionIcon?: boolean;
54
- /**
55
- * Custom selected options count for use cases like filters
56
- */
57
- customSelectedOptionsCount?: number;
58
53
  /**
59
54
  * Height of the dropdown
60
55
  *
@@ -91,73 +86,5 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
91
86
  * @default false
92
87
  */
93
88
  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
89
  }
163
90
  export {};
@@ -1,9 +1,7 @@
1
- import { CHECKBOX_VALUE } from '../../../Common/Types';
2
- import { GroupBase, MultiValue, OptionsOrGroups, StylesConfig } from 'react-select';
1
+ import { GroupBase, OptionsOrGroups, 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;
4
+ export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize' | 'variant'>) => StylesConfig<SelectPickerOptionType>;
7
5
  /**
8
6
  * Retrieves an option from the options list based on the provided value.
9
7
  *
@@ -12,4 +10,4 @@ export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: r
12
10
  * @param defaultOption - The default option to return if no match is found.
13
11
  * @returns The matched option or the default option if no match is found.
14
12
  */
15
- export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
13
+ export declare const getSelectPickerOptionByValue: (optionsList: OptionsOrGroups<SelectPickerOptionType, GroupBase<SelectPickerOptionType>>, value: string | number, defaultOption?: SelectPickerOptionType) => SelectPickerOptionType;
@@ -25,6 +25,7 @@ export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[])
25
25
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
26
26
  export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
27
27
  export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
28
+ export declare function versionComparatorBySortOrder(a: Record<string, any>, b: Record<string, any>, compareKey: string, orderBy: SortingOrder): any;
28
29
  export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
29
30
  export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
30
31
  export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
@@ -31,3 +31,4 @@ export declare const validateUniqueKeys: (keys: string[]) => {
31
31
  isValid: boolean;
32
32
  message: string;
33
33
  };
34
+ export declare const validateJSON: (json: string) => ValidationResponseType;
@@ -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-bf859529.js";
4
+ import { m as Ne } from "./index-c1965425.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-bf859529.js";
1
+ import { m as F } from "./index-c1965425.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-bf859529.js";
1
+ import { m as i } from "./index-c1965425.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-bf859529.js";
1
+ import { m as d } from "./index-c1965425.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-bf859529.js";
4
+ import { m as Qe } from "./index-c1965425.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)