@lingxiteam/ebe-utils 0.2.21 → 0.2.23

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.
Files changed (144) hide show
  1. package/lib/h5public/yarn.lock +7 -8
  2. package/lib/pcpublic/src/components/pcfactory/src/Button/index.tsx +11 -10
  3. package/lib/pcpublic/src/components/pcfactory/src/Card/CardTitle/index.tsx +31 -24
  4. package/lib/pcpublic/src/components/pcfactory/src/Card/index.tsx +32 -14
  5. package/lib/pcpublic/src/components/pcfactory/src/Card/useExtendBtn.tsx +85 -48
  6. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/ChartLine.tsx +24 -6
  7. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/PropsType.ts +31 -5
  8. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/index.tsx +3 -2
  9. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/loader.tsx +1 -1
  10. package/lib/pcpublic/src/components/pcfactory/src/Form/Form.tsx +153 -129
  11. package/lib/pcpublic/src/components/pcfactory/src/Form/index.tsx +2 -5
  12. package/lib/pcpublic/src/components/pcfactory/src/Form/useFormStatus.ts +8 -4
  13. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/LXPieChart.tsx +15 -3
  14. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/PropsType.ts +4 -3
  15. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/index.tsx +1 -1
  16. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/loader.tsx +1 -1
  17. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/LXRadarChat.tsx +18 -4
  18. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/PropsType.ts +2 -1
  19. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/index.tsx +1 -1
  20. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/loader.tsx +1 -1
  21. package/lib/pcpublic/src/components/pcfactory/src/ModalSelect/BaseModalSelect.tsx +7 -2
  22. package/lib/pcpublic/src/components/pcfactory/src/ModalSelect/index.tsx +60 -26
  23. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/LcdpUeditorMain.tsx +62 -55
  24. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/RichTextEditor.tsx +2 -6
  25. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/RichTextEditorMain.tsx +5 -5
  26. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/index.tsx +9 -2
  27. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/loader.ts +1 -1
  28. package/lib/pcpublic/src/components/pcfactory/src/Select/index.tsx +145 -66
  29. package/lib/pcpublic/src/components/pcfactory/src/Select/selectUtils.ts +13 -9
  30. package/lib/pcpublic/src/components/pcfactory/src/Table/BodyCell/index.tsx +36 -26
  31. package/lib/pcpublic/src/components/pcfactory/src/Table/EditComponent/index.tsx +69 -94
  32. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/GhostTag/index.tsx +12 -5
  33. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Hyperlink/index.tsx +9 -5
  34. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PointTag/index.tsx +11 -5
  35. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PureColourFill/index.tsx +11 -5
  36. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PureFadeColourTag/index.tsx +14 -7
  37. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Thumbnail/index.tsx +30 -31
  38. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/index.tsx +89 -41
  39. package/lib/pcpublic/src/components/pcfactory/src/Table/HeaderCell/HeaderCellTitle/index.tsx +25 -12
  40. package/lib/pcpublic/src/components/pcfactory/src/Table/HeaderCell/index.tsx +12 -5
  41. package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/PopoverWrapper.tsx +220 -0
  42. package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/SingleBtn.tsx +39 -32
  43. package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/index.tsx +178 -148
  44. package/lib/pcpublic/src/components/pcfactory/src/Table/Table.tsx +439 -0
  45. package/lib/pcpublic/src/components/pcfactory/src/Table/TableHead/index.tsx +159 -72
  46. package/lib/pcpublic/src/components/pcfactory/src/Table/TableSummaryRow/index.tsx +12 -20
  47. package/lib/pcpublic/src/components/pcfactory/src/Table/constant.ts +3 -0
  48. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/index.ts +4 -4
  49. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCMDActions.ts +32 -28
  50. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCheckStrict.ts +44 -57
  51. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useColumns.tsx +306 -276
  52. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCommon.ts +9 -6
  53. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useDataSource.ts +30 -21
  54. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useExpandable.tsx +33 -27
  55. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFilter.tsx +84 -77
  56. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFormatCell.tsx +33 -16
  57. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/usePagination.ts +15 -5
  58. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +33 -33
  59. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowMerge.ts +13 -5
  60. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useScroll.ts +94 -28
  61. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSelection.ts +108 -99
  62. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSort.ts +8 -5
  63. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSummaryCol.ts +27 -43
  64. package/lib/pcpublic/src/components/pcfactory/src/Table/index.tsx +73 -394
  65. package/lib/pcpublic/src/components/pcfactory/src/Table/loader.tsx +15 -0
  66. package/lib/pcpublic/src/components/pcfactory/src/Table/types/OperationCell.d.ts +2 -2
  67. package/lib/pcpublic/src/components/pcfactory/src/Table/types/event.d.ts +12 -8
  68. package/lib/pcpublic/src/components/pcfactory/src/Table/types/headerCell.d.ts +2 -1
  69. package/lib/pcpublic/src/components/pcfactory/src/Table/types/prop.d.ts +24 -11
  70. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/SequenceId.ts +2 -1
  71. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/index.ts +90 -82
  72. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/indexedDBHelper.ts +9 -22
  73. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/translate.ts +59 -0
  74. package/lib/pcpublic/src/components/pcfactory/src/Transfer/Transfer.tsx +644 -0
  75. package/lib/pcpublic/src/components/pcfactory/src/Transfer/index.tsx +49 -637
  76. package/lib/pcpublic/src/components/pcfactory/src/Transfer/loader.tsx +11 -0
  77. package/lib/pcpublic/src/components/pcfactory/src/Tree/TreeEllipsisIcon.tsx +38 -0
  78. package/lib/pcpublic/src/components/pcfactory/src/Tree/TreeNodeMenu/index.tsx +34 -35
  79. package/lib/pcpublic/src/components/pcfactory/src/Tree/index.tsx +213 -149
  80. package/lib/pcpublic/src/components/pcfactory/src/TreeSelect/index.tsx +47 -43
  81. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/TreeTable.tsx +264 -0
  82. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/index.ts +4 -1
  83. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/useCMDAction.ts +9 -3
  84. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/useExpandable.tsx +9 -3
  85. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/index.tsx +52 -191
  86. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/loader.tsx +16 -0
  87. package/lib/pcpublic/src/components/pcfactory/src/assets/index.tsx +34 -0
  88. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/quadrate.tsx +20 -0
  89. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/roundness.tsx +14 -0
  90. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/semicircle.tsx +15 -0
  91. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/verticalLine.tsx +12 -0
  92. package/lib/pcpublic/src/components/pcfactory/src/styles/common.less +17 -0
  93. package/lib/pcpublic/src/components/pcfactory/src/styles/components/Card.less +57 -11
  94. package/lib/pcpublic/src/components/pcfactory/src/styles/components/Form.less +101 -12
  95. package/lib/pcpublic/src/components/pcfactory/src/styles/components/ModalSelect.less +6 -0
  96. package/lib/pcpublic/src/components/pcfactory/src/styles/components/Select.less +70 -6
  97. package/lib/pcpublic/src/components/pcfactory/src/utils/ChannelContainer.tsx +20 -14
  98. package/lib/pcpublic/src/components/pcfactory/src/utils/ChildRender.ts +6 -8
  99. package/lib/pcpublic/src/components/pcfactory/src/utils/CustomModule.tsx +4 -6
  100. package/lib/pcpublic/src/components/pcfactory/src/utils/DummyFormContext.ts +9 -13
  101. package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/empty.tsx +5 -17
  102. package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/index.tsx +3 -3
  103. package/lib/pcpublic/src/components/pcfactory/src/utils/Holidays.ts +11 -39
  104. package/lib/pcpublic/src/components/pcfactory/src/utils/HolidaysFormat.ts +83 -0
  105. package/lib/pcpublic/src/components/pcfactory/src/utils/IdleContainer/index.tsx +47 -0
  106. package/lib/pcpublic/src/components/pcfactory/src/utils/IdleContainer/scheduler.ts +74 -0
  107. package/lib/pcpublic/src/components/pcfactory/src/utils/LoaderHelper.tsx +4 -1
  108. package/lib/pcpublic/src/components/pcfactory/src/utils/Spin/index.tsx +8 -7
  109. package/lib/pcpublic/src/components/pcfactory/src/utils/WithSyncValue.ts +25 -23
  110. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/index.ts +10 -7
  111. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useMap.ts +9 -6
  112. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useMemoizedFn.ts +4 -1
  113. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/usePersistFn.ts +17 -0
  114. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useSafeState.ts +2 -2
  115. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useSetState.ts +7 -5
  116. package/lib/pcpublic/src/components/pcfactory/src/utils/common.ts +23 -50
  117. package/lib/pcpublic/src/components/pcfactory/src/utils/constant.ts +53 -57
  118. package/lib/pcpublic/src/components/pcfactory/src/utils/dynamicUtils/DynamicContext.tsx +12 -17
  119. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/FormContext.tsx +22 -12
  120. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/FormFields.tsx +50 -19
  121. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/WrapperContainer.tsx +58 -37
  122. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/cmdHelper.ts +33 -30
  123. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/common.ts +2 -0
  124. package/lib/pcpublic/src/components/pcfactory/src/utils/generatorDisabledCallback.ts +121 -113
  125. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useCommonImperativeHandle.ts +16 -14
  126. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useCompState.tsx +1 -1
  127. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useDataMask.ts +7 -2
  128. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useDoubleClick.ts +3 -1
  129. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useFuncExpExecute.ts +16 -14
  130. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useGetStaticAttrData.ts +9 -3
  131. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useHiddenStyle.ts +4 -5
  132. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useInit.ts +11 -0
  133. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useInitReactQuill.ts +3 -1
  134. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useListenState.ts +1 -0
  135. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useLocale.ts +5 -3
  136. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/usePrintMode.tsx +2 -2
  137. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useRules.ts +1 -1
  138. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useTestHelper.ts +2 -0
  139. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useToggleBoolean.ts +8 -4
  140. package/lib/pcpublic/src/components/pcfactory/src/utils/index.ts +10 -10
  141. package/lib/pcpublic/src/components/pcfactory/src/utils/polyfill.js +29 -31
  142. package/lib/pcpublic/src/components/pcfactory/src/utils/renderReadOnly.tsx +29 -26
  143. package/lib/public/public/iconfont.js +1 -0
  144. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
1
  import { usePrevious, useSafeState, useUpdateEffect } from '../ahooks';
2
2
 
3
+
3
4
  /**
4
5
  * 属性值变化调用方法更新
5
6
  * @param value
@@ -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 = (localeApis?: EngineApisType) => {
101
+
102
+ export const useLocale = (
103
+ localeApis?: EngineApisType
104
+ ) => {
103
105
  const getLocale = (t: string, params?: any) => {
104
106
  if (localeApis?.getLocale) {
105
107
  return localeApis?.getLocale(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 { useMemo, useRef, useState } from 'react';
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; reject?: 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[]) => void] => {
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 = (defaultValue: any): [boolean, (val: boolean | 'toggle') => void] => {
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 = (defaultValue: any): [boolean, (val: boolean | 'toggle') => void] => {
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 { default as useCommonImperativeHandle } from './hooks/useCommonImperativeHandle';
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 useHiddenStyle } from './hooks/useHiddenStyle';
7
+ export { default as useCommonImperativeHandle } from './hooks/useCommonImperativeHandle';
13
8
  export * from './hooks/useListenState';
14
- export * from './hooks/usePrintMode';
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()}`.replace('0.', '');
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
- 'DOMAttrModified',
161
- function () {
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
- // eslint-disable-next-line no-undef
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
- })(typeof global !== 'undefined' ? global : this, root => {
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
- // If the character is the first character and is a `-` (U+002D), and
222
- // there is no second character, […]
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
- firstCodeUnit === 0x002d
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
- // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
243
- // U+007F, […]
244
- (codeUnit >= 0x0001 && codeUnit <= 0x001f) ||
245
- codeUnit == 0x007f ||
246
- // If the character is the first character and is in the range [0-9]
247
- // (U+0030 to U+0039), […]
248
- (index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
249
- // If the character is the second character and is in the range [0-9]
250
- // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
251
- (index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002d)
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
- codeUnit == 0x002d ||
265
- codeUnit == 0x005f ||
266
- (codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
267
- (codeUnit >= 0x0041 && codeUnit <= 0x005a) ||
268
- (codeUnit >= 0x0061 && codeUnit <= 0x007a)
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
- labelKey: 'label',
35
- valueKey: 'value',
36
- childrenKey: 'children',
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
- val?.map((curVal, idx) => {
48
- if (Array.isArray(curVal)) {
49
- // TODO list获取有问题
50
- return loopValue(cloneDeep(lastList), curVal, '/', true);
51
- }
52
- const resStr = getLabelName(cloneDeep(lastList), curVal);
53
- // 级联需要把当前的list替换成children
54
- if (isCascade) {
55
- const currentRow = lastList.find(o => o[valueKey] === curVal);
56
- if (currentRow?.[childrenKey]) {
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
- return resStr;
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 <span className={className}>{val}</span>;
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.21",
3
+ "version": "0.2.23",
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.21"
22
+ "@lingxiteam/ebe": "0.2.23"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"