@bahmni/widgets 0.0.1-dev.170 → 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 { Y as t, W as s, w as o, x as r, z as n, D as g, G as l, F as P, M as c, O as d, Q as v, P as T, J as b, K as W, E as p, R as A, S as f, U as m, V as u, a4 as R, a3 as C, a0 as D, a1 as S, a2 as U, Z as y, a5 as I, X as h, n as x, u as N, T as w } from "./index-BGXPYdVf.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,
@@ -8,27 +8,29 @@ export {
8
8
  n as ConditionsTable,
9
9
  g as DiagnosesTable,
10
10
  l as GenericServiceRequestTable,
11
- P as LabInvestigation,
12
- c as MedicationsTable,
13
- d as NotificationProvider,
14
- v as NotificationServiceComponent,
15
- T as PatientDetails,
16
- b as PatientProgramsTable,
17
- W as ProgramDetails,
11
+ c as LabInvestigation,
12
+ d as MedicationsTable,
13
+ v as NotificationProvider,
14
+ P as NotificationServiceComponent,
15
+ b as PatientDetails,
16
+ T as PatientProgramsTable,
17
+ f as ProgramDetails,
18
18
  p as RadiologyInvestigationReport,
19
19
  A 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
- S as getWidgetConfig,
27
- U as hasWidget,
28
- y as registerWidget,
29
- I as resetWidgetRegistry,
30
- h as useActivePractitioner,
31
- x as useNotification,
32
- N as usePatientUUID,
33
- w as useUserPrivilege
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,
29
+ S as hasWidget,
30
+ h as registerWidget,
31
+ N as resetWidgetRegistry,
32
+ q as useActivePractitioner,
33
+ w as useNotification,
34
+ x as usePatientUUID,
35
+ F as useUserPrivilege
34
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"widgetMap.d.ts","sourceRoot":"","sources":["../../src/registry/widgetMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,cAAc,EAAE,YAAY,EAqDxC,CAAC"}
1
+ {"version":3,"file":"widgetMap.d.ts","sourceRoot":"","sources":["../../src/registry/widgetMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,cAAc,EAAE,YAAY,EAyDxC,CAAC"}
@@ -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,CAyV/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.170",
3
+ "version": "0.0.1-dev.173",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",