@oliasoft-open-source/react-ui-library 4.6.8 → 4.6.9-beta-1
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/assets/{index-KqPTwgKR.js → index-faqWAJWP.js} +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.html +1 -1
- package/dist/index.js +150 -1
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-6VNJS4EI-_XHGQV47.js → Color-6VNJS4EI-Z5sK3XI3.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-cfGqinew.js → DocsRenderer-NNNQARDV-V4NlgkVD.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-V3YHNWJZ-ZTQBXxNR.js → WithTooltip-V3YHNWJZ-n5RY-jXL.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-HoJi9xXG.js → accordion.stories-rvf_KSkf.js} +1 -1
- package/dist/storybook/assets/{actions-Cy7Captj.js → actions-eW7plDvv.js} +1 -1
- package/dist/storybook/assets/{actions.stories-mmLprOrc.js → actions.stories-v91cA8Aa.js} +1 -1
- package/dist/storybook/assets/{afe.stories-nIkUZsMw.js → afe.stories-O_jbxAft.js} +1 -1
- package/dist/storybook/assets/{badge.stories-QAHZ0hGs.js → badge.stories-AQYzIvli.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-K5R8kVct.js → blowout.stories-Vff9htu-.js} +1 -1
- package/dist/storybook/assets/{button-group-mNQThLQb.js → button-group-rkjreZ1T.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-hEWUnlpm.js → button-group.stories-HnVY5ZDT.js} +1 -1
- package/dist/storybook/assets/{button-shH4xakS.js → button-yLYf8aC9.js} +1 -1
- package/dist/storybook/assets/{button.stories-5xHwBO1P.js → button.stories-sp9SbrbR.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-Jylkt3nD.js → buttons-and-links-7YupNRlV.js} +1 -1
- package/dist/storybook/assets/{card.stories-52XKdWMP.js → card.stories--XA-NPtn.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-46CXI4aZ.js → casing-loads.stories-6R0hRdCq.js} +1 -1
- package/dist/storybook/assets/{cell.stories-C1tveY5w.js → cell.stories-aDJ0YBLq.js} +1 -1
- package/dist/storybook/assets/{check-box-2gxosI3y.js → check-box-TRAFDvOc.js} +1 -1
- package/dist/storybook/assets/{check-box.stories-dct4BaKG.js → check-box.stories-xj8y4pvN.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-FrcsKrLW.js → chunk-HLWAVYOI-XLYdcxXs.js} +1 -1
- package/dist/storybook/assets/{color-uzmk99ma.js → color-NxP93yaH.js} +1 -1
- package/dist/storybook/assets/{column.stories-1Qq8awo0.js → column.stories-wGhSlroa.js} +1 -1
- package/dist/storybook/assets/{dialog-JbUIdbsX.js → dialog--p0h3TPY.js} +1 -1
- package/dist/storybook/assets/{drawer-GdbVQdWk.js → drawer-NuViVQqw.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-AeAkrCFI.js → drawer.stories-mIhzICjZ.js} +1 -1
- package/dist/storybook/assets/{empty.stories-XVXKuuiT.js → empty.stories-3hs4gUgZ.js} +1 -1
- package/dist/storybook/assets/{field-FZX0Z7IB.js → field-UZtORY6D.js} +1 -1
- package/dist/storybook/assets/{field.stories-Quu0snQm.js → field.stories-DPmPvDCm.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-8w1taUk6.js → file-input.stories-ZuAa6172.js} +1 -1
- package/dist/storybook/assets/{flex.stories-8HJIYv6E.js → flex.stories-7GcqtV92.js} +1 -1
- package/dist/storybook/assets/{footer.stories-DPV_HAIB.js → footer.stories-ZMPDPnnC.js} +1 -1
- package/dist/storybook/assets/{form.stories-T72WR2v0.js → form.stories-raJ_-60i.js} +1 -1
- package/dist/storybook/assets/{formation.stories-xkw070py.js → formation.stories-hf47ETfS.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-3x_m0MHq.js → formatter-SWP5E3XI-yKw2uSJu.js} +1 -1
- package/dist/storybook/assets/{heading-jZsIIJF0.js → heading-AvGkZ8ae.js} +1 -1
- package/dist/storybook/assets/{heading.stories-lW_q2VjY.js → heading.stories-aJs549tG.js} +1 -1
- package/dist/storybook/assets/{help-icon-SKky6KLV.js → help-icon-4sFVvBkZ.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-i7tX8eBl.js → help-icon.stories-9Apwwl_z.js} +1 -1
- package/dist/storybook/assets/{iframe-fXetAaxg.js → iframe-ZAYt1_h5.js} +2 -2
- package/dist/storybook/assets/{index-_9baus51.js → index-oOnKy0ih.js} +5 -5
- package/dist/storybook/assets/{input-group.stories-ZCPg9gHm.js → input-group.stories-wQfcKDtd.js} +1 -1
- package/dist/storybook/assets/{input-validation-y9wnVCSF.js → input-validation-ZAH73PKA.js} +1 -1
- package/dist/storybook/assets/{input-2BhbKV-j.js → input-w-UScEUy.js} +1 -1
- package/dist/storybook/assets/{input.stories-74EIL_bF.js → input.stories-NMD1Bqi4.js} +1 -1
- package/dist/storybook/assets/{inputs-32MVspNo.js → inputs-q_polzRu.js} +1 -1
- package/dist/storybook/assets/{label-uCFEME1p.js → label-am612zWx.js} +1 -1
- package/dist/storybook/assets/{label.stories-LhXr4NuA.js → label.stories-QPyTvO7T.js} +1 -1
- package/dist/storybook/assets/{layout-forms-U3Za-S0I.js → layout-forms-7gaTsqRb.js} +1 -1
- package/dist/storybook/assets/{layout-general-5TGR9rlf.js → layout-general-lhXJ2QUn.js} +1 -1
- package/dist/storybook/assets/{list-eMd89hZr.js → list-LWmKQq1G.js} +1 -1
- package/dist/storybook/assets/{list.stories-data-gXsTw-L1.js → list.stories-data-IWB082tu.js} +1 -1
- package/dist/storybook/assets/{list.stories-5vI2E33l.js → list.stories-fgw3Kx3W.js} +1 -1
- package/dist/storybook/assets/{loader.stories-xsnhGOV_.js → loader.stories-NaDVDl7Z.js} +1 -1
- package/dist/storybook/assets/{menu.stories-KNXjeX3D.js → menu.stories-K4nBhFj_.js} +1 -1
- package/dist/storybook/assets/{message.stories-N8ZGvhv2.js → message.stories-CSw6ElMp.js} +1 -1
- package/dist/storybook/assets/{meta-content-OgN1pVSn.js → meta-content-70Z_mWPh.js} +1 -1
- package/dist/storybook/assets/{modal.stories-ecMxj8hU.js → modal.stories-10-XQKON.js} +1 -1
- package/dist/storybook/assets/{number-input-CMhEMmUd.js → number-input-hrCn3Rag.js} +1 -1
- package/dist/storybook/assets/{number-input.stories-xWiHlnuR.js → number-input.stories-59JRvVcf.js} +1 -1
- package/dist/storybook/assets/{option-dropdown.stories-fgx84uaW.js → option-dropdown.stories-ZCnTHpeT.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-1V9JCfVv.js → padding-and-spacing-lItMcm8V.js} +1 -1
- package/dist/storybook/assets/{page.stories-hiXNhyVn.js → page.stories-GrhPKgmq.js} +1 -1
- package/dist/storybook/assets/{pagination-tAcEoG5j.js → pagination-yFWOmymz.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-BTlZGHei.js → pagination.stories-IahSsrYh.js} +1 -1
- package/dist/storybook/assets/{pop-confirm.stories-kZScSFuk.js → pop-confirm.stories-StkaY9mZ.js} +1 -1
- package/dist/storybook/assets/{popover-cad2llTa.js → popover-YDVuwgEX.js} +1 -1
- package/dist/storybook/assets/{popover.stories-kWytlrCP.js → popover.stories-QeTPelqE.js} +1 -1
- package/dist/storybook/assets/{preview-I81TAmqM.js → preview-H9heiVBM.js} +1 -1
- package/dist/storybook/assets/{preview-u5AhJYxz.js → preview-k7tq6q9C.js} +2 -2
- package/dist/storybook/assets/{projects.stories-Um9RxRPP.js → projects.stories-HDwAJ2lH.js} +1 -1
- package/dist/storybook/assets/{radio-button-5n_38sFk.js → radio-button-g10vtbgR.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-Z_B_oHnZ.js → radio-button.stories-Lm3AgSPw.js} +1 -1
- package/dist/storybook/assets/{reservoirs.stories-NvfXEnD5.js → reservoirs.stories-UloVc7w8.js} +1 -1
- package/dist/storybook/assets/{rich-text-input.stories-C2MT1NxQ.js → rich-text-input.stories-g_yH3vr8.js} +1 -1
- package/dist/storybook/assets/{row.stories-0vvHxyvF.js → row.stories-G_GPRlN5.js} +1 -1
- package/dist/storybook/assets/{select-rLnO-bZV.js → select-xiPCWaz8.js} +1 -1
- package/dist/storybook/assets/{select.stories-c55YtO23.js → select.stories-XhlzQ7cL.js} +1 -1
- package/dist/storybook/assets/{side-bar-dRjlh2Za.js → side-bar-hJdv8LbH.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-aKMnuHiZ.js → side-bar.stories-Yhz9jXs2.js} +1 -1
- package/dist/storybook/assets/{site.stories-7D7SQQg5.js → site.stories-KJRfCDdv.js} +1 -1
- package/dist/storybook/assets/slider-at3_DXQg.js +7 -0
- package/dist/storybook/assets/slider.stories-R5xGydpl.js +171 -0
- package/dist/storybook/assets/{spacer.stories-Tc3LfeOH.js → spacer.stories-9tR72ZgH.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-B5GMVT5T-NrCkP84H.js → syntaxhighlighter-B5GMVT5T-gS3HJKcc.js} +1 -1
- package/dist/storybook/assets/{table--nqv8IDq.js → table-oIcCiJqg.js} +1 -1
- package/dist/storybook/assets/{table.stories-O7tV23uw.js → table.stories-G14SBspc.js} +1 -1
- package/dist/storybook/assets/{table.stories-data-yhSjAoox.js → table.stories-data-Bg4REEx4.js} +1 -1
- package/dist/storybook/assets/{textarea-gwm6gdQO.js → textarea-KPKJt9L7.js} +1 -1
- package/dist/storybook/assets/{textarea.stories-eOTtHmL4.js → textarea.stories-7DZ5m1lo.js} +1 -1
- package/dist/storybook/assets/{title.stories-qu_is7wC.js → title.stories-fKMID_pc.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-D_1FY8OT.js → toaster.stories-4aAkEVaa.js} +1 -1
- package/dist/storybook/assets/{toggle-M_66MP8X.js → toggle-m3EwNS6z.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-VfPLoUW1.js → toggle.stories-jaduywRN.js} +1 -1
- package/dist/storybook/assets/{tooltip-HEHiU__l.js → tooltip-gljV_DQ0.js} +2 -2
- package/dist/storybook/assets/{tooltip.stories-tiOgoWHH.js → tooltip.stories-CEbtg_cS.js} +1 -1
- package/dist/storybook/assets/{tooltip.test-case.stories-omlRb7-I.js → tooltip.test-case.stories-Sq5qLreq.js} +1 -1
- package/dist/storybook/assets/{top-bar-_mjkSOvn.js → top-bar-8ASbRXqr.js} +1 -1
- package/dist/storybook/assets/{top-bar.stories-hLq3tLY-.js → top-bar.stories-9LS979MG.js} +1 -1
- package/dist/storybook/assets/{top-bar.testcase.stories-CIYqVCVB.js → top-bar.testcase.stories-Yjz8R3nX.js} +1 -1
- package/dist/storybook/assets/{tree.stories-piq-HVR4.js → tree.stories-VhgtyM-i.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-0xZHxkeM.js → unit-input.stories--JK_4hwn.js} +1 -1
- package/dist/storybook/assets/{unit-table.stories-19SAMwbG.js → unit-table.stories-ddutc_iU.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/404.html +0 -1
- package/dist/storybook/assets/slider-MN9iDCsS.js +0 -7
- package/dist/storybook/assets/slider.stories-hVrt3K9M.js +0 -127
|
@@ -12640,7 +12640,7 @@ const Tooltip = ({
|
|
|
12640
12640
|
flex = "none",
|
|
12641
12641
|
forceOpen = false
|
|
12642
12642
|
}) => {
|
|
12643
|
-
const visible = enabled && (reactExports.isValidElement(text2) || typeof text2 === "string" && text2.length > 0);
|
|
12643
|
+
const visible = enabled && (reactExports.isValidElement(text2) || typeof text2 === "string" && text2.length > 0 || typeof text2 === "number");
|
|
12644
12644
|
const [isOver, hoverProps, forceClose] = useHover({
|
|
12645
12645
|
delayEnter: 100,
|
|
12646
12646
|
delayLeave: 0
|
package/dist/index.d.ts
CHANGED
|
@@ -1666,6 +1666,8 @@ 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
|
+
|
|
1669
1671
|
export declare const Spacer: ({ height, width, flex, }: ISpacerProps) => JSX_2.Element;
|
|
1670
1672
|
|
|
1671
1673
|
export declare const Spinner: ({ small, colored, dark, tiny, }: ISpinnerProps) => JSX_2.Element;
|
|
@@ -1801,6 +1803,26 @@ declare type TSliderMark = {
|
|
|
1801
1803
|
tooltip?: number | string | ReactNode;
|
|
1802
1804
|
};
|
|
1803
1805
|
|
|
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
|
+
|
|
1804
1826
|
declare type TStringNumberNull = string | number | null;
|
|
1805
1827
|
|
|
1806
1828
|
declare type TStringOrNumber = string | number;
|
package/dist/index.html
CHANGED
|
@@ -1 +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-
|
|
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/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 } 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, roundByMagnitudeToFixed } 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) {
|
|
@@ -70830,6 +70830,154 @@ const UnitTable = ({
|
|
|
70830
70830
|
}
|
|
70831
70831
|
);
|
|
70832
70832
|
};
|
|
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
|
+
};
|
|
70833
70981
|
export {
|
|
70834
70982
|
Accordion,
|
|
70835
70983
|
AccordionWithDefaultToggle,
|
|
@@ -70894,6 +71042,7 @@ export {
|
|
|
70894
71042
|
Select,
|
|
70895
71043
|
SideBar,
|
|
70896
71044
|
Slider,
|
|
71045
|
+
SmartUploadModal,
|
|
70897
71046
|
Spacer,
|
|
70898
71047
|
Spinner$1 as Spinner,
|
|
70899
71048
|
Table,
|