@oliasoft-open-source/react-ui-library 4.6.9-beta-1 → 4.6.9

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 (134) hide show
  1. package/dist/404.html +1 -0
  2. package/dist/global.css +16 -10
  3. package/dist/index.d.ts +0 -22
  4. package/dist/index.js +17 -158
  5. package/dist/index.js.map +1 -1
  6. package/dist/storybook/assets/Color-6VNJS4EI-1eo1__DT.js +1 -0
  7. package/dist/storybook/assets/DocsRenderer-NNNQARDV-aoNHbEci.js +1 -0
  8. package/dist/storybook/assets/WithTooltip-V3YHNWJZ-ErNWY4cb.js +1 -0
  9. package/dist/storybook/assets/{accordion-M-sY23Hd.js → accordion-MRdNs3mQ.js} +1 -1
  10. package/dist/storybook/assets/{accordion.stories-rvf_KSkf.js → accordion.stories-vkAG8pCs.js} +2 -2
  11. package/dist/storybook/assets/{actions-eW7plDvv.js → actions-0lKGEXVi.js} +1 -1
  12. package/dist/storybook/assets/{actions.stories-v91cA8Aa.js → actions.stories-1G9apUqW.js} +1 -1
  13. package/dist/storybook/assets/{afe.stories-O_jbxAft.js → afe.stories-YtbvNBzx.js} +2 -2
  14. package/dist/storybook/assets/{badge.stories-AQYzIvli.js → badge.stories-YE5hHtSe.js} +1 -1
  15. package/dist/storybook/assets/{blowout.stories-Vff9htu-.js → blowout.stories-xSwBWe5T.js} +1 -1
  16. package/dist/storybook/assets/{button-group-rkjreZ1T.js → button-group-0RTzcUIP.js} +1 -1
  17. package/dist/storybook/assets/{button-group.stories-HnVY5ZDT.js → button-group.stories-eQ5h-50o.js} +1 -1
  18. package/dist/storybook/assets/{button-yLYf8aC9.js → button-pSDG6Ka2.js} +1 -1
  19. package/dist/storybook/assets/{button.stories-sp9SbrbR.js → button.stories-QDP0P6s7.js} +6 -6
  20. package/dist/storybook/assets/{buttons-and-links-7YupNRlV.js → buttons-and-links-p30K0Do5.js} +2 -2
  21. package/dist/storybook/assets/{card.stories--XA-NPtn.js → card.stories-nEB15GEp.js} +1 -1
  22. package/dist/storybook/assets/{casing-loads.stories-6R0hRdCq.js → casing-loads.stories-U0mhQR0j.js} +2 -2
  23. package/dist/storybook/assets/{cell.stories-aDJ0YBLq.js → cell.stories-B3AOLpY-.js} +2 -2
  24. package/dist/storybook/assets/{check-box-TRAFDvOc.js → check-box--ih7cmR1.js} +1 -1
  25. package/dist/storybook/assets/{check-box.stories-xj8y4pvN.js → check-box.stories-WFbOF7kK.js} +1 -1
  26. package/dist/storybook/assets/{chunk-HLWAVYOI-XLYdcxXs.js → chunk-HLWAVYOI-WkQ4Cm3Z.js} +1 -1
  27. package/dist/storybook/assets/color-s6LuWL0q.js +25 -0
  28. package/dist/storybook/assets/{column.stories-wGhSlroa.js → column.stories-uR7F6GLZ.js} +1 -1
  29. package/dist/storybook/assets/{dialog--p0h3TPY.js → dialog-dxh28VYR.js} +1 -1
  30. package/dist/storybook/assets/{drawer-NuViVQqw.js → drawer-fq99yzU7.js} +1 -1
  31. package/dist/storybook/assets/{drawer.stories-mIhzICjZ.js → drawer.stories-zos7-Jef.js} +2 -2
  32. package/dist/storybook/assets/{empty.stories-3hs4gUgZ.js → empty.stories-V5nX7JMj.js} +1 -1
  33. package/dist/storybook/assets/extends-dGVwEr9R.js +1 -0
  34. package/dist/storybook/assets/{field-UZtORY6D.js → field-V2qkm8ON.js} +1 -1
  35. package/dist/storybook/assets/{field.stories-DPmPvDCm.js → field.stories-oQ-oKw9H.js} +1 -1
  36. package/dist/storybook/assets/{file-input.stories-ZuAa6172.js → file-input.stories-XcFcvaRO.js} +1 -1
  37. package/dist/storybook/assets/{flex.stories-7GcqtV92.js → flex.stories-rUC8irnS.js} +1 -1
  38. package/dist/storybook/assets/footer.stories-k6rh7UPl.js +3 -0
  39. package/dist/storybook/assets/form.stories-3u-gV_S3.js +49 -0
  40. package/dist/storybook/assets/formation.stories-6BhTfsma.js +74 -0
  41. package/dist/storybook/assets/{formatter-SWP5E3XI-yKw2uSJu.js → formatter-SWP5E3XI--nqYbggP.js} +2 -2
  42. package/dist/storybook/assets/{heading-AvGkZ8ae.js → heading-OSdaYHYE.js} +1 -1
  43. package/dist/storybook/assets/{heading.stories-aJs549tG.js → heading.stories-YhoAJ5xD.js} +1 -1
  44. package/dist/storybook/assets/{help-icon-4sFVvBkZ.js → help-icon-jdxRTcvs.js} +1 -1
  45. package/dist/storybook/assets/{help-icon.stories-9Apwwl_z.js → help-icon.stories-NKBYmv_o.js} +1 -1
  46. package/dist/storybook/assets/icon-_m67DAr0.js +8 -0
  47. package/dist/storybook/assets/{icon.stories-j-b_Exev.js → icon.stories-2aZia1VV.js} +1 -1
  48. package/dist/storybook/assets/iframe-X1NUWeTb.js +7 -0
  49. package/dist/storybook/assets/{index-oOnKy0ih.js → index-R7Ckhs28.js} +5 -5
  50. package/dist/storybook/assets/{index.es-VXFRDikp.js → index.es-HG2GUH9i.js} +4 -4
  51. package/dist/storybook/assets/inheritsLoose-Y9jOMJLd.js +1 -0
  52. package/dist/storybook/assets/{input-group.stories-wQfcKDtd.js → input-group.stories-HXoMZkHB.js} +2 -2
  53. package/dist/storybook/assets/{input-validation-ZAH73PKA.js → input-validation-IDZJeXOY.js} +2 -2
  54. package/dist/storybook/assets/{inputs-q_polzRu.js → inputs-xo-Po7-d.js} +2 -2
  55. package/dist/storybook/assets/{label-am612zWx.js → label-KLaw_y6R.js} +1 -1
  56. package/dist/storybook/assets/{label.stories-QPyTvO7T.js → label.stories-8KngvJd3.js} +1 -1
  57. package/dist/storybook/assets/layout-forms-Ewi7_paM.js +16 -0
  58. package/dist/storybook/assets/{layout-general-lhXJ2QUn.js → layout-general-OlLddh78.js} +2 -2
  59. package/dist/storybook/assets/{list-LWmKQq1G.js → list-HBgplEUa.js} +1 -1
  60. package/dist/storybook/assets/{list.stories-fgw3Kx3W.js → list.stories-AC7IBnuA.js} +2 -2
  61. package/dist/storybook/assets/{list.stories-data-IWB082tu.js → list.stories-data-YuaX7eYb.js} +1 -1
  62. package/dist/storybook/assets/{loader.stories-NaDVDl7Z.js → loader.stories-A0lEe-_I.js} +1 -1
  63. package/dist/storybook/assets/{menu.stories-K4nBhFj_.js → menu.stories-wWr6qpLS.js} +6 -6
  64. package/dist/storybook/assets/{message-CRKuTfOl.js → message-bbAE2zjv.js} +1 -1
  65. package/dist/storybook/assets/{message.stories-CSw6ElMp.js → message.stories-rANJfalB.js} +1 -1
  66. package/dist/storybook/assets/{meta-content-70Z_mWPh.js → meta-content-xcMHnFul.js} +1 -1
  67. package/dist/storybook/assets/{modal.stories-10-XQKON.js → modal.stories-DEkkzVvu.js} +2 -2
  68. package/dist/storybook/assets/{number-input.stories-59JRvVcf.js → number-input.stories-oaHrqqEo.js} +5 -5
  69. package/dist/storybook/assets/{option-dropdown.stories-ZCnTHpeT.js → option-dropdown.stories-IIXgJvpF.js} +1 -1
  70. package/dist/storybook/assets/{padding-and-spacing-lItMcm8V.js → padding-and-spacing-W7joAZ1n.js} +2 -2
  71. package/dist/storybook/assets/{page.stories-GrhPKgmq.js → page.stories-jmoBCw29.js} +1 -1
  72. package/dist/storybook/assets/{pagination-yFWOmymz.js → pagination-LajpPl1E.js} +1 -1
  73. package/dist/storybook/assets/{pagination.stories-IahSsrYh.js → pagination.stories-QNaX-nfT.js} +2 -2
  74. package/dist/storybook/assets/{pop-confirm.stories-StkaY9mZ.js → pop-confirm.stories-qL_Z99O8.js} +1 -1
  75. package/dist/storybook/assets/{popover-YDVuwgEX.js → popover-dGHzPDyA.js} +1 -1
  76. package/dist/storybook/assets/popover.stories-4yXf4qke.js +1 -0
  77. package/dist/storybook/assets/{preview-H9heiVBM.js → preview-9eSgdbAd.js} +3 -3
  78. package/dist/storybook/assets/preview-y30x4kzm.js +7 -0
  79. package/dist/storybook/assets/projects.stories-gJiQXNLT.js +47 -0
  80. package/dist/storybook/assets/{radio-button-g10vtbgR.js → radio-button-YSXmxvG2.js} +1 -1
  81. package/dist/storybook/assets/{radio-button.stories-Lm3AgSPw.js → radio-button.stories-kcqjIFI9.js} +1 -1
  82. package/dist/storybook/assets/react-router-dom-4Z66xYqZ.js +8 -0
  83. package/dist/storybook/assets/{reservoirs.stories-UloVc7w8.js → reservoirs.stories-SK2d9Fio.js} +2 -2
  84. package/dist/storybook/assets/{rich-text-input.stories-g_yH3vr8.js → rich-text-input.stories-zaKtuZiu.js} +3 -3
  85. package/dist/storybook/assets/{row.stories-G_GPRlN5.js → row.stories-0uX-NeR0.js} +2 -2
  86. package/dist/storybook/assets/select-7lyQEtzA.js +1 -0
  87. package/dist/storybook/assets/{select.stories-XhlzQ7cL.js → select.stories-xDbB-kMM.js} +2 -2
  88. package/dist/storybook/assets/{side-bar-hJdv8LbH.js → side-bar-5P37lMUr.js} +1 -1
  89. package/dist/storybook/assets/{side-bar.stories-Yhz9jXs2.js → side-bar.stories-JTyeqg4a.js} +1 -1
  90. package/dist/storybook/assets/{site.stories-KJRfCDdv.js → site.stories-h1X4It52.js} +2 -2
  91. package/dist/storybook/assets/slider-bFd0qknB.js +7 -0
  92. package/dist/storybook/assets/{slider.stories-R5xGydpl.js → slider.stories-EBNa8dCL.js} +2 -2
  93. package/dist/storybook/assets/{spacer.stories-9tR72ZgH.js → spacer.stories-Bp11g7WY.js} +1 -1
  94. package/dist/storybook/assets/syntaxhighlighter-B5GMVT5T-oJPTVKRh.js +1 -0
  95. package/dist/storybook/assets/{table-oIcCiJqg.js → table-RgU6yJb4.js} +1 -1
  96. package/dist/storybook/assets/{table.stories-G14SBspc.js → table.stories-29gSWoQd.js} +2 -2
  97. package/dist/storybook/assets/{table.stories-data-Bg4REEx4.js → table.stories-data-RTVmMgbg.js} +1 -1
  98. package/dist/storybook/assets/text-link.stories-Plmiu8NV.js +14 -0
  99. package/dist/storybook/assets/{title.stories-fKMID_pc.js → title.stories-Mxx0XqVC.js} +3 -3
  100. package/dist/storybook/assets/{toaster-yPcd4ELJ.js → toaster-IL_npIpU.js} +1 -1
  101. package/dist/storybook/assets/{toaster.stories-4aAkEVaa.js → toaster.stories-2399ErHt.js} +1 -1
  102. package/dist/storybook/assets/{toggle-m3EwNS6z.js → toggle-KddTHsTd.js} +1 -1
  103. package/dist/storybook/assets/{toggle.stories-jaduywRN.js → toggle.stories-ZPLKo1CO.js} +1 -1
  104. package/dist/storybook/assets/{tooltip.test-case.stories-Sq5qLreq.js → tooltip.test-case.stories-e7KXJ1zz.js} +1 -1
  105. package/dist/storybook/assets/{top-bar-8ASbRXqr.js → top-bar-xIrfLvE9.js} +1 -1
  106. package/dist/storybook/assets/top-bar.stories-OWyuBUT6.js +21 -0
  107. package/dist/storybook/assets/{top-bar.testcase.stories-Yjz8R3nX.js → top-bar.testcase.stories-uu_mJjq3.js} +1 -1
  108. package/dist/storybook/assets/{tree.stories-VhgtyM-i.js → tree.stories-KFifRduQ.js} +1 -1
  109. package/dist/storybook/assets/{unit-input.stories--JK_4hwn.js → unit-input.stories-EPjs0Jo3.js} +1 -1
  110. package/dist/storybook/assets/unit-table.stories-mOn03M8e.js +142 -0
  111. package/dist/storybook/iframe.html +1 -1
  112. package/dist/storybook/project.json +1 -1
  113. package/package.json +1 -1
  114. package/dist/storybook/assets/Color-6VNJS4EI-Z5sK3XI3.js +0 -1
  115. package/dist/storybook/assets/DocsRenderer-NNNQARDV-V4NlgkVD.js +0 -1
  116. package/dist/storybook/assets/WithTooltip-V3YHNWJZ-n5RY-jXL.js +0 -1
  117. package/dist/storybook/assets/color-NxP93yaH.js +0 -25
  118. package/dist/storybook/assets/footer.stories-ZMPDPnnC.js +0 -3
  119. package/dist/storybook/assets/form.stories-raJ_-60i.js +0 -49
  120. package/dist/storybook/assets/formation.stories-hf47ETfS.js +0 -74
  121. package/dist/storybook/assets/icon-8EQazuuW.js +0 -8
  122. package/dist/storybook/assets/iframe-ZAYt1_h5.js +0 -7
  123. package/dist/storybook/assets/inheritsLoose-8sb_A2v4.js +0 -1
  124. package/dist/storybook/assets/layout-forms-7gaTsqRb.js +0 -16
  125. package/dist/storybook/assets/popover.stories-QeTPelqE.js +0 -1
  126. package/dist/storybook/assets/preview-k7tq6q9C.js +0 -7
  127. package/dist/storybook/assets/projects.stories-HDwAJ2lH.js +0 -47
  128. package/dist/storybook/assets/react-router-dom-EZH1n7K1.js +0 -8
  129. package/dist/storybook/assets/select-xiPCWaz8.js +0 -1
  130. package/dist/storybook/assets/slider-at3_DXQg.js +0 -7
  131. package/dist/storybook/assets/syntaxhighlighter-B5GMVT5T-gS3HJKcc.js +0 -1
  132. package/dist/storybook/assets/text-link.stories-Mx9ojcOC.js +0 -14
  133. package/dist/storybook/assets/top-bar.stories-9LS979MG.js +0 -21
  134. package/dist/storybook/assets/unit-table.stories-ddutc_iU.js +0 -142
package/dist/404.html ADDED
@@ -0,0 +1 @@
1
+ <!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-faqWAJWP.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-ChHypG1u.css"></head><body><div id="content"></div></body>
package/dist/global.css CHANGED
@@ -9653,22 +9653,28 @@ tbody tr {
9653
9653
  justify-content: space-between;
9654
9654
  border-top: 1px solid var(--color-border);
9655
9655
  }
9656
- ._clickableRow_11d5t_1 {
9656
+ ._clickableRow_1ki29_1 {
9657
9657
  cursor: pointer;
9658
9658
  }
9659
- ._hoverableRow_11d5t_4:not(._rowActive_11d5t_4):hover,
9660
- ._clickableRow_11d5t_1:not(._rowActive_11d5t_4):hover {
9659
+ ._hoverableRow_1ki29_4:not(._rowActive_1ki29_4):hover,
9660
+ ._clickableRow_1ki29_1:not(._rowActive_1ki29_4):hover {
9661
9661
  background-color: var(--color-background-listitem-hover) !important;
9662
9662
  }
9663
- ._expandableRow_11d5t_8._flush_11d5t_8 {
9663
+ ._expandableRow_1ki29_8._flush_1ki29_8 {
9664
9664
  padding: 0 !important;
9665
9665
  height: auto !important;
9666
9666
  }
9667
- ._rowActive_11d5t_4 {
9667
+ ._errorRow_1ki29_12 {
9668
+ background-color: var(--color-background-error-muted) !important;
9669
+ }
9670
+ ._warningRow_1ki29_15 {
9671
+ background-color: var(--color-background-warning-muted) !important;
9672
+ }
9673
+ ._rowActive_1ki29_4 {
9668
9674
  position: relative;
9669
9675
  background-color: var(--color-background-listitem-active) !important;
9670
9676
  }
9671
- ._rowActive_11d5t_4:after {
9677
+ ._rowActive_1ki29_4:after {
9672
9678
  content: '';
9673
9679
  position: absolute;
9674
9680
  left: 0;
@@ -9680,12 +9686,12 @@ tbody tr {
9680
9686
  transition: background 0.3s;
9681
9687
  background: var(--color-background-primary);
9682
9688
  }
9683
- ._dragIconCell_11d5t_28 {
9689
+ ._dragIconCell_1ki29_34 {
9684
9690
  width: var(--size);
9685
9691
  min-width: var(--size);
9686
9692
  position: relative;
9687
9693
  }
9688
- ._dragIcon_11d5t_28 {
9694
+ ._dragIcon_1ki29_34 {
9689
9695
  display: flex;
9690
9696
  align-items: center;
9691
9697
  justify-content: center;
@@ -9693,10 +9699,10 @@ tbody tr {
9693
9699
  inset: 0;
9694
9700
  color: var(--color-text-faint);
9695
9701
  }
9696
- ._dragIcon_11d5t_28:hover {
9702
+ ._dragIcon_1ki29_34:hover {
9697
9703
  color: var(--color-text-primary-hover);
9698
9704
  }
9699
- ._dragIcon_11d5t_28:active {
9705
+ ._dragIcon_1ki29_34:active {
9700
9706
  color: var(--color-text-primary-active);
9701
9707
  }
9702
9708
  ._inputInTable_u3xdj_1 {
package/dist/index.d.ts CHANGED
@@ -1666,8 +1666,6 @@ export declare const SideBar: React_2.MemoExoticComponent<({ options, startOpen,
1666
1666
 
1667
1667
  export declare const Slider: ({ name, label, width, labelWidth, value, min, max, step, marks, showArrows, showTooltip, tooltipFormatter, disabled, range, small, vertical, onChange, }: ISliderProps) => JSX_2.Element;
1668
1668
 
1669
- export declare const SmartUploadModal: ({ visible, prompt, onCloseModal, onUpload, onComplete, onFailed, onError, width, heading, dialogText, fileInputText, fileInputPlaceholder, uploadText, cancelText, testId, }: TSmartUploadModalProps) => JSX_2.Element;
1670
-
1671
1669
  export declare const Spacer: ({ height, width, flex, }: ISpacerProps) => JSX_2.Element;
1672
1670
 
1673
1671
  export declare const Spinner: ({ small, colored, dark, tiny, }: ISpinnerProps) => JSX_2.Element;
@@ -1803,26 +1801,6 @@ declare type TSliderMark = {
1803
1801
  tooltip?: number | string | ReactNode;
1804
1802
  };
1805
1803
 
1806
- export declare type TSmartUploadModalProps = {
1807
- visible: boolean;
1808
- prompt: string;
1809
- onCloseModal: () => void;
1810
- onUpload: (prompt: string, file: File) => any;
1811
- onComplete: (data: {
1812
- [key: string]: string;
1813
- }[]) => void;
1814
- onFailed?: () => void;
1815
- onError?: (error: any) => void;
1816
- width?: number;
1817
- heading?: string;
1818
- dialogText?: string;
1819
- fileInputText?: string;
1820
- fileInputPlaceholder?: string;
1821
- uploadText?: string;
1822
- cancelText?: string;
1823
- testId?: string;
1824
- };
1825
-
1826
1804
  declare type TStringNumberNull = string | number | null;
1827
1805
 
1828
1806
  declare type TStringOrNumber = string | number;
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import * as PropTypes from "prop-types";
11
11
  import PropTypes__default from "prop-types";
12
12
  import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
13
13
  import _$1, { set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isObjectLike, has as has$1, isEqual as isEqual$4 } from "lodash";
14
- import { roundToFixed, validateNumber, cleanNumStr, unitFromQuantity, isValueWithUnit, withUnit, convertSamePrecision, getValue as getValue$1, getUnit, KNOWN_UNITS, split as split$1, checkAndCleanDecimalComma, label as label$b, altUnitsList, getUnitsForQuantity, convertAndGetValue, isScientificStringNum, roundToPrecision, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
14
+ import { roundToFixed, validateNumber, cleanNumStr, unitFromQuantity, isValueWithUnit, withUnit, convertSamePrecision, getValue as getValue$1, getUnit, KNOWN_UNITS, split as split$1, checkAndCleanDecimalComma, label as label$b, altUnitsList, getUnitsForQuantity, convertAndGetValue, isScientificStringNum, roundToPrecision } from "@oliasoft-open-source/units";
15
15
  import { isValueWithUnit as isValueWithUnit$1 } from "@oliasoft-open-source/units/dist/units";
16
16
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
17
17
  function getDefaultExportFromCjs(x2) {
@@ -55562,19 +55562,23 @@ const TableScrollWrapper = ({
55562
55562
  }
55563
55563
  ) : children({ visibleRows }) });
55564
55564
  };
55565
- const clickableRow = "_clickableRow_11d5t_1";
55566
- const hoverableRow = "_hoverableRow_11d5t_4";
55567
- const rowActive = "_rowActive_11d5t_4";
55568
- const expandableRow = "_expandableRow_11d5t_8";
55569
- const flush2 = "_flush_11d5t_8";
55570
- const dragIconCell = "_dragIconCell_11d5t_28";
55571
- const dragIcon = "_dragIcon_11d5t_28";
55565
+ const clickableRow = "_clickableRow_1ki29_1";
55566
+ const hoverableRow = "_hoverableRow_1ki29_4";
55567
+ const rowActive = "_rowActive_1ki29_4";
55568
+ const expandableRow = "_expandableRow_1ki29_8";
55569
+ const flush2 = "_flush_1ki29_8";
55570
+ const errorRow = "_errorRow_1ki29_12";
55571
+ const warningRow = "_warningRow_1ki29_15";
55572
+ const dragIconCell = "_dragIconCell_1ki29_34";
55573
+ const dragIcon = "_dragIcon_1ki29_34";
55572
55574
  const styles$8 = {
55573
55575
  clickableRow,
55574
55576
  hoverableRow,
55575
55577
  rowActive,
55576
55578
  expandableRow,
55577
55579
  flush: flush2,
55580
+ errorRow,
55581
+ warningRow,
55578
55582
  dragIconCell,
55579
55583
  dragIcon
55580
55584
  };
@@ -56237,6 +56241,8 @@ const Row = ({
56237
56241
  onRowMouseEnter,
56238
56242
  onRowMouseLeave,
56239
56243
  expandedContent,
56244
+ error: error2,
56245
+ warning: warning2,
56240
56246
  active: active2
56241
56247
  } = row2;
56242
56248
  const cells = row2.cells.map((c2, i) => {
@@ -56328,7 +56334,9 @@ const Row = ({
56328
56334
  className: cx$2(
56329
56335
  onRowClick && !onRowClick.noStyle ? styles$8.clickableRow : null,
56330
56336
  onRowMouseEnter && !onRowMouseEnter.noStyle ? styles$8.hoverableRow : null,
56331
- active2 ? styles$8.rowActive : null
56337
+ active2 ? styles$8.rowActive : null,
56338
+ error2 ? styles$8.errorRow : null,
56339
+ warning2 ? styles$8.warningRow : null
56332
56340
  ),
56333
56341
  ref: (provided == null ? void 0 : provided.innerRef) || null,
56334
56342
  ...(provided == null ? void 0 : provided.draggableProps) || null,
@@ -70830,154 +70838,6 @@ const UnitTable = ({
70830
70838
  }
70831
70839
  );
70832
70840
  };
70833
- const INTERVAL_TIME = 250;
70834
- const REQUEST_TIME = 4e4;
70835
- const FINISH_INTERVALS = 20;
70836
- const FINISH_TIME = 500;
70837
- const SmartUploadModal = ({
70838
- visible,
70839
- prompt,
70840
- onCloseModal,
70841
- onUpload,
70842
- onComplete,
70843
- onFailed,
70844
- onError: onError3,
70845
- width: width2,
70846
- heading: heading2,
70847
- dialogText,
70848
- fileInputText,
70849
- fileInputPlaceholder,
70850
- uploadText,
70851
- cancelText,
70852
- testId
70853
- }) => {
70854
- const [file, setFile] = useState(void 0);
70855
- const [isFetching, setFetching] = useState(false);
70856
- const [requestTimer, setRequestTimer] = useState(0);
70857
- let timer = 0;
70858
- const updateTimer = () => {
70859
- const newTime = timer + INTERVAL_TIME;
70860
- timer = newTime;
70861
- setRequestTimer(timer);
70862
- };
70863
- const finishTimer = (deltaTime) => {
70864
- let newTime = timer + deltaTime;
70865
- if (newTime >= 0.99 * REQUEST_TIME) {
70866
- newTime = REQUEST_TIME;
70867
- }
70868
- timer = newTime;
70869
- setRequestTimer(timer);
70870
- };
70871
- useEffect(() => {
70872
- setFile(void 0);
70873
- }, [visible]);
70874
- const handleFileChange = (event) => {
70875
- if (!event.target.value)
70876
- return;
70877
- setFile(event.target.value);
70878
- };
70879
- const handleUpload = async () => {
70880
- setRequestTimer(0);
70881
- const id2 = setInterval(updateTimer, INTERVAL_TIME);
70882
- try {
70883
- if (!file)
70884
- return;
70885
- setFetching(true);
70886
- const data = await onUpload(prompt, file);
70887
- if (!visible)
70888
- return;
70889
- if (data) {
70890
- clearInterval(id2);
70891
- const id22 = setInterval(
70892
- finishTimer,
70893
- FINISH_TIME / FINISH_INTERVALS,
70894
- (REQUEST_TIME - timer) / (FINISH_INTERVALS - 1)
70895
- );
70896
- setTimeout(() => {
70897
- onComplete(data);
70898
- clearInterval(id22);
70899
- setFetching(false);
70900
- }, FINISH_TIME);
70901
- } else {
70902
- onFailed == null ? void 0 : onFailed();
70903
- setFetching(false);
70904
- }
70905
- } catch (error2) {
70906
- onError3 == null ? void 0 : onError3(error2);
70907
- setFetching(false);
70908
- } finally {
70909
- clearInterval(id2);
70910
- }
70911
- };
70912
- const onConfirm = () => {
70913
- handleUpload();
70914
- };
70915
- const onClose = () => {
70916
- onCloseModal();
70917
- };
70918
- const content2 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
70919
- /* @__PURE__ */ jsx(Text, { children: dialogText || "Upload file and extract data using a LLM" }),
70920
- /* @__PURE__ */ jsx(Spacer, {}),
70921
- /* @__PURE__ */ jsx(
70922
- FileInput,
70923
- {
70924
- placeholder: fileInputPlaceholder || "No file",
70925
- label: fileInputText || "Select",
70926
- file: file || void 0,
70927
- onChange: handleFileChange,
70928
- testId: `${testId}-file-input`,
70929
- accept: "image/*"
70930
- }
70931
- ),
70932
- isFetching && /* @__PURE__ */ jsxs(Fragment$1, { children: [
70933
- /* @__PURE__ */ jsx(Spacer, {}),
70934
- /* @__PURE__ */ jsx(
70935
- ProgressBar$1,
70936
- {
70937
- percentage: roundByMagnitudeToFixed(
70938
- 100 * requestTimer / REQUEST_TIME,
70939
- 3
70940
- )
70941
- }
70942
- )
70943
- ] })
70944
- ] });
70945
- const footer2 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
70946
- /* @__PURE__ */ jsx(
70947
- Button$1,
70948
- {
70949
- label: uploadText || "Upload",
70950
- colored: true,
70951
- onClick: onConfirm,
70952
- disabled: !file || isFetching,
70953
- testId: `${testId}-button-upload`
70954
- }
70955
- ),
70956
- /* @__PURE__ */ jsx(
70957
- Button$1,
70958
- {
70959
- label: cancelText || "Cancel",
70960
- onClick: onClose,
70961
- testId: `${testId}-button-cancel`
70962
- }
70963
- )
70964
- ] });
70965
- useKeyboardEvent("Escape", () => onClose());
70966
- return /* @__PURE__ */ jsx(Modal, { visible, centered: true, children: /* @__PURE__ */ jsx(
70967
- Dialog,
70968
- {
70969
- dialog: {
70970
- scroll: true,
70971
- heading: heading2 || "Smart Upload",
70972
- content: content2,
70973
- footer: footer2,
70974
- onClose,
70975
- width: width2 || 350,
70976
- testId
70977
- }
70978
- }
70979
- ) });
70980
- };
70981
70841
  export {
70982
70842
  Accordion,
70983
70843
  AccordionWithDefaultToggle,
@@ -71042,7 +70902,6 @@ export {
71042
70902
  Select,
71043
70903
  SideBar,
71044
70904
  Slider,
71045
- SmartUploadModal,
71046
70905
  Spacer,
71047
70906
  Spinner$1 as Spinner,
71048
70907
  Table,