@lv-x-software-house/x_view 1.2.2-dev.3 → 1.2.2-dev.4
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 +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5255,6 +5255,7 @@ function CreateAncestryPanel({
|
|
|
5255
5255
|
const branchProgressMapRef = (0, import_react10.useRef)({});
|
|
5256
5256
|
const [lastSavedSnapshot, setLastSavedSnapshot] = (0, import_react10.useState)(null);
|
|
5257
5257
|
const [isPrivate, setIsPrivate] = (0, import_react10.useState)(ancestryMode.is_private || false);
|
|
5258
|
+
const initializedContextIdRef = (0, import_react10.useRef)(null);
|
|
5258
5259
|
const availableImages = customProps.filter((p) => p.type === "images").flatMap((p) => Array.isArray(p.value) ? p.value : []).filter((img) => img.value && img.value.trim() !== "");
|
|
5259
5260
|
const handleImageClickFromText = (url, name) => {
|
|
5260
5261
|
if (onOpenImageViewer) {
|
|
@@ -5453,6 +5454,11 @@ function CreateAncestryPanel({
|
|
|
5453
5454
|
}, [isContextLinked, branchStack]);
|
|
5454
5455
|
(0, import_react10.useEffect)(() => {
|
|
5455
5456
|
const ctx = getCurrentContext();
|
|
5457
|
+
const currentContextId = branchStack.length > 0 ? branchStack[branchStack.length - 1].branchId : ancestryMode.currentAncestryId || `new_${ancestryMode.ancestral_node}`;
|
|
5458
|
+
if (initializedContextIdRef.current === currentContextId) {
|
|
5459
|
+
return;
|
|
5460
|
+
}
|
|
5461
|
+
initializedContextIdRef.current = currentContextId;
|
|
5456
5462
|
let sourceObject = {};
|
|
5457
5463
|
if (ctx) {
|
|
5458
5464
|
sourceObject = ctx;
|
|
@@ -5803,7 +5809,7 @@ function CreateAncestryPanel({
|
|
|
5803
5809
|
const currentAbsTreeStr = JSON.stringify(ancestryMode.abstraction_tree);
|
|
5804
5810
|
abstractionTreeChanged = currentAbsTreeStr !== lastSavedSnapshot.abstractionTree;
|
|
5805
5811
|
}
|
|
5806
|
-
return treeChanged || nameChanged || descChanged || sectionsChanged || propsChanged || privateChanged;
|
|
5812
|
+
return treeChanged || nameChanged || descChanged || sectionsChanged || propsChanged || privateChanged || abstractionTreeChanged;
|
|
5807
5813
|
}, [
|
|
5808
5814
|
ancestryName,
|
|
5809
5815
|
description,
|
package/dist/index.mjs
CHANGED
|
@@ -5241,6 +5241,7 @@ function CreateAncestryPanel({
|
|
|
5241
5241
|
const branchProgressMapRef = useRef8({});
|
|
5242
5242
|
const [lastSavedSnapshot, setLastSavedSnapshot] = useState10(null);
|
|
5243
5243
|
const [isPrivate, setIsPrivate] = useState10(ancestryMode.is_private || false);
|
|
5244
|
+
const initializedContextIdRef = useRef8(null);
|
|
5244
5245
|
const availableImages = customProps.filter((p) => p.type === "images").flatMap((p) => Array.isArray(p.value) ? p.value : []).filter((img) => img.value && img.value.trim() !== "");
|
|
5245
5246
|
const handleImageClickFromText = (url, name) => {
|
|
5246
5247
|
if (onOpenImageViewer) {
|
|
@@ -5439,6 +5440,11 @@ function CreateAncestryPanel({
|
|
|
5439
5440
|
}, [isContextLinked, branchStack]);
|
|
5440
5441
|
useEffect10(() => {
|
|
5441
5442
|
const ctx = getCurrentContext();
|
|
5443
|
+
const currentContextId = branchStack.length > 0 ? branchStack[branchStack.length - 1].branchId : ancestryMode.currentAncestryId || `new_${ancestryMode.ancestral_node}`;
|
|
5444
|
+
if (initializedContextIdRef.current === currentContextId) {
|
|
5445
|
+
return;
|
|
5446
|
+
}
|
|
5447
|
+
initializedContextIdRef.current = currentContextId;
|
|
5442
5448
|
let sourceObject = {};
|
|
5443
5449
|
if (ctx) {
|
|
5444
5450
|
sourceObject = ctx;
|
|
@@ -5789,7 +5795,7 @@ function CreateAncestryPanel({
|
|
|
5789
5795
|
const currentAbsTreeStr = JSON.stringify(ancestryMode.abstraction_tree);
|
|
5790
5796
|
abstractionTreeChanged = currentAbsTreeStr !== lastSavedSnapshot.abstractionTree;
|
|
5791
5797
|
}
|
|
5792
|
-
return treeChanged || nameChanged || descChanged || sectionsChanged || propsChanged || privateChanged;
|
|
5798
|
+
return treeChanged || nameChanged || descChanged || sectionsChanged || propsChanged || privateChanged || abstractionTreeChanged;
|
|
5793
5799
|
}, [
|
|
5794
5800
|
ancestryName,
|
|
5795
5801
|
description,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.2-dev.
|
|
3
|
+
"version": "1.2.2-dev.4",
|
|
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",
|