@devtron-labs/devtron-fe-common-lib 0.0.42-beta-1 → 0.0.42-beta-3
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/Common/DebouncedSearch/DebouncedSearch.d.ts +1 -1
- package/dist/Common/DebouncedSearch/Types.d.ts +0 -1
- package/dist/Common/Dialogs/Types.d.ts +0 -1
- package/dist/Common/Helper.d.ts +12 -0
- package/dist/Common/RJSF/Form.d.ts +4 -0
- package/dist/Common/RJSF/common/FieldRow.d.ts +6 -0
- package/dist/Common/RJSF/common/types.d.ts +8 -0
- package/dist/Common/RJSF/config.d.ts +4 -0
- package/dist/Common/RJSF/constants.d.ts +7 -0
- package/dist/Common/RJSF/index.d.ts +3 -0
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/ArrayFieldTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/BaseInput.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/index.d.ts +3 -0
- package/dist/Common/RJSF/templates/Description.d.ts +3 -0
- package/dist/Common/RJSF/templates/Field.d.ts +3 -0
- package/dist/Common/RJSF/templates/FieldErrorTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/TitleField.d.ts +3 -0
- package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/index.d.ts +10 -0
- package/dist/Common/RJSF/types.d.ts +3 -0
- package/dist/Common/RJSF/utils.d.ts +25 -0
- package/dist/Common/RJSF/widgets/Checkbox.d.ts +3 -0
- package/dist/Common/RJSF/widgets/Select.d.ts +3 -0
- package/dist/Common/RJSF/widgets/index.d.ts +2 -0
- package/dist/Common/Types.d.ts +0 -136
- package/dist/Common/index.d.ts +1 -1
- package/dist/index.js +9472 -6801
- package/package.json +4 -1
- package/src/Assets/Icon/ic-chevron-down.svg +5 -0
- package/src/Common/DebouncedSearch/DebouncedSearch.tsx +2 -3
- package/src/Common/DebouncedSearch/Types.ts +0 -1
- package/src/Common/Dialogs/DeleteDialog.tsx +2 -18
- package/src/Common/Dialogs/Types.ts +0 -1
- package/src/Common/Helper.tsx +26 -4
- package/src/Common/RJSF/Form.tsx +29 -0
- package/src/Common/RJSF/common/FieldRow.tsx +35 -0
- package/src/Common/RJSF/common/types.ts +9 -0
- package/src/Common/RJSF/config.ts +37 -0
- package/src/Common/RJSF/constants.ts +10 -0
- package/src/Common/RJSF/index.ts +3 -0
- package/src/Common/RJSF/rjsfForm.scss +18 -0
- package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +31 -0
- package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +78 -0
- package/src/Common/RJSF/templates/BaseInput.tsx +16 -0
- package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +18 -0
- package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +10 -0
- package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +18 -0
- package/src/Common/RJSF/templates/ButtonTemplates/index.ts +3 -0
- package/src/Common/RJSF/templates/Description.tsx +12 -0
- package/src/Common/RJSF/templates/Field.tsx +30 -0
- package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +25 -0
- package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +105 -0
- package/src/Common/RJSF/templates/TitleField.tsx +9 -0
- package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +51 -0
- package/src/Common/RJSF/templates/index.ts +10 -0
- package/src/Common/RJSF/types.ts +4 -0
- package/src/Common/RJSF/utils.ts +110 -0
- package/src/Common/RJSF/widgets/Checkbox.tsx +44 -0
- package/src/Common/RJSF/widgets/Select.tsx +77 -0
- package/src/Common/RJSF/widgets/index.ts +2 -0
- package/src/Common/Types.ts +0 -149
- package/src/Common/index.ts +1 -1
- package/dist/Common/DevtronProgressing/DevtronProgressing.d.ts +0 -3
- package/dist/Common/DevtronProgressing/index.d.ts +0 -1
- package/dist/Common/DevtronProgressing/types.d.ts +0 -4
- package/src/Assets/Icon/ic-rotate-devtron.svg +0 -103
- package/src/Common/DevtronProgressing/DevtronProgressing.tsx +0 -11
- package/src/Common/DevtronProgressing/index.ts +0 -1
- package/src/Common/DevtronProgressing/types.ts +0 -4
|
@@ -12,4 +12,4 @@ import { DebouncedSearchProps } from './Types';
|
|
|
12
12
|
* @param clearSearch - (Optional) To clear the search text
|
|
13
13
|
* @param showClearIcon - (Optional) To show the clear icon default value is true
|
|
14
14
|
*/
|
|
15
|
-
export default function DebouncedSearch({ onSearch, Icon, children, placeholder, containerClass, iconClass, inputClass, debounceTimeout, clearSearch, showClearIcon,
|
|
15
|
+
export default function DebouncedSearch({ onSearch, Icon, children, placeholder, containerClass, iconClass, inputClass, debounceTimeout, clearSearch, showClearIcon, }: DebouncedSearchProps): JSX.Element;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Sentry from '@sentry/browser';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { AsyncOptions, UseSearchString } from './Types';
|
|
3
4
|
export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
|
|
@@ -52,4 +53,15 @@ export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) =>
|
|
|
52
53
|
export declare function copyToClipboard(str: any, callback?: typeof noop): void;
|
|
53
54
|
export declare function useAsync<T>(func: (...rest: any[]) => Promise<T>, dependencyArray?: any[], shouldRun?: boolean, options?: AsyncOptions): [boolean, T, any | null, () => void, React.Dispatch<any>, any[]];
|
|
54
55
|
export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: any) => string;
|
|
56
|
+
/**
|
|
57
|
+
* Appends search parameters to the url as a query string
|
|
58
|
+
*
|
|
59
|
+
* @param url URL to which the search params needs to be added
|
|
60
|
+
* @param params Object for the search parameters
|
|
61
|
+
*/
|
|
62
|
+
export declare const getUrlWithSearchParams: (url: string, params: Record<string | number, any>) => string;
|
|
63
|
+
/**
|
|
64
|
+
* Custom exception logger function for logging errors to sentry
|
|
65
|
+
*/
|
|
66
|
+
export declare const logExceptionToSentry: typeof Sentry.captureException;
|
|
55
67
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldRowProps } from './types';
|
|
3
|
+
import { DO_NOT_SHOW_LABEL } from '../constants';
|
|
4
|
+
export declare const FieldRowWithLabel: ({ showLabel, label, required, children, id, shouldAlignCenter, }: Omit<FieldRowProps, "label"> & {
|
|
5
|
+
label: FieldRowProps['label'] | typeof DO_NOT_SHOW_LABEL;
|
|
6
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ArrayFieldTemplateItemType } from '@rjsf/utils';
|
|
3
|
+
export declare const ArrayFieldItemTemplate: ({ children, className, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ArrayFieldTemplateProps } from '@rjsf/utils';
|
|
3
|
+
export declare const ArrayFieldTemplate: ({ canAdd, className, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, title, }: ArrayFieldTemplateProps) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WrapIfAdditionalTemplateProps } from '@rjsf/utils';
|
|
3
|
+
export declare const WrapIfAdditionalTemplate: ({ id, disabled, label, onKeyChange, onDropPropertyClick, readonly, schema, children, uiSchema, registry, }: WrapIfAdditionalTemplateProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ArrayFieldTemplate } from './ArrayFieldTemplate';
|
|
2
|
+
export { ArrayFieldItemTemplate } from './ArrayFieldItemTemplate';
|
|
3
|
+
export { BaseInput as BaseInputTemplate } from './BaseInput';
|
|
4
|
+
export * from './ButtonTemplates';
|
|
5
|
+
export { Description as DescriptionFieldTemplate } from './Description';
|
|
6
|
+
export { Field as FieldTemplate } from './Field';
|
|
7
|
+
export { FieldErrorTemplate } from './FieldErrorTemplate';
|
|
8
|
+
export { ObjectFieldTemplate } from './ObjectFieldTemplate';
|
|
9
|
+
export { TitleField as TitleFieldTemplate } from './TitleField';
|
|
10
|
+
export { WrapIfAdditionalTemplate } from './WrapIfAdditionalTemplate';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
+
/**
|
|
4
|
+
* Override for the TranslatableString from RJSF
|
|
5
|
+
*/
|
|
6
|
+
export declare const translateString: (stringToTranslate: TranslatableString, params?: string[]) => string;
|
|
7
|
+
export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
|
|
8
|
+
menuList: (base: any) => any;
|
|
9
|
+
control: (base: any, state: any) => any;
|
|
10
|
+
option: (base: any, state: any) => any;
|
|
11
|
+
dropdownIndicator: (base: any, state: any) => any;
|
|
12
|
+
valueContainer: (base: any) => any;
|
|
13
|
+
loadingMessage: (base: any) => any;
|
|
14
|
+
noOptionsMessage: (base: any) => any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Returns the redirection props for a url
|
|
18
|
+
*/
|
|
19
|
+
export declare const getRedirectionProps: (url: string) => import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Infers the type for json schema from value type
|
|
24
|
+
*/
|
|
25
|
+
export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
3
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
4
|
-
import { DockerConfigOverrideType, TaskErrorObj } from '.';
|
|
5
4
|
export interface ResponseType {
|
|
6
5
|
code: number;
|
|
7
6
|
status: string;
|
|
@@ -285,7 +284,6 @@ export interface CommonNodeAttr {
|
|
|
285
284
|
colorCode?: string;
|
|
286
285
|
isExternalCI?: boolean;
|
|
287
286
|
isLinkedCI?: boolean;
|
|
288
|
-
isLinkedCD?: boolean;
|
|
289
287
|
isJobCI?: boolean;
|
|
290
288
|
environmentName?: string;
|
|
291
289
|
environmentId?: number;
|
|
@@ -429,138 +427,4 @@ export interface AsyncState<T> {
|
|
|
429
427
|
export interface AsyncOptions {
|
|
430
428
|
resetOnChange: boolean;
|
|
431
429
|
}
|
|
432
|
-
export interface AppEnvironment {
|
|
433
|
-
environmentId: number;
|
|
434
|
-
environmentName: string;
|
|
435
|
-
appMetrics: boolean;
|
|
436
|
-
infraMetrics: boolean;
|
|
437
|
-
prod: boolean;
|
|
438
|
-
chartRefId?: number;
|
|
439
|
-
lastDeployed?: string;
|
|
440
|
-
lastDeployedBy?: string;
|
|
441
|
-
lastDeployedImage?: string;
|
|
442
|
-
appStatus?: string;
|
|
443
|
-
deploymentAppDeleteRequest?: boolean;
|
|
444
|
-
isVirtualEnvironment?: boolean;
|
|
445
|
-
isProtected?: boolean;
|
|
446
|
-
pipelineId?: number;
|
|
447
|
-
latestCdWorkflowRunnerId?: number;
|
|
448
|
-
}
|
|
449
|
-
export interface Strategy {
|
|
450
|
-
deploymentTemplate: string;
|
|
451
|
-
config: any;
|
|
452
|
-
default?: boolean;
|
|
453
|
-
}
|
|
454
|
-
export interface CDStage {
|
|
455
|
-
status: string;
|
|
456
|
-
name: string;
|
|
457
|
-
triggerType: 'AUTOMATIC' | 'MANUAL';
|
|
458
|
-
config: string;
|
|
459
|
-
}
|
|
460
|
-
export interface CDStageConfigMapSecretNames {
|
|
461
|
-
configMaps: any[];
|
|
462
|
-
secrets: any[];
|
|
463
|
-
}
|
|
464
|
-
export interface PrePostDeployStageType {
|
|
465
|
-
isValid: boolean;
|
|
466
|
-
steps: TaskErrorObj[];
|
|
467
|
-
triggerType: string;
|
|
468
|
-
name: string;
|
|
469
|
-
status: string;
|
|
470
|
-
}
|
|
471
|
-
export interface CdPipeline {
|
|
472
|
-
id: number;
|
|
473
|
-
environmentId: number;
|
|
474
|
-
environmentName?: string;
|
|
475
|
-
description?: string;
|
|
476
|
-
ciPipelineId: number;
|
|
477
|
-
triggerType: 'AUTOMATIC' | 'MANUAL';
|
|
478
|
-
name: string;
|
|
479
|
-
strategies?: Strategy[];
|
|
480
|
-
namespace?: string;
|
|
481
|
-
appWorkflowId?: number;
|
|
482
|
-
deploymentTemplate?: string;
|
|
483
|
-
preStage?: CDStage;
|
|
484
|
-
postStage?: CDStage;
|
|
485
|
-
preStageConfigMapSecretNames?: CDStageConfigMapSecretNames;
|
|
486
|
-
postStageConfigMapSecretNames?: CDStageConfigMapSecretNames;
|
|
487
|
-
runPreStageInEnv?: boolean;
|
|
488
|
-
runPostStageInEnv?: boolean;
|
|
489
|
-
isClusterCdActive?: boolean;
|
|
490
|
-
parentPipelineId?: number;
|
|
491
|
-
parentPipelineType?: string;
|
|
492
|
-
deploymentAppDeleteRequest?: boolean;
|
|
493
|
-
deploymentAppCreated?: boolean;
|
|
494
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
495
|
-
isVirtualEnvironment?: boolean;
|
|
496
|
-
deploymentAppType: DeploymentAppTypes;
|
|
497
|
-
helmPackageName?: string;
|
|
498
|
-
preDeployStage?: PrePostDeployStageType;
|
|
499
|
-
postDeployStage?: PrePostDeployStageType;
|
|
500
|
-
isProdEnv?: boolean;
|
|
501
|
-
}
|
|
502
|
-
export interface ExternalCiConfig {
|
|
503
|
-
id: number;
|
|
504
|
-
webhookUrl: string;
|
|
505
|
-
payload: string;
|
|
506
|
-
accessKey: string;
|
|
507
|
-
}
|
|
508
|
-
export interface Source {
|
|
509
|
-
type: string;
|
|
510
|
-
value?: string;
|
|
511
|
-
regex?: string;
|
|
512
|
-
}
|
|
513
|
-
export interface CiMaterial {
|
|
514
|
-
source: Source;
|
|
515
|
-
gitMaterialId: number;
|
|
516
|
-
id: number;
|
|
517
|
-
gitMaterialName: string;
|
|
518
|
-
isRegex?: boolean;
|
|
519
|
-
}
|
|
520
|
-
export interface Task {
|
|
521
|
-
name?: string;
|
|
522
|
-
type?: string;
|
|
523
|
-
cmd?: string;
|
|
524
|
-
args?: Array<string>;
|
|
525
|
-
}
|
|
526
|
-
export interface CiScript {
|
|
527
|
-
id: number;
|
|
528
|
-
index: number;
|
|
529
|
-
name: string;
|
|
530
|
-
script: string;
|
|
531
|
-
outputLocation?: string;
|
|
532
|
-
}
|
|
533
|
-
export interface CiPipeline {
|
|
534
|
-
isManual: boolean;
|
|
535
|
-
dockerArgs?: Map<string, string>;
|
|
536
|
-
isExternal: boolean;
|
|
537
|
-
parentCiPipeline: number;
|
|
538
|
-
parentAppId: number;
|
|
539
|
-
externalCiConfig: ExternalCiConfig;
|
|
540
|
-
ciMaterial?: CiMaterial[];
|
|
541
|
-
name?: string;
|
|
542
|
-
id?: number;
|
|
543
|
-
active?: boolean;
|
|
544
|
-
linkedCount: number;
|
|
545
|
-
scanEnabled: boolean;
|
|
546
|
-
deleted?: boolean;
|
|
547
|
-
version?: string;
|
|
548
|
-
beforeDockerBuild?: Array<Task>;
|
|
549
|
-
afterDockerBuild?: Array<Task>;
|
|
550
|
-
appWorkflowId?: number;
|
|
551
|
-
beforeDockerBuildScripts?: Array<CiScript>;
|
|
552
|
-
afterDockerBuildScripts?: Array<CiScript>;
|
|
553
|
-
isDockerConfigOverridden?: boolean;
|
|
554
|
-
dockerConfigOverride?: DockerConfigOverrideType;
|
|
555
|
-
appName?: string;
|
|
556
|
-
appId?: string;
|
|
557
|
-
componentId?: number;
|
|
558
|
-
isCITriggerBlocked?: boolean;
|
|
559
|
-
ciBlockState?: {
|
|
560
|
-
action: any;
|
|
561
|
-
metadataField: string;
|
|
562
|
-
};
|
|
563
|
-
isOffendingMandatoryPlugin?: boolean;
|
|
564
|
-
pipelineType?: string;
|
|
565
|
-
}
|
|
566
430
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -40,4 +40,4 @@ export { default as Grid } from './Grid/Grid';
|
|
|
40
40
|
export { default as ClipboardButton } from './ClipboardButton/ClipboardButton';
|
|
41
41
|
export * from './Hooks';
|
|
42
42
|
export { AppStatus } from './AppStatus';
|
|
43
|
-
export * from './
|
|
43
|
+
export * from './RJSF';
|