@devtron-labs/devtron-fe-common-lib 1.4.0-beta-1 → 1.4.0-patch-1-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 (23) hide show
  1. package/dist/{@code-editor-DKwWMrM8.js → @code-editor-V-g7Z_d8.js} +4238 -4242
  2. package/dist/{@common-rjsf-Dkh3jTCW.js → @common-rjsf-1k-Rfg0p.js} +2 -2
  3. package/dist/{@framer-motion-CdgdF0KV.js → @framer-motion-BxQTtYmm.js} +1 -1
  4. package/dist/{@react-dates-CtQV2TLr.js → @react-dates-M_eJUVeH.js} +1 -1
  5. package/dist/{@react-select-Cn3OpC9h.js → @react-select-CywptBlV.js} +1 -1
  6. package/dist/{@vendor-CwAQS8iU.js → @vendor-QI4m26H1.js} +5491 -5894
  7. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +1 -13
  8. package/dist/Common/CodeEditor/types.d.ts +2 -4
  9. package/dist/Pages/GlobalConfigurations/BuildInfra/UseBuildInfraForm.d.ts +1 -1
  10. package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +2 -2
  11. package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +3 -4
  12. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +39 -17
  13. package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +4 -3
  14. package/dist/Shared/Components/index.d.ts +0 -1
  15. package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +0 -1
  16. package/dist/Shared/Services/types.d.ts +0 -4
  17. package/dist/index.js +177 -177
  18. package/package.json +1 -6
  19. package/dist/@react-virtualized-sticky-tree-CVJYfMx0.js +0 -452
  20. package/dist/Shared/Components/VirtualizedList/VirtualizedList.component.d.ts +0 -2
  21. package/dist/Shared/Components/VirtualizedList/VirtualizedList.constants.d.ts +0 -2
  22. package/dist/Shared/Components/VirtualizedList/VirtualizedList.types.d.ts +0 -36
  23. package/dist/Shared/Components/VirtualizedList/index.d.ts +0 -2
@@ -5,35 +5,24 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
5
5
  diffMode: boolean;
6
6
  theme: CodeEditorThemesKeys;
7
7
  code: string;
8
- defaultCode: string;
9
8
  noParsing: boolean;
10
9
  } | {
11
10
  diffMode: any;
12
11
  mode: MODES;
13
12
  theme: CodeEditorThemesKeys;
14
13
  code: string;
15
- defaultCode: string;
16
14
  noParsing: boolean;
17
15
  } | {
18
16
  theme: any;
19
17
  mode: MODES;
20
18
  diffMode: boolean;
21
19
  code: string;
22
- defaultCode: string;
23
20
  noParsing: boolean;
24
21
  } | {
25
22
  code: any;
26
23
  mode: MODES;
27
24
  diffMode: boolean;
28
25
  theme: CodeEditorThemesKeys;
29
- defaultCode: string;
30
- noParsing: boolean;
31
- } | {
32
- defaultCode: any;
33
- mode: MODES;
34
- diffMode: boolean;
35
- theme: CodeEditorThemesKeys;
36
- code: string;
37
26
  noParsing: boolean;
38
27
  } | {
39
28
  height: any;
@@ -41,8 +30,7 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
41
30
  diffMode: boolean;
42
31
  theme: CodeEditorThemesKeys;
43
32
  code: string;
44
- defaultCode: string;
45
33
  noParsing: boolean;
46
34
  };
47
35
  export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
48
- export declare const initialState: ({ mode, theme, value, defaultValue, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
36
+ export declare const initialState: ({ mode, theme, value, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
@@ -8,7 +8,7 @@ interface CodeEditorBaseInterface {
8
8
  value?: string;
9
9
  lineDecorationsWidth?: number;
10
10
  responseType?: string;
11
- onChange?: (value: string, defaultValue: string) => void;
11
+ onChange?: (string: any) => void;
12
12
  onBlur?: () => void;
13
13
  onFocus?: () => void;
14
14
  children?: any;
@@ -63,7 +63,7 @@ export interface CodeEditorHeaderComposition {
63
63
  ValidationError?: React.FC<any>;
64
64
  Clipboard?: React.FC<any>;
65
65
  }
66
- export type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
66
+ export type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setHeight';
67
67
  export interface Action {
68
68
  type: ActionTypes;
69
69
  value: any;
@@ -80,7 +80,6 @@ export interface CodeEditorInitialValueType {
80
80
  diffView: boolean;
81
81
  theme?: string;
82
82
  value: string;
83
- defaultValue: string;
84
83
  noParsing?: boolean;
85
84
  tabSize: number;
86
85
  }
@@ -89,7 +88,6 @@ export interface CodeEditorState {
89
88
  diffMode: boolean;
90
89
  theme: CodeEditorThemesKeys;
91
90
  code: string;
92
- defaultCode: string;
93
91
  noParsing: boolean;
94
92
  }
95
93
  export declare enum CodeEditorActionTypes {
@@ -1,3 +1,3 @@
1
1
  import { UseBuildInfraFormProps, UseBuildInfraFormResponseType } from '../../index';
2
- declare const useBuildInfraForm: ({ name, editProfile, handleSuccessRedirection, }: UseBuildInfraFormProps) => UseBuildInfraFormResponseType;
2
+ declare const useBuildInfraForm: ({ name, editProfile, handleSuccessRedirection, canConfigureUseK8sDriver, }: UseBuildInfraFormProps) => UseBuildInfraFormResponseType;
3
3
  export default useBuildInfraForm;
@@ -1,5 +1,5 @@
1
1
  import { UseBreadcrumbProps } from '@Common/BreadCrumb/Types';
2
- import { BuildInfraConfigTypes, BuildInfraFormFieldType, BuildInfraLocators, BuildInfraMetaConfigTypes, ProfileInputErrorType, BuildInfraProfileBase, HandleProfileInputChangeType, BuildInfraAPIVersionType, TargetPlatformErrorFields, ValidateRequestLimitType, RequestLimitConfigType, BuildInfraToleranceEffectType, BuildInfraToleranceOperatorType } from './types';
2
+ import { BuildInfraConfigTypes, BuildInfraFormFieldType, BuildInfraLocators, BuildInfraMetaConfigTypes, ProfileInputErrorType, HandleProfileInputChangeType, BuildInfraAPIVersionType, TargetPlatformErrorFields, ValidateRequestLimitType, RequestLimitConfigType, BuildInfraToleranceEffectType, BuildInfraToleranceOperatorType } from './types';
3
3
  export declare const BUILD_INFRA_INPUT_CONSTRAINTS: {
4
4
  readonly STEP: "any";
5
5
  readonly MIN: 0;
@@ -43,7 +43,6 @@ export declare const BUILD_INFRA_FORM_FIELDS: Readonly<BuildInfraFormFieldType[]
43
43
  export declare const NUMERIC_BUILD_INFRA_FORM_FIELD_CONFIGURATION_MAP: Readonly<Record<BuildInfraLocators, BuildInfraFormFieldType>>;
44
44
  export declare const PROFILE_INPUT_ERROR_FIELDS: ProfileInputErrorType;
45
45
  export declare const CREATE_MODE_REQUIRED_INPUT_FIELDS: BuildInfraMetaConfigTypes[];
46
- export declare const CREATE_PROFILE_BASE_VALUE: BuildInfraProfileBase;
47
46
  export declare const BUILD_INFRA_TEST_IDS: {
48
47
  readonly SUBMIT_BUTTON: "build-infra-submit-button";
49
48
  readonly CANCEL_BUTTON: "build-infra-cancel-button";
@@ -60,3 +59,4 @@ export declare const ACTION_TO_PERSISTED_VALUE_MAP: Readonly<Record<RequestLimit
60
59
  export declare const DEFAULT_TOLERANCE_EFFECT = BuildInfraToleranceEffectType.NO_SCHEDULE;
61
60
  export declare const DEFAULT_TOLERANCE_OPERATOR = BuildInfraToleranceOperatorType.EQUALS;
62
61
  export declare const INFRA_CONFIG_NOT_SUPPORTED_BY_BUILD_X: Partial<Record<BuildInfraConfigTypes, true>>;
62
+ export declare const USE_BUILD_X_DRIVER_FALLBACK = true;
@@ -1,4 +1,3 @@
1
- import { BuildInfraProfileResponseType, CreateBuildInfraProfileType, GetBuildInfraProfileType, UpdateBuildInfraProfileType } from './types';
2
- export declare const getBuildInfraProfileByName: ({ name, fromCreateView, }: GetBuildInfraProfileType) => Promise<BuildInfraProfileResponseType>;
3
- export declare const updateBuildInfraProfile: ({ name, profileInput }: UpdateBuildInfraProfileType) => Promise<import('../../../Common').ResponseType<Promise<import('../../../Common').ResponseType<unknown>>>>;
4
- export declare const createBuildInfraProfile: ({ profileInput }: CreateBuildInfraProfileType) => Promise<import('../../../Common').ResponseType<Promise<import('../../../Common').ResponseType<unknown>>>>;
1
+ import { BuildInfraProfileResponseType, GetBuildInfraProfileType, UpsertBuildInfraProfileServiceParamsType } from './types';
2
+ export declare const getBuildInfraProfileByName: ({ name, fromCreateView, canConfigureUseK8sDriver, }: GetBuildInfraProfileType) => Promise<BuildInfraProfileResponseType>;
3
+ export declare const upsertBuildInfraProfile: ({ name, profileInput, canConfigureUseK8sDriver, }: UpsertBuildInfraProfileServiceParamsType) => Promise<import('../../../Common').ResponseType<Promise<import('../../../Common').ResponseType<unknown>>>>;
@@ -166,6 +166,10 @@ export type BuildInfraConfigurationMapTypeWithoutDefaultFallback = {
166
166
  [key in BuildInfraConfigTypes]?: BuildInfraConfigInfoType;
167
167
  };
168
168
  export type BuildInfraConfigurationMapType = Record<BuildInfraConfigTypes, BuildInfraConfigurationType>;
169
+ export declare enum BuildXDriverType {
170
+ KUBERNETES = "kubernetes",
171
+ DOCKER_CONTAINER = "docker-container"
172
+ }
169
173
  interface BuildInfraProfileBaseDTO {
170
174
  id?: number;
171
175
  name?: string;
@@ -173,8 +177,13 @@ interface BuildInfraProfileBaseDTO {
173
177
  type: BuildInfraProfileVariants;
174
178
  appCount?: number;
175
179
  active?: boolean;
180
+ /**
181
+ * @default `BuildXDriverType.KUBERNETES`
182
+ */
183
+ buildxDriverType?: BuildXDriverType;
176
184
  }
177
- export interface BuildInfraProfileBase extends BuildInfraProfileBaseDTO {
185
+ export interface BuildInfraProfileBase extends Omit<BuildInfraProfileBaseDTO, 'buildxDriverType'> {
186
+ useK8sDriver?: boolean;
178
187
  }
179
188
  export interface BuildInfraProfileInfoDTO extends BuildInfraProfileBaseDTO {
180
189
  configurations: BuildInfraPlatformConfigurationMapDTO;
@@ -185,18 +194,6 @@ export interface BuildInfraProfileData extends BuildInfraProfileBase {
185
194
  */
186
195
  configurations: Record<string, BuildInfraConfigurationMapType>;
187
196
  }
188
- export interface GetBuildInfraProfileType {
189
- name: string;
190
- fromCreateView?: boolean;
191
- }
192
- export interface BuildInfraProfileResponseType {
193
- configurationUnits: BuildInfraUnitsMapType | null;
194
- profile: BuildInfraProfileData | null;
195
- /**
196
- * To be used in case user is creating configuration for new platform
197
- */
198
- fallbackPlatformConfigurationMap: BuildInfraProfileData['configurations'];
199
- }
200
197
  export interface UseBuildInfraFormProps {
201
198
  /**
202
199
  * Name of the profile, if not provided assumption would be for create view
@@ -210,6 +207,22 @@ export interface UseBuildInfraFormProps {
210
207
  * If true, call this on form submission success
211
208
  */
212
209
  handleSuccessRedirection?: () => void;
210
+ /**
211
+ * @default false
212
+ */
213
+ canConfigureUseK8sDriver?: boolean;
214
+ }
215
+ export interface GetBuildInfraProfileType extends Pick<UseBuildInfraFormProps, 'canConfigureUseK8sDriver'> {
216
+ name: string;
217
+ fromCreateView?: boolean;
218
+ }
219
+ export interface BuildInfraProfileResponseType {
220
+ configurationUnits: BuildInfraUnitsMapType | null;
221
+ profile: BuildInfraProfileData | null;
222
+ /**
223
+ * To be used in case user is creating configuration for new platform
224
+ */
225
+ fallbackPlatformConfigurationMap: BuildInfraProfileData['configurations'];
213
226
  }
214
227
  export declare enum BuildInfraProfileAdditionalErrorKeysType {
215
228
  TARGET_PLATFORM = "target_platform"
@@ -239,6 +252,7 @@ interface NumericBuildInfraConfigPayloadType {
239
252
  }
240
253
  export declare enum BuildInfraProfileInputActionType {
241
254
  ADD_TARGET_PLATFORM = "add_target_platform",
255
+ TOGGLE_USE_K8S_DRIVER = "toggle_use_k8s_driver",
242
256
  REMOVE_TARGET_PLATFORM = "remove_target_platform",
243
257
  RENAME_TARGET_PLATFORM = "rename_target_platform",
244
258
  RESTORE_PROFILE_CONFIG_SNAPSHOT = "restore_profile_config_snapshot",
@@ -250,6 +264,9 @@ export declare enum BuildInfraProfileInputActionType {
250
264
  EDIT_TOLERANCE_ITEM = "edit_tolerance_item"
251
265
  }
252
266
  export type HandleProfileInputChangeType = {
267
+ action: BuildInfraProfileInputActionType.TOGGLE_USE_K8S_DRIVER;
268
+ data?: never;
269
+ } | {
253
270
  action: NumericBuildInfraConfigTypes;
254
271
  data: ProfileInputDispatchDataType & NumericBuildInfraConfigPayloadType;
255
272
  } | {
@@ -300,7 +317,7 @@ export interface UseBuildInfraFormResponseType {
300
317
  profileInputErrors: ProfileInputErrorType;
301
318
  handleProfileInputChange: ({ action, data }: HandleProfileInputChangeType) => void;
302
319
  loadingActionRequest: boolean;
303
- handleSubmit: (e: FormEvent<HTMLFormElement>) => Promise<void>;
320
+ handleSubmit: (e?: FormEvent<HTMLFormElement>) => Promise<void>;
304
321
  }
305
322
  export interface BuildInfraConfigFormProps extends Pick<UseBuildInfraFormResponseType, 'profileInput' | 'profileInputErrors' | 'handleProfileInputChange'> {
306
323
  isGlobalProfile?: boolean;
@@ -360,8 +377,11 @@ export interface FooterProps {
360
377
  editProfile?: boolean;
361
378
  loading?: boolean;
362
379
  }
363
- export interface UpdateBuildInfraProfileType extends Pick<UseBuildInfraFormResponseType, 'profileInput'> {
364
- name: string;
380
+ export interface UpsertBuildInfraProfileServiceParamsType extends Pick<UseBuildInfraFormResponseType, 'profileInput'>, Pick<UseBuildInfraFormProps, 'canConfigureUseK8sDriver'> {
381
+ /**
382
+ * If not given would consider as create view
383
+ */
384
+ name?: string;
365
385
  }
366
386
  export interface CreateBuildInfraProfileType extends Pick<UseBuildInfraFormResponseType, 'profileInput'> {
367
387
  }
@@ -392,7 +412,7 @@ export interface BuildInfraListResponseType extends BaseBuildInfraProfileDTO {
392
412
  export interface BuildInfraProfileDTO extends BaseBuildInfraProfileDTO {
393
413
  profile: BuildInfraProfileInfoDTO;
394
414
  }
395
- export interface BuildInfraProfileTransformerParamsType extends BuildInfraProfileDTO, Pick<GetBuildInfraProfileType, 'fromCreateView'> {
415
+ export interface BuildInfraProfileTransformerParamsType extends BuildInfraProfileDTO, Pick<GetBuildInfraProfileType, 'fromCreateView'>, Pick<GetBuildInfraProfileType, 'canConfigureUseK8sDriver'> {
396
416
  }
397
417
  export interface GetPlatformConfigurationsWithDefaultValuesParamsType {
398
418
  profileConfigurationsMap: BuildInfraConfigurationMapTypeWithoutDefaultFallback;
@@ -407,4 +427,6 @@ export interface ValidateNodeSelectorParamsType extends Pick<ReturnType<typeof u
407
427
  selector: BuildInfraNodeSelectorValueType;
408
428
  existingKeys: string[];
409
429
  }
430
+ export interface GetBaseProfileObjectParamsType extends Pick<BuildInfraProfileTransformerParamsType, 'canConfigureUseK8sDriver' | 'fromCreateView' | 'profile'> {
431
+ }
410
432
  export {};
@@ -1,6 +1,7 @@
1
- import { BuildInfraConfigValuesType, BuildInfraInheritActions, BuildInfraLocators, BuildInfraProfileInfoDTO, BuildInfraProfileResponseType, BuildInfraProfileTransformerParamsType, CreateBuildInfraProfileType } from './types';
1
+ import { BuildInfraConfigValuesType, BuildInfraInheritActions, BuildInfraLocators, BuildInfraProfileInfoDTO, BuildInfraProfileResponseType, BuildInfraProfileTransformerParamsType, BuildXDriverType, CreateBuildInfraProfileType } from './types';
2
2
  export declare const parsePlatformConfigIntoValue: (configuration: BuildInfraConfigValuesType, addUniqueId?: boolean) => BuildInfraConfigValuesType;
3
- export declare const getTransformedBuildInfraProfileResponse: ({ configurationUnits, defaultConfigurations, profile, fromCreateView, }: BuildInfraProfileTransformerParamsType) => BuildInfraProfileResponseType;
4
- export declare const getBuildInfraProfilePayload: (profileInput: CreateBuildInfraProfileType["profileInput"]) => BuildInfraProfileInfoDTO;
3
+ export declare const getParsedValueForUseK8sDriver: (buildxDriverType: BuildXDriverType) => boolean;
4
+ export declare const getTransformedBuildInfraProfileResponse: ({ configurationUnits, defaultConfigurations, profile, fromCreateView, canConfigureUseK8sDriver, }: BuildInfraProfileTransformerParamsType) => BuildInfraProfileResponseType;
5
+ export declare const getBuildInfraProfilePayload: (profileInput: CreateBuildInfraProfileType["profileInput"], canConfigureUseK8sDriver: boolean) => BuildInfraProfileInfoDTO;
5
6
  export declare const getBuildInfraProfileEndpoint: () => string;
6
7
  export declare const getBuildInfraInheritActionFromLocator: (locator: BuildInfraLocators, activateLocator: boolean) => BuildInfraInheritActions;
@@ -49,4 +49,3 @@ export * from './DynamicDataTable';
49
49
  export * from './TagsKeyValueTable';
50
50
  export * from './FileUpload';
51
51
  export * from './AnimatedDeployButton';
52
- export * from './VirtualizedList';
@@ -17,7 +17,6 @@ export interface ClusterDTO {
17
17
  id: number;
18
18
  cluster_name: string;
19
19
  isVirtualCluster: boolean;
20
- isProd: boolean;
21
20
  }
22
21
  export interface UseGetResourceKindsOptionsProps {
23
22
  resourcesToFetch: Extract<ResourceKindType, ResourceKindType.devtronApplication | ResourceKindType.project | ResourceKindType.cluster | ResourceKindType.environment>[];
@@ -7,10 +7,6 @@ export interface ClusterType {
7
7
  * If true, denotes virtual cluster
8
8
  */
9
9
  isVirtual: boolean;
10
- /**
11
- * If true, denotes prod labelled cluster
12
- */
13
- isProd: boolean;
14
10
  }
15
11
  /**
16
12
  * T => Type of query params