@devtron-labs/devtron-fe-common-lib 0.0.26 → 0.0.28-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.
- package/dist/Common/DebouncedSearch/DebouncedSearch.d.ts +15 -0
- package/dist/Common/DebouncedSearch/Types.d.ts +13 -0
- package/dist/Common/DebouncedSearch/Utils.d.ts +1 -0
- package/dist/Common/Grid/Grid.d.ts +3 -0
- package/dist/Common/Grid/types.d.ts +10 -0
- package/dist/Common/Types.d.ts +6 -0
- package/dist/Common/index.d.ts +2 -0
- package/dist/index.js +212 -111
- package/package.json +1 -1
- package/src/Assets/Icon/ic-error-cross.svg +8 -0
- package/src/Common/Common.service.ts +6 -2
- package/src/Common/DebouncedSearch/DebouncedSearch.tsx +75 -0
- package/src/Common/DebouncedSearch/Types.ts +12 -0
- package/src/Common/DebouncedSearch/Utils.ts +19 -0
- package/src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx +61 -0
- package/src/Common/Grid/Grid.tsx +39 -0
- package/src/Common/Grid/types.ts +9 -0
- package/src/Common/Types.ts +6 -0
- package/src/Common/index.ts +3 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DebouncedSearchProps } from './Types';
|
|
3
|
+
/**
|
|
4
|
+
* @param onSearch - Callback function to be called on search
|
|
5
|
+
* @param Icon - (Optional) Icon to be shown before the input
|
|
6
|
+
* @param iconClass - (Optional) Class for the icon
|
|
7
|
+
* @param children - (Optional) In case we want to add another button or any other element
|
|
8
|
+
* @param placeholder - (Optional) Placeholder for the input
|
|
9
|
+
* @param containerClass - (Optional) Class for the container
|
|
10
|
+
* @param inputClass - (Optional) Class for the input field
|
|
11
|
+
* @param debounceTimeout - (Optional) Timeout for the debounce with default value of 500ms
|
|
12
|
+
* @param clearSearch - (Optional) To clear the search text
|
|
13
|
+
* @param showClearIcon - (Optional) To show the clear icon default value is true
|
|
14
|
+
*/
|
|
15
|
+
export default function DebouncedSearch({ onSearch, Icon, children, placeholder, containerClass, iconClass, inputClass, debounceTimeout, clearSearch, showClearIcon, }: DebouncedSearchProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DebouncedSearchProps {
|
|
3
|
+
onSearch: (query: string) => void;
|
|
4
|
+
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
inputClass?: string;
|
|
7
|
+
containerClass?: string;
|
|
8
|
+
iconClass?: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
debounceTimeout?: number;
|
|
11
|
+
clearSearch?: boolean;
|
|
12
|
+
showClearIcon?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDebouncedEffect(callback: any, delay: any, deps?: unknown[]): void;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -192,6 +192,11 @@ export interface UserApprovalMetadataType {
|
|
|
192
192
|
approvedUsersData: ApprovalUserDataType[];
|
|
193
193
|
requestedUserData: ApprovalUserDataType;
|
|
194
194
|
}
|
|
195
|
+
export declare enum FilterStates {
|
|
196
|
+
BLOCKED = 0,
|
|
197
|
+
ALLOWED = 1,
|
|
198
|
+
ERROR = 2
|
|
199
|
+
}
|
|
195
200
|
export interface CDMaterialType {
|
|
196
201
|
index: number;
|
|
197
202
|
id: string;
|
|
@@ -217,6 +222,7 @@ export interface CDMaterialType {
|
|
|
217
222
|
imageComment?: ImageComment;
|
|
218
223
|
imageReleaseTags?: ReleaseTag[];
|
|
219
224
|
artifactStatus?: string;
|
|
225
|
+
filterState: FilterStates;
|
|
220
226
|
}
|
|
221
227
|
export interface CommonNodeAttr {
|
|
222
228
|
connectingCiPipelineId?: number;
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -35,3 +35,5 @@ export { default as DeleteComponent } from './DeleteComponentModal/DeleteCompone
|
|
|
35
35
|
export * from './ImageTags';
|
|
36
36
|
export * from './ImageTags.Types';
|
|
37
37
|
export * from './ResizableTextarea';
|
|
38
|
+
export { default as DebouncedSearch } from './DebouncedSearch/DebouncedSearch';
|
|
39
|
+
export { default as Grid } from './Grid/Grid';
|