@pie-lib/graphing 2.17.0 → 2.18.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/CHANGELOG.md +13 -65
- package/package.json +9 -8
- package/src/axis/axes.jsx +1 -1
- package/src/coordinates-label.jsx +1 -1
- package/src/graph-with-controls.jsx +1 -1
- package/src/grid-setup.jsx +1 -1
- package/src/key-legend.jsx +1 -1
- package/src/labels.jsx +1 -1
- package/src/mark-label.jsx +1 -1
- package/src/toggle-bar.jsx +1 -1
- package/src/tools/circle/bg-circle.jsx +1 -1
- package/src/tools/circle/component.jsx +1 -1
- package/src/tools/polygon/line.jsx +1 -1
- package/src/tools/polygon/polygon.jsx +1 -1
- package/src/tools/shared/line/index.jsx +1 -1
- package/src/tools/shared/line/line-path.jsx +1 -1
- package/src/tools/shared/point/index.jsx +1 -1
- package/src/tools/shared/styles.js +1 -1
- package/src/tools/sine/__tests__/component.test.jsx +1 -1
- package/src/undo-redo.jsx +1 -1
- package/lib/axis/arrow.js +0 -115
- package/lib/axis/arrow.js.map +0 -1
- package/lib/axis/axes.js +0 -415
- package/lib/axis/axes.js.map +0 -1
- package/lib/axis/index.js +0 -26
- package/lib/axis/index.js.map +0 -1
- package/lib/bg.js +0 -139
- package/lib/bg.js.map +0 -1
- package/lib/container/actions.js +0 -24
- package/lib/container/actions.js.map +0 -1
- package/lib/container/index.js +0 -163
- package/lib/container/index.js.map +0 -1
- package/lib/container/marks.js +0 -27
- package/lib/container/marks.js.map +0 -1
- package/lib/container/middleware.js +0 -25
- package/lib/container/middleware.js.map +0 -1
- package/lib/container/reducer.js +0 -25
- package/lib/container/reducer.js.map +0 -1
- package/lib/coordinates-label.js +0 -109
- package/lib/coordinates-label.js.map +0 -1
- package/lib/graph-with-controls.js +0 -359
- package/lib/graph-with-controls.js.map +0 -1
- package/lib/graph.js +0 -371
- package/lib/graph.js.map +0 -1
- package/lib/grid-setup.js +0 -462
- package/lib/grid-setup.js.map +0 -1
- package/lib/grid.js +0 -176
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -59
- package/lib/index.js.map +0 -1
- package/lib/key-legend.js +0 -246
- package/lib/key-legend.js.map +0 -1
- package/lib/label-svg-icon.js +0 -56
- package/lib/label-svg-icon.js.map +0 -1
- package/lib/labels.js +0 -299
- package/lib/labels.js.map +0 -1
- package/lib/mark-label.js +0 -321
- package/lib/mark-label.js.map +0 -1
- package/lib/shared/index.js +0 -136
- package/lib/toggle-bar.js +0 -336
- package/lib/toggle-bar.js.map +0 -1
- package/lib/tool-menu.js +0 -112
- package/lib/tool-menu.js.map +0 -1
- package/lib/tools/absolute/component.js +0 -35
- package/lib/tools/absolute/component.js.map +0 -1
- package/lib/tools/absolute/index.js +0 -63
- package/lib/tools/absolute/index.js.map +0 -1
- package/lib/tools/circle/bg-circle.js +0 -173
- package/lib/tools/circle/bg-circle.js.map +0 -1
- package/lib/tools/circle/component.js +0 -406
- package/lib/tools/circle/component.js.map +0 -1
- package/lib/tools/circle/index.js +0 -51
- package/lib/tools/circle/index.js.map +0 -1
- package/lib/tools/exponential/component.js +0 -34
- package/lib/tools/exponential/component.js.map +0 -1
- package/lib/tools/exponential/index.js +0 -71
- package/lib/tools/exponential/index.js.map +0 -1
- package/lib/tools/index.js +0 -99
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/line/component.js +0 -103
- package/lib/tools/line/component.js.map +0 -1
- package/lib/tools/line/index.js +0 -16
- package/lib/tools/line/index.js.map +0 -1
- package/lib/tools/parabola/component.js +0 -34
- package/lib/tools/parabola/component.js.map +0 -1
- package/lib/tools/parabola/index.js +0 -63
- package/lib/tools/parabola/index.js.map +0 -1
- package/lib/tools/point/component.js +0 -186
- package/lib/tools/point/component.js.map +0 -1
- package/lib/tools/point/index.js +0 -32
- package/lib/tools/point/index.js.map +0 -1
- package/lib/tools/polygon/component.js +0 -518
- package/lib/tools/polygon/component.js.map +0 -1
- package/lib/tools/polygon/index.js +0 -106
- package/lib/tools/polygon/index.js.map +0 -1
- package/lib/tools/polygon/line.js +0 -157
- package/lib/tools/polygon/line.js.map +0 -1
- package/lib/tools/polygon/polygon.js +0 -165
- package/lib/tools/polygon/polygon.js.map +0 -1
- package/lib/tools/ray/component.js +0 -102
- package/lib/tools/ray/component.js.map +0 -1
- package/lib/tools/ray/index.js +0 -16
- package/lib/tools/ray/index.js.map +0 -1
- package/lib/tools/segment/component.js +0 -75
- package/lib/tools/segment/component.js.map +0 -1
- package/lib/tools/segment/index.js +0 -16
- package/lib/tools/segment/index.js.map +0 -1
- package/lib/tools/shared/arrow-head.js +0 -70
- package/lib/tools/shared/arrow-head.js.map +0 -1
- package/lib/tools/shared/icons/CorrectSVG.js +0 -36
- package/lib/tools/shared/icons/CorrectSVG.js.map +0 -1
- package/lib/tools/shared/icons/IncorrectSVG.js +0 -36
- package/lib/tools/shared/icons/IncorrectSVG.js.map +0 -1
- package/lib/tools/shared/icons/MissingSVG.js +0 -35
- package/lib/tools/shared/icons/MissingSVG.js.map +0 -1
- package/lib/tools/shared/line/index.js +0 -599
- package/lib/tools/shared/line/index.js.map +0 -1
- package/lib/tools/shared/line/line-path.js +0 -151
- package/lib/tools/shared/line/line-path.js.map +0 -1
- package/lib/tools/shared/line/with-root-edge.js +0 -155
- package/lib/tools/shared/line/with-root-edge.js.map +0 -1
- package/lib/tools/shared/point/arrow-point.js +0 -113
- package/lib/tools/shared/point/arrow-point.js.map +0 -1
- package/lib/tools/shared/point/arrow.js +0 -96
- package/lib/tools/shared/point/arrow.js.map +0 -1
- package/lib/tools/shared/point/base-point.js +0 -175
- package/lib/tools/shared/point/base-point.js.map +0 -1
- package/lib/tools/shared/point/index.js +0 -97
- package/lib/tools/shared/point/index.js.map +0 -1
- package/lib/tools/shared/styles.js +0 -58
- package/lib/tools/shared/styles.js.map +0 -1
- package/lib/tools/shared/types.js +0 -23
- package/lib/tools/shared/types.js.map +0 -1
- package/lib/tools/sine/component.js +0 -51
- package/lib/tools/sine/component.js.map +0 -1
- package/lib/tools/sine/index.js +0 -63
- package/lib/tools/sine/index.js.map +0 -1
- package/lib/tools/vector/component.js +0 -88
- package/lib/tools/vector/component.js.map +0 -1
- package/lib/tools/vector/index.js +0 -16
- package/lib/tools/vector/index.js.map +0 -1
- package/lib/undo-redo.js +0 -123
- package/lib/undo-redo.js.map +0 -1
- package/lib/use-debounce.js +0 -32
- package/lib/use-debounce.js.map +0 -1
- package/lib/utils.js +0 -307
- package/lib/utils.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [2.
|
|
6
|
+
# [2.18.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.18.0) (2025-07-31)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
# [2.
|
|
14
|
+
# [2.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.17.0) (2025-07-31)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
# [2.
|
|
22
|
+
# [2.16.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.16.0) (2025-07-31)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
25
25
|
|
|
@@ -27,142 +27,90 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
# [2.
|
|
30
|
+
# [2.16.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.16.0) (2025-07-31)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
33
33
|
|
|
34
|
+
# [2.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.17.0) (2025-07-31)
|
|
34
35
|
|
|
36
|
+
**Note:** Version bump only for package @pie-lib/graphing
|
|
35
37
|
|
|
38
|
+
# [2.16.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.16.0) (2025-07-31)
|
|
36
39
|
|
|
40
|
+
**Note:** Version bump only for package @pie-lib/graphing
|
|
37
41
|
|
|
38
|
-
# [2.15.0-beta.
|
|
42
|
+
# [2.15.0-beta.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.8) (2025-07-25)
|
|
39
43
|
|
|
40
44
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
41
45
|
|
|
46
|
+
# [2.15.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.7) (2025-07-25)
|
|
42
47
|
|
|
48
|
+
**Note:** Version bump only for package @pie-lib/graphing
|
|
43
49
|
|
|
50
|
+
# [2.15.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.7) (2025-07-25)
|
|
44
51
|
|
|
52
|
+
**Note:** Version bump only for package @pie-lib/graphing
|
|
45
53
|
|
|
46
54
|
# [2.15.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.6) (2025-07-25)
|
|
47
55
|
|
|
48
56
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
58
|
# [2.15.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.6) (2025-07-25)
|
|
55
59
|
|
|
56
60
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
62
|
# [2.15.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.5) (2025-07-25)
|
|
63
63
|
|
|
64
64
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
66
|
# [2.15.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.5) (2025-07-25)
|
|
71
67
|
|
|
72
68
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
70
|
# [2.15.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.4) (2025-07-25)
|
|
79
71
|
|
|
80
72
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
81
73
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
74
|
# [2.15.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.3) (2025-07-25)
|
|
87
75
|
|
|
88
76
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
89
77
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
78
|
# [2.15.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.4) (2025-07-23)
|
|
95
79
|
|
|
96
80
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
97
81
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
82
|
# [2.15.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.3) (2025-07-23)
|
|
103
83
|
|
|
104
84
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
105
85
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
86
|
# [2.15.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.3) (2025-07-20)
|
|
111
87
|
|
|
112
88
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
113
89
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
90
|
# [2.15.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.2) (2025-07-20)
|
|
119
91
|
|
|
120
92
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
121
93
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
94
|
# [2.15.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.1) (2025-07-20)
|
|
127
95
|
|
|
128
96
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
129
97
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
98
|
# [2.15.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.2) (2025-07-20)
|
|
135
99
|
|
|
136
100
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
137
101
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
102
|
# [2.15.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.1) (2025-07-20)
|
|
143
103
|
|
|
144
104
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
145
105
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
106
|
# [2.15.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.1) (2025-07-20)
|
|
151
107
|
|
|
152
108
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
153
109
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
110
|
# [2.15.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.15.0-beta.0) (2025-07-20)
|
|
159
111
|
|
|
160
112
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
161
113
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
114
|
# [2.16.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.21...@pie-lib/graphing@2.16.0-beta.0) (2025-07-15)
|
|
167
115
|
|
|
168
116
|
**Note:** Version bump only for package @pie-lib/graphing
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.18.0",
|
|
7
7
|
"description": "Graphing components",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"@mapbox/point-geometry": "^0.1.0",
|
|
20
20
|
"@material-ui/core": "^3.8.3",
|
|
21
21
|
"@material-ui/icons": "^3.0.2",
|
|
22
|
-
"@pie-lib/drag": "
|
|
23
|
-
"@pie-lib/editable-html": "
|
|
24
|
-
"@pie-lib/graphing-utils": "
|
|
25
|
-
"@pie-lib/plot": "
|
|
26
|
-
"@pie-lib/
|
|
27
|
-
"@pie-lib/
|
|
22
|
+
"@pie-lib/drag": "^2.6.0",
|
|
23
|
+
"@pie-lib/editable-html": "^11.5.0",
|
|
24
|
+
"@pie-lib/graphing-utils": "^1.5.0",
|
|
25
|
+
"@pie-lib/plot": "^2.11.0",
|
|
26
|
+
"@pie-lib/render-ui": "^4.19.0",
|
|
27
|
+
"@pie-lib/tools": "^0.13.0",
|
|
28
|
+
"@pie-lib/translator": "^2.7.0",
|
|
28
29
|
"@vx/axis": "^0.0.189",
|
|
29
30
|
"@vx/clip-path": "^0.0.189",
|
|
30
31
|
"@vx/event": "^0.0.189",
|
|
@@ -49,6 +50,6 @@
|
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"react": "^16.8.1"
|
|
51
52
|
},
|
|
52
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "889a13bfea2c768b8a3a6eabfc6fe7b7725aa832",
|
|
53
54
|
"scripts": {}
|
|
54
55
|
}
|
package/src/axis/axes.jsx
CHANGED
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Arrow from './arrow';
|
|
6
6
|
import { withStyles } from '@material-ui/core';
|
|
7
7
|
import { countWords, findLongestWord, amountToIncreaseWidth, getTickValues } from '../utils';
|
|
8
|
-
import { color, Readable } from '
|
|
8
|
+
import { color, Readable } from '@pie-lib/render-ui';
|
|
9
9
|
|
|
10
10
|
export const AxisPropTypes = {
|
|
11
11
|
includeArrows: PropTypes.object,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { types } from '@pie-lib/plot';
|
|
4
|
-
import { color } from '
|
|
4
|
+
import { color } from '@pie-lib/render-ui';
|
|
5
5
|
import { withStyles } from '@material-ui/core/styles';
|
|
6
6
|
import InputBase from '@material-ui/core/InputBase';
|
|
7
7
|
import { roundNumber } from './utils';
|
|
@@ -4,7 +4,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import uniq from 'lodash/uniq';
|
|
6
6
|
import isString from 'lodash/isString';
|
|
7
|
-
import { color } from '
|
|
7
|
+
import { color } from '@pie-lib/render-ui';
|
|
8
8
|
|
|
9
9
|
import ToolMenu from './tool-menu';
|
|
10
10
|
import Graph, { graphPropTypes } from './graph';
|
package/src/grid-setup.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { color, InputContainer } from '
|
|
3
|
+
import { color, InputContainer } from '@pie-lib/render-ui';
|
|
4
4
|
import { withStyles } from '@material-ui/core/styles';
|
|
5
5
|
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
|
|
6
6
|
import Typography from '@material-ui/core/Typography';
|
package/src/key-legend.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { withStyles } from '@material-ui/core/styles';
|
|
5
|
-
import { color } from '
|
|
5
|
+
import { color } from '@pie-lib/render-ui';
|
|
6
6
|
|
|
7
7
|
const styles = (theme) => ({
|
|
8
8
|
container: {
|
package/src/labels.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { withStyles } from '@material-ui/core/styles';
|
|
4
4
|
import { types } from '@pie-lib/plot';
|
|
5
|
-
import { color, Readable } from '
|
|
5
|
+
import { color, Readable } from '@pie-lib/render-ui';
|
|
6
6
|
import EditableHtml from '@pie-lib/editable-html';
|
|
7
7
|
import cn from 'classnames';
|
|
8
8
|
|
package/src/mark-label.jsx
CHANGED
|
@@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
5
5
|
import AutosizeInput from 'react-input-autosize';
|
|
6
6
|
import { useDebounce } from './use-debounce';
|
|
7
7
|
import { types } from '@pie-lib/plot';
|
|
8
|
-
import { color } from '
|
|
8
|
+
import { color } from '@pie-lib/render-ui';
|
|
9
9
|
import SvgIcon from './label-svg-icon';
|
|
10
10
|
|
|
11
11
|
const inputStyles = (theme) => ({
|
package/src/toggle-bar.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { withStyles } from '@material-ui/core/styles';
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import Button from '@material-ui/core/Button';
|
|
6
|
-
import { color } from '
|
|
6
|
+
import { color } from '@pie-lib/render-ui';
|
|
7
7
|
import { allTools } from './tools';
|
|
8
8
|
import { withDragContext, DragSource, DropTarget } from '@pie-lib/drag';
|
|
9
9
|
import Translator from '@pie-lib/translator';
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { withStyles } from '@material-ui/core/styles';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { types, gridDraggable } from '@pie-lib/plot';
|
|
6
|
-
import { color } from '
|
|
6
|
+
import { color } from '@pie-lib/render-ui';
|
|
7
7
|
import * as utils from '../../utils';
|
|
8
8
|
import { disabled, disabledSecondary, correct, incorrect, missing } from '../shared/styles';
|
|
9
9
|
|
|
@@ -10,7 +10,7 @@ import { rootEdgeComponent } from '../shared/line/with-root-edge';
|
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
11
11
|
import MarkLabel from '../../mark-label';
|
|
12
12
|
import isEmpty from 'lodash/isEmpty';
|
|
13
|
-
import { color } from '
|
|
13
|
+
import { color } from '@pie-lib/render-ui';
|
|
14
14
|
|
|
15
15
|
const opacityPulsate = (opacity) => ({
|
|
16
16
|
'0%': { opacity: '0.0' },
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { withStyles } from '@material-ui/core/styles';
|
|
4
4
|
import { types, gridDraggable } from '@pie-lib/plot';
|
|
5
|
-
import { color } from '
|
|
5
|
+
import { color } from '@pie-lib/render-ui';
|
|
6
6
|
import * as utils from '../../utils';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import { correct, disabled, disabledSecondary, incorrect, missing } from '../shared/styles';
|
|
@@ -4,7 +4,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
4
4
|
import { gridDraggable, types } from '@pie-lib/plot';
|
|
5
5
|
import * as utils from '../../utils';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import { color } from '
|
|
7
|
+
import { color } from '@pie-lib/render-ui';
|
|
8
8
|
import { fade } from '@material-ui/core/styles/colorManipulator';
|
|
9
9
|
import { correct, disabled, incorrect, missing } from '../shared/styles';
|
|
10
10
|
|
|
@@ -8,7 +8,7 @@ import { disabled, disabledSecondary, correct, incorrect, missing } from '../sty
|
|
|
8
8
|
import ReactDOM from 'react-dom';
|
|
9
9
|
import MarkLabel from '../../../mark-label';
|
|
10
10
|
import isEmpty from 'lodash/isEmpty';
|
|
11
|
-
import { color } from '
|
|
11
|
+
import { color } from '@pie-lib/render-ui';
|
|
12
12
|
import { getMiddleOfTwoPoints, equalPoints, sameAxes } from '../../../utils';
|
|
13
13
|
|
|
14
14
|
export const lineTool = (type, Component) => () => ({
|
|
@@ -5,7 +5,7 @@ import { types } from '@pie-lib/plot';
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { disabled, correct, incorrect, missing, disabledSecondary } from '../styles';
|
|
7
7
|
import * as vx from '@vx/shape';
|
|
8
|
-
import { color } from '
|
|
8
|
+
import { color } from '@pie-lib/render-ui';
|
|
9
9
|
|
|
10
10
|
export class RawLinePath extends React.Component {
|
|
11
11
|
static propTypes = {
|
|
@@ -4,7 +4,7 @@ import * as utils from '../../../utils';
|
|
|
4
4
|
import { disabled, correct, incorrect, missing, disabledSecondary } from '../styles';
|
|
5
5
|
import { RawBp } from './base-point';
|
|
6
6
|
import { RawArrow } from './arrow-point';
|
|
7
|
-
import { color } from '
|
|
7
|
+
import { color } from '@pie-lib/render-ui';
|
|
8
8
|
import BaseArrow from './arrow';
|
|
9
9
|
|
|
10
10
|
const opts = {
|
|
@@ -5,7 +5,7 @@ import { utils } from '@pie-lib/plot';
|
|
|
5
5
|
import { graphProps as getGraphProps } from '../../../__tests__/utils';
|
|
6
6
|
|
|
7
7
|
const { xy } = utils;
|
|
8
|
-
jest.mock('@pie-lib/graphing-utils
|
|
8
|
+
jest.mock('@pie-lib/graphing-utils', () => ({
|
|
9
9
|
sinY: jest.fn().mockReturnValue(0),
|
|
10
10
|
buildDataPoints: jest.fn().mockReturnValue([]),
|
|
11
11
|
parabolaFromTwoPoints: jest.fn(() => jest.fn()),
|
package/src/undo-redo.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Button from '@material-ui/core/Button';
|
|
5
5
|
import { withStyles } from '@material-ui/core';
|
|
6
|
-
import { color } from '
|
|
6
|
+
import { color } from '@pie-lib/render-ui';
|
|
7
7
|
import Translator from '@pie-lib/translator';
|
|
8
8
|
|
|
9
9
|
const { translator } = Translator;
|
package/lib/axis/arrow.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.Arrow = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireDefault(require("react"));
|
|
21
|
-
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
-
|
|
26
|
-
var _styles = require("@material-ui/core/styles");
|
|
27
|
-
|
|
28
|
-
var _plot = require("@pie-lib/plot");
|
|
29
|
-
|
|
30
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
31
|
-
|
|
32
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
|
-
|
|
34
|
-
var style = function style(theme) {
|
|
35
|
-
return {
|
|
36
|
-
root: {
|
|
37
|
-
fill: "var(--arrow-color, ".concat(theme.palette.common.black, ")")
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var Arrow = /*#__PURE__*/function (_React$Component) {
|
|
43
|
-
(0, _inherits2["default"])(Arrow, _React$Component);
|
|
44
|
-
|
|
45
|
-
var _super = _createSuper(Arrow);
|
|
46
|
-
|
|
47
|
-
function Arrow() {
|
|
48
|
-
(0, _classCallCheck2["default"])(this, Arrow);
|
|
49
|
-
return _super.apply(this, arguments);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
(0, _createClass2["default"])(Arrow, [{
|
|
53
|
-
key: "render",
|
|
54
|
-
value: function render() {
|
|
55
|
-
var _this$props = this.props,
|
|
56
|
-
x = _this$props.x,
|
|
57
|
-
y = _this$props.y,
|
|
58
|
-
classes = _this$props.classes,
|
|
59
|
-
className = _this$props.className,
|
|
60
|
-
scale = _this$props.scale;
|
|
61
|
-
var names = (0, _classnames["default"])(classes.root, className);
|
|
62
|
-
var direction = this.props.direction || 'left';
|
|
63
|
-
var xv = scale.x(x);
|
|
64
|
-
var yv = scale.y(y);
|
|
65
|
-
var transform = '';
|
|
66
|
-
|
|
67
|
-
var getTransform = function getTransform(x, y, rotate) {
|
|
68
|
-
return "translate(".concat(x, ", ").concat(y, ") rotate(").concat(rotate, ")");
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
if (direction === 'left') {
|
|
72
|
-
transform = getTransform(xv - 15, yv, 0);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (direction === 'right') {
|
|
76
|
-
transform = getTransform(xv + 15, yv, 180);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (direction === 'up') {
|
|
80
|
-
transform = getTransform(xv, yv - 15, 90);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (direction === 'down') {
|
|
84
|
-
transform = getTransform(xv, yv + 15, 270);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return /*#__PURE__*/_react["default"].createElement("path", {
|
|
88
|
-
d: "m 0,0 8,-5 0,10 -8,-5",
|
|
89
|
-
transform: transform,
|
|
90
|
-
className: names
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}]);
|
|
94
|
-
return Arrow;
|
|
95
|
-
}(_react["default"].Component);
|
|
96
|
-
|
|
97
|
-
exports.Arrow = Arrow;
|
|
98
|
-
Arrow.propTypes = {
|
|
99
|
-
y: _propTypes["default"].number,
|
|
100
|
-
x: _propTypes["default"].number,
|
|
101
|
-
direction: _propTypes["default"].oneOf(['left', 'right', 'up', 'down']),
|
|
102
|
-
classes: _propTypes["default"].object.isRequired,
|
|
103
|
-
className: _propTypes["default"].string,
|
|
104
|
-
scale: _plot.types.ScaleType.isRequired
|
|
105
|
-
};
|
|
106
|
-
Arrow.defaultProps = {
|
|
107
|
-
y: 0,
|
|
108
|
-
x: 0,
|
|
109
|
-
direction: 'left'
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
var _default = (0, _styles.withStyles)(style)(Arrow);
|
|
113
|
-
|
|
114
|
-
exports["default"] = _default;
|
|
115
|
-
//# sourceMappingURL=arrow.js.map
|
package/lib/axis/arrow.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/axis/arrow.jsx"],"names":["style","theme","root","fill","palette","common","black","Arrow","props","x","y","classes","className","scale","names","direction","xv","yv","transform","getTransform","rotate","React","Component","propTypes","PropTypes","number","oneOf","object","isRequired","string","types","ScaleType","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;AAAA,SAAY;AACxBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,+BAAwBF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,KAA7C;AADA;AADkB,GAAZ;AAAA,CAAd;;IAMaC,K;;;;;;;;;;;;WACX,kBAAS;AACP,wBAA4C,KAAKC,KAAjD;AAAA,UAAQC,CAAR,eAAQA,CAAR;AAAA,UAAWC,CAAX,eAAWA,CAAX;AAAA,UAAcC,OAAd,eAAcA,OAAd;AAAA,UAAuBC,SAAvB,eAAuBA,SAAvB;AAAA,UAAkCC,KAAlC,eAAkCA,KAAlC;AACA,UAAMC,KAAK,GAAG,4BAAWH,OAAO,CAACT,IAAnB,EAAyBU,SAAzB,CAAd;AACA,UAAIG,SAAS,GAAG,KAAKP,KAAL,CAAWO,SAAX,IAAwB,MAAxC;AAEA,UAAMC,EAAE,GAAGH,KAAK,CAACJ,CAAN,CAAQA,CAAR,CAAX;AACA,UAAMQ,EAAE,GAAGJ,KAAK,CAACH,CAAN,CAAQA,CAAR,CAAX;AAEA,UAAIQ,SAAS,GAAG,EAAhB;;AAEA,UAAMC,YAAY,GAAG,SAAfA,YAAe,CAACV,CAAD,EAAIC,CAAJ,EAAOU,MAAP;AAAA,mCAA+BX,CAA/B,eAAqCC,CAArC,sBAAkDU,MAAlD;AAAA,OAArB;;AAEA,UAAIL,SAAS,KAAK,MAAlB,EAA0B;AACxBG,QAAAA,SAAS,GAAGC,YAAY,CAACH,EAAE,GAAG,EAAN,EAAUC,EAAV,EAAc,CAAd,CAAxB;AACD;;AAED,UAAIF,SAAS,KAAK,OAAlB,EAA2B;AACzBG,QAAAA,SAAS,GAAGC,YAAY,CAACH,EAAE,GAAG,EAAN,EAAUC,EAAV,EAAc,GAAd,CAAxB;AACD;;AAED,UAAIF,SAAS,KAAK,IAAlB,EAAwB;AACtBG,QAAAA,SAAS,GAAGC,YAAY,CAACH,EAAD,EAAKC,EAAE,GAAG,EAAV,EAAc,EAAd,CAAxB;AACD;;AAED,UAAIF,SAAS,KAAK,MAAlB,EAA0B;AACxBG,QAAAA,SAAS,GAAGC,YAAY,CAACH,EAAD,EAAKC,EAAE,GAAG,EAAV,EAAc,GAAd,CAAxB;AACD;;AAED,0BAAO;AAAM,QAAA,CAAC,EAAC,uBAAR;AAAgC,QAAA,SAAS,EAAEC,SAA3C;AAAsD,QAAA,SAAS,EAAEJ;AAAjE,QAAP;AACD;;;EA9BwBO,kBAAMC,S;;;AAiCjCf,KAAK,CAACgB,SAAN,GAAkB;AAChBb,EAAAA,CAAC,EAAEc,sBAAUC,MADG;AAEhBhB,EAAAA,CAAC,EAAEe,sBAAUC,MAFG;AAGhBV,EAAAA,SAAS,EAAES,sBAAUE,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,IAAlB,EAAwB,MAAxB,CAAhB,CAHK;AAIhBf,EAAAA,OAAO,EAAEa,sBAAUG,MAAV,CAAiBC,UAJV;AAKhBhB,EAAAA,SAAS,EAAEY,sBAAUK,MALL;AAMhBhB,EAAAA,KAAK,EAAEiB,YAAMC,SAAN,CAAgBH;AANP,CAAlB;AASArB,KAAK,CAACyB,YAAN,GAAqB;AACnBtB,EAAAA,CAAC,EAAE,CADgB;AAEnBD,EAAAA,CAAC,EAAE,CAFgB;AAGnBM,EAAAA,SAAS,EAAE;AAHQ,CAArB;;eAMe,wBAAWf,KAAX,EAAkBO,KAAlB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { types } from '@pie-lib/plot';\n\nconst style = (theme) => ({\n root: {\n fill: `var(--arrow-color, ${theme.palette.common.black})`,\n },\n});\n\nexport class Arrow extends React.Component {\n render() {\n const { x, y, classes, className, scale } = this.props;\n const names = classNames(classes.root, className);\n let direction = this.props.direction || 'left';\n\n const xv = scale.x(x);\n const yv = scale.y(y);\n\n let transform = '';\n\n const getTransform = (x, y, rotate) => `translate(${x}, ${y}) rotate(${rotate})`;\n\n if (direction === 'left') {\n transform = getTransform(xv - 15, yv, 0);\n }\n\n if (direction === 'right') {\n transform = getTransform(xv + 15, yv, 180);\n }\n\n if (direction === 'up') {\n transform = getTransform(xv, yv - 15, 90);\n }\n\n if (direction === 'down') {\n transform = getTransform(xv, yv + 15, 270);\n }\n\n return <path d=\"m 0,0 8,-5 0,10 -8,-5\" transform={transform} className={names} />;\n }\n}\n\nArrow.propTypes = {\n y: PropTypes.number,\n x: PropTypes.number,\n direction: PropTypes.oneOf(['left', 'right', 'up', 'down']),\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n scale: types.ScaleType.isRequired,\n};\n\nArrow.defaultProps = {\n y: 0,\n x: 0,\n direction: 'left',\n};\n\nexport default withStyles(style)(Arrow);\n"],"file":"arrow.js"}
|