@medplum/react 2.0.19 → 2.0.21
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/cjs/index.cjs +120 -101
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/esm/AppShell/AppShell.mjs +2 -2
- package/dist/esm/AppShell/AppShell.mjs.map +1 -1
- package/dist/esm/AppShell/Header.mjs +1 -1
- package/dist/esm/AppShell/Header.mjs.map +1 -1
- package/dist/esm/AppShell/HeaderSearchInput.mjs +2 -4
- package/dist/esm/AppShell/HeaderSearchInput.mjs.map +1 -1
- package/dist/esm/AppShell/Navbar.mjs +12 -14
- package/dist/esm/AppShell/Navbar.mjs.map +1 -1
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs +2 -1
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs.map +1 -1
- package/dist/esm/BookmarkDialog/BookmarkDialog.mjs +1 -3
- package/dist/esm/BookmarkDialog/BookmarkDialog.mjs.map +1 -1
- package/dist/esm/MedplumProvider/MedplumProvider.mjs +8 -0
- package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +1 -1
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs +1 -1
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchControl.mjs +2 -2
- package/dist/esm/SearchControl/SearchControl.mjs.map +1 -1
- package/dist/esm/Timeline/Timeline.mjs +2 -1
- package/dist/esm/Timeline/Timeline.mjs.map +1 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +11 -5
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -1
- package/dist/esm/auth/SignInForm.mjs +8 -4
- package/dist/esm/auth/SignInForm.mjs.map +1 -1
- package/dist/esm/index.min.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -1
- package/dist/esm/utils/date.mjs +9 -6
- package/dist/esm/utils/date.mjs.map +1 -1
- package/dist/types/AppShell/AppShell.d.ts +2 -0
- package/dist/types/AppShell/Header.d.ts +2 -0
- package/dist/types/AppShell/HeaderSearchInput.d.ts +5 -1
- package/dist/types/AppShell/Navbar.d.ts +2 -0
- package/dist/types/BookmarkDialog/BookmarkDialog.d.ts +2 -0
- package/dist/types/Timeline/Timeline.d.ts +1 -0
- package/package.json +11 -12
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@medplum/core'), require('react'), require('@mantine/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@medplum/core', 'react', '@mantine/core', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.medplum = global.medplum || {}, global.medplum.react = {}), global.medplum.core, global.React, global.mantine.core, global.
|
|
5
|
-
})(this, (function (exports, core, React, core$1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@medplum/core'), require('react'), require('@mantine/core'), require('@mantine/notifications'), require('prop-types')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@medplum/core', 'react', '@mantine/core', '@mantine/notifications', 'prop-types'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.medplum = global.medplum || {}, global.medplum.react = {}), global.medplum.core, global.React, global.mantine.core, global.mantine.notifications, global.PropTypes));
|
|
5
|
+
})(this, (function (exports, core, React, core$1, notifications, PropTypes) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function AddressDisplay(props) {
|
|
8
8
|
const address = props.value;
|
|
@@ -89,6 +89,13 @@
|
|
|
89
89
|
medplum.addEventListener('change', eventListener);
|
|
90
90
|
return () => medplum.removeEventListeneer('change', eventListener);
|
|
91
91
|
}, [medplum, state]);
|
|
92
|
+
React.useEffect(() => {
|
|
93
|
+
function eventListener() {
|
|
94
|
+
notifications.showNotification({ color: 'red', message: 'No connection to server', autoClose: false });
|
|
95
|
+
}
|
|
96
|
+
medplum.addEventListener('offline', eventListener);
|
|
97
|
+
return () => medplum.removeEventListeneer('offline', eventListener);
|
|
98
|
+
}, [medplum]);
|
|
92
99
|
const medplumContext = {
|
|
93
100
|
...state,
|
|
94
101
|
medplum,
|
|
@@ -154,7 +161,7 @@
|
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
/**
|
|
157
|
-
* @tabler/icons-react v2.
|
|
164
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
158
165
|
*/
|
|
159
166
|
|
|
160
167
|
var defaultAttributes = {
|
|
@@ -170,7 +177,7 @@
|
|
|
170
177
|
};
|
|
171
178
|
|
|
172
179
|
/**
|
|
173
|
-
* @tabler/icons-react v2.
|
|
180
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
174
181
|
*/
|
|
175
182
|
|
|
176
183
|
|
|
@@ -234,7 +241,7 @@
|
|
|
234
241
|
};
|
|
235
242
|
|
|
236
243
|
/**
|
|
237
|
-
* @tabler/icons-react v2.
|
|
244
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
238
245
|
*/
|
|
239
246
|
|
|
240
247
|
|
|
@@ -255,7 +262,7 @@
|
|
|
255
262
|
);
|
|
256
263
|
|
|
257
264
|
/**
|
|
258
|
-
* @tabler/icons-react v2.
|
|
265
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
259
266
|
*/
|
|
260
267
|
|
|
261
268
|
|
|
@@ -266,7 +273,7 @@
|
|
|
266
273
|
]);
|
|
267
274
|
|
|
268
275
|
/**
|
|
269
|
-
* @tabler/icons-react v2.
|
|
276
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
270
277
|
*/
|
|
271
278
|
|
|
272
279
|
|
|
@@ -282,7 +289,7 @@
|
|
|
282
289
|
]);
|
|
283
290
|
|
|
284
291
|
/**
|
|
285
|
-
* @tabler/icons-react v2.
|
|
292
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
286
293
|
*/
|
|
287
294
|
|
|
288
295
|
|
|
@@ -297,7 +304,7 @@
|
|
|
297
304
|
]);
|
|
298
305
|
|
|
299
306
|
/**
|
|
300
|
-
* @tabler/icons-react v2.
|
|
307
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
301
308
|
*/
|
|
302
309
|
|
|
303
310
|
|
|
@@ -319,7 +326,7 @@
|
|
|
319
326
|
]);
|
|
320
327
|
|
|
321
328
|
/**
|
|
322
|
-
* @tabler/icons-react v2.
|
|
329
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
323
330
|
*/
|
|
324
331
|
|
|
325
332
|
|
|
@@ -332,7 +339,7 @@
|
|
|
332
339
|
]);
|
|
333
340
|
|
|
334
341
|
/**
|
|
335
|
-
* @tabler/icons-react v2.
|
|
342
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
336
343
|
*/
|
|
337
344
|
|
|
338
345
|
|
|
@@ -355,7 +362,7 @@
|
|
|
355
362
|
]);
|
|
356
363
|
|
|
357
364
|
/**
|
|
358
|
-
* @tabler/icons-react v2.
|
|
365
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
359
366
|
*/
|
|
360
367
|
|
|
361
368
|
|
|
@@ -371,7 +378,7 @@
|
|
|
371
378
|
]);
|
|
372
379
|
|
|
373
380
|
/**
|
|
374
|
-
* @tabler/icons-react v2.
|
|
381
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
375
382
|
*/
|
|
376
383
|
|
|
377
384
|
|
|
@@ -391,7 +398,7 @@
|
|
|
391
398
|
]);
|
|
392
399
|
|
|
393
400
|
/**
|
|
394
|
-
* @tabler/icons-react v2.
|
|
401
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
395
402
|
*/
|
|
396
403
|
|
|
397
404
|
|
|
@@ -400,7 +407,7 @@
|
|
|
400
407
|
]);
|
|
401
408
|
|
|
402
409
|
/**
|
|
403
|
-
* @tabler/icons-react v2.
|
|
410
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
404
411
|
*/
|
|
405
412
|
|
|
406
413
|
|
|
@@ -416,7 +423,7 @@
|
|
|
416
423
|
]);
|
|
417
424
|
|
|
418
425
|
/**
|
|
419
|
-
* @tabler/icons-react v2.
|
|
426
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
420
427
|
*/
|
|
421
428
|
|
|
422
429
|
|
|
@@ -425,7 +432,7 @@
|
|
|
425
432
|
]);
|
|
426
433
|
|
|
427
434
|
/**
|
|
428
|
-
* @tabler/icons-react v2.
|
|
435
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
429
436
|
*/
|
|
430
437
|
|
|
431
438
|
|
|
@@ -435,7 +442,7 @@
|
|
|
435
442
|
]);
|
|
436
443
|
|
|
437
444
|
/**
|
|
438
|
-
* @tabler/icons-react v2.
|
|
445
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
439
446
|
*/
|
|
440
447
|
|
|
441
448
|
|
|
@@ -446,7 +453,7 @@
|
|
|
446
453
|
]);
|
|
447
454
|
|
|
448
455
|
/**
|
|
449
|
-
* @tabler/icons-react v2.
|
|
456
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
450
457
|
*/
|
|
451
458
|
|
|
452
459
|
|
|
@@ -463,7 +470,7 @@
|
|
|
463
470
|
]);
|
|
464
471
|
|
|
465
472
|
/**
|
|
466
|
-
* @tabler/icons-react v2.
|
|
473
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
467
474
|
*/
|
|
468
475
|
|
|
469
476
|
|
|
@@ -479,7 +486,7 @@
|
|
|
479
486
|
]);
|
|
480
487
|
|
|
481
488
|
/**
|
|
482
|
-
* @tabler/icons-react v2.
|
|
489
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
483
490
|
*/
|
|
484
491
|
|
|
485
492
|
|
|
@@ -495,7 +502,7 @@
|
|
|
495
502
|
]);
|
|
496
503
|
|
|
497
504
|
/**
|
|
498
|
-
* @tabler/icons-react v2.
|
|
505
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
499
506
|
*/
|
|
500
507
|
|
|
501
508
|
|
|
@@ -506,7 +513,7 @@
|
|
|
506
513
|
]);
|
|
507
514
|
|
|
508
515
|
/**
|
|
509
|
-
* @tabler/icons-react v2.
|
|
516
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
510
517
|
*/
|
|
511
518
|
|
|
512
519
|
|
|
@@ -529,7 +536,7 @@
|
|
|
529
536
|
]);
|
|
530
537
|
|
|
531
538
|
/**
|
|
532
|
-
* @tabler/icons-react v2.
|
|
539
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
533
540
|
*/
|
|
534
541
|
|
|
535
542
|
|
|
@@ -540,7 +547,7 @@
|
|
|
540
547
|
]);
|
|
541
548
|
|
|
542
549
|
/**
|
|
543
|
-
* @tabler/icons-react v2.
|
|
550
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
544
551
|
*/
|
|
545
552
|
|
|
546
553
|
|
|
@@ -550,7 +557,7 @@
|
|
|
550
557
|
]);
|
|
551
558
|
|
|
552
559
|
/**
|
|
553
|
-
* @tabler/icons-react v2.
|
|
560
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
554
561
|
*/
|
|
555
562
|
|
|
556
563
|
|
|
@@ -568,7 +575,7 @@
|
|
|
568
575
|
]);
|
|
569
576
|
|
|
570
577
|
/**
|
|
571
|
-
* @tabler/icons-react v2.
|
|
578
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
572
579
|
*/
|
|
573
580
|
|
|
574
581
|
|
|
@@ -586,7 +593,7 @@
|
|
|
586
593
|
]);
|
|
587
594
|
|
|
588
595
|
/**
|
|
589
|
-
* @tabler/icons-react v2.
|
|
596
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
590
597
|
*/
|
|
591
598
|
|
|
592
599
|
|
|
@@ -601,7 +608,7 @@
|
|
|
601
608
|
]);
|
|
602
609
|
|
|
603
610
|
/**
|
|
604
|
-
* @tabler/icons-react v2.
|
|
611
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
605
612
|
*/
|
|
606
613
|
|
|
607
614
|
|
|
@@ -627,7 +634,7 @@
|
|
|
627
634
|
]);
|
|
628
635
|
|
|
629
636
|
/**
|
|
630
|
-
* @tabler/icons-react v2.
|
|
637
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
631
638
|
*/
|
|
632
639
|
|
|
633
640
|
|
|
@@ -644,7 +651,7 @@
|
|
|
644
651
|
]);
|
|
645
652
|
|
|
646
653
|
/**
|
|
647
|
-
* @tabler/icons-react v2.
|
|
654
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
648
655
|
*/
|
|
649
656
|
|
|
650
657
|
|
|
@@ -653,7 +660,7 @@
|
|
|
653
660
|
]);
|
|
654
661
|
|
|
655
662
|
/**
|
|
656
|
-
* @tabler/icons-react v2.
|
|
663
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
657
664
|
*/
|
|
658
665
|
|
|
659
666
|
|
|
@@ -662,7 +669,7 @@
|
|
|
662
669
|
]);
|
|
663
670
|
|
|
664
671
|
/**
|
|
665
|
-
* @tabler/icons-react v2.
|
|
672
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
666
673
|
*/
|
|
667
674
|
|
|
668
675
|
|
|
@@ -679,7 +686,7 @@
|
|
|
679
686
|
]);
|
|
680
687
|
|
|
681
688
|
/**
|
|
682
|
-
* @tabler/icons-react v2.
|
|
689
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
683
690
|
*/
|
|
684
691
|
|
|
685
692
|
|
|
@@ -696,7 +703,7 @@
|
|
|
696
703
|
]);
|
|
697
704
|
|
|
698
705
|
/**
|
|
699
|
-
* @tabler/icons-react v2.
|
|
706
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
700
707
|
*/
|
|
701
708
|
|
|
702
709
|
|
|
@@ -714,7 +721,7 @@
|
|
|
714
721
|
]);
|
|
715
722
|
|
|
716
723
|
/**
|
|
717
|
-
* @tabler/icons-react v2.
|
|
724
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
718
725
|
*/
|
|
719
726
|
|
|
720
727
|
|
|
@@ -724,7 +731,7 @@
|
|
|
724
731
|
]);
|
|
725
732
|
|
|
726
733
|
/**
|
|
727
|
-
* @tabler/icons-react v2.
|
|
734
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
728
735
|
*/
|
|
729
736
|
|
|
730
737
|
|
|
@@ -734,7 +741,7 @@
|
|
|
734
741
|
]);
|
|
735
742
|
|
|
736
743
|
/**
|
|
737
|
-
* @tabler/icons-react v2.
|
|
744
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
738
745
|
*/
|
|
739
746
|
|
|
740
747
|
|
|
@@ -750,7 +757,7 @@
|
|
|
750
757
|
]);
|
|
751
758
|
|
|
752
759
|
/**
|
|
753
|
-
* @tabler/icons-react v2.
|
|
760
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
754
761
|
*/
|
|
755
762
|
|
|
756
763
|
|
|
@@ -763,7 +770,7 @@
|
|
|
763
770
|
]);
|
|
764
771
|
|
|
765
772
|
/**
|
|
766
|
-
* @tabler/icons-react v2.
|
|
773
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
767
774
|
*/
|
|
768
775
|
|
|
769
776
|
|
|
@@ -776,7 +783,7 @@
|
|
|
776
783
|
]);
|
|
777
784
|
|
|
778
785
|
/**
|
|
779
|
-
* @tabler/icons-react v2.
|
|
786
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
780
787
|
*/
|
|
781
788
|
|
|
782
789
|
|
|
@@ -791,7 +798,7 @@
|
|
|
791
798
|
]);
|
|
792
799
|
|
|
793
800
|
/**
|
|
794
|
-
* @tabler/icons-react v2.
|
|
801
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
795
802
|
*/
|
|
796
803
|
|
|
797
804
|
|
|
@@ -807,7 +814,7 @@
|
|
|
807
814
|
);
|
|
808
815
|
|
|
809
816
|
/**
|
|
810
|
-
* @tabler/icons-react v2.
|
|
817
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
811
818
|
*/
|
|
812
819
|
|
|
813
820
|
|
|
@@ -826,7 +833,7 @@
|
|
|
826
833
|
]);
|
|
827
834
|
|
|
828
835
|
/**
|
|
829
|
-
* @tabler/icons-react v2.
|
|
836
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
830
837
|
*/
|
|
831
838
|
|
|
832
839
|
|
|
@@ -842,7 +849,7 @@
|
|
|
842
849
|
]);
|
|
843
850
|
|
|
844
851
|
/**
|
|
845
|
-
* @tabler/icons-react v2.
|
|
852
|
+
* @tabler/icons-react v2.19.0 - MIT
|
|
846
853
|
*/
|
|
847
854
|
|
|
848
855
|
|
|
@@ -1101,8 +1108,9 @@
|
|
|
1101
1108
|
if (!item && creatable !== false) {
|
|
1102
1109
|
item = onCreate(value);
|
|
1103
1110
|
}
|
|
1104
|
-
if (item)
|
|
1111
|
+
if (item) {
|
|
1105
1112
|
result.push(item);
|
|
1113
|
+
}
|
|
1106
1114
|
}
|
|
1107
1115
|
onChange(result);
|
|
1108
1116
|
}, [creatable, onChange, onCreate]);
|
|
@@ -1178,11 +1186,10 @@
|
|
|
1178
1186
|
resource,
|
|
1179
1187
|
};
|
|
1180
1188
|
}
|
|
1181
|
-
function HeaderSearchInput() {
|
|
1189
|
+
function HeaderSearchInput(props) {
|
|
1182
1190
|
const { classes } = useStyles$h();
|
|
1183
1191
|
const navigate = useMedplumNavigate();
|
|
1184
1192
|
const medplum = useMedplum();
|
|
1185
|
-
const location = reactRouterDom.useLocation();
|
|
1186
1193
|
const loadData = React.useCallback(async (input, signal) => {
|
|
1187
1194
|
const query = buildGraphQLQuery(input);
|
|
1188
1195
|
const options = { signal };
|
|
@@ -1194,7 +1201,7 @@
|
|
|
1194
1201
|
navigate(`/${core.getReferenceString(item[0])}`);
|
|
1195
1202
|
}
|
|
1196
1203
|
}, [navigate]);
|
|
1197
|
-
return (React.createElement(AsyncAutocomplete, { key:
|
|
1204
|
+
return (React.createElement(AsyncAutocomplete, { key: `${props.pathname}?${props.searchParams}`, size: "sm", radius: "md", className: classes.searchInput, icon: React.createElement(IconSearch, { size: 16 }), placeholder: "Search", itemComponent: ItemComponent$1, toKey: toKey$1, toOption: toOption$1, onChange: handleSelect, loadOptions: loadData, maxSelectedValues: 0, clearSearchOnChange: true, clearable: false }));
|
|
1198
1205
|
}
|
|
1199
1206
|
const ItemComponent$1 = React.forwardRef(({ resource, ...others }, ref) => {
|
|
1200
1207
|
let helpText = undefined;
|
|
@@ -1407,7 +1414,7 @@
|
|
|
1407
1414
|
React.createElement(core$1.Group, { position: "apart" },
|
|
1408
1415
|
React.createElement(core$1.Group, { spacing: "xs" },
|
|
1409
1416
|
React.createElement(core$1.UnstyledButton, { className: classes.logoButton, onClick: props.navbarToggle }, props.logo),
|
|
1410
|
-
React.createElement(HeaderSearchInput,
|
|
1417
|
+
React.createElement(HeaderSearchInput, { pathname: props.pathname, searchParams: props.searchParams })),
|
|
1411
1418
|
React.createElement(core$1.Menu, { width: 260, shadow: "xl", position: "bottom-end", transitionProps: { transition: 'pop-top-right' }, opened: userMenuOpened, onClose: () => setUserMenuOpened(false) },
|
|
1412
1419
|
React.createElement(core$1.Menu.Target, null,
|
|
1413
1420
|
React.createElement(core$1.UnstyledButton, { className: cx(classes.user, { [classes.userActive]: userMenuOpened }), onClick: () => setUserMenuOpened((o) => !o) },
|
|
@@ -1502,10 +1509,9 @@
|
|
|
1502
1509
|
function BookmarkDialog(props) {
|
|
1503
1510
|
const medplum = useMedplum();
|
|
1504
1511
|
const config = medplum.getUserConfiguration();
|
|
1505
|
-
const location = reactRouterDom.useLocation();
|
|
1506
1512
|
function submitHandler(formData) {
|
|
1507
1513
|
const { menuname, bookmarkname: name } = formData;
|
|
1508
|
-
const target =
|
|
1514
|
+
const target = `${props.pathname}?${props.searchParams.toString()}`;
|
|
1509
1515
|
const newConfig = core.deepClone(config);
|
|
1510
1516
|
const menu = newConfig?.menu?.find(({ title }) => title === menuname);
|
|
1511
1517
|
menu?.link?.push({ name, target });
|
|
@@ -1539,11 +1545,20 @@
|
|
|
1539
1545
|
}
|
|
1540
1546
|
|
|
1541
1547
|
function toKey(element) {
|
|
1542
|
-
|
|
1548
|
+
if (typeof element.code === 'string') {
|
|
1549
|
+
return element.code;
|
|
1550
|
+
}
|
|
1551
|
+
return JSON.stringify(element);
|
|
1552
|
+
}
|
|
1553
|
+
function getDisplay(item) {
|
|
1554
|
+
if (typeof item.display === 'string') {
|
|
1555
|
+
return item.display;
|
|
1556
|
+
}
|
|
1557
|
+
return toKey(item);
|
|
1543
1558
|
}
|
|
1544
1559
|
function toOption(element) {
|
|
1545
1560
|
return {
|
|
1546
|
-
value: element
|
|
1561
|
+
value: toKey(element),
|
|
1547
1562
|
label: getDisplay(element),
|
|
1548
1563
|
resource: element,
|
|
1549
1564
|
};
|
|
@@ -1577,9 +1592,6 @@
|
|
|
1577
1592
|
}, [medplum, elementDefinition]);
|
|
1578
1593
|
return (React.createElement(AsyncAutocomplete, { ...rest, creatable: creatable ?? true, clearable: clearable ?? true, toKey: toKey, toOption: toOption, loadOptions: loadValues, onCreate: createValue, getCreateLabel: creatable === false ? undefined : (query) => `+ Create ${query}` }));
|
|
1579
1594
|
}
|
|
1580
|
-
function getDisplay(item) {
|
|
1581
|
-
return item.display || item.code || '';
|
|
1582
|
-
}
|
|
1583
1595
|
|
|
1584
1596
|
function CodeInput(props) {
|
|
1585
1597
|
const [value, setValue] = React.useState(props.defaultValue);
|
|
@@ -1649,9 +1661,7 @@
|
|
|
1649
1661
|
function Navbar(props) {
|
|
1650
1662
|
const { classes } = useStyles$f();
|
|
1651
1663
|
const navigate = useMedplumNavigate();
|
|
1652
|
-
const
|
|
1653
|
-
const [searchParams] = reactRouterDom.useSearchParams();
|
|
1654
|
-
const activeLink = getActiveLink(location.pathname, searchParams, props.menus);
|
|
1664
|
+
const activeLink = getActiveLink(props.pathname, props.searchParams, props.menus);
|
|
1655
1665
|
const [bookmarkDialogVisible, setBookmarkDialogVisible] = React.useState(false);
|
|
1656
1666
|
function onLinkClick(e, to) {
|
|
1657
1667
|
e.stopPropagation();
|
|
@@ -1682,7 +1692,7 @@
|
|
|
1682
1692
|
React.createElement(NavLinkIcon, { to: link.href, icon: link.icon }),
|
|
1683
1693
|
React.createElement("span", null, link.label))))))),
|
|
1684
1694
|
props.displayAddBookmark && (React.createElement(core$1.Button, { variant: "subtle", size: "xs", mt: "xl", leftIcon: React.createElement(IconPlus, { size: "0.75rem" }), onClick: () => setBookmarkDialogVisible(true) }, "Add Bookmark"))))),
|
|
1685
|
-
React.createElement(BookmarkDialog, { visible: bookmarkDialogVisible, onOk: () => setBookmarkDialogVisible(false), onCancel: () => setBookmarkDialogVisible(false) })));
|
|
1695
|
+
props.pathname && props.searchParams && (React.createElement(BookmarkDialog, { pathname: props.pathname, searchParams: props.searchParams, visible: bookmarkDialogVisible, onOk: () => setBookmarkDialogVisible(false), onCancel: () => setBookmarkDialogVisible(false) }))));
|
|
1686
1696
|
}
|
|
1687
1697
|
function NavbarLink(props) {
|
|
1688
1698
|
const { classes, cx } = useStyles$f();
|
|
@@ -1706,17 +1716,18 @@
|
|
|
1706
1716
|
* @returns The active link if one is found.
|
|
1707
1717
|
*/
|
|
1708
1718
|
function getActiveLink(currentPathname, currentSearchParams, menus) {
|
|
1719
|
+
if (!currentPathname || !currentSearchParams || !menus) {
|
|
1720
|
+
return undefined;
|
|
1721
|
+
}
|
|
1709
1722
|
let bestLink = undefined;
|
|
1710
1723
|
let bestScore = 0;
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
bestLink = link;
|
|
1719
|
-
}
|
|
1724
|
+
for (const menu of menus) {
|
|
1725
|
+
if (menu.links) {
|
|
1726
|
+
for (const link of menu.links) {
|
|
1727
|
+
const score = getLinkScore(currentPathname, currentSearchParams, link.href);
|
|
1728
|
+
if (score > bestScore) {
|
|
1729
|
+
bestScore = score;
|
|
1730
|
+
bestLink = link;
|
|
1720
1731
|
}
|
|
1721
1732
|
}
|
|
1722
1733
|
}
|
|
@@ -1782,8 +1793,8 @@
|
|
|
1782
1793
|
main: {
|
|
1783
1794
|
background: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.colors.gray[0],
|
|
1784
1795
|
},
|
|
1785
|
-
}, padding: 0, fixed: true, header: profile && React.createElement(Header, { logo: props.logo, version: props.version, navbarToggle: toggleNavbar }), navbar: profile && navbarOpen ? (React.createElement(Navbar, { menus: props.menus, closeNavbar: closeNavbar, displayAddBookmark: props.displayAddBookmark })) : undefined },
|
|
1786
|
-
React.createElement(ErrorBoundary,
|
|
1796
|
+
}, padding: 0, fixed: true, header: profile && (React.createElement(Header, { pathname: props.pathname, searchParams: props.searchParams, logo: props.logo, version: props.version, navbarToggle: toggleNavbar })), navbar: profile && navbarOpen ? (React.createElement(Navbar, { pathname: props.pathname, searchParams: props.searchParams, menus: props.menus, closeNavbar: closeNavbar, displayAddBookmark: props.displayAddBookmark })) : undefined },
|
|
1797
|
+
React.createElement(ErrorBoundary, { key: `${props.pathname}?${props.searchParams?.toString()}` },
|
|
1787
1798
|
React.createElement(React.Suspense, { fallback: React.createElement(Loading, null) }, props.children))));
|
|
1788
1799
|
}
|
|
1789
1800
|
|
|
@@ -3588,6 +3599,7 @@
|
|
|
3588
3599
|
function TimelineItem(props) {
|
|
3589
3600
|
const { resource, profile, padding, popupMenuItems, ...others } = props;
|
|
3590
3601
|
const author = profile ?? resource.meta?.author;
|
|
3602
|
+
const dateTime = props.dateTime ?? resource.meta?.lastUpdated;
|
|
3591
3603
|
return (React.createElement(Panel, { "data-testid": "timeline-item", fill: true, ...others },
|
|
3592
3604
|
React.createElement(core$1.Group, { position: "apart", spacing: 8, mx: "xs", my: "sm" },
|
|
3593
3605
|
React.createElement(ResourceAvatar, { value: author, link: true, size: "md" }),
|
|
@@ -3595,7 +3607,7 @@
|
|
|
3595
3607
|
React.createElement(core$1.Text, { size: "sm" },
|
|
3596
3608
|
React.createElement(ResourceName, { color: "dark", weight: 500, value: author, link: true })),
|
|
3597
3609
|
React.createElement(core$1.Text, { size: "xs" },
|
|
3598
|
-
React.createElement(MedplumLink, { color: "dimmed", to: props.resource }, core.formatDateTime(
|
|
3610
|
+
React.createElement(MedplumLink, { color: "dimmed", to: props.resource }, core.formatDateTime(dateTime)),
|
|
3599
3611
|
React.createElement(core$1.Text, { component: "span", color: "dimmed", mx: 8 }, "\u00B7"),
|
|
3600
3612
|
React.createElement(MedplumLink, { color: "dimmed", to: props.resource }, props.resource.resourceType))),
|
|
3601
3613
|
popupMenuItems && (React.createElement(core$1.Menu, { position: "bottom-end", shadow: "md", width: 200 },
|
|
@@ -3615,8 +3627,8 @@
|
|
|
3615
3627
|
*/
|
|
3616
3628
|
function sortByDateAndPriority(resources, timelineResource) {
|
|
3617
3629
|
resources.sort((a, b) => {
|
|
3618
|
-
const priority1 = getPriorityScore(a);
|
|
3619
|
-
const priority2 = getPriorityScore(b);
|
|
3630
|
+
const priority1 = getPriorityScore(a, timelineResource);
|
|
3631
|
+
const priority2 = getPriorityScore(b, timelineResource);
|
|
3620
3632
|
if (priority1 > priority2) {
|
|
3621
3633
|
return 1;
|
|
3622
3634
|
}
|
|
@@ -3626,10 +3638,13 @@
|
|
|
3626
3638
|
return getTime(a, timelineResource) - getTime(b, timelineResource);
|
|
3627
3639
|
});
|
|
3628
3640
|
}
|
|
3629
|
-
function getPriorityScore(resource) {
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3641
|
+
function getPriorityScore(resource, timelineResource) {
|
|
3642
|
+
if (!isSameResourceType(resource, timelineResource)) {
|
|
3643
|
+
// Only use priority if not the primary resource of a timeline view.
|
|
3644
|
+
const priority = resource.priority;
|
|
3645
|
+
if (typeof priority === 'string') {
|
|
3646
|
+
return { stat: 4, asap: 3, urgent: 2 }[priority] || 0;
|
|
3647
|
+
}
|
|
3633
3648
|
}
|
|
3634
3649
|
return 0;
|
|
3635
3650
|
}
|
|
@@ -3904,7 +3919,7 @@
|
|
|
3904
3919
|
const { classes } = useStyles$7();
|
|
3905
3920
|
const routine = !props.resource.priority || props.resource.priority === 'routine';
|
|
3906
3921
|
const className = routine ? undefined : classes.pinnedComment;
|
|
3907
|
-
return (React.createElement(TimelineItem, { resource: props.resource, profile: props.resource.sender, padding: true, className: className, popupMenuItems: React.createElement(TimelineItemPopupMenu, { ...props }) },
|
|
3922
|
+
return (React.createElement(TimelineItem, { resource: props.resource, profile: props.resource.sender, dateTime: props.resource.sent, padding: true, className: className, popupMenuItems: React.createElement(TimelineItemPopupMenu, { ...props }) },
|
|
3908
3923
|
React.createElement("p", null, props.resource.payload?.[0]?.contentString)));
|
|
3909
3924
|
}
|
|
3910
3925
|
function MediaTimelineItem(props) {
|
|
@@ -4000,6 +4015,20 @@
|
|
|
4000
4015
|
return React.createElement(ResourcePropertyDisplay, { value: value[0] || '', propertyType: props.propertyType });
|
|
4001
4016
|
}
|
|
4002
4017
|
|
|
4018
|
+
function SearchExportDialog(props) {
|
|
4019
|
+
return (React.createElement(core$1.Modal, { title: "Export", closeButtonProps: { 'aria-label': 'Close' }, opened: props.visible, onClose: props.onCancel },
|
|
4020
|
+
React.createElement(core$1.Box, { display: "flex", sx: { justifyContent: 'space-between' } },
|
|
4021
|
+
props.exportCsv && React.createElement(ExportButton, { text: "CSV", exportLogic: props.exportCsv, onCancel: props.onCancel }),
|
|
4022
|
+
props.exportTransactionBundle && (React.createElement(ExportButton, { text: "Transaction Bundle", exportLogic: props.exportTransactionBundle, onCancel: props.onCancel }))),
|
|
4023
|
+
React.createElement(core$1.Text, { sx: { marginTop: '10px', marginLeft: '2px' } }, "Limited to 1000 records")));
|
|
4024
|
+
}
|
|
4025
|
+
function ExportButton(props) {
|
|
4026
|
+
return (React.createElement(core$1.Button, { onClick: () => {
|
|
4027
|
+
props.exportLogic();
|
|
4028
|
+
props.onCancel();
|
|
4029
|
+
} }, `Export as ${props.text}`));
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4003
4032
|
const searchParamToOperators = {
|
|
4004
4033
|
string: [core.Operator.EQUALS, core.Operator.NOT, core.Operator.CONTAINS, core.Operator.EXACT],
|
|
4005
4034
|
fulltext: [core.Operator.EQUALS, core.Operator.NOT, core.Operator.CONTAINS, core.Operator.EXACT],
|
|
@@ -5029,20 +5058,6 @@
|
|
|
5029
5058
|
return { name };
|
|
5030
5059
|
}
|
|
5031
5060
|
|
|
5032
|
-
function SearchExportDialog(props) {
|
|
5033
|
-
return (React.createElement(core$1.Modal, { title: "Export", closeButtonProps: { 'aria-label': 'Close' }, opened: props.visible, onClose: props.onCancel },
|
|
5034
|
-
React.createElement(core$1.Box, { display: "flex", sx: { justifyContent: 'space-between' } },
|
|
5035
|
-
props.exportCsv && React.createElement(ExportButton, { text: "CSV", exportLogic: props.exportCsv, onCancel: props.onCancel }),
|
|
5036
|
-
props.exportTransactionBundle && (React.createElement(ExportButton, { text: "Transaction Bundle", exportLogic: props.exportTransactionBundle, onCancel: props.onCancel }))),
|
|
5037
|
-
React.createElement(core$1.Text, { sx: { marginTop: '10px', marginLeft: '2px' } }, "Limited to 1000 records")));
|
|
5038
|
-
}
|
|
5039
|
-
function ExportButton(props) {
|
|
5040
|
-
return (React.createElement(core$1.Button, { onClick: () => {
|
|
5041
|
-
props.exportLogic();
|
|
5042
|
-
props.onCancel();
|
|
5043
|
-
} }, `Export as ${props.text}`));
|
|
5044
|
-
}
|
|
5045
|
-
|
|
5046
5061
|
class SearchChangeEvent extends Event {
|
|
5047
5062
|
constructor(definition) {
|
|
5048
5063
|
super('change');
|
|
@@ -5116,7 +5131,7 @@
|
|
|
5116
5131
|
React.useEffect(() => {
|
|
5117
5132
|
setOutcome(undefined);
|
|
5118
5133
|
medplum
|
|
5119
|
-
.search(search.resourceType, core.formatSearchQuery({ ...search, total: '
|
|
5134
|
+
.search(search.resourceType, core.formatSearchQuery({ ...search, total: search.total ?? 'estimate', fields: undefined }))
|
|
5120
5135
|
.then((response) => {
|
|
5121
5136
|
setState({ ...stateRef.current, searchResponse: response });
|
|
5122
5137
|
if (onLoad) {
|
|
@@ -7489,7 +7504,7 @@
|
|
|
7489
7504
|
* 5) Success - Return to the caller with either a code or a redirect
|
|
7490
7505
|
*/
|
|
7491
7506
|
function SignInForm(props) {
|
|
7492
|
-
const { chooseScopes, onSuccess, onForgotPassword, onRegister, onCode, ...baseLoginRequest } = props;
|
|
7507
|
+
const { login: loginCode, chooseScopes, onSuccess, onForgotPassword, onRegister, onCode, ...baseLoginRequest } = props;
|
|
7493
7508
|
const medplum = useMedplum();
|
|
7494
7509
|
const [login, setLogin] = React.useState(undefined);
|
|
7495
7510
|
const [mfaRequired, setAuthenticatorRequired] = React.useState(false);
|
|
@@ -7530,13 +7545,17 @@
|
|
|
7530
7545
|
handleCode(response.code);
|
|
7531
7546
|
}, [handleCode]);
|
|
7532
7547
|
React.useEffect(() => {
|
|
7533
|
-
|
|
7548
|
+
// Beware the race condition here
|
|
7549
|
+
// The `useMedplum` hook will return a new instance of the MedplumClient on login
|
|
7550
|
+
// We do not want to request the login status again in that case
|
|
7551
|
+
// Only request login status once
|
|
7552
|
+
if (loginCode && !login) {
|
|
7534
7553
|
medplum
|
|
7535
|
-
.get('auth/login/' +
|
|
7554
|
+
.get('auth/login/' + loginCode)
|
|
7536
7555
|
.then(handleAuthResponse)
|
|
7537
7556
|
.catch(console.error);
|
|
7538
7557
|
}
|
|
7539
|
-
}, [medplum,
|
|
7558
|
+
}, [medplum, loginCode, login, handleAuthResponse]);
|
|
7540
7559
|
return (React.createElement(Document, { width: 450 }, (() => {
|
|
7541
7560
|
if (!login) {
|
|
7542
7561
|
return (React.createElement(AuthenticationForm, { onForgotPassword: onForgotPassword, onRegister: onRegister, handleAuthResponse: handleAuthResponse, disableGoogleAuth: props.disableGoogleAuth, ...baseLoginRequest }, props.children));
|