@qsxy/element-plus-react 1.0.0-next.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/Badge/Badge.d.ts +4 -0
- package/dist/Badge/Badge.js +65 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +39 -0
- package/dist/Badge/typings.d.ts +14 -0
- package/dist/Badge/typings.js +17 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/dist/Breadcrumb/Breadcrumb.js +54 -0
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbItem.js +55 -0
- package/dist/Breadcrumb/index.d.ts +3 -0
- package/dist/Breadcrumb/index.js +42 -0
- package/dist/Breadcrumb/typings.d.ts +13 -0
- package/dist/Breadcrumb/typings.js +17 -0
- package/dist/Button/Button.d.ts +14 -0
- package/dist/Button/Button.js +99 -0
- package/dist/Button/ButtonGroup.d.ts +4 -0
- package/dist/Button/ButtonGroup.js +48 -0
- package/dist/Button/ButtonGroupContext.d.ts +5 -0
- package/dist/Button/ButtonGroupContext.js +30 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +42 -0
- package/dist/Button/typings.d.ts +37 -0
- package/dist/Button/typings.js +17 -0
- package/dist/Calendar/Calendar.d.ts +4 -0
- package/dist/Calendar/Calendar.js +278 -0
- package/dist/Calendar/CalendarContext.d.ts +27 -0
- package/dist/Calendar/CalendarContext.js +36 -0
- package/dist/Calendar/DatePanel.d.ts +4 -0
- package/dist/Calendar/DatePanel.js +210 -0
- package/dist/Calendar/DateRangePanel.d.ts +4 -0
- package/dist/Calendar/DateRangePanel.js +145 -0
- package/dist/Calendar/Footer.d.ts +3 -0
- package/dist/Calendar/Footer.js +57 -0
- package/dist/Calendar/Header.d.ts +4 -0
- package/dist/Calendar/Header.js +71 -0
- package/dist/Calendar/MonthPanel.d.ts +4 -0
- package/dist/Calendar/MonthPanel.js +156 -0
- package/dist/Calendar/MonthRangePanel.d.ts +4 -0
- package/dist/Calendar/MonthRangePanel.js +144 -0
- package/dist/Calendar/ShortCuts.d.ts +12 -0
- package/dist/Calendar/ShortCuts.js +41 -0
- package/dist/Calendar/WeekPanel.d.ts +4 -0
- package/dist/Calendar/WeekPanel.js +179 -0
- package/dist/Calendar/YearPanel.d.ts +4 -0
- package/dist/Calendar/YearPanel.js +158 -0
- package/dist/Calendar/YearRangePanel.d.ts +4 -0
- package/dist/Calendar/YearRangePanel.js +152 -0
- package/dist/Calendar/index.d.ts +5 -0
- package/dist/Calendar/index.js +47 -0
- package/dist/Calendar/typings.d.ts +92 -0
- package/dist/Calendar/typings.js +17 -0
- package/dist/Calendar/util.d.ts +9 -0
- package/dist/Calendar/util.js +81 -0
- package/dist/Card/Card.d.ts +4 -0
- package/dist/Card/Card.js +46 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +39 -0
- package/dist/Card/typings.d.ts +8 -0
- package/dist/Card/typings.js +17 -0
- package/dist/Cascader/Cascader.d.ts +4 -0
- package/dist/Cascader/Cascader.js +630 -0
- package/dist/Cascader/CascaderContext.d.ts +18 -0
- package/dist/Cascader/CascaderContext.js +52 -0
- package/dist/Cascader/CascaderDropdown.d.ts +10 -0
- package/dist/Cascader/CascaderDropdown.js +81 -0
- package/dist/Cascader/CascaderMenu.d.ts +12 -0
- package/dist/Cascader/CascaderMenu.js +191 -0
- package/dist/Cascader/Utils.d.ts +3 -0
- package/dist/Cascader/Utils.js +83 -0
- package/dist/Cascader/index.d.ts +2 -0
- package/dist/Cascader/index.js +39 -0
- package/dist/Cascader/typings.d.ts +79 -0
- package/dist/Cascader/typings.js +17 -0
- package/dist/Cascader/useCascader.d.ts +30 -0
- package/dist/Cascader/useCascader.js +614 -0
- package/dist/Checkbox/Checkbox.d.ts +4 -0
- package/dist/Checkbox/Checkbox.js +168 -0
- package/dist/Checkbox/CheckboxButton.d.ts +4 -0
- package/dist/Checkbox/CheckboxButton.js +166 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/index.js +42 -0
- package/dist/Checkbox/typings.d.ts +21 -0
- package/dist/Checkbox/typings.js +17 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +12 -0
- package/dist/CheckboxGroup/CheckboxGroup.js +117 -0
- package/dist/CheckboxGroup/CheckboxGroupContext.d.ts +15 -0
- package/dist/CheckboxGroup/CheckboxGroupContext.js +30 -0
- package/dist/CheckboxGroup/index.d.ts +4 -0
- package/dist/CheckboxGroup/index.js +42 -0
- package/dist/Col/Col.d.ts +4 -0
- package/dist/Col/Col.js +89 -0
- package/dist/Col/index.d.ts +2 -0
- package/dist/Col/index.js +39 -0
- package/dist/Col/typings.d.ts +16 -0
- package/dist/Col/typings.js +17 -0
- package/dist/Collapse/Collapse.d.ts +4 -0
- package/dist/Collapse/Collapse.js +46 -0
- package/dist/Collapse/CollapseContext.d.ts +10 -0
- package/dist/Collapse/CollapseContext.js +35 -0
- package/dist/Collapse/CollapseItem.d.ts +4 -0
- package/dist/Collapse/CollapseItem.js +94 -0
- package/dist/Collapse/CollapseTransition.d.ts +6 -0
- package/dist/Collapse/CollapseTransition.js +78 -0
- package/dist/Collapse/index.d.ts +3 -0
- package/dist/Collapse/index.js +42 -0
- package/dist/Collapse/typings.d.ts +13 -0
- package/dist/Collapse/typings.js +17 -0
- package/dist/ColorPicker/AlphaSlider.d.ts +12 -0
- package/dist/ColorPicker/AlphaSlider.js +133 -0
- package/dist/ColorPicker/ColorPicker.d.ts +4 -0
- package/dist/ColorPicker/ColorPicker.js +215 -0
- package/dist/ColorPicker/HueSlider.d.ts +12 -0
- package/dist/ColorPicker/HueSlider.js +125 -0
- package/dist/ColorPicker/Predefine.d.ts +12 -0
- package/dist/ColorPicker/Predefine.js +72 -0
- package/dist/ColorPicker/SvPanel.d.ts +11 -0
- package/dist/ColorPicker/SvPanel.js +95 -0
- package/dist/ColorPicker/color.d.ts +28 -0
- package/dist/ColorPicker/color.js +293 -0
- package/dist/ColorPicker/draggable.d.ts +6 -0
- package/dist/ColorPicker/draggable.js +60 -0
- package/dist/ColorPicker/index.d.ts +2 -0
- package/dist/ColorPicker/index.js +39 -0
- package/dist/ColorPicker/typings.d.ts +13 -0
- package/dist/ColorPicker/typings.js +17 -0
- package/dist/ColorPicker/util.d.ts +6 -0
- package/dist/ColorPicker/util.js +78 -0
- package/dist/ConfigProvider/ConfigProvider.d.ts +16 -0
- package/dist/ConfigProvider/ConfigProvider.js +34 -0
- package/dist/ConfigProvider/index.d.ts +2 -0
- package/dist/ConfigProvider/index.js +39 -0
- package/dist/DatePicker/DatePicker.d.ts +4 -0
- package/dist/DatePicker/DatePicker.js +224 -0
- package/dist/DatePicker/DateRangePicker.d.ts +4 -0
- package/dist/DatePicker/DateRangePicker.js +287 -0
- package/dist/DatePicker/index.d.ts +2 -0
- package/dist/DatePicker/index.js +39 -0
- package/dist/DatePicker/main.d.ts +4 -0
- package/dist/DatePicker/main.js +46 -0
- package/dist/DatePicker/typings.d.ts +95 -0
- package/dist/DatePicker/typings.js +17 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +10 -0
- package/dist/DateTimePicker/DateTimePicker.js +227 -0
- package/dist/DateTimePicker/index.d.ts +2 -0
- package/dist/DateTimePicker/index.js +39 -0
- package/dist/DateTimePicker/typings.d.ts +18 -0
- package/dist/DateTimePicker/typings.js +17 -0
- package/dist/DateTimePicker/util.d.ts +2 -0
- package/dist/DateTimePicker/util.js +36 -0
- package/dist/Descriptions/Descriptions.d.ts +4 -0
- package/dist/Descriptions/Descriptions.js +96 -0
- package/dist/Descriptions/DescriptionsCell.d.ts +19 -0
- package/dist/Descriptions/DescriptionsCell.js +84 -0
- package/dist/Descriptions/DescriptionsContext.d.ts +7 -0
- package/dist/Descriptions/DescriptionsContext.js +33 -0
- package/dist/Descriptions/DescriptionsItem.d.ts +6 -0
- package/dist/Descriptions/DescriptionsItem.js +29 -0
- package/dist/Descriptions/DescriptionsRow.d.ts +10 -0
- package/dist/Descriptions/DescriptionsRow.js +45 -0
- package/dist/Descriptions/index.d.ts +3 -0
- package/dist/Descriptions/index.js +42 -0
- package/dist/Descriptions/typings.d.ts +19 -0
- package/dist/Descriptions/typings.js +17 -0
- package/dist/Dialog/Dialog.d.ts +16 -0
- package/dist/Dialog/Dialog.js +212 -0
- package/dist/Dialog/DialogBody.d.ts +4 -0
- package/dist/Dialog/DialogBody.js +63 -0
- package/dist/Dialog/DialogContext.d.ts +14 -0
- package/dist/Dialog/DialogContext.js +51 -0
- package/dist/Dialog/DialogFooter.d.ts +4 -0
- package/dist/Dialog/DialogFooter.js +46 -0
- package/dist/Dialog/DialogHeader.d.ts +4 -0
- package/dist/Dialog/DialogHeader.js +53 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.js +39 -0
- package/dist/Dialog/typings.d.ts +48 -0
- package/dist/Dialog/typings.js +17 -0
- package/dist/Dialog/useDraggable.d.ts +2 -0
- package/dist/Dialog/useDraggable.js +97 -0
- package/dist/Divider/Divider.d.ts +10 -0
- package/dist/Divider/Divider.js +52 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +39 -0
- package/dist/Drawer/Drawer.d.ts +18 -0
- package/dist/Drawer/Drawer.js +136 -0
- package/dist/Drawer/DrawerBody.d.ts +4 -0
- package/dist/Drawer/DrawerBody.js +63 -0
- package/dist/Drawer/DrawerContext.d.ts +9 -0
- package/dist/Drawer/DrawerContext.js +46 -0
- package/dist/Drawer/DrawerFooter.d.ts +4 -0
- package/dist/Drawer/DrawerFooter.js +44 -0
- package/dist/Drawer/DrawerHeader.d.ts +4 -0
- package/dist/Drawer/DrawerHeader.js +58 -0
- package/dist/Drawer/index.d.ts +2 -0
- package/dist/Drawer/index.js +39 -0
- package/dist/Drawer/typings.d.ts +26 -0
- package/dist/Drawer/typings.js +17 -0
- package/dist/Dropdown/Dropdown.d.ts +4 -0
- package/dist/Dropdown/Dropdown.js +105 -0
- package/dist/Dropdown/DropdownContext.d.ts +7 -0
- package/dist/Dropdown/DropdownContext.js +46 -0
- package/dist/Dropdown/DropdownItem.d.ts +4 -0
- package/dist/Dropdown/DropdownItem.js +62 -0
- package/dist/Dropdown/DropdownMenu.d.ts +4 -0
- package/dist/Dropdown/DropdownMenu.js +57 -0
- package/dist/Dropdown/index.d.ts +4 -0
- package/dist/Dropdown/index.js +45 -0
- package/dist/Dropdown/typings.d.ts +27 -0
- package/dist/Dropdown/typings.js +17 -0
- package/dist/Empty/Empty.d.ts +9 -0
- package/dist/Empty/Empty.js +61 -0
- package/dist/Empty/ImgEmpty.d.ts +3 -0
- package/dist/Empty/ImgEmpty.js +118 -0
- package/dist/Empty/index.d.ts +2 -0
- package/dist/Empty/index.js +39 -0
- package/dist/Form/FieldContext.d.ts +5 -0
- package/dist/Form/FieldContext.js +75 -0
- package/dist/Form/Form.d.ts +16 -0
- package/dist/Form/Form.js +189 -0
- package/dist/Form/FormContext.d.ts +27 -0
- package/dist/Form/FormContext.js +101 -0
- package/dist/Form/FormItem.d.ts +47 -0
- package/dist/Form/FormItem.js +461 -0
- package/dist/Form/FormItemContext.d.ts +7 -0
- package/dist/Form/FormItemContext.js +32 -0
- package/dist/Form/List.d.ts +21 -0
- package/dist/Form/List.js +142 -0
- package/dist/Form/ListContext.d.ts +7 -0
- package/dist/Form/ListContext.js +27 -0
- package/dist/Form/index.d.ts +5 -0
- package/dist/Form/index.js +45 -0
- package/dist/Form/typings.d.ts +302 -0
- package/dist/Form/typings.js +17 -0
- package/dist/Form/useForm.d.ts +73 -0
- package/dist/Form/useForm.js +751 -0
- package/dist/Form/useWatch.d.ts +12 -0
- package/dist/Form/useWatch.js +91 -0
- package/dist/Form/utils/NameMap.d.ts +15 -0
- package/dist/Form/utils/NameMap.js +75 -0
- package/dist/Form/utils/asyncUtil.d.ts +2 -0
- package/dist/Form/utils/asyncUtil.js +54 -0
- package/dist/Form/utils/classUtil.d.ts +4 -0
- package/dist/Form/utils/classUtil.js +51 -0
- package/dist/Form/utils/cloneDeep.d.ts +2 -0
- package/dist/Form/utils/cloneDeep.js +46 -0
- package/dist/Form/utils/get.d.ts +1 -0
- package/dist/Form/utils/get.js +34 -0
- package/dist/Form/utils/messages.d.ts +51 -0
- package/dist/Form/utils/messages.js +80 -0
- package/dist/Form/utils/set.d.ts +1 -0
- package/dist/Form/utils/set.js +61 -0
- package/dist/Form/utils/typeUtil.d.ts +1 -0
- package/dist/Form/utils/typeUtil.js +34 -0
- package/dist/Form/utils/util.d.ts +3 -0
- package/dist/Form/utils/util.js +68 -0
- package/dist/Form/utils/validateUtil.d.ts +2 -0
- package/dist/Form/utils/validateUtil.js +195 -0
- package/dist/Form/utils/valueUtil.d.ts +14 -0
- package/dist/Form/utils/valueUtil.js +160 -0
- package/dist/Icon/Icon.d.ts +4 -0
- package/dist/Icon/Icon.js +66 -0
- package/dist/Icon/IconList/Check.d.ts +3 -0
- package/dist/Icon/IconList/Check.js +66 -0
- package/dist/Icon/IconList/Close.d.ts +3 -0
- package/dist/Icon/IconList/Close.js +53 -0
- package/dist/Icon/IconList/Delete.d.ts +3 -0
- package/dist/Icon/IconList/Delete.js +66 -0
- package/dist/Icon/IconList/Down.d.ts +3 -0
- package/dist/Icon/IconList/Down.js +66 -0
- package/dist/Icon/IconList/Eye.d.ts +3 -0
- package/dist/Icon/IconList/Eye.js +66 -0
- package/dist/Icon/IconList/EyeClose.d.ts +3 -0
- package/dist/Icon/IconList/EyeClose.js +66 -0
- package/dist/Icon/IconList/Left.d.ts +3 -0
- package/dist/Icon/IconList/Left.js +66 -0
- package/dist/Icon/IconList/Link.d.ts +3 -0
- package/dist/Icon/IconList/Link.js +56 -0
- package/dist/Icon/IconList/More.d.ts +3 -0
- package/dist/Icon/IconList/More.js +66 -0
- package/dist/Icon/IconList/Question.d.ts +3 -0
- package/dist/Icon/IconList/Question.js +66 -0
- package/dist/Icon/IconList/Right.d.ts +3 -0
- package/dist/Icon/IconList/Right.js +66 -0
- package/dist/Icon/IconList/Search.d.ts +3 -0
- package/dist/Icon/IconList/Search.js +66 -0
- package/dist/Icon/IconList/Up.d.ts +3 -0
- package/dist/Icon/IconList/Up.js +66 -0
- package/dist/Icon/IconList/Upload.d.ts +3 -0
- package/dist/Icon/IconList/Upload.js +66 -0
- package/dist/Icon/IconList/index.d.ts +14 -0
- package/dist/Icon/IconList/index.js +68 -0
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.js +42 -0
- package/dist/Icon/typings.d.ts +17 -0
- package/dist/Icon/typings.js +17 -0
- package/dist/Input/Input.d.ts +16 -0
- package/dist/Input/Input.js +391 -0
- package/dist/Input/InputGroup.d.ts +4 -0
- package/dist/Input/InputGroup.js +44 -0
- package/dist/Input/InputRange.d.ts +4 -0
- package/dist/Input/InputRange.js +353 -0
- package/dist/Input/TextArea.d.ts +4 -0
- package/dist/Input/TextArea.js +118 -0
- package/dist/Input/index.d.ts +4 -0
- package/dist/Input/index.js +45 -0
- package/dist/Input/typings.d.ts +87 -0
- package/dist/Input/typings.js +17 -0
- package/dist/InputNumber/InputNumber.d.ts +4 -0
- package/dist/InputNumber/InputNumber.js +231 -0
- package/dist/InputNumber/index.d.ts +2 -0
- package/dist/InputNumber/index.js +39 -0
- package/dist/InputNumber/typings.d.ts +31 -0
- package/dist/InputNumber/typings.js +17 -0
- package/dist/Link/Link.d.ts +4 -0
- package/dist/Link/Link.js +64 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Link/index.js +39 -0
- package/dist/Link/typings.d.ts +11 -0
- package/dist/Link/typings.js +17 -0
- package/dist/Loading/Loading.d.ts +9 -0
- package/dist/Loading/Loading.js +70 -0
- package/dist/Loading/index.d.ts +2 -0
- package/dist/Loading/index.js +39 -0
- package/dist/Loading/typings.d.ts +15 -0
- package/dist/Loading/typings.js +17 -0
- package/dist/Message/Main.d.ts +8 -0
- package/dist/Message/Main.js +68 -0
- package/dist/Message/Message.d.ts +4 -0
- package/dist/Message/Message.js +155 -0
- package/dist/Message/index.d.ts +7 -0
- package/dist/Message/index.js +146 -0
- package/dist/Message/typings.d.ts +42 -0
- package/dist/Message/typings.js +17 -0
- package/dist/MessageBox/Main.d.ts +8 -0
- package/dist/MessageBox/Main.js +68 -0
- package/dist/MessageBox/MessageBox.d.ts +4 -0
- package/dist/MessageBox/MessageBox.js +217 -0
- package/dist/MessageBox/index.d.ts +9 -0
- package/dist/MessageBox/index.js +99 -0
- package/dist/MessageBox/typings.d.ts +63 -0
- package/dist/MessageBox/typings.js +17 -0
- package/dist/Notification/Main.d.ts +8 -0
- package/dist/Notification/Main.js +68 -0
- package/dist/Notification/Notification.d.ts +4 -0
- package/dist/Notification/Notification.js +150 -0
- package/dist/Notification/index.d.ts +5 -0
- package/dist/Notification/index.js +127 -0
- package/dist/Notification/typings.d.ts +42 -0
- package/dist/Notification/typings.js +17 -0
- package/dist/Pagination/Options.d.ts +16 -0
- package/dist/Pagination/Options.js +117 -0
- package/dist/Pagination/Pager.d.ts +4 -0
- package/dist/Pagination/Pager.js +63 -0
- package/dist/Pagination/Pagination.d.ts +4 -0
- package/dist/Pagination/Pagination.js +462 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Pagination/index.js +39 -0
- package/dist/Pagination/typings.d.ts +41 -0
- package/dist/Pagination/typings.js +17 -0
- package/dist/Pagination/util.d.ts +6 -0
- package/dist/Pagination/util.js +50 -0
- package/dist/Popconfirm/Popconfirm.d.ts +4 -0
- package/dist/Popconfirm/Popconfirm.js +114 -0
- package/dist/Popconfirm/index.d.ts +2 -0
- package/dist/Popconfirm/index.js +39 -0
- package/dist/Popconfirm/typings.d.ts +16 -0
- package/dist/Popconfirm/typings.js +17 -0
- package/dist/Popover/Popover.d.ts +4 -0
- package/dist/Popover/Popover.js +88 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.js +39 -0
- package/dist/Popover/typings.d.ts +19 -0
- package/dist/Popover/typings.js +17 -0
- package/dist/Popper/Popper.d.ts +4 -0
- package/dist/Popper/Popper.js +161 -0
- package/dist/Popper/index.d.ts +2 -0
- package/dist/Popper/index.js +39 -0
- package/dist/Popper/popperOptions.d.ts +23 -0
- package/dist/Popper/popperOptions.js +106 -0
- package/dist/Popper/typings.d.ts +47 -0
- package/dist/Popper/typings.js +17 -0
- package/dist/Progress/Progress.d.ts +4 -0
- package/dist/Progress/Progress.js +194 -0
- package/dist/Progress/index.d.ts +2 -0
- package/dist/Progress/index.js +39 -0
- package/dist/Progress/typings.d.ts +18 -0
- package/dist/Progress/typings.js +17 -0
- package/dist/Radio/Radio.d.ts +14 -0
- package/dist/Radio/Radio.js +122 -0
- package/dist/Radio/RadioButton.d.ts +4 -0
- package/dist/Radio/RadioButton.js +122 -0
- package/dist/Radio/index.d.ts +2 -0
- package/dist/Radio/index.js +39 -0
- package/dist/Radio/typings.d.ts +17 -0
- package/dist/Radio/typings.js +17 -0
- package/dist/RadioGroup/RadioGroup.d.ts +5 -0
- package/dist/RadioGroup/RadioGroup.js +81 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.js +39 -0
- package/dist/RadioGroup/typings.d.ts +17 -0
- package/dist/RadioGroup/typings.js +17 -0
- package/dist/Row/Row.d.ts +4 -0
- package/dist/Row/Row.js +60 -0
- package/dist/Row/RowContext.d.ts +5 -0
- package/dist/Row/RowContext.js +32 -0
- package/dist/Row/index.d.ts +3 -0
- package/dist/Row/index.js +42 -0
- package/dist/Row/typings.d.ts +7 -0
- package/dist/Row/typings.js +17 -0
- package/dist/Scrollbar/Scrollbar.d.ts +4 -0
- package/dist/Scrollbar/Scrollbar.js +162 -0
- package/dist/Scrollbar/Thumb.d.ts +4 -0
- package/dist/Scrollbar/Thumb.js +155 -0
- package/dist/Scrollbar/index.d.ts +2 -0
- package/dist/Scrollbar/index.js +39 -0
- package/dist/Scrollbar/typings.d.ts +40 -0
- package/dist/Scrollbar/typings.js +17 -0
- package/dist/Scrollbar/util.d.ts +27 -0
- package/dist/Scrollbar/util.js +61 -0
- package/dist/Select/Option.d.ts +4 -0
- package/dist/Select/Option.js +83 -0
- package/dist/Select/OptionGroup.d.ts +4 -0
- package/dist/Select/OptionGroup.js +49 -0
- package/dist/Select/Select.d.ts +16 -0
- package/dist/Select/Select.js +54 -0
- package/dist/Select/SelectContext.d.ts +11 -0
- package/dist/Select/SelectContext.js +47 -0
- package/dist/Select/SelectCore.d.ts +4 -0
- package/dist/Select/SelectCore.js +430 -0
- package/dist/Select/SelectDropdown.d.ts +4 -0
- package/dist/Select/SelectDropdown.js +194 -0
- package/dist/Select/index.d.ts +3 -0
- package/dist/Select/index.js +42 -0
- package/dist/Select/typings.d.ts +73 -0
- package/dist/Select/typings.js +17 -0
- package/dist/Skeleton/PlaceholderGraph.d.ts +11 -0
- package/dist/Skeleton/PlaceholderGraph.js +46 -0
- package/dist/Skeleton/PlaceholderGrid.d.ts +13 -0
- package/dist/Skeleton/PlaceholderGrid.js +77 -0
- package/dist/Skeleton/PlaceholderParagraph.d.ts +13 -0
- package/dist/Skeleton/PlaceholderParagraph.js +63 -0
- package/dist/Skeleton/Skeleton.d.ts +11 -0
- package/dist/Skeleton/Skeleton.js +42 -0
- package/dist/Skeleton/index.d.ts +4 -0
- package/dist/Skeleton/index.js +39 -0
- package/dist/Switch/Switch.d.ts +4 -0
- package/dist/Switch/Switch.js +167 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.js +39 -0
- package/dist/Switch/typings.d.ts +25 -0
- package/dist/Switch/typings.js +17 -0
- package/dist/Table/Colgroup.d.ts +8 -0
- package/dist/Table/Colgroup.js +56 -0
- package/dist/Table/Table.d.ts +12 -0
- package/dist/Table/Table.js +189 -0
- package/dist/Table/TableBody.d.ts +6 -0
- package/dist/Table/TableBody.js +241 -0
- package/dist/Table/TableCell.d.ts +18 -0
- package/dist/Table/TableCell.js +402 -0
- package/dist/Table/TableColumn.d.ts +7 -0
- package/dist/Table/TableColumn.js +51 -0
- package/dist/Table/TableContext.d.ts +37 -0
- package/dist/Table/TableContext.js +72 -0
- package/dist/Table/TableHeader.d.ts +6 -0
- package/dist/Table/TableHeader.js +107 -0
- package/dist/Table/TableHeaderCell.d.ts +12 -0
- package/dist/Table/TableHeaderCell.js +178 -0
- package/dist/Table/hooks/useResize.d.ts +7 -0
- package/dist/Table/hooks/useResize.js +131 -0
- package/dist/Table/hooks/useScroll.d.ts +7 -0
- package/dist/Table/hooks/useScroll.js +126 -0
- package/dist/Table/hooks/useSelection.d.ts +32 -0
- package/dist/Table/hooks/useSelection.js +132 -0
- package/dist/Table/hooks/useTable.d.ts +26 -0
- package/dist/Table/hooks/useTable.js +409 -0
- package/dist/Table/index.d.ts +3 -0
- package/dist/Table/index.js +42 -0
- package/dist/Table/treeUtil.d.ts +25 -0
- package/dist/Table/treeUtil.js +117 -0
- package/dist/Table/typings.d.ts +230 -0
- package/dist/Table/typings.js +17 -0
- package/dist/Table/util.d.ts +18 -0
- package/dist/Table/util.js +177 -0
- package/dist/Tabs/TabPane.d.ts +4 -0
- package/dist/Tabs/TabPane.js +72 -0
- package/dist/Tabs/Tabs.d.ts +4 -0
- package/dist/Tabs/Tabs.js +279 -0
- package/dist/Tabs/TabsContext.d.ts +5 -0
- package/dist/Tabs/TabsContext.js +32 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tabs/index.js +42 -0
- package/dist/Tabs/typings.d.ts +54 -0
- package/dist/Tabs/typings.js +17 -0
- package/dist/Tag/Tag.d.ts +4 -0
- package/dist/Tag/Tag.js +76 -0
- package/dist/Tag/index.d.ts +2 -0
- package/dist/Tag/index.js +39 -0
- package/dist/Tag/typings.d.ts +14 -0
- package/dist/Tag/typings.js +17 -0
- package/dist/TimeLine/TimeLine.d.ts +4 -0
- package/dist/TimeLine/TimeLine.js +43 -0
- package/dist/TimeLine/TimeLineItem.d.ts +4 -0
- package/dist/TimeLine/TimeLineItem.js +55 -0
- package/dist/TimeLine/index.d.ts +3 -0
- package/dist/TimeLine/index.js +42 -0
- package/dist/TimeLine/typings.d.ts +15 -0
- package/dist/TimeLine/typings.js +17 -0
- package/dist/TimePicker/TimePicker.d.ts +11 -0
- package/dist/TimePicker/TimePicker.js +227 -0
- package/dist/TimePicker/TimePickerPanel.d.ts +4 -0
- package/dist/TimePicker/TimePickerPanel.js +75 -0
- package/dist/TimePicker/TimePickerRange.d.ts +8 -0
- package/dist/TimePicker/TimePickerRange.js +362 -0
- package/dist/TimePicker/TimeRangePanel.d.ts +4 -0
- package/dist/TimePicker/TimeRangePanel.js +173 -0
- package/dist/TimePicker/TimeSpinnerPanel.d.ts +4 -0
- package/dist/TimePicker/TimeSpinnerPanel.js +277 -0
- package/dist/TimePicker/index.d.ts +3 -0
- package/dist/TimePicker/index.js +42 -0
- package/dist/TimePicker/typings.d.ts +81 -0
- package/dist/TimePicker/typings.js +17 -0
- package/dist/TimePicker/useTimePicker.d.ts +11 -0
- package/dist/TimePicker/useTimePicker.js +86 -0
- package/dist/TimePicker/util.d.ts +3 -0
- package/dist/TimePicker/util.js +45 -0
- package/dist/Tooltip/Tooltip.d.ts +4 -0
- package/dist/Tooltip/Tooltip.js +214 -0
- package/dist/Tooltip/TooltipContext.d.ts +8 -0
- package/dist/Tooltip/TooltipContext.js +46 -0
- package/dist/Tooltip/index.d.ts +4 -0
- package/dist/Tooltip/index.js +42 -0
- package/dist/Tooltip/typings.d.ts +31 -0
- package/dist/Tooltip/typings.js +17 -0
- package/dist/Transfer/List.d.ts +6 -0
- package/dist/Transfer/List.js +260 -0
- package/dist/Transfer/ListBody.d.ts +6 -0
- package/dist/Transfer/ListBody.js +130 -0
- package/dist/Transfer/ListItem.d.ts +15 -0
- package/dist/Transfer/ListItem.js +54 -0
- package/dist/Transfer/Transfer.d.ts +5 -0
- package/dist/Transfer/Transfer.js +303 -0
- package/dist/Transfer/index.d.ts +2 -0
- package/dist/Transfer/index.js +39 -0
- package/dist/Transfer/interface.d.ts +6 -0
- package/dist/Transfer/interface.js +17 -0
- package/dist/Transfer/operation.d.ts +15 -0
- package/dist/Transfer/operation.js +49 -0
- package/dist/Transfer/search.d.ts +10 -0
- package/dist/Transfer/search.js +63 -0
- package/dist/Transfer/typings/index.d.ts +70 -0
- package/dist/Transfer/typings/index.js +17 -0
- package/dist/Transfer/typings/list.d.ts +39 -0
- package/dist/Transfer/typings/list.js +17 -0
- package/dist/Transfer/typings/listBody.d.ts +17 -0
- package/dist/Transfer/typings/listBody.js +30 -0
- package/dist/Transition/Transition.d.ts +57 -0
- package/dist/Transition/Transition.js +266 -0
- package/dist/Transition/TransitionGroup.d.ts +38 -0
- package/dist/Transition/TransitionGroup.js +99 -0
- package/dist/Transition/TransitionGroupContext.d.ts +3 -0
- package/dist/Transition/TransitionGroupContext.js +26 -0
- package/dist/Transition/childMapping.d.ts +5 -0
- package/dist/Transition/childMapping.js +128 -0
- package/dist/Transition/index.d.ts +4 -0
- package/dist/Transition/index.js +42 -0
- package/dist/Transition/util.d.ts +2 -0
- package/dist/Transition/util.js +48 -0
- package/dist/Tree/DirectoryTree.d.ts +22 -0
- package/dist/Tree/DirectoryTree.js +204 -0
- package/dist/Tree/DropIndicator.d.ts +6 -0
- package/dist/Tree/DropIndicator.js +59 -0
- package/dist/Tree/Indent.d.ts +9 -0
- package/dist/Tree/Indent.js +56 -0
- package/dist/Tree/MotionTreeNode.d.ts +15 -0
- package/dist/Tree/MotionTreeNode.js +109 -0
- package/dist/Tree/NodeList.d.ts +43 -0
- package/dist/Tree/NodeList.js +285 -0
- package/dist/Tree/RCTree.d.ts +231 -0
- package/dist/Tree/RCTree.js +938 -0
- package/dist/Tree/Tree.d.ts +126 -0
- package/dist/Tree/Tree.js +105 -0
- package/dist/Tree/TreeNode.d.ts +83 -0
- package/dist/Tree/TreeNode.js +477 -0
- package/dist/Tree/contextTypes.d.ts +59 -0
- package/dist/Tree/contextTypes.js +30 -0
- package/dist/Tree/index.d.ts +9 -0
- package/dist/Tree/index.js +48 -0
- package/dist/Tree/typings.d.ts +78 -0
- package/dist/Tree/typings.js +29 -0
- package/dist/Tree/util.d.ts +38 -0
- package/dist/Tree/util.js +312 -0
- package/dist/Tree/utils/KeyCode.d.ts +110 -0
- package/dist/Tree/utils/KeyCode.js +550 -0
- package/dist/Tree/utils/conductUtil.d.ts +11 -0
- package/dist/Tree/utils/conductUtil.js +189 -0
- package/dist/Tree/utils/dictUtil.d.ts +8 -0
- package/dist/Tree/utils/dictUtil.js +86 -0
- package/dist/Tree/utils/diffUtil.d.ts +6 -0
- package/dist/Tree/utils/diffUtil.js +65 -0
- package/dist/Tree/utils/dropIndicator.d.ts +11 -0
- package/dist/Tree/utils/dropIndicator.js +64 -0
- package/dist/Tree/utils/iconUtil.d.ts +5 -0
- package/dist/Tree/utils/iconUtil.js +69 -0
- package/dist/Tree/utils/motion.d.ts +10 -0
- package/dist/Tree/utils/motion.js +91 -0
- package/dist/Tree/utils/pickAttrs.d.ts +6 -0
- package/dist/Tree/utils/pickAttrs.js +79 -0
- package/dist/Tree/utils/treeUtil.d.ts +64 -0
- package/dist/Tree/utils/treeUtil.js +283 -0
- package/dist/TreeSelect/TreeSelect.d.ts +12 -0
- package/dist/TreeSelect/TreeSelect.js +521 -0
- package/dist/TreeSelect/Utils.d.ts +2 -0
- package/dist/TreeSelect/Utils.js +41 -0
- package/dist/TreeSelect/index.d.ts +2 -0
- package/dist/TreeSelect/index.js +39 -0
- package/dist/TreeSelect/typings.d.ts +46 -0
- package/dist/TreeSelect/typings.js +17 -0
- package/dist/Upload/Upload.d.ts +4 -0
- package/dist/Upload/Upload.js +109 -0
- package/dist/Upload/UploadContent.d.ts +4 -0
- package/dist/Upload/UploadContent.js +211 -0
- package/dist/Upload/UploadContext.d.ts +6 -0
- package/dist/Upload/UploadContext.js +33 -0
- package/dist/Upload/UploadDrag.d.ts +8 -0
- package/dist/Upload/UploadDrag.js +100 -0
- package/dist/Upload/UploadList.d.ts +4 -0
- package/dist/Upload/UploadList.js +76 -0
- package/dist/Upload/ajax.d.ts +4 -0
- package/dist/Upload/ajax.js +115 -0
- package/dist/Upload/index.d.ts +2 -0
- package/dist/Upload/index.js +39 -0
- package/dist/Upload/typings.d.ts +110 -0
- package/dist/Upload/typings.js +37 -0
- package/dist/Upload/use-handlers.d.ts +16 -0
- package/dist/Upload/use-handlers.js +191 -0
- package/dist/Util/Math.d.ts +5 -0
- package/dist/Util/Math.js +155 -0
- package/dist/Util/PopupManager.d.ts +5 -0
- package/dist/Util/PopupManager.js +29 -0
- package/dist/Util/base.d.ts +19 -0
- package/dist/Util/base.js +221 -0
- package/dist/Util/genFileId.d.ts +1 -0
- package/dist/Util/genFileId.js +30 -0
- package/dist/Util/index.d.ts +6 -0
- package/dist/Util/index.js +51 -0
- package/dist/Util/resize-event.d.ts +9 -0
- package/dist/Util/resize-event.js +72 -0
- package/dist/Util/shallowEqual.d.ts +2 -0
- package/dist/Util/shallowEqual.js +51 -0
- package/dist/Util/treeUtils.d.ts +7 -0
- package/dist/Util/treeUtils.js +71 -0
- package/dist/VirtualList/Filler.d.ts +11 -0
- package/dist/VirtualList/Filler.js +78 -0
- package/dist/VirtualList/Item.d.ts +7 -0
- package/dist/VirtualList/Item.js +37 -0
- package/dist/VirtualList/ScrollBar.d.ts +43 -0
- package/dist/VirtualList/ScrollBar.js +216 -0
- package/dist/VirtualList/VirtualList.d.ts +33 -0
- package/dist/VirtualList/VirtualList.js +280 -0
- package/dist/VirtualList/hooks/useChildren.d.ts +3 -0
- package/dist/VirtualList/hooks/useChildren.js +46 -0
- package/dist/VirtualList/hooks/useDiffItem.d.ts +2 -0
- package/dist/VirtualList/hooks/useDiffItem.js +39 -0
- package/dist/VirtualList/hooks/useFrameWheel.d.ts +6 -0
- package/dist/VirtualList/hooks/useFrameWheel.js +72 -0
- package/dist/VirtualList/hooks/useHeights.d.ts +3 -0
- package/dist/VirtualList/hooks/useHeights.js +83 -0
- package/dist/VirtualList/hooks/useLayoutEffect.d.ts +3 -0
- package/dist/VirtualList/hooks/useLayoutEffect.js +30 -0
- package/dist/VirtualList/hooks/useMobileTouchMove.d.ts +2 -0
- package/dist/VirtualList/hooks/useMobileTouchMove.js +92 -0
- package/dist/VirtualList/hooks/useOriginScroll.d.ts +2 -0
- package/dist/VirtualList/hooks/useOriginScroll.js +56 -0
- package/dist/VirtualList/hooks/useScrollTo.d.ts +5 -0
- package/dist/VirtualList/hooks/useScrollTo.js +111 -0
- package/dist/VirtualList/index.d.ts +2 -0
- package/dist/VirtualList/index.js +39 -0
- package/dist/VirtualList/interface.d.ts +8 -0
- package/dist/VirtualList/interface.js +17 -0
- package/dist/VirtualList/mock.d.ts +6 -0
- package/dist/VirtualList/mock.js +29 -0
- package/dist/VirtualList/utils/CacheMap.d.ts +7 -0
- package/dist/VirtualList/utils/CacheMap.js +36 -0
- package/dist/VirtualList/utils/algorithmUtil.d.ts +6 -0
- package/dist/VirtualList/utils/algorithmUtil.js +81 -0
- package/dist/VirtualList/utils/findDOMNode.d.ts +2 -0
- package/dist/VirtualList/utils/findDOMNode.js +30 -0
- package/dist/VirtualList/utils/isFirefox.d.ts +2 -0
- package/dist/VirtualList/utils/isFirefox.js +26 -0
- package/dist/VirtualList/utils/raf.d.ts +5 -0
- package/dist/VirtualList/utils/raf.js +57 -0
- package/dist/config/Constants.d.ts +18 -0
- package/dist/config/Constants.js +52 -0
- package/dist/hooks/animationPropsUtils.d.ts +3 -0
- package/dist/hooks/animationPropsUtils.js +53 -0
- package/dist/hooks/htmlPropsUtils.d.ts +5 -0
- package/dist/hooks/htmlPropsUtils.js +125 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/index.js +74 -0
- package/dist/hooks/popperPropsUtils.d.ts +3 -0
- package/dist/hooks/popperPropsUtils.js +71 -0
- package/dist/hooks/prefix.d.ts +8 -0
- package/dist/hooks/prefix.js +62 -0
- package/dist/hooks/treePropsUtils.d.ts +3 -0
- package/dist/hooks/treePropsUtils.js +107 -0
- package/dist/hooks/useChildrenInstance.d.ts +4 -0
- package/dist/hooks/useChildrenInstance.js +66 -0
- package/dist/hooks/useClassNames.d.ts +29 -0
- package/dist/hooks/useClassNames.js +210 -0
- package/dist/hooks/useClickOutside.d.ts +9 -0
- package/dist/hooks/useClickOutside.js +112 -0
- package/dist/hooks/useCommonProps.d.ts +3 -0
- package/dist/hooks/useCommonProps.js +54 -0
- package/dist/hooks/useComponentWillMount.d.ts +2 -0
- package/dist/hooks/useComponentWillMount.js +33 -0
- package/dist/hooks/useControlled.d.ts +2 -0
- package/dist/hooks/useControlled.js +41 -0
- package/dist/hooks/useForceUpdate.d.ts +3 -0
- package/dist/hooks/useForceUpdate.js +39 -0
- package/dist/hooks/useUpdateEffect.d.ts +3 -0
- package/dist/hooks/useUpdateEffect.js +36 -0
- package/dist/index.css +58071 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.js +235 -0
- package/dist/theme-chalk/badge/index.scss +63 -0
- package/dist/theme-chalk/bak/common/popup.scss +47 -0
- package/dist/theme-chalk/bak/common/transition.scss +118 -0
- package/dist/theme-chalk/bak/common/var.scss +1476 -0
- package/dist/theme-chalk/bak/mixins/_button.scss +224 -0
- package/dist/theme-chalk/bak/mixins/_col.scss +38 -0
- package/dist/theme-chalk/bak/mixins/_var.scss +55 -0
- package/dist/theme-chalk/bak/mixins/config.scss +5 -0
- package/dist/theme-chalk/bak/mixins/function.scss +85 -0
- package/dist/theme-chalk/bak/mixins/mixins.scss +215 -0
- package/dist/theme-chalk/bak/mixins/utils.scss +39 -0
- package/dist/theme-chalk/breadcrumb/index.scss +65 -0
- package/dist/theme-chalk/button/_mixins.scss +317 -0
- package/dist/theme-chalk/button/button-group.scss +83 -0
- package/dist/theme-chalk/button/button.scss +382 -0
- package/dist/theme-chalk/button/index.scss +2 -0
- package/dist/theme-chalk/calendar/date-picker.scss +112 -0
- package/dist/theme-chalk/calendar/date-range-picker.scss +139 -0
- package/dist/theme-chalk/calendar/date-table.scss +156 -0
- package/dist/theme-chalk/calendar/index.scss +6 -0
- package/dist/theme-chalk/calendar/month-table.scss +92 -0
- package/dist/theme-chalk/calendar/picker-panel.scss +136 -0
- package/dist/theme-chalk/calendar/year-table.scss +107 -0
- package/dist/theme-chalk/card/index.scss +44 -0
- package/dist/theme-chalk/cascader/cascader-panel.scss +184 -0
- package/dist/theme-chalk/cascader/cascader.scss +239 -0
- package/dist/theme-chalk/cascader/index.scss +2 -0
- package/dist/theme-chalk/checkbox/index.scss +255 -0
- package/dist/theme-chalk/checkbox-button/index.scss +117 -0
- package/dist/theme-chalk/checkbox-group/index.scss +33 -0
- package/dist/theme-chalk/col/_mixins.scss +62 -0
- package/dist/theme-chalk/col/index.scss +50 -0
- package/dist/theme-chalk/collapse/index.scss +84 -0
- package/dist/theme-chalk/color-picker/index.scss +340 -0
- package/dist/theme-chalk/common/_var.scss +5 -0
- package/dist/theme-chalk/common/index.d.ts +1 -0
- package/dist/theme-chalk/common/index.js +2 -0
- package/dist/theme-chalk/common/index.scss +222 -0
- package/dist/theme-chalk/date-picker/index.scss +253 -0
- package/dist/theme-chalk/date-time-picker/index.scss +3 -0
- package/dist/theme-chalk/date-time-picker/time-picker.scss +83 -0
- package/dist/theme-chalk/date-time-picker/time-range-picker.scss +32 -0
- package/dist/theme-chalk/descriptions/descriptions-item.scss +66 -0
- package/dist/theme-chalk/descriptions/descriptions.scss +160 -0
- package/dist/theme-chalk/descriptions/index.scss +2 -0
- package/dist/theme-chalk/dialog/index.scss +190 -0
- package/dist/theme-chalk/divider/index.scss +51 -0
- package/dist/theme-chalk/drawer/index.scss +250 -0
- package/dist/theme-chalk/dropdown/index.scss +147 -0
- package/dist/theme-chalk/empty/index.scss +69 -0
- package/dist/theme-chalk/form/index.scss +359 -0
- package/dist/theme-chalk/icon/index.scss +53 -0
- package/dist/theme-chalk/icon/scss/_animated.scss +205 -0
- package/dist/theme-chalk/icon/scss/_bordered-pulled.scss +20 -0
- package/dist/theme-chalk/icon/scss/_core.scss +33 -0
- package/dist/theme-chalk/icon/scss/_duotone-icons.scss +12 -0
- package/dist/theme-chalk/icon/scss/_fixed-width.scss +7 -0
- package/dist/theme-chalk/icon/scss/_functions.scss +57 -0
- package/dist/theme-chalk/icon/scss/_icons.scss +11 -0
- package/dist/theme-chalk/icon/scss/_list.scss +20 -0
- package/dist/theme-chalk/icon/scss/_mixins.scss +102 -0
- package/dist/theme-chalk/icon/scss/_rotated-flipped.scss +31 -0
- package/dist/theme-chalk/icon/scss/_screen-reader.scss +14 -0
- package/dist/theme-chalk/icon/scss/_shims.scss +2606 -0
- package/dist/theme-chalk/icon/scss/_sizing.scss +16 -0
- package/dist/theme-chalk/icon/scss/_stacked.scss +32 -0
- package/dist/theme-chalk/icon/scss/_variables.scss +9191 -0
- package/dist/theme-chalk/icon/scss/brands.scss +32 -0
- package/dist/theme-chalk/icon/scss/duotone.scss +77 -0
- package/dist/theme-chalk/icon/scss/fontawesome.scss +21 -0
- package/dist/theme-chalk/icon/scss/index.scss +15 -0
- package/dist/theme-chalk/icon/scss/light.scss +26 -0
- package/dist/theme-chalk/icon/scss/regular.scss +26 -0
- package/dist/theme-chalk/icon/scss/solid.scss +26 -0
- package/dist/theme-chalk/icon/scss/thin.scss +26 -0
- package/dist/theme-chalk/icon/scss/v4-shims.scss +11 -0
- package/dist/theme-chalk/index.scss +64 -0
- package/dist/theme-chalk/input/_mixins.scss +16 -0
- package/dist/theme-chalk/input/index.scss +3 -0
- package/dist/theme-chalk/input/input-range.scss +208 -0
- package/dist/theme-chalk/input/input.scss +575 -0
- package/dist/theme-chalk/input-number/index.scss +172 -0
- package/dist/theme-chalk/link/index.scss +184 -0
- package/dist/theme-chalk/loading/index.scss +96 -0
- package/dist/theme-chalk/message/index.scss +169 -0
- package/dist/theme-chalk/message-box/index.scss +184 -0
- package/dist/theme-chalk/notification/index.scss +155 -0
- package/dist/theme-chalk/pagination/index.scss +515 -0
- package/dist/theme-chalk/placeholder/index.scss +135 -0
- package/dist/theme-chalk/popconfirm/index.scss +35 -0
- package/dist/theme-chalk/popover/index.scss +54 -0
- package/dist/theme-chalk/popper/index.scss +86 -0
- package/dist/theme-chalk/progress/index.scss +155 -0
- package/dist/theme-chalk/radio/index.scss +2 -0
- package/dist/theme-chalk/radio/radio-button.scss +128 -0
- package/dist/theme-chalk/radio/radio.scss +171 -0
- package/dist/theme-chalk/radio-group/index.scss +31 -0
- package/dist/theme-chalk/row/index.scss +30 -0
- package/dist/theme-chalk/scrollbar/index.scss +103 -0
- package/dist/theme-chalk/select/index.scss +244 -0
- package/dist/theme-chalk/select/option-group.scss +54 -0
- package/dist/theme-chalk/select/option.scss +63 -0
- package/dist/theme-chalk/select/select-dropdown.scss +57 -0
- package/dist/theme-chalk/switch/index.scss +273 -0
- package/dist/theme-chalk/table/index.scss +714 -0
- package/dist/theme-chalk/tabs/index.scss +620 -0
- package/dist/theme-chalk/tag/index.scss +360 -0
- package/dist/theme-chalk/time-line/_timeline-item.scss +90 -0
- package/dist/theme-chalk/time-line/_timeline.scss +50 -0
- package/dist/theme-chalk/time-line/index.scss +2 -0
- package/dist/theme-chalk/time-picker/index.scss +109 -0
- package/dist/theme-chalk/tooltip/index.scss +13 -0
- package/dist/theme-chalk/transfer/index.scss +247 -0
- package/dist/theme-chalk/transition/index.scss +756 -0
- package/dist/theme-chalk/tree/_directory.scss +73 -0
- package/dist/theme-chalk/tree/_tree.scss +401 -0
- package/dist/theme-chalk/tree/index.scss +2 -0
- package/dist/theme-chalk/tree-select/index.scss +25 -0
- package/dist/theme-chalk/upload/index.scss +631 -0
- package/dist/types/common.d.ts +51 -0
- package/dist/types/common.js +17 -0
- package/dist/types/type.d.ts +4 -0
- package/dist/types/type.js +32 -0
- package/package.json +58 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Form/FormContext.tsx
|
|
30
|
+
var FormContext_exports = {};
|
|
31
|
+
__export(FormContext_exports, {
|
|
32
|
+
FormProvider: () => FormProvider,
|
|
33
|
+
default: () => FormContext_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(FormContext_exports);
|
|
36
|
+
var import_noop = __toESM(require("lodash/noop"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var FormContext = (0, import_react.createContext)({
|
|
39
|
+
triggerFormChange: import_noop.default,
|
|
40
|
+
triggerFormFinish: import_noop.default,
|
|
41
|
+
registerForm: import_noop.default,
|
|
42
|
+
unregisterForm: import_noop.default
|
|
43
|
+
});
|
|
44
|
+
var FormProvider = ({ validateMessages, onFormChange, onFormFinish, children }) => {
|
|
45
|
+
const formContext = (0, import_react.useContext)(FormContext);
|
|
46
|
+
const formsRef = (0, import_react.useRef)({});
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
FormContext.Provider,
|
|
49
|
+
{
|
|
50
|
+
value: {
|
|
51
|
+
...formContext,
|
|
52
|
+
validateMessages: {
|
|
53
|
+
...formContext.validateMessages,
|
|
54
|
+
...validateMessages
|
|
55
|
+
},
|
|
56
|
+
// =========================================================
|
|
57
|
+
// = Global Form Control =
|
|
58
|
+
// =========================================================
|
|
59
|
+
triggerFormChange: (name, changedFields) => {
|
|
60
|
+
if (onFormChange) {
|
|
61
|
+
onFormChange(name, {
|
|
62
|
+
changedFields,
|
|
63
|
+
forms: formsRef.current
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
formContext.triggerFormChange(name, changedFields);
|
|
67
|
+
},
|
|
68
|
+
triggerFormFinish: (name, values) => {
|
|
69
|
+
if (onFormFinish) {
|
|
70
|
+
onFormFinish(name, {
|
|
71
|
+
values,
|
|
72
|
+
forms: formsRef.current
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
formContext.triggerFormFinish(name, values);
|
|
76
|
+
},
|
|
77
|
+
registerForm: (name, form) => {
|
|
78
|
+
if (name) {
|
|
79
|
+
formsRef.current = {
|
|
80
|
+
...formsRef.current,
|
|
81
|
+
[name]: form
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
formContext.registerForm(name, form);
|
|
85
|
+
},
|
|
86
|
+
unregisterForm: (name) => {
|
|
87
|
+
const newForms = { ...formsRef.current };
|
|
88
|
+
delete newForms[name];
|
|
89
|
+
formsRef.current = newForms;
|
|
90
|
+
formContext.unregisterForm(name);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
children
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
var FormContext_default = FormContext;
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
FormProvider
|
|
101
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentChildren } from '../types/common';
|
|
3
|
+
import type { EventArgs, FormInstance, FormItemProps, InternalFormInstance, InternalNamePath, Meta, NamePath, Rule, Store, StoreValue } from './typings';
|
|
4
|
+
export type ShouldUpdate<Values = any> = boolean | ((prevValues: Values, nextValues: Values, info: {
|
|
5
|
+
source?: string;
|
|
6
|
+
}) => boolean);
|
|
7
|
+
interface ChildProps {
|
|
8
|
+
[name: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface InternalFieldProps<Values = any> extends Omit<FormItemProps<Values>, 'children'> {
|
|
11
|
+
children?: ComponentChildren | ((control: ChildProps, meta: Meta, form: FormInstance<Values>) => React.ReactElement);
|
|
12
|
+
dependencies?: NamePath[];
|
|
13
|
+
getValueFromEvent?: (...args: EventArgs) => StoreValue;
|
|
14
|
+
name?: InternalNamePath;
|
|
15
|
+
normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
|
|
16
|
+
rules?: Rule[];
|
|
17
|
+
shouldUpdate?: ShouldUpdate<Values>;
|
|
18
|
+
trigger?: string;
|
|
19
|
+
validateTrigger?: string | string[] | false;
|
|
20
|
+
validateFirst?: boolean | 'parallel';
|
|
21
|
+
valuePropName?: string;
|
|
22
|
+
getValueProps?: (value: StoreValue) => Record<string, unknown>;
|
|
23
|
+
messageVariables?: Record<string, string>;
|
|
24
|
+
initialValue?: any;
|
|
25
|
+
onReset?: () => void;
|
|
26
|
+
onMetaChange?: (meta: Meta & {
|
|
27
|
+
destroy?: boolean;
|
|
28
|
+
}) => void;
|
|
29
|
+
preserve?: boolean;
|
|
30
|
+
isListField?: boolean;
|
|
31
|
+
isList?: boolean;
|
|
32
|
+
fieldContext?: InternalFormInstance;
|
|
33
|
+
}
|
|
34
|
+
export interface FieldProps<Values = any> extends Omit<InternalFieldProps<Values>, 'name' | 'fieldContext'> {
|
|
35
|
+
name?: NamePath;
|
|
36
|
+
}
|
|
37
|
+
export interface FieldState {
|
|
38
|
+
resetCount: number;
|
|
39
|
+
}
|
|
40
|
+
declare function InternalFormItem<Values = any>({ name, rules, ...restProps }: FieldProps<Values>): React.JSX.Element;
|
|
41
|
+
type InternalFormItemType = typeof InternalFormItem;
|
|
42
|
+
interface FormItemInterface extends InternalFormItemType {
|
|
43
|
+
displayName?: string;
|
|
44
|
+
defaultProps?: Partial<FieldProps<any>>;
|
|
45
|
+
}
|
|
46
|
+
declare const FormItem: FormItemInterface;
|
|
47
|
+
export default FormItem;
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Form/FormItem.tsx
|
|
30
|
+
var FormItem_exports = {};
|
|
31
|
+
__export(FormItem_exports, {
|
|
32
|
+
default: () => FormItem_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(FormItem_exports);
|
|
35
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_head = __toESM(require("lodash/head"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_Icon = require("../Icon");
|
|
39
|
+
var import_Tooltip = __toESM(require("../Tooltip/Tooltip"));
|
|
40
|
+
var import_Transition = require("../Transition");
|
|
41
|
+
var import_Util = require("../Util");
|
|
42
|
+
var import_FieldContext = __toESM(require("./FieldContext"));
|
|
43
|
+
var import_FormItemContext = require("./FormItemContext");
|
|
44
|
+
var import_classUtil = require("./utils/classUtil");
|
|
45
|
+
var import_typeUtil = require("./utils/typeUtil");
|
|
46
|
+
var import_validateUtil = require("./utils/validateUtil");
|
|
47
|
+
var import_valueUtil = require("./utils/valueUtil");
|
|
48
|
+
var EMPTY_ERRORS = [];
|
|
49
|
+
function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {
|
|
50
|
+
if (typeof shouldUpdate === "function") {
|
|
51
|
+
return shouldUpdate(prev, next, "source" in info ? { source: info.source } : {});
|
|
52
|
+
}
|
|
53
|
+
return prevValue !== nextValue;
|
|
54
|
+
}
|
|
55
|
+
var Field = class extends import_react.default.Component {
|
|
56
|
+
// ============================== Subscriptions ==============================
|
|
57
|
+
constructor(props) {
|
|
58
|
+
super(props);
|
|
59
|
+
this.state = {
|
|
60
|
+
resetCount: 0
|
|
61
|
+
};
|
|
62
|
+
this.cancelRegisterFunc = null;
|
|
63
|
+
this.mounted = false;
|
|
64
|
+
/**
|
|
65
|
+
* Follow state should not management in State since it will async update by
|
|
66
|
+
* This makes first render of form can not get correct state value.
|
|
67
|
+
*/
|
|
68
|
+
this.touched = false;
|
|
69
|
+
/**
|
|
70
|
+
* Mark when touched & validated. Currently only used for `dependencies`.
|
|
71
|
+
* Note that we do not think field with `initialValue` is dirty
|
|
72
|
+
* but this will be by `isFieldDirty` func.
|
|
73
|
+
*/
|
|
74
|
+
this.dirty = false;
|
|
75
|
+
this.validatePromise = null;
|
|
76
|
+
this.errors = EMPTY_ERRORS;
|
|
77
|
+
this.warnings = EMPTY_ERRORS;
|
|
78
|
+
this.cancelRegister = () => {
|
|
79
|
+
const { preserve, isListField, name } = this.props;
|
|
80
|
+
if (this.cancelRegisterFunc) {
|
|
81
|
+
this.cancelRegisterFunc(isListField, preserve, (0, import_valueUtil.getNamePath)(name));
|
|
82
|
+
}
|
|
83
|
+
this.cancelRegisterFunc = null;
|
|
84
|
+
};
|
|
85
|
+
// ================================== Utils ==================================
|
|
86
|
+
this.getNamePath = () => {
|
|
87
|
+
const { name, fieldContext } = this.props;
|
|
88
|
+
const { prefixName = [] } = fieldContext;
|
|
89
|
+
return name !== void 0 ? [...prefixName, ...name] : [];
|
|
90
|
+
};
|
|
91
|
+
this.getRules = () => {
|
|
92
|
+
const { rules = [], fieldContext } = this.props;
|
|
93
|
+
return rules.map((rule) => {
|
|
94
|
+
if (typeof rule === "function") {
|
|
95
|
+
return rule(fieldContext);
|
|
96
|
+
}
|
|
97
|
+
return rule;
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
this.refresh = () => {
|
|
101
|
+
if (!this.mounted) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.setState(({ resetCount }) => ({
|
|
105
|
+
resetCount: resetCount + 1
|
|
106
|
+
}));
|
|
107
|
+
};
|
|
108
|
+
this.triggerMetaEvent = (destroy) => {
|
|
109
|
+
const { onMetaChange } = this.props;
|
|
110
|
+
onMetaChange == null ? void 0 : onMetaChange({ ...this.getMeta(), destroy });
|
|
111
|
+
};
|
|
112
|
+
// ========================= Field Entity Interfaces =========================
|
|
113
|
+
// Trigger by store update. Check if need update the component
|
|
114
|
+
this.onStoreChange = (prevStore, namePathList, info) => {
|
|
115
|
+
const { shouldUpdate, dependencies = [], onReset } = this.props;
|
|
116
|
+
const { store } = info;
|
|
117
|
+
const namePath = this.getNamePath();
|
|
118
|
+
const prevValue = this.getValue(prevStore);
|
|
119
|
+
const curValue = this.getValue(store);
|
|
120
|
+
const namePathMatch = namePathList && (0, import_valueUtil.containsNamePath)(namePathList, namePath);
|
|
121
|
+
if (info.type === "valueUpdate" && info.source === "external" && prevValue !== curValue) {
|
|
122
|
+
this.touched = true;
|
|
123
|
+
this.dirty = true;
|
|
124
|
+
this.validatePromise = null;
|
|
125
|
+
this.errors = EMPTY_ERRORS;
|
|
126
|
+
this.warnings = EMPTY_ERRORS;
|
|
127
|
+
this.triggerMetaEvent();
|
|
128
|
+
}
|
|
129
|
+
switch (info.type) {
|
|
130
|
+
case "reset":
|
|
131
|
+
if (!namePathList || namePathMatch) {
|
|
132
|
+
this.touched = false;
|
|
133
|
+
this.dirty = false;
|
|
134
|
+
this.validatePromise = null;
|
|
135
|
+
this.errors = EMPTY_ERRORS;
|
|
136
|
+
this.warnings = EMPTY_ERRORS;
|
|
137
|
+
this.triggerMetaEvent();
|
|
138
|
+
onReset == null ? void 0 : onReset();
|
|
139
|
+
this.refresh();
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
case "remove": {
|
|
144
|
+
if (shouldUpdate) {
|
|
145
|
+
this.reRender();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case "setField": {
|
|
151
|
+
if (namePathMatch) {
|
|
152
|
+
const { data } = info;
|
|
153
|
+
if ("touched" in data) {
|
|
154
|
+
this.touched = data.touched;
|
|
155
|
+
}
|
|
156
|
+
if ("validating" in data && !("originRCField" in data)) {
|
|
157
|
+
this.validatePromise = data.validating ? Promise.resolve([]) : null;
|
|
158
|
+
}
|
|
159
|
+
if ("errors" in data) {
|
|
160
|
+
this.errors = data.errors || EMPTY_ERRORS;
|
|
161
|
+
}
|
|
162
|
+
if ("warnings" in data) {
|
|
163
|
+
this.warnings = data.warnings || EMPTY_ERRORS;
|
|
164
|
+
}
|
|
165
|
+
this.dirty = true;
|
|
166
|
+
this.triggerMetaEvent();
|
|
167
|
+
this.reRender();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
|
|
171
|
+
this.reRender();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case "dependenciesUpdate": {
|
|
177
|
+
const dependencyList = dependencies.map(import_valueUtil.getNamePath);
|
|
178
|
+
if (dependencyList.some((dependency) => (0, import_valueUtil.containsNamePath)(info.relatedFields, dependency))) {
|
|
179
|
+
this.reRender();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
default:
|
|
185
|
+
if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
|
|
186
|
+
this.reRender();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
if (shouldUpdate === true) {
|
|
192
|
+
this.reRender();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
this.validateRules = (options) => {
|
|
196
|
+
const namePath = this.getNamePath();
|
|
197
|
+
const currentValue = this.getValue();
|
|
198
|
+
const rootPromise = Promise.resolve().then(() => {
|
|
199
|
+
if (!this.mounted) {
|
|
200
|
+
return [];
|
|
201
|
+
}
|
|
202
|
+
const { validateFirst = false, messageVariables } = this.props;
|
|
203
|
+
const { triggerName } = options || {};
|
|
204
|
+
let filteredRules = this.getRules();
|
|
205
|
+
if (triggerName) {
|
|
206
|
+
filteredRules = filteredRules.filter((rule) => rule).filter((rule) => {
|
|
207
|
+
const { validateTrigger } = rule;
|
|
208
|
+
if (!validateTrigger) {
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
const triggerList = (0, import_typeUtil.toArray)(validateTrigger);
|
|
212
|
+
return triggerList.includes(triggerName);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
const promise = (0, import_validateUtil.validateRules)(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);
|
|
216
|
+
promise.catch((e2) => e2).then((ruleErrors = EMPTY_ERRORS) => {
|
|
217
|
+
var _a;
|
|
218
|
+
if (this.validatePromise === rootPromise) {
|
|
219
|
+
this.validatePromise = null;
|
|
220
|
+
const nextErrors = [];
|
|
221
|
+
const nextWarnings = [];
|
|
222
|
+
(_a = ruleErrors.forEach) == null ? void 0 : _a.call(ruleErrors, ({ rule: { warningOnly }, errors = EMPTY_ERRORS }) => {
|
|
223
|
+
if (warningOnly) {
|
|
224
|
+
nextWarnings.push(...errors);
|
|
225
|
+
} else {
|
|
226
|
+
nextErrors.push(...errors);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
this.errors = nextErrors;
|
|
230
|
+
this.warnings = nextWarnings;
|
|
231
|
+
this.triggerMetaEvent();
|
|
232
|
+
this.reRender();
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return promise;
|
|
236
|
+
});
|
|
237
|
+
this.validatePromise = rootPromise;
|
|
238
|
+
this.dirty = true;
|
|
239
|
+
this.errors = EMPTY_ERRORS;
|
|
240
|
+
this.warnings = EMPTY_ERRORS;
|
|
241
|
+
this.triggerMetaEvent();
|
|
242
|
+
this.reRender();
|
|
243
|
+
return rootPromise;
|
|
244
|
+
};
|
|
245
|
+
this.isFieldValidating = () => !!this.validatePromise;
|
|
246
|
+
this.isFieldTouched = () => this.touched;
|
|
247
|
+
this.isFieldDirty = () => {
|
|
248
|
+
if (this.dirty || this.props.initialValue !== void 0) {
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
const { fieldContext } = this.props;
|
|
252
|
+
const { getInitialValue } = fieldContext.getInternalHooks(import_FieldContext.HOOK_MARK);
|
|
253
|
+
if (getInitialValue(this.getNamePath()) !== void 0) {
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
return false;
|
|
257
|
+
};
|
|
258
|
+
this.getErrors = () => this.errors;
|
|
259
|
+
this.getWarnings = () => this.warnings;
|
|
260
|
+
this.isListField = () => this.props.isListField;
|
|
261
|
+
this.isList = () => this.props.isList;
|
|
262
|
+
this.isPreserve = () => this.props.preserve;
|
|
263
|
+
// ============================= Child Component =============================
|
|
264
|
+
this.getMeta = () => {
|
|
265
|
+
this.prevValidating = this.isFieldValidating();
|
|
266
|
+
const meta = {
|
|
267
|
+
touched: this.isFieldTouched(),
|
|
268
|
+
validating: this.prevValidating,
|
|
269
|
+
errors: this.errors,
|
|
270
|
+
warnings: this.warnings,
|
|
271
|
+
name: this.getNamePath()
|
|
272
|
+
};
|
|
273
|
+
return meta;
|
|
274
|
+
};
|
|
275
|
+
// Only return validate child node. If invalidate, will do nothing about field.
|
|
276
|
+
this.getOnlyChild = (children) => {
|
|
277
|
+
if (typeof children === "function") {
|
|
278
|
+
const meta = this.getMeta();
|
|
279
|
+
return {
|
|
280
|
+
...this.getOnlyChild(children(this.getControlled(), meta, this.props.fieldContext)),
|
|
281
|
+
isFunction: true
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
const childList = import_react.Children.toArray(children);
|
|
285
|
+
if (childList.length !== 1 || !(0, import_react.isValidElement)(childList[0])) {
|
|
286
|
+
return { child: childList, isFunction: false };
|
|
287
|
+
}
|
|
288
|
+
return { child: childList[0], isFunction: false };
|
|
289
|
+
};
|
|
290
|
+
// ============================== Field Control ==============================
|
|
291
|
+
this.getValue = (store) => {
|
|
292
|
+
const { getFieldsValue } = this.props.fieldContext;
|
|
293
|
+
const namePath = this.getNamePath();
|
|
294
|
+
return (0, import_valueUtil.getValue)(store || getFieldsValue(true), namePath);
|
|
295
|
+
};
|
|
296
|
+
this.getControlled = (childProps = {}) => {
|
|
297
|
+
const { trigger, validateTrigger, getValueFromEvent, normalize, valuePropName, getValueProps, fieldContext } = this.props;
|
|
298
|
+
const mergedValidateTrigger = validateTrigger !== void 0 ? validateTrigger : fieldContext.validateTrigger;
|
|
299
|
+
const namePath = this.getNamePath();
|
|
300
|
+
const { getInternalHooks, getFieldsValue } = fieldContext;
|
|
301
|
+
const { dispatch } = getInternalHooks(import_FieldContext.HOOK_MARK);
|
|
302
|
+
const value = this.getValue();
|
|
303
|
+
const mergedGetValueProps = getValueProps || ((val) => ({ [valuePropName]: val }));
|
|
304
|
+
const originTriggerFunc = childProps[trigger];
|
|
305
|
+
const control = {
|
|
306
|
+
...childProps,
|
|
307
|
+
...mergedGetValueProps(value),
|
|
308
|
+
error: this.errors.length > 0,
|
|
309
|
+
warning: this.warnings.length > 0,
|
|
310
|
+
onClear: this.onClear
|
|
311
|
+
};
|
|
312
|
+
control[trigger] = (...args) => {
|
|
313
|
+
this.touched = true;
|
|
314
|
+
this.dirty = true;
|
|
315
|
+
this.triggerMetaEvent();
|
|
316
|
+
let newValue;
|
|
317
|
+
if (getValueFromEvent) {
|
|
318
|
+
newValue = getValueFromEvent(...args);
|
|
319
|
+
} else {
|
|
320
|
+
newValue = (0, import_valueUtil.defaultGetValueFromEvent)(valuePropName, ...args);
|
|
321
|
+
}
|
|
322
|
+
if (normalize) {
|
|
323
|
+
newValue = normalize(newValue, value, getFieldsValue(true));
|
|
324
|
+
}
|
|
325
|
+
dispatch({
|
|
326
|
+
type: "updateValue",
|
|
327
|
+
namePath,
|
|
328
|
+
value: newValue
|
|
329
|
+
});
|
|
330
|
+
if (originTriggerFunc) {
|
|
331
|
+
originTriggerFunc(...args);
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
const validateTriggerList = (0, import_typeUtil.toArray)(mergedValidateTrigger || []);
|
|
335
|
+
validateTriggerList.forEach((triggerName) => {
|
|
336
|
+
const originTrigger = control[triggerName];
|
|
337
|
+
control[triggerName] = (...args) => {
|
|
338
|
+
if (originTrigger) {
|
|
339
|
+
originTrigger(...args);
|
|
340
|
+
}
|
|
341
|
+
const { rules } = this.props;
|
|
342
|
+
if (rules && rules.length) {
|
|
343
|
+
dispatch({
|
|
344
|
+
type: "validateField",
|
|
345
|
+
namePath,
|
|
346
|
+
triggerName
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
});
|
|
351
|
+
return control;
|
|
352
|
+
};
|
|
353
|
+
this.onClear = () => {
|
|
354
|
+
var _a, _b, _c, _d;
|
|
355
|
+
this.touched = true;
|
|
356
|
+
const { getInternalHooks } = this.props.fieldContext;
|
|
357
|
+
const { dispatch } = getInternalHooks(import_FieldContext.HOOK_MARK);
|
|
358
|
+
dispatch({
|
|
359
|
+
type: "updateValue",
|
|
360
|
+
namePath: this.getNamePath(),
|
|
361
|
+
value: ""
|
|
362
|
+
});
|
|
363
|
+
(_d = (_c = (_b = (_a = this.props) == null ? void 0 : _a.children) == null ? void 0 : _b.props) == null ? void 0 : _c.onClear) == null ? void 0 : _d.call(_c);
|
|
364
|
+
};
|
|
365
|
+
this.getLabelWidth = () => {
|
|
366
|
+
const { pure, fieldContext, labelWidth } = this.props;
|
|
367
|
+
const { labelWidth: labelWidthContext, labelPosition } = fieldContext;
|
|
368
|
+
if (labelPosition === "top") {
|
|
369
|
+
return 0;
|
|
370
|
+
} else if ((0, import_Util.isNotEmpty)(labelWidth)) {
|
|
371
|
+
return labelWidth;
|
|
372
|
+
} else if (pure === true) {
|
|
373
|
+
return 0;
|
|
374
|
+
} else {
|
|
375
|
+
return labelWidthContext;
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
this.getValidateLable = () => {
|
|
379
|
+
const { errorStyle, warningStyle } = this.props;
|
|
380
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Transition.Transition, { name: (0, import_classUtil.b)("slide-up"), visible: this.errors.length > 0, transitionAppear: true, unmountOnExit: true, display: "" }, /* @__PURE__ */ import_react.default.createElement("label", { className: import_classUtil.e`error`, style: errorStyle }, (0, import_head.default)(this.errors))), /* @__PURE__ */ import_react.default.createElement(import_Transition.Transition, { name: (0, import_classUtil.b)("slide-up"), visible: this.warnings.length > 0, transitionAppear: true, unmountOnExit: true, display: "" }, /* @__PURE__ */ import_react.default.createElement("label", { className: import_classUtil.e`warning`, style: warningStyle }, (0, import_head.default)(this.warnings))));
|
|
381
|
+
};
|
|
382
|
+
if (props.fieldContext) {
|
|
383
|
+
const { getInternalHooks } = props.fieldContext;
|
|
384
|
+
const { initEntityValue } = getInternalHooks(import_FieldContext.HOOK_MARK);
|
|
385
|
+
initEntityValue(this);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
componentDidMount() {
|
|
389
|
+
const { shouldUpdate, fieldContext } = this.props;
|
|
390
|
+
this.mounted = true;
|
|
391
|
+
if (fieldContext) {
|
|
392
|
+
const { getInternalHooks } = fieldContext;
|
|
393
|
+
const { registerField } = getInternalHooks(import_FieldContext.HOOK_MARK);
|
|
394
|
+
this.cancelRegisterFunc = registerField(this);
|
|
395
|
+
}
|
|
396
|
+
if (shouldUpdate === true) {
|
|
397
|
+
this.reRender();
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
componentWillUnmount() {
|
|
401
|
+
this.cancelRegister();
|
|
402
|
+
this.triggerMetaEvent(true);
|
|
403
|
+
this.mounted = false;
|
|
404
|
+
}
|
|
405
|
+
reRender() {
|
|
406
|
+
if (!this.mounted) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
this.forceUpdate();
|
|
410
|
+
}
|
|
411
|
+
render() {
|
|
412
|
+
const { resetCount } = this.state;
|
|
413
|
+
const { children, label, center, className, style, noStyle, fieldContext, labelStyle = {}, colon = false, size, help, pure } = this.props;
|
|
414
|
+
const { size: sizeContext, labelPosition, colon: colonContext } = fieldContext;
|
|
415
|
+
const labelWidth = this.getLabelWidth();
|
|
416
|
+
const { child, isFunction } = this.getOnlyChild(children);
|
|
417
|
+
const isRequired = this.props.required || this.getRules().some((item) => item.required);
|
|
418
|
+
let returnChildNode;
|
|
419
|
+
if (isFunction) {
|
|
420
|
+
returnChildNode = child;
|
|
421
|
+
} else if ((0, import_react.isValidElement)(child)) {
|
|
422
|
+
returnChildNode = (0, import_react.cloneElement)(child, this.getControlled(child.props));
|
|
423
|
+
} else {
|
|
424
|
+
returnChildNode = child;
|
|
425
|
+
}
|
|
426
|
+
return noStyle ? /* @__PURE__ */ import_react.default.createElement(import_FormItemContext.FormItemContext.Provider, { key: resetCount, value: { size } }, returnChildNode, this.getValidateLable()) : /* @__PURE__ */ import_react.default.createElement(import_FormItemContext.FormItemContext.Provider, { key: resetCount, value: { size } }, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)((0, import_classUtil.b)("form-item"), { "is-required": isRequired, [(0, import_classUtil.m)(sizeContext ?? size)]: sizeContext ?? size }, className), style }, label && !pure && /* @__PURE__ */ import_react.default.createElement("label", { className: import_classUtil.e`label`, style: ["left", "right"].includes(labelPosition) ? { width: labelWidth, ...labelStyle } : labelStyle }, typeof label === "string" || typeof label === "number" ? `${label}${colonContext ?? colon ? ":" : ""}` : label, help && /* @__PURE__ */ import_react.default.createElement(import_Tooltip.default, { className: import_classUtil.e`label--help`, content: help, placement: "top", enterable: true }, /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { name: "circle-exclamation", prefix: "fas" }))), /* @__PURE__ */ import_react.default.createElement(
|
|
427
|
+
"div",
|
|
428
|
+
{
|
|
429
|
+
className: (0, import_classnames.default)(import_classUtil.e`content`, { "is-center": center }),
|
|
430
|
+
style: !label ? { marginLeft: labelWidth } : {}
|
|
431
|
+
},
|
|
432
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, import_react.Children.map(
|
|
433
|
+
returnChildNode,
|
|
434
|
+
(item) => {
|
|
435
|
+
return item;
|
|
436
|
+
}
|
|
437
|
+
), this.getValidateLable())
|
|
438
|
+
)));
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
Field.contextType = import_FieldContext.default;
|
|
442
|
+
Field.defaultProps = {
|
|
443
|
+
trigger: "onChange",
|
|
444
|
+
valuePropName: "value"
|
|
445
|
+
};
|
|
446
|
+
function InternalFormItem({ name, rules = [], ...restProps }) {
|
|
447
|
+
var _a;
|
|
448
|
+
const fieldContext = (0, import_react.useContext)(import_FieldContext.default);
|
|
449
|
+
const namePath = name !== void 0 ? (0, import_valueUtil.getNamePath)(name) : void 0;
|
|
450
|
+
let key = "keep";
|
|
451
|
+
if (!restProps.isListField) {
|
|
452
|
+
key = `_${(namePath || []).join("_")}`;
|
|
453
|
+
}
|
|
454
|
+
if (process.env.NODE_ENV !== "production" && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {
|
|
455
|
+
(0, import_Util.warning)(false, "`preserve` should not apply on Form.List fields.");
|
|
456
|
+
}
|
|
457
|
+
return /* @__PURE__ */ import_react.default.createElement(Field, { key, name: namePath, rules: [...((_a = fieldContext.rules) == null ? void 0 : _a[name]) ?? [], ...rules], ...restProps, fieldContext });
|
|
458
|
+
}
|
|
459
|
+
var FormItem = (0, import_react.memo)(InternalFormItem);
|
|
460
|
+
FormItem.displayName = "ElFormItem";
|
|
461
|
+
var FormItem_default = FormItem;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Form/FormItemContext.ts
|
|
20
|
+
var FormItemContext_exports = {};
|
|
21
|
+
__export(FormItemContext_exports, {
|
|
22
|
+
FormItemContext: () => FormItemContext
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(FormItemContext_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var FormItemContext = (0, import_react.createContext)({
|
|
27
|
+
size: null
|
|
28
|
+
});
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
FormItemContext
|
|
32
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import type { Meta, NamePath, StoreValue, ValidatorRule } from './typings';
|
|
3
|
+
export interface ListField {
|
|
4
|
+
name: number;
|
|
5
|
+
key: number;
|
|
6
|
+
isListField: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ListOperations {
|
|
9
|
+
add: (defaultValue?: StoreValue, index?: number) => void;
|
|
10
|
+
remove: (index: number | number[]) => void;
|
|
11
|
+
move: (from: number, to: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface ListProps {
|
|
14
|
+
name: NamePath;
|
|
15
|
+
rules?: ValidatorRule[];
|
|
16
|
+
validateTrigger?: string | string[] | false;
|
|
17
|
+
initialValue?: any[];
|
|
18
|
+
children?: (fields: ListField[], operations: ListOperations, meta: Meta) => React.ReactElement;
|
|
19
|
+
}
|
|
20
|
+
declare const List: FC<ListProps>;
|
|
21
|
+
export default List;
|