@devtron-labs/devtron-fe-common-lib 1.0.4-beta-5 → 1.0.5-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.
@@ -3,9 +3,8 @@ import { default as ClipboardProps } from './types';
3
3
  * @param content - Content to be copied
4
4
  * @param copiedTippyText - Text to be shown in the tippy when the content is copied, default 'Copied!'
5
5
  * @param duration - Duration for which the tippy should be shown, default 1000
6
- * @param trigger - To trigger the copy action outside the button, if set to true the content will be copied, use case being triggering the copy action from outside the component
7
- * @param setTrigger - Callback function to set the trigger outside the button
6
+ * @param copyToClipboardPromise - the promise returned by copyToClipboard util function
8
7
  * @param rootClassName - additional classes to add to button
9
8
  * @param iconSize - size of svg icon to be shown, default 16 (icon-dim-16)
10
9
  */
11
- export default function ClipboardButton({ content, copiedTippyText, duration, trigger, setTrigger, rootClassName, iconSize, }: ClipboardProps): JSX.Element;
10
+ export default function ClipboardButton({ content, copiedTippyText, duration, copyToClipboardPromise, rootClassName, iconSize, }: ClipboardProps): JSX.Element;
@@ -2,8 +2,7 @@ export default interface ClipboardProps {
2
2
  content: string;
3
3
  copiedTippyText?: string;
4
4
  duration?: number;
5
- trigger?: boolean;
6
- setTrigger?: React.Dispatch<React.SetStateAction<boolean>>;
5
+ copyToClipboardPromise?: Promise<void>;
7
6
  rootClassName?: string;
8
7
  iconSize?: number;
9
8
  }
@@ -28,12 +28,11 @@ export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) =>
28
28
  export declare function useJsonYaml(value: any, tabSize?: number, language?: string, shouldRun?: boolean): any[];
29
29
  export declare function cleanKubeManifest(manifestJsonString: string): string;
30
30
  /**
31
- * It will copy the passed content to clipboard and invoke the callback function, in case of error it will show the toast message.
32
- * On HTTP system clipboard is not supported, so it will use the unsecureCopyToClipboard function
31
+ * This is a promise<void> that will resolve if str is successfully copied
32
+ * On HTTP (other than localhost) system clipboard is not supported, so it will use the unsecureCopyToClipboard function
33
33
  * @param str
34
- * @param callback
35
34
  */
36
- export declare function copyToClipboard(str: any, callback?: typeof noop): void;
35
+ export declare function copyToClipboard(str: string): Promise<void>;
37
36
  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[]];
38
37
  export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: any) => string;
39
38
  /**
@@ -1,3 +1,3 @@
1
1
  import { default as RJSF } from '@rjsf/core';
2
2
  import { FormProps } from './types';
3
- export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "name" | "disabled" | "target" | "tagName" | "autoComplete" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "method" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
3
+ export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "disabled" | "name" | "target" | "tagName" | "autoComplete" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "method" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
1
+ import { default as React, ReactNode, CSSProperties, ReactElement } from 'react';
2
2
  import { Placement } from 'tippy.js';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
@@ -25,11 +25,7 @@ export interface ResponseType<T = any> {
25
25
  }
26
26
  export interface APIOptions {
27
27
  timeout?: number;
28
- /**
29
- * @deprecated Use abortController instead
30
- */
31
28
  signal?: AbortSignal;
32
- abortControllerRef?: MutableRefObject<AbortController>;
33
29
  preventAutoLogout?: boolean;
34
30
  }
35
31
  export interface OptionType<T = string, K = string> {
@@ -640,7 +640,7 @@ interface CommonTabArgsType {
640
640
  isSelected: boolean;
641
641
  title?: string;
642
642
  isDeleted?: boolean;
643
- type: 'fixed' | 'dynamic';
643
+ position: number;
644
644
  iconPath?: string;
645
645
  dynamicTitle?: string;
646
646
  showNameOnSelect?: boolean;
@@ -658,34 +658,11 @@ interface CommonTabArgsType {
658
658
  value: string;
659
659
  }[];
660
660
  };
661
- /**
662
- * If true, the fixed tab remains mounted on initial load of the component
663
- *
664
- * Note: Not for dynamic tabs atm
665
- *
666
- * @default false
667
- */
668
- shouldRemainMounted?: boolean;
669
661
  }
670
- export type InitTabType = Omit<CommonTabArgsType, 'type'> & ({
671
- type: 'fixed';
672
- /**
673
- * Unique identifier for the fixed tab
674
- *
675
- * Note: Shouldn't contain '-'
676
- */
677
- id: string;
678
- idPrefix?: never;
679
- } | {
680
- type: 'dynamic';
681
- id?: never;
662
+ export interface InitTabType extends CommonTabArgsType {
682
663
  idPrefix: string;
683
- });
664
+ }
684
665
  export interface DynamicTabType extends CommonTabArgsType {
685
666
  id: string;
686
- /**
687
- * Id of the last active tab before switching to current tab
688
- */
689
- lastActiveTabId: string | null;
690
667
  }
691
668
  export {};
@@ -1,7 +1,7 @@
1
1
  var Fe = Object.defineProperty;
2
2
  var Le = (e, n, i) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => Le(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as je } from "./index-CvyOfGCo.js";
4
+ import { m as je } from "./index-C9ugar21.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as f } from "./index-CvyOfGCo.js";
1
+ import { m as f } from "./index-C9ugar21.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-CvyOfGCo.js";
1
+ import { m as l } from "./index-C9ugar21.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-CvyOfGCo.js";
1
+ import { m as s } from "./index-C9ugar21.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var Be = Object.defineProperty;
2
2
  var $e = (e, n, i) => n in e ? Be(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => $e(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as qe } from "./index-CvyOfGCo.js";
4
+ import { m as qe } from "./index-C9ugar21.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)