@oliasoft-open-source/react-ui-library 4.7.8 → 4.7.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.
- package/dist/index.d.ts +35 -30
- package/dist/index.js +80 -62
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-CQlondIs.js → Color-KGDBMAHA-uRZOJgp_.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-CMePffZo.js → DocsRenderer-PKQXORMH-egQ32ash.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-Cs2ubF5q.js → accordion.stories-B6aDvpbw.js} +2 -2
- package/dist/storybook/assets/{afe.stories-BejQRTzS.js → afe.stories-BmTkdVrX.js} +2 -2
- package/dist/storybook/assets/{buttons-and-links-CtQdvmxW.js → buttons-and-links-XmN6uPsc.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-DYLqR3q4.js → casing-loads.stories-DMJrogpe.js} +2 -2
- package/dist/storybook/assets/{cell.stories-lHzrZ3g_.js → cell.stories-BuTZfvFG.js} +2 -2
- package/dist/storybook/assets/{chunk-HLWAVYOI-GiKqAqKE.js → chunk-HLWAVYOI-CSojG6Rw.js} +1 -1
- package/dist/storybook/assets/{color-DsEwQuSe.js → color-BMgUNoUe.js} +1 -1
- package/dist/storybook/assets/footer.stories-C7lpIpIw.js +3 -0
- package/dist/storybook/assets/form.stories-5K0J3e_K.js +49 -0
- package/dist/storybook/assets/{formation.stories-D4U2fgj6.js → formation.stories-dxrPMFRf.js} +2 -2
- package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
- package/dist/storybook/assets/iframe-BJkqCqVQ.js +2 -0
- package/dist/storybook/assets/{index-CrEVlQ_6.js → index-BRwYuXC0.js} +1 -1
- package/dist/storybook/assets/{index-BAoS3bLT.js → index-DyiUARNs.js} +4 -4
- package/dist/storybook/assets/{input-group.stories-CFpFac6W.js → input-group.stories-CZV2LIx8.js} +2 -2
- package/dist/storybook/assets/{input-validation-X_m8WekI.js → input-validation-CP5zFo2k.js} +2 -2
- package/dist/storybook/assets/{inputs-D80uNhPY.js → inputs-B4ZYR2o3.js} +2 -2
- package/dist/storybook/assets/{layout-forms-0_2iXsYr.js → layout-forms-DwyWVJ0v.js} +4 -4
- package/dist/storybook/assets/{layout-general-E6Gt2dIZ.js → layout-general-DZ2dESQ5.js} +1 -1
- package/dist/storybook/assets/{modal.stories-CyMCZp33.js → modal.stories-DjqYt1p9.js} +2 -2
- package/dist/storybook/assets/number-input.stories-qoGbqZTo.js +110 -0
- package/dist/storybook/assets/{padding-and-spacing-yWT70QJX.js → padding-and-spacing-1HtBbptS.js} +1 -1
- package/dist/storybook/assets/{pagination-BcGXyU5V.js → pagination-CUgCn63Z.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-DH-XbCfQ.js → pagination.stories-BGOImoU2.js} +2 -2
- package/dist/storybook/assets/popover.stories-Crowf5vG.js +10 -0
- package/dist/storybook/assets/{preview-DPs6y1HU.js → preview-DejXoruS.js} +2 -2
- package/dist/storybook/assets/{preview-BTEgxsm7.js → preview-TQh2Z4sk.js} +1 -1
- package/dist/storybook/assets/{projects.stories-Clez6c2x.js → projects.stories-DAf5OJ1x.js} +2 -2
- package/dist/storybook/assets/{radio-button-YBwYcMaM.js → radio-button-BbeNknd5.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-CGJnfCk-.js → radio-button.stories-Blh9iWKw.js} +2 -2
- package/dist/storybook/assets/{reservoirs.stories-CIUf8Stc.js → reservoirs.stories-D5ckP2e4.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-BxwJD_An.js → rich-text-input.stories-LVVpSs9G.js} +3 -3
- package/dist/storybook/assets/{row.stories-BqhC3_2k.js → row.stories-DOUSenyE.js} +2 -2
- package/dist/storybook/assets/{select-C1_gWJ7I.js → select-DRMh4SU1.js} +1 -1
- package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
- package/dist/storybook/assets/{select.stories-5JpxALAP.js → select.stories-DLPUuggI.js} +2 -2
- package/dist/storybook/assets/{site.stories-zUoOcZmf.js → site.stories-BPMSwYX0.js} +2 -2
- package/dist/storybook/assets/{table-5QX-8wvq.js → table-DpcRWK59.js} +1 -1
- package/dist/storybook/assets/{table.stories-lL4Wjd7C.js → table.stories-Cnt8aj8r.js} +2 -2
- package/dist/storybook/assets/{tabs-CAZ_dHGK.js → tabs-Cj0RKXvW.js} +1 -1
- package/dist/storybook/assets/tabs.stories-Ba_GVPSo.js +30 -0
- package/dist/storybook/assets/{title.stories-klSBDiXt.js → title.stories-Be_6D4wZ.js} +2 -2
- package/dist/storybook/assets/unit-input.stories-F0JfOMio.js +300 -0
- package/dist/storybook/assets/unit-table.stories-DpamFUAJ.js +152 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/footer.stories-C2YHanQl.js +0 -3
- package/dist/storybook/assets/form.stories-DVcTzOpM.js +0 -49
- package/dist/storybook/assets/iframe-B1EjAYJz.js +0 -2
- package/dist/storybook/assets/number-input.stories-BCEHti8m.js +0 -107
- package/dist/storybook/assets/popover.stories-Ulut7imO.js +0 -10
- package/dist/storybook/assets/select.input-DIKP56UZ.js +0 -1
- package/dist/storybook/assets/tabs.stories-DXcDAqB2.js +0 -30
- package/dist/storybook/assets/unit-input.stories-D_hhvilo.js +0 -295
- package/dist/storybook/assets/unit-table.stories-Co3OB0Hd.js +0 -152
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Context } from 'react';
|
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
4
|
import { default as default_2 } from 'react';
|
|
5
5
|
import { DependencyList } from 'react';
|
|
6
|
+
import { ElementType as ElementType_2 } from 'react';
|
|
6
7
|
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
7
8
|
import { FocusEventHandler } from 'react';
|
|
8
9
|
import { Id } from 'react-toastify';
|
|
@@ -240,7 +241,7 @@ declare interface ICheckBoxCell extends TCommonCell {
|
|
|
240
241
|
label?: string | null;
|
|
241
242
|
checked: boolean;
|
|
242
243
|
type: TCellType;
|
|
243
|
-
onChange:
|
|
244
|
+
onChange: TChangeEventHandler;
|
|
244
245
|
disabled?: boolean;
|
|
245
246
|
}
|
|
246
247
|
|
|
@@ -250,7 +251,7 @@ export declare interface ICheckBoxProps {
|
|
|
250
251
|
label?: string | null;
|
|
251
252
|
name?: string;
|
|
252
253
|
noMargin?: boolean;
|
|
253
|
-
onChange:
|
|
254
|
+
onChange: TChangeEventHandler;
|
|
254
255
|
tabIndex?: number;
|
|
255
256
|
disabled?: boolean;
|
|
256
257
|
small?: boolean;
|
|
@@ -405,7 +406,7 @@ export declare interface IFileButtonProps extends IButtonProps {
|
|
|
405
406
|
accept?: string;
|
|
406
407
|
multi?: boolean;
|
|
407
408
|
name?: string;
|
|
408
|
-
onChange?:
|
|
409
|
+
onChange?: TChangeEventHandler;
|
|
409
410
|
}
|
|
410
411
|
|
|
411
412
|
export declare interface IFileInputProps {
|
|
@@ -418,7 +419,7 @@ export declare interface IFileInputProps {
|
|
|
418
419
|
multi?: boolean;
|
|
419
420
|
name?: string;
|
|
420
421
|
width?: TStringOrNumber;
|
|
421
|
-
onChange?:
|
|
422
|
+
onChange?: TChangeEventHandler;
|
|
422
423
|
testId?: string;
|
|
423
424
|
}
|
|
424
425
|
|
|
@@ -493,7 +494,7 @@ declare interface IInputCell extends TCommonCell {
|
|
|
493
494
|
type: TCellType;
|
|
494
495
|
name?: string;
|
|
495
496
|
value?: TStringOrNumber;
|
|
496
|
-
onChange?:
|
|
497
|
+
onChange?: TChangeEventHandler;
|
|
497
498
|
onFocus?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
498
499
|
onBlur?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
499
500
|
onPaste?: default_2.ClipboardEventHandler<HTMLInputElement>;
|
|
@@ -523,7 +524,7 @@ export declare interface IInputProps {
|
|
|
523
524
|
tooltip?: TStringOrNumber | default_2.ReactNode;
|
|
524
525
|
name?: string;
|
|
525
526
|
type?: string;
|
|
526
|
-
onChange?:
|
|
527
|
+
onChange?: TChangeEventHandler;
|
|
527
528
|
onKeyPress?: default_2.KeyboardEventHandler<HTMLInputElement>;
|
|
528
529
|
onFocus?: (evt: FocusEvent_2<HTMLInputElement>) => void;
|
|
529
530
|
onBlur?: (evt: FocusEvent_2<HTMLInputElement>) => void;
|
|
@@ -773,14 +774,14 @@ declare interface IMenuSection {
|
|
|
773
774
|
inline?: boolean;
|
|
774
775
|
title?: string;
|
|
775
776
|
download?: boolean;
|
|
776
|
-
onChange?:
|
|
777
|
+
onChange?: TChangeEventHandler;
|
|
777
778
|
menu?: any;
|
|
778
779
|
visible?: boolean;
|
|
779
780
|
closeOnOptionClick?: boolean;
|
|
780
781
|
actions?: any[];
|
|
781
782
|
url?: string;
|
|
782
783
|
upload?: boolean;
|
|
783
|
-
component?:
|
|
784
|
+
component?: ElementType_2;
|
|
784
785
|
}
|
|
785
786
|
|
|
786
787
|
declare interface IMenuShowAllButton {
|
|
@@ -892,7 +893,7 @@ declare interface INumberInputCell extends TCommonCell {
|
|
|
892
893
|
name?: string;
|
|
893
894
|
value?: TStringOrNumber;
|
|
894
895
|
type: TCellType;
|
|
895
|
-
onChange?:
|
|
896
|
+
onChange?: TChangeEventHandler;
|
|
896
897
|
onFocus?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
897
898
|
onBlur?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
898
899
|
placeholder?: string;
|
|
@@ -918,7 +919,7 @@ export declare interface INumberInputProps {
|
|
|
918
919
|
small?: boolean;
|
|
919
920
|
width?: TStringOrNumber;
|
|
920
921
|
value?: TStringOrNumber;
|
|
921
|
-
onChange?:
|
|
922
|
+
onChange?: TChangeEventHandler;
|
|
922
923
|
onFocus?: (evt: FocusEvent_2<HTMLInputElement>) => void;
|
|
923
924
|
onBlur?: (evt: FocusEvent_2<HTMLInputElement>) => void;
|
|
924
925
|
tabIndex?: number;
|
|
@@ -939,10 +940,7 @@ export declare interface IOptionDropdownProps {
|
|
|
939
940
|
name?: string;
|
|
940
941
|
label: string;
|
|
941
942
|
options: IOptionType[];
|
|
942
|
-
onChange:
|
|
943
|
-
name?: string;
|
|
944
|
-
value: IOptionType[];
|
|
945
|
-
}>) => void;
|
|
943
|
+
onChange: TChangeEventHandler;
|
|
946
944
|
showHeader?: boolean;
|
|
947
945
|
maxHeight?: string;
|
|
948
946
|
}
|
|
@@ -988,7 +986,7 @@ declare interface IPaginationOptionType {
|
|
|
988
986
|
}
|
|
989
987
|
|
|
990
988
|
declare interface IPaginationPerPageType {
|
|
991
|
-
onChange?:
|
|
989
|
+
onChange?: TChangeEventHandler;
|
|
992
990
|
options?: IPaginationOptionType[];
|
|
993
991
|
value?: TStringOrNumber;
|
|
994
992
|
}
|
|
@@ -1085,7 +1083,7 @@ export declare interface IRadioButtonProps {
|
|
|
1085
1083
|
inline?: boolean;
|
|
1086
1084
|
disabled?: boolean;
|
|
1087
1085
|
small?: boolean;
|
|
1088
|
-
onChange?:
|
|
1086
|
+
onChange?: TChangeEventHandler;
|
|
1089
1087
|
noMargin?: boolean;
|
|
1090
1088
|
mainLabel?: string;
|
|
1091
1089
|
onClick?: (target: HTMLInputElement) => void;
|
|
@@ -1132,7 +1130,7 @@ declare interface ISelectCell extends TCommonCell {
|
|
|
1132
1130
|
type: TCellType;
|
|
1133
1131
|
name?: string;
|
|
1134
1132
|
value?: TStringOrNumber;
|
|
1135
|
-
onChange?:
|
|
1133
|
+
onChange?: TChangeEventHandler;
|
|
1136
1134
|
onCreate?: (ev: any) => void;
|
|
1137
1135
|
error?: StringNumberOrNode;
|
|
1138
1136
|
warning?: StringNumberOrNode;
|
|
@@ -1155,7 +1153,7 @@ export declare interface ISelectProps {
|
|
|
1155
1153
|
options?: ISelectSelectedOption[];
|
|
1156
1154
|
value?: any;
|
|
1157
1155
|
native?: boolean;
|
|
1158
|
-
onChange?:
|
|
1156
|
+
onChange?: TChangeEventHandler;
|
|
1159
1157
|
deprecatedEventHandler?: boolean;
|
|
1160
1158
|
autoScroll?: boolean;
|
|
1161
1159
|
warning?: TStringOrNumber | ReactNode;
|
|
@@ -1212,7 +1210,7 @@ declare interface ISliderCell extends TCommonCell {
|
|
|
1212
1210
|
max: number;
|
|
1213
1211
|
step?: number;
|
|
1214
1212
|
marks?: TSliderMark[];
|
|
1215
|
-
onChange:
|
|
1213
|
+
onChange: TChangeEventHandler;
|
|
1216
1214
|
showArrows?: boolean;
|
|
1217
1215
|
showTooltip?: boolean;
|
|
1218
1216
|
tooltipFormatter?: (value: any) => any;
|
|
@@ -1240,13 +1238,7 @@ export declare interface ISliderProps {
|
|
|
1240
1238
|
width?: string;
|
|
1241
1239
|
height?: string;
|
|
1242
1240
|
};
|
|
1243
|
-
onChange:
|
|
1244
|
-
target: {
|
|
1245
|
-
name?: string;
|
|
1246
|
-
value: number | number[];
|
|
1247
|
-
label?: TStringNumberNull | ReactNode;
|
|
1248
|
-
};
|
|
1249
|
-
}) => void;
|
|
1241
|
+
onChange: TChangeEventHandler;
|
|
1250
1242
|
}
|
|
1251
1243
|
|
|
1252
1244
|
export declare type ISmartUploadModalProps = {
|
|
@@ -1382,7 +1374,7 @@ export declare interface ITabsProps {
|
|
|
1382
1374
|
options?: ITabOption[] | null;
|
|
1383
1375
|
children?: any;
|
|
1384
1376
|
value?: ITabSelectedOption;
|
|
1385
|
-
onChange?:
|
|
1377
|
+
onChange?: TChangeEventHandler;
|
|
1386
1378
|
padding?: boolean;
|
|
1387
1379
|
margin?: boolean;
|
|
1388
1380
|
contentPadding?: boolean;
|
|
@@ -1399,7 +1391,7 @@ export declare interface ITextAreaProps {
|
|
|
1399
1391
|
cols?: number;
|
|
1400
1392
|
rows?: number;
|
|
1401
1393
|
disabled?: boolean;
|
|
1402
|
-
onChange?:
|
|
1394
|
+
onChange?: TChangeEventHandler<HTMLTextAreaElement>;
|
|
1403
1395
|
onKeyPress?: (evt: KeyboardEvent_2<HTMLTextAreaElement>) => void;
|
|
1404
1396
|
onFocus?: (evt: FocusEvent_2<HTMLTextAreaElement>) => void;
|
|
1405
1397
|
onBlur?: (evt: FocusEvent_2<HTMLTextAreaElement>) => void;
|
|
@@ -1450,7 +1442,7 @@ export declare interface IToggleProps {
|
|
|
1450
1442
|
disabled?: boolean;
|
|
1451
1443
|
display?: string;
|
|
1452
1444
|
small?: boolean;
|
|
1453
|
-
onChange:
|
|
1445
|
+
onChange: TChangeEventHandler;
|
|
1454
1446
|
noMargin?: boolean;
|
|
1455
1447
|
testId?: string;
|
|
1456
1448
|
helpText?: string;
|
|
@@ -1588,7 +1580,7 @@ export declare interface IUnitInputProps {
|
|
|
1588
1580
|
disabledValidation?: boolean;
|
|
1589
1581
|
allowEmpty?: boolean;
|
|
1590
1582
|
autoValue?: string;
|
|
1591
|
-
onChange
|
|
1583
|
+
onChange?: (event: TChangeEvent | ICustomChangeEvent) => void;
|
|
1592
1584
|
onSwitchUnit?: (unit: string) => void;
|
|
1593
1585
|
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
1594
1586
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
@@ -1743,6 +1735,19 @@ declare type TCellShape = IPopoverCell | IStaticCell | ISelectCell | IHelpIconCe
|
|
|
1743
1735
|
|
|
1744
1736
|
declare type TCellType = 'Static' | 'Icon' | 'Select' | 'Input' | 'NumberInput' | 'Popover' | 'CheckBox' | 'Actions' | 'Link' | 'Slider' | 'Unit' | string;
|
|
1745
1737
|
|
|
1738
|
+
export declare type TChangeEvent<T extends HTMLElement = HTMLInputElement> = ChangeEvent<T> & {
|
|
1739
|
+
target: T | {
|
|
1740
|
+
name: string;
|
|
1741
|
+
value: any;
|
|
1742
|
+
label?: string;
|
|
1743
|
+
files?: FileList | null;
|
|
1744
|
+
};
|
|
1745
|
+
};
|
|
1746
|
+
|
|
1747
|
+
export declare type TChangeEventHandler<T extends HTMLElement = HTMLInputElement> = (event: TChangeEvent<T>, ...additionalProps: {
|
|
1748
|
+
[key: string]: any;
|
|
1749
|
+
}[]) => void;
|
|
1750
|
+
|
|
1746
1751
|
export declare type TColor = 'danger' | 'red' | 'white' | 'success' | 'green' | 'muted';
|
|
1747
1752
|
|
|
1748
1753
|
declare interface TCommonCell {
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import React__default, { useContext, isValidElement, useState, useRef, useEffect
|
|
|
15
15
|
import * as PropTypes from "prop-types";
|
|
16
16
|
import PropTypes__default from "prop-types";
|
|
17
17
|
import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
|
|
18
|
-
import
|
|
18
|
+
import { noop as noop$3, 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";
|
|
19
19
|
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";
|
|
20
20
|
import { isValueWithUnit as isValueWithUnit$1 } from "@oliasoft-open-source/units/dist/units";
|
|
21
21
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -4270,7 +4270,7 @@ const Option$2 = ({
|
|
|
4270
4270
|
inline: inline2,
|
|
4271
4271
|
title: title2,
|
|
4272
4272
|
upload,
|
|
4273
|
-
onChange,
|
|
4273
|
+
onChange = noop$3,
|
|
4274
4274
|
testId,
|
|
4275
4275
|
component: Component2 = "a"
|
|
4276
4276
|
}) => {
|
|
@@ -4286,6 +4286,22 @@ const Option$2 = ({
|
|
|
4286
4286
|
}
|
|
4287
4287
|
onClick == null ? void 0 : onClick(evt);
|
|
4288
4288
|
};
|
|
4289
|
+
const handleFileChange = (evt) => {
|
|
4290
|
+
const { files } = (evt == null ? void 0 : evt.target) ?? {};
|
|
4291
|
+
if (files) {
|
|
4292
|
+
const customEvent = {
|
|
4293
|
+
...evt,
|
|
4294
|
+
target: {
|
|
4295
|
+
...evt.target,
|
|
4296
|
+
value: files,
|
|
4297
|
+
name: evt.target.name,
|
|
4298
|
+
files
|
|
4299
|
+
}
|
|
4300
|
+
};
|
|
4301
|
+
onChange == null ? void 0 : onChange(customEvent);
|
|
4302
|
+
close2 == null ? void 0 : close2();
|
|
4303
|
+
}
|
|
4304
|
+
};
|
|
4289
4305
|
return /* @__PURE__ */ jsxs(
|
|
4290
4306
|
Component2,
|
|
4291
4307
|
{
|
|
@@ -4307,10 +4323,7 @@ const Option$2 = ({
|
|
|
4307
4323
|
{
|
|
4308
4324
|
type: "file",
|
|
4309
4325
|
className: styles$L.fileInput,
|
|
4310
|
-
onChange:
|
|
4311
|
-
onChange == null ? void 0 : onChange(evt.target.files);
|
|
4312
|
-
close2 == null ? void 0 : close2();
|
|
4313
|
-
}
|
|
4326
|
+
onChange: handleFileChange
|
|
4314
4327
|
}
|
|
4315
4328
|
),
|
|
4316
4329
|
/* @__PURE__ */ jsx("span", { className: styles$L.label, title: `${title2 || label2}`, children: label2 }),
|
|
@@ -8937,8 +8950,7 @@ const FileButton = ({
|
|
|
8937
8950
|
multi,
|
|
8938
8951
|
name: name2,
|
|
8939
8952
|
disabled: disabled2,
|
|
8940
|
-
onChange =
|
|
8941
|
-
},
|
|
8953
|
+
onChange = noop$3,
|
|
8942
8954
|
...buttonProps
|
|
8943
8955
|
}) => {
|
|
8944
8956
|
const disabledContext = useContext(DisabledContext);
|
|
@@ -8950,7 +8962,15 @@ const FileButton = ({
|
|
|
8950
8962
|
const handleChange = (evt) => {
|
|
8951
8963
|
var _a2;
|
|
8952
8964
|
const files = multi ? evt.target.files : (_a2 = evt.target.files) == null ? void 0 : _a2[0];
|
|
8953
|
-
|
|
8965
|
+
const customEvent = {
|
|
8966
|
+
...evt,
|
|
8967
|
+
target: {
|
|
8968
|
+
...evt.target,
|
|
8969
|
+
value: files,
|
|
8970
|
+
name: evt.target.name
|
|
8971
|
+
}
|
|
8972
|
+
};
|
|
8973
|
+
onChange(customEvent);
|
|
8954
8974
|
if (inputRef.current) {
|
|
8955
8975
|
inputRef.current.value = "";
|
|
8956
8976
|
}
|
|
@@ -9044,8 +9064,7 @@ const Input$1 = forwardRef(
|
|
|
9044
9064
|
isInTable: isInTable2,
|
|
9045
9065
|
width: propWidth = void 0,
|
|
9046
9066
|
small: small2 = false,
|
|
9047
|
-
onChange =
|
|
9048
|
-
},
|
|
9067
|
+
onChange = noop$3,
|
|
9049
9068
|
placeholder: placeholder3 = "",
|
|
9050
9069
|
value = "",
|
|
9051
9070
|
onKeyPress = () => {
|
|
@@ -9177,8 +9196,7 @@ const FileInput = ({
|
|
|
9177
9196
|
multi,
|
|
9178
9197
|
name: name2,
|
|
9179
9198
|
width: width2,
|
|
9180
|
-
onChange =
|
|
9181
|
-
},
|
|
9199
|
+
onChange = noop$3,
|
|
9182
9200
|
testId
|
|
9183
9201
|
}) => {
|
|
9184
9202
|
const disabledContext = useContext(DisabledContext);
|
|
@@ -9191,7 +9209,15 @@ const FileInput = ({
|
|
|
9191
9209
|
const handleChange = (evt) => {
|
|
9192
9210
|
var _a2, _b, _c;
|
|
9193
9211
|
const files = multi ? (_a2 = evt == null ? void 0 : evt.target) == null ? void 0 : _a2.files : (_c = (_b = evt == null ? void 0 : evt.target) == null ? void 0 : _b.files) == null ? void 0 : _c[0];
|
|
9194
|
-
|
|
9212
|
+
const customEvent = {
|
|
9213
|
+
...evt,
|
|
9214
|
+
target: {
|
|
9215
|
+
...evt.target,
|
|
9216
|
+
value: files,
|
|
9217
|
+
name: evt.target.name
|
|
9218
|
+
}
|
|
9219
|
+
};
|
|
9220
|
+
onChange(customEvent);
|
|
9195
9221
|
if (inputRef.current) {
|
|
9196
9222
|
inputRef.current.value = "";
|
|
9197
9223
|
}
|
|
@@ -19622,12 +19648,9 @@ const NativeSelect = ({
|
|
|
19622
19648
|
warning: warning2 = null,
|
|
19623
19649
|
tooltip: tooltip2 = null,
|
|
19624
19650
|
options,
|
|
19625
|
-
onChange =
|
|
19626
|
-
|
|
19627
|
-
|
|
19628
|
-
},
|
|
19629
|
-
onBlur = () => {
|
|
19630
|
-
},
|
|
19651
|
+
onChange = noop$3,
|
|
19652
|
+
onFocus = noop$3,
|
|
19653
|
+
onBlur = noop$3,
|
|
19631
19654
|
right: right2 = false,
|
|
19632
19655
|
small: small2 = false,
|
|
19633
19656
|
tabIndex = 0,
|
|
@@ -20790,8 +20813,7 @@ const Input = ({
|
|
|
20790
20813
|
selectedOptions,
|
|
20791
20814
|
searchable = false,
|
|
20792
20815
|
searchValue,
|
|
20793
|
-
onChange =
|
|
20794
|
-
},
|
|
20816
|
+
onChange = noop$3,
|
|
20795
20817
|
inputRef,
|
|
20796
20818
|
error: error2,
|
|
20797
20819
|
placeholder: placeholder3 = "Select...",
|
|
@@ -21605,8 +21627,7 @@ const Select = (props) => {
|
|
|
21605
21627
|
options: rawOptions = [],
|
|
21606
21628
|
value: rawSelectedOptions,
|
|
21607
21629
|
native = false,
|
|
21608
|
-
onChange =
|
|
21609
|
-
},
|
|
21630
|
+
onChange = noop$3,
|
|
21610
21631
|
deprecatedEventHandler = false,
|
|
21611
21632
|
autoScroll: autoScroll2 = true,
|
|
21612
21633
|
warning: warning2,
|
|
@@ -21649,7 +21670,9 @@ const Select = (props) => {
|
|
|
21649
21670
|
const newSelectedOptions = multi ? selectedOptions2.map(
|
|
21650
21671
|
(o) => simpleInputs ? o.value : o
|
|
21651
21672
|
) : simpleInputs ? selectedOptions2.value : selectedOptions2;
|
|
21652
|
-
|
|
21673
|
+
if (newSelectedOptions) {
|
|
21674
|
+
onChange(newSelectedOptions);
|
|
21675
|
+
}
|
|
21653
21676
|
} else {
|
|
21654
21677
|
const isSyntheticEvent = !(evt instanceof Event);
|
|
21655
21678
|
const value = multi ? selectedOptions2 : selectedOptions2.value;
|
|
@@ -21661,17 +21684,16 @@ const Select = (props) => {
|
|
|
21661
21684
|
}
|
|
21662
21685
|
onChange(evt);
|
|
21663
21686
|
} else {
|
|
21664
|
-
|
|
21687
|
+
const customEvent = {
|
|
21665
21688
|
...evt,
|
|
21666
21689
|
target: {
|
|
21667
21690
|
...evt.target,
|
|
21668
21691
|
name: name2,
|
|
21669
21692
|
value,
|
|
21670
|
-
|
|
21671
|
-
label: selectedOptions2.label
|
|
21672
|
-
}
|
|
21693
|
+
label: !multi ? selectedOptions2.label : void 0
|
|
21673
21694
|
}
|
|
21674
|
-
}
|
|
21695
|
+
};
|
|
21696
|
+
onChange(customEvent);
|
|
21675
21697
|
}
|
|
21676
21698
|
}
|
|
21677
21699
|
};
|
|
@@ -55253,16 +55275,18 @@ const Slider = ({
|
|
|
55253
55275
|
width: "100px",
|
|
55254
55276
|
height: "400px"
|
|
55255
55277
|
},
|
|
55256
|
-
onChange
|
|
55278
|
+
onChange = noop$3
|
|
55257
55279
|
}) => {
|
|
55258
55280
|
const disabledContext = useContext(DisabledContext);
|
|
55259
55281
|
const formattedMarks = memoizedFormatMarkers(marks);
|
|
55260
55282
|
const onChangeValue = (value2) => {
|
|
55283
|
+
const eventLabel = typeof label2 === "string" ? label2 : String(label2);
|
|
55284
|
+
const eventName = name2 ?? "";
|
|
55261
55285
|
onChange({
|
|
55262
55286
|
target: {
|
|
55263
|
-
name:
|
|
55287
|
+
name: eventName,
|
|
55264
55288
|
value: value2,
|
|
55265
|
-
label:
|
|
55289
|
+
label: eventLabel
|
|
55266
55290
|
}
|
|
55267
55291
|
});
|
|
55268
55292
|
};
|
|
@@ -55303,7 +55327,7 @@ const Slider = ({
|
|
|
55303
55327
|
styles$c.container,
|
|
55304
55328
|
small2 ? styles$c.small : "",
|
|
55305
55329
|
vertical2.enabled ? styles$c.vertical : "",
|
|
55306
|
-
!
|
|
55330
|
+
!isEmpty(marks) ? styles$c.hasMarks : ""
|
|
55307
55331
|
),
|
|
55308
55332
|
style: vertical2.enabled ? { width: vertical2.width, height: vertical2.height } : { width: width2 },
|
|
55309
55333
|
children: [
|
|
@@ -56585,8 +56609,7 @@ const Tabs = ({
|
|
|
56585
56609
|
options: rawOptions = null,
|
|
56586
56610
|
children = null,
|
|
56587
56611
|
value: rawValue = void 0,
|
|
56588
|
-
onChange =
|
|
56589
|
-
},
|
|
56612
|
+
onChange = noop$3,
|
|
56590
56613
|
padding: padding2 = false,
|
|
56591
56614
|
margin: margin2 = true,
|
|
56592
56615
|
contentPadding: contentPadding2 = true,
|
|
@@ -56622,6 +56645,18 @@ const Tabs = ({
|
|
|
56622
56645
|
const selectedValue = isDeprecated || value === void 0 || value === null ? void 0 : simpleInputs ? value : value.value;
|
|
56623
56646
|
const activeTabIndexBase = rawActiveTabIndex !== void 0 ? rawActiveTabIndex : tabs2 == null ? void 0 : tabs2.findIndex((t) => t.value === selectedValue);
|
|
56624
56647
|
const activeTabIndex = activeTabIndexBase === -1 ? 0 : activeTabIndexBase;
|
|
56648
|
+
const handleTabClick = (index2, tab2, event) => {
|
|
56649
|
+
if (isDeprecated) {
|
|
56650
|
+
const value2 = tab2.key || tab2.label || null;
|
|
56651
|
+
onChangeTab(index2, value2);
|
|
56652
|
+
} else {
|
|
56653
|
+
const target = event.target;
|
|
56654
|
+
target.name = name2;
|
|
56655
|
+
target.value = tab2.value;
|
|
56656
|
+
target.label = tab2.label;
|
|
56657
|
+
onChange(event);
|
|
56658
|
+
}
|
|
56659
|
+
};
|
|
56625
56660
|
const renderTab = (tab2, index2) => {
|
|
56626
56661
|
const {
|
|
56627
56662
|
label: label2,
|
|
@@ -56645,16 +56680,7 @@ const Tabs = ({
|
|
|
56645
56680
|
badge: badge2,
|
|
56646
56681
|
right: right2,
|
|
56647
56682
|
active: isDeprecated ? index2 === activeTabIndex : value2 === selectedValue,
|
|
56648
|
-
onClick:
|
|
56649
|
-
const value3 = tab2.key || label2 || null;
|
|
56650
|
-
onChangeTab(index2, value3);
|
|
56651
|
-
} : (evt) => {
|
|
56652
|
-
const target = evt.target;
|
|
56653
|
-
target.name = name2;
|
|
56654
|
-
target.value = tab2.value;
|
|
56655
|
-
target.label = label2;
|
|
56656
|
-
onChange(evt);
|
|
56657
|
-
},
|
|
56683
|
+
onClick: (event) => handleTabClick(index2, tab2, event),
|
|
56658
56684
|
testId: testId2
|
|
56659
56685
|
},
|
|
56660
56686
|
index2
|
|
@@ -56739,14 +56765,10 @@ const TextArea = ({
|
|
|
56739
56765
|
cols,
|
|
56740
56766
|
rows,
|
|
56741
56767
|
disabled: disabled2 = false,
|
|
56742
|
-
onChange =
|
|
56743
|
-
|
|
56744
|
-
|
|
56745
|
-
|
|
56746
|
-
onFocus = () => {
|
|
56747
|
-
},
|
|
56748
|
-
onBlur = () => {
|
|
56749
|
-
},
|
|
56768
|
+
onChange = noop$3,
|
|
56769
|
+
onKeyPress = noop$3,
|
|
56770
|
+
onFocus = noop$3,
|
|
56771
|
+
onBlur = noop$3,
|
|
56750
56772
|
tabIndex = 0,
|
|
56751
56773
|
error: error2 = null,
|
|
56752
56774
|
warning: warning2 = null,
|
|
@@ -70270,14 +70292,10 @@ const UnitInput = ({
|
|
|
70270
70292
|
unitkey = "",
|
|
70271
70293
|
initUnit,
|
|
70272
70294
|
noConversion = false,
|
|
70273
|
-
onChange =
|
|
70274
|
-
|
|
70275
|
-
|
|
70276
|
-
|
|
70277
|
-
onFocus = () => {
|
|
70278
|
-
},
|
|
70279
|
-
onSwitchUnit = () => {
|
|
70280
|
-
},
|
|
70295
|
+
onChange = noop$3,
|
|
70296
|
+
onClick = noop$3,
|
|
70297
|
+
onFocus = noop$3,
|
|
70298
|
+
onSwitchUnit = noop$3,
|
|
70281
70299
|
unitTemplate,
|
|
70282
70300
|
doNotConvertValue = false,
|
|
70283
70301
|
testId,
|