@avs/go-react 0.14.71999 → 0.14.72017

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.
@@ -1,275 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Advanced Visual Systems Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *
17
- * This product includes software developed at
18
- * Advanced Visual Systems Inc. (http://www.avs.com)
19
- */
20
-
21
- import { forwardRef, useRef, useEffect, useImperativeHandle } from 'react';
22
- import { AvsGoDataViz as AvsGoDataVizPolymer } from '@avs/go/src/avs-go-dataviz';
23
-
24
- export const AvsGoDataViz = forwardRef(({
25
- children,
26
- style,
27
- manualUpdate,
28
- displayCanvas,
29
- url,
30
- urlLoadJsonFile,
31
- sceneName,
32
- sceneUserProperties,
33
- dataSourceName,
34
- dataSourceUserProperties,
35
- rendererName,
36
- rendererUserProperties,
37
- renderer,
38
- streamEnable,
39
- streamChunkSizeFirst,
40
- streamChunkSize,
41
- themeName,
42
- hidden,
43
- resizeThreshold,
44
- aspectRatio,
45
- pointerTimeout,
46
- tapEnable,
47
- tapLevel,
48
- tapDepth,
49
- tapHighlightEnable,
50
- tapHighlightColor,
51
- tapHighlightLayerEnable,
52
- tapProcessEventOnClient,
53
- onTap,
54
- trackEnable,
55
- trackLevel,
56
- trackDepth,
57
- trackHighlightEnable,
58
- trackHighlightColor,
59
- trackHighlightLayerEnable,
60
- trackProcessEventOnClient,
61
- onTrack,
62
- hoverEnable,
63
- hoverLevel,
64
- hoverDepth,
65
- hoverHighlightEnable,
66
- hoverHighlightColor,
67
- hoverHighlightLayerEnable,
68
- onHover,
69
- transformEnable,
70
- transformClientOnly,
71
- transformRotateDisable,
72
- transformZoomDisable,
73
- transformPanDisable,
74
- transformTwistAngle,
75
- transformTiltAngle,
76
- transformScale,
77
- motionCapture,
78
- zoomRectangleEnable,
79
- panEnable,
80
- panZoomEnable,
81
- panWidthZoomLevel,
82
- panHeightZoomLevel,
83
- panMaximumZoomLevel,
84
- animatedGlyphsVisible,
85
- animatedGlyphsEnable,
86
- motionCaptureControlsEnable,
87
- onSceneInfo,
88
- onSceneData,
89
- onLoadComplete,
90
- onPanInfo,
91
- onError
92
- }, ref) => {
93
-
94
- const dataVizRef = useRef();
95
-
96
- useEffect(() => {
97
- if (!dataVizRef.current) {
98
- return;
99
- }
100
-
101
- function handleTap(e) {
102
- if (onTap) {
103
- onTap(e);
104
- }
105
- }
106
-
107
- function handleTrack(e) {
108
- if (onTrack) {
109
- onTrack(e);
110
- }
111
- }
112
-
113
- function handleHover(e) {
114
- if (onHover) {
115
- onHover(e);
116
- }
117
- }
118
-
119
- function handleSceneInfo(e) {
120
- if (onSceneInfo) {
121
- onSceneInfo(e);
122
- }
123
- }
124
-
125
- function handleSceneData(e) {
126
- if (onSceneData) {
127
- onSceneData(e);
128
- }
129
- }
130
-
131
- function handleLoadComplete(e) {
132
- if (onLoadComplete) {
133
- onLoadComplete(e);
134
- }
135
- }
136
-
137
- function handlePanInfo(e) {
138
- if (onPanInfo) {
139
- onPanInfo(e);
140
- }
141
- }
142
-
143
- function handleError(e) {
144
- if (onError) {
145
- onError(e);
146
- }
147
- }
148
-
149
- dataVizRef.current.addEventListener('avs-tap', handleTap);
150
- dataVizRef.current.addEventListener('avs-track', handleTrack);
151
- dataVizRef.current.addEventListener('avs-hover', handleHover);
152
- dataVizRef.current.addEventListener('avs-scene-info', handleSceneInfo);
153
- dataVizRef.current.addEventListener('avs-scene-data', handleSceneData);
154
- dataVizRef.current.addEventListener('avs-load-complete', handleLoadComplete);
155
- dataVizRef.current.addEventListener('avs-pan-info', handlePanInfo);
156
- dataVizRef.current.addEventListener('avs-error', handleError);
157
-
158
- return () => {
159
- if (dataVizRef.current) {
160
- dataVizRef.current.removeEventListener('avs-tap', handleTap);
161
- dataVizRef.current.removeEventListener('avs-track', handleTrack);
162
- dataVizRef.current.removeEventListener('avs-hover', handleHover);
163
- dataVizRef.current.removeEventListener('avs-scene-info', handleSceneInfo);
164
- dataVizRef.current.removeEventListener('avs-scene-data', handleSceneData);
165
- dataVizRef.current.removeEventListener('avs-load-complete', handleLoadComplete);
166
- dataVizRef.current.removeEventListener('avs-pan-info', handlePanInfo);
167
- dataVizRef.current.removeEventListener('avs-error', handleError);
168
- }
169
- }
170
- }, []);
171
-
172
- useImperativeHandle(ref, () => ({
173
- updateViewer() {
174
- if (dataVizRef.current) {
175
- dataVizRef.current.updateViewer();
176
- }
177
- },
178
-
179
- runAnimation() {
180
- if (dataVizRef.current) {
181
- dataVizRef.current.runAnimation();
182
- }
183
- },
184
-
185
- resetTransform() {
186
- if (dataVizRef.current) {
187
- dataVizRef.current.resetTransform();
188
- }
189
- },
190
-
191
- zoomIn() {
192
- if (dataVizRef.current) {
193
- dataVizRef.current.zoomIn();
194
- }
195
- },
196
-
197
- zoomOut() {
198
- if (dataVizRef.current) {
199
- dataVizRef.current.zoomOut();
200
- }
201
- },
202
-
203
- panTo() {
204
- if (dataVizRef.current) {
205
- dataVizRef.current.panTo();
206
- }
207
- }
208
- }));
209
-
210
- return (
211
- <avs-go-dataviz
212
- style={style}
213
- ref={dataVizRef}
214
- manual-update={manualUpdate}
215
- display-canvas={displayCanvas}
216
- url={url}
217
- url-load-json-file={urlLoadJsonFile}
218
- scene-name={sceneName}
219
- scene-user-properties={sceneUserProperties}
220
- data-source-name={dataSourceName}
221
- data-source-user-properties={dataSourceUserProperties}
222
- renderer-name={rendererName}
223
- renderer-user-properties={rendererUserProperties}
224
- renderer={renderer}
225
- stream-enable={streamEnable}
226
- stream-chunk-size-first={streamChunkSizeFirst}
227
- stream-chunk-size={streamChunkSize}
228
- theme-name={themeName}
229
- hidden={hidden}
230
- resize-threshold={resizeThreshold}
231
- aspect-ratio={aspectRatio}
232
- pointer-timeout={pointerTimeout}
233
- tap-enable={tapEnable}
234
- tap-level={tapLevel}
235
- tap-depth={tapDepth}
236
- tap-highlight-enable={tapHighlightEnable}
237
- tap-highlight-color={tapHighlightColor}
238
- tap-highlight-layer-enable={tapHighlightLayerEnable}
239
- tap-process-event-on-client={tapProcessEventOnClient}
240
- track-enable={trackEnable}
241
- track-level={trackLevel}
242
- track-depth={trackDepth}
243
- track-highlight-enable={trackHighlightEnable}
244
- track-highlight-color={trackHighlightColor}
245
- track-highlight-layer-enable={trackHighlightLayerEnable}
246
- track-process-event-on-client={trackProcessEventOnClient}
247
- hover-enable={hoverEnable}
248
- hover-level={hoverLevel}
249
- horer-depth={hoverDepth}
250
- hover-highlight-enable={hoverHighlightEnable}
251
- hover-highlight-color={hoverHighlightColor}
252
- hover-highlight-layer-enable={hoverHighlightLayerEnable}
253
- transform-enable={transformEnable}
254
- transform-client-only={transformClientOnly}
255
- transform-rotate-disable={transformRotateDisable}
256
- transform-zoom-disable={transformZoomDisable}
257
- transform-pan-disable={transformPanDisable}
258
- transform-twist-angle={transformTwistAngle}
259
- transform-tilt-angle={transformTiltAngle}
260
- transform-scale={transformScale}
261
- motion-capture={motionCapture}
262
- zoom-reactangle-enable={zoomRectangleEnable}
263
- pan-enable={panEnable}
264
- pan-zoom-enable={panZoomEnable}
265
- pan-width-zoom-level={panWidthZoomLevel}
266
- pan-height-zoom-level={panHeightZoomLevel}
267
- pan-maximum-zoom-level={panMaximumZoomLevel}
268
- animated-glyphs-visible={animatedGlyphsVisible}
269
- animated-glyphs-enable={animatedGlyphsEnable}
270
- motion-capture-controls-enable={motionCaptureControlsEnable}
271
- >
272
- {children}
273
- </avs-go-dataviz>
274
- );
275
- });
@@ -1,68 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Advanced Visual Systems Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *
17
- * This product includes software developed at
18
- * Advanced Visual Systems Inc. (http://www.avs.com)
19
- */
20
-
21
- import { forwardRef, useRef, useEffect, useImperativeHandle } from 'react';
22
- import { AvsGoDynamicHtml as AvsGoDynamicHtmlPolymer } from '@avs/go/src/avs-go-dynamic-html';
23
-
24
- export const AvsGoDynamicHtml = forwardRef(({
25
- url,
26
- linkCss,
27
- dynamicHtmlName,
28
- dynamicHtmlUserProperties,
29
- dataSourceName,
30
- dataSourceUserProperties,
31
- onError
32
- }, ref) => {
33
-
34
- const dynamicHtmlRef = useRef();
35
-
36
- useEffect(() => {
37
- if (!dynamicHtmlRef.current) {
38
- return;
39
- }
40
-
41
- function handleError(e) {
42
- if (onError) {
43
- onError(e.detail);
44
- }
45
- }
46
-
47
- dynamicHtmlRef.current.addEventListener('avs-error', handleError);
48
-
49
- return () => {
50
- if (dynamicHtmlRef.current) {
51
- dynamicHtmlRef.current.removeEventListener('avs-error', handleError);
52
- }
53
- }
54
- }, []);
55
-
56
- return (
57
- <avs-go-dynamic-html
58
- ref={dynamicHtmlRef}
59
- url={url}
60
- link-css={linkCss}
61
- dynamic-html-name={dynamicHtmlName}
62
- dynamic-html-user-properties={dynamicHtmlUserProperties}
63
- data-source-name={dataSourceName}
64
- data-source-user-properties={dataSourceUserProperties}
65
- >
66
- </avs-go-dynamic-html>
67
- );
68
- });
package/src/AvsGoInfo.jsx DELETED
@@ -1,83 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Advanced Visual Systems Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *
17
- * This product includes software developed at
18
- * Advanced Visual Systems Inc. (http://www.avs.com)
19
- */
20
-
21
- import { forwardRef, useRef, useEffect, useImperativeHandle } from 'react';
22
- import { AvsGoInfo as AvsGoInfoPolymer } from '@avs/go/src/avs-go-info';
23
-
24
- export const AvsGoInfo = forwardRef(({
25
- url,
26
- infoName,
27
- infoUserProperties,
28
- dataSourceName,
29
- dataSourceUserProperties,
30
- onInfo,
31
- onError
32
- }, ref) => {
33
-
34
- const infoRef = useRef();
35
-
36
- useEffect(() => {
37
- if (!infoRef.current) {
38
- return;
39
- }
40
-
41
- function handleInfo(e) {
42
- if (onInfo) {
43
- onInfo(e);
44
- }
45
- }
46
-
47
- function handleError(e) {
48
- if (onError) {
49
- onError(e);
50
- }
51
- }
52
-
53
- infoRef.current.addEventListener('avs-go-info-response', handleInfo);
54
- infoRef.current.addEventListener('avs-error', handleError);
55
-
56
- return () => {
57
- if (infoRef.current) {
58
- infoRef.current.removeEventListener('avs-go-info-response', handleSceneInfo);
59
- infoRef.current.removeEventListener('avs-error', handleError);
60
- }
61
- }
62
- }, []);
63
-
64
- useImperativeHandle(ref, () => ({
65
- updateInfo() {
66
- if (infoRef.current) {
67
- infoRef.current.updateInfo();
68
- }
69
- }
70
- }));
71
-
72
- return (
73
- <avs-go-info
74
- ref={infoRef}
75
- url={url}
76
- info-name={infoName}
77
- info-user-properties={infoUserProperties}
78
- data-source-name={dataSourceName}
79
- data-source-user-properties={dataSourceUserProperties}
80
- >
81
- </avs-go-info>
82
- );
83
- });