gifted-charts-core 0.0.27 → 0.0.28
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/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/index.ts +0 -1
- package/src/utils/index.d.ts +0 -1
- package/src/utils/index.js +0 -10
- package/src/utils/index.ts +0 -13
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gifted-charts-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"description": "Mathematical and logical utilities used by react-gifted-charts and react-native-gifted-charts",
|
|
5
|
-
"main": "index.
|
|
5
|
+
"main": "./src/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"src"
|
|
8
8
|
],
|
package/src/index.d.ts
CHANGED
|
@@ -32,6 +32,6 @@ export { getTopAndLeftForStripAndLabel } from './components/common/StripAndLabel
|
|
|
32
32
|
/***********************************************************************************************************************
|
|
33
33
|
/********************************* common utils, constants and types ********************************
|
|
34
34
|
/***********************************************************************************************************************/
|
|
35
|
-
export {
|
|
35
|
+
export { getCumulativeWidth, getLighterColor, svgQuadraticCurvePath, svgPath, bezierCommand, getSegmentString, getCurvePathWithSegments, getPreviousSegmentsLastPoint, getPathWithHighlight, getRegionPathObjects, getSegmentedPathObjects, getArrowPoints, getAxesAndRulesProps, getExtendedContainerHeightWithPadding, getSecondaryDataWithOffsetIncluded, getArrowProperty, getAllArrowProperties, maxAndMinUtil, computeMaxAndMinItems, getLabelTextUtil, getXForLineInBar, getYForLineInBar, clone, getLineConfigForBarChart, adjustToOffset } from './utils';
|
|
36
36
|
export { chartTypes, yAxisSides, loc, SEGMENT_START, SEGMENT_END, RANGE_ENTER, RANGE_EXIT, STOP, ruleTypes, AxesAndRulesDefaults, defaultArrowConfig, BarDefaults, defaultLineConfig, LineDefaults, defaultPointerConfig, pieColors, populationDefaults } from './utils/constants';
|
|
37
37
|
export { type RuleType, type RuleTypes, type RulesConfig, type CurveType, type EdgePosition, type PointerEvents, type secondaryYAxisType, type secondaryLineConfigType, type referenceConfigType, type arrowConfigType, type horizSectionPropTypes, type HorizSectionsType, type BarAndLineChartsWrapperTypes, type Pointer, type HighlightedRange, type LineSegment, type LineSvgProps, type LineProperties, type DataSet } from './utils/types';
|
package/src/index.js
CHANGED
|
@@ -28,5 +28,5 @@ export { getTopAndLeftForStripAndLabel } from './components/common/StripAndLabel
|
|
|
28
28
|
/***********************************************************************************************************************
|
|
29
29
|
/********************************* common utils, constants and types ********************************
|
|
30
30
|
/***********************************************************************************************************************/
|
|
31
|
-
export {
|
|
31
|
+
export { getCumulativeWidth, getLighterColor, svgQuadraticCurvePath, svgPath, bezierCommand, getSegmentString, getCurvePathWithSegments, getPreviousSegmentsLastPoint, getPathWithHighlight, getRegionPathObjects, getSegmentedPathObjects, getArrowPoints, getAxesAndRulesProps, getExtendedContainerHeightWithPadding, getSecondaryDataWithOffsetIncluded, getArrowProperty, getAllArrowProperties, maxAndMinUtil, computeMaxAndMinItems, getLabelTextUtil, getXForLineInBar, getYForLineInBar, clone, getLineConfigForBarChart, adjustToOffset } from './utils';
|
|
32
32
|
export { chartTypes, yAxisSides, loc, SEGMENT_START, SEGMENT_END, RANGE_ENTER, RANGE_EXIT, STOP, ruleTypes, AxesAndRulesDefaults, defaultArrowConfig, BarDefaults, defaultLineConfig, LineDefaults, defaultPointerConfig, pieColors, populationDefaults } from './utils/constants';
|
package/src/index.ts
CHANGED
|
@@ -75,7 +75,6 @@ export { getTopAndLeftForStripAndLabel } from './components/common/StripAndLabel
|
|
|
75
75
|
/***********************************************************************************************************************/
|
|
76
76
|
|
|
77
77
|
export {
|
|
78
|
-
rnVersion,
|
|
79
78
|
getCumulativeWidth,
|
|
80
79
|
getLighterColor,
|
|
81
80
|
svgQuadraticCurvePath,
|
package/src/utils/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { type arrowConfigType, CurveType, type HighlightedRange, type LineProper
|
|
|
4
4
|
import { type lineConfigType, type BarChartPropsType, type FocusedBarConfig, type barDataItem } from '../BarChart/types';
|
|
5
5
|
import { type extendedLineChartPropsType } from '../LineChart';
|
|
6
6
|
import { type extendedBarChartPropsType } from '../BarChart';
|
|
7
|
-
export declare const rnVersion: number;
|
|
8
7
|
export declare const getCumulativeWidth: (data: any, index: number, spacing: number) => number;
|
|
9
8
|
export declare const getLighterColor: (color: string) => string;
|
|
10
9
|
export declare const svgQuadraticCurvePath: (points: number[][]) => string;
|
package/src/utils/index.js
CHANGED
|
@@ -25,18 +25,8 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
25
25
|
}
|
|
26
26
|
return ar;
|
|
27
27
|
};
|
|
28
|
-
var _a, _b;
|
|
29
28
|
import { AxesAndRulesDefaults, BarDefaults, RANGE_ENTER, RANGE_EXIT, STOP, defaultCurvature, defaultLineConfig, loc } from './constants';
|
|
30
29
|
import { CurveType, Framework } from './types';
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
32
|
-
var versionString = require('react-native/package.json').version;
|
|
33
|
-
var versionAr = (_b = (_a = versionString === null || versionString === void 0 ? void 0 : versionString.split) === null || _a === void 0 ? void 0 : _a.call(versionString, '.')) !== null && _b !== void 0 ? _b : '';
|
|
34
|
-
var msb = Number(versionAr[0]);
|
|
35
|
-
var mid = Number(versionAr[1]);
|
|
36
|
-
var lsb = Number(versionAr[2]);
|
|
37
|
-
export var rnVersion = (!isNaN(msb) ? msb : 0) * 1000000 +
|
|
38
|
-
(!isNaN(mid) ? mid : 0) * 10000 +
|
|
39
|
-
(!isNaN(lsb) ? lsb : 0);
|
|
40
30
|
export var getCumulativeWidth = function (data, index, spacing) {
|
|
41
31
|
var cumWidth = 0;
|
|
42
32
|
for (var i = 0; i < index; i++) {
|
package/src/utils/index.ts
CHANGED
|
@@ -30,19 +30,6 @@ import {
|
|
|
30
30
|
import { type extendedLineChartPropsType } from '../LineChart'
|
|
31
31
|
import { type extendedBarChartPropsType } from '../BarChart'
|
|
32
32
|
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
34
|
-
const versionString = require('react-native/package.json').version
|
|
35
|
-
|
|
36
|
-
const versionAr = versionString?.split?.('.') ?? ''
|
|
37
|
-
const msb = Number(versionAr[0])
|
|
38
|
-
const mid = Number(versionAr[1])
|
|
39
|
-
const lsb = Number(versionAr[2])
|
|
40
|
-
|
|
41
|
-
export const rnVersion =
|
|
42
|
-
(!isNaN(msb) ? msb : 0) * 1000000 +
|
|
43
|
-
(!isNaN(mid) ? mid : 0) * 10000 +
|
|
44
|
-
(!isNaN(lsb) ? lsb : 0)
|
|
45
|
-
|
|
46
33
|
export const getCumulativeWidth = (
|
|
47
34
|
data: any,
|
|
48
35
|
index: number,
|