linkmore-design 1.1.28-alpha.8 → 1.1.29
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/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/Avatar/demos/basic.d.ts +1 -0
- 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/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/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/FormItem/index.d.ts +1 -0
- 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/FullScreen/demos/basic.d.ts +1 -0
- package/dist/FullScreen/demos/useInModal.d.ts +1 -0
- package/dist/Grid/demos/basic.d.ts +1 -0
- 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/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/common/index.d.ts +10 -0
- package/dist/LmTable/components/CalcExpression.d.ts +9 -0
- package/dist/LmTable/components/Container/Container.d.ts +20 -0
- package/dist/LmTable/components/Container/index.d.ts +2 -0
- package/dist/LmTable/components/DndContainer.d.ts +37 -5
- package/dist/LmTable/components/HeaderCol.d.ts +1 -0
- package/dist/LmTable/components/Item/Item.d.ts +37 -0
- package/dist/LmTable/components/Item/components/Action/Action.d.ts +10 -0
- package/dist/LmTable/components/Item/components/Action/index.d.ts +2 -0
- package/dist/LmTable/components/Item/components/Handle/index.d.ts +4 -0
- package/dist/LmTable/components/Item/components/Remove/index.d.ts +3 -0
- package/dist/LmTable/components/Item/components/index.d.ts +3 -0
- package/dist/LmTable/components/Item/index.d.ts +2 -0
- package/dist/LmTable/components/{sortableBoxCol.d.ts → SortableBox.d.ts} +0 -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/LmTable/demos/{excelGroup.d.ts → draggable.d.ts} +0 -0
- package/dist/LmTable/demos/resize.d.ts +2 -0
- package/dist/LmTable/expression.d.ts +2 -1
- package/dist/LmTable/hooks/useDndItems.d.ts +13 -0
- package/dist/LmTable/hooks/useGroupDataSource.d.ts +1 -2
- package/dist/LmTable/hooks/useResizeObserver.d.ts +13 -0
- package/dist/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
- package/dist/LmTable/testDemos/group.d.ts +2 -0
- package/dist/LmTable/util.d.ts +1 -1
- 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/Popover/index.d.ts +1 -1
- 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/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/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/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 +1 -1
- package/dist/Transfer/demos/basic.d.ts +1 -0
- 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/Typography/demos/basic.d.ts +1 -0
- package/dist/hooks/useFullscreen/demos/basic.d.ts +1 -0
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +1 -0
- package/dist/index.umd.css +662 -1236
- package/dist/index.umd.js +181410 -251887
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +24 -52
- package/dist/locale-provider/index.d.ts +2 -2
- package/dist/message/demos/basic.d.ts +1 -0
- package/dist/message/demos/other.d.ts +1 -0
- 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/variables.css +18 -3
- package/es/Affix/index.js +37 -90
- 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.js +0 -24
- package/es/Approval/util.js +4 -24
- package/es/AutoComplete/index.js +9 -20
- 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.js +1 -1
- package/es/ConfigProvider/SizeContext.js +1 -1
- package/es/ConfigProvider/context.js +4 -10
- package/es/ConfigProvider/cssVariables.js +16 -25
- 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 +18 -31
- 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.js +12 -25
- 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/Dropdown/style/index.css +1 -1
- package/es/Dropdown/style/variables.css +1 -1
- 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.js +27 -49
- package/es/Form/FormItem/ItemHolder.js +26 -42
- package/es/Form/FormItem/index.d.ts +1 -0
- package/es/Form/FormItem/index.js +85 -123
- package/es/Form/FormItemInput.js +14 -16
- 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.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.js +1 -4
- package/es/Form/hooks/useFrameState.js +3 -8
- package/es/Form/hooks/useItemRef.js +1 -6
- package/es/Form/index.js +0 -2
- package/es/Form/style/index.css +4 -0
- package/es/Form/style/variables.css +4 -0
- package/es/Form/util.js +2 -6
- package/es/FullScreen/index.js +3 -6
- 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.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.js +148 -360
- package/es/LmEditTable/components/DraggableContainer.js +6 -12
- package/es/LmEditTable/components/QuickOpetate.js +8 -13
- 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 +442 -537
- 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.d.ts +10 -0
- package/es/LmTable/common/index.js +32 -0
- package/es/LmTable/components/CalcExpression.d.ts +9 -0
- package/es/LmTable/components/CalcExpression.js +131 -0
- package/es/LmTable/components/Container/Container.css +94 -0
- package/es/LmTable/components/Container/Container.d.ts +20 -0
- package/es/LmTable/components/Container/Container.js +48 -0
- package/es/LmTable/components/Container/index.d.ts +2 -0
- package/es/LmTable/components/Container/index.js +1 -0
- package/es/LmTable/components/DndContainer.d.ts +37 -5
- package/es/LmTable/components/DndContainer.js +630 -30
- package/es/LmTable/components/HeaderCol.js +52 -0
- package/es/LmTable/components/Item/Item.css +113 -0
- package/es/LmTable/components/Item/Item.d.ts +37 -0
- package/es/LmTable/components/Item/Item.js +84 -0
- package/es/LmTable/components/Item/components/Action/Action.css +41 -0
- package/es/LmTable/components/Item/components/Action/Action.d.ts +10 -0
- package/es/LmTable/components/Item/components/Action/Action.js +31 -0
- package/es/LmTable/components/Item/components/Action/index.d.ts +2 -0
- package/es/LmTable/components/Item/components/Action/index.js +1 -0
- package/es/LmTable/components/Item/components/Handle/index.d.ts +4 -0
- package/es/LmTable/components/Item/components/Handle/index.js +15 -0
- package/es/LmTable/components/Item/components/Remove/index.d.ts +3 -0
- package/es/LmTable/components/Item/components/Remove/index.js +16 -0
- package/es/LmTable/components/Item/components/index.d.ts +3 -0
- package/es/LmTable/components/Item/components/index.js +3 -0
- package/es/LmTable/components/Item/index.d.ts +2 -0
- package/es/LmTable/components/Item/index.js +2 -0
- package/es/LmTable/components/{sortableBoxCol.js → 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.d.ts +2 -1
- package/es/LmTable/expression.js +75 -19
- package/es/LmTable/hooks/useDndItems.d.ts +13 -0
- package/es/LmTable/hooks/useDndItems.js +193 -0
- package/es/LmTable/hooks/useGroupDataSource.js +2 -29
- package/es/LmTable/hooks/useResizeObserver.d.ts +13 -0
- package/es/LmTable/hooks/useResizeObserver.js +44 -0
- package/es/LmTable/hooks/useRowSelectControllableValue.js +6 -20
- package/es/LmTable/index.js +0 -3
- package/es/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
- package/es/LmTable/multipleContainersKeyboardCoordinates.js +92 -0
- package/es/LmTable/resetConfig.js +8 -8
- package/es/LmTable/style/index.css +13 -2
- package/es/LmTable/style/variables.css +13 -2
- package/es/LmTable/testDemos/group.js +115 -0
- package/es/LmTable/util.js +46 -93
- package/es/LmTable/virTual/VirtualRow.js +25 -42
- package/es/LmTable/virTual/VirtualTable.js +31 -16
- 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 +8 -22
- package/es/PageHeader/index.js +22 -44
- package/es/Pagination/index.js +4 -13
- package/es/Popover/index.d.ts +1 -1
- 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.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.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.js +15 -27
- package/es/Tabs/index.old.js +4 -11
- package/es/Tag/index.js +5 -13
- package/es/Tooltip/index.d.ts +1 -1
- package/es/Tooltip/index.js +34 -66
- package/es/Tree/DirectoryTree.js +31 -61
- 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.js +15 -24
- package/es/Typography/Base/Ellipsis.js +25 -52
- package/es/Typography/Base/EllipsisTooltip.js +3 -8
- 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.js +2 -10
- package/es/Typography/Typography.js +11 -23
- package/es/Typography/hooks/useUpdatedEffect.js +0 -1
- 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.js +2 -2
- package/es/_util/domTarget.js +0 -3
- package/es/_util/getDataOrAriaProps.js +0 -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.js +2 -11
- package/es/_util/placements.js +7 -8
- package/es/_util/responsiveObserve.js +0 -5
- 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.js +0 -2
- package/es/_util/warning.js +4 -6
- package/es/hooks/useEvent/index.js +6 -7
- package/es/hooks/useFullscreen/index.js +7 -29
- package/es/locale-provider/LocaleReceiver.js +4 -12
- package/es/locale-provider/index.d.ts +2 -2
- package/es/locale-provider/index.js +2 -11
- package/es/message/hooks/useMessage.js +8 -17
- package/es/message/index.js +8 -36
- package/es/notification/hooks/useNotification.js +8 -12
- package/es/notification/index.js +31 -67
- package/es/services/newRequest.js +18 -47
- package/es/services/utils.js +0 -15
- package/es/styles/variables.css +18 -3
- package/lib/Affix/index.js +37 -104
- 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.js +0 -24
- package/lib/Approval/util.js +4 -30
- package/lib/AutoComplete/index.js +10 -34
- package/lib/Avatar/index.js +0 -4
- 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.js +1 -6
- package/lib/ConfigProvider/SizeContext.js +1 -6
- package/lib/ConfigProvider/context.js +4 -13
- package/lib/ConfigProvider/cssVariables.js +17 -34
- 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 +18 -44
- 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.js +12 -33
- 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/Dropdown/style/index.css +1 -1
- package/lib/Dropdown/style/variables.css +1 -1
- 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.js +27 -62
- package/lib/Form/FormItem/ItemHolder.js +26 -60
- package/lib/Form/FormItem/index.d.ts +1 -0
- package/lib/Form/FormItem/index.js +85 -142
- package/lib/Form/FormItemInput.js +14 -23
- 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.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.js +1 -8
- package/lib/Form/hooks/useFrameState.js +3 -16
- package/lib/Form/hooks/useItemRef.js +1 -13
- package/lib/Form/index.js +0 -13
- package/lib/Form/style/index.css +4 -0
- package/lib/Form/style/variables.css +4 -0
- 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.js +21 -48
- package/lib/Grid/hooks/useBreakpoint.js +0 -8
- package/lib/Grid/index.js +0 -7
- 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.js +148 -387
- package/lib/LmEditTable/components/DraggableContainer.js +6 -17
- package/lib/LmEditTable/components/QuickOpetate.js +8 -19
- 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 +442 -537
- 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.d.ts +10 -0
- package/lib/LmTable/common/index.js +40 -0
- package/lib/LmTable/components/CalcExpression.d.ts +9 -0
- package/lib/LmTable/components/CalcExpression.js +140 -0
- package/lib/LmTable/components/Container/Container.css +94 -0
- package/lib/LmTable/components/Container/Container.d.ts +20 -0
- package/lib/LmTable/components/Container/Container.js +56 -0
- package/lib/LmTable/components/Container/index.d.ts +2 -0
- package/lib/LmTable/components/Container/index.js +12 -0
- package/lib/LmTable/components/DndContainer.d.ts +37 -5
- package/lib/LmTable/components/DndContainer.js +628 -36
- package/lib/LmTable/components/HeaderCol.js +52 -0
- package/lib/LmTable/components/Item/Item.css +113 -0
- package/lib/LmTable/components/Item/Item.d.ts +37 -0
- package/lib/LmTable/components/Item/Item.js +92 -0
- package/lib/LmTable/components/Item/components/Action/Action.css +41 -0
- package/lib/LmTable/components/Item/components/Action/Action.d.ts +10 -0
- package/lib/LmTable/components/Item/components/Action/Action.js +40 -0
- package/lib/LmTable/components/Item/components/Action/index.d.ts +2 -0
- package/lib/LmTable/components/Item/components/Action/index.js +12 -0
- package/lib/LmTable/components/Item/components/Handle/index.d.ts +4 -0
- package/lib/LmTable/components/Item/components/Handle/index.js +23 -0
- package/lib/LmTable/components/Item/components/Remove/index.d.ts +3 -0
- package/lib/LmTable/components/Item/components/Remove/index.js +23 -0
- package/lib/LmTable/components/Item/components/index.d.ts +3 -0
- package/lib/LmTable/components/Item/components/index.js +27 -0
- package/lib/LmTable/components/Item/index.d.ts +2 -0
- package/lib/LmTable/components/Item/index.js +31 -0
- package/lib/LmTable/components/{sortableBoxCol.js → 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.d.ts +2 -1
- package/lib/LmTable/expression.js +78 -23
- package/lib/LmTable/hooks/useDndItems.d.ts +13 -0
- package/lib/LmTable/hooks/useDndItems.js +201 -0
- package/lib/LmTable/hooks/useGroupDataSource.js +2 -29
- package/lib/LmTable/hooks/useResizeObserver.d.ts +13 -0
- package/lib/LmTable/hooks/useResizeObserver.js +51 -0
- package/lib/LmTable/hooks/useRowSelectControllableValue.js +6 -20
- package/lib/LmTable/index.js +0 -3
- package/lib/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
- package/lib/LmTable/multipleContainersKeyboardCoordinates.js +99 -0
- package/lib/LmTable/resetConfig.js +8 -8
- package/lib/LmTable/style/index.css +13 -2
- package/lib/LmTable/style/variables.css +13 -2
- package/lib/LmTable/testDemos/group.js +115 -0
- package/lib/LmTable/util.js +46 -93
- package/lib/LmTable/virTual/VirtualRow.js +25 -46
- package/lib/LmTable/virTual/VirtualTable.js +31 -24
- 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 +8 -33
- 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.d.ts +1 -1
- 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.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.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.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 +1 -1
- package/lib/Tooltip/index.js +34 -80
- package/lib/Transfer/index.js +0 -4
- package/lib/Tree/DirectoryTree.js +29 -74
- 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.js +15 -35
- package/lib/Typography/Base/Ellipsis.js +25 -58
- package/lib/Typography/Base/EllipsisTooltip.js +3 -12
- 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.js +2 -18
- package/lib/Typography/Typography.js +11 -30
- package/lib/Typography/hooks/useMergedConfig.js +0 -5
- package/lib/Typography/hooks/useUpdatedEffect.js +1 -6
- package/lib/Typography/index.js +0 -9
- 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.js +2 -4
- package/lib/_util/domTarget.js +0 -6
- package/lib/_util/getDataOrAriaProps.js +0 -2
- 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.js +0 -12
- package/lib/_util/placements.js +7 -12
- package/lib/_util/reactNode.js +0 -5
- package/lib/_util/responsiveObserve.js +0 -8
- 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.js +0 -6
- 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.js +7 -33
- package/lib/index.js +0 -89
- 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.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.d.ts +2 -2
- 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.js +8 -53
- package/lib/notification/hooks/useNotification.js +8 -19
- package/lib/notification/index.js +31 -80
- package/lib/services/newRequest.js +18 -47
- package/lib/services/utils.js +0 -15
- package/lib/styles/variables.css +18 -3
- package/package.json +11 -11
- package/CHANGELOG.md +0 -1237
- package/dist/LmTable/components/sortableItemCol.d.ts +0 -1
- package/es/LmTable/components/sortableItemCol.js +0 -56
- package/lib/LmTable/components/sortableItemCol.js +0 -56
|
@@ -1,50 +1,41 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
|
-
import { getIsHas, getValueForType, getFilterShow } from '../utils';
|
|
5
|
-
|
|
4
|
+
import { getIsHas, getValueForType, getFilterShow } from '../utils';
|
|
5
|
+
// 初始化查询结构
|
|
6
6
|
export var initLocalization = function initLocalization(props) {
|
|
7
7
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
8
|
-
|
|
9
8
|
var localization = props.localization,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
dataSource = props.dataSource,
|
|
10
|
+
searchKey = props.searchKey,
|
|
11
|
+
searchConfig = props.searchConfig,
|
|
12
|
+
customOptions = props.customOptions;
|
|
14
13
|
var globalQuery = localization.globalQuery,
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
filterQuery = localization.filterQuery,
|
|
15
|
+
fuzzyQuery = localization.fuzzyQuery;
|
|
17
16
|
var basicFilter = (localization === null || localization === void 0 ? void 0 : localization.basicFilter) || {};
|
|
18
17
|
var basicQuery = {}; // 存储查询结构
|
|
19
|
-
|
|
20
18
|
var isFuzzy = Array.isArray(searchKey); // 数组时为模糊搜索结构
|
|
21
|
-
|
|
22
19
|
var searchFilter = (localization === null || localization === void 0 ? void 0 : localization.fuzzyFilter) || {};
|
|
23
20
|
var searchQuery = {}; // 模糊查询结构
|
|
24
|
-
|
|
25
21
|
var customFilter = (customOptions === null || customOptions === void 0 ? void 0 : customOptions.find(function (v) {
|
|
26
22
|
var _a;
|
|
27
|
-
|
|
28
23
|
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);
|
|
29
24
|
})) || {};
|
|
30
25
|
var customQuery = {}; // 自定义筛选存储结构
|
|
31
26
|
// 一级查询
|
|
32
|
-
|
|
33
27
|
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) {
|
|
34
28
|
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) || [];
|
|
35
29
|
customQuery = globalQueryArr.reduce(function (pre, cur) {
|
|
36
30
|
var checkedValue = cur.value; // 选中的数据
|
|
37
31
|
// 查找该数据是否展示
|
|
38
|
-
|
|
39
32
|
if (getIsHas(checkedValue)) {
|
|
40
33
|
pre[cur.fieldName] = cur;
|
|
41
34
|
}
|
|
42
|
-
|
|
43
35
|
return pre;
|
|
44
36
|
}, {});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
}
|
|
38
|
+
// 模糊查询
|
|
48
39
|
if (getIsHas(searchFilter)) {
|
|
49
40
|
searchQuery = (_e = Object.keys(searchFilter)) === null || _e === void 0 ? void 0 : _e.reduce(function (pre, cur) {
|
|
50
41
|
if (getIsHas(searchFilter[cur])) {
|
|
@@ -53,35 +44,29 @@ export var initLocalization = function initLocalization(props) {
|
|
|
53
44
|
value: [searchFilter[cur]]
|
|
54
45
|
});
|
|
55
46
|
}
|
|
56
|
-
|
|
57
47
|
return pre;
|
|
58
48
|
}, {});
|
|
59
49
|
} 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) {
|
|
60
|
-
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) || [];
|
|
61
|
-
|
|
50
|
+
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) || [];
|
|
51
|
+
// 初始化基础查询缓存
|
|
62
52
|
searchFilter = fuzzyQueryArr.reduce(function (pre, cur) {
|
|
63
53
|
var checkedValue = cur.value; // 选中的数据
|
|
64
|
-
|
|
65
54
|
if (getIsHas(checkedValue)) {
|
|
66
55
|
searchQuery[cur.fieldName] = cur;
|
|
67
56
|
pre[cur.fieldName] = checkedValue[0];
|
|
68
57
|
}
|
|
69
|
-
|
|
70
58
|
return pre;
|
|
71
59
|
}, {});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
}
|
|
61
|
+
// 二级查询
|
|
75
62
|
if (getIsHas(basicFilter)) {
|
|
76
63
|
basicQuery = (_k = Object.keys(basicFilter)) === null || _k === void 0 ? void 0 : _k.reduce(function (pre, cur) {
|
|
77
64
|
var item = dataSource.find(function (v) {
|
|
78
65
|
if (cur === v.field) {
|
|
79
66
|
return v.show || typeof v.show !== 'boolean';
|
|
80
67
|
}
|
|
81
|
-
|
|
82
68
|
return false;
|
|
83
69
|
});
|
|
84
|
-
|
|
85
70
|
if (!isFuzzy && cur === searchKey) {
|
|
86
71
|
item = {
|
|
87
72
|
field: searchKey,
|
|
@@ -89,7 +74,6 @@ export var initLocalization = function initLocalization(props) {
|
|
|
89
74
|
fieldType: 'string'
|
|
90
75
|
};
|
|
91
76
|
}
|
|
92
|
-
|
|
93
77
|
if (getIsHas(basicFilter[cur]) && !!item) {
|
|
94
78
|
pre[cur] = {
|
|
95
79
|
fieldName: cur,
|
|
@@ -98,40 +82,33 @@ export var initLocalization = function initLocalization(props) {
|
|
|
98
82
|
operator: (item === null || item === void 0 ? void 0 : item.operator) || 'equal'
|
|
99
83
|
};
|
|
100
84
|
}
|
|
101
|
-
|
|
102
85
|
return pre;
|
|
103
86
|
}, {});
|
|
104
87
|
} 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) {
|
|
105
|
-
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) || [];
|
|
106
|
-
|
|
88
|
+
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) || [];
|
|
89
|
+
// 初始化基础查询缓存
|
|
107
90
|
basicFilter = filterQueryArr.reduce(function (pre, cur) {
|
|
108
91
|
var checkedValue = cur.value; // 选中的数据
|
|
109
92
|
// 是否搜索框
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
93
|
+
var isSearchInput = cur.fieldName === searchKey;
|
|
94
|
+
// 查找该数据是否展示
|
|
113
95
|
var someData = dataSource.some(function (v) {
|
|
114
96
|
if (cur.fieldName === v.field) {
|
|
115
97
|
return v.show || typeof v.show !== 'boolean';
|
|
116
98
|
}
|
|
117
|
-
|
|
118
99
|
return false;
|
|
119
100
|
});
|
|
120
|
-
|
|
121
101
|
if (getIsHas(checkedValue) && someData || isSearchInput) {
|
|
122
|
-
basicQuery[cur.fieldName] = cur;
|
|
123
|
-
|
|
102
|
+
basicQuery[cur.fieldName] = cur;
|
|
103
|
+
// 复选/级联/日期区间
|
|
124
104
|
if (!['checkbox', 'cascader'].includes(cur.type) && checkedValue.length < 2) {
|
|
125
105
|
checkedValue = checkedValue[0];
|
|
126
106
|
}
|
|
127
|
-
|
|
128
107
|
pre[cur.fieldName] = checkedValue;
|
|
129
108
|
}
|
|
130
|
-
|
|
131
109
|
return pre;
|
|
132
110
|
}, {});
|
|
133
111
|
}
|
|
134
|
-
|
|
135
112
|
return {
|
|
136
113
|
searchFilter: searchFilter,
|
|
137
114
|
searchQuery: searchQuery,
|
|
@@ -140,32 +117,30 @@ export var initLocalization = function initLocalization(props) {
|
|
|
140
117
|
customFilter: customFilter,
|
|
141
118
|
customQuery: customQuery
|
|
142
119
|
};
|
|
143
|
-
};
|
|
144
|
-
|
|
120
|
+
};
|
|
121
|
+
// 核心参数集合
|
|
145
122
|
var useCoreOptions = function useCoreOptions(_ref) {
|
|
146
123
|
var state = _ref.state,
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
dispatch = _ref.dispatch,
|
|
125
|
+
props = _ref.props;
|
|
149
126
|
var onChange = props.onChange,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
127
|
+
dataSource = props.dataSource,
|
|
128
|
+
searchKey = props.searchKey,
|
|
129
|
+
searchConfig = props.searchConfig,
|
|
130
|
+
customOptions = props.customOptions,
|
|
131
|
+
enableAutoString = props.enableAutoString;
|
|
132
|
+
// 获取是否存在过滤值
|
|
156
133
|
var getHasFilter = useCallback(function () {
|
|
157
134
|
return getIsHas(state.basicFilter) || getIsHas(state.searchFilter);
|
|
158
|
-
}, [state.basicFilter, state.searchFilter]);
|
|
159
|
-
|
|
135
|
+
}, [state.basicFilter, state.searchFilter]);
|
|
136
|
+
// 转换一级查询结构 object => array
|
|
160
137
|
var tranformGlobalQuery = useCallback(function (obj) {
|
|
161
138
|
var _a;
|
|
162
|
-
|
|
163
139
|
var nArr = ((_a = Object.keys(obj)) === null || _a === void 0 ? void 0 : _a.reduce(function (pre, cur) {
|
|
164
140
|
var item = dataSource.find(function (v) {
|
|
165
141
|
return cur === v.field;
|
|
166
142
|
});
|
|
167
143
|
var itemValue = obj[cur].value;
|
|
168
|
-
|
|
169
144
|
if (getIsHas(itemValue) && !!item) {
|
|
170
145
|
return [].concat(_toConsumableArray(pre), [{
|
|
171
146
|
relation: obj[cur].mode || 'and',
|
|
@@ -173,7 +148,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
173
148
|
fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
|
|
174
149
|
type: item.type,
|
|
175
150
|
value: Array.isArray(itemValue) ? itemValue : [itemValue],
|
|
176
|
-
|
|
177
151
|
/**
|
|
178
152
|
* and 等同于逻辑关系contains: 选中的值包含所有值
|
|
179
153
|
* or 等同于逻辑关系in: 选中的值存在于所有值之中
|
|
@@ -181,21 +155,18 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
181
155
|
operator: 'in'
|
|
182
156
|
}]);
|
|
183
157
|
}
|
|
184
|
-
|
|
185
158
|
return pre;
|
|
186
159
|
}, [])) || [];
|
|
187
160
|
return nArr;
|
|
188
|
-
}, [dataSource]);
|
|
189
|
-
|
|
161
|
+
}, [dataSource]);
|
|
162
|
+
// 转行查询结构
|
|
190
163
|
var tranformQuery = useCallback(function (_ref2) {
|
|
191
164
|
var customFilter = _ref2.customFilter,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
165
|
+
_ref2$searchQuery = _ref2.searchQuery,
|
|
166
|
+
searchQuery = _ref2$searchQuery === void 0 ? {} : _ref2$searchQuery,
|
|
167
|
+
_ref2$basicQuery = _ref2.basicQuery,
|
|
168
|
+
basicQuery = _ref2$basicQuery === void 0 ? {} : _ref2$basicQuery;
|
|
197
169
|
var _a, _b;
|
|
198
|
-
|
|
199
170
|
var globalQuery = {
|
|
200
171
|
filters: [{
|
|
201
172
|
conditions: tranformGlobalQuery(customFilter === null || customFilter === void 0 ? void 0 : customFilter.data)
|
|
@@ -220,42 +191,38 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
220
191
|
fuzzyQuery: fuzzyQuery,
|
|
221
192
|
filterQuery: filterQuery
|
|
222
193
|
};
|
|
223
|
-
}, [tranformGlobalQuery]);
|
|
224
|
-
|
|
194
|
+
}, [tranformGlobalQuery]);
|
|
195
|
+
// 触发查询 type basic基础筛选 | complex高级筛选
|
|
225
196
|
var onQuery = useCallback(function () {
|
|
226
197
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
198
|
+
_ref3$complexFilter = _ref3.complexFilter,
|
|
199
|
+
complexFilter = _ref3$complexFilter === void 0 ? {} : _ref3$complexFilter,
|
|
200
|
+
_ref3$type = _ref3.type,
|
|
201
|
+
type = _ref3$type === void 0 ? 'basic' : _ref3$type,
|
|
202
|
+
_ref3$basicFilter = _ref3.basicFilter,
|
|
203
|
+
basicFilter = _ref3$basicFilter === void 0 ? state.basicFilter || {} : _ref3$basicFilter,
|
|
204
|
+
_ref3$basicQuery = _ref3.basicQuery,
|
|
205
|
+
basicQuery = _ref3$basicQuery === void 0 ? state.basicQuery || {} : _ref3$basicQuery,
|
|
206
|
+
_ref3$searchFilter = _ref3.searchFilter,
|
|
207
|
+
searchFilter = _ref3$searchFilter === void 0 ? state.searchFilter || {} : _ref3$searchFilter,
|
|
208
|
+
_ref3$searchQuery = _ref3.searchQuery,
|
|
209
|
+
searchQuery = _ref3$searchQuery === void 0 ? state.searchQuery || {} : _ref3$searchQuery,
|
|
210
|
+
_ref3$customFilter = _ref3.customFilter,
|
|
211
|
+
customFilter = _ref3$customFilter === void 0 ? state.customFilter || {} : _ref3$customFilter;
|
|
242
212
|
var _a;
|
|
243
|
-
|
|
244
213
|
if (type === 'custom') {
|
|
245
214
|
dispatch({
|
|
246
215
|
type: 'changeCustomFilter',
|
|
247
216
|
customFilter: customFilter
|
|
248
217
|
});
|
|
249
|
-
|
|
250
218
|
var _tranformQuery = tranformQuery({
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
219
|
+
customFilter: customFilter,
|
|
220
|
+
searchQuery: searchQuery,
|
|
221
|
+
basicQuery: basicQuery
|
|
222
|
+
}),
|
|
223
|
+
globalQuery = _tranformQuery.globalQuery,
|
|
224
|
+
fuzzyQuery = _tranformQuery.fuzzyQuery,
|
|
225
|
+
filterQuery = _tranformQuery.filterQuery;
|
|
259
226
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
260
227
|
fuzzyFilter: searchFilter,
|
|
261
228
|
fuzzyQuery: fuzzyQuery,
|
|
@@ -265,7 +232,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
265
232
|
type: 'custom'
|
|
266
233
|
});
|
|
267
234
|
}
|
|
268
|
-
|
|
269
235
|
if (type === 'search') {
|
|
270
236
|
dispatch({
|
|
271
237
|
type: 'changeSearchFilter',
|
|
@@ -280,16 +246,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
280
246
|
complexFilter: {}
|
|
281
247
|
}); // 基础筛选清空高级筛选
|
|
282
248
|
// 抛出给外部查询
|
|
283
|
-
|
|
284
249
|
var _tranformQuery2 = tranformQuery({
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
250
|
+
customFilter: customFilter,
|
|
251
|
+
searchQuery: searchQuery,
|
|
252
|
+
basicQuery: basicQuery
|
|
253
|
+
}),
|
|
254
|
+
_globalQuery = _tranformQuery2.globalQuery,
|
|
255
|
+
_fuzzyQuery = _tranformQuery2.fuzzyQuery,
|
|
256
|
+
_filterQuery = _tranformQuery2.filterQuery;
|
|
293
257
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
294
258
|
fuzzyFilter: searchFilter,
|
|
295
259
|
basicFilter: basicFilter,
|
|
@@ -299,7 +263,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
299
263
|
type: 'search'
|
|
300
264
|
});
|
|
301
265
|
}
|
|
302
|
-
|
|
303
266
|
if (type === 'basic') {
|
|
304
267
|
dispatch({
|
|
305
268
|
type: 'changeBasicFilter',
|
|
@@ -314,16 +277,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
314
277
|
complexFilter: {}
|
|
315
278
|
}); // 基础筛选清空高级筛选
|
|
316
279
|
// 抛出给外部查询
|
|
317
|
-
|
|
318
280
|
var _tranformQuery3 = tranformQuery({
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
281
|
+
customFilter: customFilter,
|
|
282
|
+
searchQuery: searchQuery,
|
|
283
|
+
basicQuery: basicQuery
|
|
284
|
+
}),
|
|
285
|
+
_globalQuery2 = _tranformQuery3.globalQuery,
|
|
286
|
+
_fuzzyQuery2 = _tranformQuery3.fuzzyQuery,
|
|
287
|
+
_filterQuery2 = _tranformQuery3.filterQuery;
|
|
327
288
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
328
289
|
fuzzyFilter: searchFilter,
|
|
329
290
|
basicFilter: basicFilter,
|
|
@@ -333,7 +294,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
333
294
|
type: 'basic'
|
|
334
295
|
});
|
|
335
296
|
}
|
|
336
|
-
|
|
337
297
|
if (type === 'complex') {
|
|
338
298
|
// eslint-disable-next-line no-shadow
|
|
339
299
|
var _basicQuery = (_a = Object.keys(complexFilter)) === null || _a === void 0 ? void 0 : _a.reduce(function (pre, cur) {
|
|
@@ -341,7 +301,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
341
301
|
return cur === v.field;
|
|
342
302
|
});
|
|
343
303
|
var itemValue = complexFilter[cur].value;
|
|
344
|
-
|
|
345
304
|
if (getIsHas(itemValue) && !!item) {
|
|
346
305
|
// eslint-disable-next-line no-param-reassign
|
|
347
306
|
pre[cur] = {
|
|
@@ -353,10 +312,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
353
312
|
operator: 'in'
|
|
354
313
|
};
|
|
355
314
|
}
|
|
356
|
-
|
|
357
315
|
return pre;
|
|
358
316
|
}, {});
|
|
359
|
-
|
|
360
317
|
dispatch({
|
|
361
318
|
type: 'changeSearchFilter',
|
|
362
319
|
searchFilter: {}
|
|
@@ -384,14 +341,12 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
384
341
|
type: 'changeBasicQuery',
|
|
385
342
|
basicQuery: _basicQuery
|
|
386
343
|
});
|
|
387
|
-
|
|
388
344
|
var _tranformQuery4 = tranformQuery({
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
345
|
+
customFilter: customFilter,
|
|
346
|
+
basicQuery: _basicQuery
|
|
347
|
+
}),
|
|
348
|
+
_globalQuery3 = _tranformQuery4.globalQuery,
|
|
349
|
+
_filterQuery3 = _tranformQuery4.filterQuery;
|
|
395
350
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
396
351
|
complexFilter: complexFilter,
|
|
397
352
|
globalQuery: _globalQuery3,
|
|
@@ -399,21 +354,18 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
399
354
|
type: type
|
|
400
355
|
});
|
|
401
356
|
}
|
|
402
|
-
|
|
403
357
|
if (type === 'clear') {
|
|
404
358
|
dispatch({
|
|
405
359
|
type: 'reset'
|
|
406
360
|
});
|
|
407
|
-
|
|
408
361
|
var _tranformQuery5 = tranformQuery({
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
362
|
+
customFilter: customFilter,
|
|
363
|
+
searchQuery: searchQuery,
|
|
364
|
+
basicQuery: basicQuery
|
|
365
|
+
}),
|
|
366
|
+
_globalQuery4 = _tranformQuery5.globalQuery,
|
|
367
|
+
_fuzzyQuery3 = _tranformQuery5.fuzzyQuery,
|
|
368
|
+
_filterQuery4 = _tranformQuery5.filterQuery;
|
|
417
369
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
418
370
|
fuzzyFilter: searchFilter,
|
|
419
371
|
basicFilter: basicFilter,
|
|
@@ -423,11 +375,10 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
423
375
|
type: 'clear'
|
|
424
376
|
});
|
|
425
377
|
}
|
|
426
|
-
}, [tranformQuery, state]);
|
|
427
|
-
|
|
378
|
+
}, [tranformQuery, state]);
|
|
379
|
+
// 清除事件
|
|
428
380
|
var onClearChange = useCallback(function () {
|
|
429
381
|
var _a;
|
|
430
|
-
|
|
431
382
|
var params = {
|
|
432
383
|
searchFilter: {},
|
|
433
384
|
searchQuery: {},
|
|
@@ -438,20 +389,18 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
438
389
|
};
|
|
439
390
|
(_a = props.onClearChange) === null || _a === void 0 ? void 0 : _a.call(props, params);
|
|
440
391
|
onQuery(params);
|
|
441
|
-
}, [onQuery]);
|
|
442
|
-
|
|
392
|
+
}, [onQuery]);
|
|
393
|
+
// 根据字段查找过滤的数据, 不存在时返回默认值
|
|
443
394
|
var getFilterValue = useCallback(function (_ref4) {
|
|
444
395
|
var field = _ref4.field,
|
|
445
|
-
|
|
446
|
-
|
|
396
|
+
type = _ref4.type;
|
|
447
397
|
if (getIsHas(state.basicFilter[field])) {
|
|
448
398
|
return state.basicFilter[field];
|
|
449
399
|
}
|
|
450
|
-
|
|
451
400
|
var defaultValue = getValueForType(type);
|
|
452
401
|
return state.basicFilter[field] || defaultValue;
|
|
453
|
-
}, [state.basicFilter]);
|
|
454
|
-
|
|
402
|
+
}, [state.basicFilter]);
|
|
403
|
+
// 获取查询结构
|
|
455
404
|
var getFilterQuery = useCallback(function () {
|
|
456
405
|
var originData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dataSource;
|
|
457
406
|
var basicFilter = getFilterShow(state.basicFilter, originData);
|
|
@@ -464,16 +413,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
464
413
|
type: 'changeBasicQuery',
|
|
465
414
|
basicQuery: basicQuery
|
|
466
415
|
});
|
|
467
|
-
|
|
468
416
|
var _tranformQuery6 = tranformQuery({
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
417
|
+
customFilter: state.customFilter,
|
|
418
|
+
searchQuery: state.searchQuery,
|
|
419
|
+
basicQuery: basicQuery
|
|
420
|
+
}),
|
|
421
|
+
globalQuery = _tranformQuery6.globalQuery,
|
|
422
|
+
fuzzyQuery = _tranformQuery6.fuzzyQuery,
|
|
423
|
+
filterQuery = _tranformQuery6.filterQuery;
|
|
477
424
|
return {
|
|
478
425
|
fuzzyFilter: state.searchFilter,
|
|
479
426
|
basicFilter: basicFilter,
|
|
@@ -487,10 +434,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
487
434
|
* 设置筛选的值 itemValue => String || Array => ['', '', ...]
|
|
488
435
|
* 后端仅接受数组包字符串形式, 不接受数值及布尔值
|
|
489
436
|
*/
|
|
490
|
-
|
|
491
437
|
var setFilterValue = useCallback(function (itemValue, item) {
|
|
492
438
|
var field = item.field;
|
|
493
|
-
|
|
494
439
|
if (field) {
|
|
495
440
|
// 将结果转换为字符串(级联数据需要递归)
|
|
496
441
|
var transformString = function transformString(val) {
|
|
@@ -498,53 +443,49 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
498
443
|
return transformString(v);
|
|
499
444
|
}) : String(val);
|
|
500
445
|
};
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
446
|
+
var stringValue = enableAutoString ? transformString(itemValue) : itemValue;
|
|
447
|
+
// 基础查询数据(受控数据)
|
|
448
|
+
var basicFilter = Object.assign(Object.assign({}, state.basicFilter), _defineProperty({}, field, stringValue));
|
|
449
|
+
// 外部查询数据结构
|
|
506
450
|
var basicQuery = Object.assign(Object.assign({}, state.basicQuery), _defineProperty({}, field, {
|
|
507
451
|
fieldName: field,
|
|
508
452
|
fieldType: item.valueType || 'string',
|
|
509
453
|
type: item.type,
|
|
510
454
|
value: Array.isArray(itemValue) ? stringValue : [stringValue],
|
|
511
455
|
operator: item.operator || 'equal'
|
|
512
|
-
}));
|
|
513
|
-
|
|
456
|
+
}));
|
|
457
|
+
// 数据清除时不返回结构体
|
|
514
458
|
if (!getIsHas(itemValue)) {
|
|
515
459
|
delete basicFilter[field];
|
|
516
460
|
delete basicQuery[field];
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
|
|
461
|
+
}
|
|
462
|
+
// 触发外部事件
|
|
520
463
|
onQuery === null || onQuery === void 0 ? void 0 : onQuery({
|
|
521
464
|
basicFilter: basicFilter,
|
|
522
465
|
basicQuery: basicQuery,
|
|
523
466
|
type: 'basic'
|
|
524
467
|
});
|
|
525
468
|
}
|
|
526
|
-
}, [state]);
|
|
527
|
-
|
|
469
|
+
}, [state]);
|
|
470
|
+
// 单个设置过滤字段值, 会触发onChange事件, 多个字段时使用setLocalization
|
|
528
471
|
var setFilterFieldValue = useCallback(function (field, value) {
|
|
529
472
|
var item = dataSource.find(function (v) {
|
|
530
473
|
return v.fidld === field;
|
|
531
474
|
}) || {};
|
|
532
475
|
setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue(value, item);
|
|
533
|
-
}, [dataSource]);
|
|
534
|
-
|
|
476
|
+
}, [dataSource]);
|
|
477
|
+
// 读取缓存
|
|
535
478
|
var setLocalization = useCallback(function () {
|
|
536
479
|
var localization = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.localization;
|
|
537
|
-
|
|
538
480
|
var _initLocalization = initLocalization(Object.assign(Object.assign({}, props), {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
481
|
+
localization: localization
|
|
482
|
+
})),
|
|
483
|
+
searchFilter = _initLocalization.searchFilter,
|
|
484
|
+
searchQuery = _initLocalization.searchQuery,
|
|
485
|
+
basicFilter = _initLocalization.basicFilter,
|
|
486
|
+
basicQuery = _initLocalization.basicQuery,
|
|
487
|
+
customFilter = _initLocalization.customFilter,
|
|
488
|
+
customQuery = _initLocalization.customQuery;
|
|
548
489
|
dispatch({
|
|
549
490
|
type: 'changeSearchFilter',
|
|
550
491
|
searchFilter: searchFilter
|
|
@@ -569,8 +510,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
569
510
|
type: 'changeCustomQuery',
|
|
570
511
|
customQuery: customQuery
|
|
571
512
|
});
|
|
572
|
-
}, [props]);
|
|
573
|
-
|
|
513
|
+
}, [props]);
|
|
514
|
+
// 模糊查询结构
|
|
574
515
|
var setSearchFilter = useCallback(function (itemValue) {
|
|
575
516
|
var searchFilter = searchKey === null || searchKey === void 0 ? void 0 : searchKey.reduce(function (pre, cur) {
|
|
576
517
|
pre[cur] = itemValue;
|
|
@@ -582,20 +523,19 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
582
523
|
value: [itemValue]
|
|
583
524
|
});
|
|
584
525
|
return pre;
|
|
585
|
-
}, Object.assign({}, state.searchQuery));
|
|
586
|
-
|
|
526
|
+
}, Object.assign({}, state.searchQuery));
|
|
527
|
+
// 数据清除时不返回结构体
|
|
587
528
|
if (!getIsHas(itemValue)) {
|
|
588
529
|
searchFilter = {};
|
|
589
530
|
searchQuery = {};
|
|
590
531
|
}
|
|
591
|
-
|
|
592
532
|
onQuery({
|
|
593
533
|
searchFilter: searchFilter,
|
|
594
534
|
searchQuery: searchQuery,
|
|
595
535
|
type: 'search'
|
|
596
536
|
});
|
|
597
|
-
}, [searchKey, state]);
|
|
598
|
-
|
|
537
|
+
}, [searchKey, state]);
|
|
538
|
+
// 自定义筛选查询
|
|
599
539
|
var setCustomFilter = useCallback(function (val) {
|
|
600
540
|
var customFilter = customOptions.find(function (v) {
|
|
601
541
|
return v.value === val;
|
|
@@ -604,14 +544,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
604
544
|
customFilter: customFilter,
|
|
605
545
|
type: 'custom'
|
|
606
546
|
});
|
|
607
|
-
}, [customOptions, state.basicFilter]);
|
|
608
|
-
|
|
547
|
+
}, [customOptions, state.basicFilter]);
|
|
548
|
+
// 组件内部使用
|
|
609
549
|
var CoreMethods = {
|
|
610
550
|
onQuery: onQuery,
|
|
611
551
|
setCustomFilter: setCustomFilter,
|
|
612
552
|
setSearchFilter: setSearchFilter
|
|
613
|
-
};
|
|
614
|
-
|
|
553
|
+
};
|
|
554
|
+
// 参与Ref转发
|
|
615
555
|
var RefMethods = {
|
|
616
556
|
getState: function getState() {
|
|
617
557
|
return state;
|
|
@@ -632,5 +572,4 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
632
572
|
RefMethods: RefMethods
|
|
633
573
|
};
|
|
634
574
|
};
|
|
635
|
-
|
|
636
575
|
export default useCoreOptions;
|
|
@@ -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;
|