@devtron-labs/devtron-fe-common-lib 0.0.86-beta-2 → 0.0.86-beta-4

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 (48) hide show
  1. package/dist/Common/BreadCrumb/BreadcrumbStore.d.ts +0 -2
  2. package/dist/Common/BreadCrumb/Types.d.ts +0 -4
  3. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  4. package/dist/Common/SearchBar/types.d.ts +0 -4
  5. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -1
  6. package/dist/Common/SortableTableHeaderCell/types.d.ts +5 -0
  7. package/dist/Common/Types.d.ts +1 -2
  8. package/dist/Common/index.d.ts +1 -1
  9. package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +2 -0
  10. package/dist/Shared/API/APIQueuing.d.ts +11 -0
  11. package/dist/Shared/API/index.d.ts +1 -0
  12. package/dist/Shared/Components/EnvironmentSelector/EnvironmentSelector.component.d.ts +4 -0
  13. package/dist/Shared/Components/EnvironmentSelector/constants.d.ts +5 -0
  14. package/dist/Shared/Components/EnvironmentSelector/index.d.ts +1 -0
  15. package/dist/Shared/Components/EnvironmentSelector/service.d.ts +3 -0
  16. package/dist/Shared/Components/EnvironmentSelector/types.d.ts +27 -0
  17. package/dist/Shared/Components/EnvironmentSelector/utils.d.ts +6 -0
  18. package/dist/Shared/Components/ReactSelect/index.d.ts +0 -1
  19. package/dist/Shared/Components/ReactSelect/utils.d.ts +4 -0
  20. package/dist/Shared/Components/index.d.ts +1 -1
  21. package/dist/Shared/index.d.ts +1 -0
  22. package/dist/Shared/types.d.ts +47 -1
  23. package/dist/assets/index.css +1 -1
  24. package/dist/{cssMode-433c1c77.js → cssMode-eb635933.js} +1 -1
  25. package/dist/{freemarker2-9d4953cc.js → freemarker2-5bc6adac.js} +1 -1
  26. package/dist/{handlebars-80e74344.js → handlebars-b81c3587.js} +1 -1
  27. package/dist/{html-3a6ce8dd.js → html-27d7619e.js} +1 -1
  28. package/dist/{htmlMode-76955cac.js → htmlMode-f30e3ac8.js} +1 -1
  29. package/dist/{index-f7613a22.js → index-cda57898.js} +15458 -15547
  30. package/dist/index.js +274 -275
  31. package/dist/{javascript-3f1091bb.js → javascript-b9ff5ba8.js} +1 -1
  32. package/dist/{jsonMode-d88fac37.js → jsonMode-905aad21.js} +1 -1
  33. package/dist/{liquid-9c30dfd2.js → liquid-6226df5f.js} +1 -1
  34. package/dist/{mdx-6ffb8bdf.js → mdx-28522b7a.js} +1 -1
  35. package/dist/{python-8b9641b2.js → python-ac05f1b2.js} +1 -1
  36. package/dist/{razor-ade53e47.js → razor-75c26505.js} +1 -1
  37. package/dist/{tsMode-9e595afc.js → tsMode-5b0d217f.js} +1 -1
  38. package/dist/{typescript-89ff900d.js → typescript-b34577f5.js} +1 -1
  39. package/dist/{xml-275e33dc.js → xml-4ce5ec9a.js} +1 -1
  40. package/dist/{yaml-2595db97.js → yaml-4853ee57.js} +1 -1
  41. package/package.json +1 -1
  42. package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +0 -3
  43. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +0 -4
  44. package/dist/Shared/Components/FeatureDescription/constant.d.ts +0 -8
  45. package/dist/Shared/Components/FeatureDescription/index.d.ts +0 -2
  46. package/dist/Shared/Components/FeatureDescription/types.d.ts +0 -19
  47. package/dist/Shared/Components/FeatureDescription/utils.d.ts +0 -6
  48. package/dist/Shared/Components/ReactSelect/constants.d.ts +0 -14
@@ -1,7 +1,5 @@
1
- import { BreadcrumbTextProps } from './Types';
2
1
  import { default as React } from 'react';
3
2
 
4
- export declare const BreadcrumbText: ({ heading, isActive }: BreadcrumbTextProps) => JSX.Element;
5
3
  declare const Store: ({ children }: {
6
4
  children: any;
7
5
  }) => JSX.Element;
@@ -26,7 +26,3 @@ export interface Breadcrumbs {
26
26
  className?: string;
27
27
  }
28
28
  export type UseBreadcrumbOptionalProps = UseBreadcrumbProps | null;
29
- export interface BreadcrumbTextProps {
30
- heading: string;
31
- isActive?: boolean;
32
- }
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
34
34
  * <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
35
35
  * ```
36
36
  */
37
- declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
37
+ declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
38
38
  export default SearchBar;
@@ -32,10 +32,6 @@ export interface SearchBarProps {
32
32
  * Timeout for the debounce handler to be triggered
33
33
  */
34
34
  debounceTimeout?: number;
35
- /**
36
- * Data test id for the search input
37
- */
38
- dataTestId?: string;
39
35
  /**
40
36
  * Hide the background and border of the search
41
37
  */
@@ -14,5 +14,5 @@ import { SortableTableHeaderCellProps } from './types';
14
14
  * />
15
15
  * ```
16
16
  */
17
- declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, }: SortableTableHeaderCellProps) => JSX.Element;
17
+ declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, }: SortableTableHeaderCellProps) => JSX.Element;
18
18
  export default SortableTableHeaderCell;
@@ -23,4 +23,9 @@ export interface SortableTableHeaderCellProps {
23
23
  * If true, the cell is disabled
24
24
  */
25
25
  disabled: boolean;
26
+ /**
27
+ * If false, the cell acts like normal table header cell
28
+ * @default true
29
+ */
30
+ isSortable?: boolean;
26
31
  }
@@ -140,8 +140,7 @@ export interface ErrorScreenNotAuthorizedProps {
140
140
  }
141
141
  export declare enum ImageType {
142
142
  Large = "large",
143
- Medium = "medium",
144
- SMALL = "small"
143
+ Medium = "medium"
145
144
  }
146
145
  export interface InfoColourBarType {
147
146
  message: React.ReactNode;
@@ -14,7 +14,7 @@ export * from './Modals/OpaqueModal';
14
14
  export * from './Modals/VisibleModal';
15
15
  export * from './Modals/VisibleModal2';
16
16
  export { BreadCrumb, useBreadcrumb } from './BreadCrumb/BreadCrumb';
17
- export { default as BreadcrumbStore, BreadcrumbText } from './BreadCrumb/BreadcrumbStore';
17
+ export { default as BreadcrumbStore } from './BreadCrumb/BreadcrumbStore';
18
18
  export { default as RadioGroup } from './RadioGroup';
19
19
  export { default as RadioGroupItem } from './RadioGroupItem';
20
20
  export { default as PopupMenu } from './PopupMenu';
@@ -12,4 +12,6 @@ export declare const unitSelectorStyles: () => {
12
12
  loadingMessage: (base: any) => any;
13
13
  noOptionsMessage: (base: any) => any;
14
14
  placeholder: (base: any) => any;
15
+ group: (base: any) => any;
16
+ groupHeading: (base: any) => any;
15
17
  };
@@ -0,0 +1,11 @@
1
+ import { ApiQueuingWithBatchResponseItem } from '../types';
2
+
3
+ /**
4
+ * Executes a batch of function calls concurrently with queuing.
5
+ * @param functionCalls The array of function calls returning promise to be executed.
6
+ * @param batchSize The maximum number of function calls to be executed concurrently. Defaults to the value of `window._env_.API_BATCH_SIZE`.
7
+ * @param shouldRejectOnError If set to true, the promise will reject if any of the function calls rejects, i.e, acts like Promise.all else Promise.allSettled . Defaults to false.
8
+ * @returns A promise that resolves to a array of objects containing the status and value of the batch execution.
9
+ */
10
+ declare const ApiQueuingWithBatch: <T>(functionCalls: any, httpProtocol: string, shouldRejectOnError?: boolean, batchSize?: number) => Promise<ApiQueuingWithBatchResponseItem<T>[]>;
11
+ export default ApiQueuingWithBatch;
@@ -0,0 +1 @@
1
+ export { default as ApiQueuingWithBatch } from './APIQueuing';
@@ -0,0 +1,4 @@
1
+ import { EnvironmentSelectorProps } from './types';
2
+
3
+ declare const EnvironmentSelector: <T>({ handleEnvironmentChange, selectedEnvironmentsMap, isMulti, placeholder, processOptions, styles, isClearable, autoFocus, }: EnvironmentSelectorProps<T>) => JSX.Element;
4
+ export default EnvironmentSelector;
@@ -0,0 +1,5 @@
1
+ export declare const ENVIRONMENT_SELECTOR_TEXT: {
2
+ DEFAULT_PLACEHOLDER: string;
3
+ GROUP_HEADING_PREFIX: string;
4
+ NO_ENVIRONMENTS_AVAILABLE: string;
5
+ };
@@ -0,0 +1 @@
1
+ export { default as EnvironmentSelector } from './EnvironmentSelector.component';
@@ -0,0 +1,3 @@
1
+ import { GroupedOptionsType } from '../../types';
2
+
3
+ export declare const getEnvironmentsGroupedByCluster: () => Promise<GroupedOptionsType[]>;
@@ -0,0 +1,27 @@
1
+ import { commonSelectStyles } from '../ReactSelect';
2
+ import { GroupedOptionsType } from '../../types';
3
+ import { OptionType } from '../../../Common';
4
+
5
+ export type SelectedEnvironmentsMapType<T> = Record<string, T>;
6
+ export type BaseSelectorType = {
7
+ isMulti: true;
8
+ handleEnvironmentChange: (options: OptionType[]) => void;
9
+ } | {
10
+ isMulti: false;
11
+ handleEnvironmentChange: (option: OptionType) => void;
12
+ };
13
+ export type EnvironmentSelectorProps<T> = BaseSelectorType & {
14
+ /**
15
+ * Would expect selected option to be like {[selectedOption1.label] = <any value we want to store>, ...}
16
+ */
17
+ selectedEnvironmentsMap?: SelectedEnvironmentsMapType<T>;
18
+ placeholder?: string;
19
+ /**
20
+ * This is a HEAVY operation, so make sure to wrap it in useCallback
21
+ * In case we want to process (filter, rename label, etc) the options before displaying them
22
+ */
23
+ processOptions?: (options: GroupedOptionsType[]) => GroupedOptionsType[];
24
+ styles?: typeof commonSelectStyles;
25
+ isClearable?: boolean;
26
+ autoFocus?: boolean;
27
+ };
@@ -0,0 +1,6 @@
1
+ import { SelectedEnvironmentsMapType } from './types';
2
+ import { EnvListMinDTO, GroupedOptionsType } from '../../types';
3
+ import { OptionType } from '../../../Common';
4
+
5
+ export declare const parseEnvironmentClusterListToOptions: (environmentClusterList: EnvListMinDTO[]) => GroupedOptionsType[];
6
+ export declare const getSelectedOptions: <T>(selectedEnvironmentsMap: SelectedEnvironmentsMapType<T>, options: GroupedOptionsType[]) => OptionType[];
@@ -1,2 +1 @@
1
1
  export * from './utils';
2
- export * from './constants';
@@ -8,6 +8,8 @@ export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
8
8
  loadingMessage: (base: any) => any;
9
9
  noOptionsMessage: (base: any) => any;
10
10
  placeholder: (base: any) => any;
11
+ group: (base: any) => any;
12
+ groupHeading: (base: any) => any;
11
13
  };
12
14
  export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (base: any, state: any) => any;
13
15
  export declare const SelectOption: (props: any) => JSX.Element;
@@ -23,4 +25,6 @@ export declare const commonSelectStyles: {
23
25
  loadingMessage: (base: any) => any;
24
26
  noOptionsMessage: (base: any) => any;
25
27
  placeholder: (base: any) => any;
28
+ group: (base: any) => any;
29
+ groupHeading: (base: any) => any;
26
30
  };
@@ -17,4 +17,4 @@ export * from './Header';
17
17
  export * from './AnnouncementBanner';
18
18
  export * from './ButtonWithLoader';
19
19
  export * from './ButtonWithSelector';
20
- export * from './FeatureDescription';
20
+ export * from './EnvironmentSelector';
@@ -6,3 +6,4 @@ export * from './types';
6
6
  export * from './Providers';
7
7
  export * from './constants';
8
8
  export * from './Hooks';
9
+ export * from './API';
@@ -1,5 +1,5 @@
1
1
  import { PatchOperationType } from './constants';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType } from '../Common';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors } from '../Common';
3
3
 
4
4
  export declare enum RegistryType {
5
5
  GIT = "git",
@@ -265,3 +265,49 @@ export declare enum AggregationKeys {
265
265
  Namespaces = "Namespaces"
266
266
  }
267
267
  export type AggregationKeysType = keyof typeof AggregationKeys;
268
+ export interface AppInfoListType {
269
+ application: string;
270
+ appStatus: string;
271
+ deploymentStatus: string;
272
+ lastDeployed: string;
273
+ lastDeployedImage?: string;
274
+ lastDeployedBy?: string;
275
+ appId: number;
276
+ envId: number;
277
+ pipelineId?: number;
278
+ commits?: string[];
279
+ ciArtifactId?: number;
280
+ }
281
+ export interface EnvListMinDTO {
282
+ id: number;
283
+ active: boolean;
284
+ allowedDeploymentTypes: DeploymentAppTypes[] | null;
285
+ appCount: number;
286
+ cluster_id: number;
287
+ cluster_name: string;
288
+ default: boolean;
289
+ description: string;
290
+ environmentIdentifier: string;
291
+ environment_name: string;
292
+ isClusterCdActive: boolean;
293
+ isDigestEnforcedForEnv: boolean;
294
+ isVirtualEnvironment: boolean;
295
+ namespace: string;
296
+ }
297
+ export declare enum ApiQueuingBatchStatusType {
298
+ FULFILLED = "fulfilled",
299
+ REJECTED = "rejected"
300
+ }
301
+ export type ApiQueuingWithBatchResponseItem<T> = {
302
+ status: ApiQueuingBatchStatusType.FULFILLED;
303
+ value: T;
304
+ } | {
305
+ status: ApiQueuingBatchStatusType.REJECTED;
306
+ reason: ServerErrors;
307
+ };
308
+ export interface BatchConfigType {
309
+ lastIndex: number;
310
+ results: any[];
311
+ concurrentCount: number;
312
+ completedCalls: number;
313
+ }