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.
Files changed (56) hide show
  1. package/dist/Attachments/Attachments.d.ts +25 -0
  2. package/dist/Attachments/components/AttachmentPreviewPopup.d.ts +2 -0
  3. package/dist/Attachments/components/ImagePreview.d.ts +4 -0
  4. package/dist/Attachments/components/VideoPreview.d.ts +4 -0
  5. package/dist/Attachments/components/attachments-header.d.ts +11 -0
  6. package/dist/Attachments/components/compare-mode-bar.d.ts +3 -0
  7. package/dist/Attachments/components/document-canvas/KonvaDrawingCanvas.d.ts +7 -0
  8. package/dist/Attachments/components/document-canvas/document-color-options.d.ts +2 -0
  9. package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +2 -0
  10. package/dist/Attachments/components/document-canvas/document-tool-shape.d.ts +2 -0
  11. package/dist/Attachments/components/document-canvas/index.d.ts +7 -0
  12. package/dist/Attachments/components/document-compare/document-compare-header.d.ts +7 -0
  13. package/dist/Attachments/components/document-compare/document-compare-images.d.ts +5 -0
  14. package/dist/Attachments/components/document-compare/index.d.ts +2 -0
  15. package/dist/Attachments/components/document-container.d.ts +10 -0
  16. package/dist/Attachments/components/document-image-view.d.ts +7 -0
  17. package/dist/Attachments/components/document-preview/document-image-pane.d.ts +8 -0
  18. package/dist/Attachments/components/document-preview/index.d.ts +2 -0
  19. package/dist/Attachments/components/document-preview/preview-side-pane.d.ts +10 -0
  20. package/dist/Attachments/components/document-view/document-view-grid.d.ts +10 -0
  21. package/dist/Attachments/components/document-view/documet-view-date.d.ts +10 -0
  22. package/dist/Attachments/components/drag-drop-container.d.ts +9 -0
  23. package/dist/Attachments/components/drag-drop-overlay.d.ts +6 -0
  24. package/dist/Attachments/components/edit-document-modal.d.ts +9 -0
  25. package/dist/Attachments/components/more-dropdown.d.ts +10 -0
  26. package/dist/Attachments/constants/index.d.ts +15 -0
  27. package/dist/Attachments/context/index.d.ts +3 -0
  28. package/dist/Attachments/hooks/useAttachmentContext.d.ts +2 -0
  29. package/dist/Attachments/hooks/useCompareContext.d.ts +2 -0
  30. package/dist/Attachments/hooks/useDragAndDrop.d.ts +16 -0
  31. package/dist/Attachments/hooks/useDropdownPosition.d.ts +15 -0
  32. package/dist/Attachments/index.d.ts +1 -0
  33. package/dist/Attachments/index.js +24959 -0
  34. package/dist/Attachments/store/document-store.d.ts +19 -0
  35. package/dist/Attachments/store/pen-tools.store.d.ts +14 -0
  36. package/dist/Attachments/utils/fileValidation.d.ts +15 -0
  37. package/dist/Attachments/utils/index.d.ts +4 -0
  38. package/dist/CameraCapture/index.d.ts +7 -0
  39. package/dist/CameraCapture/utils/index.d.ts +2 -0
  40. package/dist/CustomDropdown-D9OCNP2e.js +1351 -0
  41. package/dist/CustomDropdown-DC-Kvy1B.cjs +40 -0
  42. package/dist/PediatricsCalculator/index.js +52 -51
  43. package/dist/common/components/CustomLoader/index.d.ts +2 -0
  44. package/dist/common/components/HxSvgIcons/index.d.ts +9 -0
  45. package/dist/common/components/ReusableModal/ReusableModal.d.ts +13 -0
  46. package/dist/common/hooks/useInfiniteScroll.d.ts +7 -0
  47. package/dist/constants/AttachmentConstants/index.js +35 -0
  48. package/dist/hplx-feature-library.css +1 -1
  49. package/dist/index-B1oZkAWG.cjs +84 -0
  50. package/dist/index-BCqhiZf4.js +6672 -0
  51. package/dist/index.js +1 -1
  52. package/dist/types/AttachmentTypes/index.js +9 -0
  53. package/dist/types/AttachmentsTypes.d.ts +119 -0
  54. package/package.json +30 -6
  55. package/dist/CustomDropdown-C_Z0fEsd.cjs +0 -124
  56. package/dist/CustomDropdown-Di-tVTdd.js +0 -10640
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as t, C as p, T as r } from "./CustomDropdown-Di-tVTdd.js";
1
+ import { A as t, C as p, T as r } from "./CustomDropdown-D9OCNP2e.js";
2
2
  export {
3
3
  t as AlertPopup,
4
4
  p as CustomDropdown,
@@ -0,0 +1,9 @@
1
+ var I = /* @__PURE__ */ ((r) => (r.GRID_VIEW = "VIEW_BY_GRID", r.DATE_VIEW = "VIEW_BY_DATE", r))(I || {}), e = /* @__PURE__ */ ((r) => (r.LAB_TESTS = "LAB_TESTS", r.ECG = "ECG", r.MRI = "MRI", r.XRAY = "XRAY", r.ABHA = "ABHA", r.OTHERS = "OTHERS", r.REPORT_TYPE_UNSPECIFIED = "REPORT_TYPE_UNSPECIFIED", r))(e || {}), R = /* @__PURE__ */ ((r) => (r.PDF = "pdf", r.JPEG = "jpeg", r.PNG = "png", r.MP4 = "mp4", r))(R || {}), t = /* @__PURE__ */ ((r) => (r.IPD = "IPD", r.OPD = "OPD", r))(t || {}), n = /* @__PURE__ */ ((r) => (r.VIEW_DATE = "view by date", r.VIEW_GRID = "view by grid", r))(n || {}), v = /* @__PURE__ */ ((r) => (r.PEN = "pen", r.RECT = "rect", r.CIRCLE = "circle", r))(v || {});
2
+ export {
3
+ t as E_ATTACHMENTS_SOURCE,
4
+ n as E_ATTACHMENT_QUERY_TYPE,
5
+ v as E_CANVAS_TOOLS,
6
+ R as E_DOCUMENT_FORMAT,
7
+ e as E_DOCUMENT_TYPE,
8
+ I as E_DOCUMENT_VIEW_TYPE
9
+ };
@@ -0,0 +1,119 @@
1
+ import { TDateState } from '../Attachments/Attachments';
2
+ export declare enum E_DOCUMENT_VIEW_TYPE {
3
+ GRID_VIEW = "VIEW_BY_GRID",
4
+ DATE_VIEW = "VIEW_BY_DATE"
5
+ }
6
+ export declare enum E_DOCUMENT_TYPE {
7
+ LAB_TESTS = "LAB_TESTS",
8
+ ECG = "ECG",
9
+ MRI = "MRI",
10
+ XRAY = "XRAY",
11
+ ABHA = "ABHA",
12
+ OTHERS = "OTHERS",
13
+ REPORT_TYPE_UNSPECIFIED = "REPORT_TYPE_UNSPECIFIED"
14
+ }
15
+ export declare enum E_DOCUMENT_FORMAT {
16
+ PDF = "pdf",
17
+ JPEG = "jpeg",
18
+ PNG = "png",
19
+ MP4 = "mp4"
20
+ }
21
+ export declare enum E_ATTACHMENTS_SOURCE {
22
+ IPD = "IPD",
23
+ OPD = "OPD"
24
+ }
25
+ export interface I_DOCUMENT {
26
+ filePath: string;
27
+ label: string;
28
+ createdAt: string;
29
+ reportType: E_DOCUMENT_FORMAT;
30
+ id: string;
31
+ mimeType: E_DOCUMENT_FORMAT;
32
+ thumbnail?: string;
33
+ }
34
+ export interface I_DOCUMENT_GROUP {
35
+ id: string;
36
+ createdAt: string;
37
+ label: string;
38
+ documents: I_DOCUMENT[];
39
+ }
40
+ export type IDOCUMENT_DataItem = I_DOCUMENT_GROUP | I_DOCUMENT;
41
+ export interface I_DOCUMENTS_BASE_RESPONSE<T> {
42
+ data: T;
43
+ success: boolean;
44
+ message: string;
45
+ }
46
+ export interface I_DOCUMENTS_DELETE_RESPONSE {
47
+ success: boolean;
48
+ message: string;
49
+ }
50
+ export interface I_FETCH_DOCUMENTS_RESPONSE extends I_DOCUMENTS_BASE_RESPONSE<IDOCUMENT_DataItem[]> {
51
+ next_date?: string;
52
+ }
53
+ export interface I_ATTACHMENTS_CONTEXT {
54
+ search: string;
55
+ setSearch: React.Dispatch<React.SetStateAction<string>>;
56
+ types: E_DOCUMENT_TYPE[];
57
+ setTypes: React.Dispatch<React.SetStateAction<E_DOCUMENT_TYPE[]>>;
58
+ dates: TDateState;
59
+ setDates: React.Dispatch<React.SetStateAction<TDateState>>;
60
+ page: number;
61
+ setPage: React.Dispatch<React.SetStateAction<number>>;
62
+ hasData: boolean;
63
+ queryType: E_ATTACHMENT_QUERY_TYPE;
64
+ setQueryType: React.Dispatch<React.SetStateAction<E_ATTACHMENT_QUERY_TYPE>>;
65
+ showPreview: boolean;
66
+ setShowPreview: React.Dispatch<React.SetStateAction<boolean>>;
67
+ compareMode: boolean;
68
+ setCompareMode: React.Dispatch<React.SetStateAction<boolean>>;
69
+ parentRef: React.RefObject<HTMLDivElement>;
70
+ setHasData: React.Dispatch<React.SetStateAction<boolean>>;
71
+ onDeleteAttachments: (id: string, isGroup: boolean) => Promise<I_DOCUMENTS_DELETE_RESPONSE>;
72
+ onSaveComparision: (id: string, label: string, documents: string[]) => Promise<I_DOCUMENTS_BASE_RESPONSE<I_DOCUMENT_GROUP>>;
73
+ }
74
+ export interface IGroupedDocuments {
75
+ dateLabel: string;
76
+ documents: IDOCUMENT_DataItem[];
77
+ }
78
+ export declare enum E_ATTACHMENT_QUERY_TYPE {
79
+ VIEW_DATE = "view by date",
80
+ VIEW_GRID = "view by grid"
81
+ }
82
+ export interface I_UPLOAD_FILES_RESPONSE {
83
+ data?: IDOCUMENT_DataItem[];
84
+ success: boolean;
85
+ message: string;
86
+ }
87
+ export interface I_UPLOAD_FILES_REQUEST {
88
+ files: File[];
89
+ documentType?: E_DOCUMENT_TYPE;
90
+ }
91
+ export interface I_DOCUMENT_COMPARE_CONTEXT {
92
+ groupDocuments: I_DOCUMENT[];
93
+ setGroupDocuments: React.Dispatch<React.SetStateAction<I_DOCUMENT[]>>;
94
+ groupId?: string;
95
+ setGroupId: React.Dispatch<React.SetStateAction<string | undefined>>;
96
+ }
97
+ export declare enum E_CANVAS_TOOLS {
98
+ PEN = "pen",
99
+ RECT = "rect",
100
+ CIRCLE = "circle"
101
+ }
102
+ export interface I_UPDATE_DOCUMENT_REQUEST {
103
+ id: string;
104
+ label?: string;
105
+ type?: E_DOCUMENT_TYPE;
106
+ created_at?: string;
107
+ }
108
+ export interface I_UPDATE_DOCUMENT_RESPONSE {
109
+ data?: I_DOCUMENT;
110
+ success: boolean;
111
+ message: string;
112
+ }
113
+ export interface I_DELETE_FILE_RESPONSE {
114
+ success: boolean;
115
+ message: string;
116
+ }
117
+ export interface I_DELETE_FILE_REQUEST {
118
+ id: string;
119
+ }
package/package.json CHANGED
@@ -1,16 +1,24 @@
1
1
  {
2
2
  "name": "hplx-feature-library",
3
3
  "private": false,
4
- "version": "1.0.60",
4
+ "version": "1.0.62",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "vite",
7
+ "dev": "npm i hplx-react-elements-dev@qa && vite",
8
8
  "lint:fix": "eslint ./lib --quiet --fix",
9
9
  "lint:format": "eslint --fix",
10
10
  "lint": "eslint . --report-unused-disable-directives --max-warnings 0",
11
- "prebuild": "rm -rf dist",
11
+ "prebuild:qa": "npm i hplx-react-elements-dev@qa && rm -rf dist",
12
+ "prebuild:preprod": "npm i hplx-react-elements-dev@preprod && rm -rf dist",
13
+ "prebuild:preprod-blue": "npm i hplx-react-elements-dev@preprod-blue && rm -rf dist",
14
+ "prebuild:blue": "npm i hplx-react-elements-dev@blue && rm -rf dist",
15
+ "prebuild": "npm i hplx-react-elements-dev@latest && rm -rf dist",
12
16
  "prebuild:validate": "npm run lint",
13
- "build": "npm run prebuild:validate && tsc && vite build",
17
+ "build": "npm run prebuild && npm run prebuild:validate && tsc && vite build",
18
+ "build:qa": "npm run prebuild:qa && npm run prebuild:validate && tsc && vite build",
19
+ "build:preprod": "npm run prebuild:preprod && npm run prebuild:validate && tsc && vite build",
20
+ "build:preprod:blue": "npm run prebuild:preprod-blue && npm run prebuild:validate && tsc && vite build",
21
+ "build:blue": "npm run prebuild:blue && npm run prebuild:validate && tsc && vite build",
14
22
  "build:esm": "rm -rf dist/ && tsc && vite build",
15
23
  "format": "prettier --write ./lib",
16
24
  "preview": "vite preview",
@@ -42,16 +50,32 @@
42
50
  "./Constants/PediatricsCalculatorConstants": {
43
51
  "import": "./dist/constants/PediatricsCalculatorConstants/index.js",
44
52
  "types": "./dist/constants/PediatricsCalculatorConstants.d.ts"
53
+ },
54
+ "./Attachments": {
55
+ "import": "./dist/Attachments/index.js",
56
+ "types": "./dist/Attachments/index.d.ts"
57
+ },
58
+ "./Types/AttachmentTypes": {
59
+ "import": "./dist/types/AttachmentTypes/index.js",
60
+ "types": "./dist/types/AttachmentTypes.d.ts"
61
+ },
62
+ "./Constants/AttachmentConstants": {
63
+ "import": "./dist/constants/AttachmentConstants/index.js",
64
+ "types": "./dist/constants/AttachmentConstants.d.ts"
45
65
  }
46
66
  },
47
67
  "dependencies": {
68
+ "date-fns": "^4.1.0",
48
69
  "hplx-font-icons": "^2.20.0",
49
- "hplx-react-elements-dev": "1.3.54",
70
+ "hplx-react-elements-dev": "^1.3.74",
71
+ "konva": "^9.3.22",
50
72
  "lodash.debounce": "^4.0.8",
51
73
  "nanoid": "^5.1.5",
52
74
  "react": "^18.3.1",
53
75
  "react-dom": "^18.3.1",
54
- "react-modal": "^3.16.3"
76
+ "react-konva": "^18.2.12",
77
+ "swr": "^2.3.4",
78
+ "zustand": "^5.0.6"
55
79
  },
56
80
  "peerDependencies": {
57
81
  "hplx-font-icons": "^2.20.0",