@devtron-labs/devtron-fe-common-lib 1.7.8 → 1.7.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.
@@ -1,7 +1,7 @@
1
1
  import { j as t, J as P } from "./@vendor-CIA81cZg.js";
2
2
  import R, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as D } from "@rjsf/core";
4
- import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-CPcwA7l4.js";
4
+ import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-C71-tz52.js";
5
5
  import M, { components as A } from "react-select";
6
6
  import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
7
  import { getUiOptions as C, getTemplate as B, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as I, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
@@ -54,6 +54,7 @@ export declare const URLS: {
54
54
  DEPLOYMENT_HISTORY_CONFIGURATIONS: string;
55
55
  GLOBAL_CONFIG_SCOPED_VARIABLES: string;
56
56
  GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
57
+ GLOBAL_CONFIG_DEPLOYMENT_CHARTS_UPLOAD_CHART: string;
57
58
  NETWORK_STATUS_INTERFACE: string;
58
59
  RESOURCE_BROWSER: string;
59
60
  COMPARE_CLUSTERS: string;
@@ -78,6 +79,7 @@ export declare const ROUTES: {
78
79
  TELEMETRY_EVENT: string;
79
80
  SERVER_INFO_API: string;
80
81
  ATTRIBUTES_USER: string;
82
+ GET: string;
81
83
  UPDATE: string;
82
84
  ENVIRONMENT_LIST_MIN: string;
83
85
  CLUSTER: string;
@@ -1,3 +1,3 @@
1
1
  import { SegmentedControlProps } from './types';
2
- declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, }: SegmentedControlProps) => JSX.Element;
2
+ declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, isControlled, }: SegmentedControlProps) => JSX.Element;
3
3
  export default SegmentedControl;
@@ -18,4 +18,8 @@ export interface SegmentedControlProps {
18
18
  * @default ComponentSizeType.medium
19
19
  */
20
20
  size?: ComponentSizeType.medium | ComponentSizeType.large;
21
+ /**
22
+ * @default false
23
+ */
24
+ isControlled?: boolean;
21
25
  }
@@ -1,18 +1,16 @@
1
- export type DeploymentChartListDTO = Array<{
1
+ interface DeploymentChartInfo {
2
2
  id: number;
3
3
  chartDescription?: string;
4
4
  isUserUploaded: boolean;
5
5
  name: string;
6
6
  version: string;
7
- }>;
8
- interface DeploymentChartVersionsType {
9
- id: number;
10
- version: string;
7
+ uploadedBy: string;
8
+ }
9
+ export type DeploymentChartListDTO = DeploymentChartInfo[];
10
+ export interface DeploymentChartVersionsType extends Pick<DeploymentChartInfo, 'id' | 'version' | 'uploadedBy' | 'isUserUploaded'> {
11
11
  description: string;
12
12
  }
13
- export interface DeploymentChartType {
14
- name: string;
15
- isUserUploaded: boolean;
13
+ export interface DeploymentChartType extends Pick<DeploymentChartInfo, 'name'> {
16
14
  versions: DeploymentChartVersionsType[];
17
15
  }
18
16
  export declare enum DEVTRON_DEPLOYMENT_CHART_NAMES {
@@ -23,6 +23,8 @@ export interface MainContext {
23
23
  isAirgapped: boolean;
24
24
  isSuperAdmin: boolean;
25
25
  isManifestScanningEnabled: boolean;
26
+ isOrgLevelRBACViewEnforced: boolean;
27
+ viewIsPipelineRBACConfiguredNode: ReactNode;
26
28
  }
27
29
  export interface MainContextProviderProps {
28
30
  children: ReactNode;
@@ -1,4 +1,6 @@
1
- import { GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types';
1
+ import { GetPolicyApiUrlProps, GetResourceApiUrlProps, UserPreferencesType } from './types';
2
2
  export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, suffix, queryParams }: GetResourceApiUrlProps<T>) => string;
3
3
  export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
4
4
  export declare const saveCDPipeline: (request: any) => Promise<import('../../Common').ResponseType<any>>;
5
+ export declare const getUserPreferences: () => Promise<UserPreferencesType>;
6
+ export declare const updateUserPreferences: (updatedUserPreferences: UserPreferencesType, shouldThrowError?: boolean) => Promise<boolean>;
@@ -0,0 +1 @@
1
+ export declare const USER_PREFERENCES_ATTRIBUTE_KEY = "userPreferences";
@@ -1,5 +1,6 @@
1
1
  import { getUrlWithSearchParams } from '../../Common';
2
- import { PolicyKindType, ResourceKindType, ResourceVersionType } from '../types';
2
+ import { PolicyKindType, ResourceKindType, ResourceVersionType, ViewIsPipelineRBACConfiguredRadioTabs } from '../types';
3
+ import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants';
3
4
  export interface ClusterType {
4
5
  id: number;
5
6
  name: string;
@@ -28,4 +29,18 @@ export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, Resourc
28
29
  }
29
30
  export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
30
31
  }
32
+ export interface GetUserPreferencesQueryParamsType {
33
+ key: typeof USER_PREFERENCES_ATTRIBUTE_KEY;
34
+ }
35
+ export interface GetUserPreferencesParsedDTO {
36
+ viewPermittedEnvOnly?: boolean;
37
+ }
38
+ export interface UpdateUserPreferencesParsedValueType extends GetUserPreferencesParsedDTO {
39
+ }
40
+ export interface UpdateUserPreferencesPayloadType extends Pick<GetUserPreferencesQueryParamsType, 'key'> {
41
+ value: string;
42
+ }
43
+ export interface UserPreferencesType {
44
+ pipelineRBACViewSelectedTab: ViewIsPipelineRBACConfiguredRadioTabs;
45
+ }
31
46
  export {};
@@ -824,6 +824,15 @@ export declare const TriggerType: {
824
824
  readonly Auto: "AUTOMATIC";
825
825
  readonly Manual: "MANUAL";
826
826
  };
827
+ export declare enum ViewIsPipelineRBACConfiguredRadioTabs {
828
+ ALL_ENVIRONMENTS = "All environments",
829
+ ACCESS_ONLY = "Access only"
830
+ }
831
+ export interface EnvironmentDataValuesDTO {
832
+ isAirGapEnvironment: boolean;
833
+ isManifestScanningEnabled: boolean;
834
+ canOnlyViewPermittedEnvOrgLevel: boolean;
835
+ }
827
836
  export type ComponentLayoutType = 'row' | 'column';
828
837
  export interface BorderConfigType {
829
838
  /**
@@ -851,4 +860,8 @@ export interface BorderConfigType {
851
860
  */
852
861
  left?: boolean;
853
862
  }
863
+ export interface AppEnvIdType {
864
+ appId: number;
865
+ envId: number;
866
+ }
854
867
  export {};
@@ -57,3 +57,4 @@ export declare const validateCMVolumeMountPath: (value: string) => {
57
57
  isValid: boolean;
58
58
  message: string;
59
59
  };
60
+ export declare const validateYAML: (yamlString: string, isRequired?: boolean) => ValidationResponseType;
@@ -1 +1 @@
1
- .tippy-box[data-animation=shift-toward-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=top][data-state=hidden]{transform:translateY(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=bottom][data-state=hidden]{transform:translateY(5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=left][data-state=hidden]{transform:translate(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=right][data-state=hidden]{transform:translate(5px)}.mde-header{flex-shrink:0;display:flex;flex-wrap:wrap;align-items:stretch;border-bottom:1px solid #c8ccd0;border-radius:2px 2px 0 0;background:#f9f9f9}.mde-header .mde-tabs{display:flex;flex-direction:row}.mde-header .mde-tabs button{border-radius:2px;margin:6px 3px;background-color:transparent;border:1px solid transparent;cursor:pointer}.mde-header .mde-tabs button:first-child{margin-left:6px}.mde-header .mde-tabs button.selected{border:1px solid #c8ccd0}.mde-header .svg-icon{width:1em;height:1em;display:inline-block;font-size:inherit;overflow:visible;vertical-align:-.125em}.mde-header ul.mde-header-group{margin:0;padding:10px;list-style:none;display:flex;flex-wrap:nowrap}.mde-header ul.mde-header-group.hidden{visibility:hidden}.mde-header ul.mde-header-group li.mde-header-item{display:inline-block;position:relative;margin:0 4px}.mde-header ul.mde-header-group li.mde-header-item button{text-align:left;cursor:pointer;height:22px;padding:4px;margin:0;border:none;background:none;color:#242729}@keyframes tooltip-appear{0%{opacity:0}to{opacity:1}}.mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover:before{animation-name:tooltip-appear;animation-duration:.2s;animation-delay:.5s;animation-fill-mode:forwards;opacity:0;position:absolute;z-index:1000001;width:0;height:0;color:#000c;pointer-events:none;content:"";border:5px solid transparent;top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:#000c}.mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover:after{animation-name:tooltip-appear;animation-duration:.2s;animation-delay:.5s;animation-fill-mode:forwards;font-size:11px;opacity:0;position:absolute;z-index:1000000;padding:5px 8px;color:#fff;pointer-events:none;content:attr(aria-label);background:#000c;border-radius:3px;right:50%;bottom:100%;transform:translate(50%);margin-bottom:5px;white-space:nowrap}.mde-textarea-wrapper{position:relative}.mde-textarea-wrapper textarea.mde-text{width:100%;border:0;padding:10px;vertical-align:top;resize:vertical;overflow-y:auto}.mde-preview .mde-preview-content{padding:10px}.mde-preview .mde-preview-content p,.mde-preview .mde-preview-content blockquote,.mde-preview .mde-preview-content ul,.mde-preview .mde-preview-content ol,.mde-preview .mde-preview-content dl,.mde-preview .mde-preview-content table,.mde-preview .mde-preview-content pre{margin-top:0;margin-bottom:16px}.mde-preview .mde-preview-content h1,.mde-preview .mde-preview-content h2,.mde-preview .mde-preview-content h3{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25;border-bottom:1px solid #eee;padding-bottom:.3em}.mde-preview .mde-preview-content h1{font-size:1.6em}.mde-preview .mde-preview-content h2{font-size:1.4em}.mde-preview .mde-preview-content h3{font-size:1.2em}.mde-preview .mde-preview-content ul,.mde-preview .mde-preview-content ol{padding-left:2em}.mde-preview .mde-preview-content blockquote{margin-left:0;padding:0 1em;color:#777;border-left:.25em solid #ddd}.mde-preview .mde-preview-content blockquote>:first-child{margin-top:0}.mde-preview .mde-preview-content blockquote>:last-child{margin-bottom:0}.mde-preview .mde-preview-content code{padding:.2em 0;margin:0;font-size:90%;background-color:#0000000a;border-radius:3px}.mde-preview .mde-preview-content code:before,.mde-preview .mde-preview-content code:after{letter-spacing:-.2em;content:" "}.mde-preview .mde-preview-content pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.mde-preview .mde-preview-content pre code{display:inline;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.mde-preview .mde-preview-content pre code:before,.mde-preview .mde-preview-content pre code:after{content:none}.mde-preview .mde-preview-content pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.mde-preview .mde-preview-content a{color:#4078c0;text-decoration:none}.mde-preview .mde-preview-content a:hover{text-decoration:underline}.mde-preview .mde-preview-content>*:first-child{margin-top:0!important}.mde-preview .mde-preview-content>*:last-child{margin-bottom:0!important}.mde-preview .mde-preview-content:after{display:table;clear:both;content:""}.mde-preview .mde-preview-content table{display:block;width:100%;border-spacing:0;border-collapse:collapse}.mde-preview .mde-preview-content table thead th{font-weight:700}.mde-preview .mde-preview-content table th,.mde-preview .mde-preview-content table td{padding:6px 13px;border:1px solid #c8ccd0}.react-mde{border:1px solid #c8ccd0;border-radius:2px}.react-mde *{box-sizing:border-box}.react-mde .invisible{display:none}.react-mde .image-tip{user-select:none;display:flex!important;padding:7px 10px;margin:0;font-size:13px;line-height:16px;color:gray;background-color:#f9f9f9;border-top:1px solid #c8ccd0;position:relative}.react-mde .image-tip .image-input{min-height:0;opacity:.01;width:100%!important;position:absolute;top:0;left:0;padding:5px;cursor:pointer}ul.mde-suggestions{position:absolute;min-width:180px;padding:0;margin:20px 0 0;list-style:none;cursor:pointer;background:#fff;border:1px solid #c8ccd0;border-radius:3px;box-shadow:0 1px 5px #1b1f2326}ul.mde-suggestions li{padding:4px 8px;border-bottom:1px solid #e1e4e8}ul.mde-suggestions li:first-child{border-top-left-radius:2px;border-top-right-radius:2px}ul.mde-suggestions li:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}ul.mde-suggestions li:hover,ul.mde-suggestions li[aria-selected=true]{color:#fff;background-color:#0366d6}
1
+ .tippy-box[data-animation=shift-toward-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=top][data-state=hidden]{transform:translateY(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=bottom][data-state=hidden]{transform:translateY(5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=left][data-state=hidden]{transform:translate(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=right][data-state=hidden]{transform:translate(5px)}.tippy-box[data-animation=shift-toward][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-toward][data-state=hidden][data-placement^=top]{transform:translateY(-10px)}.tippy-box[data-animation=shift-toward][data-state=hidden][data-placement^=bottom]{transform:translateY(10px)}.tippy-box[data-animation=shift-toward][data-state=hidden][data-placement^=left]{transform:translate(-10px)}.tippy-box[data-animation=shift-toward][data-state=hidden][data-placement^=right]{transform:translate(10px)}.mde-header{flex-shrink:0;display:flex;flex-wrap:wrap;align-items:stretch;border-bottom:1px solid #c8ccd0;border-radius:2px 2px 0 0;background:#f9f9f9}.mde-header .mde-tabs{display:flex;flex-direction:row}.mde-header .mde-tabs button{border-radius:2px;margin:6px 3px;background-color:transparent;border:1px solid transparent;cursor:pointer}.mde-header .mde-tabs button:first-child{margin-left:6px}.mde-header .mde-tabs button.selected{border:1px solid #c8ccd0}.mde-header .svg-icon{width:1em;height:1em;display:inline-block;font-size:inherit;overflow:visible;vertical-align:-.125em}.mde-header ul.mde-header-group{margin:0;padding:10px;list-style:none;display:flex;flex-wrap:nowrap}.mde-header ul.mde-header-group.hidden{visibility:hidden}.mde-header ul.mde-header-group li.mde-header-item{display:inline-block;position:relative;margin:0 4px}.mde-header ul.mde-header-group li.mde-header-item button{text-align:left;cursor:pointer;height:22px;padding:4px;margin:0;border:none;background:none;color:#242729}@keyframes tooltip-appear{0%{opacity:0}to{opacity:1}}.mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover:before{animation-name:tooltip-appear;animation-duration:.2s;animation-delay:.5s;animation-fill-mode:forwards;opacity:0;position:absolute;z-index:1000001;width:0;height:0;color:#000c;pointer-events:none;content:"";border:5px solid transparent;top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:#000c}.mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover:after{animation-name:tooltip-appear;animation-duration:.2s;animation-delay:.5s;animation-fill-mode:forwards;font-size:11px;opacity:0;position:absolute;z-index:1000000;padding:5px 8px;color:#fff;pointer-events:none;content:attr(aria-label);background:#000c;border-radius:3px;right:50%;bottom:100%;transform:translate(50%);margin-bottom:5px;white-space:nowrap}.mde-textarea-wrapper{position:relative}.mde-textarea-wrapper textarea.mde-text{width:100%;border:0;padding:10px;vertical-align:top;resize:vertical;overflow-y:auto}.mde-preview .mde-preview-content{padding:10px}.mde-preview .mde-preview-content p,.mde-preview .mde-preview-content blockquote,.mde-preview .mde-preview-content ul,.mde-preview .mde-preview-content ol,.mde-preview .mde-preview-content dl,.mde-preview .mde-preview-content table,.mde-preview .mde-preview-content pre{margin-top:0;margin-bottom:16px}.mde-preview .mde-preview-content h1,.mde-preview .mde-preview-content h2,.mde-preview .mde-preview-content h3{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25;border-bottom:1px solid #eee;padding-bottom:.3em}.mde-preview .mde-preview-content h1{font-size:1.6em}.mde-preview .mde-preview-content h2{font-size:1.4em}.mde-preview .mde-preview-content h3{font-size:1.2em}.mde-preview .mde-preview-content ul,.mde-preview .mde-preview-content ol{padding-left:2em}.mde-preview .mde-preview-content blockquote{margin-left:0;padding:0 1em;color:#777;border-left:.25em solid #ddd}.mde-preview .mde-preview-content blockquote>:first-child{margin-top:0}.mde-preview .mde-preview-content blockquote>:last-child{margin-bottom:0}.mde-preview .mde-preview-content code{padding:.2em 0;margin:0;font-size:90%;background-color:#0000000a;border-radius:3px}.mde-preview .mde-preview-content code:before,.mde-preview .mde-preview-content code:after{letter-spacing:-.2em;content:" "}.mde-preview .mde-preview-content pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.mde-preview .mde-preview-content pre code{display:inline;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.mde-preview .mde-preview-content pre code:before,.mde-preview .mde-preview-content pre code:after{content:none}.mde-preview .mde-preview-content pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.mde-preview .mde-preview-content a{color:#4078c0;text-decoration:none}.mde-preview .mde-preview-content a:hover{text-decoration:underline}.mde-preview .mde-preview-content>*:first-child{margin-top:0!important}.mde-preview .mde-preview-content>*:last-child{margin-bottom:0!important}.mde-preview .mde-preview-content:after{display:table;clear:both;content:""}.mde-preview .mde-preview-content table{display:block;width:100%;border-spacing:0;border-collapse:collapse}.mde-preview .mde-preview-content table thead th{font-weight:700}.mde-preview .mde-preview-content table th,.mde-preview .mde-preview-content table td{padding:6px 13px;border:1px solid #c8ccd0}.react-mde{border:1px solid #c8ccd0;border-radius:2px}.react-mde *{box-sizing:border-box}.react-mde .invisible{display:none}.react-mde .image-tip{user-select:none;display:flex!important;padding:7px 10px;margin:0;font-size:13px;line-height:16px;color:gray;background-color:#f9f9f9;border-top:1px solid #c8ccd0;position:relative}.react-mde .image-tip .image-input{min-height:0;opacity:.01;width:100%!important;position:absolute;top:0;left:0;padding:5px;cursor:pointer}ul.mde-suggestions{position:absolute;min-width:180px;padding:0;margin:20px 0 0;list-style:none;cursor:pointer;background:#fff;border:1px solid #c8ccd0;border-radius:3px;box-shadow:0 1px 5px #1b1f2326}ul.mde-suggestions li{padding:4px 8px;border-bottom:1px solid #e1e4e8}ul.mde-suggestions li:first-child{border-top-left-radius:2px;border-top-right-radius:2px}ul.mde-suggestions li:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}ul.mde-suggestions li:hover,ul.mde-suggestions li[aria-selected=true]{color:#fff;background-color:#0366d6}
package/dist/index.d.ts CHANGED
@@ -29,7 +29,6 @@ export interface customEnv {
29
29
  CENTRAL_API_ENDPOINT?: string;
30
30
  HIDE_GITOPS_OR_HELM_OPTION?: boolean;
31
31
  CONFIGURABLE_TIMEOUT?: string;
32
- HIDE_APPLICATION_GROUPS?: boolean;
33
32
  K8S_CLIENT?: boolean;
34
33
  CLUSTER_TERMINAL_CONNECTION_POLLING_INTERVAL?: number;
35
34
  CLUSTER_TERMINAL_CONNECTION_RETRY_COUNT?: number;
@@ -77,6 +76,11 @@ export interface customEnv {
77
76
  * @default false
78
77
  */
79
78
  FEATURE_EXPERIMENTAL_THEMING_ENABLE?: boolean;
79
+ /**
80
+ * If true, only pipelines to which the user has access will be shown across the application
81
+ * @default false
82
+ */
83
+ FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE?: boolean;
80
84
  /**
81
85
  * Enable Image promotion feature
82
86
  *