@devtron-labs/devtron-fe-common-lib 0.1.11-beta-3 → 0.1.12-beta-1

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 (50) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +0 -1
  2. package/dist/Common/Constants.d.ts +1 -0
  3. package/dist/Common/Helper.d.ts +4 -0
  4. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +1 -1
  5. package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +2 -1
  6. package/dist/Common/RJSF/types.d.ts +12 -0
  7. package/dist/Common/RJSF/utils.d.ts +2 -2
  8. package/dist/Common/Tippy.d.ts +4 -0
  9. package/dist/Common/Types.d.ts +1 -1
  10. package/dist/Common/index.d.ts +1 -0
  11. package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +1 -1
  12. package/dist/Shared/Components/ButtonWithSelector/types.d.ts +1 -0
  13. package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
  14. package/dist/Shared/Components/CICDHistory/index.d.ts +1 -0
  15. package/dist/Shared/Components/CICDHistory/types.d.ts +1 -0
  16. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
  17. package/dist/Shared/Components/FeatureDescription/types.d.ts +7 -2
  18. package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
  19. package/dist/Shared/Components/FilterChips/types.d.ts +6 -18
  20. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  21. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +3 -1
  22. package/dist/Shared/Hooks/index.d.ts +0 -1
  23. package/dist/Shared/Services/common.service.d.ts +2 -3
  24. package/dist/Shared/Services/types.d.ts +4 -15
  25. package/dist/Shared/constants.d.ts +1 -0
  26. package/dist/Shared/types.d.ts +7 -7
  27. package/dist/assets/index.css +1 -1
  28. package/dist/{cssMode-c3b49a22.js → cssMode-63ee5358.js} +1 -1
  29. package/dist/{freemarker2-a23b547d.js → freemarker2-270b95d1.js} +1 -1
  30. package/dist/{handlebars-3ab70804.js → handlebars-d48fa28f.js} +1 -1
  31. package/dist/{html-173d6f4b.js → html-a5839603.js} +1 -1
  32. package/dist/{htmlMode-cd5b4e94.js → htmlMode-2c8872e7.js} +1 -1
  33. package/dist/{index-08e72af8.js → index-aab09e8b.js} +31376 -29333
  34. package/dist/index.js +318 -316
  35. package/dist/{javascript-7dfc1aae.js → javascript-ec66b63b.js} +1 -1
  36. package/dist/{jsonMode-e4e3bb06.js → jsonMode-0465a589.js} +1 -1
  37. package/dist/{liquid-35bd99b6.js → liquid-1b48c005.js} +1 -1
  38. package/dist/{mdx-20526694.js → mdx-fd2622c8.js} +1 -1
  39. package/dist/{python-1ffe9348.js → python-2625b208.js} +1 -1
  40. package/dist/{razor-00e603a8.js → razor-b5f0adc9.js} +1 -1
  41. package/dist/{tsMode-83f263b7.js → tsMode-7ba7207b.js} +1 -1
  42. package/dist/{typescript-c9eff357.js → typescript-8d8017c6.js} +1 -1
  43. package/dist/{xml-2b6d8024.js → xml-1cc09e91.js} +1 -1
  44. package/dist/{yaml-3c4eb3e1.js → yaml-1185d077.js} +1 -1
  45. package/package.json +2 -1
  46. package/dist/Shared/Hooks/useGetResourceKindsOptions/index.d.ts +0 -2
  47. package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +0 -9
  48. package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +0 -31
  49. package/dist/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.d.ts +0 -16
  50. package/dist/Shared/Hooks/useGetResourceKindsOptions/utils.d.ts +0 -4
@@ -20,7 +20,6 @@ export interface CodeEditorInterface {
20
20
  noParsing?: boolean;
21
21
  inline?: boolean;
22
22
  height?: number | string;
23
- width?: number | string;
24
23
  shebang?: string | JSX.Element;
25
24
  diffView?: boolean;
26
25
  loading?: boolean;
@@ -9,6 +9,7 @@ export declare const DOCUMENTATION: {
9
9
  APP_TAGS: string;
10
10
  APP_OVERVIEW_TAGS: string;
11
11
  BLOB_STORAGE: string;
12
+ GLOBAL_CONFIG_BUILD_INFRA: string;
12
13
  };
13
14
  export declare const PATTERNS: {
14
15
  KUBERNETES_KEY_PREFIX: RegExp;
@@ -1,4 +1,5 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
+ import { JSONPathOptions } from 'jsonpath-plus';
2
3
  import { AsyncOptions, UseSearchString } from './Types';
3
4
  import { scrollableInterface } from '../Shared';
4
5
 
@@ -94,6 +95,9 @@ export declare const getRegexMatchPositions: (string: string, regex: RegExp) =>
94
95
  * @returns set of substrings
95
96
  */
96
97
  export declare const powerSetOfSubstringsFromStart: (strings: string[], regex: RegExp) => string[];
98
+ export declare const convertJSONPointerToJSONPath: (pointer: string) => string;
99
+ export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultType?: JSONPathOptions['resultType']) => string[];
100
+ export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => object;
97
101
  /**
98
102
  * Returns a debounced variant of the function
99
103
  */
@@ -1,3 +1,3 @@
1
1
  import { ArrayFieldTemplateItemType } from '@rjsf/utils';
2
2
 
3
- export declare const ArrayFieldItemTemplate: ({ children, className, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
3
+ export declare const ArrayFieldItemTemplate: ({ children, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
@@ -1,3 +1,4 @@
1
1
  import { ObjectFieldTemplateProps } from '@rjsf/utils';
2
+ import { RJSFFormSchema } from '../types';
2
3
 
3
- export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
4
+ export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps<any, RJSFFormSchema, any>) => JSX.Element;
@@ -1,4 +1,16 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { default as RJSFForm } from '@rjsf/core';
3
+ import { StrictRJSFSchema } from '@rjsf/utils';
3
4
 
4
5
  export type FormProps = Omit<ComponentProps<typeof RJSFForm>, 'validator'>;
6
+ interface Hidden {
7
+ condition: boolean;
8
+ match: string;
9
+ }
10
+ export interface RJSFFormSchema extends StrictRJSFSchema {
11
+ properties: {
12
+ [key: string]: RJSFFormSchema;
13
+ };
14
+ hidden: Hidden;
15
+ }
16
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { TranslatableString } from '@rjsf/utils';
2
- import { default as Tippy } from '@tippyjs/react';
2
+ import { default as Tippy } from '../Tippy';
3
3
 
4
4
  /**
5
5
  * Override for the TranslatableString from RJSF
@@ -25,4 +25,4 @@ export declare const getRedirectionProps: (url: string) => import('react').Ancho
25
25
  * Infers the type for json schema from value type
26
26
  */
27
27
  export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
28
- export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement']) => (children: any) => JSX.Element;
28
+ export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement'], truncateWidth?: number) => (children: any) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { TippyProps as TippyJSProps } from '@tippyjs/react';
2
+
3
+ declare const Tippy: ({ truncateWidth, children, ...rest }: TippyJSProps & Record<'truncateWidth', number>) => JSX.Element;
4
+ export default Tippy;
@@ -77,7 +77,7 @@ export interface TippyCustomizedProps {
77
77
  iconSize?: number;
78
78
  onImageLoadError?: (e: any) => void;
79
79
  onClose?: () => void;
80
- infoText?: string;
80
+ infoText?: React.ReactNode;
81
81
  showCloseButton?: boolean;
82
82
  arrow?: boolean;
83
83
  interactive?: boolean;
@@ -54,3 +54,4 @@ export * from './GenericDescription';
54
54
  export * from './SegmentedBarChart';
55
55
  export * from './CodeEditor';
56
56
  export * from './AppStatus';
57
+ export { default as Tippy } from './Tippy';
@@ -14,5 +14,5 @@ import { ButtonWithSelectorProps } from './types';
14
14
  * </ButtonWithSelector>
15
15
  * ```
16
16
  */
17
- declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, disabled, }: ButtonWithSelectorProps) => JSX.Element;
17
+ declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, disabled, isLoading, }: ButtonWithSelectorProps) => JSX.Element;
18
18
  export default ButtonWithSelector;
@@ -8,4 +8,5 @@ export interface ButtonWithSelectorProps {
8
8
  popUpBodyClassName?: string;
9
9
  showPopUp?: boolean;
10
10
  disabled?: boolean;
11
+ isLoading?: boolean;
11
12
  }
@@ -1,4 +1,4 @@
1
1
  import { DeploymentTemplateHistoryType } from '../types';
2
2
 
3
- declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
3
+ declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, comparisonBodyClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
4
4
  export default DeploymentHistoryDiffView;
@@ -5,6 +5,7 @@ export { default as CDEmptyState } from './CDEmptyState';
5
5
  export { default as DeploymentStatusDetailBreakdown } from './DeploymentStatusBreakdown';
6
6
  export { default as AppStatusDetailsChart } from './AppStatusDetailsChart';
7
7
  export { default as DeploymentDetailSteps } from './DeploymentDetailSteps';
8
+ export { default as DetectBottom } from './DetectBottom';
8
9
  export * from './types';
9
10
  export * from './service';
10
11
  export * from './History.components';
@@ -368,6 +368,7 @@ export interface DeploymentTemplateHistoryType {
368
368
  isUnpublished?: boolean;
369
369
  isDeleteDraft?: boolean;
370
370
  rootClassName?: string;
371
+ comparisonBodyClassName?: string;
371
372
  }
372
373
  export interface DeploymentHistoryDetailRes extends ResponseType {
373
374
  result?: DeploymentHistoryDetail;
@@ -1,4 +1,4 @@
1
1
  import { DescriptorProps } from './types';
2
2
 
3
- declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, }: DescriptorProps) => JSX.Element;
3
+ declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, }: DescriptorProps) => JSX.Element;
4
4
  export default FeatureTitleWithInfo;
@@ -1,9 +1,10 @@
1
+ import { default as React, ReactNode } from 'react';
1
2
  import { ImageType } from '../../../Common';
2
3
  import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
3
4
 
4
5
  export interface FeatureDescriptionModalProps {
5
6
  title: string;
6
- renderDescriptionContent?: () => JSX.Element;
7
+ renderDescriptionContent?: () => ReactNode;
7
8
  closeModalText?: string;
8
9
  docLink?: string;
9
10
  closeModal?: () => void;
@@ -12,8 +13,12 @@ export interface FeatureDescriptionModalProps {
12
13
  imageStyles?: React.CSSProperties;
13
14
  }
14
15
  export interface DescriptorProps extends FeatureDescriptionModalProps {
15
- breadCrumbs: Breadcrumb[];
16
+ breadCrumbs?: Breadcrumb[];
16
17
  additionalContainerClasses?: string;
17
18
  iconClassName?: string;
18
19
  children?: React.ReactNode;
20
+ showInfoIconTippy?: boolean;
21
+ docLinkText?: string;
22
+ dataTestId?: string;
23
+ additionalContent?: ReactNode;
19
24
  }
@@ -3,5 +3,5 @@ import { FilterChipsProps } from './types';
3
3
  /**
4
4
  * Component for rendering the applied filter chips
5
5
  */
6
- declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, showClearAndRemove, }: FilterChipsProps<T>) => JSX.Element;
6
+ declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, }: FilterChipsProps<T>) => JSX.Element;
7
7
  export default FilterChips;
@@ -21,28 +21,12 @@ export interface FilterChipProps {
21
21
  * If passed, the label will be formatted accordingly
22
22
  */
23
23
  getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
24
- showRemoveIcon: boolean;
25
24
  }
26
- export type FilterChipsProps<T = Record<string, unknown>> = Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> & {
25
+ export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
27
26
  /**
28
27
  * Current filter configuration
29
28
  */
30
29
  filterConfig: T;
31
- /**
32
- * Class name for the container
33
- */
34
- className?: string;
35
- } & ({
36
- /**
37
- * If false, anything related to removing filters is not shown
38
- * @default 'true'
39
- */
40
- showClearAndRemove: false;
41
- clearFilters?: never;
42
- onRemoveFilter?: never;
43
- clearButtonClassName?: never;
44
- } | {
45
- showClearAndRemove?: true;
46
30
  /**
47
31
  * Callback handler for removing the filters
48
32
  */
@@ -51,8 +35,12 @@ export type FilterChipsProps<T = Record<string, unknown>> = Pick<FilterChipProps
51
35
  * Handler for removing a applied filter
52
36
  */
53
37
  onRemoveFilter: (filterConfig: T) => void;
38
+ /**
39
+ * Class name for the container
40
+ */
41
+ className?: string;
54
42
  /**
55
43
  * Class name for the clear filter button
56
44
  */
57
45
  clearButtonClassName?: string;
58
- });
46
+ }
@@ -1,3 +1,3 @@
1
1
  import { KeyValueTableProps } from './KeyValueTable.types';
2
2
 
3
- export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
3
+ export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, }: KeyValueTableProps<K>) => JSX.Element;
@@ -60,8 +60,10 @@ export interface KeyValueTableProps<K extends string> {
60
60
  isSortable?: boolean;
61
61
  /** An optional React node for a custom header component. */
62
62
  headerComponent?: ReactNode;
63
- /** When true, data addition field will not be shown */
63
+ /** When true, data addition field will not be shown. */
64
64
  isAdditionNotAllowed?: boolean;
65
+ /** When true, data add or update is disabled. */
66
+ readOnly?: boolean;
65
67
  /**
66
68
  * An optional function to handle changes in the table rows.
67
69
  * @param rowId - The id of the row that changed.
@@ -1,2 +1 @@
1
1
  export * from './UsePrompt';
2
- export * from './useGetResourceKindsOptions';
@@ -1,4 +1,3 @@
1
- import { GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types';
1
+ import { GetResourceApiUrlProps } from './types';
2
2
 
3
- export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, suffix, queryParams }: GetResourceApiUrlProps<T>) => string;
4
- export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
3
+ export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, queryParams }: GetResourceApiUrlProps<T>) => string;
@@ -1,5 +1,5 @@
1
1
  import { getUrlWithSearchParams } from '../../Common';
2
- import { PolicyKindType, ResourceKindType, ResourceVersionType } from '../types';
2
+ import { ResourceKindType, ResourceVersionType } from '../types';
3
3
 
4
4
  export interface ClusterType {
5
5
  id: number;
@@ -9,20 +9,9 @@ export interface ClusterType {
9
9
  */
10
10
  isVirtual: boolean;
11
11
  }
12
- /**
13
- * T => Type of query params
14
- * K => Type of kind
15
- * P => Type of version
16
- */
17
- interface BaseGetApiUrlProps<T, K extends ResourceKindType | PolicyKindType, P extends ResourceVersionType> {
12
+ export interface GetResourceApiUrlProps<T> {
18
13
  baseUrl: string;
19
- kind: K;
20
- version: P;
21
- suffix?: string;
14
+ kind: ResourceKindType;
15
+ version: ResourceVersionType;
22
16
  queryParams?: T extends Parameters<typeof getUrlWithSearchParams>[1] ? T : never;
23
17
  }
24
- export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, ResourceKindType, ResourceVersionType> {
25
- }
26
- export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
27
- }
28
- export {};
@@ -31,6 +31,7 @@ export declare const DATE_TIME_FORMAT_STRING = "ddd DD MMM YYYY HH:mm:ss";
31
31
  export declare const API_TOKEN_PREFIX = "API-TOKEN:";
32
32
  export declare const DEFAULT_SECRET_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
33
33
  export declare enum PatchOperationType {
34
+ add = "add",
34
35
  replace = "replace",
35
36
  remove = "remove"
36
37
  }
@@ -336,6 +336,12 @@ export type PatchQueryType<T extends string, K = unknown> = {
336
336
  */
337
337
  op: PatchOperationType.remove;
338
338
  value?: never;
339
+ } | {
340
+ /**
341
+ * Operation type for add
342
+ */
343
+ op: PatchOperationType.add;
344
+ value?: K;
339
345
  });
340
346
  export interface GroupedOptionsType {
341
347
  label: string;
@@ -354,21 +360,15 @@ export declare enum ResourceKindType {
354
360
  tenant = "tenant",
355
361
  installation = "installation",
356
362
  environment = "environment",
357
- cdPipeline = "cd-pipeline",
358
- project = "project"
363
+ cdPipeline = "cd-pipeline"
359
364
  }
360
365
  /**
361
366
  * Versions support for the resources on BE
362
- *
363
- * TODO: Rename to ApiVersionType
364
367
  */
365
368
  export declare enum ResourceVersionType {
366
369
  v1 = "v1",
367
370
  alpha1 = "alpha1"
368
371
  }
369
- export declare enum PolicyKindType {
370
- lockConfiguration = "lock-configuration"
371
- }
372
372
  export interface LastExecutionResultType {
373
373
  lastExecution: string;
374
374
  severityCount: {