@bahmni/registration-app 0.0.1-dev.171 → 0.0.1-dev.174

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 (43) hide show
  1. package/dist/{DocumentsTable-TPfrZJSk-CnPlwf3u.js → DocumentsTable-DV_nkz4--BGsIQv3U.js} +1 -1
  2. package/dist/{FormsTable-BSKlMAJe-BWz6Ww8f.js → FormsTable-DL_zg0dG-Dtzz6_q4.js} +97 -97
  3. package/dist/{LNWAZHJI-DYHV_n8s.js → LNWAZHJI-hJhqylVc.js} +5 -5
  4. package/dist/{MWZ6AO7Z-DgMjJOza.js → MWZ6AO7Z-Bh8B_EOv.js} +7 -7
  5. package/dist/{Observations-Diygv8o5-VWfyxp1Z.js → Observations-c94Dp42v-gtJn7WfV.js} +52 -52
  6. package/dist/{YPM2AS64-Dyj543hX.js → YPM2AS64-COjNsPdl.js} +181 -181
  7. package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts.map +1 -1
  8. package/dist/components/forms/contactInfo/ContactInfo.d.ts.map +1 -1
  9. package/dist/components/forms/profile/Profile.d.ts.map +1 -1
  10. package/dist/components/registrationActions/RegistrationActions.d.ts.map +1 -1
  11. package/dist/constants/app.d.ts +1 -0
  12. package/dist/constants/app.d.ts.map +1 -1
  13. package/dist/hooks/useAddressFieldsWithConfig.d.ts.map +1 -1
  14. package/dist/hooks/useFilteredExtensions.d.ts +1 -1
  15. package/dist/hooks/useFilteredExtensions.d.ts.map +1 -1
  16. package/dist/{index-Qc9d1D1J.js → index-DAYe3WiF.js} +33612 -33605
  17. package/dist/index.css +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/locales/locale_en.json +3 -0
  20. package/dist/locales/locale_es.json +2 -0
  21. package/dist/pages/patientSearchPage/index.d.ts.map +1 -1
  22. package/dist/providers/registrationConfig/constants.d.ts +2 -0
  23. package/dist/providers/registrationConfig/constants.d.ts.map +1 -0
  24. package/dist/providers/registrationConfig/context.d.ts +3 -0
  25. package/dist/providers/registrationConfig/context.d.ts.map +1 -0
  26. package/dist/providers/registrationConfig/hook.d.ts +3 -0
  27. package/dist/providers/registrationConfig/hook.d.ts.map +1 -0
  28. package/dist/providers/registrationConfig/index.d.ts +5 -0
  29. package/dist/providers/registrationConfig/index.d.ts.map +1 -0
  30. package/dist/providers/registrationConfig/models.d.ts +84 -0
  31. package/dist/providers/registrationConfig/models.d.ts.map +1 -0
  32. package/dist/providers/registrationConfig/provider.d.ts +4 -0
  33. package/dist/providers/registrationConfig/provider.d.ts.map +1 -0
  34. package/dist/providers/registrationConfig/schema.json.d.ts +406 -0
  35. package/package.json +1 -1
  36. package/dist/contexts/RegistrationConfigContext.d.ts +0 -3
  37. package/dist/contexts/RegistrationConfigContext.d.ts.map +0 -1
  38. package/dist/hooks/useRegistrationConfig.d.ts +0 -3
  39. package/dist/hooks/useRegistrationConfig.d.ts.map +0 -1
  40. package/dist/models/registrationConfig.d.ts +0 -15
  41. package/dist/models/registrationConfig.d.ts.map +0 -1
  42. package/dist/providers/RegistrationConfigProvider.d.ts +0 -9
  43. package/dist/providers/RegistrationConfigProvider.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ax as s, av as E, aw as i } from "./index-Qc9d1D1J.js";
1
+ import { ax as s, av as E, aw as i } from "./index-DAYe3WiF.js";
2
2
  export {
3
3
  s as IDENTIFIER_TYPES_QUERY_KEY,
4
4
  E as RegistrationApp,
@@ -83,6 +83,8 @@
83
83
  "DATE_ERROR_NULL_OR_UNDEFINED": "Date is null or undefined",
84
84
  "DATE_ERROR_PARSE": "Date Parse Error",
85
85
  "ENTER_VISIT_DETAILS": "Enter Visit Details",
86
+ "ERROR_CONFIG_GENERIC_MESSAGE": "Unable to load {{config}}. Please try refreshing the page.",
87
+ "ERROR_CONFIG_TITLE": "{{config}} Error",
86
88
  "ERROR_DEFAULT_TITLE": "Error",
87
89
  "ERROR_LOADING_PATIENT_DETAILS": "Error Loading Patient Details",
88
90
  "ERROR_LOADING_PATIENT_PHOTO": "Error Loading Patient Photo",
@@ -154,6 +156,7 @@
154
156
  "NOTIFICATION_UNABLE_TO_GET_ADDITIONAL_DATA": "Unable to get patient additional data",
155
157
  "REGISTRATION_DAYS_SHORT": "d",
156
158
  "REGISTRATION_MONTHS_SHORT": "m",
159
+ "REGISTRATION_PATIENT_SEARCH_APPOINTMENT": "Search by Appointment",
157
160
  "REGISTRATION_YEARS_SHORT": "y",
158
161
  "SUCCESS": "Success",
159
162
  "VIEWED_REGISTRATION_PATIENT_SEARCH_MESSAGE": "User {{username}} accessed patient search screen in registration app"
@@ -83,6 +83,8 @@
83
83
  "DATE_ERROR_NULL_OR_UNDEFINED": "La fecha es nula o no está definida",
84
84
  "DATE_ERROR_PARSE": "Error al analizar la fecha",
85
85
  "ENTER_VISIT_DETAILS": "Ingrese los detalles de la visita",
86
+ "ERROR_CONFIG_GENERIC_MESSAGE": "No se pudo cargar {{config}}. Por favor, intente actualizar la página.",
87
+ "ERROR_CONFIG_TITLE": "Error de {{config}}",
86
88
  "ERROR_DEFAULT_TITLE": "Error",
87
89
  "ERROR_LOADING_PATIENT_DETAILS": "Error al cargar los detalles del paciente",
88
90
  "ERROR_LOADING_PATIENT_PHOTO": "Error al cargar la foto del paciente",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/patientSearchPage/index.tsx"],"names":[],"mappings":"AA6CA;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAuU9B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/patientSearchPage/index.tsx"],"names":[],"mappings":"AA6CA;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EA8T9B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const REGISTRATION_CONFIG_URL: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/providers/registrationConfig/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,QACQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RegistrationConfigContextType } from './models';
2
+ export declare const RegistrationConfigContext: import('react').Context<RegistrationConfigContextType | undefined>;
3
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/providers/registrationConfig/context.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,yBAAyB,oEAE1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RegistrationConfigContextType } from './models';
2
+ export declare const useRegistrationConfig: () => RegistrationConfigContextType;
3
+ //# sourceMappingURL=hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/providers/registrationConfig/hook.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,qBAAqB,qCAK/B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { RegistrationConfigProvider } from './provider';
2
+ export { type RegistrationConfigContextType, type AppExtensionConfig, } from './models';
3
+ export { RegistrationConfigContext } from './context';
4
+ export { useRegistrationConfig } from './hook';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/registrationConfig/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { AppointmentSearchField, PatientSearchField } from '@bahmni/services';
2
+ export interface PatientSearchConfig {
3
+ customAttributes: PatientSearchField[];
4
+ appointment: AppointmentSearchField[];
5
+ }
6
+ export interface PatientInformationConfig {
7
+ defaultIdentifierPrefix?: string;
8
+ autoCompleteFields?: string[];
9
+ showMiddleName?: boolean;
10
+ showLastName?: boolean;
11
+ isFirstNameMandatory?: boolean;
12
+ isMiddleNameMandatory?: boolean;
13
+ isLastNameMandatory?: boolean;
14
+ isGenderMandatory?: boolean;
15
+ isDateOfBirthMandatory?: boolean;
16
+ patientNameDisplayOrder?: string[];
17
+ showBirthTime?: boolean;
18
+ showCasteSameAsLastNameCheckbox?: boolean;
19
+ showDOBEstimated?: boolean;
20
+ showEnterManually?: boolean;
21
+ contactInformation?: {
22
+ translationKey?: string;
23
+ attributes?: Array<{
24
+ field: string;
25
+ translationKey: string;
26
+ }>;
27
+ };
28
+ additionalPatientInformation?: {
29
+ translationKey?: string;
30
+ attributes?: Array<{
31
+ field: string;
32
+ translationKey: string;
33
+ }>;
34
+ };
35
+ hiddenAttributes?: string[];
36
+ defaults?: Record<string, unknown>;
37
+ addressHierarchy?: {
38
+ showAddressFieldsTopDown?: boolean;
39
+ strictAutocompleteFromLevel?: string;
40
+ requiredFields?: string[];
41
+ expectedFields?: Array<{
42
+ addressField: string;
43
+ translationKey: string;
44
+ }>;
45
+ };
46
+ showExtraPatientIdentifiersSection?: boolean;
47
+ }
48
+ export interface FieldValidationRule {
49
+ pattern: string;
50
+ errorMessage: string;
51
+ }
52
+ export interface FieldValidationConfig {
53
+ [fieldName: string]: FieldValidationRule;
54
+ }
55
+ export interface AppExtensionConfig {
56
+ id: string;
57
+ extensionPointId: string;
58
+ type: 'link' | 'startVisit';
59
+ translationKey: string;
60
+ url: string;
61
+ shortcutKey?: string;
62
+ icon?: string;
63
+ order?: number;
64
+ kind?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'danger';
65
+ requiredPrivilege?: string;
66
+ }
67
+ export interface ExtensionPoint {
68
+ id: string;
69
+ description?: string;
70
+ }
71
+ export interface RegistrationConfig {
72
+ patientSearch: PatientSearchConfig;
73
+ defaultVisitType?: string;
74
+ patientInformation?: PatientInformationConfig;
75
+ fieldValidation?: FieldValidationConfig;
76
+ extensionPoints?: ExtensionPoint[];
77
+ registrationAppExtensions?: AppExtensionConfig[];
78
+ }
79
+ export interface RegistrationConfigContextType {
80
+ registrationConfig: RegistrationConfig | null | undefined;
81
+ isLoading: boolean;
82
+ error: Error | null;
83
+ }
84
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/registrationConfig/models.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ export declare const RegistrationConfigProvider: import('react').FC<{
2
+ children: import('react').ReactNode;
3
+ }>;
4
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/providers/registrationConfig/provider.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B;;EAmBrC,CAAC"}
@@ -0,0 +1,406 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Registration Configuration Schema",
4
+ "description": "Schema for validating registration app configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "description": "Unique identifier for the registration configuration"
11
+ },
12
+ "contextModel": {
13
+ "type": "array",
14
+ "description": "Array of context model configurations",
15
+ "items": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "patientSearch": {
20
+ "type": "object",
21
+ "description": "Patient search configuration",
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "customAttributes": {
25
+ "type": "array",
26
+ "description": "Array of available search fields",
27
+ "items": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "translationKey": {
32
+ "type": "string",
33
+ "description": "Translation key for the dropdown label"
34
+ },
35
+ "fields": {
36
+ "type": "array",
37
+ "description": "Array of field names to search against",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "expectedFields": {
43
+ "type": "array",
44
+ "description": "Array of fields configurations with translation keys to display on table headers",
45
+ "items": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "properties": {
49
+ "field": {
50
+ "type": "string",
51
+ "description": "field corresponding to table header"
52
+ },
53
+ "translationKey": {
54
+ "type": "string",
55
+ "description": "Translation key for the table header"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "type": {
61
+ "type": "string",
62
+ "enum": ["person", "address", "program", "appointment"],
63
+ "description": "Type of the search field (person, address, program, appointment)"
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "appointment": {
69
+ "type": "array",
70
+ "description": "Array of available search fields for appointments",
71
+ "items": {
72
+ "type": "object",
73
+ "additionalProperties": true,
74
+ "required": ["translationKey", "fields"],
75
+ "properties": {
76
+ "translationKey": {
77
+ "type": "string",
78
+ "description": "Translation key for the field label"
79
+ },
80
+ "fields": {
81
+ "type": "array",
82
+ "description": "Array of field names to search against",
83
+ "items": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "expectedFields": {
88
+ "type": "array",
89
+ "description": "Array of expected fields with optional types",
90
+ "items": {
91
+ "type": "object",
92
+ "required": ["field", "translationKey"],
93
+ "properties": {
94
+ "field": {
95
+ "type": "string",
96
+ "description": "The field name (e.g., apptNumber, apptDate)"
97
+ },
98
+ "translationKey": {
99
+ "type": "string",
100
+ "description": "Translation key for the field's display label"
101
+ },
102
+ "type": {
103
+ "type": "string",
104
+ "description": "Optional field type (e.g., date, string)"
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "type": {
110
+ "type": "string",
111
+ "enum": ["appointment"],
112
+ "description": "Type of the search field (appointment)"
113
+ },
114
+ "actions": {
115
+ "type": "array",
116
+ "description": "Array of actions allowed on this search field",
117
+ "items": {
118
+ "type": "object",
119
+ "required": [
120
+ "translationKey",
121
+ "type",
122
+ "enabledRule",
123
+ "onAction"
124
+ ],
125
+ "properties": {
126
+ "translationKey": {
127
+ "type": "string",
128
+ "description": "Translation key for the action button label"
129
+ },
130
+ "type": {
131
+ "type": "string",
132
+ "enum": ["changeStatus", "navigate"],
133
+ "description": "Type of action to perform"
134
+ },
135
+ "enabledRule": {
136
+ "type": "array",
137
+ "description": "Conditions to enable this action (rules)",
138
+ "items": {
139
+ "type": "object",
140
+ "properties": {
141
+ "type": {
142
+ "type": "string",
143
+ "enum": [
144
+ "privilegeCheck",
145
+ "statusCheck",
146
+ "appDateCheck"
147
+ ],
148
+ "description": "Type of rule to evaluate"
149
+ },
150
+ "values": {
151
+ "type": "array",
152
+ "items": { "type": "string" },
153
+ "description": "Values to check against for the rule"
154
+ }
155
+ }
156
+ }
157
+ },
158
+ "onAction": {
159
+ "type": "object",
160
+ "description": "What happens when action is triggered",
161
+ "additionalProperties": true,
162
+ "properties": {
163
+ "status": {
164
+ "type": "string",
165
+ "description": "Status to set (for changeStatus type)"
166
+ },
167
+ "navigation": {
168
+ "type": "string",
169
+ "description": "URL path to navigate to (for navigate type)"
170
+ }
171
+ }
172
+ },
173
+ "onSuccess": {
174
+ "type": "object",
175
+ "description": "Notification or other success response",
176
+ "additionalProperties": true,
177
+ "properties": {
178
+ "notification": {
179
+ "type": "string",
180
+ "description": "Translation key for success notification message"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "defaultVisitType": {
193
+ "type": "string",
194
+ "description": "Default visit type for patient registration"
195
+ },
196
+ "patientInformation": {
197
+ "type": "object",
198
+ "description": "Patient name related fields configuration",
199
+ "additionalProperties": true,
200
+ "properties": {
201
+ "defaultIdentifierPrefix": {
202
+ "type": "string",
203
+ "description": "Default prefix for patient identifiers"
204
+ },
205
+ "showEnterManually": { "type": "boolean" },
206
+ "showMiddleName": { "type": "boolean" },
207
+ "showLastName": { "type": "boolean" },
208
+ "isFirstNameMandatory": { "type": "boolean" },
209
+ "isMiddleNameMandatory": { "type": "boolean" },
210
+ "isGenderMandatory": { "type": "boolean" },
211
+ "isDateOfBirthMandatory": { "type": "boolean" },
212
+ "isLastNameMandatory": { "type": "boolean" },
213
+ "patientNameDisplayOrder": {
214
+ "type": "array",
215
+ "description": "Order in which patient name fields should be displayed",
216
+ "items": { "type": "string" }
217
+ },
218
+ "showBirthTime": { "type": "boolean" },
219
+ "showDOBEstimated": { "type": "boolean" },
220
+ "addressHierarchy": {
221
+ "type": "object",
222
+ "description": "Address hierarchy levels to be displayed",
223
+ "additionalProperties": false,
224
+ "properties": {
225
+ "showAddressFieldsTopDown": { "type": "boolean" },
226
+ "strictAutocompleteFromLevel": { "type": "string" },
227
+ "expectedFields": {
228
+ "type": "array",
229
+ "description": "Array of expected fields with translation keys",
230
+ "items": {
231
+ "type": "object",
232
+ "properties": {
233
+ "addressField": {
234
+ "type": "string",
235
+ "description": "Field name"
236
+ },
237
+ "translationKey": {
238
+ "type": "string",
239
+ "description": "Translation key for the field label"
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "additionalPatientInformation": {
247
+ "type": "object",
248
+ "description": "Additional patient information configuration",
249
+ "additionalProperties": true,
250
+ "properties": {
251
+ "translationKey": {
252
+ "type": "string",
253
+ "description": "Translation key for the section title"
254
+ },
255
+ "attributes": {
256
+ "type": "array",
257
+ "description": "Array of attribute fields with translation keys",
258
+ "items": {
259
+ "type": "object",
260
+ "required": ["field", "translationKey"],
261
+ "properties": {
262
+ "field": {
263
+ "type": "string",
264
+ "description": "Field name"
265
+ },
266
+ "translationKey": {
267
+ "type": "string",
268
+ "description": "Translation key for the field label"
269
+ }
270
+ }
271
+ }
272
+ }
273
+ }
274
+ },
275
+ "contactInformation": {
276
+ "type": "object",
277
+ "additionalProperties": true,
278
+ "properties": {
279
+ "translationKey": {
280
+ "type": "string",
281
+ "description": "Translation key for the section title"
282
+ },
283
+ "attributes": {
284
+ "type": "array",
285
+ "description": "Array of attribute fields with translation keys",
286
+ "items": {
287
+ "type": "object",
288
+ "required": ["field", "translationKey"],
289
+ "properties": {
290
+ "field": {
291
+ "type": "string",
292
+ "description": "Field name"
293
+ },
294
+ "translationKey": {
295
+ "type": "string",
296
+ "description": "Translation key for the field label"
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "showExtraPatientIdentifiersSection": {
304
+ "type": "boolean",
305
+ "description": "Whether to show extra patient identifiers section"
306
+ }
307
+ }
308
+ },
309
+ "fieldValidation": {
310
+ "type": "object",
311
+ "description": "Field validation rules with regex patterns and error messages",
312
+ "additionalProperties": true,
313
+ "patternProperties": {
314
+ "^.*$": {
315
+ "type": "object",
316
+ "properties": {
317
+ "pattern": {
318
+ "type": "string",
319
+ "description": "Regular expression pattern for field validation"
320
+ },
321
+ "errorMessage": {
322
+ "type": "string",
323
+ "description": "Error message to display when validation fails"
324
+ }
325
+ }
326
+ }
327
+ }
328
+ },
329
+ "extensionPoints": {
330
+ "type": "array",
331
+ "description": "Array of extension point definitions that extensions can attach to",
332
+ "items": {
333
+ "type": "object",
334
+ "required": ["id"],
335
+ "additionalProperties": false,
336
+ "properties": {
337
+ "id": {
338
+ "type": "string",
339
+ "description": "Unique identifier for the extension point (e.g., 'org.bahmni.registration.navigation')"
340
+ },
341
+ "description": {
342
+ "type": "string",
343
+ "description": "Human-readable description of what this extension point is for"
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "registrationAppExtensions": {
349
+ "type": "array",
350
+ "description": "Array of app extension configurations for registration",
351
+ "items": {
352
+ "type": "object",
353
+ "description": "Extension configuration",
354
+ "additionalProperties": false,
355
+ "required": ["id", "extensionPointId", "type", "requiredPrivilege"],
356
+ "properties": {
357
+ "id": {
358
+ "type": "string",
359
+ "description": "Unique identifier for the extension"
360
+ },
361
+ "extensionPointId": {
362
+ "type": "string",
363
+ "description": "Extension point identifier this extension attaches to"
364
+ },
365
+ "type": {
366
+ "type": "string",
367
+ "enum": ["link", "startVisit"],
368
+ "description": "Type of extension (e.g., 'link', 'startVisit')"
369
+ },
370
+ "translationKey": {
371
+ "type": "string",
372
+ "description": "Translation key for the extension label"
373
+ },
374
+ "url": {
375
+ "type": "string",
376
+ "description": "URL path for the extension"
377
+ },
378
+ "shortcutKey": {
379
+ "type": "string",
380
+ "description": "Keyboard shortcut key for the extension"
381
+ },
382
+ "icon": {
383
+ "type": "string",
384
+ "description": "Icon class name (e.g., FontAwesome class like 'fa-search')"
385
+ },
386
+ "order": {
387
+ "type": "number",
388
+ "description": "Display order of the extension"
389
+ },
390
+ "kind": {
391
+ "type": "string",
392
+ "enum": ["primary", "secondary", "tertiary", "ghost", "danger"],
393
+ "description": "Button kind/variant (defaults to 'primary' if not specified)"
394
+ },
395
+ "requiredPrivilege": {
396
+ "type": "string",
397
+ "description": "Required privilege to access this extension"
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+ }
404
+ ;
405
+
406
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/registration-app",
3
- "version": "0.0.1-dev.171",
3
+ "version": "0.0.1-dev.174",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,3 +0,0 @@
1
- import { RegistrationConfigContextType } from '../models/registrationConfig';
2
- export declare const RegistrationConfigContext: import('react').Context<RegistrationConfigContextType | undefined>;
3
- //# sourceMappingURL=RegistrationConfigContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegistrationConfigContext.d.ts","sourceRoot":"","sources":["../../src/contexts/RegistrationConfigContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,eAAO,MAAM,yBAAyB,oEAE1B,CAAC"}
@@ -1,3 +0,0 @@
1
- import { RegistrationConfigContextType } from '../models/registrationConfig';
2
- export declare const useRegistrationConfig: () => RegistrationConfigContextType;
3
- //# sourceMappingURL=useRegistrationConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRegistrationConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useRegistrationConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,eAAO,MAAM,qBAAqB,QAAO,6BAUxC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { RegistrationConfig } from '@bahmni/services';
2
- /**
3
- * Registration configuration context interface
4
- * Provides access to registration config with loading and error states
5
- */
6
- export interface RegistrationConfigContextType {
7
- registrationConfig: RegistrationConfig | null;
8
- setRegistrationConfig: (config: RegistrationConfig | null) => void;
9
- isLoading: boolean;
10
- setIsLoading: (isLoading: boolean) => void;
11
- error: Error | null;
12
- setError: (error: Error | null) => void;
13
- refetch: () => Promise<void>;
14
- }
15
- //# sourceMappingURL=registrationConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registrationConfig.d.ts","sourceRoot":"","sources":["../../src/models/registrationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC9C,qBAAqB,EAAE,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B"}
@@ -1,9 +0,0 @@
1
- import { RegistrationConfig } from '@bahmni/services';
2
- import { default as React, ReactNode } from 'react';
3
- interface RegistrationConfigProviderProps {
4
- children: ReactNode;
5
- initialConfig?: RegistrationConfig | null;
6
- }
7
- export declare const RegistrationConfigProvider: React.FC<RegistrationConfigProviderProps>;
8
- export {};
9
- //# sourceMappingURL=RegistrationConfigProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegistrationConfigProvider.d.ts","sourceRoot":"","sources":["../../src/providers/RegistrationConfigProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAgC,MAAM,OAAO,CAAC;AAGvE,UAAU,+BAA+B;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CAiEhC,CAAC"}