@ecan-bi/tools 1.0.3 → 1.0.5

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 CHANGED
@@ -1,14 +1,18 @@
1
1
  // 指标库相关内容
2
- import { formatIndicatorParams } from './src/indicator'
2
+ // import { formatIndicatorParams } from './src/indicator'
3
3
  // 通用函数
4
4
  import runCode from './src/utils/runCode'
5
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'
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
+ const useValueFormatter = require('./src/hooks/useValueFormatter')
14
+
15
+
12
16
 
13
17
  // export default {
14
18
  // ...indicators,
@@ -21,11 +25,11 @@ import { getIndicatorParams } from './src/utils/util'
21
25
  // getIndicatorParams
22
26
  // }
23
27
 
24
- exports.formatIndicatorParams = formatIndicatorParams
25
- exports.runCode = runCode
26
- exports.useTransformChartDataByAttrKey = useTransformChartDataByAttrKey
27
- exports.useTransformChartDataByAttrValue = useTransformChartDataByAttrValue
28
+ // exports.formatIndicatorParams = formatIndicatorParams
29
+ // exports.runCode = runCode
30
+ // exports.useTransformChartDataByAttrKey = useTransformChartDataByAttrKey
31
+ // exports.useTransformChartDataByAttrValue = useTransformChartDataByAttrValue
28
32
  exports.useValueFormatter = useValueFormatter
29
- exports.useVariablesInText = useVariablesInText
30
- exports.transformProps = transformProps
31
- exports.getIndicatorParams = getIndicatorParams
33
+ // exports.useVariablesInText = useVariablesInText
34
+ // exports.transformProps = transformProps
35
+ // exports.getIndicatorParams = getIndicatorParams
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecan-bi/tools",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "General tools",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  import runCode from '../utils/runCode'
2
- export const useValueFormatter = (formatter: string, value:string) => {
2
+ export const useValueFormatter = (formatter, value) => {
3
+ console.log('1234')
3
4
  if (formatter == null) return value
4
5
  const variables = (formatter).match(/\{.*\}/g)
5
6
  if (variables == null || variables.length === 0) {
@@ -24,4 +25,4 @@ export const useValueFormatter = (formatter: string, value:string) => {
24
25
  return formatter
25
26
  }
26
27
 
27
- export default useValueFormatter
28
+ module.exports = useValueFormatter