@lingxiteam/ebe-utils 0.5.6 → 0.5.8
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/lib/pcpublic/src/components/pcfactory/src/DynamicTabs/TabPage.tsx +5 -1
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/assets/closeIcon.png +0 -0
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/assets/fileName.png +0 -0
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/assets/img.png +0 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFormatCell.ts +279 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/customLocale.tsx +6 -0
- package/lib/public/src/components/ExpBusiObjModal/index.less +28 -0
- package/lib/public/src/components/ExpBusiObjModal/index.tsx +315 -0
- package/lib/public/src/components/PreviewFile/index.less +200 -0
- package/lib/public/src/components/PreviewFile/index.tsx +787 -0
- package/lib/public/src/components/PreviewFile/utils.ts +90 -0
- package/lib/public/src/components/common/PreviewFile/index.less +200 -0
- package/lib/public/src/components/common/PreviewFile/index.tsx +787 -0
- package/lib/public/src/components/common/PreviewFile/utils.ts +90 -0
- package/lib/public/src/components/pcfactory/src/Alert/index.tsx +22 -0
- package/lib/public/src/components/pcfactory/src/Animation/index.tsx +186 -0
- package/lib/public/src/components/pcfactory/src/Animation/useAnimation.ts +270 -0
- package/lib/public/src/components/pcfactory/src/Animation/useBackgroundStyle.ts +74 -0
- package/lib/public/src/components/pcfactory/src/Audio/index.tsx +240 -0
- package/lib/public/src/components/pcfactory/src/BarChart/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/Button/index.tsx +151 -0
- package/lib/public/src/components/pcfactory/src/Card/index.tsx +201 -0
- package/lib/public/src/components/pcfactory/src/Card/useExtendBtn.tsx +195 -0
- package/lib/public/src/components/pcfactory/src/Cascader/index.tsx +398 -0
- package/lib/public/src/components/pcfactory/src/ChartBar/index.tsx +15 -0
- package/lib/public/src/components/pcfactory/src/ChartBar/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/ChartLine/ChartLine.tsx +48 -0
- package/lib/public/src/components/pcfactory/src/ChartLine/PropsType.ts +88 -0
- package/lib/public/src/components/pcfactory/src/ChartLine/index.tsx +15 -0
- package/lib/public/src/components/pcfactory/src/ChartLine/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/Checkbox/index.tsx +144 -0
- package/lib/public/src/components/pcfactory/src/CheckboxGroup/index.tsx +319 -0
- package/lib/public/src/components/pcfactory/src/Collapse/index.tsx +195 -0
- package/lib/public/src/components/pcfactory/src/CollapsePanel/index.tsx +186 -0
- package/lib/public/src/components/pcfactory/src/Condition/index.tsx +22 -0
- package/lib/public/src/components/pcfactory/src/DatePicker/index.tsx +756 -0
- package/lib/public/src/components/pcfactory/src/Description/index.tsx +447 -0
- package/lib/public/src/components/pcfactory/src/Description/utils/getLabelSizeMode.ts +40 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/CenterLineDivider/index.tsx +190 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/CenterTabDivider/index.tsx +77 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LeftCardDivider/index.tsx +87 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LeftLineDivider/index.tsx +106 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LeftTabDivider/index.tsx +60 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LeftTopDivider/index.tsx +55 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LxDashed/index.module.less +10 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LxDashed/index.tsx +143 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LxSolid/index.module.less +10 -0
- package/lib/public/src/components/pcfactory/src/Divider/components/LxSolid/index.tsx +126 -0
- package/lib/public/src/components/pcfactory/src/Divider/index.tsx +210 -0
- package/lib/public/src/components/pcfactory/src/Dropdown/index.tsx +385 -0
- package/lib/public/src/components/pcfactory/src/DynamicTabs/PropsType.ts +31 -0
- package/lib/public/src/components/pcfactory/src/DynamicTabs/TabPage.tsx +63 -0
- package/lib/public/src/components/pcfactory/src/DynamicTabs/index.tsx +214 -0
- package/lib/public/src/components/pcfactory/src/Form/Form.tsx +600 -0
- package/lib/public/src/components/pcfactory/src/Form/WrapperForm.ts +14 -0
- package/lib/public/src/components/pcfactory/src/Form/index.tsx +15 -0
- package/lib/public/src/components/pcfactory/src/Form/useFormStatus.ts +47 -0
- package/lib/public/src/components/pcfactory/src/Form/useMonitor.ts +40 -0
- package/lib/public/src/components/pcfactory/src/FormGroup/TitleComp.tsx +107 -0
- package/lib/public/src/components/pcfactory/src/FormGroup/index.tsx +181 -0
- package/lib/public/src/components/pcfactory/src/FreeLayout/index.tsx +151 -0
- package/lib/public/src/components/pcfactory/src/Gantt/Gantt.tsx +460 -0
- package/lib/public/src/components/pcfactory/src/Gantt/const.ts +122 -0
- package/lib/public/src/components/pcfactory/src/Gantt/index.tsx +16 -0
- package/lib/public/src/components/pcfactory/src/Gantt/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/GridView/GridView.tsx +435 -0
- package/lib/public/src/components/pcfactory/src/GridView/index.tsx +24 -0
- package/lib/public/src/components/pcfactory/src/GridView/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/HorizontalView/index.tsx +32 -0
- package/lib/public/src/components/pcfactory/src/Icon/IconED/index.tsx +42 -0
- package/lib/public/src/components/pcfactory/src/Icon/PropsType.ts +57 -0
- package/lib/public/src/components/pcfactory/src/Icon/hooks/index.tsx +300 -0
- package/lib/public/src/components/pcfactory/src/Icon/index.tsx +69 -0
- package/lib/public/src/components/pcfactory/src/IconFont/index.tsx +24 -0
- package/lib/public/src/components/pcfactory/src/Img/BasicImage/index.tsx +90 -0
- package/lib/public/src/components/pcfactory/src/Img/assets/placeholder.png +0 -0
- package/lib/public/src/components/pcfactory/src/Img/index.tsx +91 -0
- package/lib/public/src/components/pcfactory/src/Input/index.tsx +425 -0
- package/lib/public/src/components/pcfactory/src/InputNumber/index.tsx +263 -0
- package/lib/public/src/components/pcfactory/src/LXPieChart/LXPieChart.tsx +23 -0
- package/lib/public/src/components/pcfactory/src/LXPieChart/PropsType.ts +11 -0
- package/lib/public/src/components/pcfactory/src/LXPieChart/index.less +6 -0
- package/lib/public/src/components/pcfactory/src/LXPieChart/index.tsx +15 -0
- package/lib/public/src/components/pcfactory/src/LXPieChart/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/LXRadarChart/LXRadarChat.tsx +25 -0
- package/lib/public/src/components/pcfactory/src/LXRadarChart/PropsType.ts +9 -0
- package/lib/public/src/components/pcfactory/src/LXRadarChart/index.less +7 -0
- package/lib/public/src/components/pcfactory/src/LXRadarChart/index.tsx +17 -0
- package/lib/public/src/components/pcfactory/src/LXRadarChart/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/Layout/index.tsx +130 -0
- package/lib/public/src/components/pcfactory/src/Layout/utils.ts +48 -0
- package/lib/public/src/components/pcfactory/src/LineChart/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/Link/index.tsx +117 -0
- package/lib/public/src/components/pcfactory/src/LoopList/index.tsx +551 -0
- package/lib/public/src/components/pcfactory/src/Menu/index.tsx +422 -0
- package/lib/public/src/components/pcfactory/src/ModalSelect/BaseModalSelect.tsx +95 -0
- package/lib/public/src/components/pcfactory/src/ModalSelect/index.tsx +453 -0
- package/lib/public/src/components/pcfactory/src/MultipleSelect/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/Pagination/index.tsx +104 -0
- package/lib/public/src/components/pcfactory/src/Password/index.tsx +88 -0
- package/lib/public/src/components/pcfactory/src/PictureVerifyCode/assets/placeholder.png +0 -0
- package/lib/public/src/components/pcfactory/src/PictureVerifyCode/index.tsx +76 -0
- package/lib/public/src/components/pcfactory/src/PieChart/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/Progress/index.tsx +155 -0
- package/lib/public/src/components/pcfactory/src/QRCode/const.ts +5 -0
- package/lib/public/src/components/pcfactory/src/QRCode/index.tsx +146 -0
- package/lib/public/src/components/pcfactory/src/QuillEditor/QuillEditor.tsx +197 -0
- package/lib/public/src/components/pcfactory/src/QuillEditor/index.tsx +37 -0
- package/lib/public/src/components/pcfactory/src/QuillEditor/loader.ts +12 -0
- package/lib/public/src/components/pcfactory/src/RadarChart/RadarChartHook.ts +449 -0
- package/lib/public/src/components/pcfactory/src/RadarChart/RadarChartType.ts +39 -0
- package/lib/public/src/components/pcfactory/src/RadarChart/RadarECharts.tsx +86 -0
- package/lib/public/src/components/pcfactory/src/RadarChart/index.tsx +16 -0
- package/lib/public/src/components/pcfactory/src/RadarChart/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/RadarChart/radarDefaultConfig.js +55 -0
- package/lib/public/src/components/pcfactory/src/Radio/index.tsx +260 -0
- package/lib/public/src/components/pcfactory/src/RangePicker/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/Rate/index.tsx +187 -0
- package/lib/public/src/components/pcfactory/src/ReactECharts/PropsType.ts +37 -0
- package/lib/public/src/components/pcfactory/src/ReactECharts/ReactECharts.tsx +672 -0
- package/lib/public/src/components/pcfactory/src/ReactECharts/index.tsx +26 -0
- package/lib/public/src/components/pcfactory/src/ReactECharts/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/RemoteComponent/components/FishRender.tsx +31 -0
- package/lib/public/src/components/pcfactory/src/RemoteComponent/components/ReactRender.tsx +55 -0
- package/lib/public/src/components/pcfactory/src/RemoteComponent/components/VueRender.tsx +32 -0
- package/lib/public/src/components/pcfactory/src/RemoteComponent/constant.ts +9 -0
- package/lib/public/src/components/pcfactory/src/RemoteComponent/index.tsx +82 -0
- package/lib/public/src/components/pcfactory/src/RemoteComponent/remote-component.config.ts +12 -0
- package/lib/public/src/components/pcfactory/src/Result/index.tsx +27 -0
- package/lib/public/src/components/pcfactory/src/RichTextEditor/LcdpUeditorMain.tsx +105 -0
- package/lib/public/src/components/pcfactory/src/RichTextEditor/RichTextEditor.tsx +234 -0
- package/lib/public/src/components/pcfactory/src/RichTextEditor/RichTextEditorMain.tsx +41 -0
- package/lib/public/src/components/pcfactory/src/RichTextEditor/index.tsx +33 -0
- package/lib/public/src/components/pcfactory/src/RichTextEditor/loader.ts +12 -0
- package/lib/public/src/components/pcfactory/src/Row/Row.tsx +66 -0
- package/lib/public/src/components/pcfactory/src/Row/index.tsx +9 -0
- package/lib/public/src/components/pcfactory/src/Row/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/Select/index.tsx +628 -0
- package/lib/public/src/components/pcfactory/src/Select/selectUtils.ts +257 -0
- package/lib/public/src/components/pcfactory/src/Slider/index.tsx +351 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/DownloadProgress/DownloadProgress.tsx +27 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/DownloadProgress/index.ts +3 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/UploadItem.tsx +257 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/default.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/js.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/pdf.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/ppt.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/txt.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/word.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/xls.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/assets/zip.png +0 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/index.tsx +1050 -0
- package/lib/public/src/components/pcfactory/src/StdUpload/uploadItem.less +64 -0
- package/lib/public/src/components/pcfactory/src/Steps/constant/checkcircle.tsx +29 -0
- package/lib/public/src/components/pcfactory/src/Steps/constant/index.ts +2 -0
- package/lib/public/src/components/pcfactory/src/Steps/constant/vector.tsx +13 -0
- package/lib/public/src/components/pcfactory/src/Steps/index.tsx +343 -0
- package/lib/public/src/components/pcfactory/src/SuperSelect/ComSelect.tsx +538 -0
- package/lib/public/src/components/pcfactory/src/SuperSelect/index.tsx +127 -0
- package/lib/public/src/components/pcfactory/src/SuperSelect/loader.tsx +12 -0
- package/lib/public/src/components/pcfactory/src/Swiper/index.tsx +184 -0
- package/lib/public/src/components/pcfactory/src/Switch/index.tsx +219 -0
- package/lib/public/src/components/pcfactory/src/TabPane/index.tsx +145 -0
- package/lib/public/src/components/pcfactory/src/Table/BodyCell/index.tsx +278 -0
- package/lib/public/src/components/pcfactory/src/Table/EditComponent/index.tsx +554 -0
- package/lib/public/src/components/pcfactory/src/Table/FormatCell/GhostTag/index.tsx +34 -0
- package/lib/public/src/components/pcfactory/src/Table/FormatCell/Hyperlink/index.tsx +26 -0
- package/lib/public/src/components/pcfactory/src/Table/FormatCell/PointTag/index.tsx +41 -0
- package/lib/public/src/components/pcfactory/src/Table/FormatCell/PureColourFill/index.tsx +32 -0
- package/lib/public/src/components/pcfactory/src/Table/FormatCell/PureFadeColourTag/index.tsx +34 -0
- package/lib/public/src/components/pcfactory/src/Table/FormatCell/index.tsx +227 -0
- package/lib/public/src/components/pcfactory/src/Table/HeaderCell/HeaderCellTitle/index.tsx +63 -0
- package/lib/public/src/components/pcfactory/src/Table/HeaderCell/index.tsx +32 -0
- package/lib/public/src/components/pcfactory/src/Table/TableHead/index.tsx +501 -0
- package/lib/public/src/components/pcfactory/src/Table/TableSummaryRow/index.tsx +46 -0
- package/lib/public/src/components/pcfactory/src/Table/constant.ts +73 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/index.ts +32 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useCMDActions.ts +325 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useCheckStrict.ts +176 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useColumns.tsx +1851 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useCommon.ts +39 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useDataSource.ts +201 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useExpandable.tsx +324 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useFilter.tsx +274 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useFormatCell.ts +309 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/usePagination.ts +104 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +302 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useRowMerge.ts +93 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useScroll.ts +120 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useSelection.ts +467 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useSort.ts +39 -0
- package/lib/public/src/components/pcfactory/src/Table/hooks/useSummaryCol.ts +191 -0
- package/lib/public/src/components/pcfactory/src/Table/index.tsx +525 -0
- package/lib/public/src/components/pcfactory/src/Table/utils/SequenceId.ts +104 -0
- package/lib/public/src/components/pcfactory/src/Table/utils/index.ts +442 -0
- package/lib/public/src/components/pcfactory/src/Tabs/index.tsx +209 -0
- package/lib/public/src/components/pcfactory/src/Tag/index.tsx +39 -0
- package/lib/public/src/components/pcfactory/src/Text/index.tsx +191 -0
- package/lib/public/src/components/pcfactory/src/TextArea/ForIETextArea.tsx +96 -0
- package/lib/public/src/components/pcfactory/src/TextArea/index.tsx +255 -0
- package/lib/public/src/components/pcfactory/src/TimePicker/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/TlrView/index.tsx +3 -0
- package/lib/public/src/components/pcfactory/src/TooltipView/PropsType.ts +22 -0
- package/lib/public/src/components/pcfactory/src/TooltipView/TooltipViewED/index.tsx +10 -0
- package/lib/public/src/components/pcfactory/src/TooltipView/hooks/index.tsx +90 -0
- package/lib/public/src/components/pcfactory/src/TooltipView/index.tsx +13 -0
- package/lib/public/src/components/pcfactory/src/Transfer/index.tsx +753 -0
- package/lib/public/src/components/pcfactory/src/Tree/TreeNodeMenu/index.tsx +102 -0
- package/lib/public/src/components/pcfactory/src/Tree/index.tsx +1303 -0
- package/lib/public/src/components/pcfactory/src/TreeSelect/index.tsx +639 -0
- package/lib/public/src/components/pcfactory/src/TreeTable/hooks/index.ts +4 -0
- package/lib/public/src/components/pcfactory/src/TreeTable/hooks/useCMDAction.ts +82 -0
- package/lib/public/src/components/pcfactory/src/TreeTable/hooks/useExpandable.tsx +61 -0
- package/lib/public/src/components/pcfactory/src/TreeTable/index.tsx +273 -0
- package/lib/public/src/components/pcfactory/src/Upload/Upload.tsx +740 -0
- package/lib/public/src/components/pcfactory/src/Upload/index.tsx +29 -0
- package/lib/public/src/components/pcfactory/src/Upload/loader.tsx +13 -0
- package/lib/public/src/components/pcfactory/src/VerificationCode/assets/placeholder.png +0 -0
- package/lib/public/src/components/pcfactory/src/VerificationCode/index.tsx +297 -0
- package/lib/public/src/components/pcfactory/src/VerticalView/index.tsx +25 -0
- package/lib/public/src/components/pcfactory/src/VideoPlayer/index.tsx +159 -0
- package/lib/public/src/components/pcfactory/src/View/index.tsx +150 -0
- package/lib/public/src/components/pcfactory/src/View/useBackgroundStyle.ts +75 -0
- package/lib/public/src/components/pcfactory/src/VirtualGroup/index.tsx +16 -0
- package/lib/public/src/components/pcfactory/src/Webview/index.tsx +104 -0
- package/lib/public/src/components/pcfactory/src/index.component.ts +253 -0
- package/lib/public/src/components/pcfactory/src/styles/common.less +107 -0
- package/lib/public/src/components/pcfactory/src/styles/compatible.less +976 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Alert.less +25 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Audio.less +198 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Button.less +32 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Card.less +155 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Cascader.less +54 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Checkbox.less +7 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Collapse.less +214 -0
- package/lib/public/src/components/pcfactory/src/styles/components/DatePicker.less +22 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Description.less +64 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Divider.less +530 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Drawer.less +54 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Dropdown.less +11 -0
- package/lib/public/src/components/pcfactory/src/styles/components/DynamicDataContainer.less +16 -0
- package/lib/public/src/components/pcfactory/src/styles/components/DynamicTabs.less +254 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Form.less +265 -0
- package/lib/public/src/components/pcfactory/src/styles/components/FormGroup.less +111 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Gantt.less +139 -0
- package/lib/public/src/components/pcfactory/src/styles/components/GridView.less +62 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Icon.less +20 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Input.less +164 -0
- package/lib/public/src/components/pcfactory/src/styles/components/InputNumber.less +124 -0
- package/lib/public/src/components/pcfactory/src/styles/components/InputPassword.less +3 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Link.less +4 -0
- package/lib/public/src/components/pcfactory/src/styles/components/LoopList.less +67 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Menu.less +54 -0
- package/lib/public/src/components/pcfactory/src/styles/components/ModalSelect.less +42 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Popconfirm.less +7 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Progress.less +57 -0
- package/lib/public/src/components/pcfactory/src/styles/components/QuillEditor.less +15 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Radio.less +7 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Rate.less +16 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Result.less +26 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Select.less +146 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Slider.less +78 -0
- package/lib/public/src/components/pcfactory/src/styles/components/StdUpload.less +225 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Step.less +91 -0
- package/lib/public/src/components/pcfactory/src/styles/components/SuperSelect.less +83 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Swiper.less +106 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Switch.less +49 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Table.less +1229 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Tabs.less +291 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Tag.less +107 -0
- package/lib/public/src/components/pcfactory/src/styles/components/TextArea.less +12 -0
- package/lib/public/src/components/pcfactory/src/styles/components/TooltipView.less +43 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Transfer.less +155 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Tree.less +329 -0
- package/lib/public/src/components/pcfactory/src/styles/components/TreeSelect.less +65 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Upload.less +26 -0
- package/lib/public/src/components/pcfactory/src/styles/components/VerificationCode.less +162 -0
- package/lib/public/src/components/pcfactory/src/styles/components/Webview.less +31 -0
- package/lib/public/src/components/pcfactory/src/styles/index.less +10 -0
- package/lib/public/src/components/pcfactory/src/styles/index.ued.less +65 -0
- package/lib/public/src/components/pcfactory/src/styles/theme/variables/antdVariables.less +84 -0
- package/lib/public/src/components/pcfactory/src/styles/theme/variables/common.less +9 -0
- package/lib/public/src/components/pcfactory/src/styles/theme/variables/customVariables.less +35 -0
- package/lib/public/src/components/pcfactory/src/styles/theme/variables/index.less +2 -0
- package/lib/public/src/components/pcfactory/src/utils/ChannelContainer.tsx +150 -0
- package/lib/public/src/components/pcfactory/src/utils/ChildRender.ts +103 -0
- package/lib/public/src/components/pcfactory/src/utils/CustomModule.tsx +134 -0
- package/lib/public/src/components/pcfactory/src/utils/DummyFormContext.ts +136 -0
- package/lib/public/src/components/pcfactory/src/utils/Empty/customLocale.tsx +6 -0
- package/lib/public/src/components/pcfactory/src/utils/Empty/empty.tsx +37 -0
- package/lib/public/src/components/pcfactory/src/utils/LoaderHelper.tsx +29 -0
- package/lib/public/src/components/pcfactory/src/utils/PropsType.ts +21 -0
- package/lib/public/src/components/pcfactory/src/utils/WithSyncValue.ts +218 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/index.ts +22 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useCreation.ts +23 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useDeepCompareEffect.ts +27 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useMap.ts +46 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useMemoizedFn.ts +27 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/usePrevious.ts +19 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useSafeState.ts +26 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useSetState.ts +26 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useUnmountedRef.ts +14 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useUpdate.ts +9 -0
- package/lib/public/src/components/pcfactory/src/utils/ahooks/useUpdateEffect.ts +16 -0
- package/lib/public/src/components/pcfactory/src/utils/basicStatusTransfer.ts +32 -0
- package/lib/public/src/components/pcfactory/src/utils/common.ts +367 -0
- package/lib/public/src/components/pcfactory/src/utils/dynamicUtils/DynamicContext.tsx +106 -0
- package/lib/public/src/components/pcfactory/src/utils/formUtils/FormContext.tsx +131 -0
- package/lib/public/src/components/pcfactory/src/utils/formUtils/FormFields.tsx +646 -0
- package/lib/public/src/components/pcfactory/src/utils/formUtils/WrapperContainer.tsx +123 -0
- package/lib/public/src/components/pcfactory/src/utils/formUtils/cmdHelper.ts +411 -0
- package/lib/public/src/components/pcfactory/src/utils/formUtils/common.ts +28 -0
- package/lib/public/src/components/pcfactory/src/utils/getExportDefaultObj.ts +11 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useCommonImperativeHandle.ts +140 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useDataMask.ts +83 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useDoubleClick.ts +63 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useFuncExpExecute.ts +86 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useGetStaticAttrData.ts +41 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useHiddenStyle.ts +43 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useInitReactQuill.ts +90 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useListenState.ts +26 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useLocale.ts +129 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/usePrintMode.tsx +80 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useRules.ts +89 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useTestHelper.ts +26 -0
- package/lib/public/src/components/pcfactory/src/utils/hooks/useToggleBoolean.ts +33 -0
- package/lib/public/src/components/pcfactory/src/utils/index.ts +19 -0
- package/lib/public/src/components/pcfactory/src/utils/polyfill.js +305 -0
- package/lib/public/src/components/pcfactory/src/utils/renderReadOnly.tsx +105 -0
- package/lib/public/src/components/pcfactory/src/variables.ts +2 -0
- package/lib/public/src/components/pcfactory/typings.d.ts +27 -0
- package/lib/public/src/hooks/useGenerateContext.ts +73 -0
- package/lib/public/src/styles/common.less +41 -0
- package/lib/public/src/styles/index.less +4 -0
- package/lib/public/src/styles/index.ts +1 -0
- package/lib/public/src/styles/theme/variables.less +130 -0
- package/lib/public/src/utils/LcdpSpin/index.less +13 -0
- package/lib/public/src/utils/LcdpSpin/index.tsx +12 -0
- package/lib/public/src/utils/ModalManager/Drawer/index.less +30 -0
- package/lib/public/src/utils/ModalManager/Drawer/index.tsx +109 -0
- package/lib/public/src/utils/ModalManager/Modal/index.less +7 -0
- package/lib/public/src/utils/ModalManager/Modal/index.tsx +96 -0
- package/lib/public/src/utils/ModalManager/index.tsx +278 -0
- package/lib/public/src/utils/Security/encipher/des.ts +52 -0
- package/lib/public/src/utils/customFuncMapping.ts +107 -0
- package/lib/public/src/utils/formUtils.ts +458 -0
- package/lib/public/src/utils/i18n/i18n.ts +15 -0
- package/lib/public/src/utils/i18n/index.ts +7 -0
- package/lib/public/src/utils/i18n/locale/app/en_US.ts +77 -0
- package/lib/public/src/utils/i18n/locale/app/index.ts +9 -0
- package/lib/public/src/utils/i18n/locale/app/otherLocale.ts +2 -0
- package/lib/public/src/utils/i18n/locale/app/zh_CN.ts +65 -0
- package/lib/public/src/utils/i18n/locale/app/zh_HK.ts +66 -0
- package/lib/public/src/utils/i18n/locale/base/en_US.ts +449 -0
- package/lib/public/src/utils/i18n/locale/base/index.ts +5 -0
- package/lib/public/src/utils/i18n/locale/base/zh_CN.ts +413 -0
- package/lib/public/src/utils/i18n/locale/base/zh_HK.ts +411 -0
- package/lib/public/src/utils/i18n/locale/pc/en_US.ts +131 -0
- package/lib/public/src/utils/i18n/locale/pc/index.ts +9 -0
- package/lib/public/src/utils/i18n/locale/pc/otherLocale.ts +2 -0
- package/lib/public/src/utils/i18n/locale/pc/zh_CN.ts +105 -0
- package/lib/public/src/utils/i18n/locale/pc/zh_HK.ts +105 -0
- package/lib/public/src/utils/i18n/localeMonitor.ts +71 -0
- package/lib/public/src/utils/i18n/locales.ts +30 -0
- package/lib/public/src/utils/i18n/replaceMessage.ts +29 -0
- package/lib/public/src/utils/i18n/types.ts +2 -0
- package/lib/public/src/utils/i18n/useLocale.ts +129 -0
- package/lib/public/src/utils/messageApi.ts +93 -0
- package/lib/public/src/utils/service/commonFetch.ts +1 -1
- package/lib/public/src/utils/useTool.ts +428 -0
- package/package.json +2 -2
- /package/lib/public/src/utils/functors/{dateAdd.ts → DATEADD.ts} +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Rule } from 'antd/lib/form';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useCreation } from '../ahooks';
|
|
4
|
+
import { getRegExp } from '../common';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 通用规则获取
|
|
8
|
+
* @param regexp 规则列表
|
|
9
|
+
*/
|
|
10
|
+
export const getRegexpRules = (regexp: any[] | any, getLocale?: any): any[] => {
|
|
11
|
+
const _rules = [];
|
|
12
|
+
if (regexp) {
|
|
13
|
+
if (Array.isArray(regexp)) {
|
|
14
|
+
regexp?.forEach((exp) => {
|
|
15
|
+
const { pattern, message: newMsg } = exp;
|
|
16
|
+
if (pattern && newMsg) {
|
|
17
|
+
_rules.push({
|
|
18
|
+
pattern: typeof pattern === 'string' ? getRegExp(pattern) : pattern,
|
|
19
|
+
message: newMsg,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
} else {
|
|
24
|
+
_rules.push({
|
|
25
|
+
pattern: typeof regexp === 'string' ? getRegExp(regexp) : regexp,
|
|
26
|
+
message: getLocale?.('warnFormat') || '格式不正确',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return _rules;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export interface RuleInterface {
|
|
34
|
+
pattern?: RegExp;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 输入型控件通用规则
|
|
41
|
+
* @param param0
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
const useRules = (
|
|
45
|
+
{
|
|
46
|
+
required,
|
|
47
|
+
regexp,
|
|
48
|
+
rules,
|
|
49
|
+
message,
|
|
50
|
+
name,
|
|
51
|
+
}: {
|
|
52
|
+
required: boolean;
|
|
53
|
+
regexp: any[] | any;
|
|
54
|
+
rules: any[];
|
|
55
|
+
message?: string;
|
|
56
|
+
name: string;
|
|
57
|
+
},
|
|
58
|
+
getLocale?: any,
|
|
59
|
+
lang?: string,
|
|
60
|
+
): [Rule[], (rules: RuleInterface[], isAppendLastTime: boolean) => void] => {
|
|
61
|
+
const [extendRules, temSetExtendRules] = useState<Rule[]>([]);
|
|
62
|
+
|
|
63
|
+
const setExtendRules = (
|
|
64
|
+
rules: RuleInterface[],
|
|
65
|
+
isAppendLastTime: boolean,
|
|
66
|
+
) => {
|
|
67
|
+
if (Array.isArray(rules)) {
|
|
68
|
+
if (isAppendLastTime === true) {
|
|
69
|
+
temSetExtendRules([...extendRules, ...(rules || [])]);
|
|
70
|
+
} else {
|
|
71
|
+
temSetExtendRules(rules);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const finalRules = useCreation<{ rules: RuleInterface[] }>(() => {
|
|
76
|
+
let _rules: RuleInterface[] = [
|
|
77
|
+
{ required, message: getLocale?.('notEmpty', { name }) },
|
|
78
|
+
...getRegexpRules(regexp),
|
|
79
|
+
];
|
|
80
|
+
_rules = [..._rules, ...(rules || []), ...extendRules];
|
|
81
|
+
return {
|
|
82
|
+
rules: _rules,
|
|
83
|
+
};
|
|
84
|
+
}, [required, regexp, extendRules, rules, lang]);
|
|
85
|
+
|
|
86
|
+
return [finalRules.rules, setExtendRules];
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default useRules;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface TestHelperOptions {
|
|
2
|
+
fieldName?: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
// value: any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const toString = (val: any) => {
|
|
8
|
+
if (!val) {
|
|
9
|
+
return val;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (typeof val === 'object') {
|
|
13
|
+
return JSON.stringify(val);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return val;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const getTestHelperProps = (props: TestHelperOptions) => {
|
|
20
|
+
const { fieldName, disabled } = props;
|
|
21
|
+
return {
|
|
22
|
+
'aria-label': fieldName,
|
|
23
|
+
// 'aria-valuetext': value,
|
|
24
|
+
'aria-disabled': disabled,
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
import { useListenProps } from './useListenState';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 布尔值切换
|
|
6
|
+
* @param defaultValue 默认值
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export const useToggleBoolean = (
|
|
10
|
+
defaultValue: any,
|
|
11
|
+
): [boolean, (val: boolean | 'toggle') => void] => {
|
|
12
|
+
const [state, setState] = useState<boolean>(defaultValue);
|
|
13
|
+
const setToggleState = useCallback(
|
|
14
|
+
(val: boolean | 'toggle') => {
|
|
15
|
+
setState(val === 'toggle' ? !state : val);
|
|
16
|
+
},
|
|
17
|
+
[state],
|
|
18
|
+
);
|
|
19
|
+
return [state, setToggleState];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const useListenToggleBoolean = (
|
|
23
|
+
defaultValue: any,
|
|
24
|
+
): [boolean, (val: boolean | 'toggle') => void] => {
|
|
25
|
+
const [state, setState] = useListenProps<boolean>(defaultValue);
|
|
26
|
+
const setToggleState = useCallback(
|
|
27
|
+
(val: boolean | 'toggle') => {
|
|
28
|
+
setState(val === 'toggle' ? !state : val);
|
|
29
|
+
},
|
|
30
|
+
[state],
|
|
31
|
+
);
|
|
32
|
+
return [state, setToggleState];
|
|
33
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { default as basicStatusTransfer } from './basicStatusTransfer';
|
|
2
|
+
export * from './ChildRender';
|
|
3
|
+
export {
|
|
4
|
+
DynamicDataProvider,
|
|
5
|
+
useDynamicData,
|
|
6
|
+
} from './dynamicUtils/DynamicContext';
|
|
7
|
+
export type { DynamicDataContext } from './dynamicUtils/DynamicContext';
|
|
8
|
+
export * from './formUtils/cmdHelper';
|
|
9
|
+
export * from './formUtils/common';
|
|
10
|
+
export { FormProvider, useForm } from './formUtils/FormContext';
|
|
11
|
+
export type { FormContextProps } from './formUtils/FormContext';
|
|
12
|
+
export * from './formUtils/FormFields';
|
|
13
|
+
export { default as useCommonImperativeHandle } from './hooks/useCommonImperativeHandle';
|
|
14
|
+
export { default as useDataMask } from './hooks/useDataMask';
|
|
15
|
+
export { default as useHiddenStyle } from './hooks/useHiddenStyle';
|
|
16
|
+
export * from './hooks/useListenState';
|
|
17
|
+
export * from './hooks/usePrintMode';
|
|
18
|
+
export * from './hooks/useRules';
|
|
19
|
+
export * from './hooks/useToggleBoolean';
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* @description CSS resize polyfill for IE/Edge
|
|
4
|
+
* @author zhangxinxu(.com)
|
|
5
|
+
* @document https://www.zhangxinxu.com/wordpress/?p=8839
|
|
6
|
+
* @demo https://www.zhangxinxu.com/study/201908/textarea-resize-polyfill-demo.php
|
|
7
|
+
* @license MIT 鍙互鍏嶈垂浣跨敤锛屼絾浣滆€呭拰鏂囨。鍑哄闇€瑕佷繚鐣�
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* closest polyfill
|
|
12
|
+
*/
|
|
13
|
+
if (!Element.prototype.matches) {
|
|
14
|
+
Element.prototype.matches =
|
|
15
|
+
Element.prototype.msMatchesSelector ||
|
|
16
|
+
Element.prototype.webkitMatchesSelector;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (!Element.prototype.closest) {
|
|
20
|
+
Element.prototype.closest = function (s) {
|
|
21
|
+
let el = this;
|
|
22
|
+
|
|
23
|
+
do {
|
|
24
|
+
if (el.matches(s)) return el;
|
|
25
|
+
el = el.parentElement || el.parentNode;
|
|
26
|
+
} while (el !== null && el.nodeType === 1);
|
|
27
|
+
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* NodeList forEach support
|
|
34
|
+
*/
|
|
35
|
+
if (window.NodeList && !NodeList.prototype.forEach) {
|
|
36
|
+
NodeList.prototype.forEach = Array.prototype.forEach;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* resize polyfill
|
|
41
|
+
*/
|
|
42
|
+
if (
|
|
43
|
+
typeof window.getComputedStyle(document.body).resize === 'undefined' &&
|
|
44
|
+
window.HTMLTextAreaElement
|
|
45
|
+
) {
|
|
46
|
+
HTMLTextAreaElement.prototype.setResize = function () {
|
|
47
|
+
// 鍏冪礌
|
|
48
|
+
const textarea = this;
|
|
49
|
+
// 鏍峰紡鐨勬帶鍒朵笌澶勭悊
|
|
50
|
+
const styleDisplay = window.getComputedStyle(textarea).display;
|
|
51
|
+
let target = textarea.store && textarea.store.resize;
|
|
52
|
+
let resize = null;
|
|
53
|
+
// 鏂囨湰鍩熺殑id
|
|
54
|
+
let { id } = textarea;
|
|
55
|
+
if (!id) {
|
|
56
|
+
id = `r${Math.random()}`.replace('0.', '');
|
|
57
|
+
textarea.id = id;
|
|
58
|
+
}
|
|
59
|
+
// 鑾峰彇resize灞炴€у€�
|
|
60
|
+
let attrResize = textarea.getAttribute('resize');
|
|
61
|
+
|
|
62
|
+
if (
|
|
63
|
+
typeof attrResize === 'string' &&
|
|
64
|
+
attrResize !== 'vertical' &&
|
|
65
|
+
attrResize !== 'horizontal'
|
|
66
|
+
) {
|
|
67
|
+
attrResize = 'both';
|
|
68
|
+
}
|
|
69
|
+
if (typeof attrResize !== 'string') {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 鍒涘缓妯℃嫙鎷変几鐨勫熀鏈厓绱�
|
|
74
|
+
if (!target) {
|
|
75
|
+
target = document.createElement('span');
|
|
76
|
+
resize = document.createElement('label');
|
|
77
|
+
resize.setAttribute('for', id);
|
|
78
|
+
target.appendChild(resize);
|
|
79
|
+
// 涓€浜涘浐瀹氱殑鏍峰紡璁剧疆
|
|
80
|
+
target.style.position = 'relative';
|
|
81
|
+
target.style.verticalAlign =
|
|
82
|
+
window.getComputedStyle(textarea).verticalAlign;
|
|
83
|
+
|
|
84
|
+
resize.style.position = 'absolute';
|
|
85
|
+
resize.style.width = '17px';
|
|
86
|
+
resize.style.height = '17px';
|
|
87
|
+
resize.style.background =
|
|
88
|
+
"url(\"data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpath d='M765.558 510.004a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM765.558 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM422.15700000000004 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM422.15700000000004 510.004a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM765.558 202.54a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM66.77700000000002 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0z' fill='%23BFBFBF'/%3E%3C/svg%3E\") no-repeat center";
|
|
89
|
+
resize.style.bottom = '0';
|
|
90
|
+
resize.style.right = '0';
|
|
91
|
+
resize.style.backgroundSize = '12px 12px';
|
|
92
|
+
// 鍦╰extarea鍏冪礌鍚庨潰鏄剧ず
|
|
93
|
+
textarea.insertAdjacentElement('afterend', target);
|
|
94
|
+
textarea.store = textarea.store || {};
|
|
95
|
+
textarea.store.resize = target;
|
|
96
|
+
|
|
97
|
+
// 浜嬩欢
|
|
98
|
+
const store = {};
|
|
99
|
+
resize.addEventListener('mousedown', (event) => {
|
|
100
|
+
store.resizing = true;
|
|
101
|
+
store.startX = event.pageX;
|
|
102
|
+
store.startY = event.pageY;
|
|
103
|
+
// 姝ゆ椂textarea鐨勫昂瀵�
|
|
104
|
+
store.offsetWidth = textarea.offsetWidth;
|
|
105
|
+
store.offsetHeight = textarea.offsetHeight;
|
|
106
|
+
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
document.addEventListener('mousemove', (event) => {
|
|
111
|
+
if (!store.resizing) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
|
|
116
|
+
const currentX = event.pageX;
|
|
117
|
+
const currentY = event.pageY;
|
|
118
|
+
|
|
119
|
+
const moveX = currentX - store.startX;
|
|
120
|
+
const moveY = currentY - store.startY;
|
|
121
|
+
|
|
122
|
+
let currentWidth = store.offsetWidth + moveX;
|
|
123
|
+
let currentHeight = store.offsetHeight + moveY;
|
|
124
|
+
|
|
125
|
+
if (currentWidth < 40) {
|
|
126
|
+
currentWidth = 40;
|
|
127
|
+
}
|
|
128
|
+
if (currentHeight < 40) {
|
|
129
|
+
currentHeight = 40;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// 灏哄璁剧疆
|
|
133
|
+
if (attrResize === 'both' || attrResize === 'horizontal') {
|
|
134
|
+
textarea.style.width = `${currentWidth}px`;
|
|
135
|
+
if (target.style.display === 'block') {
|
|
136
|
+
target.style.width = `${currentWidth}px`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (attrResize === 'both' || attrResize === 'vertical') {
|
|
140
|
+
textarea.style.height = `${currentHeight}px`;
|
|
141
|
+
if (/inline/.test(styleDisplay)) {
|
|
142
|
+
target.style.height = `${currentHeight}px`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
document.addEventListener('mouseup', () => {
|
|
148
|
+
if (store.resizing) {
|
|
149
|
+
store.resizing = false;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (styleDisplay === 'none') {
|
|
155
|
+
target.style.display = 'none';
|
|
156
|
+
} else if (/inline/.test(styleDisplay)) {
|
|
157
|
+
target.style.display = 'inline-block';
|
|
158
|
+
target.style.height = `${textarea.offsetHeight}px`;
|
|
159
|
+
} else {
|
|
160
|
+
target.style.display = 'block';
|
|
161
|
+
target.style.width = `${textarea.offsetWidth}px`;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
HTMLTextAreaElement.prototype.initResize = function () {
|
|
166
|
+
this.setResize();
|
|
167
|
+
|
|
168
|
+
// 鏇存柊涓庡鐞�
|
|
169
|
+
this.addEventListener(
|
|
170
|
+
'DOMAttrModified',
|
|
171
|
+
function () {
|
|
172
|
+
this.setResize();
|
|
173
|
+
},
|
|
174
|
+
false,
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
179
|
+
document.querySelectorAll('textarea[resize]').forEach((textarea) => {
|
|
180
|
+
textarea.initResize();
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// 鎻掑叆鍐呭鏃跺€欑殑鑷姩鍒濆鍖�
|
|
184
|
+
document.body.addEventListener('DOMNodeInserted', (event) => {
|
|
185
|
+
// 鎻掑叆鐨勫厓绱�
|
|
186
|
+
const { target } = event;
|
|
187
|
+
|
|
188
|
+
if (
|
|
189
|
+
typeof target.matches === 'function' &&
|
|
190
|
+
target.matches('textarea[resize]') &&
|
|
191
|
+
(!target.store || !target.store.resize)
|
|
192
|
+
) {
|
|
193
|
+
target.initResize();
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* CSS.escape polyfill
|
|
201
|
+
*/
|
|
202
|
+
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
203
|
+
(function (root, factory) {
|
|
204
|
+
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
|
205
|
+
if (typeof exports === 'object') {
|
|
206
|
+
// For Node.js.
|
|
207
|
+
module.exports = factory(root);
|
|
208
|
+
// eslint-disable-next-line no-undef
|
|
209
|
+
} else if (typeof define === 'function' && define.amd) {
|
|
210
|
+
// For AMD. Register as an anonymous module.
|
|
211
|
+
// eslint-disable-next-line no-undef
|
|
212
|
+
define([], factory.bind(root, root));
|
|
213
|
+
} else {
|
|
214
|
+
// For browser globals (not exposing the function separately).
|
|
215
|
+
factory(root);
|
|
216
|
+
}
|
|
217
|
+
})(typeof global !== 'undefined' ? global : this, (root) => {
|
|
218
|
+
if (root.CSS && root.CSS.escape) {
|
|
219
|
+
return root.CSS.escape;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// https://drafts.csswg.org/cssom/#serialize-an-identifier
|
|
223
|
+
const cssEscape = function (value) {
|
|
224
|
+
if (arguments.length === 0) {
|
|
225
|
+
throw new TypeError('`CSS.escape` requires an argument.');
|
|
226
|
+
}
|
|
227
|
+
const string = String(value);
|
|
228
|
+
const { length } = string;
|
|
229
|
+
let index = -1;
|
|
230
|
+
let codeUnit;
|
|
231
|
+
let result = '';
|
|
232
|
+
const firstCodeUnit = string.charCodeAt(0);
|
|
233
|
+
|
|
234
|
+
if (
|
|
235
|
+
// If the character is the first character and is a `-` (U+002D), and
|
|
236
|
+
// there is no second character, […]
|
|
237
|
+
length === 1 &&
|
|
238
|
+
firstCodeUnit === 0x002d
|
|
239
|
+
) {
|
|
240
|
+
return `\\${string}`;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
while (++index < length) {
|
|
244
|
+
codeUnit = string.charCodeAt(index);
|
|
245
|
+
// Note: there’s no need to special-case astral symbols, surrogate
|
|
246
|
+
// pairs, or lone surrogates.
|
|
247
|
+
|
|
248
|
+
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
249
|
+
// (U+FFFD).
|
|
250
|
+
if (codeUnit === 0x0000) {
|
|
251
|
+
result += '\uFFFD';
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (
|
|
256
|
+
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
257
|
+
// U+007F, […]
|
|
258
|
+
(codeUnit >= 0x0001 && codeUnit <= 0x001f) ||
|
|
259
|
+
codeUnit == 0x007f ||
|
|
260
|
+
// If the character is the first character and is in the range [0-9]
|
|
261
|
+
// (U+0030 to U+0039), […]
|
|
262
|
+
(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
|
263
|
+
// If the character is the second character and is in the range [0-9]
|
|
264
|
+
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
265
|
+
(index == 1 &&
|
|
266
|
+
codeUnit >= 0x0030 &&
|
|
267
|
+
codeUnit <= 0x0039 &&
|
|
268
|
+
firstCodeUnit == 0x002d)
|
|
269
|
+
) {
|
|
270
|
+
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
271
|
+
result += `\\${codeUnit.toString(16)} `;
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// If the character is not handled by one of the above rules and is
|
|
276
|
+
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
277
|
+
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
278
|
+
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
279
|
+
if (
|
|
280
|
+
codeUnit >= 0x0080 ||
|
|
281
|
+
codeUnit == 0x002d ||
|
|
282
|
+
codeUnit == 0x005f ||
|
|
283
|
+
(codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
|
284
|
+
(codeUnit >= 0x0041 && codeUnit <= 0x005a) ||
|
|
285
|
+
(codeUnit >= 0x0061 && codeUnit <= 0x007a)
|
|
286
|
+
) {
|
|
287
|
+
// the character itself
|
|
288
|
+
result += string.charAt(index);
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Otherwise, the escaped character.
|
|
293
|
+
// https://drafts.csswg.org/cssom/#escape-a-character
|
|
294
|
+
result += `\\${string.charAt(index)}`;
|
|
295
|
+
}
|
|
296
|
+
return result;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
if (!root.CSS) {
|
|
300
|
+
root.CSS = {};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
root.CSS.escape = cssEscape;
|
|
304
|
+
return cssEscape;
|
|
305
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { cloneDeep } from 'lodash';
|
|
2
|
+
|
|
3
|
+
const className = 'ued-input-readonly';
|
|
4
|
+
|
|
5
|
+
// 富文本
|
|
6
|
+
export const renderRichText = (str: string) => {
|
|
7
|
+
// eslint-disable-next-line react/no-danger
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
style={{ lineHeight: 'normal' }}
|
|
11
|
+
dangerouslySetInnerHTML={{ __html: str || '--' }}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// 密码输入控件
|
|
17
|
+
export const renderPassword = (str: string) => {
|
|
18
|
+
return str ? renderReadOnly(str, { type: 'password' }) : renderReadOnly('--');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// 日期类型
|
|
22
|
+
export const renderDatePicker = (str: string | string[], separator: any) => {
|
|
23
|
+
let finalStr: any = str;
|
|
24
|
+
if (Array.isArray(str) && typeof separator === 'string') {
|
|
25
|
+
finalStr = str.join(separator);
|
|
26
|
+
}
|
|
27
|
+
return renderReadOnly(finalStr || '--');
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// 通用 单选 多选 级联 label提取
|
|
31
|
+
export const renderCommonList = (
|
|
32
|
+
value: any,
|
|
33
|
+
options: any[],
|
|
34
|
+
fieldName: {
|
|
35
|
+
labelKey: string;
|
|
36
|
+
valueKey: string;
|
|
37
|
+
childrenKey: string;
|
|
38
|
+
} = {
|
|
39
|
+
labelKey: 'label',
|
|
40
|
+
valueKey: 'value',
|
|
41
|
+
childrenKey: 'children',
|
|
42
|
+
},
|
|
43
|
+
) => {
|
|
44
|
+
const { labelKey, valueKey, childrenKey } = fieldName;
|
|
45
|
+
const getLabelName = (list: any[], val: any) => {
|
|
46
|
+
const row = list?.find?.((o) => o[valueKey] === val);
|
|
47
|
+
return row ? row[labelKey] : '';
|
|
48
|
+
};
|
|
49
|
+
const loopValue = (
|
|
50
|
+
list: any[],
|
|
51
|
+
val: any[],
|
|
52
|
+
split: string = ',',
|
|
53
|
+
isCascade: boolean = false,
|
|
54
|
+
) => {
|
|
55
|
+
let lastList = list || [];
|
|
56
|
+
const res: any[] =
|
|
57
|
+
val?.map((curVal, idx) => {
|
|
58
|
+
if (Array.isArray(curVal)) {
|
|
59
|
+
// TODO list获取有问题
|
|
60
|
+
return loopValue(cloneDeep(lastList), curVal, '/', true);
|
|
61
|
+
}
|
|
62
|
+
const resStr = getLabelName(cloneDeep(lastList), curVal);
|
|
63
|
+
// 级联需要把当前的list替换成children
|
|
64
|
+
if (isCascade) {
|
|
65
|
+
const currentRow = lastList.find((o) => o[valueKey] === curVal);
|
|
66
|
+
if (currentRow?.[childrenKey]) {
|
|
67
|
+
lastList = currentRow?.[childrenKey] || [];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return resStr;
|
|
71
|
+
}) || [];
|
|
72
|
+
return res.join(split);
|
|
73
|
+
};
|
|
74
|
+
let label: string = '';
|
|
75
|
+
if (!Array.isArray(value)) {
|
|
76
|
+
label = getLabelName(options, value);
|
|
77
|
+
} else {
|
|
78
|
+
label = loopValue(options, value);
|
|
79
|
+
}
|
|
80
|
+
return renderReadOnly(label || '--');
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const flattenTreeData = (
|
|
84
|
+
treeList: any[],
|
|
85
|
+
childrenName: string = 'children',
|
|
86
|
+
): any[] => {
|
|
87
|
+
const res: any[] = [];
|
|
88
|
+
const cpList = cloneDeep(treeList);
|
|
89
|
+
const loopList = (list: any[]) => {
|
|
90
|
+
(list || []).forEach((o) => {
|
|
91
|
+
res.push(o);
|
|
92
|
+
if (o?.[childrenName] && o?.[childrenName]?.length > 0) {
|
|
93
|
+
loopList(o[childrenName]);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
loopList(cpList);
|
|
98
|
+
return res;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const renderReadOnly = (val: string, props?: any) => {
|
|
102
|
+
return <span className={className}>{val}</span>;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default renderReadOnly;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare module '*.less';
|
|
2
|
+
declare module '*.svg';
|
|
3
|
+
declare module '*.png';
|
|
4
|
+
// declare module 'antd';
|
|
5
|
+
declare module 'react-soundplayer/components';
|
|
6
|
+
declare module 'react-soundplayer/addons';
|
|
7
|
+
declare module 'echarts/lib/echarts';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
10
|
+
declare const __VERSION__: string;
|
|
11
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12
|
+
declare const __BUILD_DATE__: string;
|
|
13
|
+
|
|
14
|
+
declare interface Window {
|
|
15
|
+
wufengController: {
|
|
16
|
+
getAction: (
|
|
17
|
+
key: ActionType,
|
|
18
|
+
params: WufengAction | WufengAction[],
|
|
19
|
+
) => Promise<any>;
|
|
20
|
+
registerIcons: (key: string, e: any) => void;
|
|
21
|
+
};
|
|
22
|
+
appId: string;
|
|
23
|
+
LingxiPCFactory: {
|
|
24
|
+
VERSION: string;
|
|
25
|
+
BUILD_DATE: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { parse } from 'qs';
|
|
2
|
+
import { useMemo, useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 生成基础上下文
|
|
6
|
+
* @param baseContext
|
|
7
|
+
*/
|
|
8
|
+
const useGenerateContext = (
|
|
9
|
+
props: Record<string, any>,
|
|
10
|
+
baseContext: Record<string, any> = {},
|
|
11
|
+
options: Record<string, any> = {},
|
|
12
|
+
) => {
|
|
13
|
+
// 指令定时器存储
|
|
14
|
+
const actionTimerRef = useRef<Record<string, any>>({
|
|
15
|
+
timeout: {},
|
|
16
|
+
interval: {},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// 清除定时器
|
|
20
|
+
const clearActionTimer = (timerName: string) => {
|
|
21
|
+
const actionTimer = actionTimerRef.current;
|
|
22
|
+
if (actionTimer.interval?.[timerName]) {
|
|
23
|
+
clearInterval(actionTimer.interval[timerName]);
|
|
24
|
+
actionTimer.interval[timerName] = null;
|
|
25
|
+
}
|
|
26
|
+
if (actionTimer.timeout?.[timerName]) {
|
|
27
|
+
clearTimeout(actionTimer.timeout[timerName]);
|
|
28
|
+
actionTimer.timeout[timerName] = null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// 增加指令定时器
|
|
33
|
+
const addActionTimer = (
|
|
34
|
+
type: 'interval' | 'timeout' = 'timeout',
|
|
35
|
+
timerName: string,
|
|
36
|
+
callback: () => void,
|
|
37
|
+
time: number = 0,
|
|
38
|
+
) => {
|
|
39
|
+
const actionTimer = actionTimerRef.current;
|
|
40
|
+
clearActionTimer(type);
|
|
41
|
+
const delay = time > 0 ? +time : 0;
|
|
42
|
+
if (type === 'interval') {
|
|
43
|
+
actionTimer.interval[timerName] = setInterval(() => {
|
|
44
|
+
callback?.();
|
|
45
|
+
}, delay);
|
|
46
|
+
}
|
|
47
|
+
if (type === 'timeout') {
|
|
48
|
+
actionTimer.interval[timerName] = setTimeout(() => {
|
|
49
|
+
callback?.();
|
|
50
|
+
}, delay);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* url参数
|
|
56
|
+
*/
|
|
57
|
+
const urlParam = useMemo(() => {
|
|
58
|
+
const queryParams = parse((location?.search ?? '?')?.split('?')[1]);
|
|
59
|
+
return {
|
|
60
|
+
...queryParams,
|
|
61
|
+
...props.urlParam,
|
|
62
|
+
};
|
|
63
|
+
}, [props.urlParam]);
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
...baseContext,
|
|
67
|
+
urlParam,
|
|
68
|
+
clearActionTimer,
|
|
69
|
+
addActionTimer,
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default useGenerateContext;
|