@lingxiteam/ebe-utils 0.5.0 → 0.5.2
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/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/ImportBusiObjModal/index.tsx +5 -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/useTool.ts +428 -0
- package/package.json +2 -2
- /package/lib/public/src/utils/functors/{dateAdd.ts → DATEADD.ts} +0 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
/* eslint-disable no-continue */
|
|
2
|
+
import { EngineRelationMethods } from '@lingxiteam/types';
|
|
3
|
+
import { RefsManager } from './Context/context';
|
|
4
|
+
|
|
5
|
+
type RefsType = Record<string, any>;
|
|
6
|
+
|
|
7
|
+
const getFormsIdByUid = (uid: string, refs: RefsType) => {
|
|
8
|
+
// 不是表单组件
|
|
9
|
+
if (refs[uid].compName !== 'Form') {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const list = uid.match(/@@@([\d\w_]*)&&&/g);
|
|
14
|
+
if (!Array.isArray(list)) {
|
|
15
|
+
return list;
|
|
16
|
+
}
|
|
17
|
+
return list.map((it) => it.replace(/(@@@)|(&&&)/g, ''));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 通过循环容器id获取 循环容器内的表单
|
|
22
|
+
* @param loopId
|
|
23
|
+
* @param refs
|
|
24
|
+
*/
|
|
25
|
+
export const getFormOfInLoopByLoopId = (options: {
|
|
26
|
+
loopId: string;
|
|
27
|
+
engineRelation: EngineRelationMethods;
|
|
28
|
+
routerId: string;
|
|
29
|
+
refs: RefsType;
|
|
30
|
+
forms?: RefsType[];
|
|
31
|
+
inLoop?: boolean;
|
|
32
|
+
}) => {
|
|
33
|
+
const {
|
|
34
|
+
loopId,
|
|
35
|
+
routerId,
|
|
36
|
+
engineRelation,
|
|
37
|
+
forms = [],
|
|
38
|
+
refs,
|
|
39
|
+
inLoop = false,
|
|
40
|
+
} = options;
|
|
41
|
+
const uids = Object.keys(refs);
|
|
42
|
+
for (let index = 0; index < uids.length; index += 1) {
|
|
43
|
+
const uid = uids[index];
|
|
44
|
+
|
|
45
|
+
if (inLoop) {
|
|
46
|
+
if (refs[uid].compName === 'Form') {
|
|
47
|
+
forms.push(refs[uid]);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 先用---分割,解决多层循环块嵌套问题
|
|
53
|
+
const result = uid
|
|
54
|
+
.split('---')
|
|
55
|
+
.filter(Boolean)
|
|
56
|
+
.find((id) => {
|
|
57
|
+
const [compId] = id.split('@@@');
|
|
58
|
+
return compId === loopId;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const engineRefs = engineRelation.getEngineRefsByUid(uid, routerId);
|
|
62
|
+
// 页面容器或者BOFramer在循环容器下
|
|
63
|
+
if ((result || inLoop) && engineRefs) {
|
|
64
|
+
// 页面容器和业务组件下也可能存在表单
|
|
65
|
+
getFormOfInLoopByLoopId({
|
|
66
|
+
loopId,
|
|
67
|
+
routerId,
|
|
68
|
+
engineRelation,
|
|
69
|
+
refs: engineRelation.getEngineRefsByUid(uid, routerId)?.refs || {},
|
|
70
|
+
forms,
|
|
71
|
+
inLoop: true,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 不是表单 或者不在循环容器内
|
|
76
|
+
if (refs[uid].compName !== 'Form' || !/[@@@|&&&]/.test(uid)) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (result) {
|
|
81
|
+
forms.push(refs[uid]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return forms;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 获取gridview组件
|
|
89
|
+
* @param forms
|
|
90
|
+
* @param getFieldsValue
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
export const getLoopForms = async (
|
|
94
|
+
forms: RefsType[],
|
|
95
|
+
getFieldsValue: (form: any) => void,
|
|
96
|
+
) => {
|
|
97
|
+
const fieldValues: any = {};
|
|
98
|
+
let firstErrorInfo: any = null;
|
|
99
|
+
for (let index = 0; index < forms.length; index += 1) {
|
|
100
|
+
const form = forms[index];
|
|
101
|
+
const { formCode, scrollToErrorField } = form;
|
|
102
|
+
fieldValues[formCode] = fieldValues[formCode] ?? [];
|
|
103
|
+
try {
|
|
104
|
+
const values = await getFieldsValue(form);
|
|
105
|
+
fieldValues[formCode].push(values);
|
|
106
|
+
} catch (error) {
|
|
107
|
+
if (!firstErrorInfo) {
|
|
108
|
+
firstErrorInfo = {
|
|
109
|
+
error,
|
|
110
|
+
form,
|
|
111
|
+
scrollToErrorField,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (firstErrorInfo) {
|
|
118
|
+
const { scrollToErrorField, error } = firstErrorInfo;
|
|
119
|
+
scrollToErrorField(error);
|
|
120
|
+
return Promise.reject(error);
|
|
121
|
+
}
|
|
122
|
+
return Promise.resolve(fieldValues);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 通过组件id获取表单列表
|
|
127
|
+
*/
|
|
128
|
+
export const getFormByCompId = (compId: string, refs: RefsType) => {
|
|
129
|
+
// 获取是否是表单
|
|
130
|
+
const form = refs[compId];
|
|
131
|
+
if (form) {
|
|
132
|
+
return form;
|
|
133
|
+
}
|
|
134
|
+
const uidArr = Object.keys(refs).filter((uid) => {
|
|
135
|
+
const ids = getFormsIdByUid(uid, refs);
|
|
136
|
+
if (!ids) {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
return ids.includes(compId);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
if (uidArr.length === 0) {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return uidArr.map((uid) => refs[uid]);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const getFieldsValue = async (
|
|
150
|
+
forms: RefsType | RefsType[],
|
|
151
|
+
getFieldsValue: (form: any) => void,
|
|
152
|
+
) => {
|
|
153
|
+
// 当表单不存在时,应该获取的是undefined
|
|
154
|
+
if (!forms) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (Array.isArray(forms)) {
|
|
159
|
+
return Promise.all(forms.map((form) => getFieldsValue(form)));
|
|
160
|
+
}
|
|
161
|
+
return getFieldsValue(forms);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* 获取表单类型
|
|
166
|
+
*/
|
|
167
|
+
export const getFormType = (uid: string) => {
|
|
168
|
+
// uid中包含@符号包含&符号
|
|
169
|
+
const hasAtOrAnd = /[@@@|&&&]/.test(uid);
|
|
170
|
+
const [loopId, formId, itemId] = uid.split(/@@@|&&&/g);
|
|
171
|
+
return {
|
|
172
|
+
type: hasAtOrAnd ? 'inLoop' : 'default',
|
|
173
|
+
loopId,
|
|
174
|
+
formId,
|
|
175
|
+
itemId,
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
interface FirstErrorInfoType {
|
|
180
|
+
error: any;
|
|
181
|
+
form?: any;
|
|
182
|
+
scrollToErrorField: any;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 当前的refs
|
|
187
|
+
* @param options
|
|
188
|
+
* @param getFieldsValue
|
|
189
|
+
*/
|
|
190
|
+
export const getOwnFormValues = async (
|
|
191
|
+
options: { currentRefs: RefsType; renderRefs: RefsManager },
|
|
192
|
+
getFieldsValue: (form: any) => void,
|
|
193
|
+
) => {
|
|
194
|
+
const { currentRefs, renderRefs } = options;
|
|
195
|
+
|
|
196
|
+
let firstErrorInfo: FirstErrorInfoType | null = null;
|
|
197
|
+
const values: any = {};
|
|
198
|
+
|
|
199
|
+
const formCodeTypes: Record<string, 'default' | 'array'> = {};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* 获取单个引擎下的表单值
|
|
203
|
+
*/
|
|
204
|
+
const getRenderRefsFormValues = async (refs: RefsType = {}) => {
|
|
205
|
+
const uidArr = Object.keys(refs);
|
|
206
|
+
|
|
207
|
+
for (let index = 0; index < uidArr.length; index += 1) {
|
|
208
|
+
const uid = uidArr[index];
|
|
209
|
+
|
|
210
|
+
const ref = refs[uid];
|
|
211
|
+
if (['BOFramer', 'Pageview'].includes(ref.compName)) {
|
|
212
|
+
// 需要处理BOFramer和PageView这种渲染逻辑
|
|
213
|
+
const uidRefs = renderRefs.getComRefs(uid);
|
|
214
|
+
// const uidRefs = engineRelation.getEngineRefsByUid(uid, routerId);
|
|
215
|
+
if (uidRefs) {
|
|
216
|
+
await getRenderRefsFormValues(uidRefs);
|
|
217
|
+
}
|
|
218
|
+
} else if (ref.compName === 'Form') {
|
|
219
|
+
const {
|
|
220
|
+
formCode,
|
|
221
|
+
form,
|
|
222
|
+
scrollToErrorField,
|
|
223
|
+
compName,
|
|
224
|
+
_innerDynamicDataContainer,
|
|
225
|
+
} = ref;
|
|
226
|
+
if (!formCode) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (compName === 'Form' && _innerDynamicDataContainer) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const { type } = getFormType(uid);
|
|
235
|
+
try {
|
|
236
|
+
const value = await getFieldsValue(ref);
|
|
237
|
+
if (type === 'default') {
|
|
238
|
+
// 1. 首次赋值, 包含循环容器内逻辑
|
|
239
|
+
if (!values[formCode]) {
|
|
240
|
+
values[formCode] = value;
|
|
241
|
+
formCodeTypes[formCode] = 'default';
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
// 2. 存在编码相同时,切换成数组类型
|
|
245
|
+
if (formCodeTypes[formCode] === 'default') {
|
|
246
|
+
// 处理页面中存在多个相同的表单,但是表单编码一样。这时候表现为数组形式
|
|
247
|
+
values[formCode] = [values[formCode]];
|
|
248
|
+
formCodeTypes[formCode] = 'array';
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 3. 给数组添加当前值
|
|
252
|
+
if (formCodeTypes[formCode] === 'array') {
|
|
253
|
+
values[formCode].push(value);
|
|
254
|
+
}
|
|
255
|
+
} else if (type === 'inLoop') {
|
|
256
|
+
// 1. 或许存在一个没包含在循环容器内表单,并且该表单和循环容器下的表单编码相同,
|
|
257
|
+
if (formCodeTypes[formCode] === 'default') {
|
|
258
|
+
values[formCode] = [values[formCode]];
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
formCodeTypes[formCode] = 'array';
|
|
262
|
+
values[formCode] = Array.isArray(values[formCode])
|
|
263
|
+
? values[formCode]
|
|
264
|
+
: [];
|
|
265
|
+
values[formCode].push(value);
|
|
266
|
+
}
|
|
267
|
+
} catch (error) {
|
|
268
|
+
if (!firstErrorInfo) {
|
|
269
|
+
firstErrorInfo = {
|
|
270
|
+
error,
|
|
271
|
+
form,
|
|
272
|
+
scrollToErrorField,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
await getRenderRefsFormValues(currentRefs);
|
|
281
|
+
|
|
282
|
+
// 存在错误时,滚动到第一个出现错误的位置
|
|
283
|
+
if (firstErrorInfo) {
|
|
284
|
+
const { scrollToErrorField, error } = firstErrorInfo as FirstErrorInfoType;
|
|
285
|
+
scrollToErrorField(error);
|
|
286
|
+
return Promise.reject(error);
|
|
287
|
+
}
|
|
288
|
+
return Promise.resolve(values);
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
export const getAllForm = (options: {
|
|
292
|
+
currentRefs: RefsType;
|
|
293
|
+
renderRefs: RefsManager;
|
|
294
|
+
}) => {
|
|
295
|
+
const { currentRefs, renderRefs } = options;
|
|
296
|
+
const forms: RefsType[] = [];
|
|
297
|
+
const getRenderRefsFormValues = (refs: RefsType = {}) => {
|
|
298
|
+
const uidArr = Object.keys(refs);
|
|
299
|
+
|
|
300
|
+
for (let index = 0; index < uidArr.length; index += 1) {
|
|
301
|
+
const uid = uidArr[index];
|
|
302
|
+
|
|
303
|
+
const ref = refs[uid];
|
|
304
|
+
if (ref.compName !== 'Form') {
|
|
305
|
+
// 需要处理BOFramer和PageView这种渲染逻辑
|
|
306
|
+
const refs = renderRefs.getComRefs(uid);
|
|
307
|
+
if (refs) {
|
|
308
|
+
getRenderRefsFormValues(refs);
|
|
309
|
+
}
|
|
310
|
+
} else if (ref.has) {
|
|
311
|
+
forms.push(ref);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
getRenderRefsFormValues(currentRefs);
|
|
316
|
+
return forms;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* 获取业务组件列表 可能存在
|
|
321
|
+
* @param compId
|
|
322
|
+
* @param refs
|
|
323
|
+
*/
|
|
324
|
+
export const getBOFramers = (compId: string, refs: RefsType = {}) => {
|
|
325
|
+
const boframerUids = Object.keys(refs).filter(
|
|
326
|
+
(id) => refs[id].compId === compId,
|
|
327
|
+
);
|
|
328
|
+
// 如果没找到组件,就返回null
|
|
329
|
+
if (!boframerUids.length) {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const boframerRefs: RefsType = {};
|
|
334
|
+
|
|
335
|
+
boframerUids.forEach((uid) => {
|
|
336
|
+
boframerRefs[uid] = refs[uid];
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
return boframerRefs;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export const getBOFramerOwnFormValues = async (
|
|
343
|
+
options: {
|
|
344
|
+
refs: RefsType;
|
|
345
|
+
renderRefs: RefsManager;
|
|
346
|
+
compId: string;
|
|
347
|
+
},
|
|
348
|
+
getFieldsValue: (form: any) => void,
|
|
349
|
+
) => {
|
|
350
|
+
const { renderRefs, refs, compId } = options;
|
|
351
|
+
|
|
352
|
+
// 2种情况 1只有单个业务组件 2 业务组件放在循环容器下
|
|
353
|
+
const boframerRefs = getBOFramers(compId, refs);
|
|
354
|
+
|
|
355
|
+
let values = {};
|
|
356
|
+
if (boframerRefs) {
|
|
357
|
+
values = await getOwnFormValues(
|
|
358
|
+
{ currentRefs: boframerRefs, renderRefs },
|
|
359
|
+
getFieldsValue,
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// 理论上获取业务组件 应该都带有表单编码,但是由于需要兼容旧数据 需要把值展开
|
|
364
|
+
if (Object.keys(values).length === 1) {
|
|
365
|
+
const val = Object.values(values)[0] as Object;
|
|
366
|
+
if (Object.prototype.toString.call(val) === '[object Object]') {
|
|
367
|
+
values = val;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return values;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// 获取BOFramer下所有表单
|
|
374
|
+
export const getBoframerOwnForms = (options: {
|
|
375
|
+
currentRefs: RefsType;
|
|
376
|
+
renderRefs: RefsManager;
|
|
377
|
+
compId: string;
|
|
378
|
+
}) => {
|
|
379
|
+
const { compId, currentRefs, renderRefs } = options;
|
|
380
|
+
const boframers = getBOFramers(compId, currentRefs);
|
|
381
|
+
|
|
382
|
+
const forms: RefsType[] = [];
|
|
383
|
+
const getAllForms = (refs: RefsType | null) => {
|
|
384
|
+
Object.keys(refs || {}).forEach((uid) => {
|
|
385
|
+
// const engineRef = engineRelation.getEngineRefsByUid(uid, routerId);
|
|
386
|
+
const renderId = uid;
|
|
387
|
+
if (renderId) {
|
|
388
|
+
const engineRefs = renderRefs.getComRefs(renderId);
|
|
389
|
+
if (engineRefs) {
|
|
390
|
+
Object.keys(engineRefs).forEach((compUid) => {
|
|
391
|
+
const r = engineRefs[compUid];
|
|
392
|
+
getAllForms(r);
|
|
393
|
+
if (r.compName === 'Form') {
|
|
394
|
+
forms.push(r);
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
getAllForms(boframers);
|
|
403
|
+
return forms;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* 加载子节点数据
|
|
407
|
+
* @param nodeKey
|
|
408
|
+
* @param odata
|
|
409
|
+
* @param arr
|
|
410
|
+
* @param key
|
|
411
|
+
* @param title
|
|
412
|
+
* @param selectable
|
|
413
|
+
*/
|
|
414
|
+
export const updateNodeChildren = (
|
|
415
|
+
nodeKey: any,
|
|
416
|
+
odata: any[],
|
|
417
|
+
arr: any[],
|
|
418
|
+
key: string,
|
|
419
|
+
title: string,
|
|
420
|
+
selectable: string | undefined,
|
|
421
|
+
) => {
|
|
422
|
+
const transformBoolean = (value: any) => {
|
|
423
|
+
if (value === undefined || value === null) {
|
|
424
|
+
return undefined;
|
|
425
|
+
}
|
|
426
|
+
if (value === 'false') {
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
return Boolean(value);
|
|
430
|
+
};
|
|
431
|
+
arr.forEach((c, i) => {
|
|
432
|
+
if (`${c.key}` === `${nodeKey}`) {
|
|
433
|
+
const oldChildMap: any = {};
|
|
434
|
+
(arr[i].children || []).forEach((d: any) => {
|
|
435
|
+
oldChildMap[d.key] = d.children;
|
|
436
|
+
});
|
|
437
|
+
arr[i].children = odata.map((item: any) => ({
|
|
438
|
+
key: item[key], // 取值字段
|
|
439
|
+
title: item[title], // 显示字段
|
|
440
|
+
isLeaf: false,
|
|
441
|
+
selectable:
|
|
442
|
+
selectable !== undefined
|
|
443
|
+
? transformBoolean(item[selectable])
|
|
444
|
+
: undefined,
|
|
445
|
+
children: oldChildMap[item[key]],
|
|
446
|
+
data: item,
|
|
447
|
+
// 标识该节点数据是通过加载子节点动作设置的
|
|
448
|
+
_isReload: true,
|
|
449
|
+
}));
|
|
450
|
+
arr[i].isLeaf = odata.length === 0;
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
if (c.children && c.children.length) {
|
|
454
|
+
updateNodeChildren(nodeKey, odata, c.children, key, title, selectable);
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
return arr;
|
|
458
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// eslint-disable-next-line max-len
|
|
2
|
+
export const getCalendarLocale = (
|
|
3
|
+
getLocale: (
|
|
4
|
+
t: string,
|
|
5
|
+
placelhoder?: string,
|
|
6
|
+
tempValue?: Record<string, any>,
|
|
7
|
+
) => string | undefined,
|
|
8
|
+
t: string,
|
|
9
|
+
tempValue?: Record<string, any>,
|
|
10
|
+
) => {
|
|
11
|
+
if (t === 'confirm') {
|
|
12
|
+
return getLocale(t, '', tempValue);
|
|
13
|
+
}
|
|
14
|
+
return getLocale(`Calendar.${t}`, '', tempValue);
|
|
15
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import merge from 'lodash/merge';
|
|
2
|
+
import { baseEnUS } from '../base';
|
|
3
|
+
|
|
4
|
+
export default merge(baseEnUS, {
|
|
5
|
+
'Calendar.end': 'end',
|
|
6
|
+
'Calendar.start': 'start',
|
|
7
|
+
'Calendar.title': 'date selection',
|
|
8
|
+
'Calendar.startEnd': 'start/end',
|
|
9
|
+
'Calendar.weekdays': ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
10
|
+
'Calendar.monthTitle': '@{year}/@{month}',
|
|
11
|
+
'Calendar.rangePrompt': 'Maximum selection of @{maxRange} days',
|
|
12
|
+
'SearchView.title': 'Please select the search time range',
|
|
13
|
+
'ProcessTrack.empty': 'No process data available',
|
|
14
|
+
'LoadMoreListView.canRelease': 'Release to refresh',
|
|
15
|
+
'LoadMoreListView.pulling': 'Pull down to refresh',
|
|
16
|
+
'LoadMoreListView.complete': 'Refresh complete',
|
|
17
|
+
'LoadMoreListView.refreshing': 'Refreshing',
|
|
18
|
+
'DatePicker.yearTip': 'Select Year',
|
|
19
|
+
'DatePicker.monthTip': 'Please Select Time',
|
|
20
|
+
'DatePicker.dayTip': 'Please Select Time',
|
|
21
|
+
'DatePicker.timeTip': 'Please Select Time',
|
|
22
|
+
'DatePicker.minuteTip': 'Select Date and Time',
|
|
23
|
+
'BannerModal.scaleMax': 'Scaled to maximum',
|
|
24
|
+
'BannerModal.scaleMin': 'Scaled to minimum',
|
|
25
|
+
'NoPermission.description':
|
|
26
|
+
'You do not have access permission, please contact the administrator~',
|
|
27
|
+
'NotFound.description':
|
|
28
|
+
'Sorry, the page you are trying to access does not exist.',
|
|
29
|
+
'Modal.missParams':
|
|
30
|
+
'Modal operation failed: Missing page instance ID or page path.',
|
|
31
|
+
'DformRangePicker.startLessEnd':
|
|
32
|
+
'The start time should not be greater than the end time.',
|
|
33
|
+
'DformRangePicker.yearTip': 'Select Year',
|
|
34
|
+
'DformRangePicker.monthTip': 'Please Select Time',
|
|
35
|
+
'DformRangePicker.timeTip': 'Please Select Time',
|
|
36
|
+
'DformRangePicker.dateTip': 'Please Select Time',
|
|
37
|
+
'DformRangePicker.onlyTime': 'Please Select Time',
|
|
38
|
+
'DformRangePicker.date': 'Please Select Time',
|
|
39
|
+
'DformRangePicker.year': '@{year}',
|
|
40
|
+
'DformRangePicker.month': '@{month}',
|
|
41
|
+
'DformRangePicker.day': '@{day}',
|
|
42
|
+
'DformRangePicker.hour': '@{hour}',
|
|
43
|
+
'DformRangePicker.minute': '@{minute}',
|
|
44
|
+
'DformRangePicker.second': '@{second}',
|
|
45
|
+
'DformRangePicker.selectEnd': 'Select End Time',
|
|
46
|
+
'DformRangePicker.selectStart': 'Select Start Time',
|
|
47
|
+
'DformInputNumber.selectPlaceholder': 'Please enter @{title}',
|
|
48
|
+
'DformInput.selectPlaceholder': 'please enter @{title}',
|
|
49
|
+
'DformTextArea.selectPlaceholder': 'please enter @{title}',
|
|
50
|
+
'DformImagePicker.selectPlaceholder': 'please upload @{title}',
|
|
51
|
+
'DformFile.selectPlaceholder': 'please upload @{title}',
|
|
52
|
+
'VerificationCode.text': 'Send verification code',
|
|
53
|
+
'VerificationCode.refresh': 'Refresh',
|
|
54
|
+
'DynamicList.dataError': 'Dynamic list data format error!',
|
|
55
|
+
'DynamicList.clickToMore': 'click to load more',
|
|
56
|
+
'DynamicList.noMore': 'no more available',
|
|
57
|
+
'Carousel.switchEmpty':
|
|
58
|
+
'The carousel component has no content and cannot be switched',
|
|
59
|
+
'Carousel.isLast': 'It is the last item',
|
|
60
|
+
'Carousel.isFirst': 'Already the first item',
|
|
61
|
+
'Carousel.noExist': 'The carousel component does not have this item',
|
|
62
|
+
'StepBar.wait': 'Waiting state',
|
|
63
|
+
'StepBar.process': 'Processing status',
|
|
64
|
+
'StepBar.finish': 'Complete status',
|
|
65
|
+
'StepBar.error': 'Error status',
|
|
66
|
+
'DformFile.noAllow': 'File type @{type} is not allowed to be uploaded',
|
|
67
|
+
'DformFile.fileSizeExceeded': 'File upload size exceeded',
|
|
68
|
+
'DformFile.somePicFailed': 'Some pictures failed to upload',
|
|
69
|
+
'DformFile.noUrl': 'The current data has no url/fileId',
|
|
70
|
+
'DformFile.updateTime': 'Upload time',
|
|
71
|
+
'DformPicker.searchPlaceholder':
|
|
72
|
+
'Please enter the options you want to search for',
|
|
73
|
+
'DynamicTable.more': 'more',
|
|
74
|
+
'DynamicTable.total': 'total',
|
|
75
|
+
uploading: 'uploading',
|
|
76
|
+
'Chart.configData': 'Please configure data source',
|
|
77
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import merge from 'lodash/merge';
|
|
2
|
+
import { baseZHCN } from '../base';
|
|
3
|
+
|
|
4
|
+
export default merge(baseZHCN, {
|
|
5
|
+
'Calendar.end': '结束',
|
|
6
|
+
'Calendar.start': '开始',
|
|
7
|
+
'Calendar.title': '日期选择',
|
|
8
|
+
'Calendar.startEnd': '开始/结束',
|
|
9
|
+
'Calendar.weekdays': ['日', '一', '二', '三', '四', '五', '六'],
|
|
10
|
+
'Calendar.monthTitle': '@{year}年@{month}月',
|
|
11
|
+
'Calendar.rangePrompt': '最多选择 @{maxRange} 天',
|
|
12
|
+
'Calendar.confirm': '确定',
|
|
13
|
+
'SearchView.title': '请选择搜索时间范围',
|
|
14
|
+
'ProcessTrack.empty': '暂无流程数据',
|
|
15
|
+
'LoadMoreListView.canRelease': '松开刷新',
|
|
16
|
+
'LoadMoreListView.pulling': '下拉刷新',
|
|
17
|
+
'LoadMoreListView.complete': '刷新完成',
|
|
18
|
+
'LoadMoreListView.refreshing': '正在刷新',
|
|
19
|
+
'DatePicker.yearTip': '选择年份',
|
|
20
|
+
'DatePicker.monthTip': '选择年份和月份',
|
|
21
|
+
'DatePicker.dayTip': '选择年月日',
|
|
22
|
+
'DatePicker.timeTip': '选择时间',
|
|
23
|
+
'DatePicker.minuteTip': '选择日期和时间',
|
|
24
|
+
'BannerModal.scaleMax': '已缩放至最大',
|
|
25
|
+
'BannerModal.scaleMin': '已缩放至最小',
|
|
26
|
+
'NoPermission.description': '您还没有访问权限,请联系管理员~',
|
|
27
|
+
'NotFound.description': '抱歉,您访问的页面不存在',
|
|
28
|
+
'Modal.missParams': '弹窗操作失败:缺少页面实例ID或页面路径',
|
|
29
|
+
'DformRangePicker.startLessEnd': '开始时间不能大于结束时间。',
|
|
30
|
+
'DformRangePicker.yearTip': '选择年份',
|
|
31
|
+
'DformRangePicker.monthTip': '选择年份和月份',
|
|
32
|
+
'DformRangePicker.timeTip': '选择年月日时分',
|
|
33
|
+
'DformRangePicker.dateTip': '选择时间',
|
|
34
|
+
'DformRangePicker.onlyTime': '选择时间',
|
|
35
|
+
'DformRangePicker.date': '选择年月日',
|
|
36
|
+
'DformRangePicker.selectEnd': '请选择结束时间',
|
|
37
|
+
'DformRangePicker.selectStart': '请选择开始时间',
|
|
38
|
+
'DformInputNumber.selectPlaceholder': '请输入@{title}',
|
|
39
|
+
'DformInput.selectPlaceholder': '请输入@{title}',
|
|
40
|
+
'DformTextArea.selectPlaceholder': '请输入@{title}',
|
|
41
|
+
'DformImagePicker.selectPlaceholder': '请上传@{title}',
|
|
42
|
+
'DformFile.selectPlaceholder': '请上传@{title}',
|
|
43
|
+
'VerificationCode.text': '发送验证码',
|
|
44
|
+
'VerificationCode.refresh': '重新获取',
|
|
45
|
+
'DynamicList.dataError': '动态列表数据格式错误!',
|
|
46
|
+
'DynamicList.clickToMore': '点击加载更多',
|
|
47
|
+
'DynamicList.noMore': '没有更多了',
|
|
48
|
+
'Carousel.switchEmpty': '轮播图组件没有内容,无法切换',
|
|
49
|
+
'Carousel.isLast': '已是最后一项',
|
|
50
|
+
'Carousel.isFirst': '已是第一项',
|
|
51
|
+
'Carousel.noExist': '轮播图组件没有此项',
|
|
52
|
+
'StepBar.wait': '等待状态',
|
|
53
|
+
'StepBar.process': '处理中状态',
|
|
54
|
+
'StepBar.finish': '完成状态',
|
|
55
|
+
'StepBar.error': '错误状态',
|
|
56
|
+
'DformFile.noAllow': '不允许上传文件类型@{type}',
|
|
57
|
+
'DformFile.fileSizeExceeded': '超过文件设置上传大小',
|
|
58
|
+
'DformFile.somePicFailed': '部分图片上传失败',
|
|
59
|
+
'DformFile.noUrl': '当前数据没有url/fileId',
|
|
60
|
+
'DformFile.updateTime': '上传时间',
|
|
61
|
+
'DformPicker.searchPlaceholder': '请输入要搜索的选项',
|
|
62
|
+
'DynamicTable.more': '查看更多',
|
|
63
|
+
'DynamicTable.total': '合计',
|
|
64
|
+
uploading: '正在上传',
|
|
65
|
+
});
|