@lingxiteam/ebe-utils 0.2.22 → 0.2.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/yarn.lock +7 -8
- package/lib/pcpublic/src/components/pcfactory/src/Button/index.tsx +11 -10
- package/lib/pcpublic/src/components/pcfactory/src/Card/CardTitle/index.tsx +31 -24
- package/lib/pcpublic/src/components/pcfactory/src/Card/index.tsx +32 -14
- package/lib/pcpublic/src/components/pcfactory/src/Card/useExtendBtn.tsx +85 -48
- package/lib/pcpublic/src/components/pcfactory/src/ChartLine/ChartLine.tsx +24 -6
- package/lib/pcpublic/src/components/pcfactory/src/ChartLine/PropsType.ts +31 -5
- package/lib/pcpublic/src/components/pcfactory/src/ChartLine/index.tsx +3 -2
- package/lib/pcpublic/src/components/pcfactory/src/ChartLine/loader.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Form/Form.tsx +153 -129
- package/lib/pcpublic/src/components/pcfactory/src/Form/index.tsx +2 -5
- package/lib/pcpublic/src/components/pcfactory/src/Form/useFormStatus.ts +8 -4
- package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/LXPieChart.tsx +15 -3
- package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/PropsType.ts +4 -3
- package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/loader.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/LXRadarChat.tsx +18 -4
- package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/PropsType.ts +2 -1
- package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/loader.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Layout/index.tsx +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/ModalSelect/BaseModalSelect.tsx +7 -2
- package/lib/pcpublic/src/components/pcfactory/src/ModalSelect/index.tsx +60 -26
- package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/LcdpUeditorMain.tsx +62 -55
- package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/RichTextEditor.tsx +2 -6
- package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/RichTextEditorMain.tsx +5 -5
- package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/index.tsx +9 -2
- package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/loader.ts +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Select/index.tsx +145 -66
- package/lib/pcpublic/src/components/pcfactory/src/Select/selectUtils.ts +13 -9
- package/lib/pcpublic/src/components/pcfactory/src/Table/BodyCell/index.tsx +36 -26
- package/lib/pcpublic/src/components/pcfactory/src/Table/EditComponent/index.tsx +69 -94
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/GhostTag/index.tsx +12 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Hyperlink/index.tsx +9 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PointTag/index.tsx +11 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PureColourFill/index.tsx +11 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PureFadeColourTag/index.tsx +14 -7
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Thumbnail/index.tsx +30 -31
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/index.tsx +89 -41
- package/lib/pcpublic/src/components/pcfactory/src/Table/HeaderCell/HeaderCellTitle/index.tsx +25 -12
- package/lib/pcpublic/src/components/pcfactory/src/Table/HeaderCell/index.tsx +12 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/PopoverWrapper.tsx +220 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/SingleBtn.tsx +39 -32
- package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/index.tsx +178 -148
- package/lib/pcpublic/src/components/pcfactory/src/Table/Table.tsx +439 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/TableHead/index.tsx +159 -72
- package/lib/pcpublic/src/components/pcfactory/src/Table/TableSummaryRow/index.tsx +12 -20
- package/lib/pcpublic/src/components/pcfactory/src/Table/constant.ts +3 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/index.ts +4 -4
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCMDActions.ts +32 -28
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCheckStrict.ts +44 -57
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useColumns.tsx +306 -276
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCommon.ts +9 -6
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useDataSource.ts +30 -21
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useExpandable.tsx +33 -27
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFilter.tsx +84 -77
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFormatCell.tsx +33 -16
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/usePagination.ts +15 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +33 -33
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowMerge.ts +13 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useScroll.ts +94 -28
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSelection.ts +108 -99
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSort.ts +8 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSummaryCol.ts +27 -43
- package/lib/pcpublic/src/components/pcfactory/src/Table/index.tsx +73 -394
- package/lib/pcpublic/src/components/pcfactory/src/Table/loader.tsx +15 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/OperationCell.d.ts +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/event.d.ts +12 -8
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/headerCell.d.ts +2 -1
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/prop.d.ts +24 -11
- package/lib/pcpublic/src/components/pcfactory/src/Table/utils/SequenceId.ts +2 -1
- package/lib/pcpublic/src/components/pcfactory/src/Table/utils/index.ts +90 -82
- package/lib/pcpublic/src/components/pcfactory/src/Table/utils/indexedDBHelper.ts +9 -22
- package/lib/pcpublic/src/components/pcfactory/src/Table/utils/translate.ts +59 -0
- package/lib/pcpublic/src/components/pcfactory/src/Transfer/Transfer.tsx +644 -0
- package/lib/pcpublic/src/components/pcfactory/src/Transfer/index.tsx +49 -637
- package/lib/pcpublic/src/components/pcfactory/src/Transfer/loader.tsx +11 -0
- package/lib/pcpublic/src/components/pcfactory/src/Tree/TreeEllipsisIcon.tsx +38 -0
- package/lib/pcpublic/src/components/pcfactory/src/Tree/TreeNodeMenu/index.tsx +34 -35
- package/lib/pcpublic/src/components/pcfactory/src/Tree/index.tsx +213 -149
- package/lib/pcpublic/src/components/pcfactory/src/TreeSelect/index.tsx +47 -43
- package/lib/pcpublic/src/components/pcfactory/src/TreeTable/TreeTable.tsx +264 -0
- package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/index.ts +4 -1
- package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/useCMDAction.ts +9 -3
- package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/useExpandable.tsx +9 -3
- package/lib/pcpublic/src/components/pcfactory/src/TreeTable/index.tsx +52 -191
- package/lib/pcpublic/src/components/pcfactory/src/TreeTable/loader.tsx +16 -0
- package/lib/pcpublic/src/components/pcfactory/src/assets/index.tsx +34 -0
- package/lib/pcpublic/src/components/pcfactory/src/assets/svg/quadrate.tsx +20 -0
- package/lib/pcpublic/src/components/pcfactory/src/assets/svg/roundness.tsx +14 -0
- package/lib/pcpublic/src/components/pcfactory/src/assets/svg/semicircle.tsx +15 -0
- package/lib/pcpublic/src/components/pcfactory/src/assets/svg/verticalLine.tsx +12 -0
- package/lib/pcpublic/src/components/pcfactory/src/styles/common.less +17 -0
- package/lib/pcpublic/src/components/pcfactory/src/styles/components/Card.less +57 -11
- package/lib/pcpublic/src/components/pcfactory/src/styles/components/Form.less +101 -12
- package/lib/pcpublic/src/components/pcfactory/src/styles/components/ModalSelect.less +6 -0
- package/lib/pcpublic/src/components/pcfactory/src/styles/components/Select.less +70 -6
- package/lib/pcpublic/src/components/pcfactory/src/utils/ChannelContainer.tsx +20 -14
- package/lib/pcpublic/src/components/pcfactory/src/utils/ChildRender.ts +6 -8
- package/lib/pcpublic/src/components/pcfactory/src/utils/CustomModule.tsx +4 -6
- package/lib/pcpublic/src/components/pcfactory/src/utils/DummyFormContext.ts +9 -13
- package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/empty.tsx +5 -17
- package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/index.tsx +3 -3
- package/lib/pcpublic/src/components/pcfactory/src/utils/Holidays.ts +11 -39
- package/lib/pcpublic/src/components/pcfactory/src/utils/HolidaysFormat.ts +83 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/IdleContainer/index.tsx +47 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/IdleContainer/scheduler.ts +74 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/LoaderHelper.tsx +4 -1
- package/lib/pcpublic/src/components/pcfactory/src/utils/Spin/index.tsx +8 -7
- package/lib/pcpublic/src/components/pcfactory/src/utils/WithSyncValue.ts +25 -23
- package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/index.ts +10 -7
- package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useMap.ts +9 -6
- package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useMemoizedFn.ts +4 -1
- package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/usePersistFn.ts +17 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useSafeState.ts +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useSetState.ts +7 -5
- package/lib/pcpublic/src/components/pcfactory/src/utils/common.ts +23 -50
- package/lib/pcpublic/src/components/pcfactory/src/utils/constant.ts +53 -57
- package/lib/pcpublic/src/components/pcfactory/src/utils/dynamicUtils/DynamicContext.tsx +12 -17
- package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/FormContext.tsx +22 -12
- package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/FormFields.tsx +50 -19
- package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/WrapperContainer.tsx +58 -37
- package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/cmdHelper.ts +33 -30
- package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/common.ts +2 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/generatorDisabledCallback.ts +121 -113
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useCommonImperativeHandle.ts +16 -14
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useCompState.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useDataMask.ts +7 -2
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useDoubleClick.ts +3 -1
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useFuncExpExecute.ts +16 -14
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useGetStaticAttrData.ts +9 -3
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useHiddenStyle.ts +4 -5
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useInit.ts +11 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useInitReactQuill.ts +3 -1
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useListenState.ts +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useLocale.ts +6 -4
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/usePrintMode.tsx +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useRules.ts +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useTestHelper.ts +2 -0
- package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useToggleBoolean.ts +8 -4
- package/lib/pcpublic/src/components/pcfactory/src/utils/index.ts +10 -10
- package/lib/pcpublic/src/components/pcfactory/src/utils/polyfill.js +29 -31
- package/lib/pcpublic/src/components/pcfactory/src/utils/renderReadOnly.tsx +29 -26
- package/lib/public/public/iconfont.js +1 -0
- package/package.json +2 -2
|
@@ -98,15 +98,17 @@ export const lang = (t: string, tip?: unknown) => {
|
|
|
98
98
|
const l = typeof langOptions[t] === 'function' ? langOptions[t](tip) : langOptions[t];
|
|
99
99
|
return l;
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
export const useLocale = (
|
|
101
|
+
|
|
102
|
+
export const useLocale = (
|
|
103
|
+
localeApis?: EngineApisType
|
|
104
|
+
) => {
|
|
103
105
|
const getLocale = (t: string, params?: any) => {
|
|
104
106
|
if (localeApis?.getLocale) {
|
|
105
|
-
return localeApis?.getLocale(t, '', params);
|
|
107
|
+
return localeApis?.getLocale(t, '', params) || lang(t, params);
|
|
106
108
|
}
|
|
107
109
|
return lang(t, params);
|
|
108
110
|
};
|
|
109
|
-
|
|
111
|
+
|
|
110
112
|
const language = localeApis?.getLocaleEnv?.() || 'zh-CN';
|
|
111
113
|
|
|
112
114
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React, { useState, useRef, useMemo } from 'react';
|
|
2
2
|
import { useCreation, useMemoizedFn, useUpdateEffect } from '../ahooks';
|
|
3
3
|
|
|
4
4
|
const CSS_SELECTOR_KEY = 'data-print-compid';
|
|
@@ -27,7 +27,7 @@ export const usePrintMode = (id: string) => {
|
|
|
27
27
|
};
|
|
28
28
|
}, []);
|
|
29
29
|
|
|
30
|
-
const resolveFunc = useRef<{ resolve?: Function
|
|
30
|
+
const resolveFunc = useRef<{ resolve?: Function, reject?: Function }>();
|
|
31
31
|
|
|
32
32
|
const afterPrint = useMemoizedFn(() => {
|
|
33
33
|
setShowPrintContainer(false);
|
|
@@ -80,7 +80,7 @@ const useRules = (
|
|
|
80
80
|
},
|
|
81
81
|
getLocale?: any,
|
|
82
82
|
lang?: string
|
|
83
|
-
): [Rule[], (rules: RuleInterface[], isAppendLastTime: boolean) => void, (rules: Rule[])
|
|
83
|
+
): [Rule[], (rules: RuleInterface[], isAppendLastTime: boolean) => void, (rules: Rule[])=> void] => {
|
|
84
84
|
/**
|
|
85
85
|
* 设置扩展规则
|
|
86
86
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
interface TestHelperOptions {
|
|
2
3
|
fieldName?: string;
|
|
3
4
|
disabled?: boolean;
|
|
@@ -16,6 +17,7 @@ export const toString = (val: any) => {
|
|
|
16
17
|
return val;
|
|
17
18
|
};
|
|
18
19
|
|
|
20
|
+
|
|
19
21
|
export const getTestHelperProps = (props: TestHelperOptions) => {
|
|
20
22
|
const { fieldName, disabled } = props;
|
|
21
23
|
return {
|
|
@@ -6,24 +6,28 @@ import { useListenProps } from './useListenState';
|
|
|
6
6
|
* @param defaultValue 默认值
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export const useToggleBoolean = (
|
|
9
|
+
export const useToggleBoolean = (
|
|
10
|
+
defaultValue: any,
|
|
11
|
+
): [boolean, (val: boolean | 'toggle') => void] => {
|
|
10
12
|
const [state, setState] = useState<boolean>(defaultValue);
|
|
11
13
|
const setToggleState = useCallback(
|
|
12
14
|
(val: boolean | 'toggle') => {
|
|
13
15
|
setState(val === 'toggle' ? !state : val);
|
|
14
16
|
},
|
|
15
|
-
[state]
|
|
17
|
+
[state],
|
|
16
18
|
);
|
|
17
19
|
return [state, setToggleState];
|
|
18
20
|
};
|
|
19
21
|
|
|
20
|
-
export const useListenToggleBoolean = (
|
|
22
|
+
export const useListenToggleBoolean = (
|
|
23
|
+
defaultValue: any,
|
|
24
|
+
): [boolean, (val: boolean | 'toggle') => void] => {
|
|
21
25
|
const [state, setState] = useListenProps<boolean>(defaultValue);
|
|
22
26
|
const setToggleState = useCallback(
|
|
23
27
|
(val: boolean | 'toggle') => {
|
|
24
28
|
setState(val === 'toggle' ? !state : val);
|
|
25
29
|
},
|
|
26
|
-
[state]
|
|
30
|
+
[state],
|
|
27
31
|
);
|
|
28
32
|
return [state, setToggleState];
|
|
29
33
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { default as basicStatusTransfer } from './basicStatusTransfer';
|
|
2
|
-
export * from './ChildRender';
|
|
3
|
-
export { DynamicDataProvider, useDynamicData } from './dynamicUtils/DynamicContext';
|
|
4
|
-
export type { DynamicDataContext } from './dynamicUtils/DynamicContext';
|
|
5
|
-
export * from './formUtils/cmdHelper';
|
|
6
|
-
export * from './formUtils/common';
|
|
7
1
|
export { FormProvider, useForm } from './formUtils/FormContext';
|
|
8
|
-
export type { FormContextProps } from './formUtils/FormContext';
|
|
9
2
|
export * from './formUtils/FormFields';
|
|
10
|
-
export {
|
|
3
|
+
export type { FormContextProps } from './formUtils/FormContext';
|
|
4
|
+
export * from './formUtils/cmdHelper';
|
|
5
|
+
export * from './formUtils/common';
|
|
11
6
|
export { default as useDataMask } from './hooks/useDataMask';
|
|
12
|
-
export { default as
|
|
7
|
+
export { default as useCommonImperativeHandle } from './hooks/useCommonImperativeHandle';
|
|
13
8
|
export * from './hooks/useListenState';
|
|
14
|
-
export * from './
|
|
9
|
+
export * from './ChildRender';
|
|
10
|
+
export { default as useHiddenStyle } from './hooks/useHiddenStyle';
|
|
15
11
|
export * from './hooks/useRules';
|
|
16
12
|
export * from './hooks/useToggleBoolean';
|
|
13
|
+
export * from './hooks/usePrintMode';
|
|
14
|
+
export { default as basicStatusTransfer } from './basicStatusTransfer';
|
|
15
|
+
export { DynamicDataProvider, useDynamicData } from './dynamicUtils/DynamicContext';
|
|
16
|
+
export type { DynamicDataContext } from './dynamicUtils/DynamicContext';
|
|
@@ -48,7 +48,7 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
48
48
|
// 鏂囨湰鍩熺殑id
|
|
49
49
|
let { id } = textarea;
|
|
50
50
|
if (!id) {
|
|
51
|
-
id = `r${Math.random()}
|
|
51
|
+
id = (`r${Math.random()}`).replace('0.', '');
|
|
52
52
|
textarea.id = id;
|
|
53
53
|
}
|
|
54
54
|
// 鑾峰彇resize灞炴€у€�
|
|
@@ -74,8 +74,7 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
74
74
|
resize.style.position = 'absolute';
|
|
75
75
|
resize.style.width = '17px';
|
|
76
76
|
resize.style.height = '17px';
|
|
77
|
-
resize.style.background =
|
|
78
|
-
"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";
|
|
77
|
+
resize.style.background = "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";
|
|
79
78
|
resize.style.bottom = '0';
|
|
80
79
|
resize.style.right = '0';
|
|
81
80
|
resize.style.backgroundSize = '12px 12px';
|
|
@@ -156,13 +155,9 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
156
155
|
this.setResize();
|
|
157
156
|
|
|
158
157
|
// 鏇存柊涓庡鐞�
|
|
159
|
-
this.addEventListener(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.setResize();
|
|
163
|
-
},
|
|
164
|
-
false
|
|
165
|
-
);
|
|
158
|
+
this.addEventListener('DOMAttrModified', function () {
|
|
159
|
+
this.setResize();
|
|
160
|
+
}, false);
|
|
166
161
|
};
|
|
167
162
|
|
|
168
163
|
window.addEventListener('DOMContentLoaded', () => {
|
|
@@ -191,7 +186,7 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
191
186
|
if (typeof exports === 'object') {
|
|
192
187
|
// For Node.js.
|
|
193
188
|
module.exports = factory(root);
|
|
194
|
-
|
|
189
|
+
// eslint-disable-next-line no-undef
|
|
195
190
|
} else if (typeof define === 'function' && define.amd) {
|
|
196
191
|
// For AMD. Register as an anonymous module.
|
|
197
192
|
// eslint-disable-next-line no-undef
|
|
@@ -200,7 +195,7 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
200
195
|
// For browser globals (not exposing the function separately).
|
|
201
196
|
factory(root);
|
|
202
197
|
}
|
|
203
|
-
}
|
|
198
|
+
}(typeof global !== 'undefined' ? global : this, root => {
|
|
204
199
|
if (root.CSS && root.CSS.escape) {
|
|
205
200
|
return root.CSS.escape;
|
|
206
201
|
}
|
|
@@ -218,10 +213,10 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
218
213
|
const firstCodeUnit = string.charCodeAt(0);
|
|
219
214
|
|
|
220
215
|
if (
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
// If the character is the first character and is a `-` (U+002D), and
|
|
217
|
+
// there is no second character, […]
|
|
223
218
|
length === 1 &&
|
|
224
|
-
|
|
219
|
+
firstCodeUnit === 0x002D
|
|
225
220
|
) {
|
|
226
221
|
return `\\${string}`;
|
|
227
222
|
}
|
|
@@ -239,16 +234,19 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
239
234
|
}
|
|
240
235
|
|
|
241
236
|
if (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
(codeUnit >= 0x0001 && codeUnit <=
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
237
|
+
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
238
|
+
// U+007F, […]
|
|
239
|
+
(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
|
|
240
|
+
// If the character is the first character and is in the range [0-9]
|
|
241
|
+
// (U+0030 to U+0039), […]
|
|
242
|
+
(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
|
243
|
+
// If the character is the second character and is in the range [0-9]
|
|
244
|
+
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
245
|
+
(
|
|
246
|
+
index == 1 &&
|
|
247
|
+
codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
|
|
248
|
+
firstCodeUnit == 0x002D
|
|
249
|
+
)
|
|
252
250
|
) {
|
|
253
251
|
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
254
252
|
result += `\\${codeUnit.toString(16)} `;
|
|
@@ -261,11 +259,11 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
261
259
|
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
262
260
|
if (
|
|
263
261
|
codeUnit >= 0x0080 ||
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
262
|
+
codeUnit == 0x002D ||
|
|
263
|
+
codeUnit == 0x005F ||
|
|
264
|
+
codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
|
|
265
|
+
codeUnit >= 0x0041 && codeUnit <= 0x005A ||
|
|
266
|
+
codeUnit >= 0x0061 && codeUnit <= 0x007A
|
|
269
267
|
) {
|
|
270
268
|
// the character itself
|
|
271
269
|
result += string.charAt(index);
|
|
@@ -285,4 +283,4 @@ if (typeof window.getComputedStyle(document.body).resize === 'undefined' && wind
|
|
|
285
283
|
|
|
286
284
|
root.CSS.escape = cssEscape;
|
|
287
285
|
return cssEscape;
|
|
288
|
-
});
|
|
286
|
+
}));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { cloneDeep } from 'lodash';
|
|
2
3
|
|
|
4
|
+
|
|
3
5
|
const className = 'ued-input-readonly';
|
|
4
6
|
|
|
5
7
|
// 富文本
|
|
@@ -23,19 +25,15 @@ export const renderDatePicker = (str: string | string[], separator: any) => {
|
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
// 通用 单选 多选 级联 label提取
|
|
26
|
-
export const renderCommonList = (
|
|
27
|
-
value: any,
|
|
28
|
-
options: any[],
|
|
29
|
-
fieldName: {
|
|
28
|
+
export const renderCommonList = (value: any, options: any[], fieldName: {
|
|
30
29
|
labelKey: string;
|
|
31
30
|
valueKey: string;
|
|
32
31
|
childrenKey: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
) => {
|
|
32
|
+
} = {
|
|
33
|
+
labelKey: 'label',
|
|
34
|
+
valueKey: 'value',
|
|
35
|
+
childrenKey: 'children',
|
|
36
|
+
}) => {
|
|
39
37
|
const { labelKey, valueKey, childrenKey } = fieldName;
|
|
40
38
|
const getLabelName = (list: any[], val: any) => {
|
|
41
39
|
const row = list?.find?.(o => o[valueKey] === val);
|
|
@@ -43,22 +41,21 @@ export const renderCommonList = (
|
|
|
43
41
|
};
|
|
44
42
|
const loopValue = (list: any[], val: any[], split: string = ',', isCascade: boolean = false) => {
|
|
45
43
|
let lastList = list || [];
|
|
46
|
-
const res: any[] =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
lastList = currentRow?.[childrenKey] || [];
|
|
58
|
-
}
|
|
44
|
+
const res: any[] = val?.map((curVal, idx) => {
|
|
45
|
+
if (Array.isArray(curVal)) {
|
|
46
|
+
// TODO list获取有问题
|
|
47
|
+
return loopValue(cloneDeep(lastList), curVal, '/', true);
|
|
48
|
+
}
|
|
49
|
+
const resStr = getLabelName(cloneDeep(lastList), curVal);
|
|
50
|
+
// 级联需要把当前的list替换成children
|
|
51
|
+
if (isCascade) {
|
|
52
|
+
const currentRow = lastList.find(o => o[valueKey] === curVal);
|
|
53
|
+
if (currentRow?.[childrenKey]) {
|
|
54
|
+
lastList = currentRow?.[childrenKey] || [];
|
|
59
55
|
}
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
}
|
|
57
|
+
return resStr;
|
|
58
|
+
}) || [];
|
|
62
59
|
return res.join(split);
|
|
63
60
|
};
|
|
64
61
|
let label: string = '';
|
|
@@ -86,7 +83,13 @@ export const flattenTreeData = (treeList: any[], childrenName: string = 'childre
|
|
|
86
83
|
};
|
|
87
84
|
|
|
88
85
|
const renderReadOnly = (val: string, props?: any) => {
|
|
89
|
-
return
|
|
86
|
+
return (
|
|
87
|
+
<span
|
|
88
|
+
className={className}
|
|
89
|
+
>
|
|
90
|
+
{val}
|
|
91
|
+
</span>
|
|
92
|
+
);
|
|
90
93
|
};
|
|
91
94
|
|
|
92
95
|
export default renderReadOnly;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window._iconfont_svg_string_4763695='<svg><symbol id="lcdp-icon-shanchu" viewBox="0 0 1024 1024"><path d="M796.16 352c19.84 0 35.84 16 35.84 35.84v476.16a96 96 0 0 1-96 96h-448A96 96 0 0 1 192 864V387.84a35.84 35.84 0 1 1 71.68 0v476.16c0 11.776 8.32 21.568 19.392 23.808l4.928 0.512h448a24.32 24.32 0 0 0 23.808-19.392l0.512-4.928V387.84c0-19.84 16-35.84 35.84-35.84z m-380.16 0c19.84 0 35.84 16 35.84 35.84v376.32a35.84 35.84 0 1 1-71.68 0V387.84c0-19.84 16-35.84 35.84-35.84z m192 0c19.84 0 35.84 16 35.84 35.84v376.32a35.84 35.84 0 1 1-71.68 0V387.84c0-19.84 16-35.84 35.84-35.84z m96-192a32 32 0 0 0-26.24-31.488L672 128h-320a32 32 0 0 0-31.488 26.24L320 160v64H256v-64A96 96 0 0 1 352 64h320A96 96 0 0 1 768 160v64h156.16a35.84 35.84 0 1 1 0 71.68H99.84a35.84 35.84 0 1 1 0-71.68H704v-64z" ></path></symbol><symbol id="lcdp-icon-tianjia-da" viewBox="0 0 1024 1024"><path d="M512 85.333333c27.349333 0 49.92 17.664 53.333333 45.696v327.637334h327.637334c25.216 0 45.696 23.893333 45.696 53.333333 0 27.349333-17.664 49.92-45.696 53.333333H565.333333v327.637334C565.333333 918.186667 541.44 938.666667 512 938.666667c-27.349333 0-49.92-17.664-53.333333-45.696v-327.68l-327.637334 0.042666C105.813333 565.333333 85.333333 541.44 85.333333 512c0-27.349333 17.664-49.92 45.696-53.333333l327.637334-0.042667V131.029333C458.666667 105.813333 482.56 85.333333 512 85.333333z" ></path></symbol><symbol id="lcdp-icon-zidingyi" viewBox="0 0 1024 1024"><path d="M331.690667 121.92L901.013333 691.2a64 64 0 0 1 0 90.517333l-129.152 129.152a64 64 0 0 1-90.496 0L112.042667 341.546667a64 64 0 0 1 0-90.517334l129.130666-129.130666a64 64 0 0 1 90.517334 0z m476.288 546.56a32 32 0 0 0-45.269334 0l-108.245333 108.245333a32 32 0 0 0 45.226667 45.248l108.288-108.245333a32 32 0 0 0 0-45.269333zM295.082667 200.810667l-108.266667 108.266666a32 32 0 1 0 45.269333 45.226667l108.245334-108.245333a32 32 0 1 0-45.248-45.248z" ></path><path d="M683.754667 121.664a93.184 93.184 0 0 1 131.797333 0l87.850667 87.872a93.184 93.184 0 0 1 0 131.776l-36.992 37.013333L646.762667 158.677333l36.992-37.013333zM601.514667 203.946667l219.648 219.648L423.829333 820.906667 204.181333 601.258667 601.514667 203.925333zM158.933333 646.506667l-25.429333 25.408C109.589333 744.533333 108.245333 867.626667 108.181333 881.130667c0 0.853333-0.064 1.664-0.149333 2.496a31.061333 31.061333 0 0 0 35.264 33.258666c11.52-0.746667 190.506667-12.544 209.877333-25.322666l25.386667-25.408L158.933333 646.506667z" ></path></symbol><symbol id="lcdp-icon-flow-single-record" viewBox="0 0 1024 1024"><path d="M187.306667 187.306667a348.16 348.16 0 0 1 521.301333 459.690666l217.301333 217.386667A43.52 43.52 0 0 1 864.426667 925.866667l-217.344-217.344A348.245333 348.245333 0 0 1 187.306667 187.306667z m61.568 61.568a261.12 261.12 0 1 0 369.28 369.28 261.12 261.12 0 0 0-369.28-369.28z" ></path></symbol><symbol id="lcdp-icon-Error" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64zM421.504 376.256a32 32 0 1 0-45.248 45.248L466.752 512 376.256 602.496a32 32 0 1 0 45.248 45.248L512 557.248l90.496 90.496a32 32 0 1 0 45.248-45.248L557.248 512l90.496-90.496a32 32 0 1 0-45.248-45.248L512 466.752z" fill="#FF7474" ></path></symbol><symbol id="lcdp-icon-Warning" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m0 224a32 32 0 0 1 32 32v224a32 32 0 0 1-64 0V320a32 32 0 0 1 32-32z m0 448A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF9D49" ></path></symbol><symbol id="lcdp-icon-News" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m0 384a32 32 0 0 1 32 32V704a32 32 0 1 1-64 0V480A32 32 0 0 1 512 448z m0-64a48 48 0 1 1 0-96A48 48 0 0 1 512 384z" fill="#4477EE" ></path></symbol><symbol id="lcdp-icon-Success" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m183.168 327.296a32 32 0 0 0-44.992 4.352l-176 213.696L375.04 506.048l-4.352-3.84a32 32 0 0 0-41.856 48.128l124.032 129.28 4.736 4.096a32 32 0 0 0 43.072-5.888l198.848-241.472 3.2-4.8a32 32 0 0 0-7.616-40.256z" fill="#41E19B" ></path></symbol><symbol id="lcdp-icon-cloud-upload" viewBox="0 0 1024 1024"><path d="M570.368 170.6496c145.8176 0 264.0384 119.552 264.0384 267.0592l-0.4608 9.0112a207.2064 207.2064 0 0 1 147.4048 199.0656c0 114.6368-91.904 207.5648-205.2608 207.5648H247.9616c-113.408 0-205.312-92.928-205.312-207.5648 0-57.088 22.784-108.7488 59.6992-146.2784a171.4176 171.4176 0 0 1-0.9216-16.9984c0-90.112 72.192-163.2768 161.28-163.2768 22.9888 0 44.8512 4.9664 64.6144 13.824 40.2944-95.4368 133.888-162.4064 243.0464-162.4064z m-58.7264 256c-5.12 0-9.6256 1.8944-13.7216 4.5056a23.1936 23.1936 0 0 0-3.9424 2.7648c-0.4608 0.4096-1.024 0.6656-1.3824 1.0752-0.256 0.256-0.512 0.4096-0.8192 0.6144l-78.336 81.1008a29.3888 29.3888 0 0 0 0 40.4992 27.136 27.136 0 0 0 39.168 0l32.256-33.3824v152.4224c0 15.36 11.9808 27.7504 26.7776 27.7504a27.2384 27.2384 0 0 0 26.6752-27.7504v-153.7536l33.28 34.6624c10.752 11.264 28.2624 11.264 39.0144 0a29.696 29.696 0 0 0 0-40.6528L532.5824 435.2a26.624 26.624 0 0 0-18.688-8.0896l-2.2528-0.512z" ></path></symbol><symbol id="lcdp-icon-tuozhuai" viewBox="0 0 1024 1024"><path d="M438.848 219.456c0-36.608-36.544-73.152-73.152-73.152-36.544 0-73.152 36.544-73.152 73.152 0 36.544 36.608 73.088 73.152 73.088 36.608 0 73.152-36.544 73.152-73.088z m146.304 585.088c0 36.608 36.544 73.152 73.152 73.152 36.544 0 73.152-36.544 73.152-73.152 0-36.544-36.608-73.088-73.152-73.088-36.608 0-73.152 36.544-73.152 73.088z m146.304-585.088c0-36.608-36.608-73.152-73.152-73.152-36.608 0-73.152 36.544-73.152 73.152 0 36.544 36.544 73.088 73.152 73.088 36.544 0 73.152-36.544 73.152-73.088zM438.848 804.48c0-36.544-36.544-73.088-73.152-73.088-36.544 0-73.152 36.544-73.152 73.088 0 36.608 36.608 73.152 73.152 73.152 36.608 0 73.152-36.544 73.152-73.152zM731.52 512c0-36.544-36.608-73.152-73.152-73.152-36.608 0-73.152 36.608-73.152 73.152 0 36.544 36.544 73.152 73.152 73.152 36.544 0 73.152-36.608 73.152-73.152zM438.848 512c0-36.544-36.544-73.152-73.152-73.152-36.544 0-73.152 36.608-73.152 73.152 0 36.544 36.608 73.152 73.152 73.152 36.608 0 73.152-36.608 73.152-73.152z" ></path></symbol></svg>',(a=>{var t=(e=(e=document.getElementsByTagName("script"))[e.length-1]).getAttribute("data-injectcss"),e=e.getAttribute("data-disable-injectsvg");if(!e){var l,o,i,c,n,d=function(t,e){e.parentNode.insertBefore(t,e)};if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(t){console&&console.log(t)}}l=function(){var t,e=document.createElement("div");e.innerHTML=a._iconfont_svg_string_4763695,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?d(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),l()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(i=l,c=a.document,n=!1,m(),c.onreadystatechange=function(){"complete"==c.readyState&&(c.onreadystatechange=null,s())})}function s(){n||(n=!0,i())}function m(){try{c.documentElement.doScroll("left")}catch(t){return void setTimeout(m,50)}s()}})(window);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxiteam/ebe-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/types": "^7.12.12",
|
|
20
20
|
"cac": "^6.7.14",
|
|
21
21
|
"fs-extra": "9.x",
|
|
22
|
-
"@lingxiteam/ebe": "0.2.
|
|
22
|
+
"@lingxiteam/ebe": "0.2.24"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|