ztxkui 4.2.18-21 → 4.2.18-220
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/App.js +315 -291
- package/dist/Demo.js +64 -43
- package/dist/DemoCom/BasicDemo.js +57 -56
- package/dist/DemoCom/CodeQueryDemo.js +3 -2
- package/dist/DemoCom/CollapseDemo.js +28 -27
- package/dist/DemoCom/DragSort.js +11 -10
- package/dist/DemoCom/FormDemo.js +36 -30
- package/dist/DemoCom/PrintContainerDemo.js +151 -150
- package/dist/DemoCom/PrintDemo.js +15 -14
- package/dist/DemoCom/SinaturesDemo.js +9 -8
- package/dist/DemoCom/SyhDemo.js +21 -20
- package/dist/DemoCom/TableAnalyse.js +34 -33
- package/dist/DemoCom/TableDemo.js +73 -69
- package/dist/DemoCom/TableDemo1.js +84 -34
- package/dist/DemoCom/TableDetail.d.ts +9 -0
- package/dist/DemoCom/TableDetail.js +259 -0
- package/dist/DemoCom/TestCom.js +22 -19
- package/dist/DemoCom/data.d.ts +110 -0
- package/dist/DemoCom/data.js +2308 -0
- package/dist/TableDemo/BasicTable.js +225 -25
- package/dist/TableDemo/EditableTable.js +146 -72
- package/dist/TableDemo/ModalTable.js +25 -24
- package/dist/TableDemo/ProEditableTable.js +30 -29
- package/dist/TableDemo/data.d.ts +34 -0
- package/dist/TableDemo/data.js +387 -10
- package/dist/TableDemo/index.js +3 -3
- package/dist/TreeDemo.js +8 -7
- package/dist/TreeSelectDemo.js +12 -8
- package/dist/UI/Form/index.d.ts +3 -0
- package/dist/UI/Form/index.js +347 -0
- package/dist/UI/Input/index.d.ts +17 -0
- package/dist/UI/Input/index.js +74 -0
- package/dist/UI/InputNumber/index.d.ts +3 -0
- package/dist/UI/InputNumber/index.js +45 -0
- package/dist/UI/OldForm/index.d.ts +9 -0
- package/dist/UI/OldForm/index.js +302 -0
- package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
- package/dist/UI/Select/EmpForQuitDemo.js +120 -0
- package/dist/UI/Select/index.d.ts +10 -0
- package/dist/UI/Select/index.js +207 -0
- package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
- package/dist/UI/Table/BusinessListDemo.js +227 -0
- package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
- package/dist/UI/Table/BusinessMemberDemo.js +181 -0
- package/dist/UI/Table/index.d.ts +10 -0
- package/dist/UI/Table/index.js +850 -0
- package/dist/UI/TreeSelect/index.d.ts +3 -0
- package/dist/UI/TreeSelect/index.js +120 -0
- package/dist/UI/index.d.ts +2 -0
- package/dist/UI/index.js +34 -0
- package/dist/UploadDemo.js +27 -23
- package/dist/components/Button/button.d.ts +6 -0
- package/dist/components/Button/button.js +11 -4
- package/dist/components/Collapse/collapse.js +2 -1
- package/dist/components/DatePicker/data-picker.d.ts +3 -1
- package/dist/components/EnhanceSelect/index.d.ts +11 -1
- package/dist/components/EnhanceSelect/index.js +231 -49
- package/dist/components/EnhanceTree/index.js +4 -3
- package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
- package/dist/components/EnhanceTreeSelect/index.js +57 -7
- package/dist/components/Export/export.js +5 -4
- package/dist/components/Form/form.d.ts +11 -1
- package/dist/components/Form/form.js +5 -3
- package/dist/components/Input/input.d.ts +5 -3
- package/dist/components/Input/input.js +72 -3
- package/dist/components/InputNumber/input-number.js +3 -2
- package/dist/components/Layout/layout.d.ts +4 -4
- package/dist/components/Menu/menu.d.ts +1 -1
- package/dist/components/NumberCase/index.js +9 -7
- package/dist/components/Print/print.js +4 -3
- package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
- package/dist/components/PrintContainer/PrintModal.js +4 -3
- package/dist/components/PrintContainer/handle.d.ts +2 -4
- package/dist/components/PrintContainer/handle.js +3 -2
- package/dist/components/PrintContainer/lodop.js +2 -1
- package/dist/components/PrintContainer/print-container.js +74 -73
- package/dist/components/PrintContainer/service.js +5 -4
- package/dist/components/ProForm/hooks.d.ts +23 -0
- package/dist/components/ProForm/hooks.js +209 -0
- package/dist/components/ProForm/index.d.ts +9 -0
- package/dist/components/ProForm/index.js +168 -0
- package/dist/components/ProForm/interface.d.ts +200 -0
- package/dist/components/ProForm/interface.js +1 -0
- package/dist/components/ProForm/item.d.ts +13 -0
- package/dist/components/ProForm/item.js +222 -0
- package/dist/components/ProForm/items.d.ts +5 -0
- package/dist/components/ProForm/items.js +36 -0
- package/dist/components/ProForm/record-common-list.d.ts +18 -0
- package/dist/components/ProForm/record-common-list.js +83 -0
- package/dist/components/ProForm/search-drawer.d.ts +14 -0
- package/dist/components/ProForm/search-drawer.js +237 -0
- package/dist/components/ProForm/setting.d.ts +5 -0
- package/dist/components/ProForm/setting.js +12 -0
- package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
- package/dist/components/ProForm/useCommonSearch.js +352 -0
- package/dist/components/ProFormList/index.d.ts +12 -0
- package/dist/components/ProFormList/index.js +34 -0
- package/dist/components/RangePicker/range-picker.js +5 -2
- package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
- package/dist/components/SortableCancel/sortable-cancel.js +2 -2
- package/dist/components/Table/components/FillDown.js +2 -1
- package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
- package/dist/components/Table/components/FilterDropdown.js +36 -12
- package/dist/components/Table/hooks/useColumns.d.ts +5 -0
- package/dist/components/Table/hooks/useColumns.js +396 -22
- package/dist/components/Table/hooks/useDropRef.js +2 -1
- package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
- package/dist/components/Table/hooks/useScuRfresh.js +22 -0
- package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
- package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
- package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
- package/dist/components/Table/index.d.ts +4 -0
- package/dist/components/Table/table-adddel-column.js +4 -3
- package/dist/components/Table/table-dynamic.d.ts +1 -0
- package/dist/components/Table/table-dynamic.js +447 -60
- package/dist/components/Table/table-enhance-cell.d.ts +3 -0
- package/dist/components/Table/table-enhance-cell.js +28 -8
- package/dist/components/Table/table-menu.d.ts +7 -0
- package/dist/components/Table/table-menu.js +359 -0
- package/dist/components/Table/table-resizable-title.js +1 -0
- package/dist/components/Table/table-sort.js +4 -3
- package/dist/components/Table/table.d.ts +16 -0
- package/dist/components/Table/table.js +241 -65
- package/dist/components/Table/utils/dom.js +2 -1
- package/dist/components/Table/utils/filterHandle.d.ts +1 -1
- package/dist/components/Table/utils/filterHandle.js +27 -12
- package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
- package/dist/components/Table/utils/getSummaryData.js +279 -24
- package/dist/components/Table/utils/shallowEqual.js +2 -1
- package/dist/components/Table/utils/validate.js +25 -6
- package/dist/components/Tabs/tabs.d.ts +2 -0
- package/dist/components/Tabs/tabs.js +3 -1
- package/dist/components/TranslationButton/DownFile.d.ts +7 -0
- package/dist/components/TranslationButton/DownFile.js +95 -0
- package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
- package/dist/components/TranslationButton/PreviewFile.js +73 -0
- package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
- package/dist/components/TranslationButton/TranslationButton.js +245 -0
- package/dist/components/TranslationButton/hooks.d.ts +8 -0
- package/dist/components/TranslationButton/hooks.js +139 -0
- package/dist/components/TranslationButton/index.d.ts +4 -0
- package/dist/components/TranslationButton/index.js +4 -0
- package/dist/components/TreeSelect/index.d.ts +19 -0
- package/dist/components/TreeSelect/index.js +88 -0
- package/dist/components/Upload/upload-table.js +31 -26
- package/dist/components/Upload/upload.d.ts +20 -1
- package/dist/components/Upload/upload.js +172 -27
- package/dist/components/Upload/utils.d.ts +9 -2
- package/dist/components/Upload/utils.js +153 -38
- package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
- package/dist/components/UploadCustom/hooks/useDg.js +55 -0
- package/dist/components/UploadSingle/upload-single.js +5 -4
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/Watermark/index.js +2 -0
- package/dist/components/Watermark/interface.d.ts +20 -0
- package/dist/components/Watermark/interface.js +1 -0
- package/dist/components/Watermark/utils.d.ts +1 -0
- package/dist/components/Watermark/utils.js +70 -0
- package/dist/components/Watermark/water.d.ts +50 -0
- package/dist/components/Watermark/water.js +66 -0
- package/dist/components/Watermark/watermark-div.d.ts +4 -0
- package/dist/components/Watermark/watermark-div.js +41 -0
- package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
- package/dist/components/Watermark/watermark-shadow.js +116 -0
- package/dist/components/Watermark/watermark.d.ts +3 -0
- package/dist/components/Watermark/watermark.js +102 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
- package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
- package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/images.js +2 -0
- package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/index.js +2 -0
- package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/service.js +101 -0
- package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
- package/dist/components/ZtIcon/index.js +2 -0
- package/dist/components/business/Analyse/index.js +12 -11
- package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
- package/dist/components/business/CodeQuery/component/TableList.js +5 -4
- package/dist/components/business/CodeQuery/hooks.js +2 -1
- package/dist/components/business/CodeQuery/index.js +2 -1
- package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
- package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
- package/dist/components/business/Common/UserInfo/index.js +5 -4
- package/dist/components/business/Common/UserPassword/index.js +14 -11
- package/dist/components/business/Common/validatePassword.d.ts +1 -1
- package/dist/components/business/Common/validatePassword.js +17 -7
- package/dist/components/business/DetailCard/index.js +7 -6
- package/dist/components/business/DetailHeader/index.js +7 -6
- package/dist/components/business/DetailList/index.js +5 -4
- package/dist/components/business/DgColumns/index.js +12 -11
- package/dist/components/business/ExportButton/index.js +6 -5
- package/dist/components/business/Footer/index.js +4 -1
- package/dist/components/business/GridList/item.d.ts +1 -1
- package/dist/components/business/List/item.d.ts +1 -1
- package/dist/components/business/NewList/item.d.ts +1 -1
- package/dist/components/business/NewList/item.js +1 -1
- package/dist/components/business/OperationBtnGroup/index.js +17 -16
- package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
- package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
- package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
- package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
- package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
- package/dist/components/business/SearchContainer/record-common-item.js +83 -0
- package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
- package/dist/components/business/SearchContainer/record-common-list.js +95 -0
- package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
- package/dist/components/business/SearchContainer/search-container.js +66 -3
- package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-drawer.js +167 -13
- package/dist/components/business/SearchContainer/search-item.js +48 -5
- package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
- package/dist/components/business/SearchContainer/search-left.js +105 -68
- package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
- package/dist/components/business/SearchContainer/search-right.js +62 -5
- package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
- package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
- package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
- package/dist/components/business/SearchContainer/useTemplate.js +347 -0
- package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
- package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
- package/dist/components/business/Signatures/components/CodeModal.js +157 -0
- package/dist/components/business/Signatures/components/CompareResult.js +7 -6
- package/dist/components/business/Signatures/components/DetailTable.js +37 -34
- package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
- package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
- package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
- package/dist/components/business/Signatures/index.js +64 -53
- package/dist/components/business/SortList/sort-drawer.js +5 -4
- package/dist/components/business/Template/index.js +11 -10
- package/dist/components/electron-signatures/content.d.ts +9 -0
- package/dist/components/electron-signatures/content.js +1146 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
- package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
- package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
- package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
- package/dist/components/electron-signatures/demoComponents/index.js +30 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
- package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/making.js +211 -0
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
- package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
- package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/test.js +119 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
- package/dist/components/electron-signatures/index.d.ts +15 -0
- package/dist/components/electron-signatures/index.js +63 -0
- package/dist/components/electron-signatures/interface.d.ts +865 -0
- package/dist/components/electron-signatures/interface.js +57 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
- package/dist/components/electron-signatures/utils.d.ts +26 -0
- package/dist/components/electron-signatures/utils.js +67 -0
- package/dist/components/utils/MyStorage.d.ts +36 -0
- package/dist/components/utils/MyStorage.js +120 -0
- package/dist/components/utils/ZtxkContext.d.ts +67 -0
- package/dist/components/utils/ZtxkContext.js +20 -0
- package/dist/components/utils/checkSealCoUse.d.ts +16 -0
- package/dist/components/utils/checkSealCoUse.js +83 -0
- package/dist/components/utils/fetch.d.ts +10 -0
- package/dist/components/utils/fetch.js +119 -0
- package/dist/components/utils/index.d.ts +9 -0
- package/dist/components/utils/index.js +11 -0
- package/dist/components/utils/processNumber.d.ts +12 -0
- package/dist/components/utils/processNumber.js +106 -0
- package/dist/components/utils/upload.js +6 -3
- package/dist/components/utils/useBaseContext.d.ts +23 -0
- package/dist/components/utils/useBaseContext.js +31 -0
- package/dist/components/utils/useMemoizedFn.d.ts +4 -0
- package/dist/components/utils/useMemoizedFn.js +19 -0
- package/dist/components/utils/usePrevious.d.ts +3 -0
- package/dist/components/utils/usePrevious.js +13 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +2205 -58
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +255 -86
- package/dist/locales/en-US.json +828 -0
- package/dist/locales/zh-CN.json +828 -0
- package/dist/request.js +7 -6
- package/package.json +13 -4
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { memo } from 'react';
|
|
24
|
+
import { Form } from 'antd';
|
|
25
|
+
import classNames from 'classnames';
|
|
26
|
+
function runHandle(form, handle) {
|
|
27
|
+
return typeof handle === 'function' ? handle(form) : handle;
|
|
28
|
+
}
|
|
29
|
+
function Item(item) {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
var render = item.render, isRequired = item.isRequired, isDisplay = item.isDisplay, isChangeable = item.isChangeable, dependencies = item.dependencies, shouldUpdate = item.shouldUpdate, preText = item.preText, nextText = item.nextText, disabled = item.disabled, noBorder = item.noBorder, noLabel = item.noLabel, showBoxBorder = item.showBoxBorder, width = item.width, shouldUpdateNames = item.shouldUpdateNames, shouldUpdateClear = item.shouldUpdateClear, configName = item.configName, index = item.index, itemClassName = item.itemClassName, form = item.form, _isDisplayConfigInfo = item._isDisplayConfigInfo, _isRequireConfigInfo = item._isRequireConfigInfo, _isChangeableConfigInfo = item._isChangeableConfigInfo, outsideState = item.outsideState, shouldUpdateBeOutsideState = item.shouldUpdateBeOutsideState, hideItemBorderRadius = item.hideItemBorderRadius, resetItem = __rest(item, ["render", "isRequired", "isDisplay", "isChangeable", "dependencies", "shouldUpdate", "preText", "nextText", "disabled", "noBorder", "noLabel", "showBoxBorder", "width", "shouldUpdateNames", "shouldUpdateClear", "configName", "index", "itemClassName", "form", "_isDisplayConfigInfo", "_isRequireConfigInfo", "_isChangeableConfigInfo", "outsideState", "shouldUpdateBeOutsideState", "hideItemBorderRadius"]);
|
|
32
|
+
// 更新是否必填配置
|
|
33
|
+
var updateIsRequired = function (isRequired) {
|
|
34
|
+
var _a;
|
|
35
|
+
var isRequireBoolean = !!isRequired;
|
|
36
|
+
var rules = Array.isArray(resetItem.rules) ? resetItem.rules : [];
|
|
37
|
+
// 是否之前就传入了必填非必填逻辑
|
|
38
|
+
var requiredIndex = rules.findIndex(function (rule) {
|
|
39
|
+
if (typeof rule === 'function') {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return (rule === null || rule === void 0 ? void 0 : rule.required) === true || (rule === null || rule === void 0 ? void 0 : rule.required) === false;
|
|
43
|
+
});
|
|
44
|
+
// 如果找到了 直接替换之前的规则
|
|
45
|
+
if (requiredIndex !== -1) {
|
|
46
|
+
var message = (_a = rules[requiredIndex]) === null || _a === void 0 ? void 0 : _a.message;
|
|
47
|
+
rules.splice(requiredIndex, 1, {
|
|
48
|
+
required: isRequireBoolean,
|
|
49
|
+
message: message,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
rules.unshift({
|
|
54
|
+
required: isRequireBoolean,
|
|
55
|
+
message: resetItem.label + " \u672A\u586B!",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
resetItem.rules = rules;
|
|
59
|
+
};
|
|
60
|
+
// 处理配置相关逻辑 配置优先代码设置
|
|
61
|
+
// 传入了是否展示配置
|
|
62
|
+
var _isDisplay = typeof _isDisplayConfigInfo === 'undefined'
|
|
63
|
+
? runHandle(form, isDisplay)
|
|
64
|
+
: _isDisplayConfigInfo;
|
|
65
|
+
if (_isDisplay !== undefined) {
|
|
66
|
+
var isDisplayBoolean = !!_isDisplay;
|
|
67
|
+
if (!isDisplayBoolean) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// 传入了是否必填配置
|
|
72
|
+
var _isRequire = typeof _isRequireConfigInfo === 'undefined'
|
|
73
|
+
? runHandle(form, isRequired)
|
|
74
|
+
: _isRequireConfigInfo;
|
|
75
|
+
if (_isRequire !== undefined) {
|
|
76
|
+
var isRequireBoolean = !!_isRequire;
|
|
77
|
+
var rules = Array.isArray(resetItem.rules) ? resetItem.rules : [];
|
|
78
|
+
// 是否之前就传入了必填非必填逻辑
|
|
79
|
+
var requiredIndex = rules.findIndex(function (rule) {
|
|
80
|
+
if (typeof rule === 'function') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return (rule === null || rule === void 0 ? void 0 : rule.required) === true || (rule === null || rule === void 0 ? void 0 : rule.required) === false;
|
|
84
|
+
});
|
|
85
|
+
// 如果找到了 直接替换之前的规则
|
|
86
|
+
if (requiredIndex !== -1) {
|
|
87
|
+
var message = (_a = rules[requiredIndex]) === null || _a === void 0 ? void 0 : _a.message;
|
|
88
|
+
rules.splice(requiredIndex, 1, {
|
|
89
|
+
required: isRequireBoolean,
|
|
90
|
+
message: message,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
rules.unshift({
|
|
95
|
+
required: isRequireBoolean,
|
|
96
|
+
message: resetItem.label + " \u672A\u586B!",
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
resetItem.rules = rules;
|
|
100
|
+
}
|
|
101
|
+
// 传入了是否禁用配置
|
|
102
|
+
var itemProps = {
|
|
103
|
+
disabled: disabled,
|
|
104
|
+
};
|
|
105
|
+
var _isChangeable = typeof _isChangeableConfigInfo === 'undefined'
|
|
106
|
+
? runHandle(form, isChangeable)
|
|
107
|
+
: _isChangeableConfigInfo;
|
|
108
|
+
if (_isChangeable !== undefined) {
|
|
109
|
+
itemProps = {
|
|
110
|
+
disabled: !_isChangeable,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
var itemClasses = classNames('pro-form__item', itemClassName, {
|
|
114
|
+
'pro-form__item--disabled': itemProps.disabled,
|
|
115
|
+
'pro-form__item--noborder': noBorder,
|
|
116
|
+
'pro-form__item--nolabel': noLabel,
|
|
117
|
+
'pro-form__item--showboxborder': showBoxBorder,
|
|
118
|
+
'pro-form__item--hideitemborderradius': hideItemBorderRadius,
|
|
119
|
+
'pro-form__item--required': (resetItem === null || resetItem === void 0 ? void 0 : resetItem.rules) &&
|
|
120
|
+
((_c = (_b = resetItem.rules) === null || _b === void 0 ? void 0 : _b.find) === null || _c === void 0 ? void 0 : _c.call(_b, function (item) { return !!item.required; })),
|
|
121
|
+
});
|
|
122
|
+
// 如果不显示label
|
|
123
|
+
if (noLabel) {
|
|
124
|
+
resetItem.label = '';
|
|
125
|
+
}
|
|
126
|
+
if (dependencies) {
|
|
127
|
+
return (React.createElement(ItemWrap, { key: item.name, width: width },
|
|
128
|
+
preText ? preText : null,
|
|
129
|
+
React.createElement(Form.Item, { dependencies: dependencies, noStyle: true }, function (formInstance) {
|
|
130
|
+
return (React.createElement(Form.Item, __assign({}, resetItem, { className: itemClasses }), render(itemProps, formInstance)));
|
|
131
|
+
}),
|
|
132
|
+
nextText ? nextText : null));
|
|
133
|
+
}
|
|
134
|
+
if (shouldUpdate || shouldUpdateNames) {
|
|
135
|
+
var key = typeof item.name === 'string' ? item.name : index + '';
|
|
136
|
+
var shouldUpdateHandle = shouldUpdateNames
|
|
137
|
+
? function (prevValues, curValues, info) {
|
|
138
|
+
for (var i = 0; i < shouldUpdateNames.length; i++) {
|
|
139
|
+
var shouldUpdateName = shouldUpdateNames[i];
|
|
140
|
+
if (prevValues[shouldUpdateName] !== curValues[shouldUpdateName]) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (typeof shouldUpdate === 'function') {
|
|
145
|
+
return shouldUpdate(prevValues, curValues, info);
|
|
146
|
+
}
|
|
147
|
+
if (typeof shouldUpdate === 'boolean') {
|
|
148
|
+
return shouldUpdate;
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
: shouldUpdate;
|
|
153
|
+
return (React.createElement(ItemWrap, { key: key, width: width },
|
|
154
|
+
preText ? preText : null,
|
|
155
|
+
React.createElement(Form.Item, { shouldUpdate: shouldUpdateHandle, noStyle: true }, function (formInstance) {
|
|
156
|
+
if (typeof isDisplay === 'function') {
|
|
157
|
+
var isD = isDisplay(form);
|
|
158
|
+
if (!isD) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (typeof isRequired === 'function') {
|
|
163
|
+
var isR = isRequired(form);
|
|
164
|
+
updateIsRequired(isR);
|
|
165
|
+
}
|
|
166
|
+
if (typeof isChangeable === 'function') {
|
|
167
|
+
var isC = isChangeable(form);
|
|
168
|
+
itemProps.disabled = !isC;
|
|
169
|
+
}
|
|
170
|
+
return item.name ? (React.createElement(Form.Item, __assign({}, resetItem, { className: itemClasses }), render(itemProps, formInstance))) : (render(itemProps, formInstance));
|
|
171
|
+
}),
|
|
172
|
+
nextText ? nextText : null));
|
|
173
|
+
}
|
|
174
|
+
return (React.createElement(ItemWrap, { key: item.name, width: width },
|
|
175
|
+
preText ? preText : null,
|
|
176
|
+
React.createElement(Form.Item, __assign({}, resetItem, { className: itemClasses }), render(itemProps, form)),
|
|
177
|
+
nextText ? nextText : null));
|
|
178
|
+
}
|
|
179
|
+
function getWidthStr(width) {
|
|
180
|
+
switch (width) {
|
|
181
|
+
case 'half':
|
|
182
|
+
return '16.66%';
|
|
183
|
+
case 'all':
|
|
184
|
+
return '100%';
|
|
185
|
+
case 'double':
|
|
186
|
+
return '66.66%';
|
|
187
|
+
case 'halfAll':
|
|
188
|
+
return '50%';
|
|
189
|
+
default:
|
|
190
|
+
return '33.33%';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function ItemWrap(props) {
|
|
194
|
+
var className = props.className, children = props.children, width = props.width;
|
|
195
|
+
var itemClasses = classNames('pro-form__item--wrap', className);
|
|
196
|
+
return (React.createElement("div", { className: itemClasses, style: {
|
|
197
|
+
width: getWidthStr(width),
|
|
198
|
+
} }, children));
|
|
199
|
+
}
|
|
200
|
+
export default memo(Item);
|
|
201
|
+
// // export default memo(Item, (prev, next) => {
|
|
202
|
+
// // // 返回false 就表示组件需要渲染
|
|
203
|
+
// // 返回true 就表示组件不需要渲染
|
|
204
|
+
// // 编写高性能表单时,可能会用到这个配置
|
|
205
|
+
// if (next?.shouldUpdateBeOutsideState) {
|
|
206
|
+
// if (
|
|
207
|
+
// isEqual(prev, next, [
|
|
208
|
+
// 'render',
|
|
209
|
+
// 'shouldUpdateBeOutsideState',
|
|
210
|
+
// 'shouldUpdate',
|
|
211
|
+
// 'outsideState',
|
|
212
|
+
// ])
|
|
213
|
+
// ) {
|
|
214
|
+
// return !next.shouldUpdateBeOutsideState(
|
|
215
|
+
// prev.outsideState,
|
|
216
|
+
// next.outsideState
|
|
217
|
+
// );
|
|
218
|
+
// }
|
|
219
|
+
// return false;
|
|
220
|
+
// }
|
|
221
|
+
// return isEqual(prev, next);
|
|
222
|
+
// });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React, { memo } from 'react';
|
|
13
|
+
import Item from './item';
|
|
14
|
+
function Items(props) {
|
|
15
|
+
var items = props.items, itemClassName = props.itemClassName, form = props.form, configInfo = props.configInfo, outsideState = props.outsideState;
|
|
16
|
+
return (React.createElement(React.Fragment, null, items.map(function (item, index) {
|
|
17
|
+
var _a, _b, _c;
|
|
18
|
+
var key = typeof item.name === 'string' ? item.name : index + '';
|
|
19
|
+
var configName = item.configName;
|
|
20
|
+
// 只要是undefined,那么就取用户传入的配置
|
|
21
|
+
// 是否展示配置
|
|
22
|
+
var _isDisplayConfigInfo = configInfo
|
|
23
|
+
? (_a = configInfo[configName || item.name]) === null || _a === void 0 ? void 0 : _a.isDisplay
|
|
24
|
+
: undefined;
|
|
25
|
+
// 是否必填配置
|
|
26
|
+
var _isRequireConfigInfo = configInfo
|
|
27
|
+
? (_b = configInfo[configName || item.name]) === null || _b === void 0 ? void 0 : _b.isRequired
|
|
28
|
+
: undefined;
|
|
29
|
+
// 是否禁用配置
|
|
30
|
+
var _isChangeableConfigInfo = configInfo
|
|
31
|
+
? (_c = configInfo[configName || item.name]) === null || _c === void 0 ? void 0 : _c.isChangeable
|
|
32
|
+
: undefined;
|
|
33
|
+
return (React.createElement(Item, __assign({}, item, { key: key, _isDisplayConfigInfo: _isDisplayConfigInfo, _isRequireConfigInfo: _isRequireConfigInfo, _isChangeableConfigInfo: _isChangeableConfigInfo, index: index, form: form, itemClassName: itemClassName, outsideState: outsideState })));
|
|
34
|
+
})));
|
|
35
|
+
}
|
|
36
|
+
export default memo(Items);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISearchLayout } from './interface';
|
|
3
|
+
interface IRecordCommonList {
|
|
4
|
+
recordCommonList: any[];
|
|
5
|
+
setRecordCommonList: (list: any[]) => void;
|
|
6
|
+
currentRecordCommonSearchKey: string;
|
|
7
|
+
setCurrentRecordCommonSearchKey: (key: string) => void;
|
|
8
|
+
form: any;
|
|
9
|
+
reTransformData?: any;
|
|
10
|
+
deleteData?: any;
|
|
11
|
+
setReplaceData?: any;
|
|
12
|
+
updateServerData?: any;
|
|
13
|
+
onSearchHandle?: any;
|
|
14
|
+
setCurrentDynamicList?: (list: ISearchLayout[]) => void;
|
|
15
|
+
showDynamicKey?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const RecordCommonList: React.FC<IRecordCommonList>;
|
|
18
|
+
export default RecordCommonList;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Popconfirm } from '../../index';
|
|
4
|
+
import { DeleteOutlined } from '@ant-design/icons';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { DndProvider } from 'react-dnd';
|
|
7
|
+
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
8
|
+
import RecordCommonItem from '../business/SearchContainer/record-common-item';
|
|
9
|
+
import useMemoizedFn from '../utils/useMemoizedFn';
|
|
10
|
+
import update from 'immutability-helper';
|
|
11
|
+
import { setDynamicKey } from './hooks';
|
|
12
|
+
var RecordCommonList = function (props) {
|
|
13
|
+
var recordCommonList = props.recordCommonList, currentRecordCommonSearchKey = props.currentRecordCommonSearchKey, setCurrentRecordCommonSearchKey = props.setCurrentRecordCommonSearchKey, form = props.form, reTransformData = props.reTransformData, deleteData = props.deleteData, setReplaceData = props.setReplaceData, updateServerData = props.updateServerData, onSearchHandle = props.onSearchHandle, setCurrentDynamicList = props.setCurrentDynamicList, showDynamicKey = props.showDynamicKey;
|
|
14
|
+
var handleClick = function (item) {
|
|
15
|
+
if (currentRecordCommonSearchKey === item.key) {
|
|
16
|
+
setCurrentRecordCommonSearchKey === null || setCurrentRecordCommonSearchKey === void 0 ? void 0 : setCurrentRecordCommonSearchKey('');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
setCurrentRecordCommonSearchKey === null || setCurrentRecordCommonSearchKey === void 0 ? void 0 : setCurrentRecordCommonSearchKey(item.key);
|
|
20
|
+
// 更新动态列配置
|
|
21
|
+
if (showDynamicKey && item.dynamicList) {
|
|
22
|
+
setCurrentDynamicList === null || setCurrentDynamicList === void 0 ? void 0 : setCurrentDynamicList(item.dynamicList || []);
|
|
23
|
+
setDynamicKey(showDynamicKey, item.dynamicList || '', {
|
|
24
|
+
isNotSaveToServer: true,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
setTimeout(function () {
|
|
28
|
+
// 更新动态列配置
|
|
29
|
+
var formData = reTransformData === null || reTransformData === void 0 ? void 0 : reTransformData(item.value, item.timeKeys);
|
|
30
|
+
item.dynamicList.forEach(function (formItem) {
|
|
31
|
+
if (formItem.show) {
|
|
32
|
+
if (formData.hasOwnProperty(formItem.name)) {
|
|
33
|
+
// 只要 formData 里有这个字段(包括 null 或空字符串),就保留;否则置为 undefined
|
|
34
|
+
formData[formItem.name] = formData[formItem.name];
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
formData[formItem.name] = undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
form === null || form === void 0 ? void 0 : form.setFieldsValue(formData);
|
|
42
|
+
// 触发查询事件
|
|
43
|
+
onSearchHandle === null || onSearchHandle === void 0 ? void 0 : onSearchHandle();
|
|
44
|
+
}, 100);
|
|
45
|
+
};
|
|
46
|
+
var deleteItem = function (index) {
|
|
47
|
+
deleteData === null || deleteData === void 0 ? void 0 : deleteData(index);
|
|
48
|
+
};
|
|
49
|
+
var onMoveItem = useMemoizedFn(function (dragIndex, hoverIndex) {
|
|
50
|
+
// 由于对于固定列,不能进行拖拽排序,所以需要找出所有包含固定列的属性出来
|
|
51
|
+
var dragCard = recordCommonList[dragIndex];
|
|
52
|
+
var currentList = update(recordCommonList, {
|
|
53
|
+
$splice: [
|
|
54
|
+
[dragIndex, 1],
|
|
55
|
+
[hoverIndex, 0, dragCard],
|
|
56
|
+
],
|
|
57
|
+
});
|
|
58
|
+
setReplaceData === null || setReplaceData === void 0 ? void 0 : setReplaceData(currentList);
|
|
59
|
+
});
|
|
60
|
+
var onMoveEnd = useMemoizedFn(function () {
|
|
61
|
+
updateServerData === null || updateServerData === void 0 ? void 0 : updateServerData();
|
|
62
|
+
});
|
|
63
|
+
return recordCommonList.length > 0 ? (React.createElement("div", { className: "record-common-list--container" },
|
|
64
|
+
React.createElement("div", { className: "record-common-list--title" }, i18next.t('常用搜索')),
|
|
65
|
+
React.createElement("div", { className: "record-common-list--item--container" },
|
|
66
|
+
React.createElement(DndProvider, { backend: HTML5Backend, context: window }, recordCommonList.map(function (item, index) { return (React.createElement(RecordCommonItem, { type: "record-common-item", key: item.key, onMoveItem: onMoveItem, onMoveEnd: onMoveEnd, index: index, className: classNames('record-common-list--item', {
|
|
67
|
+
'record-common-list--item--active': currentRecordCommonSearchKey === item.key,
|
|
68
|
+
}), onClick: function () {
|
|
69
|
+
handleClick(item);
|
|
70
|
+
} },
|
|
71
|
+
React.createElement("div", { className: "record-common-list--item--title", title: item.title }, item.title),
|
|
72
|
+
React.createElement(Popconfirm, { title: i18next.t('确认删除吗?'), onConfirm: function (e) {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
(_a = e === null || e === void 0 ? void 0 : e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
75
|
+
(_b = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e);
|
|
76
|
+
deleteItem === null || deleteItem === void 0 ? void 0 : deleteItem(index);
|
|
77
|
+
if (item.key === currentRecordCommonSearchKey) {
|
|
78
|
+
setCurrentRecordCommonSearchKey === null || setCurrentRecordCommonSearchKey === void 0 ? void 0 : setCurrentRecordCommonSearchKey('');
|
|
79
|
+
}
|
|
80
|
+
}, onCancel: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); } },
|
|
81
|
+
React.createElement(DeleteOutlined, { onClick: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); }, className: "record-common-list--delete" })))); }))))) : null;
|
|
82
|
+
};
|
|
83
|
+
export default RecordCommonList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISearchLayout } from './interface';
|
|
3
|
+
interface IProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSure: (newList: ISearchLayout[]) => void;
|
|
7
|
+
onReset: () => void;
|
|
8
|
+
dynamicList: ISearchLayout[];
|
|
9
|
+
disabledHideItem?: boolean;
|
|
10
|
+
dynamicStorageKey?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: React.NamedExoticComponent<IProps>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
|
+
to[j] = from[i];
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
18
|
+
import React, { memo, useCallback, useMemo, useState, useEffect, useRef, } from 'react';
|
|
19
|
+
import { SettingOutlined } from '@ant-design/icons';
|
|
20
|
+
import { Drawer, Button, Sortable, Checkbox, SortableCancel, Input, message, } from '../../index';
|
|
21
|
+
import { DndProvider, useDrop } from 'react-dnd';
|
|
22
|
+
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
23
|
+
import update from 'immutability-helper';
|
|
24
|
+
import throttle from 'lodash/throttle';
|
|
25
|
+
var typeSymbol = Symbol('search-drawer');
|
|
26
|
+
var SearchDrawer = function (_a) {
|
|
27
|
+
var _b;
|
|
28
|
+
var visible = _a.visible, onClose = _a.onClose, onReset = _a.onReset, onSure = _a.onSure, dynamicList = _a.dynamicList, disabledHideItem = _a.disabledHideItem, dynamicStorageKey = _a.dynamicStorageKey, title = _a.title;
|
|
29
|
+
var _c = useState(dynamicList), innerDynamicList = _c[0], setInnerDynamicList = _c[1];
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
setInnerDynamicList(dynamicList);
|
|
32
|
+
}, [dynamicList]);
|
|
33
|
+
var checkedValues = useMemo(function () {
|
|
34
|
+
var _checkedValues = [];
|
|
35
|
+
innerDynamicList.forEach(function (item) {
|
|
36
|
+
if (item.show) {
|
|
37
|
+
_checkedValues.push(item.name);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return _checkedValues;
|
|
41
|
+
}, [innerDynamicList]);
|
|
42
|
+
var _d = useState(null), filterDynamicColumns = _d[0], setFilterDynamicColumns = _d[1];
|
|
43
|
+
var _e = useState([]), filterCheckedValues = _e[0], setFilterCheckedValues = _e[1];
|
|
44
|
+
var onFindItemHandle = useCallback(function (id) {
|
|
45
|
+
var dragItem = innerDynamicList === null || innerDynamicList === void 0 ? void 0 : innerDynamicList.filter(function (c) { return "" + c.name === id; })[0];
|
|
46
|
+
return {
|
|
47
|
+
dragItem: dragItem,
|
|
48
|
+
index: innerDynamicList === null || innerDynamicList === void 0 ? void 0 : innerDynamicList.indexOf(dragItem),
|
|
49
|
+
};
|
|
50
|
+
}, [innerDynamicList]);
|
|
51
|
+
var onMoveItemHandle = useCallback(function (id, to) {
|
|
52
|
+
var _a = onFindItemHandle(id), dragItem = _a.dragItem, index = _a.index;
|
|
53
|
+
var currentList = update(innerDynamicList, {
|
|
54
|
+
$splice: [
|
|
55
|
+
[index, 1],
|
|
56
|
+
[to, 0, dragItem],
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
setInnerDynamicList(currentList);
|
|
60
|
+
if (filterDynamicColumns) {
|
|
61
|
+
setFilterDynamicColumns(currentList.filter(function (c) {
|
|
62
|
+
return filterDynamicColumns === null || filterDynamicColumns === void 0 ? void 0 : filterDynamicColumns.find(function (f) { return f.name === c.name; });
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
}, [onFindItemHandle, innerDynamicList, filterDynamicColumns]);
|
|
66
|
+
/**移动事件 */
|
|
67
|
+
var onMoveItem = useCallback(function (dragIndex, hoverIndex) {
|
|
68
|
+
setInnerDynamicList(function (preDynamicList) {
|
|
69
|
+
var dragCard = preDynamicList[dragIndex];
|
|
70
|
+
var currentList = update(preDynamicList, {
|
|
71
|
+
$splice: [
|
|
72
|
+
[dragIndex, 1],
|
|
73
|
+
[hoverIndex, 0, dragCard],
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
return currentList;
|
|
77
|
+
});
|
|
78
|
+
}, []);
|
|
79
|
+
/**确认事件 */
|
|
80
|
+
var onSureHandle = useCallback(function () {
|
|
81
|
+
var _checkedValues = [];
|
|
82
|
+
innerDynamicList.forEach(function (item) {
|
|
83
|
+
if (item.show) {
|
|
84
|
+
_checkedValues.push(item.name);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
if (_checkedValues.length === 0) {
|
|
88
|
+
message.info(i18next.t('请至少保留一个展示项!'));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
onSure && onSure(innerDynamicList);
|
|
92
|
+
}, [onSure, innerDynamicList]);
|
|
93
|
+
var onCheckboxChange = function (checkedValues) {
|
|
94
|
+
var newCheckedValues = __spreadArray(__spreadArray([], filterCheckedValues), checkedValues);
|
|
95
|
+
var newDynamicList = innerDynamicList.map(function (item) { return (__assign({}, item)); }) || [];
|
|
96
|
+
newDynamicList.forEach(function (item) {
|
|
97
|
+
if (!newCheckedValues.find(function (value) { return value === item.name; })) {
|
|
98
|
+
item.show = false;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
item.show = true;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
setInnerDynamicList(newDynamicList);
|
|
105
|
+
};
|
|
106
|
+
/**底部按钮 */
|
|
107
|
+
var renderFooter = function () { return (React.createElement(React.Fragment, null,
|
|
108
|
+
React.createElement(Button, { type: "default", onClick: onClose }, i18next.t('取消')),
|
|
109
|
+
React.createElement(Button, { type: "default", onClick: onReset }, i18next.t('重置')),
|
|
110
|
+
React.createElement(Button, { type: "primary", onClick: onSureHandle }, i18next.t('确定')))); };
|
|
111
|
+
/**
|
|
112
|
+
* @description 表格列动态显示/隐藏 - 全选/反选按钮点击回调
|
|
113
|
+
* @author (可补充作者姓名)
|
|
114
|
+
* @param {('all' | 'inverse')} type - 操作类型:'all' 全选(仅对「过滤后可见+可动态操作」列生效),'inverse' 反选(同上)
|
|
115
|
+
* @see dynamicColumns - 原始完整表格列集合(包含所有列)
|
|
116
|
+
* @see filterDynamicColumns - 过滤后的可见列集合(仅操作此集合中的列)
|
|
117
|
+
* @see checkedValues - 已选中的列 key 集合(状态变量)
|
|
118
|
+
* @see setCheckedValues - 更新选中列的状态函数
|
|
119
|
+
* @note 核心规则(解决「过滤后操作不影响过滤前数据」的核心诉求):
|
|
120
|
+
* 1. 操作范围严格限制:仅对「过滤后可见列(filterDynamicColumns 优先,无则 dynamicColumns)+ 可动态操作(isNoDynamicHide: false)」的列生效
|
|
121
|
+
* 2. 过滤后隐藏的列(未在 targetColumns 中):无论是否可动态,均不参与全选/反选,保持其原始选中状态不变
|
|
122
|
+
* 3. 禁止动态隐藏的列(isNoDynamicHide: true):即使在过滤后可见,也不参与全选/反选,保持原始选中状态
|
|
123
|
+
* 4. 仅当操作后选中状态发生变化时才更新,避免无效渲染
|
|
124
|
+
*/
|
|
125
|
+
var onCheckBtn = function (type) {
|
|
126
|
+
// 1. 确定操作的目标列集合:仅对「过滤后可见列」操作(优先 filterDynamicColumns,无则用 dynamicColumns)
|
|
127
|
+
var targetColumns = filterDynamicColumns !== null && filterDynamicColumns !== void 0 ? filterDynamicColumns : innerDynamicList;
|
|
128
|
+
// 2. 拆分目标列中的两类列(仅在可见列范围内处理)
|
|
129
|
+
// 2.1 「可操作列」:过滤后可见 + 允许动态隐藏(isNoDynamicHide: false)→ 参与全选/反选
|
|
130
|
+
var operableKeys = targetColumns
|
|
131
|
+
.filter(function (column) { return !column.disabled && !column.dynamicDisabled; })
|
|
132
|
+
.map(function (column) { return column.name; });
|
|
133
|
+
var operableLen = operableKeys.length;
|
|
134
|
+
// 2.2 「不可操作列」:过滤后可见 + 禁止动态隐藏(isNoDynamicHide: true)→ 不参与操作,保留原选中状态
|
|
135
|
+
var visibleNonOperableKeys = targetColumns
|
|
136
|
+
.filter(function (column) { return column.disabled || column.dynamicDisabled; })
|
|
137
|
+
.map(function (column) { return column.name; });
|
|
138
|
+
// 3. 拆分当前已选中的 keys(确保「过滤后隐藏的列」状态不变)
|
|
139
|
+
// 3.1 已选中的「过滤后隐藏的列」:无论是否可动态,均保留原状态(不参与本次操作)
|
|
140
|
+
var hiddenCheckedKeys = checkedValues.filter(function (key) { return !targetColumns.some(function (column) { return column.name === key; }); } // 不在目标列(过滤后隐藏)的选中项
|
|
141
|
+
);
|
|
142
|
+
// 3.2 已选中的「可见不可操作列」:保留原选中状态
|
|
143
|
+
var visibleNonOperableCheckedKeys = checkedValues.filter(function (key) {
|
|
144
|
+
return visibleNonOperableKeys.includes(key);
|
|
145
|
+
});
|
|
146
|
+
// 3.3 已选中的「可见可操作列」:参与本次全选/反选
|
|
147
|
+
var operableCheckedKeys = checkedValues.filter(function (key) {
|
|
148
|
+
return operableKeys.includes(key);
|
|
149
|
+
});
|
|
150
|
+
// 4. 全选逻辑:仅选中「可见可操作列」,其他列(隐藏列、可见不可操作列)保持原状态
|
|
151
|
+
if (type === 'all') {
|
|
152
|
+
// 边界判断:仅当「已选中的可操作列数 ≠ 可操作列总数」时才更新(避免无效渲染)
|
|
153
|
+
if (operableCheckedKeys.length !== operableLen) {
|
|
154
|
+
onCheckboxChange(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], filterCheckedValues), operableKeys), visibleNonOperableCheckedKeys), hiddenCheckedKeys));
|
|
155
|
+
}
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
// 5. 反选逻辑:仅反选「可见可操作列」,其他列保持原状态
|
|
159
|
+
var inversedOperableKeys = operableKeys.filter(function (key) { return !operableCheckedKeys.includes(key); });
|
|
160
|
+
onCheckboxChange(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], filterCheckedValues), inversedOperableKeys), visibleNonOperableCheckedKeys), hiddenCheckedKeys));
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* @description 搜索过滤触发的回调
|
|
164
|
+
* @param value 搜索值
|
|
165
|
+
*/
|
|
166
|
+
var onSearchHandle = function (value) {
|
|
167
|
+
if (!value) {
|
|
168
|
+
setFilterCheckedValues([]);
|
|
169
|
+
setFilterDynamicColumns(null);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
var filterColumns = innerDynamicList.filter(function (column) {
|
|
173
|
+
var _a, _b, _c;
|
|
174
|
+
var title = column.label || column.hiddenLabelName || column.name;
|
|
175
|
+
return (_c = (_b = (_a = title === null || title === void 0 ? void 0 : title.toLowerCase) === null || _a === void 0 ? void 0 : _a.call(title)) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, value.toLowerCase());
|
|
176
|
+
});
|
|
177
|
+
// 未参与过滤的列,单独缓存起来
|
|
178
|
+
setFilterCheckedValues(checkedValues.filter(function (key) { return !filterColumns.find(function (column) { return column.name === key; }); }));
|
|
179
|
+
setFilterDynamicColumns(filterColumns);
|
|
180
|
+
};
|
|
181
|
+
var onSearchHandleThrottle = useCallback(throttle(function (e) {
|
|
182
|
+
onSearchHandle(e.target.value);
|
|
183
|
+
}, 500, { trailing: true }), [onSearchHandle]);
|
|
184
|
+
return (React.createElement(Drawer, { className: "search-drawer", title: React.createElement("div", null,
|
|
185
|
+
React.createElement(SettingOutlined, { style: { fontSize: 16 } }),
|
|
186
|
+
React.createElement("span", { className: "search-drawer--title-text" },
|
|
187
|
+
title ? title : i18next.t('查询条件自定义'),
|
|
188
|
+
React.createElement("span", null, i18next.t('(拖拽排序)')))), width: 290, placement: "right", visible: visible, closable: false, maskClosable: false, footer: renderFooter() },
|
|
189
|
+
React.createElement(DndProvider, { backend: HTML5Backend, context: window }, disabledHideItem ? (React.createElement(React.Fragment, null, innerDynamicList.map(function (item, index) {
|
|
190
|
+
var isActive = filterDynamicColumns === null || filterDynamicColumns === void 0 ? void 0 : filterDynamicColumns.find(function (column) { return column.name === item.name; });
|
|
191
|
+
return (React.createElement(Sortable, { className: isActive ? 'active' : '', key: item.name, type: "search-drawer", index: index, onMoveItem: onMoveItem },
|
|
192
|
+
React.createElement("div", null, item.label || item.name)));
|
|
193
|
+
}))) : (React.createElement("div", { className: "search-drawer--filter" },
|
|
194
|
+
React.createElement("div", { className: "search-drawer--filter-input" },
|
|
195
|
+
React.createElement(Input.Search, { placeholder: i18next.t('搜索'), onChange: onSearchHandleThrottle, onSearch: onSearchHandle }),
|
|
196
|
+
React.createElement(Button, { type: "default", className: "selector-all", loading: false, onClick: function () { return onCheckBtn('all'); } }, i18next.t('全选')),
|
|
197
|
+
React.createElement(Button, { type: "default", className: "selector-inverse", loading: false, onClick: function () { return onCheckBtn('inverse'); } }, i18next.t('反选'))),
|
|
198
|
+
React.createElement("div", { className: "search-drawer--filter-count" }, filterDynamicColumns !== null
|
|
199
|
+
? i18next.t('共 {{total}} 项,命中 {{count}} 项', {
|
|
200
|
+
total: innerDynamicList.length,
|
|
201
|
+
count: (_b = filterDynamicColumns === null || filterDynamicColumns === void 0 ? void 0 : filterDynamicColumns.length) !== null && _b !== void 0 ? _b : 0,
|
|
202
|
+
})
|
|
203
|
+
: i18next.t('共 {{total}} 项', {
|
|
204
|
+
total: innerDynamicList.length,
|
|
205
|
+
})),
|
|
206
|
+
React.createElement(Checkbox.Group, { value: checkedValues, onChange: onCheckboxChange },
|
|
207
|
+
React.createElement(Container
|
|
208
|
+
// dynamicColumns={filterDynamicColumns || innerDynamicList}
|
|
209
|
+
, {
|
|
210
|
+
// dynamicColumns={filterDynamicColumns || innerDynamicList}
|
|
211
|
+
dynamicColumns: innerDynamicList, filterDynamicColumns: filterDynamicColumns, onFindItemHandle: onFindItemHandle, onMoveItemHandle: onMoveItemHandle })))))));
|
|
212
|
+
};
|
|
213
|
+
function Container(_a) {
|
|
214
|
+
var dynamicColumns = _a.dynamicColumns, filterDynamicColumns = _a.filterDynamicColumns, onFindItemHandle = _a.onFindItemHandle, onMoveItemHandle = _a.onMoveItemHandle;
|
|
215
|
+
var _b = useDrop(function () { return ({ accept: typeSymbol }); }), drop = _b[1];
|
|
216
|
+
var containerRef = useRef(null);
|
|
217
|
+
// 搜索过滤变化时,滚动到第一个命中项
|
|
218
|
+
useEffect(function () {
|
|
219
|
+
if (filterDynamicColumns && filterDynamicColumns.length > 0) {
|
|
220
|
+
requestAnimationFrame(function () {
|
|
221
|
+
var _a;
|
|
222
|
+
var firstActive = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('.zt-sortable.active');
|
|
223
|
+
firstActive === null || firstActive === void 0 ? void 0 : firstActive.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}, [filterDynamicColumns]);
|
|
227
|
+
return (React.createElement("div", { ref: function (node) {
|
|
228
|
+
drop(node);
|
|
229
|
+
containerRef.current = node;
|
|
230
|
+
} }, Array.isArray(dynamicColumns) &&
|
|
231
|
+
dynamicColumns.map(function (item, index) {
|
|
232
|
+
var isActive = filterDynamicColumns === null || filterDynamicColumns === void 0 ? void 0 : filterDynamicColumns.find(function (column) { return column.name === item.name; });
|
|
233
|
+
return item.name ? (React.createElement(SortableCancel, { className: isActive ? 'active' : '', type: typeSymbol, key: item.name, id: item.name, onFindItem: onFindItemHandle, onMoveItem: onMoveItemHandle, tipTitle: item.label || item.hiddenLabelName || item.name },
|
|
234
|
+
React.createElement(Checkbox, { value: item.name, disabled: item.disabled || item.dynamicDisabled }, item.label || item.hiddenLabelName || item.name))) : null;
|
|
235
|
+
})));
|
|
236
|
+
}
|
|
237
|
+
export default memo(SearchDrawer);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { memo, useImperativeHandle } from 'react';
|
|
2
|
+
import { useDrawer } from './hooks';
|
|
3
|
+
import SearchDrawer from './search-drawer';
|
|
4
|
+
function Setting(props) {
|
|
5
|
+
var list = props.list, initList = props.initList, showDynamicKey = props.showDynamicKey, setCurrentDynamicList = props.setCurrentDynamicList, disabledHideItem = props.disabledHideItem, handleRef = props.handleRef, hideTemplateSetting = props.hideTemplateSetting, title = props.title;
|
|
6
|
+
var _a = useDrawer(initList, setCurrentDynamicList, showDynamicKey), visible = _a.visible, setVisible = _a.setVisible, onClose = _a.onClose, onReset = _a.onReset, onSure = _a.onSure;
|
|
7
|
+
useImperativeHandle(handleRef, function () { return ({
|
|
8
|
+
open: function () { return setVisible(true); },
|
|
9
|
+
}); });
|
|
10
|
+
return (React.createElement(React.Fragment, null, Array.isArray(list) && list.length ? (React.createElement(SearchDrawer, { visible: visible, onClose: onClose, onSure: onSure, onReset: onReset, dynamicList: list, disabledHideItem: disabledHideItem, dynamicStorageKey: showDynamicKey, initDynamicArr: initList, hideTemplateSetting: hideTemplateSetting, title: title })) : null));
|
|
11
|
+
}
|
|
12
|
+
export default memo(Setting);
|