@unovis/react 1.0.0-beta.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.
Files changed (112) hide show
  1. package/LICENSE +193 -0
  2. package/components/area/index.d.ts +10 -0
  3. package/components/area/index.js +22 -0
  4. package/components/area/index.js.map +1 -0
  5. package/components/axis/index.d.ts +10 -0
  6. package/components/axis/index.js +22 -0
  7. package/components/axis/index.js.map +1 -0
  8. package/components/brush/index.d.ts +10 -0
  9. package/components/brush/index.js +22 -0
  10. package/components/brush/index.js.map +1 -0
  11. package/components/chord-diagram/index.d.ts +13 -0
  12. package/components/crosshair/index.d.ts +10 -0
  13. package/components/crosshair/index.js +22 -0
  14. package/components/crosshair/index.js.map +1 -0
  15. package/components/donut/index.d.ts +10 -0
  16. package/components/donut/index.js +22 -0
  17. package/components/donut/index.js.map +1 -0
  18. package/components/free-brush/index.d.ts +10 -0
  19. package/components/free-brush/index.js +22 -0
  20. package/components/free-brush/index.js.map +1 -0
  21. package/components/graph/index.d.ts +10 -0
  22. package/components/graph/index.js +22 -0
  23. package/components/graph/index.js.map +1 -0
  24. package/components/grouped-bar/index.d.ts +10 -0
  25. package/components/grouped-bar/index.js +22 -0
  26. package/components/grouped-bar/index.js.map +1 -0
  27. package/components/line/index.d.ts +10 -0
  28. package/components/line/index.js +22 -0
  29. package/components/line/index.js.map +1 -0
  30. package/components/sankey/index.d.ts +10 -0
  31. package/components/sankey/index.js +22 -0
  32. package/components/sankey/index.js.map +1 -0
  33. package/components/scatter/index.d.ts +10 -0
  34. package/components/scatter/index.js +22 -0
  35. package/components/scatter/index.js.map +1 -0
  36. package/components/stacked-bar/index.d.ts +10 -0
  37. package/components/stacked-bar/index.js +22 -0
  38. package/components/stacked-bar/index.js.map +1 -0
  39. package/components/timeline/index.d.ts +10 -0
  40. package/components/timeline/index.js +22 -0
  41. package/components/timeline/index.js.map +1 -0
  42. package/components/tooltip/index.d.ts +10 -0
  43. package/components/tooltip/index.js +20 -0
  44. package/components/tooltip/index.js.map +1 -0
  45. package/components/topojson-map/index.d.ts +14 -0
  46. package/components/topojson-map/index.js +22 -0
  47. package/components/topojson-map/index.js.map +1 -0
  48. package/components/xy-labels/index.d.ts +10 -0
  49. package/components/xy-labels/index.js +22 -0
  50. package/components/xy-labels/index.js.map +1 -0
  51. package/components.d.ts +19 -0
  52. package/composites/time-series/index.d.ts +54 -0
  53. package/composites/time-series/index.js +63 -0
  54. package/composites/time-series/index.js.map +1 -0
  55. package/composites/time-series/style.d.ts +3 -0
  56. package/composites/time-series/style.js +21 -0
  57. package/composites/time-series/style.js.map +1 -0
  58. package/composites.d.ts +1 -0
  59. package/containers/single-container/index.d.ts +6 -0
  60. package/containers/single-container/index.js +31 -0
  61. package/containers/single-container/index.js.map +1 -0
  62. package/containers/xy-container/index.d.ts +8 -0
  63. package/containers/xy-container/index.js +39 -0
  64. package/containers/xy-container/index.js.map +1 -0
  65. package/containers.d.ts +2 -0
  66. package/html-components/bullet-legend/index.d.ts +3 -0
  67. package/html-components/bullet-legend/index.js +18 -0
  68. package/html-components/bullet-legend/index.js.map +1 -0
  69. package/html-components/leaflet-flow-map/index.d.ts +15 -0
  70. package/html-components/leaflet-flow-map/index.js +23 -0
  71. package/html-components/leaflet-flow-map/index.js.map +1 -0
  72. package/html-components/leaflet-map/index.d.ts +12 -0
  73. package/html-components/leaflet-map/index.js +23 -0
  74. package/html-components/leaflet-map/index.js.map +1 -0
  75. package/index.d.ts +3 -0
  76. package/index.js +23 -0
  77. package/index.js.map +1 -0
  78. package/package.json +41 -0
  79. package/src/components/area/index.d.ts +10 -0
  80. package/src/components/axis/index.d.ts +10 -0
  81. package/src/components/brush/index.d.ts +10 -0
  82. package/src/components/chord-diagram/index.d.ts +13 -0
  83. package/src/components/crosshair/index.d.ts +10 -0
  84. package/src/components/donut/index.d.ts +10 -0
  85. package/src/components/free-brush/index.d.ts +10 -0
  86. package/src/components/graph/index.d.ts +10 -0
  87. package/src/components/grouped-bar/index.d.ts +10 -0
  88. package/src/components/line/index.d.ts +10 -0
  89. package/src/components/sankey/index.d.ts +10 -0
  90. package/src/components/scatter/index.d.ts +10 -0
  91. package/src/components/stacked-bar/index.d.ts +10 -0
  92. package/src/components/timeline/index.d.ts +10 -0
  93. package/src/components/tooltip/index.d.ts +10 -0
  94. package/src/components/topojson-map/index.d.ts +14 -0
  95. package/src/components/xy-labels/index.d.ts +10 -0
  96. package/src/components.d.ts +19 -0
  97. package/src/composites/time-series/index.d.ts +54 -0
  98. package/src/composites/time-series/style.d.ts +3 -0
  99. package/src/composites.d.ts +1 -0
  100. package/src/containers/single-container/index.d.ts +6 -0
  101. package/src/containers/xy-container/index.d.ts +8 -0
  102. package/src/containers.d.ts +2 -0
  103. package/src/html-components/bullet-legend/index.d.ts +3 -0
  104. package/src/html-components/leaflet-flow-map/index.d.ts +15 -0
  105. package/src/html-components/leaflet-map/index.d.ts +12 -0
  106. package/src/index.d.ts +3 -0
  107. package/src/types/dom.d.ts +3 -0
  108. package/src/utils/react.d.ts +4 -0
  109. package/types/dom.d.ts +3 -0
  110. package/utils/react.d.ts +4 -0
  111. package/utils/react.js +27 -0
  112. package/utils/react.js.map +1 -0
package/LICENSE ADDED
@@ -0,0 +1,193 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ https://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ © 2022 F5, Inc. https://www.f5.com/
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ https://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
191
+
192
+ This project uses multiple third-party components under different open-source
193
+ licences. See license.txt for more details.
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Area, AreaConfigInterface } from '@unovis/ts';
3
+ export declare type VisAreaRef<Datum> = {
4
+ component: Area<Datum>;
5
+ };
6
+ export declare type VisAreaProps<Datum> = AreaConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisAreaRef<Datum>>;
9
+ };
10
+ export declare const VisArea: (<Datum>(props: VisAreaProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Area } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisAreaFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Area(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisArea = React.memo(React.forwardRef(VisAreaFC), arePropsEqual);
20
+
21
+ export { VisArea };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/area/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Area, AreaConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisAreaRef<Datum> = {\n component: Area<Datum>;\n}\n\nexport type VisAreaProps<Datum> = AreaConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisAreaRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisAreaFC<Datum> (props: VisAreaProps<Datum>, fRef: ForwardedRef<VisAreaRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Area<Datum>>>(null)\n const [component] = useState<Area<Datum>>(new Area(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Area<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisArea: (<Datum>(props: VisAreaProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisAreaFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,SAAS,CAAS,KAA0B,EAAE,IAAqC,EAAA;AAC1F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAA;AAC1D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAc,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAG1D,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAA4C,CAAC,aAAa,GAAG,SAAS,CAAA;KAC5E,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,OAAO,GAAgE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Axis, AxisConfigInterface } from '@unovis/ts';
3
+ export declare type VisAxisRef<Datum> = {
4
+ component: Axis<Datum>;
5
+ };
6
+ export declare type VisAxisProps<Datum> = AxisConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisAxisRef<Datum>>;
9
+ };
10
+ export declare const VisAxis: (<Datum>(props: VisAxisProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Axis } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisAxisFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Axis(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-axis", { ref: ref });
18
+ }
19
+ const VisAxis = React.memo(React.forwardRef(VisAxisFC), arePropsEqual);
20
+
21
+ export { VisAxis };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisAxisRef<Datum> = {\n component: Axis<Datum>;\n}\n\nexport type VisAxisProps<Datum> = AxisConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisAxisRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisAxisFC<Datum> (props: VisAxisProps<Datum>, fRef: ForwardedRef<VisAxisRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Axis<Datum>>>(null)\n const [component] = useState<Axis<Datum>>(new Axis(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Axis<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-axis ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisAxis: (<Datum>(props: VisAxisProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisAxisFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,SAAS,CAAS,KAA0B,EAAE,IAAqC,EAAA;AAC1F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAA;AAC1D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAc,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAG1D,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAA4C,CAAC,aAAa,GAAG,SAAS,CAAA;KAC5E,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAU,CAAA,aAAA,CAAA,UAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AAC/B,CAAC;AAIY,MAAA,OAAO,GAAgE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Brush, BrushConfigInterface } from '@unovis/ts';
3
+ export declare type VisBrushRef<Datum> = {
4
+ component: Brush<Datum>;
5
+ };
6
+ export declare type VisBrushProps<Datum> = BrushConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisBrushRef<Datum>>;
9
+ };
10
+ export declare const VisBrush: (<Datum>(props: VisBrushProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Brush } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisBrushFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Brush(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisBrush = React.memo(React.forwardRef(VisBrushFC), arePropsEqual);
20
+
21
+ export { VisBrush };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/brush/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Brush, BrushConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisBrushRef<Datum> = {\n component: Brush<Datum>;\n}\n\nexport type VisBrushProps<Datum> = BrushConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisBrushRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisBrushFC<Datum> (props: VisBrushProps<Datum>, fRef: ForwardedRef<VisBrushRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Brush<Datum>>>(null)\n const [component] = useState<Brush<Datum>>(new Brush(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Brush<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisBrush: (<Datum>(props: VisBrushProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisBrushFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,UAAU,CAAS,KAA2B,EAAE,IAAsC,EAAA;AAC7F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAoC,IAAI,CAAC,CAAA;AAC3D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAe,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAG5D,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAA6C,CAAC,aAAa,GAAG,SAAS,CAAA;KAC7E,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,QAAQ,GAAiE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,13 @@
1
+ import { Ref } from 'react';
2
+ import { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts';
3
+ export declare type VisChordDiagramRef<N extends ChordInputNode, L extends ChordInputLink> = {
4
+ component: ChordDiagram<N, L>;
5
+ };
6
+ export declare type VisChordDiagramProps<N extends ChordInputNode, L extends ChordInputLink> = ChordDiagramConfigInterface<N, L> & {
7
+ data?: {
8
+ nodes: N[];
9
+ links?: L[];
10
+ };
11
+ ref?: Ref<VisChordDiagramRef<N, L>>;
12
+ };
13
+ export declare const VisChordDiagram: (<N extends ChordInputNode, L extends ChordInputLink>(props: VisChordDiagramProps<N, L>) => JSX.Element | null);
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Crosshair, CrosshairConfigInterface } from '@unovis/ts';
3
+ export declare type VisCrosshairRef<Datum> = {
4
+ component: Crosshair<Datum>;
5
+ };
6
+ export declare type VisCrosshairProps<Datum> = CrosshairConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisCrosshairRef<Datum>>;
9
+ };
10
+ export declare const VisCrosshair: (<Datum>(props: VisCrosshairProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Crosshair } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisCrosshairFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Crosshair(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-crosshair", { ref: ref });
18
+ }
19
+ const VisCrosshair = React.memo(React.forwardRef(VisCrosshairFC), arePropsEqual);
20
+
21
+ export { VisCrosshair };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Crosshair, CrosshairConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisCrosshairRef<Datum> = {\n component: Crosshair<Datum>;\n}\n\nexport type VisCrosshairProps<Datum> = CrosshairConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisCrosshairRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisCrosshairFC<Datum> (props: VisCrosshairProps<Datum>, fRef: ForwardedRef<VisCrosshairRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Crosshair<Datum>>>(null)\n const [component] = useState<Crosshair<Datum>>(new Crosshair(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Crosshair<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-crosshair ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisCrosshair: (<Datum>(props: VisCrosshairProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisCrosshairFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,cAAc,CAAS,KAA+B,EAAE,IAA0C,EAAA;AACzG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAwC,IAAI,CAAC,CAAA;AAC/D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAmB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;IAGpE,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAAiD,CAAC,aAAa,GAAG,SAAS,CAAA;KACjF,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,YAAY,GAAqE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Donut, DonutConfigInterface } from '@unovis/ts';
3
+ export declare type VisDonutRef<Datum> = {
4
+ component: Donut<Datum>;
5
+ };
6
+ export declare type VisDonutProps<Datum> = DonutConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisDonutRef<Datum>>;
9
+ };
10
+ export declare const VisDonut: (<Datum>(props: VisDonutProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Donut } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisDonutFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Donut(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisDonut = React.memo(React.forwardRef(VisDonutFC), arePropsEqual);
20
+
21
+ export { VisDonut };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/donut/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Donut, DonutConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisDonutRef<Datum> = {\n component: Donut<Datum>;\n}\n\nexport type VisDonutProps<Datum> = DonutConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisDonutRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisDonutFC<Datum> (props: VisDonutProps<Datum>, fRef: ForwardedRef<VisDonutRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Donut<Datum>>>(null)\n const [component] = useState<Donut<Datum>>(new Donut(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Donut<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisDonut: (<Datum>(props: VisDonutProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisDonutFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,UAAU,CAAS,KAA2B,EAAE,IAAsC,EAAA;AAC7F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAoC,IAAI,CAAC,CAAA;AAC3D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAe,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAG5D,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAA6C,CAAC,aAAa,GAAG,SAAS,CAAA;KAC7E,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,QAAQ,GAAiE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { FreeBrush, FreeBrushConfigInterface } from '@unovis/ts';
3
+ export declare type VisFreeBrushRef<Datum> = {
4
+ component: FreeBrush<Datum>;
5
+ };
6
+ export declare type VisFreeBrushProps<Datum> = FreeBrushConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisFreeBrushRef<Datum>>;
9
+ };
10
+ export declare const VisFreeBrush: (<Datum>(props: VisFreeBrushProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { FreeBrush } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisFreeBrushFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new FreeBrush(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisFreeBrush = React.memo(React.forwardRef(VisFreeBrushFC), arePropsEqual);
20
+
21
+ export { VisFreeBrush };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/free-brush/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { FreeBrush, FreeBrushConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisFreeBrushRef<Datum> = {\n component: FreeBrush<Datum>;\n}\n\nexport type VisFreeBrushProps<Datum> = FreeBrushConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisFreeBrushRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisFreeBrushFC<Datum> (props: VisFreeBrushProps<Datum>, fRef: ForwardedRef<VisFreeBrushRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<FreeBrush<Datum>>>(null)\n const [component] = useState<FreeBrush<Datum>>(new FreeBrush(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<FreeBrush<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisFreeBrush: (<Datum>(props: VisFreeBrushProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisFreeBrushFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,cAAc,CAAS,KAA+B,EAAE,IAA0C,EAAA;AACzG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAwC,IAAI,CAAC,CAAA;AAC/D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAmB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;IAGpE,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAAiD,CAAC,aAAa,GAAG,SAAS,CAAA;KACjF,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,YAAY,GAAqE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts';
3
+ export declare type VisGraphRef<N extends GraphInputNode, L extends GraphInputLink> = {
4
+ component: Graph<N, L>;
5
+ };
6
+ export declare type VisGraphProps<N extends GraphInputNode, L extends GraphInputLink> = GraphConfigInterface<N, L> & {
7
+ data?: any;
8
+ ref?: Ref<VisGraphRef<N, L>>;
9
+ };
10
+ export declare const VisGraph: (<N extends GraphInputNode, L extends GraphInputLink>(props: VisGraphProps<N, L>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Graph } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisGraphFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Graph(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisGraph = React.memo(React.forwardRef(VisGraphFC), arePropsEqual);
20
+
21
+ export { VisGraph };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/graph/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisGraphRef<N extends GraphInputNode, L extends GraphInputLink> = {\n component: Graph<N, L>;\n}\n\nexport type VisGraphProps<N extends GraphInputNode, L extends GraphInputLink> = GraphConfigInterface<N, L> & {\n data?: any;\n ref?: Ref<VisGraphRef<N, L>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisGraphFC<N extends GraphInputNode, L extends GraphInputLink> (props: VisGraphProps<N, L>, fRef: ForwardedRef<VisGraphRef<N, L>>): JSX.Element {\n const ref = useRef<VisComponentElement<Graph<N, L>>>(null)\n const [component] = useState<Graph<N, L>>(new Graph(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Graph<N, L>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisGraph: (<N extends GraphInputNode, L extends GraphInputLink>(props: VisGraphProps<N, L>) => JSX.Element | null) = React.memo(React.forwardRef(VisGraphFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,UAAU,CAAsD,KAA0B,EAAE,IAAqC,EAAA;AACxI,IAAA,MAAM,GAAG,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAA;AAC1D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAc,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAG3D,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAA4C,CAAC,aAAa,GAAG,SAAS,CAAA;KAC5E,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,QAAQ,GAA6G,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { GroupedBar, GroupedBarConfigInterface } from '@unovis/ts';
3
+ export declare type VisGroupedBarRef<Datum> = {
4
+ component: GroupedBar<Datum>;
5
+ };
6
+ export declare type VisGroupedBarProps<Datum> = GroupedBarConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisGroupedBarRef<Datum>>;
9
+ };
10
+ export declare const VisGroupedBar: (<Datum>(props: VisGroupedBarProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { GroupedBar } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisGroupedBarFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new GroupedBar(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisGroupedBar = React.memo(React.forwardRef(VisGroupedBarFC), arePropsEqual);
20
+
21
+ export { VisGroupedBar };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/grouped-bar/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { GroupedBar, GroupedBarConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisGroupedBarRef<Datum> = {\n component: GroupedBar<Datum>;\n}\n\nexport type VisGroupedBarProps<Datum> = GroupedBarConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisGroupedBarRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisGroupedBarFC<Datum> (props: VisGroupedBarProps<Datum>, fRef: ForwardedRef<VisGroupedBarRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<GroupedBar<Datum>>>(null)\n const [component] = useState<GroupedBar<Datum>>(new GroupedBar(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<GroupedBar<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisGroupedBar: (<Datum>(props: VisGroupedBarProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisGroupedBarFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,eAAe,CAAS,KAAgC,EAAE,IAA2C,EAAA;AAC5G,IAAA,MAAM,GAAG,GAAG,MAAM,CAAyC,IAAI,CAAC,CAAA;AAChE,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAoB,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;IAGtE,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAAkD,CAAC,aAAa,GAAG,SAAS,CAAA;KAClF,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,aAAa,GAAsE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Line, LineConfigInterface } from '@unovis/ts';
3
+ export declare type VisLineRef<Datum> = {
4
+ component: Line<Datum>;
5
+ };
6
+ export declare type VisLineProps<Datum> = LineConfigInterface<Datum> & {
7
+ data?: Datum[];
8
+ ref?: Ref<VisLineRef<Datum>>;
9
+ };
10
+ export declare const VisLine: (<Datum>(props: VisLineProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,22 @@
1
+ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
2
+ import { Line } from '@unovis/ts';
3
+ import { arePropsEqual } from '../../utils/react.js';
4
+
5
+ function VisLineFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const [component] = useState(new Line(props));
8
+ useEffect(() => {
9
+ ref.current.__component__ = component;
10
+ }, []);
11
+ useEffect(() => {
12
+ if (props.data)
13
+ component === null || component === void 0 ? void 0 : component.setData(props.data);
14
+ component === null || component === void 0 ? void 0 : component.setConfig(props);
15
+ });
16
+ useImperativeHandle(fRef, () => ({ component }));
17
+ return React.createElement("vis-component", { ref: ref });
18
+ }
19
+ const VisLine = React.memo(React.forwardRef(VisLineFC), arePropsEqual);
20
+
21
+ export { VisLine };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/line/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Line, LineConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisLineRef<Datum> = {\n component: Line<Datum>;\n}\n\nexport type VisLineProps<Datum> = LineConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLineRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLineFC<Datum> (props: VisLineProps<Datum>, fRef: ForwardedRef<VisLineRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Line<Datum>>>(null)\n const [component] = useState<Line<Datum>>(new Line(props))\n\n // On Mount\n useEffect(() => {\n (ref.current as VisComponentElement<Line<Datum>>).__component__ = component\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component }))\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLine: (<Datum>(props: VisLineProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLineFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBA,SAAS,SAAS,CAAS,KAA0B,EAAE,IAAqC,EAAA;AAC1F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAA;AAC1D,IAAA,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAc,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAG1D,SAAS,CAAC,MAAK;AACZ,QAAA,GAAG,CAAC,OAA4C,CAAC,aAAa,GAAG,SAAS,CAAA;KAC5E,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEF,IAAA,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChD,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,OAAO,GAAgE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,aAAa;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'react';
2
+ import { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts';
3
+ export declare type VisSankeyRef<N extends SankeyInputNode, L extends SankeyInputLink> = {
4
+ component: Sankey<N, L>;
5
+ };
6
+ export declare type VisSankeyProps<N extends SankeyInputNode, L extends SankeyInputLink> = SankeyConfigInterface<N, L> & {
7
+ data?: any;
8
+ ref?: Ref<VisSankeyRef<N, L>>;
9
+ };
10
+ export declare const VisSankey: (<N extends SankeyInputNode, L extends SankeyInputLink>(props: VisSankeyProps<N, L>) => JSX.Element | null);