@antv/component 2.0.4 → 2.1.0
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/dist/component.min.js +1 -1
- package/esm/animation/fadeIn.d.ts +1 -1
- package/esm/animation/fadeOut.d.ts +1 -1
- package/esm/animation/utils.d.ts +3 -3
- package/esm/ui/axis/axis.d.ts +1 -1
- package/esm/ui/axis/guides/grid.d.ts +1 -1
- package/esm/ui/axis/guides/ticks.d.ts +1 -1
- package/esm/ui/axis/guides/title.d.ts +1 -1
- package/esm/ui/grid/index.d.ts +1 -1
- package/esm/ui/poptip/constant.d.ts +1 -1
- package/esm/ui/poptip/constant.js +1 -1
- package/esm/ui/poptip/constant.js.map +1 -1
- package/esm/ui/slider/index.js +2 -2
- package/esm/ui/slider/index.js.map +1 -1
- package/esm/ui/sparkline/utils.js +4 -1
- package/esm/ui/sparkline/utils.js.map +1 -1
- package/esm/ui/title/types.d.ts +1 -1
- package/esm/util/keyframe-interpolate.d.ts +1 -1
- package/esm/util/text.d.ts +1 -9
- package/lib/animation/fadeIn.d.ts +1 -1
- package/lib/animation/fadeOut.d.ts +1 -1
- package/lib/animation/utils.d.ts +3 -3
- package/lib/ui/axis/axis.d.ts +1 -1
- package/lib/ui/axis/guides/grid.d.ts +1 -1
- package/lib/ui/axis/guides/ticks.d.ts +1 -1
- package/lib/ui/axis/guides/title.d.ts +1 -1
- package/lib/ui/grid/index.d.ts +1 -1
- package/lib/ui/poptip/constant.d.ts +1 -1
- package/lib/ui/poptip/constant.js +1 -1
- package/lib/ui/poptip/constant.js.map +1 -1
- package/lib/ui/slider/index.js +2 -2
- package/lib/ui/slider/index.js.map +1 -1
- package/lib/ui/sparkline/utils.js +4 -1
- package/lib/ui/sparkline/utils.js.map +1 -1
- package/lib/ui/title/types.d.ts +1 -1
- package/lib/util/keyframe-interpolate.d.ts +1 -1
- package/lib/util/text.d.ts +1 -9
- package/package.json +7 -6
- package/src/ui/poptip/constant.ts +1 -1
- package/src/ui/slider/index.ts +3 -2
- package/src/ui/sparkline/utils.ts +4 -1
- package/src/ui/title/types.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/component",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Visualization components for AntV, based on G.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"build:cjs": "tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib",
|
|
35
35
|
"build:esm": "tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm",
|
|
36
36
|
"ci": "run-s lint test build",
|
|
37
|
+
"prepublishOnly": "npm run ci",
|
|
37
38
|
"prepare": "husky install"
|
|
38
39
|
},
|
|
39
40
|
"keywords": [
|
|
@@ -43,16 +44,16 @@
|
|
|
43
44
|
"component"
|
|
44
45
|
],
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@antv/g": "^6.
|
|
47
|
+
"@antv/g": "^6.1.1",
|
|
47
48
|
"@antv/scale": "^0.4.3",
|
|
48
49
|
"@antv/util": "^3.3.5",
|
|
49
50
|
"svg-path-parser": "^1.1.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@antv/g-canvas": "^2.0.
|
|
53
|
-
"@antv/g-plugin-control": "^2.0.
|
|
54
|
-
"@antv/g-svg": "^2.0.
|
|
55
|
-
"@antv/g-webgl": "^2.0.
|
|
53
|
+
"@antv/g-canvas": "^2.0.17",
|
|
54
|
+
"@antv/g-plugin-control": "^2.0.12",
|
|
55
|
+
"@antv/g-svg": "^2.0.14",
|
|
56
|
+
"@antv/g-webgl": "^2.0.21",
|
|
56
57
|
"@babel/plugin-proposal-decorators": "^7.20.5",
|
|
57
58
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
58
59
|
"@babel/preset-env": "^7.16.11",
|
package/src/ui/slider/index.ts
CHANGED
|
@@ -389,8 +389,9 @@ export class Slider extends Component<SliderStyleProps> {
|
|
|
389
389
|
private inferTextStyle(handleType: HandleType): Record<string, any> {
|
|
390
390
|
const { orientation } = this.attributes;
|
|
391
391
|
if (orientation === 'horizontal') return {};
|
|
392
|
-
if (handleType === 'start')
|
|
393
|
-
|
|
392
|
+
if (handleType === 'start')
|
|
393
|
+
return { transformOrigin: 'left center', transform: [['rotate', 90]], textAlign: 'start' };
|
|
394
|
+
if (handleType === 'end') return { transformOrigin: 'right center', transform: [['rotate', 90]], textAlign: 'end' };
|
|
394
395
|
return {};
|
|
395
396
|
}
|
|
396
397
|
|
|
@@ -6,7 +6,10 @@ import type { Data } from './types';
|
|
|
6
6
|
*/
|
|
7
7
|
export function getRange(data: Data): [number, number] {
|
|
8
8
|
if (data.length === 0) return [0, 0];
|
|
9
|
-
return [
|
|
9
|
+
return [
|
|
10
|
+
min(minBy(data, (arr) => min(arr) || 0) as number[]),
|
|
11
|
+
max(maxBy(data, (arr) => max(arr) || 0) as number[]),
|
|
12
|
+
] as [number, number];
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
/**
|
package/src/ui/title/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExtendDisplayObject } from 'src/types';
|
|
2
1
|
import type { ComponentOptions } from '../../core/types';
|
|
3
2
|
import type { GroupStyleProps, TextStyleProps } from '../../shapes';
|
|
3
|
+
import type { ExtendDisplayObject } from '../../types';
|
|
4
4
|
import type { SeriesAttr } from '../../util';
|
|
5
5
|
|
|
6
6
|
export type PositionAbbr = 't' | 'r' | 'l' | 'b' | 'lt' | 'tl' | 'rt' | 'tr' | 'lb' | 'bl' | 'rb' | 'br' | 'i';
|