linkmore-design 1.0.99 → 1.1.0
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/CHANGELOG.md +12 -0
- package/dist/CardTable/hooks/usePagination.d.ts +1 -1
- package/dist/CardTable/utils.d.ts +1 -1
- package/dist/ImageViewer/fns/index.d.ts +1 -0
- package/dist/LmEditTable/demos/group.d.ts +2 -0
- package/dist/LmFilter/components/CascaderFilter.d.ts +1 -1
- package/dist/LmFilter/components/CheckboxFilter.d.ts +1 -1
- package/dist/LmFilter/components/DateFilter.d.ts +1 -1
- package/dist/LmFilter/components/SelectFilter.d.ts +1 -1
- package/dist/LmFilter/filterFns/index.d.ts +5 -5
- package/dist/LmImgList/LmImgList.d.ts +4 -0
- package/dist/LmImgList/body/Banner.d.ts +5 -0
- package/dist/LmImgList/body/Thumb.d.ts +5 -0
- package/dist/LmImgList/demos/basic.d.ts +2 -0
- package/dist/LmImgList/fns/index.d.ts +20 -0
- package/dist/LmImgList/index.d.ts +3 -0
- package/dist/LmImgList/interface.d.ts +14 -0
- package/dist/LmImgList/style/index.d.ts +1 -0
- package/dist/LmImgList/style/variables.d.ts +1 -0
- package/dist/LmImgList/wrapper/Container.d.ts +4 -0
- package/dist/LmImgList/wrapper/Root.d.ts +4 -0
- package/dist/LmImgList/wrapper/Wrapper.d.ts +4 -0
- package/dist/LmImgList/wrapper/reducer.d.ts +14 -0
- package/dist/LmSelect/useCheckboxOptions.d.ts +1 -1
- package/dist/LmTable/util.d.ts +10 -4
- package/dist/_util/placements.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.umd.js +92607 -96491
- package/dist/index.umd.min.js +20 -20
- package/dist/variables.css +12504 -0
- package/es/ButtonTags/ButtonTags.js +1 -1
- package/es/ButtonTags/index.js +1 -1
- package/es/CardTable/LmCardTable.js +2 -2
- package/es/CardTable/body/TableBody.js +2 -2
- package/es/CardTable/body/TableBodyCell.js +2 -2
- package/es/CardTable/body/TableBodyRow.js +2 -2
- package/es/CardTable/card/PictureTextColumn.js +2 -2
- package/es/CardTable/card/PictureTextRow.js +1 -1
- package/es/CardTable/card/PictureTextRowOperate.js +1 -1
- package/es/CardTable/context.js +1 -1
- package/es/CardTable/empty.js +1 -1
- package/es/CardTable/fns/index.js +1 -1
- package/es/CardTable/footer.js +2 -2
- package/es/CardTable/hooks/usePagination.js +5 -5
- package/es/CardTable/index.js +1 -1
- package/es/CardTable/pager/TablePagination.js +2 -2
- package/es/CardTable/pager/index.js +1 -1
- package/es/CardTable/table/Table.js +1 -1
- package/es/CardTable/table/TableContainer.js +2 -2
- package/es/CardTable/table/TableRoot.js +2 -2
- package/es/CardTable/table/TableWrapper.js +1 -1
- package/es/CardTable/toolbar/ToolBarBottom.js +1 -1
- package/es/Checkbox/index.js +1 -1
- package/es/CustomerService/components/question.js +2 -2
- package/es/CustomerService/index.js +2 -2
- package/es/EditTable/EditTable.js +6 -6
- package/es/EditTable/index.js +1 -1
- package/es/EnlargeImg/index.js +2 -2
- package/es/Filter/Popover.js +2 -2
- package/es/Filter/baseFilter/Popover.js +2 -2
- package/es/Filter/baseFilter/ToggleFilter.js +2 -2
- package/es/Filter/baseFilter/index.js +5 -5
- package/es/Filter/complex/ComplexFilter.js +2 -2
- package/es/Filter/complex/ComplexItem.js +2 -2
- package/es/Filter/components/Checkbox.js +2 -2
- package/es/Filter/components/Date.js +2 -2
- package/es/Filter/components/Input.js +2 -2
- package/es/Filter/components/Select.js +2 -2
- package/es/Filter/components/Tree.js +2 -2
- package/es/Filter/components/header.js +1 -1
- package/es/Filter/components/index.js +1 -1
- package/es/Filter/context.js +1 -1
- package/es/Filter/edit/editFilter.js +6 -6
- package/es/Filter/index.js +2 -2
- package/es/Filter/popContext.js +1 -1
- package/es/Filter/remember.js +2 -2
- package/es/Form/style/form.css +3 -3
- package/es/Form/style/index.css +6063 -3
- package/es/Form/style/tooltip.css +2 -2
- package/es/Form/style/variables.css +6063 -3
- package/es/Icon/index.js +1 -1
- package/es/IconSelect/index.js +2 -2
- package/es/ImageViewer/components/Carousel.js +2 -2
- package/es/ImageViewer/fns/index.d.ts +1 -0
- package/es/ImageViewer/fns/index.js +11 -2
- package/es/LeftTable/index.js +2 -2
- package/es/LmEditTable/EditTable.js +66 -7
- package/es/LmFilter/Controls/CheckboxTags.js +1 -1
- package/es/LmFilter/Controls/index.js +2 -2
- package/es/LmFilter/LmFilter.js +4 -2
- package/es/LmFilter/baseFilter/fuzzySearch.js +2 -2
- package/es/LmFilter/baseFilter/index.js +1 -1
- package/es/LmFilter/clearFilter/index.js +1 -1
- package/es/LmFilter/complexFilter/drawer.js +2 -2
- package/es/LmFilter/complexFilter/index.js +2 -2
- package/es/LmFilter/complexFilter/valueDrawer.js +5 -5
- package/es/LmFilter/components/CascaderFilter.js +2 -2
- package/es/LmFilter/components/CheckboxFilter.js +2 -2
- package/es/LmFilter/components/CustomSelectFilter.js +2 -2
- package/es/LmFilter/components/DateFilter.js +2 -2
- package/es/LmFilter/components/DropdownFIlter.js +2 -2
- package/es/LmFilter/components/EmptyFilter.js +1 -1
- package/es/LmFilter/components/InputFilter.js +2 -2
- package/es/LmFilter/components/InputSearchClose.js +2 -2
- package/es/LmFilter/components/SelectFilter.js +2 -2
- package/es/LmFilter/components/index.js +2 -2
- package/es/LmFilter/customFilter/drawer.js +5 -5
- package/es/LmFilter/customFilter/index.js +2 -2
- package/es/LmFilter/customFilter/saveModal.js +5 -5
- package/es/LmFilter/customFilter/valueDrawer.js +5 -5
- package/es/LmFilter/filterFns/index.d.ts +60 -0
- package/es/LmFilter/filterFns/index.js +72 -102
- package/es/LmFilter/index.js +1 -1
- package/es/LmFilter/utils.js +1 -1
- package/es/LmFilter/wrapper/Filter.js +1 -1
- package/es/LmFilter/wrapper/FilterContainer.js +1 -1
- package/es/LmFilter/wrapper/FilterRoot.js +2 -2
- package/es/LmFilter/wrapper/FilterWrapper.js +1 -1
- package/es/LmImgList/LmImgList.d.ts +4 -0
- package/es/LmImgList/LmImgList.js +19 -0
- package/es/LmImgList/body/Banner.d.ts +5 -0
- package/es/LmImgList/body/Banner.js +121 -0
- package/es/LmImgList/body/Thumb.d.ts +5 -0
- package/es/LmImgList/body/Thumb.js +63 -0
- package/es/LmImgList/fns/index.d.ts +20 -0
- package/es/LmImgList/fns/index.js +106 -0
- package/es/LmImgList/index.d.ts +3 -0
- package/es/LmImgList/index.js +3 -0
- package/es/LmImgList/interface.d.ts +14 -0
- package/es/LmImgList/interface.js +1 -0
- package/es/LmImgList/style/index.css +71 -0
- package/es/LmImgList/style/index.js +3 -0
- package/es/LmImgList/style/variables.css +71 -0
- package/es/LmImgList/style/variables.js +3 -0
- package/es/LmImgList/wrapper/Container.d.ts +4 -0
- package/es/LmImgList/wrapper/Container.js +56 -0
- package/es/LmImgList/wrapper/Root.d.ts +4 -0
- package/es/LmImgList/wrapper/Root.js +44 -0
- package/es/LmImgList/wrapper/Wrapper.d.ts +4 -0
- package/es/LmImgList/wrapper/Wrapper.js +9 -0
- package/es/LmImgList/wrapper/reducer.d.ts +14 -0
- package/es/LmImgList/wrapper/reducer.js +52 -0
- package/es/LmSelect/useCheckboxOptions.d.ts +1 -1
- package/es/LmTable/Table.js +92 -35
- package/es/LmTable/VList.js +2 -2
- package/es/LmTable/autosize.js +1 -1
- package/es/LmTable/components/sheelTableCell.js +12 -9
- package/es/LmTable/components/sortableBoxCol.js +1 -1
- package/es/LmTable/components/sortableItemCol.js +2 -2
- package/es/LmTable/index.js +1 -1
- package/es/LmTable/style/index.css +19 -0
- package/es/LmTable/style/variables.css +19 -0
- package/es/LmTable/util.js +71 -18
- package/es/LmUpload/fns/index.js +5 -5
- package/es/LoadingPage/index.js +1 -1
- package/es/Radio/index.js +1 -1
- package/es/UploadOss/index.js +1 -1
- package/es/UploadOss/uploadBtn.js +2 -2
- package/es/UploadOss/uploadImg.js +2 -2
- package/es/VirtualList/index.js +1 -1
- package/es/_util/placements.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/notification/index.js +3 -3
- package/es/services/newRequest.js +4 -4
- package/es/styles/variables.css +6153 -3
- package/lib/Affix/index.js +2 -2
- package/lib/Affix/utils.js +1 -1
- package/lib/Alert/ErrorBoundary.js +2 -2
- package/lib/Alert/index.js +2 -2
- package/lib/Approval/handle.js +1 -1
- package/lib/Approval/index.js +2 -2
- package/lib/Approval/util.js +1 -1
- package/lib/AutoComplete/index.js +2 -2
- package/lib/Avatar/index.js +1 -1
- package/lib/Badge/Ribbon.js +2 -2
- package/lib/Badge/ScrollNumber.js +2 -2
- package/lib/Badge/SingleNumber.js +2 -2
- package/lib/Badge/index.js +2 -2
- package/lib/Box/LmBox.js +2 -2
- package/lib/Box/body/Item.js +1 -1
- package/lib/Box/body/List.js +1 -1
- package/lib/Box/body/OverflowList.js +1 -1
- package/lib/Box/index.js +1 -1
- package/lib/Box/wrapper/BoxContainer.js +2 -2
- package/lib/Box/wrapper/BoxRoot.js +2 -2
- package/lib/Box/wrapper/BoxWrapper.js +1 -1
- package/lib/Breadcrumb/index.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/ButtonTags/ButtonTags.js +1 -1
- package/lib/ButtonTags/index.js +1 -1
- package/lib/Calendar/index.js +1 -1
- package/lib/Card/index.js +1 -1
- package/lib/CardTable/LmCardTable.js +2 -2
- package/lib/CardTable/body/TableBody.js +2 -2
- package/lib/CardTable/body/TableBodyCell.js +2 -2
- package/lib/CardTable/body/TableBodyRow.js +2 -2
- package/lib/CardTable/card/PictureTextColumn.js +2 -2
- package/lib/CardTable/card/PictureTextRow.js +1 -1
- package/lib/CardTable/card/PictureTextRowOperate.js +1 -1
- package/lib/CardTable/context.js +1 -1
- package/lib/CardTable/empty.js +1 -1
- package/lib/CardTable/fns/index.js +1 -1
- package/lib/CardTable/footer.js +2 -2
- package/lib/CardTable/hooks/usePagination.js +5 -5
- package/lib/CardTable/index.js +1 -1
- package/lib/CardTable/pager/TablePagination.js +2 -2
- package/lib/CardTable/pager/index.js +1 -1
- package/lib/CardTable/table/Table.js +1 -1
- package/lib/CardTable/table/TableContainer.js +2 -2
- package/lib/CardTable/table/TableRoot.js +2 -2
- package/lib/CardTable/table/TableWrapper.js +1 -1
- package/lib/CardTable/toolbar/ToolBarBottom.js +1 -1
- package/lib/Carousel/index.js +1 -1
- package/lib/Cascader/index.js +1 -1
- package/lib/Checkbox/index.js +1 -1
- package/lib/Collapse/index.js +1 -1
- package/lib/Comment/index.js +1 -1
- package/lib/ConfigProvider/DisabledContext.js +1 -1
- package/lib/ConfigProvider/SizeContext.js +1 -1
- package/lib/ConfigProvider/context.js +1 -1
- package/lib/ConfigProvider/cssVariables.js +1 -1
- package/lib/ConfigProvider/defaultRenderEmpty.js +2 -2
- package/lib/ConfigProvider/index.js +2 -2
- package/lib/CustomTableOption/cardSort.js +2 -2
- package/lib/CustomTableOption/columnsSort.js +2 -2
- package/lib/CustomTableOption/filterSort.js +2 -2
- package/lib/CustomTableOption/index.js +2 -2
- package/lib/CustomerService/components/question.js +2 -2
- package/lib/CustomerService/index.js +2 -2
- package/lib/DatePicker/PickerButton.js +1 -1
- package/lib/DatePicker/PickerTag.js +1 -1
- package/lib/DatePicker/generatePicker/generateRangePicker.js +2 -2
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +2 -2
- package/lib/DatePicker/generatePicker/index.js +1 -1
- package/lib/DatePicker/index.js +1 -1
- package/lib/Descriptions/Cell.js +2 -2
- package/lib/Descriptions/Row.js +2 -2
- package/lib/Descriptions/index.js +2 -2
- package/lib/Divider/index.js +2 -2
- package/lib/Drawer/index.js +1 -1
- package/lib/Dropdown/index.js +2 -2
- package/lib/EditTable/EditTable.js +6 -6
- package/lib/EditTable/index.js +1 -1
- package/lib/Empty/empty.js +1 -1
- package/lib/Empty/index.js +2 -2
- package/lib/Empty/simple.js +1 -1
- package/lib/EnlargeImg/index.js +2 -2
- package/lib/Filter/Popover.js +2 -2
- package/lib/Filter/baseFilter/Popover.js +2 -2
- package/lib/Filter/baseFilter/ToggleFilter.js +2 -2
- package/lib/Filter/baseFilter/index.js +5 -5
- package/lib/Filter/complex/ComplexFilter.js +2 -2
- package/lib/Filter/complex/ComplexItem.js +2 -2
- package/lib/Filter/components/Checkbox.js +2 -2
- package/lib/Filter/components/Date.js +2 -2
- package/lib/Filter/components/Input.js +2 -2
- package/lib/Filter/components/Select.js +2 -2
- package/lib/Filter/components/Tree.js +2 -2
- package/lib/Filter/components/header.js +1 -1
- package/lib/Filter/components/index.js +1 -1
- package/lib/Filter/context.js +1 -1
- package/lib/Filter/edit/editFilter.js +6 -6
- package/lib/Filter/index.js +2 -2
- package/lib/Filter/popContext.js +1 -1
- package/lib/Filter/remember.js +2 -2
- package/lib/Form/ErrorList.js +2 -2
- package/lib/Form/Form.js +2 -2
- package/lib/Form/FormItem/ItemHolder.js +2 -2
- package/lib/Form/FormItem/index.js +2 -2
- package/lib/Form/FormItemInput.js +2 -2
- package/lib/Form/FormItemLabel.js +2 -2
- package/lib/Form/FormList.js +2 -2
- package/lib/Form/container.js +2 -2
- package/lib/Form/context.js +2 -2
- package/lib/Form/hooks/useDebounce.js +2 -2
- package/lib/Form/hooks/useForm.js +2 -2
- package/lib/Form/hooks/useFormItemStatus.js +1 -1
- package/lib/Form/hooks/useFrameState.js +2 -2
- package/lib/Form/hooks/useItemRef.js +2 -2
- package/lib/Form/index.js +2 -2
- package/lib/Form/style/form.css +3 -3
- package/lib/Form/style/index.css +6063 -3
- package/lib/Form/style/tooltip.css +2 -2
- package/lib/Form/style/variables.css +6063 -3
- package/lib/FullScreen/index.js +2 -2
- package/lib/Grid/col.js +2 -2
- package/lib/Grid/hooks/useBreakpoint.js +1 -1
- package/lib/Grid/index.js +1 -1
- package/lib/Grid/row.js +2 -2
- package/lib/Icon/index.js +1 -1
- package/lib/IconSelect/index.js +2 -2
- package/lib/Image/index.js +1 -1
- package/lib/ImageViewer/LmImageViewer.js +2 -2
- package/lib/ImageViewer/components/Arrows.js +1 -1
- package/lib/ImageViewer/components/Carousel.js +3 -3
- package/lib/ImageViewer/components/Operate.js +1 -1
- package/lib/ImageViewer/components/Thumb.js +2 -2
- package/lib/ImageViewer/fns/index.d.ts +1 -0
- package/lib/ImageViewer/fns/index.js +11 -2
- package/lib/ImageViewer/index.js +1 -1
- package/lib/ImageViewer/wrapeer/Container.js +1 -1
- package/lib/ImageViewer/wrapeer/Root.js +2 -2
- package/lib/ImageViewer/wrapeer/Wrapper.js +1 -1
- package/lib/Input/index.js +2 -2
- package/lib/InputNumber/index.js +1 -1
- package/lib/Layout/index.js +1 -1
- package/lib/LeftTable/index.js +2 -2
- package/lib/List/index.js +1 -1
- package/lib/LmEditTable/DndContainer.js +1 -1
- package/lib/LmEditTable/DragHandle.js +1 -1
- package/lib/LmEditTable/EditTable.js +69 -10
- package/lib/LmEditTable/index.js +1 -1
- package/lib/LmEditTable/sortableBox.js +1 -1
- package/lib/LmEditTable/sortableBoxCol.js +1 -1
- package/lib/LmEditTable/sortableItem.js +1 -1
- package/lib/LmEditTable/sortableItemCol.js +1 -1
- package/lib/LmFilter/Controls/CheckboxTags.js +1 -1
- package/lib/LmFilter/Controls/index.js +2 -2
- package/lib/LmFilter/LmFilter.js +4 -2
- package/lib/LmFilter/baseFilter/fuzzySearch.js +2 -2
- package/lib/LmFilter/baseFilter/index.js +1 -1
- package/lib/LmFilter/clearFilter/index.js +1 -1
- package/lib/LmFilter/complexFilter/drawer.js +2 -2
- package/lib/LmFilter/complexFilter/index.js +2 -2
- package/lib/LmFilter/complexFilter/valueDrawer.js +5 -5
- package/lib/LmFilter/components/CascaderFilter.js +2 -2
- package/lib/LmFilter/components/CheckboxFilter.js +2 -2
- package/lib/LmFilter/components/CustomSelectFilter.js +2 -2
- package/lib/LmFilter/components/DateFilter.js +2 -2
- package/lib/LmFilter/components/DropdownFIlter.js +2 -2
- package/lib/LmFilter/components/EmptyFilter.js +1 -1
- package/lib/LmFilter/components/InputFilter.js +2 -2
- package/lib/LmFilter/components/InputSearchClose.js +2 -2
- package/lib/LmFilter/components/SelectFilter.js +2 -2
- package/lib/LmFilter/components/index.js +2 -2
- package/lib/LmFilter/customFilter/drawer.js +5 -5
- package/lib/LmFilter/customFilter/index.js +2 -2
- package/lib/LmFilter/customFilter/saveModal.js +5 -5
- package/lib/LmFilter/customFilter/valueDrawer.js +5 -5
- package/lib/LmFilter/filterFns/index.d.ts +60 -0
- package/lib/LmFilter/filterFns/index.js +42 -55
- package/lib/LmFilter/index.js +1 -1
- package/lib/LmFilter/utils.js +1 -1
- package/lib/LmFilter/wrapper/Filter.js +1 -1
- package/lib/LmFilter/wrapper/FilterContainer.js +1 -1
- package/lib/LmFilter/wrapper/FilterRoot.js +2 -2
- package/lib/LmFilter/wrapper/FilterWrapper.js +1 -1
- package/lib/LmImgList/LmImgList.d.ts +4 -0
- package/lib/LmImgList/LmImgList.js +33 -0
- package/lib/LmImgList/body/Banner.d.ts +5 -0
- package/lib/LmImgList/body/Banner.js +134 -0
- package/lib/LmImgList/body/Thumb.d.ts +5 -0
- package/lib/LmImgList/body/Thumb.js +79 -0
- package/lib/LmImgList/fns/index.d.ts +20 -0
- package/lib/LmImgList/fns/index.js +114 -0
- package/lib/LmImgList/index.d.ts +3 -0
- package/lib/LmImgList/index.js +27 -0
- package/lib/LmImgList/interface.d.ts +14 -0
- package/lib/LmImgList/interface.js +5 -0
- package/lib/LmImgList/style/index.css +71 -0
- package/lib/LmImgList/style/index.js +3 -0
- package/lib/LmImgList/style/variables.css +71 -0
- package/lib/LmImgList/style/variables.js +3 -0
- package/lib/LmImgList/wrapper/Container.d.ts +4 -0
- package/lib/LmImgList/wrapper/Container.js +73 -0
- package/lib/LmImgList/wrapper/Root.d.ts +4 -0
- package/lib/LmImgList/wrapper/Root.js +61 -0
- package/lib/LmImgList/wrapper/Wrapper.d.ts +4 -0
- package/lib/LmImgList/wrapper/Wrapper.js +22 -0
- package/lib/LmImgList/wrapper/reducer.d.ts +14 -0
- package/lib/LmImgList/wrapper/reducer.js +64 -0
- package/lib/LmSelect/GhostSelect.js +2 -2
- package/lib/LmSelect/NormalSelect.js +2 -2
- package/lib/LmSelect/index.js +2 -2
- package/lib/LmSelect/useCheckboxOptions.d.ts +1 -1
- package/lib/LmSelect/useCheckboxOptions.js +2 -2
- package/lib/LmSelect/utils.js +2 -2
- package/lib/LmTable/Table.js +92 -35
- package/lib/LmTable/VList.js +2 -2
- package/lib/LmTable/autosize.js +1 -1
- package/lib/LmTable/components/DndContainer.js +1 -1
- package/lib/LmTable/components/customRenderEmpty.js +1 -1
- package/lib/LmTable/components/inputDataEdit.js +1 -1
- package/lib/LmTable/components/sheelTableCell.js +15 -11
- package/lib/LmTable/components/sortableBoxCol.js +1 -1
- package/lib/LmTable/components/sortableItemCol.js +2 -2
- package/lib/LmTable/components/tableChartsModal.js +1 -1
- package/lib/LmTable/index.js +1 -1
- package/lib/LmTable/style/index.css +19 -0
- package/lib/LmTable/style/variables.css +19 -0
- package/lib/LmTable/util.js +71 -18
- package/lib/LmTable/virTual/VirtualRow.js +1 -1
- package/lib/LmTable/virTual/VirtualTable.js +2 -2
- package/lib/LmTable/virTual/VirtualWrapper.js +1 -1
- package/lib/LmTable/virTual/index.js +1 -1
- package/lib/LmUpload/LmUpload.js +2 -2
- package/lib/LmUpload/UploadList/ItemPicture.js +2 -2
- package/lib/LmUpload/UploadList/ItemPictureCard.js +2 -2
- package/lib/LmUpload/UploadList/ItemText.js +2 -2
- package/lib/LmUpload/UploadList/RenderItem.js +1 -1
- package/lib/LmUpload/UploadList/index.js +1 -1
- package/lib/LmUpload/body/Progress.js +1 -1
- package/lib/LmUpload/body/UploadCore.js +2 -2
- package/lib/LmUpload/body/UploadPicture.js +1 -1
- package/lib/LmUpload/components/card.js +1 -1
- package/lib/LmUpload/fns/index.js +6 -6
- package/lib/LmUpload/index.js +1 -1
- package/lib/LmUpload/utils.js +1 -1
- package/lib/LmUpload/view/index.js +1 -1
- package/lib/LmUpload/wrapper/Upload.js +2 -2
- package/lib/LmUpload/wrapper/UploadContainer.js +2 -2
- package/lib/LmUpload/wrapper/UploadRoot.js +2 -2
- package/lib/LmUpload/wrapper/UploadWrapper.js +1 -1
- package/lib/LoadingPage/index.js +1 -1
- package/lib/Locale/ar_EG.js +1 -1
- package/lib/Locale/az_AZ.js +1 -1
- package/lib/Locale/bg_BG.js +1 -1
- package/lib/Locale/bn_BD.js +1 -1
- package/lib/Locale/by_BY.js +1 -1
- package/lib/Locale/ca_ES.js +1 -1
- package/lib/Locale/cs_CZ.js +1 -1
- package/lib/Locale/da_DK.js +1 -1
- package/lib/Locale/de_DE.js +1 -1
- package/lib/Locale/default.js +1 -1
- package/lib/Locale/el_GR.js +1 -1
- package/lib/Locale/en_GB.js +1 -1
- package/lib/Locale/en_US.js +1 -1
- package/lib/Locale/es_ES.js +1 -1
- package/lib/Locale/et_EE.js +1 -1
- package/lib/Locale/fa_IR.js +1 -1
- package/lib/Locale/fi_FI.js +1 -1
- package/lib/Locale/fr_BE.js +1 -1
- package/lib/Locale/fr_CA.js +1 -1
- package/lib/Locale/fr_FR.js +1 -1
- package/lib/Locale/ga_IE.js +1 -1
- package/lib/Locale/gl_ES.js +1 -1
- package/lib/Locale/he_IL.js +1 -1
- package/lib/Locale/hi_IN.js +1 -1
- package/lib/Locale/hr_HR.js +1 -1
- package/lib/Locale/hu_HU.js +1 -1
- package/lib/Locale/id_ID.js +1 -1
- package/lib/Locale/is_IS.js +1 -1
- package/lib/Locale/it_IT.js +1 -1
- package/lib/Locale/ja_JP.js +1 -1
- package/lib/Locale/ka_GE.js +1 -1
- package/lib/Locale/kk_KZ.js +1 -1
- package/lib/Locale/km_KH.js +1 -1
- package/lib/Locale/kmr_IQ.js +1 -1
- package/lib/Locale/kn_IN.js +1 -1
- package/lib/Locale/ko_KR.js +1 -1
- package/lib/Locale/ku_IQ.js +1 -1
- package/lib/Locale/lt_LT.js +1 -1
- package/lib/Locale/lv_LV.js +1 -1
- package/lib/Locale/mk_MK.js +1 -1
- package/lib/Locale/ml_IN.js +1 -1
- package/lib/Locale/mn_MN.js +1 -1
- package/lib/Locale/ms_MY.js +1 -1
- package/lib/Locale/nb_NO.js +1 -1
- package/lib/Locale/ne_NP.js +1 -1
- package/lib/Locale/nl_BE.js +1 -1
- package/lib/Locale/nl_NL.js +1 -1
- package/lib/Locale/pl_PL.js +1 -1
- package/lib/Locale/pt_BR.js +1 -1
- package/lib/Locale/pt_PT.js +1 -1
- package/lib/Locale/ro_RO.js +1 -1
- package/lib/Locale/ru_RU.js +1 -1
- package/lib/Locale/si_LK.js +1 -1
- package/lib/Locale/sk_SK.js +1 -1
- package/lib/Locale/sl_SI.js +1 -1
- package/lib/Locale/sr_RS.js +1 -1
- package/lib/Locale/sv_SE.js +1 -1
- package/lib/Locale/ta_IN.js +1 -1
- package/lib/Locale/th_TH.js +1 -1
- package/lib/Locale/tk_TK.js +1 -1
- package/lib/Locale/tr_TR.js +1 -1
- package/lib/Locale/uk_UA.js +1 -1
- package/lib/Locale/ur_PK.js +1 -1
- package/lib/Locale/vi_VN.js +1 -1
- package/lib/Locale/zh_CN.js +1 -1
- package/lib/Locale/zh_HK.js +1 -1
- package/lib/Locale/zh_TW.js +1 -1
- package/lib/Mentions/index.js +1 -1
- package/lib/Menu/index.js +1 -1
- package/lib/Modal/index.js +1 -1
- package/lib/PageHeader/index.js +2 -2
- package/lib/Pagination/index.js +1 -1
- package/lib/Popconfirm/index.js +1 -1
- package/lib/Popover/index.js +2 -2
- package/lib/Progress/index.js +1 -1
- package/lib/QuickMenu/index.js +2 -2
- package/lib/Radio/index.js +1 -1
- package/lib/Rate/index.js +1 -1
- package/lib/Result/index.js +2 -2
- package/lib/Result/noFound.js +1 -1
- package/lib/Result/serverError.js +1 -1
- package/lib/Result/unauthorized.js +1 -1
- package/lib/Segmented/index.js +1 -1
- package/lib/Select/index.js +2 -2
- package/lib/Skeleton/index.js +1 -1
- package/lib/Slider/index.js +1 -1
- package/lib/Space/index.js +1 -1
- package/lib/Spin/index.js +1 -1
- package/lib/Statistic/index.js +1 -1
- package/lib/Steps/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Table/index.js +1 -1
- package/lib/Tabs/hooks/useAnimateConfig.js +1 -1
- package/lib/Tabs/hooks/useLegacyItems.js +2 -2
- package/lib/Tabs/index.js +2 -2
- package/lib/Tabs/index.old.js +1 -1
- package/lib/Tag/index.js +2 -2
- package/lib/TestTable/LmBox.js +1 -1
- package/lib/TestTable/index.js +1 -1
- package/lib/TimePicker/index.js +1 -1
- package/lib/Timeline/index.js +1 -1
- package/lib/Tooltip/index.js +2 -2
- package/lib/Transfer/index.js +1 -1
- package/lib/Tree/DirectoryTree.js +2 -2
- package/lib/Tree/Tree.js +2 -2
- package/lib/Tree/TreeIndex.js +1 -1
- package/lib/Tree/index.js +2 -2
- package/lib/Tree/utils/dictUtil.js +1 -1
- package/lib/Tree/utils/dropIndicator.js +1 -1
- package/lib/Tree/utils/iconUtil.js +2 -2
- package/lib/TreeSelect/index.js +1 -1
- package/lib/Typography/Base/Ellipsis.js +2 -2
- package/lib/Typography/Base/EllipsisTooltip.js +2 -2
- package/lib/Typography/Base/index.js +2 -2
- package/lib/Typography/Editable.js +2 -2
- package/lib/Typography/Link.js +2 -2
- package/lib/Typography/Paragraph.js +2 -2
- package/lib/Typography/Text.js +2 -2
- package/lib/Typography/Title.js +2 -2
- package/lib/Typography/Typography.js +2 -2
- package/lib/Typography/hooks/useMergedConfig.js +2 -2
- package/lib/Typography/hooks/useUpdatedEffect.js +1 -1
- package/lib/Typography/index.js +1 -1
- package/lib/Upload/index.js +1 -1
- package/lib/UploadOss/index.js +1 -1
- package/lib/UploadOss/uploadBtn.js +2 -2
- package/lib/UploadOss/uploadImg.js +2 -2
- package/lib/VirtualList/index.js +1 -1
- package/lib/_util/hooks/useFlexGapSupport.js +2 -2
- package/lib/_util/hooks/useForceUpdate.js +2 -2
- package/lib/_util/placements.d.ts +1 -0
- package/lib/_util/reactNode.js +1 -1
- package/lib/_util/responsiveObserve.js +1 -1
- package/lib/_util/statusUtils.js +1 -1
- package/lib/_util/styleChecker.js +1 -1
- package/lib/_util/throttleByAnimationFrame.js +1 -1
- package/lib/_util/transButton.js +2 -2
- package/lib/_util/warning.js +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useFullscreen/index.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +99 -2
- package/lib/locale-provider/LocaleReceiver.js +2 -2
- package/lib/locale-provider/ar_EG.js +1 -1
- package/lib/locale-provider/az_AZ.js +1 -1
- package/lib/locale-provider/bg_BG.js +1 -1
- package/lib/locale-provider/bn_BD.js +1 -1
- package/lib/locale-provider/by_BY.js +1 -1
- package/lib/locale-provider/ca_ES.js +1 -1
- package/lib/locale-provider/cs_CZ.js +1 -1
- package/lib/locale-provider/da_DK.js +1 -1
- package/lib/locale-provider/de_DE.js +1 -1
- package/lib/locale-provider/default.js +1 -1
- package/lib/locale-provider/el_GR.js +1 -1
- package/lib/locale-provider/en_GB.js +1 -1
- package/lib/locale-provider/en_US.js +1 -1
- package/lib/locale-provider/es_ES.js +1 -1
- package/lib/locale-provider/et_EE.js +1 -1
- package/lib/locale-provider/fa_IR.js +1 -1
- package/lib/locale-provider/fi_FI.js +1 -1
- package/lib/locale-provider/fr_BE.js +1 -1
- package/lib/locale-provider/fr_CA.js +1 -1
- package/lib/locale-provider/fr_FR.js +1 -1
- package/lib/locale-provider/ga_IE.js +1 -1
- package/lib/locale-provider/gl_ES.js +1 -1
- package/lib/locale-provider/he_IL.js +1 -1
- package/lib/locale-provider/hi_IN.js +1 -1
- package/lib/locale-provider/hr_HR.js +1 -1
- package/lib/locale-provider/hu_HU.js +1 -1
- package/lib/locale-provider/hy_AM.js +1 -1
- package/lib/locale-provider/id_ID.js +1 -1
- package/lib/locale-provider/index.js +2 -2
- package/lib/locale-provider/is_IS.js +1 -1
- package/lib/locale-provider/it_IT.js +1 -1
- package/lib/locale-provider/ja_JP.js +1 -1
- package/lib/locale-provider/ka_GE.js +1 -1
- package/lib/locale-provider/kk_KZ.js +1 -1
- package/lib/locale-provider/km_KH.js +1 -1
- package/lib/locale-provider/kmr_IQ.js +1 -1
- package/lib/locale-provider/kn_IN.js +1 -1
- package/lib/locale-provider/ko_KR.js +1 -1
- package/lib/locale-provider/ku_IQ.js +1 -1
- package/lib/locale-provider/lt_LT.js +1 -1
- package/lib/locale-provider/lv_LV.js +1 -1
- package/lib/locale-provider/mk_MK.js +1 -1
- package/lib/locale-provider/ml_IN.js +1 -1
- package/lib/locale-provider/mn_MN.js +1 -1
- package/lib/locale-provider/ms_MY.js +1 -1
- package/lib/locale-provider/nb_NO.js +1 -1
- package/lib/locale-provider/ne_NP.js +1 -1
- package/lib/locale-provider/nl_BE.js +1 -1
- package/lib/locale-provider/nl_NL.js +1 -1
- package/lib/locale-provider/pl_PL.js +1 -1
- package/lib/locale-provider/pt_BR.js +1 -1
- package/lib/locale-provider/pt_PT.js +1 -1
- package/lib/locale-provider/ro_RO.js +1 -1
- package/lib/locale-provider/ru_RU.js +1 -1
- package/lib/locale-provider/si_LK.js +1 -1
- package/lib/locale-provider/sk_SK.js +1 -1
- package/lib/locale-provider/sl_SI.js +1 -1
- package/lib/locale-provider/sr_RS.js +1 -1
- package/lib/locale-provider/sv_SE.js +1 -1
- package/lib/locale-provider/ta_IN.js +1 -1
- package/lib/locale-provider/th_TH.js +1 -1
- package/lib/locale-provider/tk_TK.js +1 -1
- package/lib/locale-provider/tr_TR.js +1 -1
- package/lib/locale-provider/uk_UA.js +1 -1
- package/lib/locale-provider/ur_PK.js +1 -1
- package/lib/locale-provider/vi_VN.js +1 -1
- package/lib/locale-provider/zh_CN.js +1 -1
- package/lib/locale-provider/zh_HK.js +1 -1
- package/lib/locale-provider/zh_TW.js +1 -1
- package/lib/message/hooks/useMessage.js +2 -2
- package/lib/message/index.js +2 -2
- package/lib/notification/hooks/useNotification.js +2 -2
- package/lib/notification/index.js +5 -5
- package/lib/services/newRequest.js +4 -4
- package/lib/styles/variables.css +6153 -3
- package/package.json +2 -2
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { getIsHas, getValueForType, getFilterShow } from '../utils'; // 初始化查询结构
|
|
2
5
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.initLocalization = exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
15
|
-
|
|
16
|
-
var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
17
|
-
|
|
18
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
|
-
var _utils = require("../utils");
|
|
21
|
-
|
|
22
|
-
// 初始化查询结构
|
|
23
|
-
var initLocalization = function initLocalization(props) {
|
|
24
|
-
var _globalQuery$filters, _globalQuery$filters$, _fuzzyQuery$filters, _fuzzyQuery$filters$, _filterQuery$filters, _filterQuery$filters$;
|
|
6
|
+
export var initLocalization = function initLocalization(props) {
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
25
8
|
|
|
26
9
|
var localization = props.localization,
|
|
27
10
|
dataSource = props.dataSource,
|
|
@@ -40,22 +23,20 @@ var initLocalization = function initLocalization(props) {
|
|
|
40
23
|
var searchQuery = {}; // 模糊查询结构
|
|
41
24
|
|
|
42
25
|
var customFilter = (customOptions === null || customOptions === void 0 ? void 0 : customOptions.find(function (v) {
|
|
43
|
-
var
|
|
26
|
+
var _a;
|
|
44
27
|
|
|
45
|
-
return (v === null || v === void 0 ? void 0 : v.value) === (localization === null || localization === void 0 ? void 0 :
|
|
28
|
+
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);
|
|
46
29
|
})) || {};
|
|
47
30
|
var customQuery = {}; // 自定义筛选存储结构
|
|
48
31
|
// 一级查询
|
|
49
32
|
|
|
50
|
-
if (globalQuery === null || globalQuery === void 0 ? void 0 :
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
var globalQueryArr = (globalQuery === null || globalQuery === void 0 ? void 0 : (_globalQuery$filters2 = globalQuery.filters) === null || _globalQuery$filters2 === void 0 ? void 0 : (_globalQuery$filters3 = _globalQuery$filters2[0]) === null || _globalQuery$filters3 === void 0 ? void 0 : _globalQuery$filters3.conditions) || [];
|
|
33
|
+
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
|
+
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) || [];
|
|
54
35
|
customQuery = globalQueryArr.reduce(function (pre, cur) {
|
|
55
36
|
var checkedValue = cur.value; // 选中的数据
|
|
56
37
|
// 查找该数据是否展示
|
|
57
38
|
|
|
58
|
-
if (
|
|
39
|
+
if (getIsHas(checkedValue)) {
|
|
59
40
|
pre[cur.fieldName] = cur;
|
|
60
41
|
}
|
|
61
42
|
|
|
@@ -64,12 +45,10 @@ var initLocalization = function initLocalization(props) {
|
|
|
64
45
|
} // 模糊查询
|
|
65
46
|
|
|
66
47
|
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if ((0, _utils.getIsHas)(searchFilter[cur])) {
|
|
72
|
-
pre[cur] = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, searchConfig), {}, {
|
|
48
|
+
if (getIsHas(searchFilter)) {
|
|
49
|
+
searchQuery = (_e = Object.keys(searchFilter)) === null || _e === void 0 ? void 0 : _e.reduce(function (pre, cur) {
|
|
50
|
+
if (getIsHas(searchFilter[cur])) {
|
|
51
|
+
pre[cur] = Object.assign(Object.assign({}, searchConfig), {
|
|
73
52
|
fieldName: cur,
|
|
74
53
|
value: [searchFilter[cur]]
|
|
75
54
|
});
|
|
@@ -77,15 +56,13 @@ var initLocalization = function initLocalization(props) {
|
|
|
77
56
|
|
|
78
57
|
return pre;
|
|
79
58
|
}, {});
|
|
80
|
-
} else if (fuzzyQuery === null || fuzzyQuery === void 0 ? void 0 :
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
var fuzzyQueryArr = (fuzzyQuery === null || fuzzyQuery === void 0 ? void 0 : (_fuzzyQuery$filters2 = fuzzyQuery.filters) === null || _fuzzyQuery$filters2 === void 0 ? void 0 : (_fuzzyQuery$filters2$ = _fuzzyQuery$filters2[0]) === null || _fuzzyQuery$filters2$ === void 0 ? void 0 : _fuzzyQuery$filters2$.conditions) || []; // 初始化基础查询缓存
|
|
59
|
+
} 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) || []; // 初始化基础查询缓存
|
|
84
61
|
|
|
85
62
|
searchFilter = fuzzyQueryArr.reduce(function (pre, cur) {
|
|
86
63
|
var checkedValue = cur.value; // 选中的数据
|
|
87
64
|
|
|
88
|
-
if (
|
|
65
|
+
if (getIsHas(checkedValue)) {
|
|
89
66
|
searchQuery[cur.fieldName] = cur;
|
|
90
67
|
pre[cur.fieldName] = checkedValue[0];
|
|
91
68
|
}
|
|
@@ -95,10 +72,8 @@ var initLocalization = function initLocalization(props) {
|
|
|
95
72
|
} // 二级查询
|
|
96
73
|
|
|
97
74
|
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
basicQuery = (_Object$keys2 = Object.keys(basicFilter)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.reduce(function (pre, cur) {
|
|
75
|
+
if (getIsHas(basicFilter)) {
|
|
76
|
+
basicQuery = (_k = Object.keys(basicFilter)) === null || _k === void 0 ? void 0 : _k.reduce(function (pre, cur) {
|
|
102
77
|
var item = dataSource.find(function (v) {
|
|
103
78
|
if (cur === v.field) {
|
|
104
79
|
return v.show || typeof v.show !== 'boolean';
|
|
@@ -115,23 +90,19 @@ var initLocalization = function initLocalization(props) {
|
|
|
115
90
|
};
|
|
116
91
|
}
|
|
117
92
|
|
|
118
|
-
if (
|
|
119
|
-
var _item, _item2;
|
|
120
|
-
|
|
93
|
+
if (getIsHas(basicFilter[cur]) && !!item) {
|
|
121
94
|
pre[cur] = {
|
|
122
95
|
fieldName: cur,
|
|
123
|
-
fieldType: (
|
|
96
|
+
fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
|
|
124
97
|
value: Array.isArray(basicFilter[cur]) ? basicFilter[cur] : [basicFilter[cur]],
|
|
125
|
-
operator: (
|
|
98
|
+
operator: (item === null || item === void 0 ? void 0 : item.operator) || 'equal'
|
|
126
99
|
};
|
|
127
100
|
}
|
|
128
101
|
|
|
129
102
|
return pre;
|
|
130
103
|
}, {});
|
|
131
|
-
} else if (filterQuery === null || filterQuery === void 0 ? void 0 :
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
var filterQueryArr = (filterQuery === null || filterQuery === void 0 ? void 0 : (_filterQuery$filters2 = filterQuery.filters) === null || _filterQuery$filters2 === void 0 ? void 0 : (_filterQuery$filters3 = _filterQuery$filters2[0]) === null || _filterQuery$filters3 === void 0 ? void 0 : _filterQuery$filters3.conditions) || []; // 初始化基础查询缓存
|
|
104
|
+
} 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) || []; // 初始化基础查询缓存
|
|
135
106
|
|
|
136
107
|
basicFilter = filterQueryArr.reduce(function (pre, cur) {
|
|
137
108
|
var checkedValue = cur.value; // 选中的数据
|
|
@@ -147,7 +118,7 @@ var initLocalization = function initLocalization(props) {
|
|
|
147
118
|
return false;
|
|
148
119
|
});
|
|
149
120
|
|
|
150
|
-
if (
|
|
121
|
+
if (getIsHas(checkedValue) && someData || isSearchInput) {
|
|
151
122
|
basicQuery[cur.fieldName] = cur; // 复选/级联/日期区间
|
|
152
123
|
|
|
153
124
|
if (!['checkbox', 'cascader'].includes(cur.type) && checkedValue.length < 2) {
|
|
@@ -171,9 +142,6 @@ var initLocalization = function initLocalization(props) {
|
|
|
171
142
|
};
|
|
172
143
|
}; // 核心参数集合
|
|
173
144
|
|
|
174
|
-
|
|
175
|
-
exports.initLocalization = initLocalization;
|
|
176
|
-
|
|
177
145
|
var useCoreOptions = function useCoreOptions(_ref) {
|
|
178
146
|
var state = _ref.state,
|
|
179
147
|
dispatch = _ref.dispatch,
|
|
@@ -182,19 +150,20 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
182
150
|
dataSource = props.dataSource,
|
|
183
151
|
searchKey = props.searchKey,
|
|
184
152
|
searchConfig = props.searchConfig,
|
|
185
|
-
customOptions = props.customOptions
|
|
153
|
+
customOptions = props.customOptions,
|
|
154
|
+
enableAutoString = props.enableAutoString; // 转换一级查询结构 object => array
|
|
186
155
|
|
|
187
|
-
var tranformGlobalQuery =
|
|
188
|
-
var
|
|
156
|
+
var tranformGlobalQuery = useCallback(function (obj) {
|
|
157
|
+
var _a;
|
|
189
158
|
|
|
190
|
-
var nArr = ((
|
|
159
|
+
var nArr = ((_a = Object.keys(obj)) === null || _a === void 0 ? void 0 : _a.reduce(function (pre, cur) {
|
|
191
160
|
var item = dataSource.find(function (v) {
|
|
192
161
|
return cur === v.field;
|
|
193
162
|
});
|
|
194
163
|
var itemValue = obj[cur].value;
|
|
195
164
|
|
|
196
|
-
if (
|
|
197
|
-
return [].concat((
|
|
165
|
+
if (getIsHas(itemValue) && !!item) {
|
|
166
|
+
return [].concat(_toConsumableArray(pre), [{
|
|
198
167
|
fieldName: cur,
|
|
199
168
|
fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
|
|
200
169
|
type: item.type,
|
|
@@ -208,15 +177,15 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
208
177
|
return nArr;
|
|
209
178
|
}, [dataSource]); // 转行查询结构
|
|
210
179
|
|
|
211
|
-
var tranformQuery =
|
|
212
|
-
var
|
|
213
|
-
|
|
214
|
-
var _ref2$customFilter = _ref2.customFilter,
|
|
215
|
-
customFilter = _ref2$customFilter === void 0 ? {} : _ref2$customFilter,
|
|
180
|
+
var tranformQuery = useCallback(function (_ref2) {
|
|
181
|
+
var customFilter = _ref2.customFilter,
|
|
216
182
|
_ref2$searchQuery = _ref2.searchQuery,
|
|
217
183
|
searchQuery = _ref2$searchQuery === void 0 ? {} : _ref2$searchQuery,
|
|
218
184
|
_ref2$basicQuery = _ref2.basicQuery,
|
|
219
185
|
basicQuery = _ref2$basicQuery === void 0 ? {} : _ref2$basicQuery;
|
|
186
|
+
|
|
187
|
+
var _a, _b;
|
|
188
|
+
|
|
220
189
|
var globalQuery = {
|
|
221
190
|
filters: [{
|
|
222
191
|
conditions: tranformGlobalQuery(customFilter === null || customFilter === void 0 ? void 0 : customFilter.data)
|
|
@@ -224,14 +193,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
224
193
|
};
|
|
225
194
|
var fuzzyQuery = {
|
|
226
195
|
filters: [{
|
|
227
|
-
conditions: (
|
|
196
|
+
conditions: (_a = Object.keys(searchQuery)) === null || _a === void 0 ? void 0 : _a.map(function (k) {
|
|
228
197
|
return searchQuery[k];
|
|
229
198
|
})
|
|
230
199
|
}]
|
|
231
200
|
};
|
|
232
201
|
var filterQuery = {
|
|
233
202
|
filters: [{
|
|
234
|
-
conditions: (
|
|
203
|
+
conditions: (_b = Object.keys(basicQuery)) === null || _b === void 0 ? void 0 : _b.map(function (k) {
|
|
235
204
|
return basicQuery[k];
|
|
236
205
|
})
|
|
237
206
|
}]
|
|
@@ -243,7 +212,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
243
212
|
};
|
|
244
213
|
}, [tranformGlobalQuery]); // 触发查询 type basic基础筛选 | complex高级筛选
|
|
245
214
|
|
|
246
|
-
var onQuery =
|
|
215
|
+
var onQuery = useCallback(function () {
|
|
247
216
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
248
217
|
_ref3$complexFilter = _ref3.complexFilter,
|
|
249
218
|
complexFilter = _ref3$complexFilter === void 0 ? {} : _ref3$complexFilter,
|
|
@@ -260,6 +229,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
260
229
|
_ref3$customFilter = _ref3.customFilter,
|
|
261
230
|
customFilter = _ref3$customFilter === void 0 ? state.customFilter || {} : _ref3$customFilter;
|
|
262
231
|
|
|
232
|
+
var _a;
|
|
233
|
+
|
|
263
234
|
if (type === 'custom') {
|
|
264
235
|
dispatch({
|
|
265
236
|
type: 'changeCustomFilter',
|
|
@@ -354,16 +325,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
354
325
|
}
|
|
355
326
|
|
|
356
327
|
if (type === 'complex') {
|
|
357
|
-
var _Object$keys6;
|
|
358
|
-
|
|
359
328
|
// eslint-disable-next-line no-shadow
|
|
360
|
-
var _basicQuery = (
|
|
329
|
+
var _basicQuery = (_a = Object.keys(complexFilter)) === null || _a === void 0 ? void 0 : _a.reduce(function (pre, cur) {
|
|
361
330
|
var item = dataSource.find(function (v) {
|
|
362
331
|
return cur === v.field;
|
|
363
332
|
});
|
|
364
333
|
var itemValue = complexFilter[cur].value;
|
|
365
334
|
|
|
366
|
-
if (
|
|
335
|
+
if (getIsHas(itemValue) && !!item) {
|
|
367
336
|
// eslint-disable-next-line no-param-reassign
|
|
368
337
|
pre[cur] = {
|
|
369
338
|
fieldName: cur,
|
|
@@ -445,8 +414,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
445
414
|
}
|
|
446
415
|
}, [tranformQuery, state]); // 清除事件
|
|
447
416
|
|
|
448
|
-
var onClearChange =
|
|
449
|
-
var
|
|
417
|
+
var onClearChange = useCallback(function () {
|
|
418
|
+
var _a;
|
|
450
419
|
|
|
451
420
|
var params = {
|
|
452
421
|
searchFilter: {},
|
|
@@ -456,26 +425,26 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
456
425
|
basicQuery: {},
|
|
457
426
|
type: 'clear'
|
|
458
427
|
};
|
|
459
|
-
(
|
|
428
|
+
(_a = props.onClearChange) === null || _a === void 0 ? void 0 : _a.call(props, params);
|
|
460
429
|
onQuery(params);
|
|
461
430
|
}, [onQuery]); // 根据字段查找过滤的数据, 不存在时返回默认值
|
|
462
431
|
|
|
463
|
-
var getFilterValue =
|
|
432
|
+
var getFilterValue = useCallback(function (_ref4) {
|
|
464
433
|
var field = _ref4.field,
|
|
465
434
|
type = _ref4.type;
|
|
466
435
|
|
|
467
|
-
if (
|
|
436
|
+
if (getIsHas(state.basicFilter[field])) {
|
|
468
437
|
return state.basicFilter[field];
|
|
469
438
|
}
|
|
470
439
|
|
|
471
|
-
var defaultValue =
|
|
440
|
+
var defaultValue = getValueForType(type);
|
|
472
441
|
return state.basicFilter[field] || defaultValue;
|
|
473
442
|
}, [state.basicFilter]); // 获取查询结构
|
|
474
443
|
|
|
475
|
-
var getFilterQuery =
|
|
444
|
+
var getFilterQuery = useCallback(function () {
|
|
476
445
|
var originData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dataSource;
|
|
477
|
-
var basicFilter =
|
|
478
|
-
var basicQuery =
|
|
446
|
+
var basicFilter = getFilterShow(state.basicFilter, originData);
|
|
447
|
+
var basicQuery = getFilterShow(state.basicQuery, originData);
|
|
479
448
|
dispatch({
|
|
480
449
|
type: 'changeBasicFilter',
|
|
481
450
|
basicFilter: basicFilter
|
|
@@ -504,22 +473,24 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
504
473
|
};
|
|
505
474
|
}, [state, dataSource]); // 设置筛选的值 itemValue => String || Array => ['', '', ...]
|
|
506
475
|
|
|
507
|
-
var setFilterValue =
|
|
476
|
+
var setFilterValue = useCallback(function (itemValue, item) {
|
|
508
477
|
var field = item.field;
|
|
509
478
|
|
|
510
479
|
if (field) {
|
|
511
|
-
//
|
|
512
|
-
var
|
|
480
|
+
// 将结果转换为字符串
|
|
481
|
+
var stringValue = enableAutoString ? String(itemValue) : itemValue; // 基础查询数据(受控数据)
|
|
482
|
+
|
|
483
|
+
var basicFilter = Object.assign(Object.assign({}, state.basicFilter), _defineProperty({}, field, stringValue)); // 外部查询数据结构
|
|
513
484
|
|
|
514
|
-
var basicQuery =
|
|
485
|
+
var basicQuery = Object.assign(Object.assign({}, state.basicQuery), _defineProperty({}, field, {
|
|
515
486
|
fieldName: field,
|
|
516
487
|
fieldType: item.valueType || 'string',
|
|
517
488
|
type: item.type,
|
|
518
|
-
value: Array.isArray(
|
|
489
|
+
value: Array.isArray(stringValue) ? stringValue : [stringValue],
|
|
519
490
|
operator: item.operator || 'equal'
|
|
520
491
|
})); // 数据清除时不返回结构体
|
|
521
492
|
|
|
522
|
-
if (!
|
|
493
|
+
if (!getIsHas(itemValue)) {
|
|
523
494
|
delete basicFilter[field];
|
|
524
495
|
delete basicQuery[field];
|
|
525
496
|
} // 触发外部事件
|
|
@@ -533,17 +504,17 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
533
504
|
}
|
|
534
505
|
}, [state]); // 单个设置过滤字段值, 会触发onChange事件, 多个字段时使用setLocalization
|
|
535
506
|
|
|
536
|
-
var setFilterFieldValue =
|
|
507
|
+
var setFilterFieldValue = useCallback(function (field, value) {
|
|
537
508
|
var item = dataSource.find(function (v) {
|
|
538
509
|
return v.fidld === field;
|
|
539
510
|
}) || {};
|
|
540
511
|
setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue(value, item);
|
|
541
512
|
}, [dataSource]); // 读取缓存
|
|
542
513
|
|
|
543
|
-
var setLocalization =
|
|
514
|
+
var setLocalization = useCallback(function () {
|
|
544
515
|
var localization = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.localization;
|
|
545
516
|
|
|
546
|
-
var _initLocalization = initLocalization(
|
|
517
|
+
var _initLocalization = initLocalization(Object.assign(Object.assign({}, props), {
|
|
547
518
|
localization: localization
|
|
548
519
|
})),
|
|
549
520
|
searchFilter = _initLocalization.searchFilter,
|
|
@@ -579,20 +550,20 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
579
550
|
});
|
|
580
551
|
}, [props]); // 模糊查询结构
|
|
581
552
|
|
|
582
|
-
var setSearchFilter =
|
|
553
|
+
var setSearchFilter = useCallback(function (itemValue) {
|
|
583
554
|
var searchFilter = searchKey === null || searchKey === void 0 ? void 0 : searchKey.reduce(function (pre, cur) {
|
|
584
555
|
pre[cur] = itemValue;
|
|
585
556
|
return pre;
|
|
586
|
-
},
|
|
557
|
+
}, Object.assign({}, state.searchFilter));
|
|
587
558
|
var searchQuery = searchKey === null || searchKey === void 0 ? void 0 : searchKey.reduce(function (pre, cur) {
|
|
588
|
-
pre[cur] =
|
|
559
|
+
pre[cur] = Object.assign(Object.assign({}, searchConfig), {
|
|
589
560
|
fieldName: cur,
|
|
590
561
|
value: [itemValue]
|
|
591
562
|
});
|
|
592
563
|
return pre;
|
|
593
|
-
},
|
|
564
|
+
}, Object.assign({}, state.searchQuery)); // 数据清除时不返回结构体
|
|
594
565
|
|
|
595
|
-
if (!
|
|
566
|
+
if (!getIsHas(itemValue)) {
|
|
596
567
|
searchFilter = {};
|
|
597
568
|
searchQuery = {};
|
|
598
569
|
}
|
|
@@ -604,7 +575,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
604
575
|
});
|
|
605
576
|
}, [searchKey, state]); // 自定义筛选查询
|
|
606
577
|
|
|
607
|
-
var setCustomFilter =
|
|
578
|
+
var setCustomFilter = useCallback(function (val) {
|
|
608
579
|
var customFilter = customOptions.find(function (v) {
|
|
609
580
|
return v.value === val;
|
|
610
581
|
});
|
|
@@ -640,5 +611,4 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
640
611
|
};
|
|
641
612
|
};
|
|
642
613
|
|
|
643
|
-
|
|
644
|
-
exports.default = _default;
|
|
614
|
+
export default useCoreOptions;
|
package/es/LmFilter/index.js
CHANGED
package/es/LmFilter/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
4
|
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { useRef, forwardRef } from 'react';
|
|
2
|
+
import LmImgListRoot from './wrapper/Root';
|
|
3
|
+
var LmImgList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
4
|
+
var defaultRef = useRef(null);
|
|
5
|
+
var defaultProps = Object.assign({
|
|
6
|
+
type: 'default',
|
|
7
|
+
height: null,
|
|
8
|
+
dataSource: [],
|
|
9
|
+
initialIndex: 1,
|
|
10
|
+
infinite: false,
|
|
11
|
+
enableWheel: false,
|
|
12
|
+
enableScale: false,
|
|
13
|
+
enableRotate: false
|
|
14
|
+
}, props);
|
|
15
|
+
return /*#__PURE__*/React.createElement(LmImgListRoot, Object.assign({
|
|
16
|
+
ref: ref || defaultRef
|
|
17
|
+
}, defaultProps));
|
|
18
|
+
});
|
|
19
|
+
export default LmImgList;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React, { useMemo, useCallback } from 'react';
|
|
2
|
+
import { Carousel } from 'linkmore-design';
|
|
3
|
+
var BannerItem = /*#__PURE__*/React.memo(function (_ref) {
|
|
4
|
+
var key = _ref.key,
|
|
5
|
+
index = _ref.index,
|
|
6
|
+
item = _ref.item,
|
|
7
|
+
instance = _ref.instance;
|
|
8
|
+
var state = instance.state,
|
|
9
|
+
getIsVideo = instance.getIsVideo;
|
|
10
|
+
var transformProps = useMemo(function () {
|
|
11
|
+
if (index !== state.currentIndex) return {};
|
|
12
|
+
var _state$transform = state.transform,
|
|
13
|
+
scale = _state$transform.scale,
|
|
14
|
+
rotateZ = _state$transform.rotateZ;
|
|
15
|
+
return {
|
|
16
|
+
transform: "scale(".concat(scale, ") rotateZ(").concat(rotateZ, "deg)")
|
|
17
|
+
};
|
|
18
|
+
}, [state.currentIndex, state.transform]); // useEffect(() => {
|
|
19
|
+
// // 1. 创建 IntersectionObserver对象
|
|
20
|
+
// const ob = new IntersectionObserver(
|
|
21
|
+
// (entry) => {
|
|
22
|
+
// console.log('可见', entry[0].isIntersecting)
|
|
23
|
+
// if (entry[0].isIntersecting) {
|
|
24
|
+
// // 图片可见
|
|
25
|
+
// if (imgRef.current) {
|
|
26
|
+
// console.log('赋值src')
|
|
27
|
+
// imgRef.current.src = item
|
|
28
|
+
// setLoading(true)
|
|
29
|
+
// }
|
|
30
|
+
// ob.unobserve(imgRef.current!)
|
|
31
|
+
// }
|
|
32
|
+
// },
|
|
33
|
+
// {
|
|
34
|
+
// root: document.querySelector('.lm_imglist_banner'),
|
|
35
|
+
// },
|
|
36
|
+
// )
|
|
37
|
+
// if (imgRef.current) {
|
|
38
|
+
// // 2. 观察img
|
|
39
|
+
// ob.observe(imgRef.current!)
|
|
40
|
+
// return () => {
|
|
41
|
+
// ob.disconnect()
|
|
42
|
+
// }
|
|
43
|
+
// }
|
|
44
|
+
// }, [])
|
|
45
|
+
|
|
46
|
+
var renderView = useMemo(function () {
|
|
47
|
+
if (getIsVideo(item)) {
|
|
48
|
+
return (
|
|
49
|
+
/*#__PURE__*/
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
React.createElement("video", {
|
|
52
|
+
width: "100%",
|
|
53
|
+
height: "100%",
|
|
54
|
+
controls: "controls"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("source", {
|
|
56
|
+
src: item,
|
|
57
|
+
type: "video/mp4"
|
|
58
|
+
}), /*#__PURE__*/React.createElement("source", {
|
|
59
|
+
src: item,
|
|
60
|
+
type: "video/webm"
|
|
61
|
+
}), /*#__PURE__*/React.createElement("source", {
|
|
62
|
+
src: item,
|
|
63
|
+
type: "video/ogg"
|
|
64
|
+
}), "\u89C6\u9891\u64AD\u653E\u5931\u8D25\uFF01")
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
69
|
+
loading: "lazy",
|
|
70
|
+
alt: "",
|
|
71
|
+
src: item,
|
|
72
|
+
style: transformProps
|
|
73
|
+
});
|
|
74
|
+
}, [getIsVideo, item, transformProps]);
|
|
75
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: "banner_item"
|
|
77
|
+
}, renderView);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
var BigImg = function BigImg(_ref2) {
|
|
81
|
+
var instance = _ref2.instance;
|
|
82
|
+
var dataSource = instance.dataSource,
|
|
83
|
+
bodyRef = instance.bodyRef,
|
|
84
|
+
enableWheel = instance.enableWheel,
|
|
85
|
+
infinite = instance.infinite,
|
|
86
|
+
setTransform = instance.setTransform,
|
|
87
|
+
beforeChange = instance.beforeChange;
|
|
88
|
+
var onWheel = useCallback(function (e) {
|
|
89
|
+
if (!enableWheel) return;
|
|
90
|
+
|
|
91
|
+
if ((e === null || e === void 0 ? void 0 : e.deltaY) <= 0) {
|
|
92
|
+
setTransform('zoomIn');
|
|
93
|
+
} else {
|
|
94
|
+
setTransform('zoomOut');
|
|
95
|
+
}
|
|
96
|
+
}, [enableWheel, setTransform]);
|
|
97
|
+
var config = {
|
|
98
|
+
dots: false,
|
|
99
|
+
infinite: infinite,
|
|
100
|
+
adaptiveHeight: false,
|
|
101
|
+
beforeChange: beforeChange
|
|
102
|
+
};
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: "lm_imglist_banner",
|
|
105
|
+
onClick: function onClick(e) {
|
|
106
|
+
return e.stopPropagation();
|
|
107
|
+
},
|
|
108
|
+
onWheel: onWheel
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Carousel, Object.assign({
|
|
110
|
+
ref: bodyRef
|
|
111
|
+
}, config), dataSource.map(function (v, idx) {
|
|
112
|
+
return /*#__PURE__*/React.createElement(BannerItem, {
|
|
113
|
+
key: v || idx,
|
|
114
|
+
index: idx,
|
|
115
|
+
item: v,
|
|
116
|
+
instance: instance
|
|
117
|
+
});
|
|
118
|
+
})));
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export default /*#__PURE__*/React.memo(BigImg);
|