@bahmni/widgets 0.0.1-dev.171 → 0.0.1-dev.173

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/index.d.ts CHANGED
@@ -17,5 +17,6 @@ export { usePatientUUID } from './hooks/usePatientUUID';
17
17
  export { useUserPrivilege } from './userPrivileges/useUserPrivilege';
18
18
  export { UserPrivilegeProvider } from './userPrivileges/UserPrivilegeProvider';
19
19
  export { ActivePractitionerProvider, useActivePractitioner, ActivePractitionerContext, type ActivePractitionerContextType, } from './activePractitioner';
20
+ export { createConfigProvider, createConfigHook } from './configProvider';
20
21
  export { registerWidget, getWidget, getWidgetConfig, hasWidget, getAllWidgetTypes, getAllWidgetConfigs, resetWidgetRegistry, type WidgetConfig, } from './registry';
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM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,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAG/E,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,6BAA6B,GACnC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAG1E,OAAO,EACL,cAAc,EACd,SAAS,EACT,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as t, Y as s, A as o, D as r, F as n, G as g, K as l, J as c, M as d, T as P, U as v, z as T, O as b, Q as A, I as W, R as p, S as f, X as m, V as u, a6 as R, a5 as C, a2 as D, a3 as I, a4 as S, a1 as U, a7 as y, Z as h, a as N, u as x, W as F } from "./index-BBA52eg6.js";
1
+ import { a0 as t, W as s, A as o, p as r, q as n, D as g, z as l, w as c, r as d, I as v, J as P, n as b, E as T, F as f, v as p, R as A, y as W, U as C, V as m, a2 as u, a1 as R, a8 as y, a7 as D, a4 as I, a5 as U, a6 as S, a3 as h, a9 as N, X as q, a as w, u as x, Q as F } from "./index-qhCmLUh7.js";
2
2
  import "react";
3
3
  export {
4
4
  t as ActivePractitionerContext,
@@ -10,25 +10,27 @@ export {
10
10
  l as GenericServiceRequestTable,
11
11
  c as LabInvestigation,
12
12
  d as MedicationsTable,
13
- P as NotificationProvider,
14
- v as NotificationServiceComponent,
15
- T as PatientDetails,
16
- b as PatientProgramsTable,
17
- A as ProgramDetails,
18
- W as RadiologyInvestigationReport,
19
- p as RadiologyInvestigationTable,
20
- f as SearchPatient,
21
- m as UserPrivilegeProvider,
22
- u as VitalFlowSheet,
23
- R as getAllWidgetConfigs,
24
- C as getAllWidgetTypes,
25
- D as getWidget,
26
- I as getWidgetConfig,
13
+ v as NotificationProvider,
14
+ P as NotificationServiceComponent,
15
+ b as PatientDetails,
16
+ T as PatientProgramsTable,
17
+ f as ProgramDetails,
18
+ p as RadiologyInvestigationReport,
19
+ A as RadiologyInvestigationTable,
20
+ W as SearchPatient,
21
+ C as UserPrivilegeProvider,
22
+ m as VitalFlowSheet,
23
+ u as createConfigHook,
24
+ R as createConfigProvider,
25
+ y as getAllWidgetConfigs,
26
+ D as getAllWidgetTypes,
27
+ I as getWidget,
28
+ U as getWidgetConfig,
27
29
  S as hasWidget,
28
- U as registerWidget,
29
- y as resetWidgetRegistry,
30
- h as useActivePractitioner,
31
- N as useNotification,
30
+ h as registerWidget,
31
+ N as resetWidgetRegistry,
32
+ q as useActivePractitioner,
33
+ w as useNotification,
32
34
  x as usePatientUUID,
33
35
  F as useUserPrivilege
34
36
  };
@@ -1,9 +1,13 @@
1
- import { PatientSearchResultBundle } from '@bahmni/services';
1
+ import { AppointmentSearchField, PatientSearchField, PatientSearchResultBundle } from '@bahmni/services';
2
2
  interface SearchPatientProps {
3
3
  buttonTitle: string;
4
4
  searchBarPlaceholder: string;
5
+ patientSearch?: {
6
+ customAttributes: PatientSearchField[];
7
+ appointment: AppointmentSearchField[];
8
+ };
5
9
  onSearch: (data: PatientSearchResultBundle | undefined, searchTerm: string, isLoading: boolean, isError: boolean, isAdvancedSearch: boolean, selectedFieldType?: string) => void;
6
10
  }
7
- declare const SearchPatient: React.FC<SearchPatientProps>;
11
+ declare const SearchPatient: ({ buttonTitle, searchBarPlaceholder, patientSearch, onSearch, }: SearchPatientProps) => import("react/jsx-runtime").JSX.Element;
8
12
  export default SearchPatient;
9
13
  //# sourceMappingURL=SearchPatient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchPatient.d.ts","sourceRoot":"","sources":["../../src/searchPatient/SearchPatient.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EAI1B,MAAM,kBAAkB,CAAC;AAQ1B,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,CACR,IAAI,EAAE,yBAAyB,GAAG,SAAS,EAC3C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,OAAO,EACzB,iBAAiB,CAAC,EAAE,MAAM,KACvB,IAAI,CAAC;CACX;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgW/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"SearchPatient.d.ts","sourceRoot":"","sources":["../../src/searchPatient/SearchPatient.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EAE1B,MAAM,kBAAkB,CAAC;AAQ1B,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE;QACd,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;QACvC,WAAW,EAAE,sBAAsB,EAAE,CAAC;KACvC,CAAC;IACF,QAAQ,EAAE,CACR,IAAI,EAAE,yBAAyB,GAAG,SAAS,EAC3C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,OAAO,EACzB,iBAAiB,CAAC,EAAE,MAAM,KACvB,IAAI,CAAC;CACX;AAED,QAAA,MAAM,aAAa,GAAI,iEAKpB,kBAAkB,4CA+TpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { PatientSearchResult } from '@bahmni/services';
2
+ export declare const buttonTitle = "Search";
3
+ export declare const searchBarPlaceholder = "Search by name or patient ID";
4
+ export declare const mockPatient: PatientSearchResult;
5
+ export declare const mockSearchPatientData: PatientSearchResult[];
6
+ export declare const validPatientSearchConfig: {
7
+ customAttributes: ({
8
+ translationKey: string;
9
+ fields: string[];
10
+ columnTranslationKeys: string[];
11
+ type: "person";
12
+ } | {
13
+ translationKey: string;
14
+ fields: string[];
15
+ columnTranslationKeys: string[];
16
+ type: "address";
17
+ } | {
18
+ translationKey: string;
19
+ fields: string[];
20
+ columnTranslationKeys: string[];
21
+ type: "program";
22
+ })[];
23
+ appointment: never[];
24
+ };
25
+ //# sourceMappingURL=mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/searchPatient/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AAEnE,eAAO,MAAM,WAAW,EAAE,mBAqBzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,EAItD,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;CAuCpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.171",
3
+ "version": "0.0.1-dev.173",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",