linkmore-design 1.1.31 → 1.1.32
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/Affix/demos/basic.d.ts +1 -0
- package/dist/Affix/index.d.ts +1 -1
- package/dist/Affix/utils.d.ts +1 -1
- package/dist/Alert/demos/basic.d.ts +1 -0
- package/dist/Alert/demos/visible.d.ts +1 -0
- package/dist/Approval/demos/basic.d.ts +1 -0
- package/dist/Approval/type.d.ts +1 -1
- package/dist/AutoComplete/index.d.ts +1 -1
- package/dist/Avatar/demos/basic.d.ts +1 -0
- package/dist/Badge/Ribbon.d.ts +1 -1
- package/dist/Badge/SingleNumber.d.ts +1 -0
- package/dist/Badge/demos/basic.d.ts +1 -0
- package/dist/Breadcrumb/demos/basic.d.ts +1 -0
- package/dist/Breadcrumb/demos/basic1.d.ts +1 -0
- package/dist/Button/demos/basic.d.ts +1 -0
- package/dist/Button/demos/disabled.d.ts +1 -0
- package/dist/Button/demos/ghost.d.ts +1 -0
- package/dist/Button/demos/icon.d.ts +1 -0
- package/dist/Button/demos/type.d.ts +1 -0
- package/dist/Calendar/demos/basic.d.ts +1 -0
- package/dist/Card/demos/basic.d.ts +1 -0
- package/dist/Carousel/demos/basic.d.ts +1 -0
- package/dist/Cascader/demos/basic.d.ts +1 -0
- package/dist/Cascader/demos/formItem.d.ts +1 -0
- package/dist/Col/demos/basic.d.ts +1 -0
- package/dist/Collapse/demos/basic.d.ts +1 -0
- package/dist/Comment/demos/basic.d.ts +1 -0
- package/dist/ConfigProvider/DisabledContext.d.ts +1 -1
- package/dist/ConfigProvider/SizeContext.d.ts +1 -1
- package/dist/ConfigProvider/context.d.ts +2 -2
- package/dist/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
- package/dist/ConfigProvider/demos/componentSize.d.ts +1 -0
- package/dist/CustomTableOption/demos/basic.d.ts +1 -0
- package/dist/DatePicker/PickerButton.d.ts +1 -0
- package/dist/DatePicker/PickerTag.d.ts +1 -0
- package/dist/DatePicker/demos/basic.d.ts +1 -0
- package/dist/DatePicker/generatePicker/index.d.ts +13 -13
- package/dist/DatePicker/generatePicker/interface.d.ts +3 -3
- package/dist/DatePicker/index.d.ts +4 -4
- package/dist/Descriptions/demos/basic.d.ts +1 -0
- package/dist/Drawer/demos/basic.d.ts +1 -0
- package/dist/Drawer/demos/button.d.ts +1 -0
- package/dist/Drawer/demos/nested.d.ts +1 -0
- package/dist/Dropdown/demos/basic.d.ts +1 -0
- package/dist/Dropdown/demos/button.d.ts +1 -0
- package/dist/Dropdown/demos/icon.d.ts +1 -0
- package/dist/Dropdown/demos/local.d.ts +1 -0
- package/dist/Dropdown/demos/target.d.ts +1 -0
- package/dist/Empty/demos/basic.d.ts +1 -0
- package/dist/Empty/demos/custom.d.ts +1 -0
- package/dist/Empty/empty.d.ts +1 -0
- package/dist/Empty/simple.d.ts +1 -0
- package/dist/Form/Form.d.ts +2 -2
- package/dist/Form/FormItem/index.d.ts +6 -6
- package/dist/Form/FormItemLabel.d.ts +2 -2
- package/dist/Form/context.d.ts +2 -2
- package/dist/Form/demos/disabled.d.ts +1 -0
- package/dist/Form/demos/drawer1152-triple.d.ts +1 -0
- package/dist/Form/demos/drawer440-double.d.ts +1 -0
- package/dist/Form/demos/drawer440.d.ts +1 -0
- package/dist/Form/demos/drawer720-double.d.ts +1 -0
- package/dist/Form/demos/error-tip.d.ts +1 -0
- package/dist/Form/demos/formlist.d.ts +1 -0
- package/dist/Form/demos/horizontal.d.ts +1 -0
- package/dist/Form/demos/inline.d.ts +1 -0
- package/dist/Form/demos/modal416.d.ts +1 -0
- package/dist/Form/demos/modal552-double.d.ts +1 -0
- package/dist/Form/demos/responsive.d.ts +1 -0
- package/dist/Form/demos/ruleTime.d.ts +1 -0
- package/dist/Form/demos/vertical.d.ts +1 -0
- package/dist/Form/hooks/useFormItemStatus.d.ts +1 -1
- package/dist/Form/hooks/useFrameState.d.ts +1 -1
- package/dist/Form/index.d.ts +1 -1
- package/dist/Form/interface.d.ts +2 -2
- package/dist/FullScreen/demos/basic.d.ts +1 -0
- package/dist/FullScreen/demos/useInModal.d.ts +1 -0
- package/dist/Grid/col.d.ts +2 -2
- package/dist/Grid/demos/basic.d.ts +1 -0
- package/dist/Grid/row.d.ts +1 -1
- package/dist/IconFont/index.d.ts +1 -0
- package/dist/Image/demos/basic.d.ts +1 -0
- package/dist/ImageViewer/components/Arrows.d.ts +1 -0
- package/dist/ImageViewer/components/Carousel.d.ts +1 -0
- package/dist/ImageViewer/components/Operate.d.ts +1 -0
- package/dist/ImageViewer/components/Thumb.d.ts +1 -0
- package/dist/Input/demos/after.d.ts +1 -0
- package/dist/Input/demos/base.d.ts +1 -0
- package/dist/Input/demos/basic.d.ts +1 -0
- package/dist/Input/demos/color.d.ts +1 -0
- package/dist/Input/demos/combination.d.ts +1 -0
- package/dist/Input/demos/import.d.ts +1 -0
- package/dist/Input/demos/line.d.ts +1 -0
- package/dist/Input/demos/password.d.ts +1 -0
- package/dist/Input/demos/size.d.ts +1 -0
- package/dist/InputNumber/demos/basic.d.ts +1 -0
- package/dist/InputNumber/demos/format.d.ts +1 -0
- package/dist/InputNumber/demos/price.d.ts +1 -0
- package/dist/InputNumber/demos/status.d.ts +1 -0
- package/dist/InputNumber/demos/suffix.d.ts +1 -0
- package/dist/Layout/demos/basic.d.ts +1 -0
- package/dist/List/demos/basic.d.ts +1 -0
- package/dist/LmDrag/components/DndContainer.d.ts +1 -0
- package/dist/LmDrag/demos/basic.d.ts +1 -0
- package/dist/LmEditTable/DragHandle.d.ts +1 -0
- package/dist/LmEditTable/EditTable.d.ts +1 -1
- package/dist/LmEditTable/components/DraggableContainer.d.ts +1 -0
- package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +1 -0
- package/dist/LmEditTable/components/customRenderEmpty.d.ts +1 -0
- package/dist/LmEditTable/components/index.d.ts +1 -0
- package/dist/LmEditTable/demos/basic.d.ts +1 -0
- package/dist/LmEditTable/demos/colsort.d.ts +1 -0
- package/dist/LmEditTable/demos/group.d.ts +1 -0
- package/dist/LmEditTable/demos/priceTable.d.ts +1 -0
- package/dist/LmEditTable/demos/sinleEdit.d.ts +1 -0
- package/dist/LmEditTable/demos/size.d.ts +1 -0
- package/dist/LmEditTable/sortableBox.d.ts +1 -0
- package/dist/LmEditTable/sortableBoxCol.d.ts +1 -0
- package/dist/LmEditTable/sortableItemCol.d.ts +1 -0
- package/dist/LmSelect/GhostSelect.d.ts +1 -0
- package/dist/LmSelect/demos/basic.d.ts +1 -0
- package/dist/LmSelect/demos/checkbox.d.ts +1 -0
- package/dist/LmSelect/demos/ghost.d.ts +1 -0
- package/dist/LmSelect/useCheckboxOptions.d.ts +1 -0
- package/dist/LmTable/components/DndContainer.d.ts +1 -1
- package/dist/LmTable/components/Item/components/Remove/index.d.ts +1 -0
- package/dist/LmTable/components/customRenderEmpty.d.ts +1 -0
- package/dist/LmTable/components/inputDataEdit.d.ts +1 -0
- package/dist/LmTable/components/tableChartsModal.d.ts +1 -0
- package/dist/LmUpload/UploadList/ItemPicture.d.ts +1 -0
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +1 -0
- package/dist/LmUpload/UploadList/ItemText.d.ts +1 -0
- package/dist/LmUpload/view/index.d.ts +1 -0
- package/dist/LmUpload/wrapper/Upload.d.ts +1 -0
- package/dist/Mentions/demos/basic.d.ts +1 -0
- package/dist/Menu/demos/basic.d.ts +1 -0
- package/dist/Modal/demos/basic.d.ts +1 -0
- package/dist/Modal/demos/info.d.ts +1 -0
- package/dist/Modal/demos/locale.d.ts +1 -0
- package/dist/PageHeader/demos/basic.d.ts +1 -0
- package/dist/Pagination/demos/basic.d.ts +1 -0
- package/dist/Popconfirm/demos/basic.d.ts +1 -0
- package/dist/Popover/demos/basic.d.ts +1 -0
- package/dist/Popover/demos/basic1.d.ts +1 -0
- package/dist/Progress/demos/basic.d.ts +1 -0
- package/dist/Progress/demos/circle.d.ts +1 -0
- package/dist/Progress/demos/dynamic.d.ts +1 -0
- package/dist/Progress/demos/small.d.ts +1 -0
- package/dist/QuickMenu/demos/basic.d.ts +1 -0
- package/dist/QuickMenu/demos/useInDraw.d.ts +1 -0
- package/dist/Rate/demos/basic.d.ts +1 -0
- package/dist/Result/demos/403.d.ts +1 -0
- package/dist/Result/demos/404.d.ts +1 -0
- package/dist/Result/demos/500.d.ts +1 -0
- package/dist/Result/demos/basic.d.ts +1 -0
- package/dist/Result/demos/customicon.d.ts +1 -0
- package/dist/Result/demos/error.d.ts +1 -0
- package/dist/Result/demos/info.d.ts +1 -0
- package/dist/Result/demos/success.d.ts +1 -0
- package/dist/Result/demos/warning.d.ts +1 -0
- package/dist/Result/index.d.ts +6 -6
- package/dist/Result/noFound.d.ts +1 -0
- package/dist/Result/serverError.d.ts +1 -0
- package/dist/Result/unauthorized.d.ts +1 -0
- package/dist/Row/demos/basic.d.ts +1 -0
- package/dist/Segmented/demos/basic.d.ts +1 -0
- package/dist/Select/demos/basic.d.ts +1 -0
- package/dist/Select/demos/bordered.d.ts +1 -0
- package/dist/Select/demos/formItem.d.ts +1 -0
- package/dist/Select/index.d.ts +1 -1
- package/dist/Skeleton/demos/basic.d.ts +1 -0
- package/dist/Slider/demos/basic.d.ts +1 -0
- package/dist/Space/demos/auto.d.ts +1 -0
- package/dist/Space/demos/basic.d.ts +1 -0
- package/dist/Space/demos/vertical.d.ts +1 -0
- package/dist/Spin/demos/basic.d.ts +1 -0
- package/dist/Spin/demos/size.d.ts +1 -0
- package/dist/Statistic/demos/basic.d.ts +1 -0
- package/dist/Steps/demos/basic.d.ts +1 -0
- package/dist/Switch/demos/basic.d.ts +1 -0
- package/dist/Switch/demos/table.d.ts +1 -0
- package/dist/Table/demos/basic.d.ts +1 -0
- package/dist/Tabs/demos/basic.d.ts +1 -0
- package/dist/Tabs/demos/nobroder.d.ts +1 -0
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/Tag/demos/CheckableTag.d.ts +1 -0
- package/dist/Tag/demos/ExigencyTag.d.ts +1 -0
- package/dist/Tag/demos/add.d.ts +1 -0
- package/dist/Tag/demos/basic.d.ts +1 -0
- package/dist/Tag/demos/border.d.ts +1 -0
- package/dist/Tag/demos/colors.d.ts +1 -0
- package/dist/Timeline/demos/basic.d.ts +1 -0
- package/dist/Tooltip/demos/basic.d.ts +1 -0
- package/dist/Tooltip/index.d.ts +2 -2
- package/dist/Transfer/demos/basic.d.ts +1 -0
- package/dist/Tree/DirectoryTree.d.ts +2 -2
- package/dist/Tree/Tree.d.ts +4 -4
- package/dist/Tree/demos/basic.d.ts +1 -0
- package/dist/Tree/demos/controlled.d.ts +1 -0
- package/dist/Tree/demos/search.d.ts +1 -0
- package/dist/Tree/demos/sort.d.ts +1 -0
- package/dist/Tree/utils/dropIndicator.d.ts +1 -0
- package/dist/TreeSelect/demos/basic.d.ts +1 -0
- package/dist/TreeSelect/demos/formItem.d.ts +1 -0
- package/dist/TreeSelect/index.d.ts +1 -1
- package/dist/Typography/Base/index.d.ts +1 -1
- package/dist/Typography/Title.d.ts +1 -1
- package/dist/Typography/demos/basic.d.ts +1 -0
- package/dist/Typography/index.d.ts +1 -1
- package/dist/Upload/index.d.ts +3 -3
- package/dist/_util/colors.d.ts +2 -2
- package/dist/_util/domTarget.d.ts +3 -3
- package/dist/_util/getRenderPropValue.d.ts +1 -1
- package/dist/_util/motion.d.ts +1 -1
- package/dist/_util/reactNode.d.ts +2 -2
- package/dist/_util/responsiveObserve.d.ts +5 -5
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/type.d.ts +2 -2
- package/dist/_util/warning.d.ts +1 -1
- package/dist/hooks/useFullscreen/demos/basic.d.ts +1 -0
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +1 -0
- package/dist/hooks/useFullscreen/index.d.ts +3 -3
- package/dist/index.umd.css +284 -1225
- package/dist/index.umd.js +192928 -206060
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +20 -24
- package/dist/locale-provider/LocaleReceiver.d.ts +1 -1
- package/dist/locale-provider/context.d.ts +1 -1
- package/dist/message/demos/basic.d.ts +1 -0
- package/dist/message/demos/other.d.ts +1 -0
- package/dist/message/index.d.ts +10 -10
- package/dist/notification/demos/basic.d.ts +1 -0
- package/dist/notification/demos/button.d.ts +1 -0
- package/dist/notification/demos/icon.d.ts +1 -0
- package/dist/notification/index.d.ts +2 -2
- package/es/Affix/index.d.ts +1 -1
- package/es/Affix/index.js +37 -90
- package/es/Affix/utils.d.ts +1 -1
- package/es/Affix/utils.js +6 -13
- package/es/Alert/ErrorBoundary.js +5 -15
- package/es/Alert/index.js +42 -64
- package/es/Approval/handle.js +10 -27
- package/es/Approval/index.js +63 -120
- package/es/Approval/type.d.ts +1 -1
- package/es/Approval/type.js +0 -24
- package/es/Approval/util.js +4 -24
- package/es/AutoComplete/index.d.ts +1 -1
- package/es/AutoComplete/index.js +9 -20
- package/es/Badge/Ribbon.d.ts +1 -1
- package/es/Badge/Ribbon.js +9 -16
- package/es/Badge/ScrollNumber.js +17 -28
- package/es/Badge/SingleNumber.d.ts +1 -0
- package/es/Badge/SingleNumber.js +23 -38
- package/es/Badge/index.js +44 -68
- package/es/Badge/utils.js +2 -2
- package/es/Box/body/Item.js +1 -3
- package/es/Box/body/OverflowList.js +2 -2
- package/es/Box/wrapper/BoxContainer.js +8 -12
- package/es/Box/wrapper/BoxRoot.js +5 -7
- package/es/Box/wrapper/reducer.js +2 -4
- package/es/Button/index.js +10 -17
- package/es/ButtonTags/ButtonTags.js +6 -15
- package/es/ButtonTags/index.js +0 -3
- package/es/CardTable/LmCardTable.js +19 -28
- package/es/CardTable/body/TableBody.js +17 -26
- package/es/CardTable/body/TableBodyCell.js +9 -17
- package/es/CardTable/body/TableBodyRow.js +13 -19
- package/es/CardTable/card/PictureTextColumn.js +18 -28
- package/es/CardTable/card/PictureTextRow.js +18 -31
- package/es/CardTable/card/PictureTextRowOperate.js +17 -30
- package/es/CardTable/context.js +0 -5
- package/es/CardTable/empty.js +1 -6
- package/es/CardTable/fns/index.js +22 -36
- package/es/CardTable/footer.js +4 -15
- package/es/CardTable/hooks/usePagination.js +35 -50
- package/es/CardTable/index.js +0 -5
- package/es/CardTable/pager/TablePagination.js +8 -15
- package/es/CardTable/pager/index.js +6 -13
- package/es/CardTable/table/Table.js +2 -6
- package/es/CardTable/table/TableContainer.js +14 -23
- package/es/CardTable/table/TableRoot.js +45 -65
- package/es/CardTable/table/TableWrapper.js +2 -9
- package/es/CardTable/toolbar/ToolBarBottom.js +3 -8
- package/es/CardTable/utils.js +3 -9
- package/es/Cascader/index.js +11 -21
- package/es/Checkbox/index.js +7 -18
- package/es/ConfigProvider/DisabledContext.d.ts +1 -1
- package/es/ConfigProvider/DisabledContext.js +1 -1
- package/es/ConfigProvider/SizeContext.d.ts +1 -1
- package/es/ConfigProvider/SizeContext.js +1 -1
- package/es/ConfigProvider/context.d.ts +2 -2
- package/es/ConfigProvider/context.js +4 -10
- package/es/ConfigProvider/cssVariables.js +16 -25
- package/es/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
- package/es/ConfigProvider/defaultRenderEmpty.js +0 -6
- package/es/ConfigProvider/index.js +30 -55
- package/es/CropImg/body/Operate.js +10 -19
- package/es/CropImg/body/index.js +6 -8
- package/es/CropImg/fns/index.js +10 -11
- package/es/CropImg/utils.js +27 -45
- package/es/CropImg/wrapper/Container.js +9 -20
- package/es/CropImg/wrapper/Root.js +13 -16
- package/es/CropImg/wrapper/Wrapper.js +0 -2
- package/es/CropImg/wrapper/reducer.js +5 -9
- package/es/CustomTableOption/cardSort.js +24 -49
- package/es/CustomTableOption/columnsSort.js +29 -63
- package/es/CustomTableOption/filterSort.js +28 -53
- package/es/CustomTableOption/index.js +22 -32
- package/es/CustomerService/components/question.js +3 -20
- package/es/CustomerService/index.js +18 -46
- package/es/DatePicker/PickerButton.d.ts +1 -0
- package/es/DatePicker/PickerTag.d.ts +1 -0
- package/es/DatePicker/generatePicker/generateRangePicker.js +23 -33
- package/es/DatePicker/generatePicker/generateSinglePicker.js +22 -37
- package/es/DatePicker/generatePicker/index.d.ts +13 -13
- package/es/DatePicker/generatePicker/index.js +12 -25
- package/es/DatePicker/generatePicker/interface.d.ts +3 -3
- package/es/DatePicker/index.d.ts +4 -4
- package/es/DatePicker/util.js +0 -17
- package/es/Descriptions/Cell.js +11 -17
- package/es/Descriptions/Item.js +0 -1
- package/es/Descriptions/Row.js +24 -31
- package/es/Descriptions/index.js +27 -46
- package/es/Divider/index.js +12 -21
- package/es/Drawer/index.js +4 -11
- package/es/Dropdown/index.js +19 -40
- package/es/EditTable/EditTable.js +75 -171
- package/es/EditTable/index.js +0 -3
- package/es/Empty/empty.js +1 -4
- package/es/Empty/index.js +10 -22
- package/es/Empty/simple.js +1 -4
- package/es/EnlargeImg/index.js +17 -43
- package/es/Filter/Popover.js +29 -65
- package/es/Filter/baseFilter/Popover.js +28 -70
- package/es/Filter/baseFilter/ToggleFilter.js +9 -25
- package/es/Filter/baseFilter/index.js +8 -28
- package/es/Filter/complex/ComplexFilter.js +16 -47
- package/es/Filter/complex/ComplexItem.js +24 -47
- package/es/Filter/components/Checkbox.js +14 -34
- package/es/Filter/components/Date.js +10 -30
- package/es/Filter/components/Input.js +7 -23
- package/es/Filter/components/Select.js +13 -33
- package/es/Filter/components/Tree.js +8 -24
- package/es/Filter/components/header.js +3 -17
- package/es/Filter/components/index.js +0 -6
- package/es/Filter/context.js +0 -4
- package/es/Filter/edit/editFilter.js +41 -78
- package/es/Filter/index.js +21 -43
- package/es/Filter/popContext.js +0 -4
- package/es/Filter/remember.js +18 -41
- package/es/Form/ErrorList.js +16 -22
- package/es/Form/Form.d.ts +2 -2
- package/es/Form/Form.js +27 -49
- package/es/Form/FormItem/ItemHolder.js +26 -42
- package/es/Form/FormItem/index.d.ts +6 -6
- package/es/Form/FormItem/index.js +70 -118
- package/es/Form/FormItemInput.js +14 -16
- package/es/Form/FormItemLabel.d.ts +2 -2
- package/es/Form/FormItemLabel.js +24 -43
- package/es/Form/FormList.js +3 -11
- package/es/Form/FormWrapper.js +0 -4
- package/es/Form/WrapperItem.js +34 -70
- package/es/Form/container.js +12 -25
- package/es/Form/context.d.ts +2 -2
- package/es/Form/context.js +2 -5
- package/es/Form/hooks/useDebounce.js +3 -4
- package/es/Form/hooks/useForm.js +2 -7
- package/es/Form/hooks/useFormInstance.js +1 -2
- package/es/Form/hooks/useFormItemStatus.d.ts +1 -1
- package/es/Form/hooks/useFormItemStatus.js +1 -4
- package/es/Form/hooks/useFrameState.d.ts +1 -1
- package/es/Form/hooks/useFrameState.js +3 -8
- package/es/Form/hooks/useItemRef.js +1 -6
- package/es/Form/index.d.ts +1 -1
- package/es/Form/index.js +0 -2
- package/es/Form/interface.d.ts +2 -2
- package/es/Form/util.js +2 -6
- package/es/FullScreen/index.js +3 -6
- package/es/Grid/col.d.ts +2 -2
- package/es/Grid/col.js +21 -41
- package/es/Grid/hooks/useBreakpoint.js +0 -3
- package/es/Grid/index.js +2 -3
- package/es/Grid/row.d.ts +1 -1
- package/es/Grid/row.js +31 -49
- package/es/Icon/index.js +0 -4
- package/es/IconFont/font/iconfont.js +10 -16
- package/es/IconFont/index.js +1 -4
- package/es/IconSelect/index.js +12 -29
- package/es/ImageViewer/LmImageViewer.js +0 -6
- package/es/ImageViewer/components/Arrows.js +1 -7
- package/es/ImageViewer/components/Carousel.js +13 -15
- package/es/ImageViewer/components/Operate.js +0 -4
- package/es/ImageViewer/components/Thumb.js +3 -10
- package/es/ImageViewer/fns/index.js +17 -26
- package/es/ImageViewer/wrapeer/Container.js +1 -5
- package/es/ImageViewer/wrapeer/Root.js +14 -19
- package/es/ImageViewer/wrapeer/Wrapper.js +1 -5
- package/es/ImageViewer/wrapeer/reducer.js +6 -13
- package/es/Input/index.js +30 -37
- package/es/InputNumber/index.js +9 -13
- package/es/LeftTable/index.js +25 -49
- package/es/LmDrag/LmDrag.js +0 -6
- package/es/LmDrag/components/DndContainer.js +22 -38
- package/es/LmDrag/components/sortableBox.js +4 -5
- package/es/LmDrag/components/sortableItem.js +13 -17
- package/es/LmDrag/wrapper/Root.js +0 -2
- package/es/LmEditTable/DndContainer.js +22 -33
- package/es/LmEditTable/DragHandle.js +4 -6
- package/es/LmEditTable/EditTable.d.ts +1 -1
- package/es/LmEditTable/EditTable.js +150 -361
- package/es/LmEditTable/components/DraggableContainer.js +6 -12
- package/es/LmEditTable/components/QuickOpetate.js +7 -12
- package/es/LmEditTable/components/bottomOpetateComponent.js +4 -6
- package/es/LmEditTable/components/customRenderEmpty.js +1 -4
- package/es/LmEditTable/hooks/useForkRef.js +0 -3
- package/es/LmEditTable/rowSort/DndContainerRow.js +24 -36
- package/es/LmEditTable/sortableBox.js +1 -3
- package/es/LmEditTable/sortableBoxCol.js +1 -3
- package/es/LmEditTable/sortableItem.js +10 -19
- package/es/LmEditTable/sortableItemCol.d.ts +1 -0
- package/es/LmEditTable/sortableItemCol.js +16 -21
- package/es/LmEditTable/util.js +6 -46
- package/es/LmEditTable/virtual/VirtualRow.js +26 -46
- package/es/LmEditTable/virtual/VirtualRow2.js +7 -15
- package/es/LmEditTable/virtual/VirtualTable.js +10 -14
- package/es/LmEditTable/virtual/VirtualWrapper.js +6 -13
- package/es/LmEditTable/virtual/context.js +5 -15
- package/es/LmFilter/Controls/CheckboxTags.js +2 -12
- package/es/LmFilter/Controls/index.js +10 -24
- package/es/LmFilter/LmFilter.js +4 -14
- package/es/LmFilter/baseFilter/fuzzySearch.js +8 -18
- package/es/LmFilter/baseFilter/index.js +2 -7
- package/es/LmFilter/clearFilter/index.js +2 -9
- package/es/LmFilter/complexFilter/drawer.js +47 -76
- package/es/LmFilter/complexFilter/index.js +2 -14
- package/es/LmFilter/complexFilter/valueDrawer.js +14 -46
- package/es/LmFilter/components/CascaderFilter.js +27 -52
- package/es/LmFilter/components/CheckboxFilter.js +39 -52
- package/es/LmFilter/components/CustomSelectFilter.js +20 -38
- package/es/LmFilter/components/DateFilter.js +23 -39
- package/es/LmFilter/components/DropdownFIlter.js +49 -82
- package/es/LmFilter/components/EmptyFilter.js +0 -5
- package/es/LmFilter/components/InputFilter.js +5 -13
- package/es/LmFilter/components/InputSearchClose.js +10 -22
- package/es/LmFilter/components/SelectFilter.js +21 -37
- package/es/LmFilter/components/index.js +23 -34
- package/es/LmFilter/customFilter/drawer.js +37 -72
- package/es/LmFilter/customFilter/index.js +11 -24
- package/es/LmFilter/customFilter/saveModal.js +12 -36
- package/es/LmFilter/customFilter/valueDrawer.js +14 -45
- package/es/LmFilter/filterFns/index.js +131 -192
- package/es/LmFilter/hooks/index.js +0 -2
- package/es/LmFilter/hooks/useDelayedFn.js +2 -5
- package/es/LmFilter/index.js +0 -3
- package/es/LmFilter/localization.js +2 -1
- package/es/LmFilter/utils.js +21 -47
- package/es/LmFilter/wrapper/Filter.js +4 -13
- package/es/LmFilter/wrapper/FilterContainer.js +1 -5
- package/es/LmFilter/wrapper/FilterRoot.js +40 -62
- package/es/LmFilter/wrapper/FilterWrapper.js +1 -5
- package/es/LmImgList/body/Banner.js +13 -17
- package/es/LmImgList/body/Thumb.js +4 -9
- package/es/LmImgList/fns/index.js +15 -23
- package/es/LmImgList/wrapper/Container.js +9 -13
- package/es/LmImgList/wrapper/Root.js +13 -16
- package/es/LmImgList/wrapper/reducer.js +6 -11
- package/es/LmSelect/GhostSelect.js +99 -150
- package/es/LmSelect/NormalSelect.js +20 -30
- package/es/LmSelect/index.js +1 -7
- package/es/LmSelect/useCheckboxOptions.js +17 -27
- package/es/LmSelect/utils.js +20 -22
- package/es/LmTable/Table.js +286 -487
- package/es/LmTable/VList.js +109 -170
- package/es/LmTable/autosize.js +16 -43
- package/es/LmTable/chartUtil.js +4 -14
- package/es/LmTable/common/index.js +1 -7
- package/es/LmTable/components/CalcExpression.js +11 -30
- package/es/LmTable/components/Container/Container.js +18 -22
- package/es/LmTable/components/DndContainer.d.ts +1 -1
- package/es/LmTable/components/DndContainer.js +132 -211
- package/es/LmTable/components/HeaderCol.js +13 -22
- package/es/LmTable/components/Item/Item.js +22 -26
- package/es/LmTable/components/Item/components/Action/Action.js +4 -8
- package/es/LmTable/components/Item/components/Remove/index.d.ts +1 -0
- package/es/LmTable/components/SortableBox.js +1 -6
- package/es/LmTable/components/customRenderEmpty.js +1 -4
- package/es/LmTable/components/inputDataEdit.js +3 -8
- package/es/LmTable/components/sheelTableCell.js +32 -57
- package/es/LmTable/components/tableChartsModal.js +23 -30
- package/es/LmTable/context.js +0 -3
- package/es/LmTable/detectElementResize.js +15 -48
- package/es/LmTable/expression.js +4 -24
- package/es/LmTable/hooks/useDndItems.js +24 -65
- package/es/LmTable/hooks/useGroupDataSource.js +1 -6
- package/es/LmTable/hooks/useResizeObserver.js +13 -18
- package/es/LmTable/hooks/useRowSelectControllableValue.js +6 -20
- package/es/LmTable/index.js +0 -3
- package/es/LmTable/multipleContainersKeyboardCoordinates.js +5 -30
- package/es/LmTable/resetConfig.js +8 -8
- package/es/LmTable/testDemos/group.js +5 -21
- package/es/LmTable/util.js +27 -94
- package/es/LmTable/virTual/VirtualRow.js +25 -42
- package/es/LmTable/virTual/VirtualTable.js +12 -21
- package/es/LmTable/virTual/VirtualWrapper.js +7 -14
- package/es/LmTable/virTual/context.js +5 -15
- package/es/LmUpload/LmUpload.js +11 -17
- package/es/LmUpload/UploadList/ItemPicture.js +8 -9
- package/es/LmUpload/UploadList/ItemPictureCard.js +23 -38
- package/es/LmUpload/UploadList/ItemText.js +5 -7
- package/es/LmUpload/UploadList/RenderItem.js +1 -7
- package/es/LmUpload/UploadList/index.js +11 -19
- package/es/LmUpload/body/Progress.js +0 -2
- package/es/LmUpload/body/UploadCore.js +10 -16
- package/es/LmUpload/body/UploadPicture.js +4 -5
- package/es/LmUpload/components/Crop.js +3 -5
- package/es/LmUpload/components/Preview.js +7 -10
- package/es/LmUpload/fns/index.js +57 -108
- package/es/LmUpload/utils.js +12 -15
- package/es/LmUpload/view/index.js +0 -2
- package/es/LmUpload/wrapper/Upload.js +0 -2
- package/es/LmUpload/wrapper/UploadContainer.js +1 -5
- package/es/LmUpload/wrapper/UploadRoot.js +13 -18
- package/es/LmUpload/wrapper/UploadWrapper.js +0 -2
- package/es/LmUpload/wrapper/reducer.js +6 -11
- package/es/LoadingPage/index.js +1 -7
- package/es/Locale/ku_IQ.js +2 -2
- package/es/Modal/index.js +10 -25
- package/es/PageHeader/index.js +22 -44
- package/es/Pagination/index.js +4 -13
- package/es/Popover/index.js +5 -14
- package/es/QuickMenu/index.js +18 -45
- package/es/Radio/index.js +10 -24
- package/es/Result/index.d.ts +6 -6
- package/es/Result/index.js +16 -26
- package/es/Result/noFound.js +0 -2
- package/es/Result/serverError.js +0 -2
- package/es/Result/unauthorized.js +0 -2
- package/es/Select/index.d.ts +1 -1
- package/es/Select/index.js +20 -31
- package/es/Switch/index.js +4 -11
- package/es/Tabs/TabPane.js +0 -2
- package/es/Tabs/hooks/useAnimateConfig.js +0 -3
- package/es/Tabs/hooks/useLegacyItems.js +3 -12
- package/es/Tabs/index.d.ts +2 -2
- package/es/Tabs/index.js +15 -27
- package/es/Tabs/index.old.js +4 -11
- package/es/Tag/index.js +5 -13
- package/es/Tooltip/index.d.ts +2 -2
- package/es/Tooltip/index.js +34 -66
- package/es/Tree/DirectoryTree.d.ts +2 -2
- package/es/Tree/DirectoryTree.js +31 -61
- package/es/Tree/Tree.d.ts +4 -4
- package/es/Tree/Tree.js +14 -21
- package/es/Tree/index.js +1 -5
- package/es/Tree/utils/dictUtil.js +4 -21
- package/es/Tree/utils/dropIndicator.d.ts +1 -0
- package/es/Tree/utils/dropIndicator.js +5 -10
- package/es/Tree/utils/iconUtil.js +2 -13
- package/es/TreeSelect/index.d.ts +1 -1
- package/es/TreeSelect/index.js +15 -24
- package/es/Typography/Base/Ellipsis.js +25 -52
- package/es/Typography/Base/EllipsisTooltip.js +3 -8
- package/es/Typography/Base/index.d.ts +1 -1
- package/es/Typography/Base/index.js +104 -173
- package/es/Typography/Editable.js +21 -34
- package/es/Typography/Link.js +4 -11
- package/es/Typography/Paragraph.js +0 -2
- package/es/Typography/Text.js +1 -9
- package/es/Typography/Title.d.ts +1 -1
- package/es/Typography/Title.js +2 -10
- package/es/Typography/Typography.js +11 -23
- package/es/Typography/hooks/useUpdatedEffect.js +0 -1
- package/es/Typography/index.d.ts +1 -1
- package/es/Upload/index.d.ts +3 -3
- package/es/Upload/index.js +2 -6
- package/es/UploadOss/index.js +0 -4
- package/es/UploadOss/uploadBtn.js +32 -54
- package/es/UploadOss/uploadImg.js +58 -86
- package/es/VirtualList/index.js +18 -27
- package/es/_util/colors.d.ts +2 -2
- package/es/_util/colors.js +2 -2
- package/es/_util/domTarget.d.ts +3 -3
- package/es/_util/domTarget.js +0 -3
- package/es/_util/getDataOrAriaProps.js +0 -1
- package/es/_util/getRenderPropValue.d.ts +1 -1
- package/es/_util/getRenderPropValue.js +0 -3
- package/es/_util/hooks/useFlexGapSupport.js +3 -4
- package/es/_util/hooks/useForceUpdate.js +4 -5
- package/es/_util/motion.d.ts +1 -1
- package/es/_util/motion.js +2 -11
- package/es/_util/placements.js +7 -8
- package/es/_util/reactNode.d.ts +2 -2
- package/es/_util/responsiveObserve.d.ts +5 -5
- package/es/_util/responsiveObserve.js +0 -5
- package/es/_util/statusUtils.d.ts +1 -1
- package/es/_util/statusUtils.js +0 -1
- package/es/_util/styleChecker.js +6 -9
- package/es/_util/throttleByAnimationFrame.js +0 -6
- package/es/_util/transButton.js +3 -15
- package/es/_util/type.d.ts +2 -2
- package/es/_util/type.js +0 -2
- package/es/_util/warning.d.ts +1 -1
- package/es/_util/warning.js +4 -6
- package/es/hooks/useEvent/index.js +6 -7
- package/es/hooks/useFullscreen/index.d.ts +3 -3
- package/es/hooks/useFullscreen/index.js +7 -29
- package/es/locale-provider/LocaleReceiver.d.ts +1 -1
- package/es/locale-provider/LocaleReceiver.js +4 -12
- package/es/locale-provider/context.d.ts +1 -1
- package/es/locale-provider/index.js +2 -11
- package/es/message/hooks/useMessage.js +8 -17
- package/es/message/index.d.ts +10 -10
- package/es/message/index.js +8 -36
- package/es/notification/hooks/useNotification.js +8 -12
- package/es/notification/index.d.ts +2 -2
- package/es/notification/index.js +31 -67
- package/es/services/newRequest.js +18 -47
- package/es/services/utils.js +0 -15
- package/lib/Affix/index.d.ts +1 -1
- package/lib/Affix/index.js +37 -104
- package/lib/Affix/utils.d.ts +1 -1
- package/lib/Affix/utils.js +6 -22
- package/lib/Alert/ErrorBoundary.js +5 -21
- package/lib/Alert/index.js +42 -78
- package/lib/Approval/handle.js +10 -37
- package/lib/Approval/index.js +63 -131
- package/lib/Approval/type.d.ts +1 -1
- package/lib/Approval/type.js +0 -24
- package/lib/Approval/util.js +4 -30
- package/lib/AutoComplete/index.d.ts +1 -1
- package/lib/AutoComplete/index.js +10 -34
- package/lib/Avatar/index.js +0 -4
- package/lib/Badge/Ribbon.d.ts +1 -1
- package/lib/Badge/Ribbon.js +9 -23
- package/lib/Badge/ScrollNumber.js +17 -35
- package/lib/Badge/SingleNumber.d.ts +1 -0
- package/lib/Badge/SingleNumber.js +23 -43
- package/lib/Badge/index.js +44 -79
- package/lib/Badge/utils.js +0 -2
- package/lib/Box/LmBox.js +0 -5
- package/lib/Box/body/Item.js +1 -7
- package/lib/Box/body/List.js +0 -6
- package/lib/Box/body/OverflowList.js +0 -4
- package/lib/Box/index.js +0 -3
- package/lib/Box/wrapper/BoxContainer.js +8 -19
- package/lib/Box/wrapper/BoxRoot.js +5 -14
- package/lib/Box/wrapper/BoxWrapper.js +0 -5
- package/lib/Box/wrapper/reducer.js +2 -8
- package/lib/Breadcrumb/index.js +0 -4
- package/lib/Button/index.js +10 -25
- package/lib/ButtonTags/ButtonTags.js +6 -15
- package/lib/ButtonTags/index.js +0 -3
- package/lib/Calendar/index.js +0 -4
- package/lib/Card/index.js +0 -4
- package/lib/CardTable/LmCardTable.js +19 -28
- package/lib/CardTable/body/TableBody.js +17 -26
- package/lib/CardTable/body/TableBodyCell.js +9 -17
- package/lib/CardTable/body/TableBodyRow.js +13 -19
- package/lib/CardTable/card/PictureTextColumn.js +18 -28
- package/lib/CardTable/card/PictureTextRow.js +18 -31
- package/lib/CardTable/card/PictureTextRowOperate.js +17 -30
- package/lib/CardTable/context.js +0 -5
- package/lib/CardTable/empty.js +1 -6
- package/lib/CardTable/fns/index.js +22 -36
- package/lib/CardTable/footer.js +4 -15
- package/lib/CardTable/hooks/usePagination.js +35 -50
- package/lib/CardTable/index.js +0 -5
- package/lib/CardTable/pager/TablePagination.js +8 -15
- package/lib/CardTable/pager/index.js +6 -13
- package/lib/CardTable/table/Table.js +2 -6
- package/lib/CardTable/table/TableContainer.js +14 -23
- package/lib/CardTable/table/TableRoot.js +45 -65
- package/lib/CardTable/table/TableWrapper.js +2 -9
- package/lib/CardTable/toolbar/ToolBarBottom.js +3 -8
- package/lib/CardTable/utils.js +3 -9
- package/lib/Carousel/index.js +0 -4
- package/lib/Cascader/index.js +11 -30
- package/lib/Checkbox/index.js +7 -18
- package/lib/Col/index.js +0 -2
- package/lib/Collapse/index.js +0 -4
- package/lib/Comment/index.js +0 -4
- package/lib/ConfigProvider/DisabledContext.d.ts +1 -1
- package/lib/ConfigProvider/DisabledContext.js +1 -6
- package/lib/ConfigProvider/SizeContext.d.ts +1 -1
- package/lib/ConfigProvider/SizeContext.js +1 -6
- package/lib/ConfigProvider/context.d.ts +2 -2
- package/lib/ConfigProvider/context.js +4 -13
- package/lib/ConfigProvider/cssVariables.js +17 -34
- package/lib/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
- package/lib/ConfigProvider/defaultRenderEmpty.js +0 -12
- package/lib/ConfigProvider/index.js +30 -75
- package/lib/CropImg/LmCropImg.js +0 -5
- package/lib/CropImg/body/Operate.js +10 -23
- package/lib/CropImg/body/index.js +6 -13
- package/lib/CropImg/fns/index.js +8 -12
- package/lib/CropImg/index.js +0 -3
- package/lib/CropImg/utils.js +27 -45
- package/lib/CropImg/wrapper/Container.js +7 -26
- package/lib/CropImg/wrapper/Root.js +13 -24
- package/lib/CropImg/wrapper/Wrapper.js +0 -6
- package/lib/CropImg/wrapper/reducer.js +5 -12
- package/lib/CustomTableOption/cardSort.js +24 -60
- package/lib/CustomTableOption/columnsSort.js +29 -77
- package/lib/CustomTableOption/filterSort.js +28 -65
- package/lib/CustomTableOption/index.js +22 -45
- package/lib/CustomerService/components/question.js +3 -20
- package/lib/CustomerService/index.js +18 -46
- package/lib/DatePicker/PickerButton.d.ts +1 -0
- package/lib/DatePicker/PickerButton.js +0 -4
- package/lib/DatePicker/PickerTag.d.ts +1 -0
- package/lib/DatePicker/PickerTag.js +0 -4
- package/lib/DatePicker/generatePicker/generateRangePicker.js +23 -52
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +22 -56
- package/lib/DatePicker/generatePicker/index.d.ts +13 -13
- package/lib/DatePicker/generatePicker/index.js +12 -33
- package/lib/DatePicker/generatePicker/interface.d.ts +3 -3
- package/lib/DatePicker/index.d.ts +4 -4
- package/lib/DatePicker/index.js +0 -6
- package/lib/DatePicker/util.js +0 -20
- package/lib/Descriptions/Cell.js +11 -22
- package/lib/Descriptions/Item.js +0 -2
- package/lib/Descriptions/Row.js +24 -36
- package/lib/Descriptions/index.js +28 -61
- package/lib/Divider/index.js +12 -28
- package/lib/Drawer/index.js +4 -16
- package/lib/Dropdown/index.js +19 -48
- package/lib/EditTable/EditTable.js +75 -171
- package/lib/EditTable/index.js +0 -3
- package/lib/Empty/empty.js +1 -7
- package/lib/Empty/index.js +10 -33
- package/lib/Empty/simple.js +1 -7
- package/lib/EnlargeImg/index.js +17 -43
- package/lib/Filter/Popover.js +29 -65
- package/lib/Filter/baseFilter/Popover.js +28 -70
- package/lib/Filter/baseFilter/ToggleFilter.js +9 -25
- package/lib/Filter/baseFilter/index.js +8 -28
- package/lib/Filter/complex/ComplexFilter.js +16 -47
- package/lib/Filter/complex/ComplexItem.js +24 -47
- package/lib/Filter/components/Checkbox.js +14 -34
- package/lib/Filter/components/Date.js +10 -30
- package/lib/Filter/components/Input.js +7 -23
- package/lib/Filter/components/Select.js +13 -33
- package/lib/Filter/components/Tree.js +8 -24
- package/lib/Filter/components/header.js +3 -17
- package/lib/Filter/components/index.js +0 -6
- package/lib/Filter/context.js +0 -4
- package/lib/Filter/edit/editFilter.js +41 -78
- package/lib/Filter/index.js +21 -43
- package/lib/Filter/popContext.js +0 -4
- package/lib/Filter/remember.js +18 -41
- package/lib/Form/ErrorList.js +16 -34
- package/lib/Form/Form.d.ts +2 -2
- package/lib/Form/Form.js +27 -62
- package/lib/Form/FormItem/ItemHolder.js +26 -60
- package/lib/Form/FormItem/index.d.ts +6 -6
- package/lib/Form/FormItem/index.js +70 -138
- package/lib/Form/FormItemInput.js +14 -23
- package/lib/Form/FormItemLabel.d.ts +2 -2
- package/lib/Form/FormItemLabel.js +24 -55
- package/lib/Form/FormList.js +3 -18
- package/lib/Form/FormWrapper.js +0 -8
- package/lib/Form/WrapperItem.js +34 -79
- package/lib/Form/container.js +12 -32
- package/lib/Form/context.d.ts +2 -2
- package/lib/Form/context.js +2 -15
- package/lib/Form/hooks/useDebounce.js +3 -9
- package/lib/Form/hooks/useForm.js +2 -14
- package/lib/Form/hooks/useFormInstance.js +1 -5
- package/lib/Form/hooks/useFormItemStatus.d.ts +1 -1
- package/lib/Form/hooks/useFormItemStatus.js +1 -8
- package/lib/Form/hooks/useFrameState.d.ts +1 -1
- package/lib/Form/hooks/useFrameState.js +3 -16
- package/lib/Form/hooks/useItemRef.js +1 -13
- package/lib/Form/index.d.ts +1 -1
- package/lib/Form/index.js +0 -13
- package/lib/Form/interface.d.ts +2 -2
- package/lib/Form/util.js +2 -9
- package/lib/FullScreen/index.js +3 -10
- package/lib/Grid/RowContext.js +0 -2
- package/lib/Grid/col.d.ts +2 -2
- package/lib/Grid/col.js +21 -48
- package/lib/Grid/hooks/useBreakpoint.js +0 -8
- package/lib/Grid/index.js +0 -7
- package/lib/Grid/row.d.ts +1 -1
- package/lib/Grid/row.js +31 -62
- package/lib/Icon/index.js +0 -4
- package/lib/IconFont/font/iconfont.js +10 -16
- package/lib/IconFont/index.js +1 -11
- package/lib/IconSelect/index.js +12 -29
- package/lib/Image/index.js +0 -4
- package/lib/ImageViewer/LmImageViewer.js +0 -11
- package/lib/ImageViewer/components/Arrows.js +1 -10
- package/lib/ImageViewer/components/Carousel.js +13 -18
- package/lib/ImageViewer/components/Operate.js +0 -7
- package/lib/ImageViewer/components/Thumb.js +3 -15
- package/lib/ImageViewer/fns/index.js +17 -27
- package/lib/ImageViewer/index.js +0 -3
- package/lib/ImageViewer/wrapeer/Container.js +2 -12
- package/lib/ImageViewer/wrapeer/Root.js +15 -27
- package/lib/ImageViewer/wrapeer/Wrapper.js +2 -9
- package/lib/ImageViewer/wrapeer/reducer.js +6 -16
- package/lib/Input/index.js +30 -49
- package/lib/InputNumber/index.js +9 -23
- package/lib/Layout/index.js +0 -4
- package/lib/LeftTable/index.js +25 -49
- package/lib/List/index.js +0 -4
- package/lib/LmDrag/LmDrag.js +0 -11
- package/lib/LmDrag/components/DndContainer.js +22 -47
- package/lib/LmDrag/components/sortableBox.js +2 -9
- package/lib/LmDrag/components/sortableItem.js +13 -22
- package/lib/LmDrag/index.js +0 -3
- package/lib/LmDrag/wrapper/Root.js +0 -7
- package/lib/LmEditTable/DndContainer.js +22 -43
- package/lib/LmEditTable/DragHandle.js +4 -12
- package/lib/LmEditTable/EditTable.d.ts +1 -1
- package/lib/LmEditTable/EditTable.js +150 -388
- package/lib/LmEditTable/components/DraggableContainer.js +6 -17
- package/lib/LmEditTable/components/QuickOpetate.js +7 -18
- package/lib/LmEditTable/components/bottomOpetateComponent.js +4 -9
- package/lib/LmEditTable/components/customRenderEmpty.js +1 -8
- package/lib/LmEditTable/components/index.js +0 -6
- package/lib/LmEditTable/hooks/useForkRef.js +0 -4
- package/lib/LmEditTable/index.js +0 -3
- package/lib/LmEditTable/rowSort/DndContainerRow.js +23 -42
- package/lib/LmEditTable/sortableBox.js +1 -6
- package/lib/LmEditTable/sortableBoxCol.js +1 -6
- package/lib/LmEditTable/sortableItem.js +10 -25
- package/lib/LmEditTable/sortableItemCol.d.ts +1 -0
- package/lib/LmEditTable/sortableItemCol.js +11 -22
- package/lib/LmEditTable/util.js +6 -60
- package/lib/LmEditTable/virtual/VirtualRow.js +26 -53
- package/lib/LmEditTable/virtual/VirtualRow2.js +7 -22
- package/lib/LmEditTable/virtual/VirtualTable.js +10 -22
- package/lib/LmEditTable/virtual/VirtualWrapper.js +6 -18
- package/lib/LmEditTable/virtual/context.js +3 -15
- package/lib/LmEditTable/virtual/index.js +0 -4
- package/lib/LmFilter/Controls/CheckboxTags.js +2 -12
- package/lib/LmFilter/Controls/index.js +10 -24
- package/lib/LmFilter/LmFilter.js +4 -14
- package/lib/LmFilter/baseFilter/fuzzySearch.js +8 -18
- package/lib/LmFilter/baseFilter/index.js +2 -7
- package/lib/LmFilter/clearFilter/index.js +2 -9
- package/lib/LmFilter/complexFilter/drawer.js +47 -76
- package/lib/LmFilter/complexFilter/index.js +2 -14
- package/lib/LmFilter/complexFilter/valueDrawer.js +14 -46
- package/lib/LmFilter/components/CascaderFilter.js +27 -52
- package/lib/LmFilter/components/CheckboxFilter.js +39 -52
- package/lib/LmFilter/components/CustomSelectFilter.js +20 -38
- package/lib/LmFilter/components/DateFilter.js +23 -39
- package/lib/LmFilter/components/DropdownFIlter.js +49 -82
- package/lib/LmFilter/components/EmptyFilter.js +0 -5
- package/lib/LmFilter/components/InputFilter.js +5 -13
- package/lib/LmFilter/components/InputSearchClose.js +10 -22
- package/lib/LmFilter/components/SelectFilter.js +21 -37
- package/lib/LmFilter/components/index.js +23 -34
- package/lib/LmFilter/customFilter/drawer.js +37 -72
- package/lib/LmFilter/customFilter/index.js +11 -24
- package/lib/LmFilter/customFilter/saveModal.js +12 -36
- package/lib/LmFilter/customFilter/valueDrawer.js +14 -45
- package/lib/LmFilter/filterFns/index.js +129 -198
- package/lib/LmFilter/hooks/index.js +0 -2
- package/lib/LmFilter/hooks/useDelayedFn.js +2 -5
- package/lib/LmFilter/index.js +0 -3
- package/lib/LmFilter/localization.js +2 -1
- package/lib/LmFilter/utils.js +21 -47
- package/lib/LmFilter/wrapper/Filter.js +4 -13
- package/lib/LmFilter/wrapper/FilterContainer.js +1 -5
- package/lib/LmFilter/wrapper/FilterRoot.js +40 -62
- package/lib/LmFilter/wrapper/FilterWrapper.js +1 -5
- package/lib/LmImgList/LmImgList.js +0 -5
- package/lib/LmImgList/body/Banner.js +13 -22
- package/lib/LmImgList/body/Thumb.js +4 -16
- package/lib/LmImgList/fns/index.js +15 -24
- package/lib/LmImgList/index.js +0 -4
- package/lib/LmImgList/wrapper/Container.js +9 -21
- package/lib/LmImgList/wrapper/Root.js +13 -24
- package/lib/LmImgList/wrapper/Wrapper.js +0 -5
- package/lib/LmImgList/wrapper/reducer.js +6 -14
- package/lib/LmSelect/GhostSelect.js +99 -163
- package/lib/LmSelect/NormalSelect.js +20 -40
- package/lib/LmSelect/index.js +1 -14
- package/lib/LmSelect/useCheckboxOptions.js +17 -37
- package/lib/LmSelect/utils.js +18 -38
- package/lib/LmTable/Table.js +286 -487
- package/lib/LmTable/VList.js +109 -170
- package/lib/LmTable/autosize.js +16 -43
- package/lib/LmTable/chartUtil.js +4 -14
- package/lib/LmTable/common/index.js +1 -9
- package/lib/LmTable/components/CalcExpression.js +11 -37
- package/lib/LmTable/components/Container/Container.js +16 -26
- package/lib/LmTable/components/Container/index.js +0 -1
- package/lib/LmTable/components/DndContainer.d.ts +1 -1
- package/lib/LmTable/components/DndContainer.js +128 -223
- package/lib/LmTable/components/HeaderCol.js +13 -22
- package/lib/LmTable/components/Item/Item.js +20 -32
- package/lib/LmTable/components/Item/components/Action/Action.js +4 -14
- package/lib/LmTable/components/Item/components/Action/index.js +0 -1
- package/lib/LmTable/components/Item/components/Handle/index.js +0 -4
- package/lib/LmTable/components/Item/components/Remove/index.d.ts +1 -0
- package/lib/LmTable/components/Item/components/Remove/index.js +0 -4
- package/lib/LmTable/components/Item/components/index.js +0 -4
- package/lib/LmTable/components/Item/index.js +0 -2
- package/lib/LmTable/components/SortableBox.js +1 -6
- package/lib/LmTable/components/customRenderEmpty.js +1 -8
- package/lib/LmTable/components/inputDataEdit.js +3 -11
- package/lib/LmTable/components/sheelTableCell.js +32 -65
- package/lib/LmTable/components/tableChartsModal.js +12 -26
- package/lib/LmTable/context.js +0 -3
- package/lib/LmTable/detectElementResize.js +15 -48
- package/lib/LmTable/expression.js +4 -28
- package/lib/LmTable/hooks/useDndItems.js +24 -70
- package/lib/LmTable/hooks/useGroupDataSource.js +1 -6
- package/lib/LmTable/hooks/useResizeObserver.js +13 -23
- package/lib/LmTable/hooks/useRowSelectControllableValue.js +6 -20
- package/lib/LmTable/index.js +0 -3
- package/lib/LmTable/multipleContainersKeyboardCoordinates.js +5 -32
- package/lib/LmTable/resetConfig.js +8 -8
- package/lib/LmTable/testDemos/group.js +5 -21
- package/lib/LmTable/util.js +27 -94
- package/lib/LmTable/virTual/VirtualRow.js +25 -46
- package/lib/LmTable/virTual/VirtualTable.js +12 -30
- package/lib/LmTable/virTual/VirtualWrapper.js +7 -19
- package/lib/LmTable/virTual/context.js +3 -15
- package/lib/LmTable/virTual/index.js +0 -4
- package/lib/LmUpload/LmUpload.js +11 -25
- package/lib/LmUpload/UploadList/ItemPicture.js +6 -13
- package/lib/LmUpload/UploadList/ItemPictureCard.js +23 -44
- package/lib/LmUpload/UploadList/ItemText.js +5 -12
- package/lib/LmUpload/UploadList/RenderItem.js +1 -14
- package/lib/LmUpload/UploadList/index.js +11 -26
- package/lib/LmUpload/body/Progress.js +0 -5
- package/lib/LmUpload/body/UploadCore.js +8 -22
- package/lib/LmUpload/body/UploadPicture.js +2 -10
- package/lib/LmUpload/components/Crop.js +3 -9
- package/lib/LmUpload/components/Preview.js +7 -14
- package/lib/LmUpload/fns/index.js +57 -114
- package/lib/LmUpload/index.js +0 -3
- package/lib/LmUpload/utils.js +10 -24
- package/lib/LmUpload/view/index.js +0 -4
- package/lib/LmUpload/wrapper/Upload.js +1 -6
- package/lib/LmUpload/wrapper/UploadContainer.js +2 -11
- package/lib/LmUpload/wrapper/UploadRoot.js +14 -26
- package/lib/LmUpload/wrapper/UploadWrapper.js +1 -9
- package/lib/LmUpload/wrapper/reducer.js +6 -15
- package/lib/LoadingPage/index.js +1 -7
- package/lib/Locale/ar_EG.js +1 -6
- package/lib/Locale/az_AZ.js +1 -6
- package/lib/Locale/bg_BG.js +0 -6
- package/lib/Locale/bn_BD.js +1 -6
- package/lib/Locale/by_BY.js +1 -6
- package/lib/Locale/ca_ES.js +1 -6
- package/lib/Locale/cs_CZ.js +1 -6
- package/lib/Locale/da_DK.js +0 -6
- package/lib/Locale/de_DE.js +1 -6
- package/lib/Locale/default.js +1 -7
- package/lib/Locale/el_GR.js +0 -6
- package/lib/Locale/en_GB.js +1 -6
- package/lib/Locale/en_US.js +0 -3
- package/lib/Locale/es_ES.js +1 -6
- package/lib/Locale/et_EE.js +1 -6
- package/lib/Locale/fa_IR.js +1 -6
- package/lib/Locale/fi_FI.js +0 -6
- package/lib/Locale/fr_BE.js +0 -6
- package/lib/Locale/fr_CA.js +0 -6
- package/lib/Locale/fr_FR.js +1 -6
- package/lib/Locale/ga_IE.js +1 -6
- package/lib/Locale/gl_ES.js +1 -6
- package/lib/Locale/he_IL.js +1 -6
- package/lib/Locale/hi_IN.js +1 -6
- package/lib/Locale/hr_HR.js +1 -6
- package/lib/Locale/hu_HU.js +0 -6
- package/lib/Locale/id_ID.js +0 -6
- package/lib/Locale/is_IS.js +0 -6
- package/lib/Locale/it_IT.js +0 -6
- package/lib/Locale/ja_JP.js +1 -6
- package/lib/Locale/ka_GE.js +1 -6
- package/lib/Locale/kk_KZ.js +1 -6
- package/lib/Locale/km_KH.js +1 -6
- package/lib/Locale/kmr_IQ.js +0 -6
- package/lib/Locale/kn_IN.js +0 -6
- package/lib/Locale/ko_KR.js +1 -6
- package/lib/Locale/ku_IQ.js +0 -6
- package/lib/Locale/lt_LT.js +1 -6
- package/lib/Locale/lv_LV.js +0 -6
- package/lib/Locale/mk_MK.js +0 -6
- package/lib/Locale/ml_IN.js +1 -6
- package/lib/Locale/mn_MN.js +0 -6
- package/lib/Locale/ms_MY.js +0 -6
- package/lib/Locale/nb_NO.js +1 -6
- package/lib/Locale/ne_NP.js +0 -6
- package/lib/Locale/nl_BE.js +1 -6
- package/lib/Locale/nl_NL.js +1 -6
- package/lib/Locale/pl_PL.js +1 -6
- package/lib/Locale/pt_BR.js +1 -6
- package/lib/Locale/pt_PT.js +0 -6
- package/lib/Locale/ro_RO.js +1 -6
- package/lib/Locale/ru_RU.js +1 -6
- package/lib/Locale/si_LK.js +1 -6
- package/lib/Locale/sk_SK.js +1 -6
- package/lib/Locale/sl_SI.js +0 -6
- package/lib/Locale/sr_RS.js +1 -6
- package/lib/Locale/sv_SE.js +1 -6
- package/lib/Locale/ta_IN.js +0 -6
- package/lib/Locale/th_TH.js +1 -6
- package/lib/Locale/tk_TK.js +1 -6
- package/lib/Locale/tr_TR.js +1 -6
- package/lib/Locale/uk_UA.js +1 -6
- package/lib/Locale/ur_PK.js +1 -6
- package/lib/Locale/vi_VN.js +0 -6
- package/lib/Locale/zh_CN.js +1 -7
- package/lib/Locale/zh_HK.js +1 -6
- package/lib/Locale/zh_TW.js +1 -6
- package/lib/Mentions/index.js +0 -4
- package/lib/Menu/index.js +0 -4
- package/lib/Modal/index.js +10 -36
- package/lib/Modal/locale.js +0 -5
- package/lib/PageHeader/index.js +22 -60
- package/lib/Pagination/index.js +4 -20
- package/lib/Popconfirm/index.js +0 -4
- package/lib/Popover/index.js +5 -23
- package/lib/Progress/index.js +0 -4
- package/lib/QuickMenu/index.js +18 -54
- package/lib/Radio/index.js +10 -24
- package/lib/Rate/index.js +0 -4
- package/lib/Result/index.d.ts +6 -6
- package/lib/Result/index.js +16 -41
- package/lib/Result/noFound.js +0 -4
- package/lib/Result/serverError.js +0 -4
- package/lib/Result/unauthorized.js +0 -4
- package/lib/Row/index.js +0 -2
- package/lib/Segmented/index.js +0 -4
- package/lib/Select/index.d.ts +1 -1
- package/lib/Select/index.js +20 -41
- package/lib/Skeleton/index.js +0 -4
- package/lib/Slider/index.js +0 -4
- package/lib/Space/index.js +0 -4
- package/lib/Spin/index.js +0 -4
- package/lib/Statistic/index.js +0 -4
- package/lib/Steps/index.js +0 -4
- package/lib/Switch/index.js +4 -18
- package/lib/Table/index.js +0 -4
- package/lib/Tabs/TabPane.js +0 -3
- package/lib/Tabs/hooks/useAnimateConfig.js +0 -8
- package/lib/Tabs/hooks/useLegacyItems.js +3 -17
- package/lib/Tabs/index.d.ts +2 -2
- package/lib/Tabs/index.js +15 -43
- package/lib/Tabs/index.old.js +4 -17
- package/lib/Tag/index.js +5 -20
- package/lib/TestTable/LmBox.js +0 -3
- package/lib/TestTable/index.js +0 -3
- package/lib/TimePicker/index.js +0 -4
- package/lib/Timeline/index.js +0 -4
- package/lib/Tooltip/index.d.ts +2 -2
- package/lib/Tooltip/index.js +34 -80
- package/lib/Transfer/index.js +0 -4
- package/lib/Tree/DirectoryTree.d.ts +2 -2
- package/lib/Tree/DirectoryTree.js +29 -74
- package/lib/Tree/Tree.d.ts +4 -4
- package/lib/Tree/Tree.js +14 -35
- package/lib/Tree/TreeIndex.js +0 -3
- package/lib/Tree/index.js +1 -11
- package/lib/Tree/utils/dictUtil.js +4 -24
- package/lib/Tree/utils/dropIndicator.d.ts +1 -0
- package/lib/Tree/utils/dropIndicator.js +5 -15
- package/lib/Tree/utils/iconUtil.js +2 -25
- package/lib/TreeSelect/index.d.ts +1 -1
- package/lib/TreeSelect/index.js +15 -35
- package/lib/Typography/Base/Ellipsis.js +25 -58
- package/lib/Typography/Base/EllipsisTooltip.js +3 -12
- package/lib/Typography/Base/index.d.ts +1 -1
- package/lib/Typography/Base/index.js +104 -200
- package/lib/Typography/Editable.js +21 -45
- package/lib/Typography/Link.js +4 -17
- package/lib/Typography/Paragraph.js +0 -7
- package/lib/Typography/Text.js +1 -16
- package/lib/Typography/Title.d.ts +1 -1
- package/lib/Typography/Title.js +2 -18
- package/lib/Typography/Typography.js +11 -30
- package/lib/Typography/hooks/useMergedConfig.js +0 -5
- package/lib/Typography/hooks/useUpdatedEffect.js +0 -4
- package/lib/Typography/index.d.ts +1 -1
- package/lib/Typography/index.js +0 -9
- package/lib/Upload/index.d.ts +3 -3
- package/lib/Upload/index.js +2 -13
- package/lib/UploadOss/index.js +0 -4
- package/lib/UploadOss/uploadBtn.js +32 -54
- package/lib/UploadOss/uploadImg.js +58 -86
- package/lib/VirtualList/index.js +18 -27
- package/lib/_util/colors.d.ts +2 -2
- package/lib/_util/colors.js +2 -4
- package/lib/_util/domTarget.d.ts +3 -3
- package/lib/_util/domTarget.js +0 -6
- package/lib/_util/getDataOrAriaProps.js +0 -2
- package/lib/_util/getRenderPropValue.d.ts +1 -1
- package/lib/_util/getRenderPropValue.js +0 -5
- package/lib/_util/hooks/useFlexGapSupport.js +3 -11
- package/lib/_util/hooks/useForceUpdate.js +4 -10
- package/lib/_util/motion.d.ts +1 -1
- package/lib/_util/motion.js +0 -12
- package/lib/_util/placements.js +7 -12
- package/lib/_util/reactNode.d.ts +2 -2
- package/lib/_util/reactNode.js +0 -5
- package/lib/_util/responsiveObserve.d.ts +5 -5
- package/lib/_util/responsiveObserve.js +0 -8
- package/lib/_util/statusUtils.d.ts +1 -1
- package/lib/_util/statusUtils.js +0 -9
- package/lib/_util/styleChecker.js +6 -16
- package/lib/_util/throttleByAnimationFrame.js +0 -12
- package/lib/_util/transButton.js +3 -19
- package/lib/_util/type.d.ts +2 -2
- package/lib/_util/type.js +0 -6
- package/lib/_util/warning.d.ts +1 -1
- package/lib/_util/warning.js +4 -10
- package/lib/hooks/index.js +0 -3
- package/lib/hooks/useEvent/index.js +4 -7
- package/lib/hooks/useFullscreen/index.d.ts +3 -3
- package/lib/hooks/useFullscreen/index.js +7 -33
- package/lib/index.js +0 -89
- package/lib/locale-provider/LocaleReceiver.d.ts +1 -1
- package/lib/locale-provider/LocaleReceiver.js +4 -20
- package/lib/locale-provider/ar_EG.js +0 -3
- package/lib/locale-provider/az_AZ.js +0 -3
- package/lib/locale-provider/bg_BG.js +0 -3
- package/lib/locale-provider/bn_BD.js +0 -3
- package/lib/locale-provider/by_BY.js +0 -3
- package/lib/locale-provider/ca_ES.js +0 -3
- package/lib/locale-provider/context.d.ts +1 -1
- package/lib/locale-provider/context.js +0 -2
- package/lib/locale-provider/cs_CZ.js +0 -3
- package/lib/locale-provider/da_DK.js +0 -3
- package/lib/locale-provider/de_DE.js +0 -3
- package/lib/locale-provider/default.js +0 -3
- package/lib/locale-provider/el_GR.js +0 -3
- package/lib/locale-provider/en_GB.js +0 -3
- package/lib/locale-provider/en_US.js +0 -3
- package/lib/locale-provider/es_ES.js +0 -3
- package/lib/locale-provider/et_EE.js +0 -3
- package/lib/locale-provider/fa_IR.js +0 -3
- package/lib/locale-provider/fi_FI.js +0 -3
- package/lib/locale-provider/fr_BE.js +0 -3
- package/lib/locale-provider/fr_CA.js +0 -3
- package/lib/locale-provider/fr_FR.js +0 -3
- package/lib/locale-provider/ga_IE.js +0 -3
- package/lib/locale-provider/gl_ES.js +0 -3
- package/lib/locale-provider/he_IL.js +0 -3
- package/lib/locale-provider/hi_IN.js +0 -3
- package/lib/locale-provider/hr_HR.js +0 -3
- package/lib/locale-provider/hu_HU.js +0 -3
- package/lib/locale-provider/hy_AM.js +0 -3
- package/lib/locale-provider/id_ID.js +0 -3
- package/lib/locale-provider/index.js +2 -21
- package/lib/locale-provider/is_IS.js +0 -3
- package/lib/locale-provider/it_IT.js +0 -3
- package/lib/locale-provider/ja_JP.js +0 -3
- package/lib/locale-provider/ka_GE.js +0 -3
- package/lib/locale-provider/kk_KZ.js +0 -3
- package/lib/locale-provider/km_KH.js +0 -3
- package/lib/locale-provider/kmr_IQ.js +0 -3
- package/lib/locale-provider/kn_IN.js +0 -3
- package/lib/locale-provider/ko_KR.js +0 -3
- package/lib/locale-provider/ku_IQ.js +0 -3
- package/lib/locale-provider/lt_LT.js +0 -3
- package/lib/locale-provider/lv_LV.js +0 -3
- package/lib/locale-provider/mk_MK.js +0 -3
- package/lib/locale-provider/ml_IN.js +0 -3
- package/lib/locale-provider/mn_MN.js +0 -3
- package/lib/locale-provider/ms_MY.js +0 -3
- package/lib/locale-provider/nb_NO.js +0 -3
- package/lib/locale-provider/ne_NP.js +0 -3
- package/lib/locale-provider/nl_BE.js +0 -3
- package/lib/locale-provider/nl_NL.js +0 -3
- package/lib/locale-provider/pl_PL.js +0 -3
- package/lib/locale-provider/pt_BR.js +0 -3
- package/lib/locale-provider/pt_PT.js +0 -3
- package/lib/locale-provider/ro_RO.js +0 -3
- package/lib/locale-provider/ru_RU.js +0 -3
- package/lib/locale-provider/si_LK.js +0 -3
- package/lib/locale-provider/sk_SK.js +0 -3
- package/lib/locale-provider/sl_SI.js +0 -3
- package/lib/locale-provider/sr_RS.js +0 -3
- package/lib/locale-provider/sv_SE.js +0 -3
- package/lib/locale-provider/ta_IN.js +0 -3
- package/lib/locale-provider/th_TH.js +0 -3
- package/lib/locale-provider/tk_TK.js +0 -3
- package/lib/locale-provider/tr_TR.js +0 -3
- package/lib/locale-provider/uk_UA.js +0 -3
- package/lib/locale-provider/ur_PK.js +0 -3
- package/lib/locale-provider/vi_VN.js +0 -3
- package/lib/locale-provider/zh_CN.js +0 -3
- package/lib/locale-provider/zh_HK.js +0 -3
- package/lib/locale-provider/zh_TW.js +0 -3
- package/lib/message/hooks/useMessage.js +8 -27
- package/lib/message/index.d.ts +10 -10
- package/lib/message/index.js +8 -53
- package/lib/notification/hooks/useNotification.js +8 -19
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +31 -80
- package/lib/services/newRequest.js +18 -47
- package/lib/services/utils.js +0 -15
- package/package.json +1 -1
- package/CHANGELOG.md +0 -1237
|
@@ -1,63 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.initLocalization = exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
10
|
var _react = require("react");
|
|
15
|
-
|
|
16
11
|
var _utils = require("../utils");
|
|
17
|
-
|
|
18
12
|
// 初始化查询结构
|
|
19
13
|
var initLocalization = function initLocalization(props) {
|
|
20
14
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
21
|
-
|
|
22
15
|
var localization = props.localization,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
dataSource = props.dataSource,
|
|
17
|
+
searchKey = props.searchKey,
|
|
18
|
+
searchConfig = props.searchConfig,
|
|
19
|
+
customOptions = props.customOptions;
|
|
27
20
|
var globalQuery = localization.globalQuery,
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
filterQuery = localization.filterQuery,
|
|
22
|
+
fuzzyQuery = localization.fuzzyQuery;
|
|
30
23
|
var basicFilter = (localization === null || localization === void 0 ? void 0 : localization.basicFilter) || {};
|
|
31
24
|
var basicQuery = {}; // 存储查询结构
|
|
32
|
-
|
|
33
25
|
var isFuzzy = Array.isArray(searchKey); // 数组时为模糊搜索结构
|
|
34
|
-
|
|
35
26
|
var searchFilter = (localization === null || localization === void 0 ? void 0 : localization.fuzzyFilter) || {};
|
|
36
27
|
var searchQuery = {}; // 模糊查询结构
|
|
37
|
-
|
|
38
28
|
var customFilter = (customOptions === null || customOptions === void 0 ? void 0 : customOptions.find(function (v) {
|
|
39
29
|
var _a;
|
|
40
|
-
|
|
41
30
|
return (v === null || v === void 0 ? void 0 : v.value) === ((_a = localization === null || localization === void 0 ? void 0 : localization.customFilter) === null || _a === void 0 ? void 0 : _a.value);
|
|
42
31
|
})) || {};
|
|
43
32
|
var customQuery = {}; // 自定义筛选存储结构
|
|
44
33
|
// 一级查询
|
|
45
|
-
|
|
46
34
|
if ((_b = (_a = globalQuery === null || globalQuery === void 0 ? void 0 : globalQuery.filters) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.conditions) {
|
|
47
35
|
var globalQueryArr = ((_d = (_c = globalQuery === null || globalQuery === void 0 ? void 0 : globalQuery.filters) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.conditions) || [];
|
|
48
36
|
customQuery = globalQueryArr.reduce(function (pre, cur) {
|
|
49
37
|
var checkedValue = cur.value; // 选中的数据
|
|
50
38
|
// 查找该数据是否展示
|
|
51
|
-
|
|
52
39
|
if ((0, _utils.getIsHas)(checkedValue)) {
|
|
53
40
|
pre[cur.fieldName] = cur;
|
|
54
41
|
}
|
|
55
|
-
|
|
56
42
|
return pre;
|
|
57
43
|
}, {});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
44
|
+
}
|
|
45
|
+
// 模糊查询
|
|
61
46
|
if ((0, _utils.getIsHas)(searchFilter)) {
|
|
62
47
|
searchQuery = (_e = Object.keys(searchFilter)) === null || _e === void 0 ? void 0 : _e.reduce(function (pre, cur) {
|
|
63
48
|
if ((0, _utils.getIsHas)(searchFilter[cur])) {
|
|
@@ -66,35 +51,29 @@ var initLocalization = function initLocalization(props) {
|
|
|
66
51
|
value: [searchFilter[cur]]
|
|
67
52
|
});
|
|
68
53
|
}
|
|
69
|
-
|
|
70
54
|
return pre;
|
|
71
55
|
}, {});
|
|
72
56
|
} else if ((_g = (_f = fuzzyQuery === null || fuzzyQuery === void 0 ? void 0 : fuzzyQuery.filters) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.conditions) {
|
|
73
|
-
var fuzzyQueryArr = ((_j = (_h = fuzzyQuery === null || fuzzyQuery === void 0 ? void 0 : fuzzyQuery.filters) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.conditions) || [];
|
|
74
|
-
|
|
57
|
+
var fuzzyQueryArr = ((_j = (_h = fuzzyQuery === null || fuzzyQuery === void 0 ? void 0 : fuzzyQuery.filters) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.conditions) || [];
|
|
58
|
+
// 初始化基础查询缓存
|
|
75
59
|
searchFilter = fuzzyQueryArr.reduce(function (pre, cur) {
|
|
76
60
|
var checkedValue = cur.value; // 选中的数据
|
|
77
|
-
|
|
78
61
|
if ((0, _utils.getIsHas)(checkedValue)) {
|
|
79
62
|
searchQuery[cur.fieldName] = cur;
|
|
80
63
|
pre[cur.fieldName] = checkedValue[0];
|
|
81
64
|
}
|
|
82
|
-
|
|
83
65
|
return pre;
|
|
84
66
|
}, {});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
67
|
+
}
|
|
68
|
+
// 二级查询
|
|
88
69
|
if ((0, _utils.getIsHas)(basicFilter)) {
|
|
89
70
|
basicQuery = (_k = Object.keys(basicFilter)) === null || _k === void 0 ? void 0 : _k.reduce(function (pre, cur) {
|
|
90
71
|
var item = dataSource.find(function (v) {
|
|
91
72
|
if (cur === v.field) {
|
|
92
73
|
return v.show || typeof v.show !== 'boolean';
|
|
93
74
|
}
|
|
94
|
-
|
|
95
75
|
return false;
|
|
96
76
|
});
|
|
97
|
-
|
|
98
77
|
if (!isFuzzy && cur === searchKey) {
|
|
99
78
|
item = {
|
|
100
79
|
field: searchKey,
|
|
@@ -102,7 +81,6 @@ var initLocalization = function initLocalization(props) {
|
|
|
102
81
|
fieldType: 'string'
|
|
103
82
|
};
|
|
104
83
|
}
|
|
105
|
-
|
|
106
84
|
if ((0, _utils.getIsHas)(basicFilter[cur]) && !!item) {
|
|
107
85
|
pre[cur] = {
|
|
108
86
|
fieldName: cur,
|
|
@@ -111,40 +89,33 @@ var initLocalization = function initLocalization(props) {
|
|
|
111
89
|
operator: (item === null || item === void 0 ? void 0 : item.operator) || 'equal'
|
|
112
90
|
};
|
|
113
91
|
}
|
|
114
|
-
|
|
115
92
|
return pre;
|
|
116
93
|
}, {});
|
|
117
94
|
} else if ((_m = (_l = filterQuery === null || filterQuery === void 0 ? void 0 : filterQuery.filters) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.conditions) {
|
|
118
|
-
var filterQueryArr = ((_p = (_o = filterQuery === null || filterQuery === void 0 ? void 0 : filterQuery.filters) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.conditions) || [];
|
|
119
|
-
|
|
95
|
+
var filterQueryArr = ((_p = (_o = filterQuery === null || filterQuery === void 0 ? void 0 : filterQuery.filters) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.conditions) || [];
|
|
96
|
+
// 初始化基础查询缓存
|
|
120
97
|
basicFilter = filterQueryArr.reduce(function (pre, cur) {
|
|
121
98
|
var checkedValue = cur.value; // 选中的数据
|
|
122
99
|
// 是否搜索框
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
100
|
+
var isSearchInput = cur.fieldName === searchKey;
|
|
101
|
+
// 查找该数据是否展示
|
|
126
102
|
var someData = dataSource.some(function (v) {
|
|
127
103
|
if (cur.fieldName === v.field) {
|
|
128
104
|
return v.show || typeof v.show !== 'boolean';
|
|
129
105
|
}
|
|
130
|
-
|
|
131
106
|
return false;
|
|
132
107
|
});
|
|
133
|
-
|
|
134
108
|
if ((0, _utils.getIsHas)(checkedValue) && someData || isSearchInput) {
|
|
135
|
-
basicQuery[cur.fieldName] = cur;
|
|
136
|
-
|
|
109
|
+
basicQuery[cur.fieldName] = cur;
|
|
110
|
+
// 复选/级联/日期区间
|
|
137
111
|
if (!['checkbox', 'cascader'].includes(cur.type) && checkedValue.length < 2) {
|
|
138
112
|
checkedValue = checkedValue[0];
|
|
139
113
|
}
|
|
140
|
-
|
|
141
114
|
pre[cur.fieldName] = checkedValue;
|
|
142
115
|
}
|
|
143
|
-
|
|
144
116
|
return pre;
|
|
145
117
|
}, {});
|
|
146
118
|
}
|
|
147
|
-
|
|
148
119
|
return {
|
|
149
120
|
searchFilter: searchFilter,
|
|
150
121
|
searchQuery: searchQuery,
|
|
@@ -153,35 +124,31 @@ var initLocalization = function initLocalization(props) {
|
|
|
153
124
|
customFilter: customFilter,
|
|
154
125
|
customQuery: customQuery
|
|
155
126
|
};
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
|
|
127
|
+
};
|
|
128
|
+
// 核心参数集合
|
|
159
129
|
exports.initLocalization = initLocalization;
|
|
160
|
-
|
|
161
130
|
var useCoreOptions = function useCoreOptions(_ref) {
|
|
162
131
|
var state = _ref.state,
|
|
163
|
-
|
|
164
|
-
|
|
132
|
+
dispatch = _ref.dispatch,
|
|
133
|
+
props = _ref.props;
|
|
165
134
|
var onChange = props.onChange,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
135
|
+
dataSource = props.dataSource,
|
|
136
|
+
searchKey = props.searchKey,
|
|
137
|
+
searchConfig = props.searchConfig,
|
|
138
|
+
customOptions = props.customOptions,
|
|
139
|
+
enableAutoString = props.enableAutoString;
|
|
140
|
+
// 获取是否存在过滤值
|
|
172
141
|
var getHasFilter = (0, _react.useCallback)(function () {
|
|
173
142
|
return (0, _utils.getIsHas)(state.basicFilter) || (0, _utils.getIsHas)(state.searchFilter);
|
|
174
|
-
}, [state.basicFilter, state.searchFilter]);
|
|
175
|
-
|
|
143
|
+
}, [state.basicFilter, state.searchFilter]);
|
|
144
|
+
// 转换一级查询结构 object => array
|
|
176
145
|
var tranformGlobalQuery = (0, _react.useCallback)(function (obj) {
|
|
177
146
|
var _a;
|
|
178
|
-
|
|
179
147
|
var nArr = ((_a = Object.keys(obj)) === null || _a === void 0 ? void 0 : _a.reduce(function (pre, cur) {
|
|
180
148
|
var item = dataSource.find(function (v) {
|
|
181
149
|
return cur === v.field;
|
|
182
150
|
});
|
|
183
151
|
var itemValue = obj[cur].value;
|
|
184
|
-
|
|
185
152
|
if ((0, _utils.getIsHas)(itemValue) && !!item) {
|
|
186
153
|
return [].concat((0, _toConsumableArray2.default)(pre), [{
|
|
187
154
|
relation: obj[cur].mode || 'and',
|
|
@@ -189,7 +156,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
189
156
|
fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
|
|
190
157
|
type: item.type,
|
|
191
158
|
value: Array.isArray(itemValue) ? itemValue : [itemValue],
|
|
192
|
-
|
|
193
159
|
/**
|
|
194
160
|
* and 等同于逻辑关系contains: 选中的值包含所有值
|
|
195
161
|
* or 等同于逻辑关系in: 选中的值存在于所有值之中
|
|
@@ -197,21 +163,18 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
197
163
|
operator: 'in'
|
|
198
164
|
}]);
|
|
199
165
|
}
|
|
200
|
-
|
|
201
166
|
return pre;
|
|
202
167
|
}, [])) || [];
|
|
203
168
|
return nArr;
|
|
204
|
-
}, [dataSource]);
|
|
205
|
-
|
|
169
|
+
}, [dataSource]);
|
|
170
|
+
// 转行查询结构
|
|
206
171
|
var tranformQuery = (0, _react.useCallback)(function (_ref2) {
|
|
207
172
|
var customFilter = _ref2.customFilter,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
173
|
+
_ref2$searchQuery = _ref2.searchQuery,
|
|
174
|
+
searchQuery = _ref2$searchQuery === void 0 ? {} : _ref2$searchQuery,
|
|
175
|
+
_ref2$basicQuery = _ref2.basicQuery,
|
|
176
|
+
basicQuery = _ref2$basicQuery === void 0 ? {} : _ref2$basicQuery;
|
|
213
177
|
var _a, _b;
|
|
214
|
-
|
|
215
178
|
var globalQuery = {
|
|
216
179
|
filters: [{
|
|
217
180
|
conditions: tranformGlobalQuery(customFilter === null || customFilter === void 0 ? void 0 : customFilter.data)
|
|
@@ -236,42 +199,38 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
236
199
|
fuzzyQuery: fuzzyQuery,
|
|
237
200
|
filterQuery: filterQuery
|
|
238
201
|
};
|
|
239
|
-
}, [tranformGlobalQuery]);
|
|
240
|
-
|
|
202
|
+
}, [tranformGlobalQuery]);
|
|
203
|
+
// 触发查询 type basic基础筛选 | complex高级筛选
|
|
241
204
|
var onQuery = (0, _react.useCallback)(function () {
|
|
242
205
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
206
|
+
_ref3$complexFilter = _ref3.complexFilter,
|
|
207
|
+
complexFilter = _ref3$complexFilter === void 0 ? {} : _ref3$complexFilter,
|
|
208
|
+
_ref3$type = _ref3.type,
|
|
209
|
+
type = _ref3$type === void 0 ? 'basic' : _ref3$type,
|
|
210
|
+
_ref3$basicFilter = _ref3.basicFilter,
|
|
211
|
+
basicFilter = _ref3$basicFilter === void 0 ? state.basicFilter || {} : _ref3$basicFilter,
|
|
212
|
+
_ref3$basicQuery = _ref3.basicQuery,
|
|
213
|
+
basicQuery = _ref3$basicQuery === void 0 ? state.basicQuery || {} : _ref3$basicQuery,
|
|
214
|
+
_ref3$searchFilter = _ref3.searchFilter,
|
|
215
|
+
searchFilter = _ref3$searchFilter === void 0 ? state.searchFilter || {} : _ref3$searchFilter,
|
|
216
|
+
_ref3$searchQuery = _ref3.searchQuery,
|
|
217
|
+
searchQuery = _ref3$searchQuery === void 0 ? state.searchQuery || {} : _ref3$searchQuery,
|
|
218
|
+
_ref3$customFilter = _ref3.customFilter,
|
|
219
|
+
customFilter = _ref3$customFilter === void 0 ? state.customFilter || {} : _ref3$customFilter;
|
|
258
220
|
var _a;
|
|
259
|
-
|
|
260
221
|
if (type === 'custom') {
|
|
261
222
|
dispatch({
|
|
262
223
|
type: 'changeCustomFilter',
|
|
263
224
|
customFilter: customFilter
|
|
264
225
|
});
|
|
265
|
-
|
|
266
226
|
var _tranformQuery = tranformQuery({
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
227
|
+
customFilter: customFilter,
|
|
228
|
+
searchQuery: searchQuery,
|
|
229
|
+
basicQuery: basicQuery
|
|
230
|
+
}),
|
|
231
|
+
globalQuery = _tranformQuery.globalQuery,
|
|
232
|
+
fuzzyQuery = _tranformQuery.fuzzyQuery,
|
|
233
|
+
filterQuery = _tranformQuery.filterQuery;
|
|
275
234
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
276
235
|
fuzzyFilter: searchFilter,
|
|
277
236
|
fuzzyQuery: fuzzyQuery,
|
|
@@ -281,7 +240,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
281
240
|
type: 'custom'
|
|
282
241
|
});
|
|
283
242
|
}
|
|
284
|
-
|
|
285
243
|
if (type === 'search') {
|
|
286
244
|
dispatch({
|
|
287
245
|
type: 'changeSearchFilter',
|
|
@@ -296,16 +254,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
296
254
|
complexFilter: {}
|
|
297
255
|
}); // 基础筛选清空高级筛选
|
|
298
256
|
// 抛出给外部查询
|
|
299
|
-
|
|
300
257
|
var _tranformQuery2 = tranformQuery({
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
258
|
+
customFilter: customFilter,
|
|
259
|
+
searchQuery: searchQuery,
|
|
260
|
+
basicQuery: basicQuery
|
|
261
|
+
}),
|
|
262
|
+
_globalQuery = _tranformQuery2.globalQuery,
|
|
263
|
+
_fuzzyQuery = _tranformQuery2.fuzzyQuery,
|
|
264
|
+
_filterQuery = _tranformQuery2.filterQuery;
|
|
309
265
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
310
266
|
fuzzyFilter: searchFilter,
|
|
311
267
|
basicFilter: basicFilter,
|
|
@@ -315,7 +271,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
315
271
|
type: 'search'
|
|
316
272
|
});
|
|
317
273
|
}
|
|
318
|
-
|
|
319
274
|
if (type === 'basic') {
|
|
320
275
|
dispatch({
|
|
321
276
|
type: 'changeBasicFilter',
|
|
@@ -330,16 +285,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
330
285
|
complexFilter: {}
|
|
331
286
|
}); // 基础筛选清空高级筛选
|
|
332
287
|
// 抛出给外部查询
|
|
333
|
-
|
|
334
288
|
var _tranformQuery3 = tranformQuery({
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
289
|
+
customFilter: customFilter,
|
|
290
|
+
searchQuery: searchQuery,
|
|
291
|
+
basicQuery: basicQuery
|
|
292
|
+
}),
|
|
293
|
+
_globalQuery2 = _tranformQuery3.globalQuery,
|
|
294
|
+
_fuzzyQuery2 = _tranformQuery3.fuzzyQuery,
|
|
295
|
+
_filterQuery2 = _tranformQuery3.filterQuery;
|
|
343
296
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
344
297
|
fuzzyFilter: searchFilter,
|
|
345
298
|
basicFilter: basicFilter,
|
|
@@ -349,7 +302,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
349
302
|
type: 'basic'
|
|
350
303
|
});
|
|
351
304
|
}
|
|
352
|
-
|
|
353
305
|
if (type === 'complex') {
|
|
354
306
|
// eslint-disable-next-line no-shadow
|
|
355
307
|
var _basicQuery = (_a = Object.keys(complexFilter)) === null || _a === void 0 ? void 0 : _a.reduce(function (pre, cur) {
|
|
@@ -357,7 +309,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
357
309
|
return cur === v.field;
|
|
358
310
|
});
|
|
359
311
|
var itemValue = complexFilter[cur].value;
|
|
360
|
-
|
|
361
312
|
if ((0, _utils.getIsHas)(itemValue) && !!item) {
|
|
362
313
|
// eslint-disable-next-line no-param-reassign
|
|
363
314
|
pre[cur] = {
|
|
@@ -369,10 +320,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
369
320
|
operator: 'in'
|
|
370
321
|
};
|
|
371
322
|
}
|
|
372
|
-
|
|
373
323
|
return pre;
|
|
374
324
|
}, {});
|
|
375
|
-
|
|
376
325
|
dispatch({
|
|
377
326
|
type: 'changeSearchFilter',
|
|
378
327
|
searchFilter: {}
|
|
@@ -400,14 +349,12 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
400
349
|
type: 'changeBasicQuery',
|
|
401
350
|
basicQuery: _basicQuery
|
|
402
351
|
});
|
|
403
|
-
|
|
404
352
|
var _tranformQuery4 = tranformQuery({
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
353
|
+
customFilter: customFilter,
|
|
354
|
+
basicQuery: _basicQuery
|
|
355
|
+
}),
|
|
356
|
+
_globalQuery3 = _tranformQuery4.globalQuery,
|
|
357
|
+
_filterQuery3 = _tranformQuery4.filterQuery;
|
|
411
358
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
412
359
|
complexFilter: complexFilter,
|
|
413
360
|
globalQuery: _globalQuery3,
|
|
@@ -415,21 +362,18 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
415
362
|
type: type
|
|
416
363
|
});
|
|
417
364
|
}
|
|
418
|
-
|
|
419
365
|
if (type === 'clear') {
|
|
420
366
|
dispatch({
|
|
421
367
|
type: 'reset'
|
|
422
368
|
});
|
|
423
|
-
|
|
424
369
|
var _tranformQuery5 = tranformQuery({
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
370
|
+
customFilter: customFilter,
|
|
371
|
+
searchQuery: searchQuery,
|
|
372
|
+
basicQuery: basicQuery
|
|
373
|
+
}),
|
|
374
|
+
_globalQuery4 = _tranformQuery5.globalQuery,
|
|
375
|
+
_fuzzyQuery3 = _tranformQuery5.fuzzyQuery,
|
|
376
|
+
_filterQuery4 = _tranformQuery5.filterQuery;
|
|
433
377
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
434
378
|
fuzzyFilter: searchFilter,
|
|
435
379
|
basicFilter: basicFilter,
|
|
@@ -439,11 +383,10 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
439
383
|
type: 'clear'
|
|
440
384
|
});
|
|
441
385
|
}
|
|
442
|
-
}, [tranformQuery, state]);
|
|
443
|
-
|
|
386
|
+
}, [tranformQuery, state]);
|
|
387
|
+
// 清除事件
|
|
444
388
|
var onClearChange = (0, _react.useCallback)(function () {
|
|
445
389
|
var _a;
|
|
446
|
-
|
|
447
390
|
var params = {
|
|
448
391
|
searchFilter: {},
|
|
449
392
|
searchQuery: {},
|
|
@@ -454,20 +397,18 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
454
397
|
};
|
|
455
398
|
(_a = props.onClearChange) === null || _a === void 0 ? void 0 : _a.call(props, params);
|
|
456
399
|
onQuery(params);
|
|
457
|
-
}, [onQuery]);
|
|
458
|
-
|
|
400
|
+
}, [onQuery]);
|
|
401
|
+
// 根据字段查找过滤的数据, 不存在时返回默认值
|
|
459
402
|
var getFilterValue = (0, _react.useCallback)(function (_ref4) {
|
|
460
403
|
var field = _ref4.field,
|
|
461
|
-
|
|
462
|
-
|
|
404
|
+
type = _ref4.type;
|
|
463
405
|
if ((0, _utils.getIsHas)(state.basicFilter[field])) {
|
|
464
406
|
return state.basicFilter[field];
|
|
465
407
|
}
|
|
466
|
-
|
|
467
408
|
var defaultValue = (0, _utils.getValueForType)(type);
|
|
468
409
|
return state.basicFilter[field] || defaultValue;
|
|
469
|
-
}, [state.basicFilter]);
|
|
470
|
-
|
|
410
|
+
}, [state.basicFilter]);
|
|
411
|
+
// 获取查询结构
|
|
471
412
|
var getFilterQuery = (0, _react.useCallback)(function () {
|
|
472
413
|
var originData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dataSource;
|
|
473
414
|
var basicFilter = (0, _utils.getFilterShow)(state.basicFilter, originData);
|
|
@@ -480,16 +421,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
480
421
|
type: 'changeBasicQuery',
|
|
481
422
|
basicQuery: basicQuery
|
|
482
423
|
});
|
|
483
|
-
|
|
484
424
|
var _tranformQuery6 = tranformQuery({
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
425
|
+
customFilter: state.customFilter,
|
|
426
|
+
searchQuery: state.searchQuery,
|
|
427
|
+
basicQuery: basicQuery
|
|
428
|
+
}),
|
|
429
|
+
globalQuery = _tranformQuery6.globalQuery,
|
|
430
|
+
fuzzyQuery = _tranformQuery6.fuzzyQuery,
|
|
431
|
+
filterQuery = _tranformQuery6.filterQuery;
|
|
493
432
|
return {
|
|
494
433
|
fuzzyFilter: state.searchFilter,
|
|
495
434
|
basicFilter: basicFilter,
|
|
@@ -503,10 +442,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
503
442
|
* 设置筛选的值 itemValue => String || Array => ['', '', ...]
|
|
504
443
|
* 后端仅接受数组包字符串形式, 不接受数值及布尔值
|
|
505
444
|
*/
|
|
506
|
-
|
|
507
445
|
var setFilterValue = (0, _react.useCallback)(function (itemValue, item) {
|
|
508
446
|
var field = item.field;
|
|
509
|
-
|
|
510
447
|
if (field) {
|
|
511
448
|
// 将结果转换为字符串(级联数据需要递归)
|
|
512
449
|
var transformString = function transformString(val) {
|
|
@@ -514,53 +451,49 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
514
451
|
return transformString(v);
|
|
515
452
|
}) : String(val);
|
|
516
453
|
};
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
454
|
+
var stringValue = enableAutoString ? transformString(itemValue) : itemValue;
|
|
455
|
+
// 基础查询数据(受控数据)
|
|
456
|
+
var basicFilter = Object.assign(Object.assign({}, state.basicFilter), (0, _defineProperty2.default)({}, field, stringValue));
|
|
457
|
+
// 外部查询数据结构
|
|
522
458
|
var basicQuery = Object.assign(Object.assign({}, state.basicQuery), (0, _defineProperty2.default)({}, field, {
|
|
523
459
|
fieldName: field,
|
|
524
460
|
fieldType: item.valueType || 'string',
|
|
525
461
|
type: item.type,
|
|
526
462
|
value: Array.isArray(itemValue) ? stringValue : [stringValue],
|
|
527
463
|
operator: item.operator || 'equal'
|
|
528
|
-
}));
|
|
529
|
-
|
|
464
|
+
}));
|
|
465
|
+
// 数据清除时不返回结构体
|
|
530
466
|
if (!(0, _utils.getIsHas)(itemValue)) {
|
|
531
467
|
delete basicFilter[field];
|
|
532
468
|
delete basicQuery[field];
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
|
|
469
|
+
}
|
|
470
|
+
// 触发外部事件
|
|
536
471
|
onQuery === null || onQuery === void 0 ? void 0 : onQuery({
|
|
537
472
|
basicFilter: basicFilter,
|
|
538
473
|
basicQuery: basicQuery,
|
|
539
474
|
type: 'basic'
|
|
540
475
|
});
|
|
541
476
|
}
|
|
542
|
-
}, [state]);
|
|
543
|
-
|
|
477
|
+
}, [state]);
|
|
478
|
+
// 单个设置过滤字段值, 会触发onChange事件, 多个字段时使用setLocalization
|
|
544
479
|
var setFilterFieldValue = (0, _react.useCallback)(function (field, value) {
|
|
545
480
|
var item = dataSource.find(function (v) {
|
|
546
481
|
return v.fidld === field;
|
|
547
482
|
}) || {};
|
|
548
483
|
setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue(value, item);
|
|
549
|
-
}, [dataSource]);
|
|
550
|
-
|
|
484
|
+
}, [dataSource]);
|
|
485
|
+
// 读取缓存
|
|
551
486
|
var setLocalization = (0, _react.useCallback)(function () {
|
|
552
487
|
var localization = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.localization;
|
|
553
|
-
|
|
554
488
|
var _initLocalization = initLocalization(Object.assign(Object.assign({}, props), {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
489
|
+
localization: localization
|
|
490
|
+
})),
|
|
491
|
+
searchFilter = _initLocalization.searchFilter,
|
|
492
|
+
searchQuery = _initLocalization.searchQuery,
|
|
493
|
+
basicFilter = _initLocalization.basicFilter,
|
|
494
|
+
basicQuery = _initLocalization.basicQuery,
|
|
495
|
+
customFilter = _initLocalization.customFilter,
|
|
496
|
+
customQuery = _initLocalization.customQuery;
|
|
564
497
|
dispatch({
|
|
565
498
|
type: 'changeSearchFilter',
|
|
566
499
|
searchFilter: searchFilter
|
|
@@ -585,8 +518,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
585
518
|
type: 'changeCustomQuery',
|
|
586
519
|
customQuery: customQuery
|
|
587
520
|
});
|
|
588
|
-
}, [props]);
|
|
589
|
-
|
|
521
|
+
}, [props]);
|
|
522
|
+
// 模糊查询结构
|
|
590
523
|
var setSearchFilter = (0, _react.useCallback)(function (itemValue) {
|
|
591
524
|
var searchFilter = searchKey === null || searchKey === void 0 ? void 0 : searchKey.reduce(function (pre, cur) {
|
|
592
525
|
pre[cur] = itemValue;
|
|
@@ -598,20 +531,19 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
598
531
|
value: [itemValue]
|
|
599
532
|
});
|
|
600
533
|
return pre;
|
|
601
|
-
}, Object.assign({}, state.searchQuery));
|
|
602
|
-
|
|
534
|
+
}, Object.assign({}, state.searchQuery));
|
|
535
|
+
// 数据清除时不返回结构体
|
|
603
536
|
if (!(0, _utils.getIsHas)(itemValue)) {
|
|
604
537
|
searchFilter = {};
|
|
605
538
|
searchQuery = {};
|
|
606
539
|
}
|
|
607
|
-
|
|
608
540
|
onQuery({
|
|
609
541
|
searchFilter: searchFilter,
|
|
610
542
|
searchQuery: searchQuery,
|
|
611
543
|
type: 'search'
|
|
612
544
|
});
|
|
613
|
-
}, [searchKey, state]);
|
|
614
|
-
|
|
545
|
+
}, [searchKey, state]);
|
|
546
|
+
// 自定义筛选查询
|
|
615
547
|
var setCustomFilter = (0, _react.useCallback)(function (val) {
|
|
616
548
|
var customFilter = customOptions.find(function (v) {
|
|
617
549
|
return v.value === val;
|
|
@@ -620,14 +552,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
620
552
|
customFilter: customFilter,
|
|
621
553
|
type: 'custom'
|
|
622
554
|
});
|
|
623
|
-
}, [customOptions, state.basicFilter]);
|
|
624
|
-
|
|
555
|
+
}, [customOptions, state.basicFilter]);
|
|
556
|
+
// 组件内部使用
|
|
625
557
|
var CoreMethods = {
|
|
626
558
|
onQuery: onQuery,
|
|
627
559
|
setCustomFilter: setCustomFilter,
|
|
628
560
|
setSearchFilter: setSearchFilter
|
|
629
|
-
};
|
|
630
|
-
|
|
561
|
+
};
|
|
562
|
+
// 参与Ref转发
|
|
631
563
|
var RefMethods = {
|
|
632
564
|
getState: function getState() {
|
|
633
565
|
return state;
|
|
@@ -648,6 +580,5 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
648
580
|
RefMethods: RefMethods
|
|
649
581
|
};
|
|
650
582
|
};
|
|
651
|
-
|
|
652
583
|
var _default = useCoreOptions;
|
|
653
584
|
exports.default = _default;
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _useDelayedFn = require("./useDelayedFn");
|
|
8
|
-
|
|
9
7
|
Object.keys(_useDelayedFn).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _useDelayedFn[key]) return;
|