@medplum/react 2.0.15 → 2.0.16

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 (90) hide show
  1. package/dist/cjs/index.cjs +47 -46
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.min.cjs +1 -1
  4. package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs +6 -5
  5. package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs.map +1 -1
  6. package/dist/esm/CodeInput/CodeInput.mjs +1 -1
  7. package/dist/esm/CodeInput/CodeInput.mjs.map +1 -1
  8. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +2 -2
  9. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -1
  10. package/dist/esm/index.min.mjs +1 -1
  11. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -1
  12. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -1
  13. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -1
  14. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -1
  15. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +1 -1
  16. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -1
  17. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +1 -1
  18. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -1
  19. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +1 -1
  20. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -1
  21. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +1 -1
  22. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -1
  23. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +1 -1
  24. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -1
  25. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +1 -1
  26. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -1
  27. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +1 -1
  28. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -1
  29. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +1 -1
  30. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -1
  31. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +1 -1
  32. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -1
  33. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -1
  34. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -1
  35. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +1 -1
  36. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -1
  37. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +1 -1
  38. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -1
  39. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +1 -1
  40. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -1
  41. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +1 -1
  42. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -1
  43. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +1 -1
  44. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -1
  45. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +1 -1
  46. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -1
  47. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +1 -1
  48. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -1
  49. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +1 -1
  50. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -1
  51. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +1 -1
  52. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -1
  53. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +1 -1
  54. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -1
  55. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +1 -1
  56. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -1
  57. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +1 -1
  58. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -1
  59. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +1 -1
  60. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -1
  61. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +1 -1
  62. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -1
  63. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +1 -1
  64. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -1
  65. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +1 -1
  66. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -1
  67. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +1 -1
  68. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -1
  69. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +1 -1
  70. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -1
  71. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +1 -1
  72. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -1
  73. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +1 -1
  74. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -1
  75. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +1 -1
  76. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -1
  77. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +1 -1
  78. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -1
  79. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +1 -1
  80. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -1
  81. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +1 -1
  82. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -1
  83. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +1 -1
  84. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -1
  85. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -1
  86. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -1
  87. package/dist/types/AsyncAutocomplete/AsyncAutocomplete.d.ts +1 -0
  88. package/dist/types/CodeInput/CodeInput.d.ts +4 -0
  89. package/dist/types/ValueSetAutocomplete/ValueSetAutocomplete.d.ts +2 -0
  90. package/package.json +16 -16
@@ -186,7 +186,7 @@
186
186
  }
187
187
 
188
188
  function AsyncAutocomplete(props) {
189
- const { defaultValue, toKey, toOption, loadOptions, onChange, onCreate, ...rest } = props;
189
+ const { defaultValue, toKey, toOption, loadOptions, onChange, onCreate, creatable, ...rest } = props;
190
190
  const defaultItems = toDefaultItems(defaultValue);
191
191
  const inputRef = React.useRef(null);
192
192
  const [lastValue, setLastValue] = React.useState(undefined);
@@ -244,13 +244,14 @@
244
244
  const result = [];
245
245
  for (const value of values) {
246
246
  let item = optionsRef.current?.find((option) => option.value === value)?.resource;
247
- if (!item) {
247
+ if (!item && creatable !== false) {
248
248
  item = onCreate(value);
249
249
  }
250
- result.push(item);
250
+ if (item)
251
+ result.push(item);
251
252
  }
252
253
  onChange(result);
253
- }, [onChange, onCreate]);
254
+ }, [creatable, onChange, onCreate]);
254
255
  const handleKeyDown = React.useCallback((e) => {
255
256
  if (e.key === 'Enter') {
256
257
  if (!timerRef.current && !abortControllerRef.current) {
@@ -280,7 +281,7 @@
280
281
  }
281
282
  };
282
283
  }, []);
283
- return (React.createElement(core$1.MultiSelect, { ...rest, ref: inputRef, defaultValue: defaultItems.map(toKey), searchable: true, onKeyDown: handleKeyDown, onSearchChange: handleSearchChange, data: options, onFocus: handleTimer, onChange: handleChange, onCreate: handleCreate, rightSectionWidth: 40, rightSection: abortController ? React.createElement(core$1.Loader, { size: 16 }) : null, filter: handleFilter }));
284
+ return (React.createElement(core$1.MultiSelect, { ...rest, ref: inputRef, defaultValue: defaultItems.map(toKey), searchable: true, onKeyDown: handleKeyDown, onSearchChange: handleSearchChange, data: options, onFocus: handleTimer, onChange: handleChange, onCreate: handleCreate, rightSectionWidth: 40, rightSection: abortController ? React.createElement(core$1.Loader, { size: 16 }) : null, filter: handleFilter, creatable: true }));
284
285
  }
285
286
  function toDefaultItems(defaultValue) {
286
287
  if (!defaultValue) {
@@ -315,7 +316,7 @@
315
316
  }
316
317
 
317
318
  /**
318
- * @tabler/icons-react v2.14.0 - MIT
319
+ * @tabler/icons-react v2.16.0 - MIT
319
320
  */
320
321
 
321
322
  var defaultAttributes = {
@@ -331,7 +332,7 @@
331
332
  };
332
333
 
333
334
  /**
334
- * @tabler/icons-react v2.14.0 - MIT
335
+ * @tabler/icons-react v2.16.0 - MIT
335
336
  */
336
337
 
337
338
  var __defProp = Object.defineProperty;
@@ -394,7 +395,7 @@
394
395
  };
395
396
 
396
397
  /**
397
- * @tabler/icons-react v2.14.0 - MIT
398
+ * @tabler/icons-react v2.16.0 - MIT
398
399
  */
399
400
 
400
401
  var IconAdjustmentsHorizontal = createReactComponent(
@@ -414,7 +415,7 @@
414
415
  );
415
416
 
416
417
  /**
417
- * @tabler/icons-react v2.14.0 - MIT
418
+ * @tabler/icons-react v2.16.0 - MIT
418
419
  */
419
420
 
420
421
  var IconAlertCircle = createReactComponent("alert-circle", "IconAlertCircle", [
@@ -424,7 +425,7 @@
424
425
  ]);
425
426
 
426
427
  /**
427
- * @tabler/icons-react v2.14.0 - MIT
428
+ * @tabler/icons-react v2.16.0 - MIT
428
429
  */
429
430
 
430
431
  var IconBleachOff = createReactComponent("bleach-off", "IconBleachOff", [
@@ -439,7 +440,7 @@
439
440
  ]);
440
441
 
441
442
  /**
442
- * @tabler/icons-react v2.14.0 - MIT
443
+ * @tabler/icons-react v2.16.0 - MIT
443
444
  */
444
445
 
445
446
  var IconBleach = createReactComponent("bleach", "IconBleach", [
@@ -453,7 +454,7 @@
453
454
  ]);
454
455
 
455
456
  /**
456
- * @tabler/icons-react v2.14.0 - MIT
457
+ * @tabler/icons-react v2.16.0 - MIT
457
458
  */
458
459
 
459
460
  var IconBoxMultiple = createReactComponent("box-multiple", "IconBoxMultiple", [
@@ -474,7 +475,7 @@
474
475
  ]);
475
476
 
476
477
  /**
477
- * @tabler/icons-react v2.14.0 - MIT
478
+ * @tabler/icons-react v2.16.0 - MIT
478
479
  */
479
480
 
480
481
  var IconBracketsContain = createReactComponent("brackets-contain", "IconBracketsContain", [
@@ -486,7 +487,7 @@
486
487
  ]);
487
488
 
488
489
  /**
489
- * @tabler/icons-react v2.14.0 - MIT
490
+ * @tabler/icons-react v2.16.0 - MIT
490
491
  */
491
492
 
492
493
  var IconBucketOff = createReactComponent("bucket-off", "IconBucketOff", [
@@ -508,7 +509,7 @@
508
509
  ]);
509
510
 
510
511
  /**
511
- * @tabler/icons-react v2.14.0 - MIT
512
+ * @tabler/icons-react v2.16.0 - MIT
512
513
  */
513
514
 
514
515
  var IconBucket = createReactComponent("bucket", "IconBucket", [
@@ -523,7 +524,7 @@
523
524
  ]);
524
525
 
525
526
  /**
526
- * @tabler/icons-react v2.14.0 - MIT
527
+ * @tabler/icons-react v2.16.0 - MIT
527
528
  */
528
529
 
529
530
  var IconCalendar = createReactComponent("calendar", "IconCalendar", [
@@ -542,7 +543,7 @@
542
543
  ]);
543
544
 
544
545
  /**
545
- * @tabler/icons-react v2.14.0 - MIT
546
+ * @tabler/icons-react v2.16.0 - MIT
546
547
  */
547
548
 
548
549
  var IconCheck = createReactComponent("check", "IconCheck", [
@@ -550,7 +551,7 @@
550
551
  ]);
551
552
 
552
553
  /**
553
- * @tabler/icons-react v2.14.0 - MIT
554
+ * @tabler/icons-react v2.16.0 - MIT
554
555
  */
555
556
 
556
557
  var IconCheckbox = createReactComponent("checkbox", "IconCheckbox", [
@@ -565,7 +566,7 @@
565
566
  ]);
566
567
 
567
568
  /**
568
- * @tabler/icons-react v2.14.0 - MIT
569
+ * @tabler/icons-react v2.16.0 - MIT
569
570
  */
570
571
 
571
572
  var IconCircleMinus = createReactComponent("circle-minus", "IconCircleMinus", [
@@ -574,7 +575,7 @@
574
575
  ]);
575
576
 
576
577
  /**
577
- * @tabler/icons-react v2.14.0 - MIT
578
+ * @tabler/icons-react v2.16.0 - MIT
578
579
  */
579
580
 
580
581
  var IconCirclePlus = createReactComponent("circle-plus", "IconCirclePlus", [
@@ -584,7 +585,7 @@
584
585
  ]);
585
586
 
586
587
  /**
587
- * @tabler/icons-react v2.14.0 - MIT
588
+ * @tabler/icons-react v2.16.0 - MIT
588
589
  */
589
590
 
590
591
  var IconCloudUpload = createReactComponent("cloud-upload", "IconCloudUpload", [
@@ -600,7 +601,7 @@
600
601
  ]);
601
602
 
602
603
  /**
603
- * @tabler/icons-react v2.14.0 - MIT
604
+ * @tabler/icons-react v2.16.0 - MIT
604
605
  */
605
606
 
606
607
  var IconColumns = createReactComponent("columns", "IconColumns", [
@@ -615,7 +616,7 @@
615
616
  ]);
616
617
 
617
618
  /**
618
- * @tabler/icons-react v2.14.0 - MIT
619
+ * @tabler/icons-react v2.16.0 - MIT
619
620
  */
620
621
 
621
622
  var IconCurrencyDollar = createReactComponent("currency-dollar", "IconCurrencyDollar", [
@@ -630,7 +631,7 @@
630
631
  ]);
631
632
 
632
633
  /**
633
- * @tabler/icons-react v2.14.0 - MIT
634
+ * @tabler/icons-react v2.16.0 - MIT
634
635
  */
635
636
 
636
637
  var IconDots = createReactComponent("dots", "IconDots", [
@@ -640,7 +641,7 @@
640
641
  ]);
641
642
 
642
643
  /**
643
- * @tabler/icons-react v2.14.0 - MIT
644
+ * @tabler/icons-react v2.16.0 - MIT
644
645
  */
645
646
 
646
647
  var IconEdit = createReactComponent("edit", "IconEdit", [
@@ -662,7 +663,7 @@
662
663
  ]);
663
664
 
664
665
  /**
665
- * @tabler/icons-react v2.14.0 - MIT
666
+ * @tabler/icons-react v2.16.0 - MIT
666
667
  */
667
668
 
668
669
  var IconEqualNot = createReactComponent("equal-not", "IconEqualNot", [
@@ -672,7 +673,7 @@
672
673
  ]);
673
674
 
674
675
  /**
675
- * @tabler/icons-react v2.14.0 - MIT
676
+ * @tabler/icons-react v2.16.0 - MIT
676
677
  */
677
678
 
678
679
  var IconEqual = createReactComponent("equal", "IconEqual", [
@@ -681,7 +682,7 @@
681
682
  ]);
682
683
 
683
684
  /**
684
- * @tabler/icons-react v2.14.0 - MIT
685
+ * @tabler/icons-react v2.16.0 - MIT
685
686
  */
686
687
 
687
688
  var IconFileAlert = createReactComponent("file-alert", "IconFileAlert", [
@@ -698,7 +699,7 @@
698
699
  ]);
699
700
 
700
701
  /**
701
- * @tabler/icons-react v2.14.0 - MIT
702
+ * @tabler/icons-react v2.16.0 - MIT
702
703
  */
703
704
 
704
705
  var IconFilePlus = createReactComponent("file-plus", "IconFilePlus", [
@@ -715,7 +716,7 @@
715
716
  ]);
716
717
 
717
718
  /**
718
- * @tabler/icons-react v2.14.0 - MIT
719
+ * @tabler/icons-react v2.16.0 - MIT
719
720
  */
720
721
 
721
722
  var IconFilter = createReactComponent("filter", "IconFilter", [
@@ -729,7 +730,7 @@
729
730
  ]);
730
731
 
731
732
  /**
732
- * @tabler/icons-react v2.14.0 - MIT
733
+ * @tabler/icons-react v2.16.0 - MIT
733
734
  */
734
735
 
735
736
  var IconListDetails = createReactComponent("list-details", "IconListDetails", [
@@ -754,7 +755,7 @@
754
755
  ]);
755
756
 
756
757
  /**
757
- * @tabler/icons-react v2.14.0 - MIT
758
+ * @tabler/icons-react v2.16.0 - MIT
758
759
  */
759
760
 
760
761
  var IconMathGreater = createReactComponent("math-greater", "IconMathGreater", [
@@ -762,7 +763,7 @@
762
763
  ]);
763
764
 
764
765
  /**
765
- * @tabler/icons-react v2.14.0 - MIT
766
+ * @tabler/icons-react v2.16.0 - MIT
766
767
  */
767
768
 
768
769
  var IconMathLower = createReactComponent("math-lower", "IconMathLower", [
@@ -770,7 +771,7 @@
770
771
  ]);
771
772
 
772
773
  /**
773
- * @tabler/icons-react v2.14.0 - MIT
774
+ * @tabler/icons-react v2.16.0 - MIT
774
775
  */
775
776
 
776
777
  var IconMessage = createReactComponent("message", "IconMessage", [
@@ -786,7 +787,7 @@
786
787
  ]);
787
788
 
788
789
  /**
789
- * @tabler/icons-react v2.14.0 - MIT
790
+ * @tabler/icons-react v2.16.0 - MIT
790
791
  */
791
792
 
792
793
  var IconPin = createReactComponent("pin", "IconPin", [
@@ -802,7 +803,7 @@
802
803
  ]);
803
804
 
804
805
  /**
805
- * @tabler/icons-react v2.14.0 - MIT
806
+ * @tabler/icons-react v2.16.0 - MIT
806
807
  */
807
808
 
808
809
  var IconPinnedOff = createReactComponent("pinned-off", "IconPinnedOff", [
@@ -819,7 +820,7 @@
819
820
  ]);
820
821
 
821
822
  /**
822
- * @tabler/icons-react v2.14.0 - MIT
823
+ * @tabler/icons-react v2.16.0 - MIT
823
824
  */
824
825
 
825
826
  var IconSettings = createReactComponent("settings", "IconSettings", [
@@ -834,7 +835,7 @@
834
835
  ]);
835
836
 
836
837
  /**
837
- * @tabler/icons-react v2.14.0 - MIT
838
+ * @tabler/icons-react v2.16.0 - MIT
838
839
  */
839
840
 
840
841
  var IconSortAscending = createReactComponent("sort-ascending", "IconSortAscending", [
@@ -846,7 +847,7 @@
846
847
  ]);
847
848
 
848
849
  /**
849
- * @tabler/icons-react v2.14.0 - MIT
850
+ * @tabler/icons-react v2.16.0 - MIT
850
851
  */
851
852
 
852
853
  var IconSortDescending = createReactComponent("sort-descending", "IconSortDescending", [
@@ -858,7 +859,7 @@
858
859
  ]);
859
860
 
860
861
  /**
861
- * @tabler/icons-react v2.14.0 - MIT
862
+ * @tabler/icons-react v2.16.0 - MIT
862
863
  */
863
864
 
864
865
  var IconSquare = createReactComponent("square", "IconSquare", [
@@ -872,7 +873,7 @@
872
873
  ]);
873
874
 
874
875
  /**
875
- * @tabler/icons-react v2.14.0 - MIT
876
+ * @tabler/icons-react v2.16.0 - MIT
876
877
  */
877
878
 
878
879
  var IconTableExport = createReactComponent("table-export", "IconTableExport", [
@@ -890,7 +891,7 @@
890
891
  ]);
891
892
 
892
893
  /**
893
- * @tabler/icons-react v2.14.0 - MIT
894
+ * @tabler/icons-react v2.16.0 - MIT
894
895
  */
895
896
 
896
897
  var IconTrash = createReactComponent("trash", "IconTrash", [
@@ -905,7 +906,7 @@
905
906
  ]);
906
907
 
907
908
  /**
908
- * @tabler/icons-react v2.14.0 - MIT
909
+ * @tabler/icons-react v2.16.0 - MIT
909
910
  */
910
911
 
911
912
  var IconX = createReactComponent("x", "IconX", [
@@ -2078,7 +2079,7 @@
2078
2079
  */
2079
2080
  function ValueSetAutocomplete(props) {
2080
2081
  const medplum = useMedplum();
2081
- const { elementDefinition, ...rest } = props;
2082
+ const { elementDefinition, creatable, clearable, ...rest } = props;
2082
2083
  const loadValues = React.useCallback(async (input, signal) => {
2083
2084
  const system = elementDefinition.binding?.valueSet;
2084
2085
  const valueSet = await medplum.searchValueSet(system, input, { signal });
@@ -2091,7 +2092,7 @@
2091
2092
  }
2092
2093
  return newData;
2093
2094
  }, [medplum, elementDefinition]);
2094
- return (React.createElement(AsyncAutocomplete, { ...rest, creatable: true, clearable: true, toKey: toKey, toOption: toOption, loadOptions: loadValues, getCreateLabel: (query) => `+ Create ${query}`, onCreate: createValue }));
2095
+ 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}` }));
2095
2096
  }
2096
2097
  function getDisplay(item) {
2097
2098
  return item.display || item.code || '';
@@ -2138,7 +2139,7 @@
2138
2139
  props.onChange(newCode);
2139
2140
  }
2140
2141
  }
2141
- return (React.createElement(ValueSetAutocomplete, { elementDefinition: props.property, name: props.name, placeholder: props.placeholder, defaultValue: codeToValueSetElement(value), onChange: handleChange }));
2142
+ return (React.createElement(ValueSetAutocomplete, { elementDefinition: props.property, name: props.name, placeholder: props.placeholder, defaultValue: codeToValueSetElement(value), onChange: handleChange, creatable: props.creatable, maxSelectedValues: props.maxSelectedValues, clearSearchOnChange: props.clearSearchOnChange, clearable: props.clearable }));
2142
2143
  }
2143
2144
  function codeToValueSetElement(code) {
2144
2145
  return code ? { code } : undefined;