@lv-x-software-house/x_view 1.2.8-dev.14 → 1.2.8-dev.15
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 +31 -31
- package/dist/index.mjs +31 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1282,8 +1282,8 @@ var userActionHandlers = {
|
|
|
1282
1282
|
specificParentData.nodes.push(newNode);
|
|
1283
1283
|
specificParentData.links.push(newLink);
|
|
1284
1284
|
try {
|
|
1285
|
-
const
|
|
1286
|
-
if (
|
|
1285
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
1286
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
1287
1287
|
const viewFilePayload = {
|
|
1288
1288
|
parent_dbs: sceneDataRef.current.parent_dbs,
|
|
1289
1289
|
nodes: sceneDataRef.current.nodes,
|
|
@@ -1312,7 +1312,7 @@ var userActionHandlers = {
|
|
|
1312
1312
|
);
|
|
1313
1313
|
}
|
|
1314
1314
|
graphDataRef.current[parentFileId] = specificParentData;
|
|
1315
|
-
if (
|
|
1315
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
1316
1316
|
sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
|
|
1317
1317
|
}
|
|
1318
1318
|
const finalPosition = stateRef.current.ghostElements.node.position.clone();
|
|
@@ -1560,8 +1560,8 @@ var userActionHandlers = {
|
|
|
1560
1560
|
target: targetNodeData.id
|
|
1561
1561
|
};
|
|
1562
1562
|
try {
|
|
1563
|
-
const
|
|
1564
|
-
if (
|
|
1563
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
1564
|
+
if (isView && parentFileIdToSave === context.sceneConfigId) {
|
|
1565
1565
|
const specificParentData = graphDataRef.current[context.sceneConfigId];
|
|
1566
1566
|
specificParentData.links.push(newLink);
|
|
1567
1567
|
const viewFilePayload = {
|
|
@@ -1723,8 +1723,8 @@ var userActionHandlers = {
|
|
|
1723
1723
|
};
|
|
1724
1724
|
const saveParentData = async (fileId, fileOwnerId, data) => {
|
|
1725
1725
|
var _a;
|
|
1726
|
-
const
|
|
1727
|
-
if (
|
|
1726
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
1727
|
+
if (isView && fileId === context.sceneConfigId) {
|
|
1728
1728
|
const viewFilePayload = {
|
|
1729
1729
|
parent_dbs: sceneDataRef.current.parent_dbs,
|
|
1730
1730
|
nodes: sceneDataRef.current.nodes,
|
|
@@ -1886,8 +1886,8 @@ var userActionHandlers = {
|
|
|
1886
1886
|
specificParentData.links = newLinks;
|
|
1887
1887
|
let filenameToSave;
|
|
1888
1888
|
let payloadToSave;
|
|
1889
|
-
const
|
|
1890
|
-
if (
|
|
1889
|
+
const isView = ((_g = context.viewType) == null ? void 0 : _g.toLowerCase()) === "view";
|
|
1890
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
1891
1891
|
filenameToSave = context.sceneSaveUrl;
|
|
1892
1892
|
sceneDataRef.current.links = sceneDataRef.current.links.filter(
|
|
1893
1893
|
(l) => String(l.id) !== String(linkIdToDelete)
|
|
@@ -1903,7 +1903,7 @@ var userActionHandlers = {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
try {
|
|
1905
1905
|
await context.actions.save_view_data(filenameToSave, payloadToSave);
|
|
1906
|
-
if (
|
|
1906
|
+
if (isView && parentFileId === context.sceneConfigId && context.actions.delete_quest_link_firestore) {
|
|
1907
1907
|
await context.actions.delete_quest_link_firestore(
|
|
1908
1908
|
context.ownerId,
|
|
1909
1909
|
context.sceneConfigId,
|
|
@@ -2123,8 +2123,8 @@ var userActionHandlers = {
|
|
|
2123
2123
|
);
|
|
2124
2124
|
let filenameToSave;
|
|
2125
2125
|
let payloadToSave;
|
|
2126
|
-
const
|
|
2127
|
-
if (
|
|
2126
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2127
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2128
2128
|
filenameToSave = context.sceneSaveUrl;
|
|
2129
2129
|
const strNodesToDelete = Array.from(nodesToDelete).map(String);
|
|
2130
2130
|
const strLinksToDelete = Array.from(linksToDelete).map(String);
|
|
@@ -2238,8 +2238,8 @@ var userActionHandlers = {
|
|
|
2238
2238
|
specificParentData.links = newLinks;
|
|
2239
2239
|
let filenameToSave;
|
|
2240
2240
|
let payloadToSave;
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2241
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2242
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2243
2243
|
filenameToSave = context.sceneSaveUrl;
|
|
2244
2244
|
const newVisualNodes = sceneDataRef.current.nodes.filter(
|
|
2245
2245
|
(n) => String(n.id) !== strNodeId
|
|
@@ -2305,6 +2305,7 @@ var userActionHandlers = {
|
|
|
2305
2305
|
var _a, _b, _c, _d;
|
|
2306
2306
|
const { graphDataRef, sceneDataRef, stateRef, setters } = context;
|
|
2307
2307
|
if (!graphDataRef.current || !sceneDataRef.current) return;
|
|
2308
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2308
2309
|
const {
|
|
2309
2310
|
_baseEmissiveIntensity,
|
|
2310
2311
|
_baseScale,
|
|
@@ -2349,7 +2350,7 @@ var userActionHandlers = {
|
|
|
2349
2350
|
const oldNode = specificParentData.nodes[nodeIndex];
|
|
2350
2351
|
const isNewDone = oldNode.status !== "Done" && nodeToSave.status === "Done";
|
|
2351
2352
|
specificParentData.nodes[nodeIndex] = { ...nodeToSave };
|
|
2352
|
-
if (isNewDone && nodeToSave.is_quest && ((
|
|
2353
|
+
if (isNewDone && nodeToSave.is_quest && ((_b = nodeToSave.recurrence_config) == null ? void 0 : _b.enabled)) {
|
|
2353
2354
|
const nextDateObj = calculateNextRecurrenceDate(
|
|
2354
2355
|
nodeToSave.recurrence_config
|
|
2355
2356
|
);
|
|
@@ -2394,7 +2395,7 @@ var userActionHandlers = {
|
|
|
2394
2395
|
],
|
|
2395
2396
|
version_node: {
|
|
2396
2397
|
is_version: true,
|
|
2397
|
-
parent_node: ((
|
|
2398
|
+
parent_node: ((_c = nodeToSave.version_node) == null ? void 0 : _c.parent_node) || nodeToSave.id
|
|
2398
2399
|
},
|
|
2399
2400
|
reviewStack: (nodeToSave.reviewStack || []).map((r) => ({
|
|
2400
2401
|
...r,
|
|
@@ -2402,7 +2403,7 @@ var userActionHandlers = {
|
|
|
2402
2403
|
})),
|
|
2403
2404
|
recurrence_config: nextRecurrenceConfig
|
|
2404
2405
|
};
|
|
2405
|
-
const rootId = ((
|
|
2406
|
+
const rootId = ((_d = nodeToSave.version_node) == null ? void 0 : _d.parent_node) || nodeToSave.id;
|
|
2406
2407
|
const nextQuestLink = {
|
|
2407
2408
|
id: `link_${import_short_uuid.default.generate()}`,
|
|
2408
2409
|
source: rootId,
|
|
@@ -2452,8 +2453,7 @@ var userActionHandlers = {
|
|
|
2452
2453
|
}
|
|
2453
2454
|
}
|
|
2454
2455
|
try {
|
|
2455
|
-
|
|
2456
|
-
if (isView2 && parentFileId === context.sceneConfigId) {
|
|
2456
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2457
2457
|
const visualNodeIndex = sceneDataRef.current.nodes.findIndex(
|
|
2458
2458
|
(n) => String(n.id) === String(nodeToSave.id)
|
|
2459
2459
|
);
|
|
@@ -2492,7 +2492,7 @@ var userActionHandlers = {
|
|
|
2492
2492
|
);
|
|
2493
2493
|
}
|
|
2494
2494
|
graphDataRef.current[parentFileId] = specificParentData;
|
|
2495
|
-
if (
|
|
2495
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2496
2496
|
sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
|
|
2497
2497
|
}
|
|
2498
2498
|
updateExistingNodeVisuals(stateRef.current, nodeToSave);
|
|
@@ -2545,8 +2545,8 @@ var userActionHandlers = {
|
|
|
2545
2545
|
return;
|
|
2546
2546
|
}
|
|
2547
2547
|
try {
|
|
2548
|
-
const
|
|
2549
|
-
if (
|
|
2548
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2549
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2550
2550
|
const viewFilePayload = {
|
|
2551
2551
|
parent_dbs: sceneDataRef.current.parent_dbs,
|
|
2552
2552
|
nodes: sceneDataRef.current.nodes,
|
|
@@ -20181,8 +20181,8 @@ function XViewScene({
|
|
|
20181
20181
|
if (!sceneDataRef.current) return;
|
|
20182
20182
|
sceneDataRef.current.milestones = newMilestones;
|
|
20183
20183
|
setSceneVersion((v) => v + 1);
|
|
20184
|
-
const
|
|
20185
|
-
if (!
|
|
20184
|
+
const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
|
|
20185
|
+
if (!isView || !save_view_data || !sceneSaveUrl) return;
|
|
20186
20186
|
const questFileData = {
|
|
20187
20187
|
nodes: ((_b2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _b2.nodes) || sceneDataRef.current.quest_nodes || [],
|
|
20188
20188
|
links: ((_c2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _c2.links) || sceneDataRef.current.quest_links || [],
|
|
@@ -20229,7 +20229,7 @@ function XViewScene({
|
|
|
20229
20229
|
});
|
|
20230
20230
|
sceneDataRef.current.nodes = currentNodes;
|
|
20231
20231
|
sceneDataRef.current.links = currentLinks;
|
|
20232
|
-
const
|
|
20232
|
+
const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
|
|
20233
20233
|
const sceneFileData = {
|
|
20234
20234
|
...sceneDataRef.current,
|
|
20235
20235
|
nodes: currentNodes,
|
|
@@ -20351,8 +20351,8 @@ function XViewScene({
|
|
|
20351
20351
|
if (event.key.toLowerCase() === "q") {
|
|
20352
20352
|
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_b2 = context.versionMode) == null ? void 0 : _b2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !isMilestoneManagerOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
20353
20353
|
if (isUiClear) {
|
|
20354
|
-
const
|
|
20355
|
-
if (!
|
|
20354
|
+
const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
|
|
20355
|
+
if (!isView) return;
|
|
20356
20356
|
const {
|
|
20357
20357
|
graphGroup,
|
|
20358
20358
|
glowTexture,
|
|
@@ -21137,11 +21137,11 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
|
|
|
21137
21137
|
parentDbObjects.push({ db_id: scene_config, owner_id });
|
|
21138
21138
|
}
|
|
21139
21139
|
}
|
|
21140
|
-
const
|
|
21140
|
+
const isView = type && type.toLowerCase() === "view";
|
|
21141
21141
|
const parentResponsesPromises = parentDbObjects.map(
|
|
21142
21142
|
(db_info) => db_services.get_file(`x_view_dbs/${db_info.owner_id}/${db_info.db_id}`)
|
|
21143
21143
|
);
|
|
21144
|
-
if (
|
|
21144
|
+
if (isView) {
|
|
21145
21145
|
const questFetchWithMigrationPromise = (async () => {
|
|
21146
21146
|
try {
|
|
21147
21147
|
const questsResponse = await db_services.get_view_quests_firestore(
|
|
@@ -21183,7 +21183,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
|
|
|
21183
21183
|
let questDataObj = null;
|
|
21184
21184
|
for (let i = 0; i < parentResponsesResults.length; i++) {
|
|
21185
21185
|
const result = parentResponsesResults[i];
|
|
21186
|
-
if (
|
|
21186
|
+
if (isView && i === parentResponsesResults.length - 1) {
|
|
21187
21187
|
if (result.status === "fulfilled" && ((_a = result.value) == null ? void 0 : _a.success)) {
|
|
21188
21188
|
questDataObj = result.value.data;
|
|
21189
21189
|
if (result.value.quest_counter !== void 0) {
|
|
@@ -21205,7 +21205,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
|
|
|
21205
21205
|
const currentQuestNodes = (questDataObj == null ? void 0 : questDataObj.nodes) || [];
|
|
21206
21206
|
const currentQuestLinks = (questDataObj == null ? void 0 : questDataObj.links) || [];
|
|
21207
21207
|
const currentMilestones = (questDataObj == null ? void 0 : questDataObj.milestones) || [];
|
|
21208
|
-
if (
|
|
21208
|
+
if (isView) {
|
|
21209
21209
|
parentData[scene_config] = {
|
|
21210
21210
|
dataset_name: "Quests Internas (View)",
|
|
21211
21211
|
nodes: currentQuestNodes,
|
package/dist/index.mjs
CHANGED
|
@@ -1243,8 +1243,8 @@ var userActionHandlers = {
|
|
|
1243
1243
|
specificParentData.nodes.push(newNode);
|
|
1244
1244
|
specificParentData.links.push(newLink);
|
|
1245
1245
|
try {
|
|
1246
|
-
const
|
|
1247
|
-
if (
|
|
1246
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
1247
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
1248
1248
|
const viewFilePayload = {
|
|
1249
1249
|
parent_dbs: sceneDataRef.current.parent_dbs,
|
|
1250
1250
|
nodes: sceneDataRef.current.nodes,
|
|
@@ -1273,7 +1273,7 @@ var userActionHandlers = {
|
|
|
1273
1273
|
);
|
|
1274
1274
|
}
|
|
1275
1275
|
graphDataRef.current[parentFileId] = specificParentData;
|
|
1276
|
-
if (
|
|
1276
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
1277
1277
|
sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
|
|
1278
1278
|
}
|
|
1279
1279
|
const finalPosition = stateRef.current.ghostElements.node.position.clone();
|
|
@@ -1521,8 +1521,8 @@ var userActionHandlers = {
|
|
|
1521
1521
|
target: targetNodeData.id
|
|
1522
1522
|
};
|
|
1523
1523
|
try {
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1524
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
1525
|
+
if (isView && parentFileIdToSave === context.sceneConfigId) {
|
|
1526
1526
|
const specificParentData = graphDataRef.current[context.sceneConfigId];
|
|
1527
1527
|
specificParentData.links.push(newLink);
|
|
1528
1528
|
const viewFilePayload = {
|
|
@@ -1684,8 +1684,8 @@ var userActionHandlers = {
|
|
|
1684
1684
|
};
|
|
1685
1685
|
const saveParentData = async (fileId, fileOwnerId, data) => {
|
|
1686
1686
|
var _a;
|
|
1687
|
-
const
|
|
1688
|
-
if (
|
|
1687
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
1688
|
+
if (isView && fileId === context.sceneConfigId) {
|
|
1689
1689
|
const viewFilePayload = {
|
|
1690
1690
|
parent_dbs: sceneDataRef.current.parent_dbs,
|
|
1691
1691
|
nodes: sceneDataRef.current.nodes,
|
|
@@ -1847,8 +1847,8 @@ var userActionHandlers = {
|
|
|
1847
1847
|
specificParentData.links = newLinks;
|
|
1848
1848
|
let filenameToSave;
|
|
1849
1849
|
let payloadToSave;
|
|
1850
|
-
const
|
|
1851
|
-
if (
|
|
1850
|
+
const isView = ((_g = context.viewType) == null ? void 0 : _g.toLowerCase()) === "view";
|
|
1851
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
1852
1852
|
filenameToSave = context.sceneSaveUrl;
|
|
1853
1853
|
sceneDataRef.current.links = sceneDataRef.current.links.filter(
|
|
1854
1854
|
(l) => String(l.id) !== String(linkIdToDelete)
|
|
@@ -1864,7 +1864,7 @@ var userActionHandlers = {
|
|
|
1864
1864
|
}
|
|
1865
1865
|
try {
|
|
1866
1866
|
await context.actions.save_view_data(filenameToSave, payloadToSave);
|
|
1867
|
-
if (
|
|
1867
|
+
if (isView && parentFileId === context.sceneConfigId && context.actions.delete_quest_link_firestore) {
|
|
1868
1868
|
await context.actions.delete_quest_link_firestore(
|
|
1869
1869
|
context.ownerId,
|
|
1870
1870
|
context.sceneConfigId,
|
|
@@ -2084,8 +2084,8 @@ var userActionHandlers = {
|
|
|
2084
2084
|
);
|
|
2085
2085
|
let filenameToSave;
|
|
2086
2086
|
let payloadToSave;
|
|
2087
|
-
const
|
|
2088
|
-
if (
|
|
2087
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2088
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2089
2089
|
filenameToSave = context.sceneSaveUrl;
|
|
2090
2090
|
const strNodesToDelete = Array.from(nodesToDelete).map(String);
|
|
2091
2091
|
const strLinksToDelete = Array.from(linksToDelete).map(String);
|
|
@@ -2199,8 +2199,8 @@ var userActionHandlers = {
|
|
|
2199
2199
|
specificParentData.links = newLinks;
|
|
2200
2200
|
let filenameToSave;
|
|
2201
2201
|
let payloadToSave;
|
|
2202
|
-
const
|
|
2203
|
-
if (
|
|
2202
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2203
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2204
2204
|
filenameToSave = context.sceneSaveUrl;
|
|
2205
2205
|
const newVisualNodes = sceneDataRef.current.nodes.filter(
|
|
2206
2206
|
(n) => String(n.id) !== strNodeId
|
|
@@ -2266,6 +2266,7 @@ var userActionHandlers = {
|
|
|
2266
2266
|
var _a, _b, _c, _d;
|
|
2267
2267
|
const { graphDataRef, sceneDataRef, stateRef, setters } = context;
|
|
2268
2268
|
if (!graphDataRef.current || !sceneDataRef.current) return;
|
|
2269
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2269
2270
|
const {
|
|
2270
2271
|
_baseEmissiveIntensity,
|
|
2271
2272
|
_baseScale,
|
|
@@ -2310,7 +2311,7 @@ var userActionHandlers = {
|
|
|
2310
2311
|
const oldNode = specificParentData.nodes[nodeIndex];
|
|
2311
2312
|
const isNewDone = oldNode.status !== "Done" && nodeToSave.status === "Done";
|
|
2312
2313
|
specificParentData.nodes[nodeIndex] = { ...nodeToSave };
|
|
2313
|
-
if (isNewDone && nodeToSave.is_quest && ((
|
|
2314
|
+
if (isNewDone && nodeToSave.is_quest && ((_b = nodeToSave.recurrence_config) == null ? void 0 : _b.enabled)) {
|
|
2314
2315
|
const nextDateObj = calculateNextRecurrenceDate(
|
|
2315
2316
|
nodeToSave.recurrence_config
|
|
2316
2317
|
);
|
|
@@ -2355,7 +2356,7 @@ var userActionHandlers = {
|
|
|
2355
2356
|
],
|
|
2356
2357
|
version_node: {
|
|
2357
2358
|
is_version: true,
|
|
2358
|
-
parent_node: ((
|
|
2359
|
+
parent_node: ((_c = nodeToSave.version_node) == null ? void 0 : _c.parent_node) || nodeToSave.id
|
|
2359
2360
|
},
|
|
2360
2361
|
reviewStack: (nodeToSave.reviewStack || []).map((r) => ({
|
|
2361
2362
|
...r,
|
|
@@ -2363,7 +2364,7 @@ var userActionHandlers = {
|
|
|
2363
2364
|
})),
|
|
2364
2365
|
recurrence_config: nextRecurrenceConfig
|
|
2365
2366
|
};
|
|
2366
|
-
const rootId = ((
|
|
2367
|
+
const rootId = ((_d = nodeToSave.version_node) == null ? void 0 : _d.parent_node) || nodeToSave.id;
|
|
2367
2368
|
const nextQuestLink = {
|
|
2368
2369
|
id: `link_${short.generate()}`,
|
|
2369
2370
|
source: rootId,
|
|
@@ -2413,8 +2414,7 @@ var userActionHandlers = {
|
|
|
2413
2414
|
}
|
|
2414
2415
|
}
|
|
2415
2416
|
try {
|
|
2416
|
-
|
|
2417
|
-
if (isView2 && parentFileId === context.sceneConfigId) {
|
|
2417
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2418
2418
|
const visualNodeIndex = sceneDataRef.current.nodes.findIndex(
|
|
2419
2419
|
(n) => String(n.id) === String(nodeToSave.id)
|
|
2420
2420
|
);
|
|
@@ -2453,7 +2453,7 @@ var userActionHandlers = {
|
|
|
2453
2453
|
);
|
|
2454
2454
|
}
|
|
2455
2455
|
graphDataRef.current[parentFileId] = specificParentData;
|
|
2456
|
-
if (
|
|
2456
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2457
2457
|
sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
|
|
2458
2458
|
}
|
|
2459
2459
|
updateExistingNodeVisuals(stateRef.current, nodeToSave);
|
|
@@ -2506,8 +2506,8 @@ var userActionHandlers = {
|
|
|
2506
2506
|
return;
|
|
2507
2507
|
}
|
|
2508
2508
|
try {
|
|
2509
|
-
const
|
|
2510
|
-
if (
|
|
2509
|
+
const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
|
|
2510
|
+
if (isView && parentFileId === context.sceneConfigId) {
|
|
2511
2511
|
const viewFilePayload = {
|
|
2512
2512
|
parent_dbs: sceneDataRef.current.parent_dbs,
|
|
2513
2513
|
nodes: sceneDataRef.current.nodes,
|
|
@@ -20244,8 +20244,8 @@ function XViewScene({
|
|
|
20244
20244
|
if (!sceneDataRef.current) return;
|
|
20245
20245
|
sceneDataRef.current.milestones = newMilestones;
|
|
20246
20246
|
setSceneVersion((v) => v + 1);
|
|
20247
|
-
const
|
|
20248
|
-
if (!
|
|
20247
|
+
const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
|
|
20248
|
+
if (!isView || !save_view_data || !sceneSaveUrl) return;
|
|
20249
20249
|
const questFileData = {
|
|
20250
20250
|
nodes: ((_b2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _b2.nodes) || sceneDataRef.current.quest_nodes || [],
|
|
20251
20251
|
links: ((_c2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _c2.links) || sceneDataRef.current.quest_links || [],
|
|
@@ -20292,7 +20292,7 @@ function XViewScene({
|
|
|
20292
20292
|
});
|
|
20293
20293
|
sceneDataRef.current.nodes = currentNodes;
|
|
20294
20294
|
sceneDataRef.current.links = currentLinks;
|
|
20295
|
-
const
|
|
20295
|
+
const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
|
|
20296
20296
|
const sceneFileData = {
|
|
20297
20297
|
...sceneDataRef.current,
|
|
20298
20298
|
nodes: currentNodes,
|
|
@@ -20414,8 +20414,8 @@ function XViewScene({
|
|
|
20414
20414
|
if (event.key.toLowerCase() === "q") {
|
|
20415
20415
|
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_b2 = context.versionMode) == null ? void 0 : _b2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !isMilestoneManagerOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
20416
20416
|
if (isUiClear) {
|
|
20417
|
-
const
|
|
20418
|
-
if (!
|
|
20417
|
+
const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
|
|
20418
|
+
if (!isView) return;
|
|
20419
20419
|
const {
|
|
20420
20420
|
graphGroup,
|
|
20421
20421
|
glowTexture,
|
|
@@ -21200,11 +21200,11 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
|
|
|
21200
21200
|
parentDbObjects.push({ db_id: scene_config, owner_id });
|
|
21201
21201
|
}
|
|
21202
21202
|
}
|
|
21203
|
-
const
|
|
21203
|
+
const isView = type && type.toLowerCase() === "view";
|
|
21204
21204
|
const parentResponsesPromises = parentDbObjects.map(
|
|
21205
21205
|
(db_info) => db_services.get_file(`x_view_dbs/${db_info.owner_id}/${db_info.db_id}`)
|
|
21206
21206
|
);
|
|
21207
|
-
if (
|
|
21207
|
+
if (isView) {
|
|
21208
21208
|
const questFetchWithMigrationPromise = (async () => {
|
|
21209
21209
|
try {
|
|
21210
21210
|
const questsResponse = await db_services.get_view_quests_firestore(
|
|
@@ -21246,7 +21246,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
|
|
|
21246
21246
|
let questDataObj = null;
|
|
21247
21247
|
for (let i = 0; i < parentResponsesResults.length; i++) {
|
|
21248
21248
|
const result = parentResponsesResults[i];
|
|
21249
|
-
if (
|
|
21249
|
+
if (isView && i === parentResponsesResults.length - 1) {
|
|
21250
21250
|
if (result.status === "fulfilled" && ((_a = result.value) == null ? void 0 : _a.success)) {
|
|
21251
21251
|
questDataObj = result.value.data;
|
|
21252
21252
|
if (result.value.quest_counter !== void 0) {
|
|
@@ -21268,7 +21268,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
|
|
|
21268
21268
|
const currentQuestNodes = (questDataObj == null ? void 0 : questDataObj.nodes) || [];
|
|
21269
21269
|
const currentQuestLinks = (questDataObj == null ? void 0 : questDataObj.links) || [];
|
|
21270
21270
|
const currentMilestones = (questDataObj == null ? void 0 : questDataObj.milestones) || [];
|
|
21271
|
-
if (
|
|
21271
|
+
if (isView) {
|
|
21272
21272
|
parentData[scene_config] = {
|
|
21273
21273
|
dataset_name: "Quests Internas (View)",
|
|
21274
21274
|
nodes: currentQuestNodes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.8-dev.
|
|
3
|
+
"version": "1.2.8-dev.15",
|
|
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",
|