@lingxiteam/ebe-utils 0.3.22 → 0.3.24
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/h5public/src/components/common/BannerModal/index.tsx +1 -1
- package/lib/h5public/src/components/common/DocViewer/index.tsx +1 -0
- package/lib/h5public/src/components/common/PreviewFile/index.tsx +5 -5
- package/lib/h5public/src/components/factory/src/Animation/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Audio/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BasicComponents/Empty/empty.tsx +2 -0
- package/lib/h5public/src/components/factory/src/BasicComponents/Empty/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BasicComponents/FormItem/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BasicComponents/Spin/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/BasicComponents/SpinComp/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BlockSelect/assets/index.tsx +2 -0
- package/lib/h5public/src/components/factory/src/BlockSelect/components/ActionView/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/BlockSelect/components/Icon/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Calendar/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/CardBody/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/CardFooter/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DAddressPicker/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DMultiplePicker/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DatePicker/InnerDatePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DatePicker/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformDate/DatePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformImagePicker/ImagePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformInput/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformInputNumber/FormInputNumber.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformList/Group/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformList/List/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformList/Title/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformPicker/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformRangePicker/RangePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformSelect/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformSwitch/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformTextArea/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Donut/Dount.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Donut/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicDataContainer/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicList/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicTable/assets/index.tsx +2 -0
- package/lib/h5public/src/components/factory/src/DynamicTable/hooks/useCreateColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicTable/hooks/useFormatCell.tsx +1 -0
- package/lib/h5public/src/components/factory/src/FilterItems/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Flex/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Grid/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/GroupColumn/GroupColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/GroupColumn/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Icon/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Image/factoryImage.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Image/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXBarChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LXLineChart/ChartLine.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXLineChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LXPieChart/LXPieChart.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXPieChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LXRadarChart/LXRadarChat.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXRadarChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Line/Line.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Line/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LineColumn/LineColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LineColumn/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LoadMore/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/MultipleProgress/MultipleProgress.tsx +1 -1
- package/lib/h5public/src/components/factory/src/MultipleProgress/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/NoticeBarPlus/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Notification/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Picker/InnerPicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Picker/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/ProgressBar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/QRCode/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/RemoteComponent/assets/iconFailComp.tsx +2 -0
- package/lib/h5public/src/components/factory/src/RemoteComponent/components/FishRender.tsx +1 -0
- package/lib/h5public/src/components/factory/src/RemoteComponent/components/ReactRender.tsx +1 -1
- package/lib/h5public/src/components/factory/src/RemoteComponent/components/VueRender.tsx +1 -0
- package/lib/h5public/src/components/factory/src/RemoteComponent/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Selector/LxSelector.tsx +1 -1
- package/lib/h5public/src/components/factory/src/SideBar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/SingleProgress/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/SmallColumnar/SmallColumnar.tsx +1 -1
- package/lib/h5public/src/components/factory/src/SmallColumnar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/StackColumn/StackColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/StackColumn/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/StepBar/constant/checkcircle.tsx +2 -0
- package/lib/h5public/src/components/factory/src/StepBar/constant/vector.tsx +2 -0
- package/lib/h5public/src/components/factory/src/StepProcess/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/TabBar/TabImage/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/TabBar/TabPage/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/TabBar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Table/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/VerificationCode/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/VideoPlayer/ViewPlayer.tsx +1 -1
- package/lib/h5public/src/components/factory/src/VideoPlayer/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/View/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/utils/LoaderHelper.tsx +1 -0
- package/lib/h5public/src/components/factory/src/utils/hooks/useCompState.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Cascader/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/ChartBar/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/CheckboxGroup/index.tsx +41 -29
- package/lib/pcpublic/src/components/pcfactory/src/CollapsePanel/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/DynamicDataContainer/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/DynamicTabs/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/FormGroup/TitleComp.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/FormGroup/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Gantt/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/GridView/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Icon/hooks/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Img/BasicImage/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Menu/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Progress/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/QRCode/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/QuillEditor/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/RadarChart/RadarECharts.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/RadarChart/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Rate/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/ReactECharts/ReactECharts.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/ReactECharts/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/components/FishRender.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/components/ReactRender.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/components/VueRender.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Select/selectUtils.ts +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/DownloadProgress/DownloadProgress.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/UploadItem.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Steps/constant/checkcircle.tsx +2 -0
- package/lib/pcpublic/src/components/pcfactory/src/Steps/constant/vector.tsx +2 -0
- package/lib/pcpublic/src/components/pcfactory/src/Steps/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Switch/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/TooltipView/hooks/index.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/Upload/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/VirtualGroup/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/WebComponent/WebComponent.tsx +1 -0
- package/lib/pcpublic/src/utils/exportCustomData/index.tsx +121 -102
- package/lib/public/.eslintignore +55 -0
- package/lib/public/public/iconfont.js +1 -1
- package/lib/public/src/components/ExpSQLServiceModal/index.tsx +1 -1
- package/lib/public/src/components/ImportBusiObjModal/index.tsx +7 -8
- package/lib/public/src/components/LoaderHelper/index.tsx +1 -0
- package/lib/public/src/components/ProgressComp/ProgressComp.tsx +1 -1
- package/lib/public/src/components/ProgressComp/index.tsx +1 -0
- package/lib/public/src/components/WaterMark/index.tsx +1 -1
- package/lib/public/src/components/common/ExpBusiObjModal/index.tsx +1 -1
- package/lib/public/src/hooks/useExportCustomDataFile.ts +2 -3
- package/lib/public/src/pages/_preview/index.tsx +2 -1
- package/lib/public/src/utils/Context/Container.tsx +1 -1
- package/lib/public/src/utils/Context/context.tsx +2 -2
- package/lib/public/src/utils/Security/urlEncryption.ts +4 -4
- package/lib/public/src/utils/platform/utils/fileUtils.ts +1 -1
- package/lib/public/src/utils/preprocess.ts +3 -2
- package/lib/public/src/utils/service/defaultResponseInterceptor.ts +13 -13
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import Field from '@lingxiteam/dform/es/components/Field';
|
|
|
3
3
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
4
4
|
import { Selector, Toast } from 'antd-mobile-5';
|
|
5
5
|
import { Rule } from 'rc-field-form/es/interface';
|
|
6
|
-
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import { DFormWrapper } from '../BasicComponents';
|
|
8
8
|
import { useFormItem } from '../utils/hooks/useFormItem';
|
|
9
9
|
import useStyle from '../View/useStyle';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useImperativeHandle, useState } from 'react';
|
|
1
2
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
3
|
import { SideBar } from 'antd-mobile-5';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
|
-
import { useCallback, useEffect, useImperativeHandle, useState } from 'react';
|
|
5
5
|
import './index.less';
|
|
6
6
|
import { SideBarProps, SideBarTabsProps } from './PropsType';
|
|
7
7
|
import TabPage from './TabPage';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ZeroColumn from '@lingxiteam/charts/es/SmallColumnar/ZeroColumn';
|
|
2
2
|
import { LingXiFC } from '@lingxiteam/types';
|
|
3
|
-
import { useEffect, useMemo } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo } from 'react';
|
|
4
4
|
import useAsyncState from '../utils/hooks/useAsyncState';
|
|
5
5
|
import useHiddenStyle from '../utils/hooks/useHiddenStyle';
|
|
6
6
|
import { useJsonToParse } from '../utils/hooks/useJsonToParse';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useImperativeHandle, useState } from 'react';
|
|
2
|
+
import React, { useImperativeHandle, useState } from 'react';
|
|
3
3
|
import SmallColumnarLoader from './loader';
|
|
4
4
|
import { MySmallColumnarProps } from './PropsType';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import StackColumn from '@lingxiteam/charts/es/StackColumn';
|
|
2
2
|
import { LingXiFC } from '@lingxiteam/types';
|
|
3
|
-
import { useEffect, useMemo } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo } from 'react';
|
|
4
4
|
import useAsyncState from '../utils/hooks/useAsyncState';
|
|
5
5
|
import useHiddenStyle from '../utils/hooks/useHiddenStyle';
|
|
6
6
|
import { useJsonToParse } from '../utils/hooks/useJsonToParse';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useImperativeHandle, useState } from 'react';
|
|
2
|
+
import React, { useImperativeHandle, useState } from 'react';
|
|
3
3
|
import StackColumnLoader from './loader';
|
|
4
4
|
import { MyStackColumnProps } from './PropsType';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
3
3
|
import StepProcessLoader from './loader';
|
|
4
4
|
import type { MyStepProcessProps } from './StepProcess';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
const TabImage = (props: any) => {
|
|
4
4
|
const { defaultIcon, selectedIcon, isSelected, titleColor, selectedTitleColor, getAppFileUrlByFileCode, ...restProps } = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Badge, TabBar } from '@lingxiteam/antd-mobile-plus';
|
|
2
2
|
import { LingXiFC } from '@lingxiteam/types';
|
|
3
|
-
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import './index.less';
|
|
5
5
|
import TabImage from './TabImage';
|
|
6
6
|
import TabPage from './TabPage';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table, TableType } from '@lingxiteam/antd-mobile-plus';
|
|
2
2
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
3
|
-
import { useEffect, useImperativeHandle, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useImperativeHandle, useState } from 'react';
|
|
4
4
|
import useAsyncState from '../utils/hooks/useAsyncState';
|
|
5
5
|
|
|
6
6
|
export interface MyTableProps extends Omit<TableType, 'dataSource'> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import React, { useContext, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
1
2
|
import DynamicForm from '@lingxiteam/dform';
|
|
2
3
|
import Field from '@lingxiteam/dform/es/components/Field';
|
|
3
4
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
4
5
|
import classNames from 'classnames';
|
|
5
|
-
import { useContext, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
6
6
|
import useAsyncState from '../utils/hooks/useAsyncState';
|
|
7
7
|
import { useFormItem } from '../utils/hooks/useFormItem';
|
|
8
8
|
import IconPlaceholder from './assets/placeholder.png';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import type { ReactPlayerProps } from 'react-player';
|
|
4
4
|
import ReactPlayer from 'react-player';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { useThrottleFn } from 'ahooks';
|
|
3
|
-
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import useHiddenStyle from '../utils/hooks/useHiddenStyle';
|
|
5
5
|
import { withTransformProps } from '../utils/withTransformProps';
|
|
6
6
|
import transformProps from './transformProps';
|
|
@@ -219,7 +219,7 @@ const MyCascader: React.FC<MyCascaderProps> = forwardRef((props, ref) => {
|
|
|
219
219
|
let { isLeaf } = _item;
|
|
220
220
|
if (isLeaf === undefined) {
|
|
221
221
|
// children为非数组时且配置了展开事件时,视为需要异步加载
|
|
222
|
-
|
|
222
|
+
isLeaf = !Array.isArray(_children) && props.onClickOption ? false : _item.isLeaf;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Checkbox } from 'antd';
|
|
3
|
-
import React, { useEffect,
|
|
3
|
+
import React, { useEffect, useMemo, useState, useLayoutEffect, useCallback } from 'react';
|
|
4
4
|
import { FormFields, getFieldsProps } from '../utils';
|
|
5
5
|
import useCommonImperative from '../utils/hooks/useCommonImperativeHandle';
|
|
6
6
|
import { useLocale } from '../utils/hooks/useLocale';
|
|
@@ -55,6 +55,7 @@ export interface MyCheckboxGroupProps {
|
|
|
55
55
|
tipHeight?: string; // 提示自定义的高度
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
|
|
58
59
|
/**
|
|
59
60
|
* 处理数据
|
|
60
61
|
* @param dataSource 数据源
|
|
@@ -62,7 +63,7 @@ export interface MyCheckboxGroupProps {
|
|
|
62
63
|
* @param labelKey
|
|
63
64
|
* @returns
|
|
64
65
|
*/
|
|
65
|
-
export const handleDataSource = (dataSource: any[], valueKey?: string, labelKey?: string) => {
|
|
66
|
+
export const handleDataSource = (dataSource: any[], valueKey?: string, labelKey?: string,) => {
|
|
66
67
|
const valueKeys: any = [];
|
|
67
68
|
const newDataSoure: any[] = [];
|
|
68
69
|
if (Array.isArray(dataSource)) {
|
|
@@ -137,23 +138,46 @@ const CheckboxGroup = LingxiForwardRef<any, MyCheckboxGroupProps>((props, ref) =
|
|
|
137
138
|
const [lKey, setLKey] = useState(labelKey);
|
|
138
139
|
const [vKey, setVKey] = useState(valueKey);
|
|
139
140
|
|
|
140
|
-
const {
|
|
141
|
+
const {
|
|
142
|
+
margin: customMargin,
|
|
143
|
+
display: customDisplay,
|
|
144
|
+
visibility: customVisibility,
|
|
145
|
+
...restCusStyles
|
|
146
|
+
} = customStyle;
|
|
147
|
+
|
|
148
|
+
const getSelectedData = useCallback(() => {
|
|
149
|
+
if (Array.isArray(value) && value.length) {
|
|
150
|
+
const sltData = dataSource.filter((c: any) => value.includes(c[vKey]));
|
|
151
|
+
return sltData;
|
|
152
|
+
}
|
|
153
|
+
return [];
|
|
154
|
+
}, [value, dataSource, vKey]);
|
|
141
155
|
|
|
142
|
-
const {
|
|
156
|
+
const {
|
|
157
|
+
formFieldsRef,
|
|
158
|
+
required,
|
|
159
|
+
disabled,
|
|
160
|
+
readOnly,
|
|
161
|
+
finalRules,
|
|
162
|
+
setExtendRules,
|
|
163
|
+
|
|
164
|
+
} = useCommonImperative(ref, props, {
|
|
143
165
|
clearValue: [],
|
|
144
|
-
setDataWithLabelAndValue: (data: { dataSource: any[]
|
|
166
|
+
setDataWithLabelAndValue: (data: { dataSource: any[], labelKey: string; valueKey: string }) => {
|
|
145
167
|
setLKey(data.labelKey);
|
|
146
168
|
setVKey(data.valueKey);
|
|
147
169
|
const newData = handleDataSource(data.dataSource, data.valueKey, data.labelKey);
|
|
148
170
|
setDataSource(newData);
|
|
149
171
|
},
|
|
172
|
+
getSelectedData,
|
|
150
173
|
clearOptions: () => {
|
|
151
174
|
setDataSource([]);
|
|
152
175
|
},
|
|
153
176
|
});
|
|
154
177
|
const { getLocale, lang } = useLocale(engineApis);
|
|
155
178
|
|
|
156
|
-
const dfValue =
|
|
179
|
+
const dfValue =
|
|
180
|
+
defaultValue && typeof defaultValue === 'string' ? defaultValue.split(',') : undefined;
|
|
157
181
|
// 处理列表数据
|
|
158
182
|
useEffect(() => {
|
|
159
183
|
let newData = Array.isArray(newDataSoure) ? handleDataSource(newDataSoure, vKey, lKey) : [];
|
|
@@ -174,18 +198,10 @@ const CheckboxGroup = LingxiForwardRef<any, MyCheckboxGroupProps>((props, ref) =
|
|
|
174
198
|
const minMsg: any = [];
|
|
175
199
|
const maxMsg: any = [];
|
|
176
200
|
if (min) {
|
|
177
|
-
minMsg.push({
|
|
178
|
-
type: 'array',
|
|
179
|
-
min,
|
|
180
|
-
message: getLocale?.('CheckboxGroup.minRule', { min }),
|
|
181
|
-
});
|
|
201
|
+
minMsg.push({ type: 'array', min, message: getLocale?.('CheckboxGroup.minRule', { min }) });
|
|
182
202
|
}
|
|
183
203
|
if (max) {
|
|
184
|
-
maxMsg.push({
|
|
185
|
-
type: 'array',
|
|
186
|
-
max,
|
|
187
|
-
message: getLocale?.('CheckboxGroup.maxRule', { max }),
|
|
188
|
-
});
|
|
204
|
+
maxMsg.push({ type: 'array', max, message: getLocale?.('CheckboxGroup.maxRule', { max }) });
|
|
189
205
|
}
|
|
190
206
|
return [...minMsg, ...maxMsg];
|
|
191
207
|
};
|
|
@@ -195,20 +211,21 @@ const CheckboxGroup = LingxiForwardRef<any, MyCheckboxGroupProps>((props, ref) =
|
|
|
195
211
|
setExtendRules(extendRules, false);
|
|
196
212
|
}, [min, max, lang]);
|
|
197
213
|
|
|
214
|
+
|
|
198
215
|
// indeterminate: 已选但未全选,checkAll:全选/全不选,isAllDisabled:是否选项全部禁用
|
|
199
216
|
const [indeterminate, checkAll, isAllDisabled] = useMemo(() => {
|
|
200
217
|
const curValue = dataSource?.filter(c => (value || [])?.includes(c?.value))?.map(v => v?.value);
|
|
201
218
|
const valLen = curValue?.length || 0;
|
|
202
219
|
const dataLen = dataSource?.length || 0;
|
|
203
220
|
const disableLen = dataSource?.filter(o => o?.disabled)?.length;
|
|
204
|
-
return [!!valLen && valLen < dataLen, !!dataLen && dataLen === valLen, !!dataLen && disableLen === dataLen];
|
|
221
|
+
return [(!!valLen && valLen < dataLen), !!dataLen && dataLen === valLen, !!dataLen && disableLen === dataLen];
|
|
205
222
|
}, [value, checkedAll, dataSource]);
|
|
206
223
|
|
|
207
224
|
const onCheckAllChange = (e: any) => {
|
|
208
225
|
const { checked } = e.target;
|
|
209
226
|
let newVal: any = [];
|
|
210
227
|
if (checked) {
|
|
211
|
-
newVal = dataSource?.map((v: any) => v.value);
|
|
228
|
+
newVal = (dataSource)?.map((v: any) => v.value);
|
|
212
229
|
}
|
|
213
230
|
if (onChange) {
|
|
214
231
|
onChange(newVal);
|
|
@@ -216,20 +233,15 @@ const CheckboxGroup = LingxiForwardRef<any, MyCheckboxGroupProps>((props, ref) =
|
|
|
216
233
|
};
|
|
217
234
|
|
|
218
235
|
const renderItem = () => {
|
|
219
|
-
const rProps = {
|
|
220
|
-
|
|
221
|
-
style: restCusStyles,
|
|
222
|
-
defaultValue: dfValue,
|
|
223
|
-
disabled,
|
|
224
|
-
};
|
|
225
|
-
return checkedAll && dataSource?.length > 0 ? (
|
|
236
|
+
const rProps = { ...restProps, style: restCusStyles, defaultValue: dfValue, disabled };
|
|
237
|
+
return (checkedAll && dataSource?.length > 0) ? (
|
|
226
238
|
<>
|
|
227
239
|
<Checkbox
|
|
228
240
|
className={classNameCheck}
|
|
229
241
|
indeterminate={indeterminate}
|
|
230
242
|
disabled={rProps?.disabled || isAllDisabled}
|
|
231
243
|
checked={checkAll}
|
|
232
|
-
onChange={e => onCheckAllChange(e)}
|
|
244
|
+
onChange={(e) => onCheckAllChange(e)}
|
|
233
245
|
>
|
|
234
246
|
{checkAllText || getLocale?.('all')}
|
|
235
247
|
</Checkbox>
|
|
@@ -238,7 +250,7 @@ const CheckboxGroup = LingxiForwardRef<any, MyCheckboxGroupProps>((props, ref) =
|
|
|
238
250
|
value={value}
|
|
239
251
|
options={dataSource}
|
|
240
252
|
className={`ued-checkboxgroup-wrap ${className}`}
|
|
241
|
-
onChange={e => {
|
|
253
|
+
onChange={(e) => {
|
|
242
254
|
if (onChange) {
|
|
243
255
|
onChange(e);
|
|
244
256
|
}
|
|
@@ -263,13 +275,13 @@ const CheckboxGroup = LingxiForwardRef<any, MyCheckboxGroupProps>((props, ref) =
|
|
|
263
275
|
return (
|
|
264
276
|
<FormFields
|
|
265
277
|
{...getFieldsProps(props)}
|
|
266
|
-
handleFormValue={value => {
|
|
278
|
+
handleFormValue={(value) => {
|
|
267
279
|
return value && typeof value === 'string' ? value.split(',') : value;
|
|
268
280
|
}}
|
|
269
281
|
readOnly={readOnly}
|
|
270
282
|
disabled={disabled}
|
|
271
283
|
required={required}
|
|
272
|
-
render={val => renderCommonList(val, dataSource)}
|
|
284
|
+
render={(val) => renderCommonList(val, dataSource)}
|
|
273
285
|
rules={finalRules}
|
|
274
286
|
defaultValue={dfValue}
|
|
275
287
|
ref={formFieldsRef}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Collapse } from 'antd';
|
|
3
3
|
import type { CollapsePanelProps } from 'antd/lib/collapse';
|
|
4
|
-
import { useCallback, useEffect, useRef } from 'react';
|
|
4
|
+
import React, { useCallback, useEffect, useRef } from 'react';
|
|
5
5
|
import Header from '../Card/CardTitle';
|
|
6
6
|
import CommIcon from '../Icon';
|
|
7
7
|
import type { PrefixIconIconProps } from '../Icon/PropsType';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicDataFieldItem, DynamicDataType, LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Form, FormInstance, Spin } from 'antd';
|
|
3
|
-
import { CSSProperties, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import React, { CSSProperties, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { DynamicDataContext, DynamicDataProvider } from '../utils';
|
|
5
5
|
import { useDynamicDataContainer } from './useDynamicDataContainer';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Badge, Tabs, Tooltip } from 'antd';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { useEffect, useImperativeHandle, useState } from 'react';
|
|
4
|
+
import React, { useEffect, useImperativeHandle, useState } from 'react';
|
|
5
5
|
import { useHiddenStyle } from '../utils';
|
|
6
6
|
import CustomModule from '../utils/CustomModule';
|
|
7
7
|
import { DynamicTabsProps, TabsItemProps } from './PropsType';
|
|
@@ -2,7 +2,7 @@ import { CaretDownOutlined } from '@ant-design/icons';
|
|
|
2
2
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
3
3
|
import { Collapse } from 'antd';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { CSSProperties, useMemo, useState } from 'react';
|
|
5
|
+
import React, { CSSProperties, useMemo, useState } from 'react';
|
|
6
6
|
import { MyCardProps } from '../Card';
|
|
7
7
|
import useExtendBtn from '../Card/useExtendBtn';
|
|
8
8
|
import { FormChildren } from '../Form/Form';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
3
3
|
import GanttLoader from './loader';
|
|
4
4
|
|
|
5
5
|
const Gantt = LingxiForwardRef<unknown, any>((props, ref) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
3
3
|
import SyncGridViewLoader from './loader';
|
|
4
4
|
|
|
5
5
|
const SyncGridView = LingxiForwardRef<unknown, any>((props, ref) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
2
2
|
import { Icon as LegacyIcon } from '@lingxiteam/icons';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { useMemo } from 'react';
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
5
|
import { useLocale } from '../../utils/hooks/useLocale';
|
|
6
6
|
import { IconCfg, UseIconProps } from '../PropsType';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Menu } from 'antd';
|
|
3
|
-
import { useEffect, useImperativeHandle, useMemo, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useImperativeHandle, useMemo, useState } from 'react';
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import { useListenProps } from '../utils';
|
|
6
6
|
import { useLocale } from '../utils/hooks/useLocale';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Progress } from 'antd';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { useEffect, useMemo } from 'react';
|
|
4
|
+
import React, { useEffect, useMemo } from 'react';
|
|
5
5
|
import { useListenProps } from '../utils';
|
|
6
6
|
import { useUpdateEffect } from '../utils/ahooks';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import QrCodeWithLogo from 'qr-code-with-logo';
|
|
3
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { isImgUrl, setRgbTo16 } from '../utils/common';
|
|
5
5
|
import { logoSizeTrans } from './const';
|
|
6
6
|
// @ts-ignore
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useRef } from 'react';
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
3
|
import { filterHtmlNode, FormFields, getFieldsProps, useCommonImperativeHandle } from '../utils';
|
|
4
4
|
import QuillEditorLoad from './loader';
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import * as echarts from 'echarts/core';
|
|
14
14
|
import { LabelLayout, UniversalTransition } from 'echarts/features';
|
|
15
15
|
import { CanvasRenderer } from 'echarts/renderers';
|
|
16
|
-
import { useEffect, useImperativeHandle, useLayoutEffect, useRef } from 'react';
|
|
16
|
+
import React, { useEffect, useImperativeHandle, useLayoutEffect, useRef } from 'react';
|
|
17
17
|
import { bind, clear } from 'size-sensor';
|
|
18
18
|
import { useHiddenStyle } from '../utils';
|
|
19
19
|
import { useRadarChartHook } from './RadarChartHook';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
3
3
|
import { Rate as AntdRate } from 'antd';
|
|
4
4
|
import type { RateProps } from 'antd/lib/rate';
|
|
5
|
-
import { useCallback, useMemo } from 'react';
|
|
5
|
+
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
import { FormFields, getFieldsProps, useCommonImperativeHandle } from '../utils';
|
|
7
7
|
import { useLocale } from '../utils/hooks/useLocale';
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import * as echarts from 'echarts/core';
|
|
19
19
|
import { LabelLayout, UniversalTransition } from 'echarts/features';
|
|
20
20
|
import { CanvasRenderer } from 'echarts/renderers';
|
|
21
|
-
import { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
|
|
21
|
+
import React, { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
|
|
22
22
|
import { bind, clear } from 'size-sensor';
|
|
23
23
|
import { useHiddenStyle, useListenProps } from '../utils';
|
|
24
24
|
import { MyReactEChartsProps } from './PropsType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useImperativeHandle, useState } from 'react';
|
|
2
|
+
import React, { useImperativeHandle, useState } from 'react';
|
|
3
3
|
import ReactEChartsLoader from './loader';
|
|
4
4
|
import { MyReactEChartsProps } from './PropsType';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { createRequires } from '@paciolan/remote-component/dist/createRequires';
|
|
3
3
|
import { createUseRemoteComponent } from '@paciolan/remote-component/dist/hooks/useRemoteComponent';
|
|
4
|
-
import { useImperativeHandle, useRef, useState } from 'react';
|
|
4
|
+
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
5
5
|
import { useListenProps } from '../utils';
|
|
6
6
|
import { useDeepCompareEffect } from '../utils/ahooks';
|
|
7
7
|
import { mergeGetter, RemoteComponentMap } from './constant';
|
|
@@ -183,11 +183,11 @@ export const handleDataSource = (dataSource: any[], appendDataSoure?: any[] | Ob
|
|
|
183
183
|
const value = v?.[valueKey || 'value'] || v?.key;
|
|
184
184
|
if (value) {
|
|
185
185
|
// TODO: 为什么 id 是数字就不行??
|
|
186
|
-
valueKeys.push(value
|
|
186
|
+
valueKeys.push(`${value}`);
|
|
187
187
|
newDataSoure.push({
|
|
188
188
|
...v,
|
|
189
189
|
label,
|
|
190
|
-
value: value
|
|
190
|
+
value: `${value}`,
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
});
|
package/lib/pcpublic/src/components/pcfactory/src/StdUpload/DownloadProgress/DownloadProgress.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Progress } from 'antd';
|
|
2
|
-
import { forwardRef, useImperativeHandle, useState } from 'react';
|
|
2
|
+
import React, { forwardRef, useImperativeHandle, useState } from 'react';
|
|
3
3
|
|
|
4
4
|
const DownloadProgress = forwardRef((_, ref) => {
|
|
5
5
|
const [percent, setPercent] = useState<number>(0);
|
|
@@ -2,7 +2,7 @@ import { FileOutlined, LoadingOutlined, PaperClipOutlined } from '@ant-design/ic
|
|
|
2
2
|
import { Progress, Spin } from 'antd';
|
|
3
3
|
import { UploadFile } from 'antd/lib/upload/interface';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { ReactElement, ReactNode } from 'react';
|
|
5
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
6
6
|
// import fileIcon from './assets/fileName.png';
|
|
7
7
|
import defaultIcon from './assets/default.png';
|
|
8
8
|
import pptIcon from './assets/ppt.png';
|
|
@@ -2,7 +2,7 @@ import { Icon } from '@lingxiteam/icons';
|
|
|
2
2
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
3
3
|
import { Steps } from 'antd';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { useEffect, useImperativeHandle, useState } from 'react';
|
|
5
|
+
import React, { useEffect, useImperativeHandle, useState } from 'react';
|
|
6
6
|
import FactoryIcon from '../Icon';
|
|
7
7
|
import { useListenProps } from '../utils';
|
|
8
8
|
import { useLocale } from '../utils/hooks/useLocale';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
2
|
import { Switch as AntdSwitch } from 'antd';
|
|
3
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import CommIcon from '../Icon';
|
|
5
5
|
import { handleIsValidIconCfg } from '../Icon/hooks';
|
|
6
6
|
import { FormFields, useCommonImperativeHandle, useForm } from '../utils';
|