@devtron-labs/devtron-fe-common-lib 0.0.42-beta-2 → 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.
Files changed (67) hide show
  1. package/dist/Common/DebouncedSearch/DebouncedSearch.d.ts +1 -1
  2. package/dist/Common/DebouncedSearch/Types.d.ts +0 -1
  3. package/dist/Common/Dialogs/Types.d.ts +0 -1
  4. package/dist/Common/Helper.d.ts +12 -0
  5. package/dist/Common/RJSF/Form.d.ts +4 -0
  6. package/dist/Common/RJSF/common/FieldRow.d.ts +6 -0
  7. package/dist/Common/RJSF/common/types.d.ts +8 -0
  8. package/dist/Common/RJSF/config.d.ts +4 -0
  9. package/dist/Common/RJSF/constants.d.ts +7 -0
  10. package/dist/Common/RJSF/index.d.ts +3 -0
  11. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +3 -0
  12. package/dist/Common/RJSF/templates/ArrayFieldTemplate.d.ts +3 -0
  13. package/dist/Common/RJSF/templates/BaseInput.d.ts +3 -0
  14. package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +3 -0
  15. package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.d.ts +3 -0
  16. package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.d.ts +3 -0
  17. package/dist/Common/RJSF/templates/ButtonTemplates/index.d.ts +3 -0
  18. package/dist/Common/RJSF/templates/Description.d.ts +3 -0
  19. package/dist/Common/RJSF/templates/Field.d.ts +3 -0
  20. package/dist/Common/RJSF/templates/FieldErrorTemplate.d.ts +3 -0
  21. package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +3 -0
  22. package/dist/Common/RJSF/templates/TitleField.d.ts +3 -0
  23. package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.d.ts +3 -0
  24. package/dist/Common/RJSF/templates/index.d.ts +10 -0
  25. package/dist/Common/RJSF/types.d.ts +3 -0
  26. package/dist/Common/RJSF/utils.d.ts +25 -0
  27. package/dist/Common/RJSF/widgets/Checkbox.d.ts +3 -0
  28. package/dist/Common/RJSF/widgets/Select.d.ts +3 -0
  29. package/dist/Common/RJSF/widgets/index.d.ts +2 -0
  30. package/dist/Common/Types.d.ts +0 -137
  31. package/dist/Common/index.d.ts +1 -0
  32. package/dist/index.js +9615 -6894
  33. package/package.json +4 -1
  34. package/src/Assets/Icon/ic-chevron-down.svg +5 -0
  35. package/src/Common/DebouncedSearch/DebouncedSearch.tsx +2 -3
  36. package/src/Common/DebouncedSearch/Types.ts +0 -1
  37. package/src/Common/Dialogs/DeleteDialog.tsx +2 -18
  38. package/src/Common/Dialogs/Types.ts +0 -1
  39. package/src/Common/Helper.tsx +26 -4
  40. package/src/Common/RJSF/Form.tsx +29 -0
  41. package/src/Common/RJSF/common/FieldRow.tsx +35 -0
  42. package/src/Common/RJSF/common/types.ts +9 -0
  43. package/src/Common/RJSF/config.ts +37 -0
  44. package/src/Common/RJSF/constants.ts +10 -0
  45. package/src/Common/RJSF/index.ts +3 -0
  46. package/src/Common/RJSF/rjsfForm.scss +18 -0
  47. package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +31 -0
  48. package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +78 -0
  49. package/src/Common/RJSF/templates/BaseInput.tsx +16 -0
  50. package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +18 -0
  51. package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +10 -0
  52. package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +18 -0
  53. package/src/Common/RJSF/templates/ButtonTemplates/index.ts +3 -0
  54. package/src/Common/RJSF/templates/Description.tsx +12 -0
  55. package/src/Common/RJSF/templates/Field.tsx +30 -0
  56. package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +25 -0
  57. package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +105 -0
  58. package/src/Common/RJSF/templates/TitleField.tsx +9 -0
  59. package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +51 -0
  60. package/src/Common/RJSF/templates/index.ts +10 -0
  61. package/src/Common/RJSF/types.ts +4 -0
  62. package/src/Common/RJSF/utils.ts +110 -0
  63. package/src/Common/RJSF/widgets/Checkbox.tsx +44 -0
  64. package/src/Common/RJSF/widgets/Select.tsx +77 -0
  65. package/src/Common/RJSF/widgets/index.ts +2 -0
  66. package/src/Common/Types.ts +0 -150
  67. package/src/Common/index.ts +1 -0
@@ -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, autoFocus, }: DebouncedSearchProps): JSX.Element;
15
+ export default function DebouncedSearch({ onSearch, Icon, children, placeholder, containerClass, iconClass, inputClass, debounceTimeout, clearSearch, showClearIcon, }: DebouncedSearchProps): JSX.Element;
@@ -10,5 +10,4 @@ export interface DebouncedSearchProps {
10
10
  debounceTimeout?: number;
11
11
  clearSearch?: boolean;
12
12
  showClearIcon?: boolean;
13
- autoFocus?: boolean;
14
13
  }
@@ -9,7 +9,6 @@ export interface DeleteDialogProps {
9
9
  apiCallInProgress?: boolean;
10
10
  dataTestId?: string;
11
11
  buttonPrimaryText?: string;
12
- shouldStopPropagation?: boolean;
13
12
  }
14
13
  export interface ForceDeleteDialogType {
15
14
  onClickDelete: () => void;
@@ -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,4 @@
1
+ /// <reference types="react" />
2
+ import { FormProps } from './types';
3
+ import './rjsfForm.scss';
4
+ export declare const RJSFForm: (props: FormProps) => JSX.Element;
@@ -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,8 @@
1
+ import { FieldTemplateProps } from '@rjsf/utils';
2
+ export interface FieldRowProps extends Pick<FieldTemplateProps, 'children' | 'label' | 'required' | 'id'> {
3
+ showLabel?: boolean;
4
+ /**
5
+ * @default true
6
+ */
7
+ shouldAlignCenter?: boolean;
8
+ }
@@ -0,0 +1,4 @@
1
+ import { RegistryWidgetsType } from '@rjsf/utils';
2
+ import { FormProps } from './types';
3
+ export declare const widgets: RegistryWidgetsType;
4
+ export declare const templates: FormProps['templates'];
@@ -0,0 +1,7 @@
1
+ export declare const PLACEHOLDERS: {
2
+ SELECT: string;
3
+ INPUT: string;
4
+ OBJECT_KEY: string;
5
+ };
6
+ export declare const DEFAULT_FIELD_TITLE = "Key not available";
7
+ export declare const DO_NOT_SHOW_LABEL: unique symbol;
@@ -0,0 +1,3 @@
1
+ export { RJSFForm } from './Form';
2
+ export * from './types';
3
+ export { getInferredTypeFromValueType, getRedirectionProps } from './utils';
@@ -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 { BaseInputTemplateProps } from '@rjsf/utils';
3
+ export declare const BaseInput: ({ placeholder, ...props }: BaseInputTemplateProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IconButtonProps } from '@rjsf/utils';
3
+ export declare const AddButton: ({ icon, iconType, registry, uiSchema, ...props }: IconButtonProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IconButtonProps } from '@rjsf/utils';
3
+ export declare const RemoveButton: ({ icon, iconType, registry, uiSchema, ...props }: IconButtonProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { SubmitButtonProps } from '@rjsf/utils';
3
+ export declare const SubmitButton: ({ uiSchema }: SubmitButtonProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { AddButton } from './AddButton';
2
+ export { RemoveButton } from './RemoveButton';
3
+ export { SubmitButton } from './SubmitButton';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DescriptionFieldProps } from '@rjsf/utils';
3
+ export declare const Description: ({ id, description }: DescriptionFieldProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FieldTemplateProps } from '@rjsf/utils';
3
+ export declare const Field: (props: FieldTemplateProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FieldErrorProps } from '@rjsf/utils';
3
+ export declare const FieldErrorTemplate: ({ errors, idSchema }: FieldErrorProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ObjectFieldTemplateProps } from '@rjsf/utils';
3
+ export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TitleFieldProps } from '@rjsf/utils';
3
+ export declare const TitleField: ({ id, title, required }: TitleFieldProps) => 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,3 @@
1
+ import { ComponentProps } from 'react';
2
+ import RJSFForm from '@rjsf/core';
3
+ export type FormProps = Omit<ComponentProps<typeof RJSFForm>, 'validator'>;
@@ -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";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { WidgetProps } from '@rjsf/utils';
3
+ export declare const Checkbox: ({ id, onChange, value, required, disabled, readonly, autofocus, onBlur, onFocus, }: WidgetProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { WidgetProps } from '@rjsf/utils';
3
+ export declare const Select: (props: WidgetProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Checkbox as CheckboxWidget } from './Checkbox';
2
+ export { Select as SelectWidget } from './Select';
@@ -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;
@@ -322,7 +320,6 @@ export interface CommonNodeAttr {
322
320
  };
323
321
  appReleaseTagNames?: string[];
324
322
  tagsEditable?: boolean;
325
- isGitRequired?: boolean;
326
323
  }
327
324
  export declare enum DeploymentAppTypes {
328
325
  HELM = "helm",
@@ -430,138 +427,4 @@ export interface AsyncState<T> {
430
427
  export interface AsyncOptions {
431
428
  resetOnChange: boolean;
432
429
  }
433
- export interface AppEnvironment {
434
- environmentId: number;
435
- environmentName: string;
436
- appMetrics: boolean;
437
- infraMetrics: boolean;
438
- prod: boolean;
439
- chartRefId?: number;
440
- lastDeployed?: string;
441
- lastDeployedBy?: string;
442
- lastDeployedImage?: string;
443
- appStatus?: string;
444
- deploymentAppDeleteRequest?: boolean;
445
- isVirtualEnvironment?: boolean;
446
- isProtected?: boolean;
447
- pipelineId?: number;
448
- latestCdWorkflowRunnerId?: number;
449
- }
450
- export interface Strategy {
451
- deploymentTemplate: string;
452
- config: any;
453
- default?: boolean;
454
- }
455
- export interface CDStage {
456
- status: string;
457
- name: string;
458
- triggerType: 'AUTOMATIC' | 'MANUAL';
459
- config: string;
460
- }
461
- export interface CDStageConfigMapSecretNames {
462
- configMaps: any[];
463
- secrets: any[];
464
- }
465
- export interface PrePostDeployStageType {
466
- isValid: boolean;
467
- steps: TaskErrorObj[];
468
- triggerType: string;
469
- name: string;
470
- status: string;
471
- }
472
- export interface CdPipeline {
473
- id: number;
474
- environmentId: number;
475
- environmentName?: string;
476
- description?: string;
477
- ciPipelineId: number;
478
- triggerType: 'AUTOMATIC' | 'MANUAL';
479
- name: string;
480
- strategies?: Strategy[];
481
- namespace?: string;
482
- appWorkflowId?: number;
483
- deploymentTemplate?: string;
484
- preStage?: CDStage;
485
- postStage?: CDStage;
486
- preStageConfigMapSecretNames?: CDStageConfigMapSecretNames;
487
- postStageConfigMapSecretNames?: CDStageConfigMapSecretNames;
488
- runPreStageInEnv?: boolean;
489
- runPostStageInEnv?: boolean;
490
- isClusterCdActive?: boolean;
491
- parentPipelineId?: number;
492
- parentPipelineType?: string;
493
- deploymentAppDeleteRequest?: boolean;
494
- deploymentAppCreated?: boolean;
495
- userApprovalConfig?: UserApprovalConfigType;
496
- isVirtualEnvironment?: boolean;
497
- deploymentAppType: DeploymentAppTypes;
498
- helmPackageName?: string;
499
- preDeployStage?: PrePostDeployStageType;
500
- postDeployStage?: PrePostDeployStageType;
501
- isProdEnv?: boolean;
502
- }
503
- export interface ExternalCiConfig {
504
- id: number;
505
- webhookUrl: string;
506
- payload: string;
507
- accessKey: string;
508
- }
509
- export interface Source {
510
- type: string;
511
- value?: string;
512
- regex?: string;
513
- }
514
- export interface CiMaterial {
515
- source: Source;
516
- gitMaterialId: number;
517
- id: number;
518
- gitMaterialName: string;
519
- isRegex?: boolean;
520
- }
521
- export interface Task {
522
- name?: string;
523
- type?: string;
524
- cmd?: string;
525
- args?: Array<string>;
526
- }
527
- export interface CiScript {
528
- id: number;
529
- index: number;
530
- name: string;
531
- script: string;
532
- outputLocation?: string;
533
- }
534
- export interface CiPipeline {
535
- isManual: boolean;
536
- dockerArgs?: Map<string, string>;
537
- isExternal: boolean;
538
- parentCiPipeline: number;
539
- parentAppId: number;
540
- externalCiConfig: ExternalCiConfig;
541
- ciMaterial?: CiMaterial[];
542
- name?: string;
543
- id?: number;
544
- active?: boolean;
545
- linkedCount: number;
546
- scanEnabled: boolean;
547
- deleted?: boolean;
548
- version?: string;
549
- beforeDockerBuild?: Array<Task>;
550
- afterDockerBuild?: Array<Task>;
551
- appWorkflowId?: number;
552
- beforeDockerBuildScripts?: Array<CiScript>;
553
- afterDockerBuildScripts?: Array<CiScript>;
554
- isDockerConfigOverridden?: boolean;
555
- dockerConfigOverride?: DockerConfigOverrideType;
556
- appName?: string;
557
- appId?: string;
558
- componentId?: number;
559
- isCITriggerBlocked?: boolean;
560
- ciBlockState?: {
561
- action: any;
562
- metadataField: string;
563
- };
564
- isOffendingMandatoryPlugin?: boolean;
565
- pipelineType?: string;
566
- }
567
430
  export {};
@@ -40,3 +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 './RJSF';