kui-complex 0.0.100 → 0.0.103
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/InputFile/cjs/index.js +7 -2
- package/InputFile/cjs/index.js.map +1 -1
- package/InputFile/index.js +7 -2
- package/InputFile/index.js.map +1 -1
- package/InputWithAutocomplete/cjs/index.js +12 -9
- package/InputWithAutocomplete/cjs/index.js.map +1 -1
- package/InputWithAutocomplete/index.js +12 -9
- package/InputWithAutocomplete/index.js.map +1 -1
- package/cjs/index.js +32 -21
- package/cjs/index.js.map +1 -1
- package/index.d.ts +9 -3
- package/index.js +30 -22
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -458,7 +458,13 @@ declare const Loading: React.ForwardRefExoticComponent<{
|
|
|
458
458
|
declare type KUIComplexSettings = {
|
|
459
459
|
mapKey: string;
|
|
460
460
|
};
|
|
461
|
-
declare
|
|
461
|
+
declare type KUIComplexObserver = (settings: KUIComplexSettings) => void;
|
|
462
|
+
declare const getSettings: () => {
|
|
463
|
+
mapKey: string;
|
|
464
|
+
};
|
|
465
|
+
declare const setSettings: (newSettings: KUIComplexSettings) => void;
|
|
466
|
+
declare const subscribeToSettings: (observer: KUIComplexObserver) => void;
|
|
467
|
+
declare const unsubscribeFromSettings: (observer: KUIComplexObserver) => void;
|
|
462
468
|
|
|
463
469
|
declare const getFormValue: <T extends object>(name?: string | undefined, form?: UseFormReturn<T, any, undefined> | null | undefined) => react_hook_form.FieldValues | undefined;
|
|
464
470
|
declare const getFormError: <T extends object>(name?: string | undefined, form?: UseFormReturn<T, any, undefined> | null | undefined) => string | undefined;
|
|
@@ -470,10 +476,10 @@ declare type VisibilitySettings = {
|
|
|
470
476
|
landlord: boolean;
|
|
471
477
|
};
|
|
472
478
|
declare type DocumentVisibilityVariants = "everybody" | "tenant" | "landlord" | "nobody";
|
|
473
|
-
declare const getVisibility: ({ landlord, tenant }: VisibilitySettings) => "everybody" | "
|
|
479
|
+
declare const getVisibility: ({ landlord, tenant }: VisibilitySettings) => "everybody" | "nobody" | "tenant" | "landlord";
|
|
474
480
|
declare const getVisibilitySettings: (visibility?: DocumentVisibilityVariants | undefined) => {
|
|
475
481
|
tenant: boolean;
|
|
476
482
|
landlord: boolean;
|
|
477
483
|
};
|
|
478
484
|
|
|
479
|
-
export { AutocompleteOption, Avatar, ButtonSelect, ButtonTab, ButtonsPanel, CalendarHeaderWithSelect, CalendarStandardContainer, CalendarStandardHeader, CheckboxGroupWithTitle, CheckboxWithController, DependentInput, DesktopInputWithMonthPicker, DesktopMenuPanel, DocumentVisibilityVariants, InputDropdown, InputFile, InputForDatepicker, InputMultiSelect, InputPassword, InputPhoneWithForm, InputSelect, InputSelectDropdown, InputSelectWithController, InputTextAreaMobile, InputWithAddressAutocomplete, InputWithAutocomplete, InputWithController, InputWithDatePicker, InputWithMask, InputWithMonthPicker, Loading, MapWrapper, MenuItem, MenuPanel, MobileInputWithMonthPicker, MobileMenuPanel, MonthPickerContainer, MonthPickerHeader, PassportStrengthBar, RadioButtons, RadioButtonsWithController, RadioGroupWithLabel, SelectMonth, SelectYear, Switch, Table, TableCell, TableHeadCell, TableRow, Tooltip, UndefinedAvatar, VisibilitySettings, getFormError, getFormValue, getVisibility, getVisibilitySettings, setSettings, shortMonths, useAddressAutocomplete };
|
|
485
|
+
export { AutocompleteOption, Avatar, ButtonSelect, ButtonTab, ButtonsPanel, CalendarHeaderWithSelect, CalendarStandardContainer, CalendarStandardHeader, CheckboxGroupWithTitle, CheckboxWithController, DependentInput, DesktopInputWithMonthPicker, DesktopMenuPanel, DocumentVisibilityVariants, InputDropdown, InputFile, InputForDatepicker, InputMultiSelect, InputPassword, InputPhoneWithForm, InputSelect, InputSelectDropdown, InputSelectWithController, InputTextAreaMobile, InputWithAddressAutocomplete, InputWithAutocomplete, InputWithController, InputWithDatePicker, InputWithMask, InputWithMonthPicker, KUIComplexObserver, KUIComplexSettings, Loading, MapWrapper, MenuItem, MenuPanel, MobileInputWithMonthPicker, MobileMenuPanel, MonthPickerContainer, MonthPickerHeader, PassportStrengthBar, RadioButtons, RadioButtonsWithController, RadioGroupWithLabel, SelectMonth, SelectYear, Switch, Table, TableCell, TableHeadCell, TableRow, Tooltip, UndefinedAvatar, VisibilitySettings, getFormError, getFormValue, getSettings, getVisibility, getVisibilitySettings, setSettings, shortMonths, subscribeToSettings, unsubscribeFromSettings, useAddressAutocomplete };
|
package/index.js
CHANGED
|
@@ -139,14 +139,14 @@ var largeAvatarCSS = function (_a) {
|
|
|
139
139
|
};
|
|
140
140
|
var StyledUndefinedAvatar = styled(UndefinedAvatar, {
|
|
141
141
|
shouldForwardProp: function (prop) { return prop !== "size"; },
|
|
142
|
-
})(templateObject_4$
|
|
142
|
+
})(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), largeAvatarCSS);
|
|
143
143
|
var sizeStyles = {
|
|
144
144
|
xs: css(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n min-width: 24px;\n width: 24px;\n height: 24px;\n p {\n font-size: 10px;\n }\n "], ["\n min-width: 24px;\n width: 24px;\n height: 24px;\n p {\n font-size: 10px;\n }\n "]))),
|
|
145
145
|
s: css(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n min-width: 32px;\n width: 32px;\n height: 32px;\n "], ["\n min-width: 32px;\n width: 32px;\n height: 32px;\n "]))),
|
|
146
146
|
md: css(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n min-width: 40px;\n width: 40px;\n height: 40px;\n @media (max-width: 600px) {\n min-width: 32px;\n width: 32px;\n height: 32px;\n }\n "], ["\n min-width: 40px;\n width: 40px;\n height: 40px;\n @media (max-width: 600px) {\n min-width: 32px;\n width: 32px;\n height: 32px;\n }\n "]))),
|
|
147
147
|
lg: css(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n min-width: 80px;\n width: 80px;\n height: 80px;\n "], ["\n min-width: 80px;\n width: 80px;\n height: 80px;\n "]))),
|
|
148
148
|
};
|
|
149
|
-
var templateObject_1$G, templateObject_2$q, templateObject_3$c, templateObject_4$
|
|
149
|
+
var templateObject_1$G, templateObject_2$q, templateObject_3$c, templateObject_4$7, templateObject_5$4, templateObject_6$1, templateObject_7$1, templateObject_8$1;
|
|
150
150
|
|
|
151
151
|
var ButtonTab = forwardRef(function (_a, ref) {
|
|
152
152
|
var index = _a.index, onClick = _a.onClick, isActive = _a.isActive, label = _a.label;
|
|
@@ -553,12 +553,12 @@ var PassportStrengthBar = forwardRef(function (_a, ref) {
|
|
|
553
553
|
var Wrapper$2 = styled.div(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n margin-top: 16px;\n min-height: 86px;\n @media (max-width: 900px) {\n min-height: unset;\n }\n &.hidden {\n opacity: 0;\n @media (max-width: 900px) {\n display: none;\n }\n }\n"], ["\n margin-top: 16px;\n min-height: 86px;\n @media (max-width: 900px) {\n min-height: unset;\n }\n &.hidden {\n opacity: 0;\n @media (max-width: 900px) {\n display: none;\n }\n }\n"])));
|
|
554
554
|
var ReliabilityLevelWrapper = styled.div(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n display: flex;\n margin-bottom: 8px;\n"], ["\n display: flex;\n margin-bottom: 8px;\n"])));
|
|
555
555
|
var ReliabilityLevel = styled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n width: calc(100% / 4);\n margin-right: 16px;\n &:last-of-type {\n margin-right: 0;\n }\n"], ["\n width: calc(100% / 4);\n margin-right: 16px;\n &:last-of-type {\n margin-right: 0;\n }\n"])));
|
|
556
|
-
var StyledLinearProgress = styled(LinearProgress)(templateObject_4$
|
|
556
|
+
var StyledLinearProgress = styled(LinearProgress)(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n height: 8px;\n border-radius: 8px;\n background-color: ", ";\n & .KUI-LinearProgress_bar {\n background-color: ", ";\n width: 102%;\n }\n"], ["\n height: 8px;\n border-radius: 8px;\n background-color: ", ";\n & .KUI-LinearProgress_bar {\n background-color: ", ";\n width: 102%;\n }\n"])), theme.palette.grey.fifteenB, function (_a) {
|
|
557
557
|
var color = _a.color;
|
|
558
558
|
return color;
|
|
559
559
|
});
|
|
560
560
|
var Description = styled(Caption)(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n margin-top: 16px;\n @media (max-width: 900px) {\n margin-top: 8px;\n font-size: 12px;\n }\n"], ["\n margin-top: 16px;\n @media (max-width: 900px) {\n margin-top: 8px;\n font-size: 12px;\n }\n"])));
|
|
561
|
-
var templateObject_1$q, templateObject_2$h, templateObject_3$8, templateObject_4$
|
|
561
|
+
var templateObject_1$q, templateObject_2$h, templateObject_3$8, templateObject_4$6, templateObject_5$3;
|
|
562
562
|
|
|
563
563
|
var getFormValue = function (name, form) {
|
|
564
564
|
var names = name === null || name === void 0 ? void 0 : name.split(".");
|
|
@@ -716,11 +716,11 @@ InputWithDatePicker.defaultProps = {
|
|
|
716
716
|
var ContentWrapper$2 = styled.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n padding: 0px 40px 24px;\n @media (max-width: 600px) {\n padding: 20px 0 0;\n }\n"], ["\n padding: 0px 40px 24px;\n @media (max-width: 600px) {\n padding: 20px 0 0;\n }\n"])));
|
|
717
717
|
var StyledCalendarStandardContainer = styled(CalendarStandardContainer)(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n height: 410px;\n .react-datepicker__header {\n padding: 0 !important;\n }\n .react-datepicker__day-names {\n padding: 35px 22px 0;\n background-color: ", ";\n border-radius: 16px 16px 0 0;\n @media (max-width: 900px) {\n padding: 24px 16px 0;\n }\n }\n .react-datepicker__month {\n justify-content: space-between;\n height: calc(100% - 124px);\n background-color: ", ";\n border-radius: 0 0 16px 16px;\n padding: 20px 22px 24px;\n margin: 0 !important;\n box-sizing: border-box;\n @media (max-width: 900px) {\n padding: 20px 16px 24px;\n }\n }\n @media (max-width: 600px) {\n height: auto;\n margin-bottom: -4px;\n }\n"], ["\n height: 410px;\n .react-datepicker__header {\n padding: 0 !important;\n }\n .react-datepicker__day-names {\n padding: 35px 22px 0;\n background-color: ", ";\n border-radius: 16px 16px 0 0;\n @media (max-width: 900px) {\n padding: 24px 16px 0;\n }\n }\n .react-datepicker__month {\n justify-content: space-between;\n height: calc(100% - 124px);\n background-color: ", ";\n border-radius: 0 0 16px 16px;\n padding: 20px 22px 24px;\n margin: 0 !important;\n box-sizing: border-box;\n @media (max-width: 900px) {\n padding: 20px 16px 24px;\n }\n }\n @media (max-width: 600px) {\n height: auto;\n margin-bottom: -4px;\n }\n"])), theme.palette.background.light1, theme.palette.background.light1);
|
|
718
718
|
var DayContent = styled.span(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n padding-top: 1px;\n font-family: Inter, sans-serif;\n @media (max-width: 600px) {\n font-weight: 400;\n }\n"], ["\n padding-top: 1px;\n font-family: Inter, sans-serif;\n @media (max-width: 600px) {\n font-weight: 400;\n }\n"])));
|
|
719
|
-
var StyledModal = styled(Modal)(templateObject_4$
|
|
719
|
+
var StyledModal = styled(Modal)(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n .KUI-Modal_title {\n font-size: 24px;\n line-height: 32px;\n text-align: ", ";\n }\n .KUI-Modal_description {\n margin-bottom: 36px;\n }\n"], ["\n .KUI-Modal_title {\n font-size: 24px;\n line-height: 32px;\n text-align: ", ";\n }\n .KUI-Modal_description {\n margin-bottom: 36px;\n }\n"])), function (_a) {
|
|
720
720
|
var alignTitle = _a.alignTitle;
|
|
721
721
|
return alignTitle || "center";
|
|
722
722
|
});
|
|
723
|
-
var templateObject_1$m, templateObject_2$e, templateObject_3$6, templateObject_4$
|
|
723
|
+
var templateObject_1$m, templateObject_2$e, templateObject_3$6, templateObject_4$5;
|
|
724
724
|
|
|
725
725
|
var shortMonths = [
|
|
726
726
|
"ЯНВ",
|
|
@@ -1084,8 +1084,8 @@ var StyledContentWrapper = styled.div(templateObject_3$5 || (templateObject_3$5
|
|
|
1084
1084
|
var cursor = _a.cursor;
|
|
1085
1085
|
return cursor;
|
|
1086
1086
|
});
|
|
1087
|
-
var StyledContent$1 = styled.div(templateObject_4$
|
|
1088
|
-
var templateObject_1$d, templateObject_2$9, templateObject_3$5, templateObject_4$
|
|
1087
|
+
var StyledContent$1 = styled.div(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n ", ";\n z-index: -1;\n"], ["\n ", ";\n z-index: -1;\n"])), containerCSS);
|
|
1088
|
+
var templateObject_1$d, templateObject_2$9, templateObject_3$5, templateObject_4$4;
|
|
1089
1089
|
|
|
1090
1090
|
var ButtonSelect = forwardRef(function (props, ref) {
|
|
1091
1091
|
var _a;
|
|
@@ -1249,7 +1249,7 @@ var rowDirectionCSS = function (_a) {
|
|
|
1249
1249
|
};
|
|
1250
1250
|
var StyledWrapper$6 = styled(Grid, {
|
|
1251
1251
|
shouldForwardProp: function (prop) { return prop !== "hasError" && prop !== "withTitle"; },
|
|
1252
|
-
})(templateObject_4$
|
|
1252
|
+
})(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n border: 1px solid\n ", ";\n ", ";\n"], ["\n border: 1px solid\n ", ";\n ", ";\n"])), function (_a) {
|
|
1253
1253
|
var hasError = _a.hasError;
|
|
1254
1254
|
return hasError ? theme.palette.red.fiftyP : theme.palette.grey.fifteenB;
|
|
1255
1255
|
}, function (_a) {
|
|
@@ -1262,7 +1262,7 @@ var StyledTitle = styled(Caption)(templateObject_5$2 || (templateObject_5$2 = __
|
|
|
1262
1262
|
var direction = _a.direction;
|
|
1263
1263
|
return (direction === "vertical" ? 8 : 0);
|
|
1264
1264
|
});
|
|
1265
|
-
var templateObject_1$a, templateObject_2$7, templateObject_3$4, templateObject_4$
|
|
1265
|
+
var templateObject_1$a, templateObject_2$7, templateObject_3$4, templateObject_4$3, templateObject_5$2;
|
|
1266
1266
|
|
|
1267
1267
|
var Loading = forwardRef(function (_a) {
|
|
1268
1268
|
var height = _a.height, className = _a.className, otherProps = __rest(_a, ["height", "className"]);
|
|
@@ -1288,7 +1288,7 @@ function CreatingEntityFromDropdown(_a) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
var handleModalWrapperClick = function (e) { return e.stopPropagation(); };
|
|
1290
1290
|
return (jsxs$1(Fragment$1, { children: [jsxs$1(StyledWrapper$4, __assign({ container: true, onClick: handleModalOpen, alignItems: "center" }, { children: [jsx(StyledPlusIcon, { width: 12, height: 12 }), jsx(Caption, __assign({ color: "fiftyP", size: "xs", weight: 500 }, { children: creatingLabel }))] })), jsx(StyledModalWrapper, __assign({ onClick: handleModalWrapperClick }, { children: renderCreatingModal({
|
|
1291
|
-
|
|
1291
|
+
open: isModalOpen,
|
|
1292
1292
|
handleClose: handleModalClose,
|
|
1293
1293
|
}) }))] }));
|
|
1294
1294
|
}
|
|
@@ -1337,6 +1337,9 @@ function InputWithAutocomplete(_a) {
|
|
|
1337
1337
|
var handleCloseDropdown = function () {
|
|
1338
1338
|
setIsOpenDropDown(false);
|
|
1339
1339
|
};
|
|
1340
|
+
var handleDropdownToggle = function () {
|
|
1341
|
+
setIsOpenDropDown(function (prev) { return !prev; });
|
|
1342
|
+
};
|
|
1340
1343
|
var handleSelect = function (option) {
|
|
1341
1344
|
var _a;
|
|
1342
1345
|
onSelectItem(option);
|
|
@@ -1349,21 +1352,20 @@ function InputWithAutocomplete(_a) {
|
|
|
1349
1352
|
var handleSearch = function (e) {
|
|
1350
1353
|
if (onSearchItem) {
|
|
1351
1354
|
onSearchItem(e.target.value);
|
|
1352
|
-
|
|
1355
|
+
if (hideName)
|
|
1356
|
+
form.setValue(hideName, null);
|
|
1353
1357
|
}
|
|
1354
1358
|
if (!e.target.value && hideName) {
|
|
1355
|
-
|
|
1359
|
+
if (hideName)
|
|
1360
|
+
form.setValue(hideName, null);
|
|
1356
1361
|
form.setValue(name, null);
|
|
1357
1362
|
onSelectItem(null);
|
|
1358
1363
|
}
|
|
1359
1364
|
handleOpenDropdown();
|
|
1360
1365
|
};
|
|
1361
1366
|
var forwardRef = useForkRef(inputRef, inputRefProps);
|
|
1362
|
-
return (jsxs(StyledWrapper$3, { children: [isLabelLoading && (jsx$1(StyledLoadingWrapper, { children: jsx$1(Loading, { height: "100%" }) })), jsx$1(StyledInput$2, __assign({ form: form, onInput: handleSearch, onFocus: handleOpenDropdown, name: name, disabled: disabled, ref: forwardRef, isDropdownOpen: isOpenDropdown }, inputProps, { endIcon: !disabled && (jsxs(Grid, __assign({ container: true, alignItems: "center" }, { children: [jsx$1(Box, __assign({ mr: 2 }, { children: endComponent })), inputProps.endIcon ||
|
|
1363
|
-
(!disabled && (jsx$1(
|
|
1364
|
-
{ transition: "all linear .2s" },
|
|
1365
|
-
isOpenDropdown && { transform: "rotate(180deg)" },
|
|
1366
|
-
] })))] }))) })), jsx$1(AutocompleteDropdown, { renderOption: renderOption, options: options, inputRef: {
|
|
1367
|
+
return (jsxs(StyledWrapper$3, { children: [isLabelLoading && (jsx$1(StyledLoadingWrapper, { children: jsx$1(Loading, { height: "100%" }) })), jsx$1(StyledInput$2, __assign({ form: form, onInput: handleSearch, onFocus: handleOpenDropdown, name: name, disabled: disabled, ref: forwardRef, isDropdownOpen: isOpenDropdown }, inputProps, { endIcon: !disabled && (jsxs(Grid, __assign({ container: true, alignItems: "center", onClick: handleDropdownToggle }, { children: [jsx$1(Box, __assign({ mr: 2 }, { children: endComponent })), inputProps.endIcon ||
|
|
1368
|
+
(!disabled && (jsx$1(StyledIcon, { width: 12, height: 13, css: [isOpenDropdown && { transform: "rotate(180deg)" }] })))] }))) })), jsx$1(AutocompleteDropdown, { renderOption: renderOption, options: options, inputRef: {
|
|
1367
1369
|
current: (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
1368
1370
|
}, isOpenDropdown: isOpenDropdown, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, isLoading: isLoading, handleScrollEnd: handleScrollEnd, creatingLabel: creatingLabel, renderCreatingModal: renderCreatingModal })] }));
|
|
1369
1371
|
}
|
|
@@ -1373,7 +1375,8 @@ var StyledInput$2 = styled(InputWithController)(templateObject_3$2 || (templateO
|
|
|
1373
1375
|
var isDropdownOpen = _a.isDropdownOpen;
|
|
1374
1376
|
return (isDropdownOpen ? 0 : 1);
|
|
1375
1377
|
});
|
|
1376
|
-
var
|
|
1378
|
+
var StyledIcon = styled(HalfArrowIcon)(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n transition: all ease-out 0.3s;\n cursor: pointer;\n"], ["\n transition: all ease-out 0.3s;\n cursor: pointer;\n"])));
|
|
1379
|
+
var templateObject_1$5, templateObject_2$3, templateObject_3$2, templateObject_4$2;
|
|
1377
1380
|
|
|
1378
1381
|
function AutocompleteOption(_a) {
|
|
1379
1382
|
var label = _a.label;
|
|
@@ -1469,7 +1472,7 @@ var templateObject_1$2, templateObject_2$2, templateObject_3$1, templateObject_4
|
|
|
1469
1472
|
var limitTitle = 100;
|
|
1470
1473
|
var InputFile = forwardRef(function (props, ref) {
|
|
1471
1474
|
var _a;
|
|
1472
|
-
var form = props.form, name = props.name, label = props.label, disabled = props.disabled, withEdit = props.withEdit, fileName = props.fileName, otherProps = __rest(props, ["form", "name", "label", "disabled", "withEdit", "fileName"]);
|
|
1475
|
+
var form = props.form, name = props.name, label = props.label, disabled = props.disabled, withEdit = props.withEdit, fileName = props.fileName, onChange = props.onChange, otherProps = __rest(props, ["form", "name", "label", "disabled", "withEdit", "fileName", "onChange"]);
|
|
1473
1476
|
var _b = useState(false), mounted = _b[0], setMounted = _b[1];
|
|
1474
1477
|
var _c = useState(), file = _c[0], setFile = _c[1];
|
|
1475
1478
|
var _d = useState(""), defaultFileURL = _d[0], setDefaultFileURL = _d[1];
|
|
@@ -1516,7 +1519,10 @@ var InputFile = forwardRef(function (props, ref) {
|
|
|
1516
1519
|
}, [file]);
|
|
1517
1520
|
var handleChange = function (e) {
|
|
1518
1521
|
if (e.target.files && e.target.files[0]) {
|
|
1519
|
-
|
|
1522
|
+
var newFile = e.target.files[0];
|
|
1523
|
+
setFile(newFile);
|
|
1524
|
+
if (onChange)
|
|
1525
|
+
onChange(newFile);
|
|
1520
1526
|
}
|
|
1521
1527
|
else {
|
|
1522
1528
|
setFile(undefined);
|
|
@@ -1534,6 +1540,8 @@ var InputFile = forwardRef(function (props, ref) {
|
|
|
1534
1540
|
setFile(undefined);
|
|
1535
1541
|
setDefaultFileURL("");
|
|
1536
1542
|
field.onChange({ target: { value: null, name: name }, type: "change" });
|
|
1543
|
+
if (onChange)
|
|
1544
|
+
onChange(null);
|
|
1537
1545
|
};
|
|
1538
1546
|
var changeName = function (newName) {
|
|
1539
1547
|
var currentFile = form.getValues(name);
|
|
@@ -1799,5 +1807,5 @@ var getVisibilitySettings = function (visibility) {
|
|
|
1799
1807
|
}
|
|
1800
1808
|
};
|
|
1801
1809
|
|
|
1802
|
-
export { AutocompleteOption, Avatar, ButtonSelect, ButtonTab, ButtonsPanel, CalendarHeaderWithSelect, CalendarStandardContainer, CalendarStandardHeader, CheckboxGroupWithTitle, CheckboxWithController, DependentInput, DesktopInputWithMonthPicker, DesktopMenuPanel, InputDropdown, InputFile, InputForDatepicker, InputMultiSelect, InputPassword, InputPhoneWithForm, InputSelect, InputSelectDropdown, InputSelectWithController, InputTextAreaMobile, InputWithAddressAutocomplete, InputWithAutocomplete, InputWithController, InputWithDatePicker, InputWithMask, InputWithMonthPicker, Loading, MapWrapper, MenuItem, MenuPanel, MobileInputWithMonthPicker, MobileMenuPanel, MonthPickerContainer, MonthPickerHeader, PassportStrengthBar, RadioButtons, RadioButtonsWithController, RadioGroupWithLabel, SelectMonth, SelectYear, Switch, Table, TableCell, TableHeadCell, TableRow, Tooltip, UndefinedAvatar, getFormError, getFormValue, getVisibility, getVisibilitySettings, setSettings, shortMonths, useAddressAutocomplete };
|
|
1810
|
+
export { AutocompleteOption, Avatar, ButtonSelect, ButtonTab, ButtonsPanel, CalendarHeaderWithSelect, CalendarStandardContainer, CalendarStandardHeader, CheckboxGroupWithTitle, CheckboxWithController, DependentInput, DesktopInputWithMonthPicker, DesktopMenuPanel, InputDropdown, InputFile, InputForDatepicker, InputMultiSelect, InputPassword, InputPhoneWithForm, InputSelect, InputSelectDropdown, InputSelectWithController, InputTextAreaMobile, InputWithAddressAutocomplete, InputWithAutocomplete, InputWithController, InputWithDatePicker, InputWithMask, InputWithMonthPicker, Loading, MapWrapper, MenuItem, MenuPanel, MobileInputWithMonthPicker, MobileMenuPanel, MonthPickerContainer, MonthPickerHeader, PassportStrengthBar, RadioButtons, RadioButtonsWithController, RadioGroupWithLabel, SelectMonth, SelectYear, Switch, Table, TableCell, TableHeadCell, TableRow, Tooltip, UndefinedAvatar, getFormError, getFormValue, getSettings, getVisibility, getVisibilitySettings, setSettings, shortMonths, subscribeToSettings, unsubscribeFromSettings, useAddressAutocomplete };
|
|
1803
1811
|
//# sourceMappingURL=index.js.map
|