@devtron-labs/devtron-fe-common-lib 1.8.6 → 1.8.7
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.
- package/dist/{@code-editor-DdQlAVm0.js → @code-editor-BdGij9tO.js} +2001 -1984
- package/dist/{@common-rjsf-Ba8ZCwag.js → @common-rjsf-D-u0GkOU.js} +1 -1
- package/dist/Common/CodeEditor/types.d.ts +1 -1
- package/dist/Common/Common.service.d.ts +1 -8
- package/dist/Common/Hooks/UseGetUserRoles/UseGetUserRoles.d.ts +7 -0
- package/dist/Common/Hooks/UseGetUserRoles/index.d.ts +1 -0
- package/dist/Common/Hooks/UseGetUserRoles/types.d.ts +8 -0
- package/dist/Common/Hooks/index.d.ts +1 -1
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Common/Types.d.ts +19 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +2 -0
- package/dist/Shared/types.d.ts +19 -3
- package/dist/assets/ic-crown.868ff2a9.svg +3 -0
- package/dist/assets/ic-user-key.523f6939.svg +4 -0
- package/dist/index.js +775 -774
- package/package.json +1 -1
- package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.d.ts +0 -6
- package/dist/Common/Hooks/UseSuperAdmin/types.d.ts +0 -3
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as n, ac as y, ae as k, ad as W } from "./@vendor-JJZeSNjd.js";
|
2
2
|
import V, { forwardRef as J, useMemo as P } from "react";
|
3
3
|
import K, { getDefaultRegistry as q } from "@rjsf/core";
|
4
|
-
import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-
|
4
|
+
import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-BdGij9tO.js";
|
5
5
|
import Q, { components as D } from "react-select";
|
6
6
|
import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
7
7
|
import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
|
@@ -79,7 +79,7 @@ export interface CodeEditorHeaderComposition {
|
|
79
79
|
ValidationError?: React.FC<any>;
|
80
80
|
Clipboard?: React.FC<any>;
|
81
81
|
}
|
82
|
-
|
82
|
+
type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
|
83
83
|
export interface Action {
|
84
84
|
type: ActionTypes;
|
85
85
|
value: any;
|
@@ -1,14 +1,8 @@
|
|
1
1
|
import { MutableRefObject } from 'react';
|
2
2
|
import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '../Shared/types';
|
3
|
-
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType } from './Types';
|
3
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType, UserRole } from './Types';
|
4
4
|
import { ApiResourceType } from '../Pages';
|
5
5
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
6
|
-
interface UserRole extends ResponseType {
|
7
|
-
result?: {
|
8
|
-
roles: string[];
|
9
|
-
superAdmin: boolean;
|
10
|
-
};
|
11
|
-
}
|
12
6
|
export declare const SourceTypeMap: {
|
13
7
|
BranchFixed: string;
|
14
8
|
WEBHOOK: string;
|
@@ -41,4 +35,3 @@ export declare const getGlobalVariables: ({ appId, isCD, abortControllerRef, }:
|
|
41
35
|
isCD?: boolean;
|
42
36
|
abortControllerRef?: MutableRefObject<AbortController>;
|
43
37
|
}) => Promise<GlobalVariableOptionType[]>;
|
44
|
-
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { UseGetUserRolesType } from './types';
|
2
|
+
/**
|
3
|
+
* @description It will return isSuperAdmin and would be set to false by default, might need few optimizations like dep, etc
|
4
|
+
* @returns {UseGetUserRolesType} isSuperAdmin, canManageAllAccess
|
5
|
+
*/
|
6
|
+
declare const useGetUserRoles: () => UseGetUserRolesType;
|
7
|
+
export default useGetUserRoles;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as useGetUserRoles } from './UseGetUserRoles';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { useGetUserRoles } from './UseGetUserRoles';
|
2
2
|
export { useClickOutside } from './UseClickOutside/UseClickOutside';
|
3
3
|
export { useWindowSize } from './UseWindowSize/UseWindowSize';
|
4
4
|
export * from './useUrlFilters';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, ...props }: {
|
1
|
+
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, ...props }: {
|
2
2
|
[x: string]: any;
|
3
3
|
selected?: boolean;
|
4
4
|
onSelect?: any;
|
@@ -9,5 +9,6 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
|
|
9
9
|
Icon?: any;
|
10
10
|
iconClass?: string;
|
11
11
|
throttleOnChange?: boolean;
|
12
|
+
shouldToggleValueOnLabelClick?: boolean;
|
12
13
|
}) => JSX.Element;
|
13
14
|
export default Toggle;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -918,4 +918,23 @@ export type GlobalVariableOptionType = Omit<GlobalVariableDTO, 'name'> & {
|
|
918
918
|
value: string;
|
919
919
|
variableType: Extract<RefVariableType, RefVariableType.GLOBAL>;
|
920
920
|
};
|
921
|
+
export interface UserRole extends ResponseType {
|
922
|
+
result?: {
|
923
|
+
roles: string[];
|
924
|
+
superAdmin: boolean;
|
925
|
+
/**
|
926
|
+
* Defines if a user is access manager and can manage all access
|
927
|
+
*/
|
928
|
+
canManageAllAccess?: boolean;
|
929
|
+
};
|
930
|
+
}
|
931
|
+
export declare enum ActionTypes {
|
932
|
+
MANAGER = "manager",
|
933
|
+
ADMIN = "admin",
|
934
|
+
TRIGGER = "trigger",
|
935
|
+
VIEW = "view",
|
936
|
+
UPDATE = "update",
|
937
|
+
EDIT = "edit",
|
938
|
+
APPROVER = "approver"
|
939
|
+
}
|
921
940
|
export {};
|
@@ -16,6 +16,7 @@ export declare const iconMap: {
|
|
16
16
|
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
17
17
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
18
18
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
|
+
'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
20
|
'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
21
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
22
|
'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -60,6 +61,7 @@ export declare const iconMap: {
|
|
60
61
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
61
62
|
'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
62
63
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
|
+
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
63
65
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
66
|
};
|
65
67
|
export type IconName = keyof typeof iconMap;
|
package/dist/Shared/types.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { Dayjs } from 'dayjs';
|
|
2
2
|
import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
|
3
3
|
import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
4
4
|
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
|
+
import { SelectPickerOptionType } from './Components';
|
5
6
|
export declare enum EnvType {
|
6
7
|
CHART = "helm_charts",
|
7
8
|
APPLICATION = "apps"
|
@@ -640,11 +641,26 @@ export type MetaPossibleRoles = Record<CustomRoles['roleName'], {
|
|
640
641
|
}>;
|
641
642
|
export interface CustomRoleAndMeta {
|
642
643
|
customRoles: CustomRoles[];
|
643
|
-
|
644
|
-
|
644
|
+
possibleRolesMetaForDevtron: MetaPossibleRoles;
|
645
|
+
possibleJobRoles: SelectPickerOptionType<string>[];
|
645
646
|
possibleRolesMetaForCluster: MetaPossibleRoles;
|
646
|
-
possibleRolesMetaForJob: MetaPossibleRoles;
|
647
647
|
}
|
648
|
+
export interface UserRoleConfig {
|
649
|
+
baseRole: string;
|
650
|
+
/**
|
651
|
+
* Only for devtron apps
|
652
|
+
*/
|
653
|
+
additionalRoles?: Set<string>;
|
654
|
+
/**
|
655
|
+
* Only for devtron apps
|
656
|
+
*/
|
657
|
+
accessManagerRoles?: Set<string>;
|
658
|
+
}
|
659
|
+
export type RoleType = keyof UserRoleConfig;
|
660
|
+
export type RoleSelectorOptionType = Pick<SelectPickerOptionType, 'label' | 'description'> & {
|
661
|
+
value: string;
|
662
|
+
roleType: RoleType;
|
663
|
+
};
|
648
664
|
interface CommonTabArgsType {
|
649
665
|
/**
|
650
666
|
* Name for the tab.
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
2
|
+
<path stroke="#3B444C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.052 14.108a29.982 29.982 0 0 1 5.897 0M4.364 18.466a.675.675 0 0 0 .125.252.706.706 0 0 0 .22.186.768.768 0 0 0 .574.07 26.805 26.805 0 0 1 13.43-.001.786.786 0 0 0 .575-.07.725.725 0 0 0 .22-.186.674.674 0 0 0 .124-.252l2.348-9.377a.653.653 0 0 0-.018-.38.693.693 0 0 0-.229-.312.78.78 0 0 0-.77-.1l-4.66 1.947a.781.781 0 0 1-.534.024.729.729 0 0 1-.41-.321l-2.714-4.59a.714.714 0 0 0-.27-.26.774.774 0 0 0-.748 0 .714.714 0 0 0-.271.26l-2.714 4.59a.728.728 0 0 1-.41.32.781.781 0 0 1-.534-.023L3.037 8.296a.78.78 0 0 0-.77.1.693.693 0 0 0-.229.312.653.653 0 0 0-.018.38l2.344 9.378Z" vector-effect="non-scaling-stroke"/>
|
3
|
+
</svg>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M3 19C3.90267 17.6928 5.10103 16.6259 6.49389 15.8894C7.62708 15.2902 8.86219 14.924 10.1285 14.8082C10.4187 14.7817 10.7105 14.7683 11.0031 14.7683C7.8111 14.7683 5.22343 12.1339 5.22343 8.88415C5.22343 5.63443 7.8111 3 11.0031 3C13.8635 3 16.2385 5.11534 16.7012 7.89323" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />
|
3
|
+
<path d="M19.0962 14.1677L19.2118 14.0519M15.0603 16.2001C14.7517 15.4305 14.7184 14.578 14.9658 13.7866C15.2133 12.9953 15.7264 12.3136 16.4184 11.8569C17.1105 11.4002 17.939 11.1965 18.7639 11.2801C19.5888 11.3637 20.3595 11.7296 20.9458 12.3159C21.5321 12.9022 21.898 13.6729 21.9816 14.4979C22.0653 15.3228 21.8615 16.1513 21.4048 16.8433C20.9481 17.5353 20.2664 18.0484 19.4751 18.2959C18.6837 18.5434 17.8312 18.51 17.0616 18.2015L14.0013 21.2617H12V19.2604L15.0603 16.2001Z" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke"/>
|
4
|
+
</svg>
|