hplx-feature-library 1.0.60 → 1.0.62
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/Attachments/Attachments.d.ts +25 -0
- package/dist/Attachments/components/AttachmentPreviewPopup.d.ts +2 -0
- package/dist/Attachments/components/ImagePreview.d.ts +4 -0
- package/dist/Attachments/components/VideoPreview.d.ts +4 -0
- package/dist/Attachments/components/attachments-header.d.ts +11 -0
- package/dist/Attachments/components/compare-mode-bar.d.ts +3 -0
- package/dist/Attachments/components/document-canvas/KonvaDrawingCanvas.d.ts +7 -0
- package/dist/Attachments/components/document-canvas/document-color-options.d.ts +2 -0
- package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +2 -0
- package/dist/Attachments/components/document-canvas/document-tool-shape.d.ts +2 -0
- package/dist/Attachments/components/document-canvas/index.d.ts +7 -0
- package/dist/Attachments/components/document-compare/document-compare-header.d.ts +7 -0
- package/dist/Attachments/components/document-compare/document-compare-images.d.ts +5 -0
- package/dist/Attachments/components/document-compare/index.d.ts +2 -0
- package/dist/Attachments/components/document-container.d.ts +10 -0
- package/dist/Attachments/components/document-image-view.d.ts +7 -0
- package/dist/Attachments/components/document-preview/document-image-pane.d.ts +8 -0
- package/dist/Attachments/components/document-preview/index.d.ts +2 -0
- package/dist/Attachments/components/document-preview/preview-side-pane.d.ts +10 -0
- package/dist/Attachments/components/document-view/document-view-grid.d.ts +10 -0
- package/dist/Attachments/components/document-view/documet-view-date.d.ts +10 -0
- package/dist/Attachments/components/drag-drop-container.d.ts +9 -0
- package/dist/Attachments/components/drag-drop-overlay.d.ts +6 -0
- package/dist/Attachments/components/edit-document-modal.d.ts +9 -0
- package/dist/Attachments/components/more-dropdown.d.ts +10 -0
- package/dist/Attachments/constants/index.d.ts +15 -0
- package/dist/Attachments/context/index.d.ts +3 -0
- package/dist/Attachments/hooks/useAttachmentContext.d.ts +2 -0
- package/dist/Attachments/hooks/useCompareContext.d.ts +2 -0
- package/dist/Attachments/hooks/useDragAndDrop.d.ts +16 -0
- package/dist/Attachments/hooks/useDropdownPosition.d.ts +15 -0
- package/dist/Attachments/index.d.ts +1 -0
- package/dist/Attachments/index.js +24959 -0
- package/dist/Attachments/store/document-store.d.ts +19 -0
- package/dist/Attachments/store/pen-tools.store.d.ts +14 -0
- package/dist/Attachments/utils/fileValidation.d.ts +15 -0
- package/dist/Attachments/utils/index.d.ts +4 -0
- package/dist/CameraCapture/index.d.ts +7 -0
- package/dist/CameraCapture/utils/index.d.ts +2 -0
- package/dist/CustomDropdown-D9OCNP2e.js +1351 -0
- package/dist/CustomDropdown-DC-Kvy1B.cjs +40 -0
- package/dist/PediatricsCalculator/index.js +52 -51
- package/dist/common/components/CustomLoader/index.d.ts +2 -0
- package/dist/common/components/HxSvgIcons/index.d.ts +9 -0
- package/dist/common/components/ReusableModal/ReusableModal.d.ts +13 -0
- package/dist/common/hooks/useInfiniteScroll.d.ts +7 -0
- package/dist/constants/AttachmentConstants/index.js +35 -0
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index-B1oZkAWG.cjs +84 -0
- package/dist/index-BCqhiZf4.js +6672 -0
- package/dist/index.js +1 -1
- package/dist/types/AttachmentTypes/index.js +9 -0
- package/dist/types/AttachmentsTypes.d.ts +119 -0
- package/package.json +30 -6
- package/dist/CustomDropdown-C_Z0fEsd.cjs +0 -124
- package/dist/CustomDropdown-Di-tVTdd.js +0 -10640
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { E_ATTACHMENT_QUERY_TYPE, E_DOCUMENT_TYPE, I_DOCUMENT, I_DOCUMENT_GROUP, I_DOCUMENTS_BASE_RESPONSE, I_DOCUMENTS_DELETE_RESPONSE, I_FETCH_DOCUMENTS_RESPONSE, I_UPDATE_DOCUMENT_RESPONSE, I_UPLOAD_FILES_REQUEST, I_UPLOAD_FILES_RESPONSE, IDOCUMENT_DataItem } from '../types/AttachmentsTypes';
|
|
3
|
+
export type TDateState = {
|
|
4
|
+
startDate: string | null;
|
|
5
|
+
endDate: string | null;
|
|
6
|
+
};
|
|
7
|
+
interface AttachmentsProps {
|
|
8
|
+
parentRef: RefObject<HTMLDivElement>;
|
|
9
|
+
fetchAttachments: (page: number, search: string, types: E_DOCUMENT_TYPE[], limit: number, query_type: E_ATTACHMENT_QUERY_TYPE, date: TDateState, next_date: string) => Promise<I_FETCH_DOCUMENTS_RESPONSE>;
|
|
10
|
+
uploadFiles: (request: I_UPLOAD_FILES_REQUEST) => Promise<I_UPLOAD_FILES_RESPONSE>;
|
|
11
|
+
onDocumentPreview: (document: IDOCUMENT_DataItem) => void;
|
|
12
|
+
onDocumentDownload: (document: I_DOCUMENT) => void;
|
|
13
|
+
onDocumentUpdate: (document: unknown) => Promise<I_UPDATE_DOCUMENT_RESPONSE>;
|
|
14
|
+
setError?: (error: string) => void;
|
|
15
|
+
showHeaderBackButton?: boolean;
|
|
16
|
+
patient_id?: string;
|
|
17
|
+
patient_role_id?: string;
|
|
18
|
+
doctor_id?: string;
|
|
19
|
+
doctor_role_id?: string;
|
|
20
|
+
branch_id?: string;
|
|
21
|
+
onDeleteAttachments: (id: string, isGroup: boolean) => Promise<I_DOCUMENTS_DELETE_RESPONSE>;
|
|
22
|
+
onSaveComparision: (id: string, label: string, documents: string[]) => Promise<I_DOCUMENTS_BASE_RESPONSE<I_DOCUMENT_GROUP>>;
|
|
23
|
+
}
|
|
24
|
+
declare function Attachments(props: AttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default Attachments;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
interface AttachmentsHeaderProps {
|
|
3
|
+
showBackButton?: boolean;
|
|
4
|
+
onFileUpload: (files: File[]) => Promise<void>;
|
|
5
|
+
setNextDate: (date: string) => void;
|
|
6
|
+
onCaptureClick: () => void;
|
|
7
|
+
isUploading: boolean;
|
|
8
|
+
setIsUploading: Dispatch<SetStateAction<boolean>>;
|
|
9
|
+
}
|
|
10
|
+
declare function AttachmentsHeader({ showBackButton, onFileUpload, setNextDate, onCaptureClick, isUploading, setIsUploading, }: AttachmentsHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default AttachmentsHeader;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
interface DocumentCompareHeaderProps {
|
|
3
|
+
setHeaderHeight: Dispatch<SetStateAction<number>>;
|
|
4
|
+
isPreview?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function DocumentCompareHeader(props: DocumentCompareHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default DocumentCompareHeader;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I_DOCUMENT, I_DOCUMENT_GROUP, IDOCUMENT_DataItem } from '../../types/AttachmentsTypes';
|
|
2
|
+
interface DocumentContainerProps {
|
|
3
|
+
document: I_DOCUMENT | I_DOCUMENT_GROUP;
|
|
4
|
+
onEdit: (document: IDOCUMENT_DataItem) => void;
|
|
5
|
+
onPreview: (document: IDOCUMENT_DataItem) => void;
|
|
6
|
+
onDownload: (document: I_DOCUMENT) => void;
|
|
7
|
+
}
|
|
8
|
+
declare function DocumentContainer(props: DocumentContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: import('react').MemoExoticComponent<typeof DocumentContainer>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IDOCUMENT_DataItem } from '../../types/AttachmentsTypes';
|
|
2
|
+
export interface DocumentImageViewProps {
|
|
3
|
+
documents: IDOCUMENT_DataItem;
|
|
4
|
+
}
|
|
5
|
+
declare function DocumentImageView(props: DocumentImageViewProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const _default: import('react').MemoExoticComponent<typeof DocumentImageView>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { I_DOCUMENT } from '../../../types/AttachmentsTypes';
|
|
2
|
+
interface DocumentImagePaneProps {
|
|
3
|
+
selectedIndex: number;
|
|
4
|
+
documentPreview: I_DOCUMENT[];
|
|
5
|
+
handleImageChange: (action: 'next' | 'prev') => void;
|
|
6
|
+
}
|
|
7
|
+
declare function DocumentImagePane(props: DocumentImagePaneProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default DocumentImagePane;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React, Dispatch } from 'react';
|
|
2
|
+
import { I_DOCUMENT } from '../../../types/AttachmentsTypes';
|
|
3
|
+
interface PreviewSidePaneProps {
|
|
4
|
+
selectedIndex: number;
|
|
5
|
+
selectedPreview: I_DOCUMENT[];
|
|
6
|
+
setSelectedIndex: Dispatch<React.SetStateAction<number>>;
|
|
7
|
+
}
|
|
8
|
+
declare function PreviewSidePane(props: PreviewSidePaneProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: React.MemoExoticComponent<typeof PreviewSidePane>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I_DOCUMENT, IDOCUMENT_DataItem } from '../../../types/AttachmentsTypes';
|
|
2
|
+
interface DocumentGridViewProps {
|
|
3
|
+
onFileUpload: (files: File[]) => Promise<void>;
|
|
4
|
+
onEdit: (document: IDOCUMENT_DataItem) => void;
|
|
5
|
+
onPreview: (document: IDOCUMENT_DataItem) => void;
|
|
6
|
+
onDownload: (document: I_DOCUMENT) => void;
|
|
7
|
+
}
|
|
8
|
+
declare function DocumentGridView({ onFileUpload, onEdit, onPreview, onDownload }: DocumentGridViewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: import('react').MemoExoticComponent<typeof DocumentGridView>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I_DOCUMENT, IDOCUMENT_DataItem } from '../../../types/AttachmentsTypes';
|
|
2
|
+
interface DocumentDateViewProps {
|
|
3
|
+
onFileUpload: (files: File[]) => Promise<void>;
|
|
4
|
+
onEdit: (document: IDOCUMENT_DataItem) => void;
|
|
5
|
+
onPreview: (document: IDOCUMENT_DataItem) => void;
|
|
6
|
+
onDownload: (document: I_DOCUMENT) => void;
|
|
7
|
+
}
|
|
8
|
+
declare function DocumentDateView({ onFileUpload, onEdit, onPreview, onDownload }: DocumentDateViewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: import('react').MemoExoticComponent<typeof DocumentDateView>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface DragDropContainerProps {
|
|
3
|
+
onFileUpload: (files: File[]) => Promise<void>;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function DragDropContainer({ onFileUpload, children, className, disabled }: DragDropContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default DragDropContainer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDOCUMENT_DataItem } from '../../types/AttachmentsTypes';
|
|
2
|
+
interface EditDocumentModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
document: IDOCUMENT_DataItem | null;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSave: (payload: unknown) => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
declare function EditDocumentModal({ isOpen, document, onClose, onSave }: EditDocumentModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default EditDocumentModal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface MoreDropdownProps {
|
|
3
|
+
dropdownRef: RefObject<HTMLDivElement>;
|
|
4
|
+
position: 'top' | 'bottom';
|
|
5
|
+
onEdit: () => void;
|
|
6
|
+
onPreview: () => void;
|
|
7
|
+
onDelete: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare function MoreDropdown({ dropdownRef, position, onEdit, onPreview, onDelete }: MoreDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default MoreDropdown;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const C_COMPARE_BUTTONS: {
|
|
2
|
+
COMPARE: string;
|
|
3
|
+
PREVIEW: string;
|
|
4
|
+
CLEAR_ALL: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const C_DOCUMENT_COMPARE_HEADER: {
|
|
7
|
+
TITLE: string;
|
|
8
|
+
SAVE_GROUP: string;
|
|
9
|
+
CLOSE_BUTTON: string;
|
|
10
|
+
EDIT_GROUP: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const C_DOCUMENT_PREVIEW_HEADER: {
|
|
13
|
+
TITLE: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const C_PEN_TOOL_COLORS: string[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { I_ATTACHMENTS_CONTEXT, I_DOCUMENT_COMPARE_CONTEXT } from '../../types/AttachmentsTypes';
|
|
2
|
+
export declare const AttachmentsContext: import('react').Context<I_ATTACHMENTS_CONTEXT | undefined>;
|
|
3
|
+
export declare const CompareContext: import('react').Context<I_DOCUMENT_COMPARE_CONTEXT | undefined>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DragEvent } from 'react';
|
|
2
|
+
interface UseDragAndDropProps {
|
|
3
|
+
onFileUpload: (files: File[]) => Promise<void>;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const useDragAndDrop: ({ onFileUpload, disabled }: UseDragAndDropProps) => {
|
|
7
|
+
isDragOver: boolean;
|
|
8
|
+
isUploading: boolean;
|
|
9
|
+
dragHandlers: {
|
|
10
|
+
onDragOver: (e: DragEvent<HTMLDivElement>) => void;
|
|
11
|
+
onDragLeave: (e: DragEvent<HTMLDivElement>) => void;
|
|
12
|
+
onDrop: (e: DragEvent<HTMLDivElement>) => Promise<void>;
|
|
13
|
+
onDragEnter: (e: DragEvent<HTMLDivElement>) => void;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A custom hook to manage the state and positioning of a dropdown menu.
|
|
4
|
+
* It dynamically calculates whether the dropdown should appear above or below
|
|
5
|
+
* its trigger element and handles closing on outside clicks or page scroll.
|
|
6
|
+
*
|
|
7
|
+
* @param triggerRef - A React ref attached to the element that triggers the dropdown.
|
|
8
|
+
* @returns An object containing state and handlers for the dropdown.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useDropdownPosition: (triggerRef: RefObject<HTMLElement>) => {
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
position: "bottom" | "top";
|
|
13
|
+
dropdownRef: RefObject<HTMLDivElement>;
|
|
14
|
+
toggleDropdown: () => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Attachments';
|