kui-complex 0.0.100 → 0.0.102
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/cjs/index.js +10 -2
- package/cjs/index.js.map +1 -1
- package/index.d.ts +8 -2
- package/index.js +8 -3
- 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;
|
|
@@ -476,4 +482,4 @@ declare const getVisibilitySettings: (visibility?: DocumentVisibilityVariants |
|
|
|
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
|
@@ -1469,7 +1469,7 @@ var templateObject_1$2, templateObject_2$2, templateObject_3$1, templateObject_4
|
|
|
1469
1469
|
var limitTitle = 100;
|
|
1470
1470
|
var InputFile = forwardRef(function (props, ref) {
|
|
1471
1471
|
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"]);
|
|
1472
|
+
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
1473
|
var _b = useState(false), mounted = _b[0], setMounted = _b[1];
|
|
1474
1474
|
var _c = useState(), file = _c[0], setFile = _c[1];
|
|
1475
1475
|
var _d = useState(""), defaultFileURL = _d[0], setDefaultFileURL = _d[1];
|
|
@@ -1516,7 +1516,10 @@ var InputFile = forwardRef(function (props, ref) {
|
|
|
1516
1516
|
}, [file]);
|
|
1517
1517
|
var handleChange = function (e) {
|
|
1518
1518
|
if (e.target.files && e.target.files[0]) {
|
|
1519
|
-
|
|
1519
|
+
var newFile = e.target.files[0];
|
|
1520
|
+
setFile(newFile);
|
|
1521
|
+
if (onChange)
|
|
1522
|
+
onChange(newFile);
|
|
1520
1523
|
}
|
|
1521
1524
|
else {
|
|
1522
1525
|
setFile(undefined);
|
|
@@ -1534,6 +1537,8 @@ var InputFile = forwardRef(function (props, ref) {
|
|
|
1534
1537
|
setFile(undefined);
|
|
1535
1538
|
setDefaultFileURL("");
|
|
1536
1539
|
field.onChange({ target: { value: null, name: name }, type: "change" });
|
|
1540
|
+
if (onChange)
|
|
1541
|
+
onChange(null);
|
|
1537
1542
|
};
|
|
1538
1543
|
var changeName = function (newName) {
|
|
1539
1544
|
var currentFile = form.getValues(name);
|
|
@@ -1799,5 +1804,5 @@ var getVisibilitySettings = function (visibility) {
|
|
|
1799
1804
|
}
|
|
1800
1805
|
};
|
|
1801
1806
|
|
|
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 };
|
|
1807
|
+
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
1808
|
//# sourceMappingURL=index.js.map
|