@ecan-bi/tools 1.0.2 → 1.0.3

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/index.js ADDED
@@ -0,0 +1,31 @@
1
+ // 指标库相关内容
2
+ import { formatIndicatorParams } from './src/indicator'
3
+ // 通用函数
4
+ import runCode from './src/utils/runCode'
5
+ // 工作台专用
6
+ import useTransformChartDataByAttrKey from './src/hooks/useTransformChartDataByAttrKey'
7
+ import useTransformChartDataByAttrValue from './src/hooks/useTransformChartDataByAttrValue'
8
+ import useValueFormatter from './src/hooks/useValueFormatter'
9
+ import useVariablesInText from './src/hooks/useVariablesInText'
10
+ import transformProps from './src/utils/transformProps'
11
+ import { getIndicatorParams } from './src/utils/util'
12
+
13
+ // export default {
14
+ // ...indicators,
15
+ // runCode,
16
+ // useTransformChartDataByAttrKey,
17
+ // useTransformChartDataByAttrValue,
18
+ // useValueFormatter,
19
+ // useVariablesInText,
20
+ // transformProps,
21
+ // getIndicatorParams
22
+ // }
23
+
24
+ exports.formatIndicatorParams = formatIndicatorParams
25
+ exports.runCode = runCode
26
+ exports.useTransformChartDataByAttrKey = useTransformChartDataByAttrKey
27
+ exports.useTransformChartDataByAttrValue = useTransformChartDataByAttrValue
28
+ exports.useValueFormatter = useValueFormatter
29
+ exports.useVariablesInText = useVariablesInText
30
+ exports.transformProps = transformProps
31
+ exports.getIndicatorParams = getIndicatorParams
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ecan-bi/tools",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "General tools",
5
- "main": "index.ts",
5
+ "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
package/src/indicator.ts CHANGED
@@ -693,7 +693,7 @@ const getCpntSortData = (data: any) => {
693
693
  return customSort
694
694
  }
695
695
 
696
- const formatIndicatorParams = (props: any, otherParams: any = {}) => {
696
+ export const formatIndicatorParams = (props: any, otherParams: any = {}) => {
697
697
  const { graphicConfig, type, globalModel, isGroupTable = false } = props
698
698
  if (globalModel) {
699
699
  modelValue = globalModel
@@ -1226,7 +1226,3 @@ const formatIndicatorParams = (props: any, otherParams: any = {}) => {
1226
1226
  }
1227
1227
  return resultParams
1228
1228
  }
1229
-
1230
- export default {
1231
- formatIndicatorParams
1232
- }
package/index.ts DELETED
@@ -1,22 +0,0 @@
1
- // 指标库相关内容
2
- import indicators from './src/indicator'
3
- // 通用函数
4
- import runCode from './src/utils/runCode'
5
- // 工作台专用
6
- import useTransformChartDataByAttrKey from './src/hooks/useTransformChartDataByAttrKey'
7
- import useTransformChartDataByAttrValue from './src/hooks/useTransformChartDataByAttrValue'
8
- import useValueFormatter from './src/hooks/useValueFormatter'
9
- import useVariablesInText from './src/hooks/useVariablesInText'
10
- import transformProps from './src/utils/transformProps'
11
- import { getIndicatorParams } from './src/utils/util'
12
-
13
- export default {
14
- ...indicators,
15
- runCode,
16
- useTransformChartDataByAttrKey,
17
- useTransformChartDataByAttrValue,
18
- useValueFormatter,
19
- useVariablesInText,
20
- transformProps,
21
- getIndicatorParams
22
- }