@lv-x-software-house/x_view 1.2.6-dev.87 → 1.2.6-dev.88
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 +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11277,7 +11277,8 @@ function NodeDetailsPanel({
|
|
|
11277
11277
|
}
|
|
11278
11278
|
};
|
|
11279
11279
|
(0, import_react20.useEffect)(() => {
|
|
11280
|
-
|
|
11280
|
+
const isNewNode = (node == null ? void 0 : node.id) !== prevNodeIdRef.current;
|
|
11281
|
+
if (isNewNode || !hasUnsavedChanges) {
|
|
11281
11282
|
prevNodeIdRef.current = node == null ? void 0 : node.id;
|
|
11282
11283
|
setName((node == null ? void 0 : node.name) ?? "");
|
|
11283
11284
|
if (node == null ? void 0 : node.type) {
|
|
@@ -11297,7 +11298,7 @@ function NodeDetailsPanel({
|
|
|
11297
11298
|
setSelectedImageUrl((node == null ? void 0 : node.textureImageUrl) ?? null);
|
|
11298
11299
|
setHasUnsavedChanges(false);
|
|
11299
11300
|
}
|
|
11300
|
-
}, [node]);
|
|
11301
|
+
}, [node, hasUnsavedChanges]);
|
|
11301
11302
|
const hasImages = customProps.some((p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value));
|
|
11302
11303
|
(0, import_react20.useEffect)(() => {
|
|
11303
11304
|
if (!hasImages && useImageAsTexture) {
|
|
@@ -12099,7 +12100,8 @@ function QuestDetailsPanel({
|
|
|
12099
12100
|
};
|
|
12100
12101
|
(0, import_react22.useEffect)(() => {
|
|
12101
12102
|
var _a2;
|
|
12102
|
-
|
|
12103
|
+
const isNewNode = (node == null ? void 0 : node.id) !== prevNodeIdRef.current;
|
|
12104
|
+
if (isNewNode || !hasUnsavedChanges) {
|
|
12103
12105
|
prevNodeIdRef.current = node == null ? void 0 : node.id;
|
|
12104
12106
|
const newRawTitle = (node == null ? void 0 : node.raw_title) || (((_a2 = node == null ? void 0 : node.name) == null ? void 0 : _a2.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
|
|
12105
12107
|
setRawTitle(newRawTitle);
|
|
@@ -12126,7 +12128,7 @@ function QuestDetailsPanel({
|
|
|
12126
12128
|
});
|
|
12127
12129
|
setHasUnsavedChanges(false);
|
|
12128
12130
|
}
|
|
12129
|
-
}, [node]);
|
|
12131
|
+
}, [node, hasUnsavedChanges]);
|
|
12130
12132
|
(0, import_react22.useEffect)(() => {
|
|
12131
12133
|
const validExistingTypes = existingTypes.filter((t) => t && typeof t === "string" && t.trim() !== "");
|
|
12132
12134
|
if (typeInput.trim() === "") {
|
package/dist/index.mjs
CHANGED
|
@@ -11303,7 +11303,8 @@ function NodeDetailsPanel({
|
|
|
11303
11303
|
}
|
|
11304
11304
|
};
|
|
11305
11305
|
useEffect16(() => {
|
|
11306
|
-
|
|
11306
|
+
const isNewNode = (node == null ? void 0 : node.id) !== prevNodeIdRef.current;
|
|
11307
|
+
if (isNewNode || !hasUnsavedChanges) {
|
|
11307
11308
|
prevNodeIdRef.current = node == null ? void 0 : node.id;
|
|
11308
11309
|
setName((node == null ? void 0 : node.name) ?? "");
|
|
11309
11310
|
if (node == null ? void 0 : node.type) {
|
|
@@ -11323,7 +11324,7 @@ function NodeDetailsPanel({
|
|
|
11323
11324
|
setSelectedImageUrl((node == null ? void 0 : node.textureImageUrl) ?? null);
|
|
11324
11325
|
setHasUnsavedChanges(false);
|
|
11325
11326
|
}
|
|
11326
|
-
}, [node]);
|
|
11327
|
+
}, [node, hasUnsavedChanges]);
|
|
11327
11328
|
const hasImages = customProps.some((p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value));
|
|
11328
11329
|
useEffect16(() => {
|
|
11329
11330
|
if (!hasImages && useImageAsTexture) {
|
|
@@ -12137,7 +12138,8 @@ function QuestDetailsPanel({
|
|
|
12137
12138
|
};
|
|
12138
12139
|
useEffect17(() => {
|
|
12139
12140
|
var _a2;
|
|
12140
|
-
|
|
12141
|
+
const isNewNode = (node == null ? void 0 : node.id) !== prevNodeIdRef.current;
|
|
12142
|
+
if (isNewNode || !hasUnsavedChanges) {
|
|
12141
12143
|
prevNodeIdRef.current = node == null ? void 0 : node.id;
|
|
12142
12144
|
const newRawTitle = (node == null ? void 0 : node.raw_title) || (((_a2 = node == null ? void 0 : node.name) == null ? void 0 : _a2.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
|
|
12143
12145
|
setRawTitle(newRawTitle);
|
|
@@ -12164,7 +12166,7 @@ function QuestDetailsPanel({
|
|
|
12164
12166
|
});
|
|
12165
12167
|
setHasUnsavedChanges(false);
|
|
12166
12168
|
}
|
|
12167
|
-
}, [node]);
|
|
12169
|
+
}, [node, hasUnsavedChanges]);
|
|
12168
12170
|
useEffect17(() => {
|
|
12169
12171
|
const validExistingTypes = existingTypes.filter((t) => t && typeof t === "string" && t.trim() !== "");
|
|
12170
12172
|
if (typeInput.trim() === "") {
|
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.88",
|
|
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",
|