@pie-lib/graphing 2.14.1 → 2.14.2-next.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/CHANGELOG.md CHANGED
@@ -7,735 +7,400 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/graphing
9
9
 
10
-
11
-
12
-
13
-
14
10
  # [2.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.4...@pie-lib/graphing@2.14.0) (2023-06-12)
15
11
 
16
-
17
12
  ### Features
18
13
 
19
- * started adding new mathMLOptions property PD-2150 ([175b45e](https://github.com/pie-framework/pie-lib/commit/175b45ecd98e9cc703bd7056b930f299a4345c75))
20
-
21
-
22
-
23
-
14
+ - started adding new mathMLOptions property PD-2150 ([175b45e](https://github.com/pie-framework/pie-lib/commit/175b45ecd98e9cc703bd7056b930f299a4345c75))
24
15
 
25
16
  ## [2.13.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.3...@pie-lib/graphing@2.13.4) (2023-06-12)
26
17
 
27
18
  **Note:** Version bump only for package @pie-lib/graphing
28
19
 
29
-
30
-
31
-
32
-
33
20
  ## [2.13.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.2...@pie-lib/graphing@2.13.3) (2023-06-07)
34
21
 
35
-
36
22
  ### Bug Fixes
37
23
 
38
- * prettier ([7ab7f22](https://github.com/pie-framework/pie-lib/commit/7ab7f22ac1cd0e5511036421d832ea2fbe5dd4f6))
39
- * switching tool not working because it was using the button's text content, which doesn't work with translations ([0006efb](https://github.com/pie-framework/pie-lib/commit/0006efb12632b016d01ee327cc36a45b91cfff4b))
40
-
41
-
42
-
43
-
24
+ - prettier ([7ab7f22](https://github.com/pie-framework/pie-lib/commit/7ab7f22ac1cd0e5511036421d832ea2fbe5dd4f6))
25
+ - switching tool not working because it was using the button's text content, which doesn't work with translations ([0006efb](https://github.com/pie-framework/pie-lib/commit/0006efb12632b016d01ee327cc36a45b91cfff4b))
44
26
 
45
27
  ## [2.13.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.1...@pie-lib/graphing@2.13.2) (2023-06-06)
46
28
 
47
-
48
29
  ### Bug Fixes
49
30
 
50
- * update graphing's usage of translator after breaking changes in the translator package ([d3081d2](https://github.com/pie-framework/pie-lib/commit/d3081d2fc6e27f3579d52e2fe5a7361aaf4b7b39))
51
-
52
-
53
-
54
-
31
+ - update graphing's usage of translator after breaking changes in the translator package ([d3081d2](https://github.com/pie-framework/pie-lib/commit/d3081d2fc6e27f3579d52e2fe5a7361aaf4b7b39))
55
32
 
56
33
  ## [2.13.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.0...@pie-lib/graphing@2.13.1) (2023-06-06)
57
34
 
58
35
  **Note:** Version bump only for package @pie-lib/graphing
59
36
 
60
-
61
-
62
-
63
-
64
37
  # [2.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.30...@pie-lib/graphing@2.13.0) (2023-06-06)
65
38
 
66
-
67
39
  ### Features
68
40
 
69
- * added translator package for graphing PD-1208 ([99d1ad7](https://github.com/pie-framework/pie-lib/commit/99d1ad796707d2d613c4776df7d06e94c33fe07c))
70
-
71
-
72
-
73
-
41
+ - added translator package for graphing PD-1208 ([99d1ad7](https://github.com/pie-framework/pie-lib/commit/99d1ad796707d2d613c4776df7d06e94c33fe07c))
74
42
 
75
43
  ## [2.12.30](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.29...@pie-lib/graphing@2.12.30) (2023-06-05)
76
44
 
77
45
  **Note:** Version bump only for package @pie-lib/graphing
78
46
 
79
-
80
-
81
-
82
-
83
47
  ## [2.12.29](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.28...@pie-lib/graphing@2.12.29) (2023-05-18)
84
48
 
85
-
86
49
  ### Bug Fixes
87
50
 
88
- * **graphing:** undo-redo issues ([38d5d2b](https://github.com/pie-framework/pie-lib/commit/38d5d2b4d2098d80b2d288874e0a8050be65caf4))
89
-
90
-
91
-
92
-
51
+ - **graphing:** undo-redo issues ([38d5d2b](https://github.com/pie-framework/pie-lib/commit/38d5d2b4d2098d80b2d288874e0a8050be65caf4))
93
52
 
94
53
  ## [2.12.28](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.27...@pie-lib/graphing@2.12.28) (2023-05-12)
95
54
 
96
-
97
55
  ### Bug Fixes
98
56
 
99
- * **graphing:** add new style for missing objects - PD-1026 ([4dba6c2](https://github.com/pie-framework/pie-lib/commit/4dba6c2dcafbf9f250f1379672cba63e5c805b10))
100
- * **graphing:** update snapshot ([b237367](https://github.com/pie-framework/pie-lib/commit/b237367cac6cef2af22217b9f5b07dfa0f3291a0))
101
-
102
-
103
-
104
-
57
+ - **graphing:** add new style for missing objects - PD-1026 ([4dba6c2](https://github.com/pie-framework/pie-lib/commit/4dba6c2dcafbf9f250f1379672cba63e5c805b10))
58
+ - **graphing:** update snapshot ([b237367](https://github.com/pie-framework/pie-lib/commit/b237367cac6cef2af22217b9f5b07dfa0f3291a0))
105
59
 
106
60
  ## [2.12.27](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.26...@pie-lib/graphing@2.12.27) (2023-05-01)
107
61
 
108
-
109
62
  ### Bug Fixes
110
63
 
111
- * **graphing:** remove shouldComponentUpdate from polygon PD-2753 ([f90524f](https://github.com/pie-framework/pie-lib/commit/f90524f96c868393ce445b8daaa833f85ae17c50))
112
-
113
-
114
-
115
-
64
+ - **graphing:** remove shouldComponentUpdate from polygon PD-2753 ([f90524f](https://github.com/pie-framework/pie-lib/commit/f90524f96c868393ce445b8daaa833f85ae17c50))
116
65
 
117
66
  ## [2.12.26](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.25...@pie-lib/graphing@2.12.26) (2023-04-25)
118
67
 
119
-
120
68
  ### Bug Fixes
121
69
 
122
- * **graphing:** revert lint fix ([06de9cb](https://github.com/pie-framework/pie-lib/commit/06de9cb8e461cec90996de64cc9e79e2ab80882c))
123
-
124
-
125
-
126
-
70
+ - **graphing:** revert lint fix ([06de9cb](https://github.com/pie-framework/pie-lib/commit/06de9cb8e461cec90996de64cc9e79e2ab80882c))
127
71
 
128
72
  ## [2.12.25](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.24...@pie-lib/graphing@2.12.25) (2023-04-25)
129
73
 
130
74
  **Note:** Version bump only for package @pie-lib/graphing
131
75
 
132
-
133
-
134
-
135
-
136
76
  ## [2.12.24](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.23...@pie-lib/graphing@2.12.24) (2023-04-19)
137
77
 
138
-
139
78
  ### Bug Fixes
140
79
 
141
- * **eslint:** fix eslint problems-PD-2732 ([9eb9976](https://github.com/pie-framework/pie-lib/commit/9eb9976749753da86e1057a07bd2cfc65bf64ae4))
142
-
143
-
144
-
145
-
80
+ - **eslint:** fix eslint problems-PD-2732 ([9eb9976](https://github.com/pie-framework/pie-lib/commit/9eb9976749753da86e1057a07bd2cfc65bf64ae4))
146
81
 
147
82
  ## [2.12.23](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.22...@pie-lib/graphing@2.12.23) (2023-04-14)
148
83
 
149
84
  **Note:** Version bump only for package @pie-lib/graphing
150
85
 
151
-
152
-
153
-
154
-
155
86
  ## [2.12.22](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.21...@pie-lib/graphing@2.12.22) (2023-04-14)
156
87
 
157
88
  **Note:** Version bump only for package @pie-lib/graphing
158
89
 
159
-
160
-
161
-
162
-
163
90
  ## [2.12.21](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.20...@pie-lib/graphing@2.12.21) (2023-04-07)
164
91
 
165
92
  **Note:** Version bump only for package @pie-lib/graphing
166
93
 
167
-
168
-
169
-
170
-
171
94
  ## [2.12.20](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.19...@pie-lib/graphing@2.12.20) (2023-04-03)
172
95
 
173
96
  **Note:** Version bump only for package @pie-lib/graphing
174
97
 
175
-
176
-
177
-
178
-
179
98
  ## [2.12.19](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.18...@pie-lib/graphing@2.12.19) (2023-03-27)
180
99
 
181
-
182
100
  ### Bug Fixes
183
101
 
184
- * **graphing:** create method to generate randomId and updated tests-PD-2670 ([3e0790a](https://github.com/pie-framework/pie-lib/commit/3e0790ad3f233248fac0cfff5ba10f298cd339cb))
185
-
186
-
187
-
188
-
102
+ - **graphing:** create method to generate randomId and updated tests-PD-2670 ([3e0790a](https://github.com/pie-framework/pie-lib/commit/3e0790ad3f233248fac0cfff5ba10f298cd339cb))
189
103
 
190
104
  ## [2.12.18](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.17...@pie-lib/graphing@2.12.18) (2023-03-20)
191
105
 
192
-
193
106
  ### Bug Fixes
194
107
 
195
- * **graphing:** avoid components to have same id - PD-2670 ([94fdaaa](https://github.com/pie-framework/pie-lib/commit/94fdaaaec65530e3217de0e4e3e98a9ef9bcd47f))
196
-
197
-
198
-
199
-
108
+ - **graphing:** avoid components to have same id - PD-2670 ([94fdaaa](https://github.com/pie-framework/pie-lib/commit/94fdaaaec65530e3217de0e4e3e98a9ef9bcd47f))
200
109
 
201
110
  ## [2.12.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.16...@pie-lib/graphing@2.12.17) (2023-03-13)
202
111
 
203
-
204
112
  ### Bug Fixes
205
113
 
206
- * **graphing:** fix arrow heads PD-2653 ([4d4e625](https://github.com/pie-framework/pie-lib/commit/4d4e6255e3e874d90813e0bb787180fd3e8e6091))
207
- * **graphing:** set diff between min and max to 0.05: PD-2673 ([e8862b6](https://github.com/pie-framework/pie-lib/commit/e8862b6f2f41fbfe431630b386ba999a3095cb0a))
208
-
209
-
210
-
211
-
114
+ - **graphing:** fix arrow heads PD-2653 ([4d4e625](https://github.com/pie-framework/pie-lib/commit/4d4e6255e3e874d90813e0bb787180fd3e8e6091))
115
+ - **graphing:** set diff between min and max to 0.05: PD-2673 ([e8862b6](https://github.com/pie-framework/pie-lib/commit/e8862b6f2f41fbfe431630b386ba999a3095cb0a))
212
116
 
213
117
  ## [2.12.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.15...@pie-lib/graphing@2.12.16) (2023-03-06)
214
118
 
215
-
216
119
  ### Bug Fixes
217
120
 
218
- * **graphing:** fix undo and redo not working in gather PD-2677 ([5e4eea3](https://github.com/pie-framework/pie-lib/commit/5e4eea3173244ce0fc99cf8aa468fe34d5950090))
219
- * **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([ee37a40](https://github.com/pie-framework/pie-lib/commit/ee37a405d52cfc7db1368c84ca7ccd611c67aca5))
220
- * **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([7768cb2](https://github.com/pie-framework/pie-lib/commit/7768cb2cd76d14334ab3f5f7705408e94aa6145e))
221
-
222
-
223
-
224
-
121
+ - **graphing:** fix undo and redo not working in gather PD-2677 ([5e4eea3](https://github.com/pie-framework/pie-lib/commit/5e4eea3173244ce0fc99cf8aa468fe34d5950090))
122
+ - **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([ee37a40](https://github.com/pie-framework/pie-lib/commit/ee37a405d52cfc7db1368c84ca7ccd611c67aca5))
123
+ - **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([7768cb2](https://github.com/pie-framework/pie-lib/commit/7768cb2cd76d14334ab3f5f7705408e94aa6145e))
225
124
 
226
125
  ## [2.12.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.13...@pie-lib/graphing@2.12.15) (2023-02-28)
227
126
 
228
-
229
127
  ### Bug Fixes
230
128
 
231
- * version bump ([d9280a9](https://github.com/pie-framework/pie-lib/commit/d9280a9aeddab459b6d84ecdbeb62814e1eee965))
232
-
233
-
234
-
235
-
129
+ - version bump ([d9280a9](https://github.com/pie-framework/pie-lib/commit/d9280a9aeddab459b6d84ecdbeb62814e1eee965))
236
130
 
237
131
  ## [2.12.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.12...@pie-lib/graphing@2.12.13) (2023-02-28)
238
132
 
239
133
  **Note:** Version bump only for package @pie-lib/graphing
240
134
 
241
-
242
-
243
-
244
-
245
135
  ## [2.12.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.10...@pie-lib/graphing@2.12.12) (2023-01-31)
246
136
 
247
137
  **Note:** Version bump only for package @pie-lib/graphing
248
138
 
249
-
250
-
251
-
252
-
253
139
  ## [2.12.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.9...@pie-lib/graphing@2.12.10) (2023-01-31)
254
140
 
255
141
  **Note:** Version bump only for package @pie-lib/graphing
256
142
 
257
-
258
-
259
-
260
-
261
143
  ## [2.12.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.8...@pie-lib/graphing@2.12.9) (2023-01-31)
262
144
 
263
145
  **Note:** Version bump only for package @pie-lib/graphing
264
146
 
265
-
266
-
267
-
268
-
269
147
  ## [2.12.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.7...@pie-lib/graphing@2.12.8) (2023-01-31)
270
148
 
271
149
  **Note:** Version bump only for package @pie-lib/graphing
272
150
 
273
-
274
-
275
-
276
-
277
151
  ## [2.12.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.5...@pie-lib/graphing@2.12.7) (2023-01-31)
278
152
 
279
153
  **Note:** Version bump only for package @pie-lib/graphing
280
154
 
281
-
282
-
283
-
284
-
285
155
  ## [2.12.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.3...@pie-lib/graphing@2.12.5) (2023-01-31)
286
156
 
287
157
  **Note:** Version bump only for package @pie-lib/graphing
288
158
 
289
-
290
-
291
-
292
-
293
159
  ## [2.12.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.1...@pie-lib/graphing@2.12.3) (2023-01-31)
294
160
 
295
161
  **Note:** Version bump only for package @pie-lib/graphing
296
162
 
297
-
298
-
299
-
300
-
301
163
  ## [2.12.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.0...@pie-lib/graphing@2.12.1) (2023-01-31)
302
164
 
303
165
  **Note:** Version bump only for package @pie-lib/graphing
304
166
 
305
-
306
-
307
-
308
-
309
167
  # [2.12.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.9...@pie-lib/graphing@2.12.0) (2023-01-16)
310
168
 
311
-
312
169
  ### Bug Fixes
313
170
 
314
- * **graphing:** add background for objects labels PD-2061 ([f27ba7a](https://github.com/pie-framework/pie-lib/commit/f27ba7a1f8f476f9b9806505d1b3271057793921))
315
- * **graphing:** fix calculation for mark-label coordinates, fix and update tests ([84bedd2](https://github.com/pie-framework/pie-lib/commit/84bedd2139cd2b5578b951ccb32f4f29917ff6e1))
316
- * **graphing:** fix calculation for mark-label coordinates, fix and update tests ([a83213d](https://github.com/pie-framework/pie-lib/commit/a83213d26d28ca41c2e9575f619adb8006b4e5ee))
317
- * **graphing:** fix calculation for mark-label coordinates, fix and update tests ([09c1445](https://github.com/pie-framework/pie-lib/commit/09c1445e7b60a2ad10120a78e3f54acdfc162cbe))
318
- * **graphing:** fix mark labels position for touch devices ([12a2362](https://github.com/pie-framework/pie-lib/commit/12a2362f013b677ef912a75f212e68af1399af5e))
319
- * **graphing:** fix style for points, refactor ([5d5893b](https://github.com/pie-framework/pie-lib/commit/5d5893bbb993081b79ad712ed362d350574853ed))
320
- * **graphing:** make the base point tappable on touch devices ([d633d64](https://github.com/pie-framework/pie-lib/commit/d633d64ec1b5dde39513d49b6697f3bc12d0d994))
321
- * **graphing:** make the label tool responsive wip ([0694f9c](https://github.com/pie-framework/pie-lib/commit/0694f9c2816c58f16c52c4deeba04da2d55d3a54))
322
- * **graphing:** try to make the point tappable on touch devices ([7cfb116](https://github.com/pie-framework/pie-lib/commit/7cfb1165496b60b392c90585038f2d3f30c5e261))
323
-
171
+ - **graphing:** add background for objects labels PD-2061 ([f27ba7a](https://github.com/pie-framework/pie-lib/commit/f27ba7a1f8f476f9b9806505d1b3271057793921))
172
+ - **graphing:** fix calculation for mark-label coordinates, fix and update tests ([84bedd2](https://github.com/pie-framework/pie-lib/commit/84bedd2139cd2b5578b951ccb32f4f29917ff6e1))
173
+ - **graphing:** fix calculation for mark-label coordinates, fix and update tests ([a83213d](https://github.com/pie-framework/pie-lib/commit/a83213d26d28ca41c2e9575f619adb8006b4e5ee))
174
+ - **graphing:** fix calculation for mark-label coordinates, fix and update tests ([09c1445](https://github.com/pie-framework/pie-lib/commit/09c1445e7b60a2ad10120a78e3f54acdfc162cbe))
175
+ - **graphing:** fix mark labels position for touch devices ([12a2362](https://github.com/pie-framework/pie-lib/commit/12a2362f013b677ef912a75f212e68af1399af5e))
176
+ - **graphing:** fix style for points, refactor ([5d5893b](https://github.com/pie-framework/pie-lib/commit/5d5893bbb993081b79ad712ed362d350574853ed))
177
+ - **graphing:** make the base point tappable on touch devices ([d633d64](https://github.com/pie-framework/pie-lib/commit/d633d64ec1b5dde39513d49b6697f3bc12d0d994))
178
+ - **graphing:** make the label tool responsive wip ([0694f9c](https://github.com/pie-framework/pie-lib/commit/0694f9c2816c58f16c52c4deeba04da2d55d3a54))
179
+ - **graphing:** try to make the point tappable on touch devices ([7cfb116](https://github.com/pie-framework/pie-lib/commit/7cfb1165496b60b392c90585038f2d3f30c5e261))
324
180
 
325
181
  ### Features
326
182
 
327
- * added theme naming support + cleanup ([72d562d](https://github.com/pie-framework/pie-lib/commit/72d562d509e5d31d883690eb455a9afea6bf54fc))
328
-
329
-
330
-
331
-
183
+ - added theme naming support + cleanup ([72d562d](https://github.com/pie-framework/pie-lib/commit/72d562d509e5d31d883690eb455a9afea6bf54fc))
332
184
 
333
185
  ## [2.11.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.8...@pie-lib/graphing@2.11.9) (2023-01-04)
334
186
 
335
187
  **Note:** Version bump only for package @pie-lib/graphing
336
188
 
337
-
338
-
339
-
340
-
341
189
  ## [2.11.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.7...@pie-lib/graphing@2.11.8) (2023-01-03)
342
190
 
343
191
  **Note:** Version bump only for package @pie-lib/graphing
344
192
 
345
-
346
-
347
-
348
-
349
193
  ## [2.11.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.6...@pie-lib/graphing@2.11.7) (2022-12-19)
350
194
 
351
-
352
195
  ### Bug Fixes
353
196
 
354
- * **garphing:** update model when polygon labels have changed PD-993 ([cb8e0a7](https://github.com/pie-framework/pie-lib/commit/cb8e0a75533a3944d81984d0775b3b79134265f2))
355
- * **graphing:** adjust clickable area for plotable shapes PD-1958 ([6396096](https://github.com/pie-framework/pie-lib/commit/63960962aea5db5fa6584e464e5478972db7feb8))
356
- * **graphing:** update graph store if marks are changed ([90d7176](https://github.com/pie-framework/pie-lib/commit/90d717675abc32788086edd02fcd96706b5a50f6))
357
-
358
-
359
-
360
-
197
+ - **garphing:** update model when polygon labels have changed PD-993 ([cb8e0a7](https://github.com/pie-framework/pie-lib/commit/cb8e0a75533a3944d81984d0775b3b79134265f2))
198
+ - **graphing:** adjust clickable area for plotable shapes PD-1958 ([6396096](https://github.com/pie-framework/pie-lib/commit/63960962aea5db5fa6584e464e5478972db7feb8))
199
+ - **graphing:** update graph store if marks are changed ([90d7176](https://github.com/pie-framework/pie-lib/commit/90d717675abc32788086edd02fcd96706b5a50f6))
361
200
 
362
201
  ## [2.11.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.5...@pie-lib/graphing@2.11.6) (2022-12-06)
363
202
 
364
203
  **Note:** Version bump only for package @pie-lib/graphing
365
204
 
366
-
367
-
368
-
369
-
370
205
  ## [2.11.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.4...@pie-lib/graphing@2.11.5) (2022-11-29)
371
206
 
372
207
  **Note:** Version bump only for package @pie-lib/graphing
373
208
 
374
-
375
-
376
-
377
-
378
209
  ## [2.11.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.3...@pie-lib/graphing@2.11.4) (2022-11-23)
379
210
 
380
211
  **Note:** Version bump only for package @pie-lib/graphing
381
212
 
382
-
383
-
384
-
385
-
386
213
  ## [2.11.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.2...@pie-lib/graphing@2.11.3) (2022-11-23)
387
214
 
388
215
  **Note:** Version bump only for package @pie-lib/graphing
389
216
 
390
-
391
-
392
-
393
-
394
217
  ## [2.11.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.1...@pie-lib/graphing@2.11.2) (2022-10-17)
395
218
 
396
-
397
219
  ### Bug Fixes
398
220
 
399
- * **graphing:** increase draggable zone for graphing base point for better interaction with touchscreen devices ([50fc498](https://github.com/pie-framework/pie-lib/commit/50fc49825c14bf2248e773b4cbaecb309a4fb814))
400
-
401
-
402
-
403
-
221
+ - **graphing:** increase draggable zone for graphing base point for better interaction with touchscreen devices ([50fc498](https://github.com/pie-framework/pie-lib/commit/50fc49825c14bf2248e773b4cbaecb309a4fb814))
404
222
 
405
223
  ## [2.11.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.0...@pie-lib/graphing@2.11.1) (2022-09-29)
406
224
 
407
225
  **Note:** Version bump only for package @pie-lib/graphing
408
226
 
409
-
410
-
411
-
412
-
413
227
  # [2.11.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.3...@pie-lib/graphing@2.11.0) (2022-09-28)
414
228
 
415
-
416
229
  ### Bug Fixes
417
230
 
418
- * **editable-html, graphing:** Add support to remove scrollbar from editable-html and removed scrollbar from graphing labels PD-1968 ([d04a0d3](https://github.com/pie-framework/pie-lib/commit/d04a0d3bc66d4b861f60b24198301459c15bd151))
419
-
231
+ - **editable-html, graphing:** Add support to remove scrollbar from editable-html and removed scrollbar from graphing labels PD-1968 ([d04a0d3](https://github.com/pie-framework/pie-lib/commit/d04a0d3bc66d4b861f60b24198301459c15bd151))
420
232
 
421
233
  ### Features
422
234
 
423
- * **graphing, plot:** moved graphing labels to plot package + fixed math input + added support for labels rotation PD-1962 ([a85ec39](https://github.com/pie-framework/pie-lib/commit/a85ec3911dd1f6bc89e4eb20a19ef8f957deebf1))
424
-
425
-
426
-
427
-
235
+ - **graphing, plot:** moved graphing labels to plot package + fixed math input + added support for labels rotation PD-1962 ([a85ec39](https://github.com/pie-framework/pie-lib/commit/a85ec3911dd1f6bc89e4eb20a19ef8f957deebf1))
428
236
 
429
237
  ## [2.10.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.2...@pie-lib/graphing@2.10.3) (2022-09-14)
430
238
 
431
239
  **Note:** Version bump only for package @pie-lib/graphing
432
240
 
433
-
434
-
435
-
436
-
437
241
  ## [2.10.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.1...@pie-lib/graphing@2.10.2) (2022-08-30)
438
242
 
439
243
  **Note:** Version bump only for package @pie-lib/graphing
440
244
 
441
-
442
-
443
-
444
-
445
245
  ## [2.10.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.0...@pie-lib/graphing@2.10.1) (2022-08-29)
446
246
 
447
-
448
247
  ### Bug Fixes
449
248
 
450
- * **graphing:** fix errors that appear in IBX in console ([b07b7c7](https://github.com/pie-framework/pie-lib/commit/b07b7c718bef596b3963a1f9b626f12ff575a86a))
451
-
452
-
453
-
454
-
249
+ - **graphing:** fix errors that appear in IBX in console ([b07b7c7](https://github.com/pie-framework/pie-lib/commit/b07b7c718bef596b3963a1f9b626f12ff575a86a))
455
250
 
456
251
  # [2.10.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.9.1...@pie-lib/graphing@2.10.0) (2022-08-15)
457
252
 
458
-
459
253
  ### Features
460
254
 
461
- * **graphing, plot:** added pixel guide lines + ui improvements ([02ddff1](https://github.com/pie-framework/pie-lib/commit/02ddff1aed6a279b8a4ae1fcf100c766596c29c4))
462
-
463
-
464
-
465
-
255
+ - **graphing, plot:** added pixel guide lines + ui improvements ([02ddff1](https://github.com/pie-framework/pie-lib/commit/02ddff1aed6a279b8a4ae1fcf100c766596c29c4))
466
256
 
467
257
  ## [2.9.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.9.0...@pie-lib/graphing@2.9.1) (2022-08-08)
468
258
 
469
259
  **Note:** Version bump only for package @pie-lib/graphing
470
260
 
471
-
472
-
473
-
474
-
475
261
  # [2.9.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.8.1...@pie-lib/graphing@2.9.0) (2022-08-01)
476
262
 
477
-
478
263
  ### Features
479
264
 
480
- * **graphing, editable-html, plot:** Added the ability to edit/center title and lables PD-1605 PD-1690 ([dd18f92](https://github.com/pie-framework/pie-lib/commit/dd18f92e19d8be98917cd4f19eb7211122d2b7fb))
481
-
482
-
483
-
484
-
265
+ - **graphing, editable-html, plot:** Added the ability to edit/center title and lables PD-1605 PD-1690 ([dd18f92](https://github.com/pie-framework/pie-lib/commit/dd18f92e19d8be98917cd4f19eb7211122d2b7fb))
485
266
 
486
267
  ## [2.8.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.8.0...@pie-lib/graphing@2.8.1) (2022-07-18)
487
268
 
488
269
  **Note:** Version bump only for package @pie-lib/graphing
489
270
 
490
-
491
-
492
-
493
-
494
271
  # [2.8.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.7.0...@pie-lib/graphing@2.8.0) (2022-07-18)
495
272
 
496
-
497
273
  ### Features
498
274
 
499
- * **graphing:** added drag and drop sorting for toolbar tools PD-1607 ([2463c86](https://github.com/pie-framework/pie-lib/commit/2463c86bf6ff42222e98e4344fc6c9fd040d9774))
500
-
501
-
502
-
503
-
275
+ - **graphing:** added drag and drop sorting for toolbar tools PD-1607 ([2463c86](https://github.com/pie-framework/pie-lib/commit/2463c86bf6ff42222e98e4344fc6c9fd040d9774))
504
276
 
505
277
  # [2.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.3...@pie-lib/graphing@2.7.0) (2022-06-27)
506
278
 
507
-
508
279
  ### Features
509
280
 
510
- * **graphing:** added collapsible panel for graph toolbar PD-1693 ([4268bb0](https://github.com/pie-framework/pie-lib/commit/4268bb06093d1fabf82d9f5c2d8fd81f9788a4fe))
511
- * **graphing:** Added default value for current drawing tool PD-1689 ([bc9b1b0](https://github.com/pie-framework/pie-lib/commit/bc9b1b00d64d50d138f3ab0991957d9fecaed17b))
512
- * **graphing:** Added the ability to control the fields displayed into Grid Setup PD-1688 ([1f0f3eb](https://github.com/pie-framework/pie-lib/commit/1f0f3eb58c5dcd923e2452a0071bf1de40535bb2))
513
- * added support for graph configuration constraints PD-1683 PD-1684 PD-1686 ([8da7426](https://github.com/pie-framework/pie-lib/commit/8da74260b28332b976fa1c50796e74679fd46a13))
514
- * created setup panel and added basic functionalities PD-1679 ([183eda1](https://github.com/pie-framework/pie-lib/commit/183eda10b2f4128cd831c5b27f14ebccb6b3e7b2))
515
-
516
-
517
-
518
-
281
+ - **graphing:** added collapsible panel for graph toolbar PD-1693 ([4268bb0](https://github.com/pie-framework/pie-lib/commit/4268bb06093d1fabf82d9f5c2d8fd81f9788a4fe))
282
+ - **graphing:** Added default value for current drawing tool PD-1689 ([bc9b1b0](https://github.com/pie-framework/pie-lib/commit/bc9b1b00d64d50d138f3ab0991957d9fecaed17b))
283
+ - **graphing:** Added the ability to control the fields displayed into Grid Setup PD-1688 ([1f0f3eb](https://github.com/pie-framework/pie-lib/commit/1f0f3eb58c5dcd923e2452a0071bf1de40535bb2))
284
+ - added support for graph configuration constraints PD-1683 PD-1684 PD-1686 ([8da7426](https://github.com/pie-framework/pie-lib/commit/8da74260b28332b976fa1c50796e74679fd46a13))
285
+ - created setup panel and added basic functionalities PD-1679 ([183eda1](https://github.com/pie-framework/pie-lib/commit/183eda10b2f4128cd831c5b27f14ebccb6b3e7b2))
519
286
 
520
287
  ## [2.6.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.2...@pie-lib/graphing@2.6.3) (2022-06-13)
521
288
 
522
289
  **Note:** Version bump only for package @pie-lib/graphing
523
290
 
524
-
525
-
526
-
527
-
528
291
  ## [2.6.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.1...@pie-lib/graphing@2.6.2) (2022-05-30)
529
292
 
530
-
531
293
  ### Bug Fixes
532
294
 
533
- * unable to load items locally ([17ab686](https://github.com/pie-framework/pie-lib/commit/17ab6864557288aef6ec1d9a130cb508e2591562))
534
-
535
-
536
-
537
-
295
+ - unable to load items locally ([17ab686](https://github.com/pie-framework/pie-lib/commit/17ab6864557288aef6ec1d9a130cb508e2591562))
538
296
 
539
297
  ## [2.6.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.0...@pie-lib/graphing@2.6.1) (2022-05-24)
540
298
 
541
299
  **Note:** Version bump only for package @pie-lib/graphing
542
300
 
543
-
544
-
545
-
546
-
547
301
  # [2.6.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.5.1...@pie-lib/graphing@2.6.0) (2022-05-10)
548
302
 
549
-
550
303
  ### Features
551
304
 
552
- * **graphing:** new design treatment for gridlines PD-1691 ([ee06081](https://github.com/pie-framework/pie-lib/commit/ee06081141cf343ed6767ef203a7629e6c873c5c))
553
- * **graphing, plot:** Added padding between labels and graph without changing the size of graph PD-1604 ([aa93191](https://github.com/pie-framework/pie-lib/commit/aa931910c56efddaf54d4586dc0730a9688e25e3))
554
-
555
-
556
-
557
-
305
+ - **graphing:** new design treatment for gridlines PD-1691 ([ee06081](https://github.com/pie-framework/pie-lib/commit/ee06081141cf343ed6767ef203a7629e6c873c5c))
306
+ - **graphing, plot:** Added padding between labels and graph without changing the size of graph PD-1604 ([aa93191](https://github.com/pie-framework/pie-lib/commit/aa931910c56efddaf54d4586dc0730a9688e25e3))
558
307
 
559
308
  ## [2.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.5.0...@pie-lib/graphing@2.5.1) (2022-05-04)
560
309
 
561
-
562
310
  ### Bug Fixes
563
311
 
564
- * **graphing:** removed problematic componentDidUpdate ([9347554](https://github.com/pie-framework/pie-lib/commit/93475543422bbb7a62d82121751c2e10969904ec))
565
-
566
-
567
-
568
-
312
+ - **graphing:** removed problematic componentDidUpdate ([9347554](https://github.com/pie-framework/pie-lib/commit/93475543422bbb7a62d82121751c2e10969904ec))
569
313
 
570
314
  # [2.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.17...@pie-lib/graphing@2.5.0) (2022-05-03)
571
315
 
572
-
573
316
  ### Features
574
317
 
575
- * **graphing:** updated store on model change PD-1608 ([a3744dd](https://github.com/pie-framework/pie-lib/commit/a3744dd74d90cca280b90657cbd558ce7ab9c288))
576
-
577
-
578
-
579
-
318
+ - **graphing:** updated store on model change PD-1608 ([a3744dd](https://github.com/pie-framework/pie-lib/commit/a3744dd74d90cca280b90657cbd558ce7ab9c288))
580
319
 
581
320
  ## [2.4.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.16...@pie-lib/graphing@2.4.17) (2022-04-28)
582
321
 
583
322
  **Note:** Version bump only for package @pie-lib/graphing
584
323
 
585
-
586
-
587
-
588
-
589
324
  ## [2.4.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.15...@pie-lib/graphing@2.4.16) (2022-03-22)
590
325
 
591
-
592
326
  ### Bug Fixes
593
327
 
594
- * Do not change object at address. Instead, create a clone. ([2b683d7](https://github.com/pie-framework/pie-lib/commit/2b683d76853bf057388e6a223671eef3a040dbbf))
595
-
596
-
597
-
598
-
328
+ - Do not change object at address. Instead, create a clone. ([2b683d7](https://github.com/pie-framework/pie-lib/commit/2b683d76853bf057388e6a223671eef3a040dbbf))
599
329
 
600
330
  ## [2.4.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.14...@pie-lib/graphing@2.4.15) (2022-03-22)
601
331
 
602
-
603
332
  ### Bug Fixes
604
333
 
605
- * Force disable for background marks ([755cfbc](https://github.com/pie-framework/pie-lib/commit/755cfbcb0c878c8857be28aaeeff6e4a8d6b4e71))
606
-
607
-
608
-
609
-
334
+ - Force disable for background marks ([755cfbc](https://github.com/pie-framework/pie-lib/commit/755cfbcb0c878c8857be28aaeeff6e4a8d6b4e71))
610
335
 
611
336
  ## [2.4.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.13...@pie-lib/graphing@2.4.14) (2022-03-22)
612
337
 
613
-
614
338
  ### Bug Fixes
615
339
 
616
- * Apply different disable styles for background mark and when mark label is not in edit mode. ([a1657ec](https://github.com/pie-framework/pie-lib/commit/a1657ec7562c96bf760bbf936686816700a7d739))
617
-
618
-
619
-
620
-
340
+ - Apply different disable styles for background mark and when mark label is not in edit mode. ([a1657ec](https://github.com/pie-framework/pie-lib/commit/a1657ec7562c96bf760bbf936686816700a7d739))
621
341
 
622
342
  ## [2.4.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.12...@pie-lib/graphing@2.4.13) (2022-03-22)
623
343
 
624
-
625
344
  ### Bug Fixes
626
345
 
627
- * add UI indicator for disabled labels ([d274b3e](https://github.com/pie-framework/pie-lib/commit/d274b3eb024ab909a06d345bf17bc9f23e5d2db0))
628
- * disable labels for the background marks ([c43a269](https://github.com/pie-framework/pie-lib/commit/c43a26941016490b2687f98b2e02c934a96c02ac))
629
-
630
-
631
-
632
-
346
+ - add UI indicator for disabled labels ([d274b3e](https://github.com/pie-framework/pie-lib/commit/d274b3eb024ab909a06d345bf17bc9f23e5d2db0))
347
+ - disable labels for the background marks ([c43a269](https://github.com/pie-framework/pie-lib/commit/c43a26941016490b2687f98b2e02c934a96c02ac))
633
348
 
634
349
  ## [2.4.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.11...@pie-lib/graphing@2.4.12) (2022-03-21)
635
350
 
636
-
637
351
  ### Bug Fixes
638
352
 
639
- * **graphing:** Adjusted vector arrow orientation angle and fixed rendering issue PD-1602 ([0ebf305](https://github.com/pie-framework/pie-lib/commit/0ebf3059707c868145ef85a14c417cbe01f82491))
640
-
641
-
642
-
643
-
353
+ - **graphing:** Adjusted vector arrow orientation angle and fixed rendering issue PD-1602 ([0ebf305](https://github.com/pie-framework/pie-lib/commit/0ebf3059707c868145ef85a14c417cbe01f82491))
644
354
 
645
355
  ## [2.4.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.10...@pie-lib/graphing@2.4.11) (2022-03-21)
646
356
 
647
357
  **Note:** Version bump only for package @pie-lib/graphing
648
358
 
649
-
650
-
651
-
652
-
653
359
  ## [2.4.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.9...@pie-lib/graphing@2.4.10) (2022-03-07)
654
360
 
655
-
656
361
  ### Bug Fixes
657
362
 
658
- * **graphing:** Adjusted the thickness of the shapes when the distance between lines is too small PD-180 ([8ea20a6](https://github.com/pie-framework/pie-lib/commit/8ea20a61ea02d3e1084f3e10e645a76d580c39b5))
659
- * **graphing:** Extended the range and domain axes and also the line and ray endings PD-1509 ([97e43c6](https://github.com/pie-framework/pie-lib/commit/97e43c6ab0ab85dd314cff97fb84a85113ab39a0))
660
- * **graphing:** Increased the calculation accuracy and adjusted range labels PD-1596 ([7cc7570](https://github.com/pie-framework/pie-lib/commit/7cc75701fd759f7e7888e5cccc261978f6e036b0))
661
- * **graphing:** Should not be possible to plot duplicate/identical objects and should be able to choose a point from an existing object when defining a new object PD-1599 PD-1586 ([ac8502d](https://github.com/pie-framework/pie-lib/commit/ac8502dbe3c7e1a4a663bbe56f7f5ff8bab04430))
662
-
663
-
664
-
665
-
363
+ - **graphing:** Adjusted the thickness of the shapes when the distance between lines is too small PD-180 ([8ea20a6](https://github.com/pie-framework/pie-lib/commit/8ea20a61ea02d3e1084f3e10e645a76d580c39b5))
364
+ - **graphing:** Extended the range and domain axes and also the line and ray endings PD-1509 ([97e43c6](https://github.com/pie-framework/pie-lib/commit/97e43c6ab0ab85dd314cff97fb84a85113ab39a0))
365
+ - **graphing:** Increased the calculation accuracy and adjusted range labels PD-1596 ([7cc7570](https://github.com/pie-framework/pie-lib/commit/7cc75701fd759f7e7888e5cccc261978f6e036b0))
366
+ - **graphing:** Should not be possible to plot duplicate/identical objects and should be able to choose a point from an existing object when defining a new object PD-1599 PD-1586 ([ac8502d](https://github.com/pie-framework/pie-lib/commit/ac8502dbe3c7e1a4a663bbe56f7f5ff8bab04430))
666
367
 
667
368
  ## [2.4.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.8...@pie-lib/graphing@2.4.9) (2022-02-04)
668
369
 
669
370
  **Note:** Version bump only for package @pie-lib/graphing
670
371
 
671
-
672
-
673
-
674
-
675
372
  ## [2.4.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.7...@pie-lib/graphing@2.4.8) (2022-02-03)
676
373
 
677
374
  **Note:** Version bump only for package @pie-lib/graphing
678
375
 
679
-
680
-
681
-
682
-
683
376
  ## [2.4.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.6...@pie-lib/graphing@2.4.7) (2022-01-10)
684
377
 
685
378
  **Note:** Version bump only for package @pie-lib/graphing
686
379
 
687
-
688
-
689
-
690
-
691
380
  ## [2.4.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.5...@pie-lib/graphing@2.4.6) (2021-12-13)
692
381
 
693
382
  **Note:** Version bump only for package @pie-lib/graphing
694
383
 
695
-
696
-
697
-
698
-
699
384
  ## [2.4.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.4...@pie-lib/graphing@2.4.5) (2021-11-29)
700
385
 
701
386
  **Note:** Version bump only for package @pie-lib/graphing
702
387
 
703
-
704
-
705
-
706
-
707
388
  ## [2.4.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.3...@pie-lib/graphing@2.4.4) (2021-09-08)
708
389
 
709
390
  **Note:** Version bump only for package @pie-lib/graphing
710
391
 
711
-
712
-
713
-
714
-
715
392
  ## [2.4.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.2...@pie-lib/graphing@2.4.3) (2021-09-08)
716
393
 
717
394
  **Note:** Version bump only for package @pie-lib/graphing
718
395
 
719
-
720
-
721
-
722
-
723
396
  ## [2.4.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.1...@pie-lib/graphing@2.4.2) (2021-08-30)
724
397
 
725
398
  **Note:** Version bump only for package @pie-lib/graphing
726
399
 
727
-
728
-
729
-
730
-
731
400
  ## [2.4.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.0...@pie-lib/graphing@2.4.1) (2021-08-04)
732
401
 
733
402
  **Note:** Version bump only for package @pie-lib/graphing
734
403
 
735
-
736
-
737
-
738
-
739
404
  # [2.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.3.2...@pie-lib/graphing@2.4.0) (2021-07-23)
740
405
 
741
406
  ### Features
package/lib/graph.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graph.jsx"],"names":["log","graphPropTypes","axesSettings","PropTypes","shape","AxisPropTypes","backgroundMarks","array","className","string","collapsibleToolbar","bool","collapsibleToolbarTitle","disabledLabels","disabledTitle","domain","types","DomainType","labels","LabelType","labelModeEnabled","coordinatesOnHover","marks","onChangeLabels","func","onChangeMarks","onChangeTitle","range","size","width","number","isRequired","height","showLabels","showPixelGuides","showTitle","title","tools","getMaskSize","x","y","removeBuildingToolIfCurrentToolDiffers","currentTool","buildingMark","filter","m","building","newMarks","type","index","findIndex","splice","Graph","props","setState","labelNode","oldMark","newMark","markData","updatedMark","complete","updateMarks","existing","update","addIfMissing","mark","tool","find","t","Component","point","addPoint","undefined","maskUid","generateMaskId","Math","random","toFixed","labelsPlaceholders","titlePlaceholder","mathMlOptions","graphProps","rootNode","maskSize","common","r","padding","onBgClick","map","getComponent","markType","disabled","isBackground","state","changeMark","completeMark","startDrag","stopDrag","pointerEvents","React","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,wBAAN,CAAZ;AAEO,IAAMC,cAAc,GAAG;AAC5BC,EAAAA,YAAY,EAAEC,sBAAUC,KAAV,CAAgBC,mBAAhB,CADc;AAE5BC,EAAAA,eAAe,EAAEH,sBAAUI,KAFC;AAG5BC,EAAAA,SAAS,EAAEL,sBAAUM,MAHO;AAI5BC,EAAAA,kBAAkB,EAAEP,sBAAUQ,IAJF;AAK5BC,EAAAA,uBAAuB,EAAET,sBAAUM,MALP;AAM5BI,EAAAA,cAAc,EAAEV,sBAAUQ,IANE;AAO5BG,EAAAA,aAAa,EAAEX,sBAAUQ,IAPG;AAQ5BI,EAAAA,MAAM,EAAEC,YAAMC,UARc;AAS5BC,EAAAA,MAAM,EAAEf,sBAAUC,KAAV,CAAgBe,iBAAhB,CAToB;AAU5BC,EAAAA,gBAAgB,EAAEjB,sBAAUQ,IAVA;AAW5BU,EAAAA,kBAAkB,EAAElB,sBAAUQ,IAXF;AAY5BW,EAAAA,KAAK,EAAEnB,sBAAUI,KAZW;AAa5BgB,EAAAA,cAAc,EAAEpB,sBAAUqB,IAbE;AAc5BC,EAAAA,aAAa,EAAEtB,sBAAUqB,IAdG;AAe5BE,EAAAA,aAAa,EAAEvB,sBAAUqB,IAfG;AAgB5BG,EAAAA,KAAK,EAAEX,YAAMC,UAhBe;AAiB5BW,EAAAA,IAAI,EAAEzB,sBAAUC,KAAV,CAAgB;AACpByB,IAAAA,KAAK,EAAE1B,sBAAU2B,MAAV,CAAi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AAKE,QAAA,KAAK,EAAE;AAAEsE,UAAAA,aAAa,EAAE;AAAjB;AALT,SAnCF,CAZF,CAhBF,CADF;AA2ED;;;EA9MwBC,kBAAM9B,S;;;iCAApBjB,K,+CAONnD,c;AACHyC,EAAAA,WAAW,EAAEvC,sBAAUiG;;iCARdhD,K,kBAWW;AACpB3B,EAAAA,aAAa,EAAE,yBAAM,CAAE,CADH;AAEpBZ,EAAAA,cAAc,EAAE,KAFI;AAGpBC,EAAAA,aAAa,EAAE;AAHK,C;eAsMTsC,K","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { Root, types, createGraphProps } from '@pie-lib/plot';\nimport debug from 'debug';\n\nimport { Axes, AxisPropTypes } from './axis';\nimport Grid from './grid';\nimport { LabelType } from './labels';\nimport Bg from './bg';\nimport { isDuplicatedMark } from './utils';\n\nconst log = debug('pie-lib:graphing:graph');\n\nexport const graphPropTypes = {\n axesSettings: PropTypes.shape(AxisPropTypes),\n backgroundMarks: PropTypes.array,\n className: PropTypes.string,\n collapsibleToolbar: PropTypes.bool,\n collapsibleToolbarTitle: PropTypes.string,\n disabledLabels: PropTypes.bool,\n disabledTitle: PropTypes.bool,\n domain: types.DomainType,\n labels: PropTypes.shape(LabelType),\n labelModeEnabled: PropTypes.bool,\n coordinatesOnHover: PropTypes.bool,\n marks: PropTypes.array,\n onChangeLabels: PropTypes.func,\n onChangeMarks: PropTypes.func,\n onChangeTitle: PropTypes.func,\n range: types.DomainType,\n size: PropTypes.shape({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n }),\n showLabels: PropTypes.bool,\n showPixelGuides: PropTypes.bool,\n showTitle: PropTypes.bool,\n title: PropTypes.string,\n tools: PropTypes.array,\n};\n\nconst getMaskSize = (size) => ({\n x: -23,\n y: -23,\n width: size.width + 46,\n height: size.height + 46,\n});\n\nexport const removeBuildingToolIfCurrentToolDiffers = ({ marks, currentTool }) => {\n const buildingMark = marks.filter((m) => m.building)[0];\n let newMarks = cloneDeep(marks);\n\n if (buildingMark && currentTool && buildingMark.type !== currentTool.type) {\n const index = newMarks.findIndex((m) => isEqual(m, buildingMark));\n\n if (index >= 0) {\n newMarks.splice(index, 1);\n }\n }\n\n return newMarks;\n};\n\nexport class Graph extends React.Component {\n constructor(props) {\n super(props);\n this.maskUid = this.generateMaskId();\n }\n\n static propTypes = {\n ...graphPropTypes,\n currentTool: PropTypes.object,\n };\n\n static defaultProps = {\n onChangeMarks: () => {},\n disabledLabels: false,\n disabledTitle: false,\n };\n\n state = {};\n\n generateMaskId() {\n return 'graph-' + (Math.random() * 10000).toFixed();\n }\n\n componentDidMount = () => this.setState({ labelNode: this.labelNode });\n\n changeMark = (oldMark, newMark) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n const index = newMarks.findIndex((m) => isEqual(m, oldMark));\n\n if (index >= 0 && !isDuplicatedMark(newMark, marks, oldMark)) {\n newMarks.splice(index, 1, newMark);\n\n onChangeMarks(newMarks);\n }\n };\n\n completeMark = (markData) => {\n const { currentTool, marks } = this.props;\n const buildingMark = marks.filter((m) => m.building)[0];\n\n if (!buildingMark || !currentTool) return;\n\n const updatedMark = currentTool.complete(buildingMark, markData);\n\n this.updateMarks(buildingMark, updatedMark);\n };\n\n updateMarks = (existing, update, addIfMissing = false) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n if (!update.building && isDuplicatedMark(update, marks)) {\n return;\n }\n\n const index = newMarks.findIndex((m) => isEqual(m, existing));\n\n if (index >= 0) {\n newMarks.splice(index, 1, update);\n\n onChangeMarks(newMarks);\n } else if (addIfMissing) {\n onChangeMarks([...newMarks, update]);\n }\n };\n\n getComponent = (mark) => {\n if (!mark) return null;\n\n const tool = (this.props.tools || []).find((t) => t.type === mark.type);\n\n return (tool && tool.Component) || null;\n };\n\n onBgClick = (point) => {\n const { x, y } = point;\n const { labelModeEnabled, currentTool, marks } = this.props;\n\n log('[onBgClick] x,y: ', x, y);\n\n if (labelModeEnabled || !currentTool) {\n return;\n }\n\n const buildingMark = marks.filter((m) => m.building)[0];\n let updatedMark;\n\n // if the building mark has a different type, we just replace it\n if (buildingMark && currentTool && buildingMark.type === currentTool.type) {\n updatedMark = currentTool.addPoint({ x, y }, { ...buildingMark });\n } else {\n updatedMark = currentTool.addPoint({ x, y }, undefined);\n }\n\n this.updateMarks(buildingMark, updatedMark, true);\n };\n\n render() {\n const {\n axesSettings,\n currentTool,\n coordinatesOnHover,\n size,\n disabledLabels,\n disabledTitle,\n domain,\n backgroundMarks,\n range,\n title,\n labels,\n labelModeEnabled,\n labelsPlaceholders,\n showLabels,\n showPixelGuides,\n showTitle,\n titlePlaceholder,\n onChangeLabels,\n onChangeTitle,\n mathMlOptions = {}\n } = this.props;\n let { marks } = this.props;\n\n const graphProps = createGraphProps(domain, range, size, () => this.rootNode);\n\n const maskSize = getMaskSize(size);\n const common = { graphProps, labelModeEnabled };\n\n marks = removeBuildingToolIfCurrentToolDiffers({ marks: marks || [], currentTool });\n\n return (\n <Root\n rootRef={(r) => (this.rootNode = r)}\n disabledTitle={disabledTitle}\n disabledLabels={disabledLabels}\n labels={labels}\n labelsPlaceholders={labelsPlaceholders || {}}\n showPixelGuides={showPixelGuides}\n showLabels={showLabels}\n showTitle={showTitle}\n title={title}\n titlePlaceholder={titlePlaceholder}\n onChangeTitle={onChangeTitle}\n onChangeLabels={onChangeLabels}\n mathMlOptions={mathMlOptions}\n {...common}\n >\n <g\n transform={\n domain && domain.padding && domain.range ? `translate(${domain.padding}, ${range.padding})` : undefined\n }\n >\n <Grid {...common} />\n <Axes {...axesSettings} {...common} />\n <Bg {...size} onClick={this.onBgClick} {...common} />\n <mask id={`${this.maskUid}`}>\n <rect {...maskSize} fill=\"white\" /> {/* TODO hardcoded color */}\n </mask>\n\n <g id=\"marks\" mask={`url('#${this.maskUid}')`}>\n {(backgroundMarks || []).map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}-bg`}\n mark={{ ...m, disabled: true, isBackground: true }}\n labelNode={this.state.labelNode}\n {...common}\n />\n );\n })}\n\n {marks.map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}`}\n mark={m}\n coordinatesOnHover={coordinatesOnHover}\n onChange={this.changeMark}\n onComplete={this.completeMark}\n onClick={this.onBgClick}\n onDragStart={this.startDrag}\n onDragStop={this.stopDrag}\n labelNode={this.state.labelNode}\n isToolActive={currentTool && markType === currentTool.type}\n {...common}\n />\n );\n })}\n <foreignObject\n ref={(labelNode) => (this.labelNode = labelNode)}\n x=\"0\"\n y=\"0\"\n {...size}\n style={{ pointerEvents: 'none' }}\n />\n </g>\n </g>\n </Root>\n );\n }\n}\n\nexport default Graph;\n"],"file":"graph.js"}
1
+ {"version":3,"sources":["../src/graph.jsx"],"names":["log","graphPropTypes","axesSettings","PropTypes","shape","AxisPropTypes","backgroundMarks","array","className","string","collapsibleToolbar","bool","collapsibleToolbarTitle","disabledLabels","disabledTitle","domain","types","DomainType","labels","LabelType","labelModeEnabled","coordinatesOnHover","marks","onChangeLabels","func","onChangeMarks","onChangeTitle","range","size","width","number","isRequired","height","showLabels","showPixelGuides","showTitle","title","tools","getMaskSize","x","y","removeBuildingToolIfCurrentToolDiffers","currentTool","buildingMark","filter","m","building","newMarks","type","index","findIndex","splice","Graph","props","setState","labelNode","oldMark","newMark","markData","updatedMark","complete","updateMarks","existing","update","addIfMissing","mark","tool","find","t","Component","point","addPoint","undefined","maskUid","generateMaskId","Math","random","toFixed","labelsPlaceholders","titlePlaceholder","mathMlOptions","graphProps","rootNode","maskSize","common","r","padding","onBgClick","map","getComponent","markType","disabled","isBackground","state","changeMark","completeMark","startDrag","stopDrag","pointerEvents","React","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;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,EAAAA,cAAc,EAAE,KAFI;AAGpBC,EAAAA,aAAa,EAAE;AAHK,C;eAsMTsC,K","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { Root, types, createGraphProps } from '@pie-lib/plot';\nimport debug from 'debug';\n\nimport { Axes, AxisPropTypes } from './axis';\nimport Grid from './grid';\nimport { LabelType } from './labels';\nimport Bg from './bg';\nimport { isDuplicatedMark } from './utils';\n\nconst log = debug('pie-lib:graphing:graph');\n\nexport const graphPropTypes = {\n axesSettings: PropTypes.shape(AxisPropTypes),\n backgroundMarks: PropTypes.array,\n className: PropTypes.string,\n collapsibleToolbar: PropTypes.bool,\n collapsibleToolbarTitle: PropTypes.string,\n disabledLabels: PropTypes.bool,\n disabledTitle: PropTypes.bool,\n domain: types.DomainType,\n labels: PropTypes.shape(LabelType),\n labelModeEnabled: PropTypes.bool,\n coordinatesOnHover: PropTypes.bool,\n marks: PropTypes.array,\n onChangeLabels: PropTypes.func,\n onChangeMarks: PropTypes.func,\n onChangeTitle: PropTypes.func,\n range: types.DomainType,\n size: PropTypes.shape({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n }),\n showLabels: PropTypes.bool,\n showPixelGuides: PropTypes.bool,\n showTitle: PropTypes.bool,\n title: PropTypes.string,\n tools: PropTypes.array,\n};\n\nconst getMaskSize = (size) => ({\n x: -23,\n y: -23,\n width: size.width + 46,\n height: size.height + 46,\n});\n\nexport const removeBuildingToolIfCurrentToolDiffers = ({ marks, currentTool }) => {\n const buildingMark = marks.filter((m) => m.building)[0];\n let newMarks = cloneDeep(marks);\n\n if (buildingMark && currentTool && buildingMark.type !== currentTool.type) {\n const index = newMarks.findIndex((m) => isEqual(m, buildingMark));\n\n if (index >= 0) {\n newMarks.splice(index, 1);\n }\n }\n\n return newMarks;\n};\n\nexport class Graph extends React.Component {\n constructor(props) {\n super(props);\n this.maskUid = this.generateMaskId();\n }\n\n static propTypes = {\n ...graphPropTypes,\n currentTool: PropTypes.object,\n };\n\n static defaultProps = {\n onChangeMarks: () => {},\n disabledLabels: false,\n disabledTitle: false,\n };\n\n state = {};\n\n generateMaskId() {\n return 'graph-' + (Math.random() * 10000).toFixed();\n }\n\n componentDidMount = () => this.setState({ labelNode: this.labelNode });\n\n changeMark = (oldMark, newMark) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n const index = newMarks.findIndex((m) => isEqual(m, oldMark));\n\n if (index >= 0 && !isDuplicatedMark(newMark, marks, oldMark)) {\n newMarks.splice(index, 1, newMark);\n\n onChangeMarks(newMarks);\n }\n };\n\n completeMark = (markData) => {\n const { currentTool, marks } = this.props;\n const buildingMark = marks.filter((m) => m.building)[0];\n\n if (!buildingMark || !currentTool) return;\n\n const updatedMark = currentTool.complete(buildingMark, markData);\n\n this.updateMarks(buildingMark, updatedMark);\n };\n\n updateMarks = (existing, update, addIfMissing = false) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n if (!update.building && isDuplicatedMark(update, marks)) {\n return;\n }\n\n const index = newMarks.findIndex((m) => isEqual(m, existing));\n\n if (index >= 0) {\n newMarks.splice(index, 1, update);\n\n onChangeMarks(newMarks);\n } else if (addIfMissing) {\n onChangeMarks([...newMarks, update]);\n }\n };\n\n getComponent = (mark) => {\n if (!mark) return null;\n\n const tool = (this.props.tools || []).find((t) => t.type === mark.type);\n\n return (tool && tool.Component) || null;\n };\n\n onBgClick = (point) => {\n const { x, y } = point;\n const { labelModeEnabled, currentTool, marks } = this.props;\n\n log('[onBgClick] x,y: ', x, y);\n\n if (labelModeEnabled || !currentTool) {\n return;\n }\n\n const buildingMark = marks.filter((m) => m.building)[0];\n let updatedMark;\n\n // if the building mark has a different type, we just replace it\n if (buildingMark && currentTool && buildingMark.type === currentTool.type) {\n updatedMark = currentTool.addPoint({ x, y }, { ...buildingMark });\n } else {\n updatedMark = currentTool.addPoint({ x, y }, undefined);\n }\n\n this.updateMarks(buildingMark, updatedMark, true);\n };\n\n render() {\n const {\n axesSettings,\n currentTool,\n coordinatesOnHover,\n size,\n disabledLabels,\n disabledTitle,\n domain,\n backgroundMarks,\n range,\n title,\n labels,\n labelModeEnabled,\n labelsPlaceholders,\n showLabels,\n showPixelGuides,\n showTitle,\n titlePlaceholder,\n onChangeLabels,\n onChangeTitle,\n mathMlOptions = {},\n } = this.props;\n let { marks } = this.props;\n\n const graphProps = createGraphProps(domain, range, size, () => this.rootNode);\n\n const maskSize = getMaskSize(size);\n const common = { graphProps, labelModeEnabled };\n\n marks = removeBuildingToolIfCurrentToolDiffers({ marks: marks || [], currentTool });\n\n return (\n <Root\n rootRef={(r) => (this.rootNode = r)}\n disabledTitle={disabledTitle}\n disabledLabels={disabledLabels}\n labels={labels}\n labelsPlaceholders={labelsPlaceholders || {}}\n showPixelGuides={showPixelGuides}\n showLabels={showLabels}\n showTitle={showTitle}\n title={title}\n titlePlaceholder={titlePlaceholder}\n onChangeTitle={onChangeTitle}\n onChangeLabels={onChangeLabels}\n mathMlOptions={mathMlOptions}\n {...common}\n >\n <g\n transform={\n domain && domain.padding && domain.range ? `translate(${domain.padding}, ${range.padding})` : undefined\n }\n >\n <Grid {...common} />\n <Axes {...axesSettings} {...common} />\n <Bg {...size} onClick={this.onBgClick} {...common} />\n <mask id={`${this.maskUid}`}>\n <rect {...maskSize} fill=\"white\" /> {/* TODO hardcoded color */}\n </mask>\n\n <g id=\"marks\" mask={`url('#${this.maskUid}')`}>\n {(backgroundMarks || []).map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}-bg`}\n mark={{ ...m, disabled: true, isBackground: true }}\n labelNode={this.state.labelNode}\n {...common}\n />\n );\n })}\n\n {marks.map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}`}\n mark={m}\n coordinatesOnHover={coordinatesOnHover}\n onChange={this.changeMark}\n onComplete={this.completeMark}\n onClick={this.onBgClick}\n onDragStart={this.startDrag}\n onDragStop={this.stopDrag}\n labelNode={this.state.labelNode}\n isToolActive={currentTool && markType === currentTool.type}\n {...common}\n />\n );\n })}\n <foreignObject\n ref={(labelNode) => (this.labelNode = labelNode)}\n x=\"0\"\n y=\"0\"\n {...size}\n style={{ pointerEvents: 'none' }}\n />\n </g>\n </g>\n </Root>\n );\n }\n}\n\nexport default Graph;\n"],"file":"graph.js"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.14.1",
6
+ "version": "2.14.2-next.3+1a7c4289",
7
7
  "description": "Graphing components",
8
8
  "keywords": [
9
9
  "react",
@@ -20,9 +20,9 @@
20
20
  "@material-ui/core": "^3.8.3",
21
21
  "@pie-lib/drag": "^2.2.0",
22
22
  "@pie-lib/graphing-utils": "^1.1.32",
23
- "@pie-lib/plot": "^2.7.0",
24
- "@pie-lib/render-ui": "^4.14.26",
25
- "@pie-lib/translator": "^2.0.0",
23
+ "@pie-lib/plot": "^2.7.1-next.8+1a7c4289",
24
+ "@pie-lib/render-ui": "^4.14.27-next.14+1a7c4289",
25
+ "@pie-lib/translator": "^2.0.1-next.33+1a7c4289",
26
26
  "@vx/axis": "^0.0.189",
27
27
  "@vx/clip-path": "^0.0.189",
28
28
  "@vx/event": "^0.0.189",
@@ -45,6 +45,6 @@
45
45
  "peerDependencies": {
46
46
  "react": "^16.8.1"
47
47
  },
48
- "gitHead": "0422863f982627200e2f5e789cb384ef646803c2",
48
+ "gitHead": "1a7c42894ce9a619999134952033c0bfe7ba663a",
49
49
  "scripts": {}
50
50
  }
package/src/graph.jsx CHANGED
@@ -183,7 +183,7 @@ export class Graph extends React.Component {
183
183
  titlePlaceholder,
184
184
  onChangeLabels,
185
185
  onChangeTitle,
186
- mathMlOptions = {}
186
+ mathMlOptions = {},
187
187
  } = this.props;
188
188
  let { marks } = this.props;
189
189