@lv-x-software-house/x_view 1.2.6-dev.7 → 1.2.6-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +48 -48
- package/dist/index.mjs +48 -48
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17656,6 +17656,54 @@ function XViewScene({
|
|
|
17656
17656
|
const handleOpenAncestryBoard = (0, import_react29.useCallback)(() => {
|
|
17657
17657
|
setIsAncestryBoardOpen(true);
|
|
17658
17658
|
}, []);
|
|
17659
|
+
const allAvailableNodes = (0, import_react29.useMemo)(() => {
|
|
17660
|
+
if (!parentDataRef.current) return [];
|
|
17661
|
+
return Object.values(parentDataRef.current).flatMap(
|
|
17662
|
+
(fileData) => fileData.nodes || []
|
|
17663
|
+
);
|
|
17664
|
+
}, [sceneVersion, isInitialized]);
|
|
17665
|
+
const allAvailableAncestries = (0, import_react29.useMemo)(() => {
|
|
17666
|
+
return ancestryDataRef.current || [];
|
|
17667
|
+
}, [sceneVersion, isInitialized]);
|
|
17668
|
+
const handleOpenReference = (0, import_react29.useCallback)(
|
|
17669
|
+
(referenceData) => {
|
|
17670
|
+
const { type, id } = referenceData;
|
|
17671
|
+
if (type === "node") {
|
|
17672
|
+
const targetNode = allAvailableNodes.find(
|
|
17673
|
+
(n) => String(n.id) === String(id)
|
|
17674
|
+
);
|
|
17675
|
+
if (targetNode) {
|
|
17676
|
+
setAncestryLinkDetails(null);
|
|
17677
|
+
setDetailsLink(null);
|
|
17678
|
+
setDetailsNode(targetNode);
|
|
17679
|
+
const sceneMesh = stateRef.current.nodeObjects[String(id)];
|
|
17680
|
+
if (sceneMesh) {
|
|
17681
|
+
tweenToTarget(sceneMesh);
|
|
17682
|
+
}
|
|
17683
|
+
} else {
|
|
17684
|
+
alert("Node original n\xE3o encontrado neste contexto.");
|
|
17685
|
+
}
|
|
17686
|
+
} else if (type === "ancestry") {
|
|
17687
|
+
const targetAncestry = allAvailableAncestries.find(
|
|
17688
|
+
(a) => String(a.ancestry_id) === String(id)
|
|
17689
|
+
);
|
|
17690
|
+
if (targetAncestry) {
|
|
17691
|
+
setDetailsNode(null);
|
|
17692
|
+
setDetailsLink(null);
|
|
17693
|
+
setAncestryLinkDetails(null);
|
|
17694
|
+
handleEditAncestry(targetAncestry);
|
|
17695
|
+
} else {
|
|
17696
|
+
alert("Ancestralidade original n\xE3o encontrada neste contexto.");
|
|
17697
|
+
}
|
|
17698
|
+
}
|
|
17699
|
+
},
|
|
17700
|
+
[
|
|
17701
|
+
allAvailableNodes,
|
|
17702
|
+
allAvailableAncestries,
|
|
17703
|
+
handleEditAncestry,
|
|
17704
|
+
tweenToTarget
|
|
17705
|
+
]
|
|
17706
|
+
);
|
|
17659
17707
|
const handleSelectAncestryFromBoard = (0, import_react29.useCallback)(
|
|
17660
17708
|
(item) => {
|
|
17661
17709
|
setIsAncestryBoardOpen(false);
|
|
@@ -17807,54 +17855,6 @@ function XViewScene({
|
|
|
17807
17855
|
console.error("Erro na chamada de save_view_data:", error);
|
|
17808
17856
|
}
|
|
17809
17857
|
}, [sceneSaveUrl, save_view_data, sceneConfigId, viewParams == null ? void 0 : viewParams.type]);
|
|
17810
|
-
const allAvailableNodes = (0, import_react29.useMemo)(() => {
|
|
17811
|
-
if (!parentDataRef.current) return [];
|
|
17812
|
-
return Object.values(parentDataRef.current).flatMap(
|
|
17813
|
-
(fileData) => fileData.nodes || []
|
|
17814
|
-
);
|
|
17815
|
-
}, [sceneVersion, isInitialized]);
|
|
17816
|
-
const allAvailableAncestries = (0, import_react29.useMemo)(() => {
|
|
17817
|
-
return ancestryDataRef.current || [];
|
|
17818
|
-
}, [sceneVersion, isInitialized]);
|
|
17819
|
-
const handleOpenReference = (0, import_react29.useCallback)(
|
|
17820
|
-
(referenceData) => {
|
|
17821
|
-
const { type, id } = referenceData;
|
|
17822
|
-
if (type === "node") {
|
|
17823
|
-
const targetNode = allAvailableNodes.find(
|
|
17824
|
-
(n) => String(n.id) === String(id)
|
|
17825
|
-
);
|
|
17826
|
-
if (targetNode) {
|
|
17827
|
-
setAncestryLinkDetails(null);
|
|
17828
|
-
setDetailsLink(null);
|
|
17829
|
-
setDetailsNode(targetNode);
|
|
17830
|
-
const sceneMesh = stateRef.current.nodeObjects[String(id)];
|
|
17831
|
-
if (sceneMesh) {
|
|
17832
|
-
tweenToTarget(sceneMesh);
|
|
17833
|
-
}
|
|
17834
|
-
} else {
|
|
17835
|
-
alert("Node original n\xE3o encontrado neste contexto.");
|
|
17836
|
-
}
|
|
17837
|
-
} else if (type === "ancestry") {
|
|
17838
|
-
const targetAncestry = allAvailableAncestries.find(
|
|
17839
|
-
(a) => String(a.ancestry_id) === String(id)
|
|
17840
|
-
);
|
|
17841
|
-
if (targetAncestry) {
|
|
17842
|
-
setDetailsNode(null);
|
|
17843
|
-
setDetailsLink(null);
|
|
17844
|
-
setAncestryLinkDetails(null);
|
|
17845
|
-
handleEditAncestry(targetAncestry);
|
|
17846
|
-
} else {
|
|
17847
|
-
alert("Ancestralidade original n\xE3o encontrada neste contexto.");
|
|
17848
|
-
}
|
|
17849
|
-
}
|
|
17850
|
-
},
|
|
17851
|
-
[
|
|
17852
|
-
allAvailableNodes,
|
|
17853
|
-
allAvailableAncestries,
|
|
17854
|
-
handleEditAncestry,
|
|
17855
|
-
tweenToTarget
|
|
17856
|
-
]
|
|
17857
|
-
);
|
|
17858
17858
|
const handleToggleAncestryAddMode = (0, import_react29.useCallback)(() => {
|
|
17859
17859
|
setAncestryMode((prev) => ({
|
|
17860
17860
|
...prev,
|
package/dist/index.mjs
CHANGED
|
@@ -17703,6 +17703,54 @@ function XViewScene({
|
|
|
17703
17703
|
const handleOpenAncestryBoard = useCallback4(() => {
|
|
17704
17704
|
setIsAncestryBoardOpen(true);
|
|
17705
17705
|
}, []);
|
|
17706
|
+
const allAvailableNodes = useMemo12(() => {
|
|
17707
|
+
if (!parentDataRef.current) return [];
|
|
17708
|
+
return Object.values(parentDataRef.current).flatMap(
|
|
17709
|
+
(fileData) => fileData.nodes || []
|
|
17710
|
+
);
|
|
17711
|
+
}, [sceneVersion, isInitialized]);
|
|
17712
|
+
const allAvailableAncestries = useMemo12(() => {
|
|
17713
|
+
return ancestryDataRef.current || [];
|
|
17714
|
+
}, [sceneVersion, isInitialized]);
|
|
17715
|
+
const handleOpenReference = useCallback4(
|
|
17716
|
+
(referenceData) => {
|
|
17717
|
+
const { type, id } = referenceData;
|
|
17718
|
+
if (type === "node") {
|
|
17719
|
+
const targetNode = allAvailableNodes.find(
|
|
17720
|
+
(n) => String(n.id) === String(id)
|
|
17721
|
+
);
|
|
17722
|
+
if (targetNode) {
|
|
17723
|
+
setAncestryLinkDetails(null);
|
|
17724
|
+
setDetailsLink(null);
|
|
17725
|
+
setDetailsNode(targetNode);
|
|
17726
|
+
const sceneMesh = stateRef.current.nodeObjects[String(id)];
|
|
17727
|
+
if (sceneMesh) {
|
|
17728
|
+
tweenToTarget(sceneMesh);
|
|
17729
|
+
}
|
|
17730
|
+
} else {
|
|
17731
|
+
alert("Node original n\xE3o encontrado neste contexto.");
|
|
17732
|
+
}
|
|
17733
|
+
} else if (type === "ancestry") {
|
|
17734
|
+
const targetAncestry = allAvailableAncestries.find(
|
|
17735
|
+
(a) => String(a.ancestry_id) === String(id)
|
|
17736
|
+
);
|
|
17737
|
+
if (targetAncestry) {
|
|
17738
|
+
setDetailsNode(null);
|
|
17739
|
+
setDetailsLink(null);
|
|
17740
|
+
setAncestryLinkDetails(null);
|
|
17741
|
+
handleEditAncestry(targetAncestry);
|
|
17742
|
+
} else {
|
|
17743
|
+
alert("Ancestralidade original n\xE3o encontrada neste contexto.");
|
|
17744
|
+
}
|
|
17745
|
+
}
|
|
17746
|
+
},
|
|
17747
|
+
[
|
|
17748
|
+
allAvailableNodes,
|
|
17749
|
+
allAvailableAncestries,
|
|
17750
|
+
handleEditAncestry,
|
|
17751
|
+
tweenToTarget
|
|
17752
|
+
]
|
|
17753
|
+
);
|
|
17706
17754
|
const handleSelectAncestryFromBoard = useCallback4(
|
|
17707
17755
|
(item) => {
|
|
17708
17756
|
setIsAncestryBoardOpen(false);
|
|
@@ -17854,54 +17902,6 @@ function XViewScene({
|
|
|
17854
17902
|
console.error("Erro na chamada de save_view_data:", error);
|
|
17855
17903
|
}
|
|
17856
17904
|
}, [sceneSaveUrl, save_view_data, sceneConfigId, viewParams == null ? void 0 : viewParams.type]);
|
|
17857
|
-
const allAvailableNodes = useMemo12(() => {
|
|
17858
|
-
if (!parentDataRef.current) return [];
|
|
17859
|
-
return Object.values(parentDataRef.current).flatMap(
|
|
17860
|
-
(fileData) => fileData.nodes || []
|
|
17861
|
-
);
|
|
17862
|
-
}, [sceneVersion, isInitialized]);
|
|
17863
|
-
const allAvailableAncestries = useMemo12(() => {
|
|
17864
|
-
return ancestryDataRef.current || [];
|
|
17865
|
-
}, [sceneVersion, isInitialized]);
|
|
17866
|
-
const handleOpenReference = useCallback4(
|
|
17867
|
-
(referenceData) => {
|
|
17868
|
-
const { type, id } = referenceData;
|
|
17869
|
-
if (type === "node") {
|
|
17870
|
-
const targetNode = allAvailableNodes.find(
|
|
17871
|
-
(n) => String(n.id) === String(id)
|
|
17872
|
-
);
|
|
17873
|
-
if (targetNode) {
|
|
17874
|
-
setAncestryLinkDetails(null);
|
|
17875
|
-
setDetailsLink(null);
|
|
17876
|
-
setDetailsNode(targetNode);
|
|
17877
|
-
const sceneMesh = stateRef.current.nodeObjects[String(id)];
|
|
17878
|
-
if (sceneMesh) {
|
|
17879
|
-
tweenToTarget(sceneMesh);
|
|
17880
|
-
}
|
|
17881
|
-
} else {
|
|
17882
|
-
alert("Node original n\xE3o encontrado neste contexto.");
|
|
17883
|
-
}
|
|
17884
|
-
} else if (type === "ancestry") {
|
|
17885
|
-
const targetAncestry = allAvailableAncestries.find(
|
|
17886
|
-
(a) => String(a.ancestry_id) === String(id)
|
|
17887
|
-
);
|
|
17888
|
-
if (targetAncestry) {
|
|
17889
|
-
setDetailsNode(null);
|
|
17890
|
-
setDetailsLink(null);
|
|
17891
|
-
setAncestryLinkDetails(null);
|
|
17892
|
-
handleEditAncestry(targetAncestry);
|
|
17893
|
-
} else {
|
|
17894
|
-
alert("Ancestralidade original n\xE3o encontrada neste contexto.");
|
|
17895
|
-
}
|
|
17896
|
-
}
|
|
17897
|
-
},
|
|
17898
|
-
[
|
|
17899
|
-
allAvailableNodes,
|
|
17900
|
-
allAvailableAncestries,
|
|
17901
|
-
handleEditAncestry,
|
|
17902
|
-
tweenToTarget
|
|
17903
|
-
]
|
|
17904
|
-
);
|
|
17905
17905
|
const handleToggleAncestryAddMode = useCallback4(() => {
|
|
17906
17906
|
setAncestryMode((prev) => ({
|
|
17907
17907
|
...prev,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.6-dev.
|
|
3
|
+
"version": "1.2.6-dev.8",
|
|
4
4
|
"description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
|
|
5
5
|
"author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
|
|
6
6
|
"license": "UNLICENSED",
|