@onesy/ui-react 1.0.0 → 1.0.2
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/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.js +1 -1
- package/Append/Append.d.ts +1 -1
- package/AreaChartItem/AreaChartItem.js +8 -8
- package/AudioPlayer/AudioPlayer.js +16 -16
- package/AudioRecorder/AudioRecorder.js +5 -5
- package/AutoComplete/AutoComplete.d.ts +2 -2
- package/Avatar/Avatar.js +4 -4
- package/BubbleChartItem/BubbleChartItem.js +6 -6
- package/Calendar/Calendar.d.ts +2 -2
- package/Calendar/Calendar.js +4 -4
- package/CalendarMonth/CalendarMonth.d.ts +3 -3
- package/CalendarMonth/CalendarMonth.js +2 -2
- package/CalendarViews/CalendarViews.d.ts +1 -1
- package/Carousel/Carousel.d.ts +2 -2
- package/Chart/Chart.d.ts +1 -1
- package/Clock/Clock.d.ts +4 -4
- package/Clock/Clock.js +11 -11
- package/ColumnChartItem/ColumnChartItem.js +6 -6
- package/Confirm/Confirm.js +4 -4
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DragAndDropList/DragAndDropList.js +5 -5
- package/Drawing/Drawing.d.ts +1 -1
- package/FileChoose/FileChoose.d.ts +1 -1
- package/Grid/Grid.d.ts +1 -1
- package/HTMLCanvas/HTMLCanvas.js +5 -5
- package/ImageCrop/ImageCrop.d.ts +1 -1
- package/ImageCrop/ImageCrop.js +22 -22
- package/ImageEdit/ImageEdit.d.ts +1 -1
- package/ImageEdit/ImageEdit.js +9 -9
- package/ImageGallery/ImageGallery.js +11 -11
- package/Interaction/Interaction.d.ts +1 -1
- package/Keyframes/Keyframes.d.ts +1 -1
- package/Line/Line.d.ts +5 -5
- package/LineChartItem/LineChartItem.js +7 -7
- package/MainProgress/MainProgress.js +13 -13
- package/Medias/Medias.d.ts +1 -1
- package/MenuDesktop/MenuDesktop.d.ts +2 -2
- package/NavigationBar/NavigationBar.d.ts +1 -1
- package/NavigationItem/NavigationItem.d.ts +1 -1
- package/Parallax/Parallax.d.ts +1 -1
- package/RichTextEditor/RichTextEditor.js +33 -33
- package/ScatterChartItem/ScatterChartItem.js +6 -6
- package/ScreenCapture/ScreenCapture.d.ts +1 -1
- package/ScreenCapture/ScreenCapture.js +4 -4
- package/Section/Section.d.ts +1 -1
- package/Slider/Slider.d.ts +1 -1
- package/SmartTextField/SmartTextField.js +24 -24
- package/TableCell/TableCell.d.ts +1 -1
- package/TimePicker/TimePicker.d.ts +2 -2
- package/Transition/Transition.d.ts +1 -1
- package/Transitions/Transitions.d.ts +1 -1
- package/Tree/Tree.js +2 -2
- package/VideoPlayer/VideoPlayer.js +17 -17
- package/Weather/Weather.d.ts +3 -3
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +1 -1
- package/esm/Accordion/Accordion.js +1 -1
- package/esm/AreaChartItem/AreaChartItem.js +8 -8
- package/esm/AudioPlayer/AudioPlayer.js +16 -16
- package/esm/AudioRecorder/AudioRecorder.js +5 -5
- package/esm/Avatar/Avatar.js +2 -2
- package/esm/BubbleChartItem/BubbleChartItem.js +6 -6
- package/esm/Calendar/Calendar.js +4 -4
- package/esm/CalendarMonth/CalendarMonth.js +2 -2
- package/esm/Clock/Clock.js +11 -11
- package/esm/ColumnChartItem/ColumnChartItem.js +6 -6
- package/esm/Confirm/Confirm.js +4 -4
- package/esm/DragAndDropList/DragAndDropList.js +5 -5
- package/esm/HTMLCanvas/HTMLCanvas.js +5 -5
- package/esm/ImageCrop/ImageCrop.js +22 -22
- package/esm/ImageEdit/ImageEdit.js +9 -9
- package/esm/ImageGallery/ImageGallery.js +11 -11
- package/esm/LineChartItem/LineChartItem.js +7 -7
- package/esm/MainProgress/MainProgress.js +13 -13
- package/esm/RichTextEditor/RichTextEditor.js +33 -33
- package/esm/ScatterChartItem/ScatterChartItem.js +6 -6
- package/esm/ScreenCapture/ScreenCapture.js +4 -4
- package/esm/SmartTextField/SmartTextField.js +24 -24
- package/esm/Tree/Tree.js +2 -2
- package/esm/VideoPlayer/VideoPlayer.js +17 -17
- package/esm/Zoom/Zoom.js +1 -1
- package/esm/index.js +1 -1
- package/esm/useScroll/useScroll.js +2 -2
- package/package.json +2 -2
- package/types.d.ts +23 -23
- package/useForm/validate.d.ts +6 -6
- package/useScroll/useScroll.d.ts +1 -1
- package/useScroll/useScroll.js +2 -2
package/useForm/validate.d.ts
CHANGED
@@ -19,9 +19,9 @@ export interface IValidateModelValueMethodOptions {
|
|
19
19
|
object: IValidateModelValue;
|
20
20
|
options: IValidateOptions;
|
21
21
|
}
|
22
|
-
export
|
23
|
-
export
|
24
|
-
export
|
22
|
+
export type IValidateModelValueMethod = (value: any, options: IValidateModelValueMethodOptions) => Promise<any> | any;
|
23
|
+
export type IValidateModelValueValidations = 'required' | 'is' | 'isValid' | 'of' | 'ofValid' | 'equal' | 'notEqual' | 'equalDeep' | 'notEqualDeep' | 'some' | 'in' | 'every' | 'properties' | 'notProperties' | 'min' | 'max' | 'length' | 'method';
|
24
|
+
export type IValidateModelMessages = {
|
25
25
|
[p in IValidateModelValueValidations]?: string;
|
26
26
|
};
|
27
27
|
export interface IValidateModelValue {
|
@@ -52,14 +52,14 @@ export interface IValidateModelValue {
|
|
52
52
|
capitalize?: boolean;
|
53
53
|
propertyNameUpdate?: (value: any) => string;
|
54
54
|
}
|
55
|
-
export
|
55
|
+
export type IUseFormValues = Record<string, IValidateModelValue>;
|
56
56
|
export interface IForm {
|
57
57
|
value: any;
|
58
58
|
values: IUseFormValues;
|
59
59
|
valid: boolean;
|
60
60
|
}
|
61
|
-
export
|
62
|
-
export
|
61
|
+
export type IValidateValidation = (property: IValidateModelValue, form: IForm) => void | Error | Promise<void | Error>;
|
62
|
+
export type IValidateVales = Record<string, IValidateModelValue>;
|
63
63
|
export declare const onValidateError: (options: IValidateOptions, model: IValidateModelValue, message?: any) => never;
|
64
64
|
declare const validate: (model: IValidateModelValue, property: string, form: IForm, options_?: IValidateOptions) => Promise<void>;
|
65
65
|
export default validate;
|
package/useScroll/useScroll.d.ts
CHANGED
package/useScroll/useScroll.js
CHANGED
@@ -11,8 +11,8 @@ const useScroll = (props) => {
|
|
11
11
|
const refs = {
|
12
12
|
root: react_1.default.useRef(root),
|
13
13
|
previous: react_1.default.useRef(0),
|
14
|
-
offset: react_1.default.useRef(),
|
15
|
-
direction: react_1.default.useRef(),
|
14
|
+
offset: react_1.default.useRef(null),
|
15
|
+
direction: react_1.default.useRef(null),
|
16
16
|
response: react_1.default.useRef(response)
|
17
17
|
};
|
18
18
|
refs.root.current = root;
|