@lv-x-software-house/x_view 1.2.8-dev.13 → 1.2.8-dev.14

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 CHANGED
@@ -1282,8 +1282,8 @@ var userActionHandlers = {
1282
1282
  specificParentData.nodes.push(newNode);
1283
1283
  specificParentData.links.push(newLink);
1284
1284
  try {
1285
- const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1286
- if (isView && parentFileId === context.sceneConfigId) {
1285
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1286
+ if (isView2 && 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 (isView && parentFileId === context.sceneConfigId) {
1315
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1564
- if (isView && parentFileIdToSave === context.sceneConfigId) {
1563
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1564
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1727
- if (isView && fileId === context.sceneConfigId) {
1726
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1727
+ if (isView2 && 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 isView = ((_g = context.viewType) == null ? void 0 : _g.toLowerCase()) === "view";
1890
- if (isView && parentFileId === context.sceneConfigId) {
1889
+ const isView2 = ((_g = context.viewType) == null ? void 0 : _g.toLowerCase()) === "view";
1890
+ if (isView2 && 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 (isView && parentFileId === context.sceneConfigId && context.actions.delete_quest_link_firestore) {
1906
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2127
- if (isView && parentFileId === context.sceneConfigId) {
2126
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2127
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2242
- if (isView && parentFileId === context.sceneConfigId) {
2241
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2242
+ if (isView2 && parentFileId === context.sceneConfigId) {
2243
2243
  filenameToSave = context.sceneSaveUrl;
2244
2244
  const newVisualNodes = sceneDataRef.current.nodes.filter(
2245
2245
  (n) => String(n.id) !== strNodeId
@@ -2302,7 +2302,7 @@ var userActionHandlers = {
2302
2302
  }
2303
2303
  },
2304
2304
  handleSaveNodeDetails: async (context, updatedNode, keepOpen = false) => {
2305
- var _a, _b, _c;
2305
+ var _a, _b, _c, _d;
2306
2306
  const { graphDataRef, sceneDataRef, stateRef, setters } = context;
2307
2307
  if (!graphDataRef.current || !sceneDataRef.current) return;
2308
2308
  const {
@@ -2402,16 +2402,38 @@ var userActionHandlers = {
2402
2402
  })),
2403
2403
  recurrence_config: nextRecurrenceConfig
2404
2404
  };
2405
+ const rootId = ((_c = nodeToSave.version_node) == null ? void 0 : _c.parent_node) || nodeToSave.id;
2406
+ const nextQuestLink = {
2407
+ id: `link_${import_short_uuid.default.generate()}`,
2408
+ source: rootId,
2409
+ target: nextQuestNode.id
2410
+ };
2405
2411
  await context.actions.upsert_quest_firestore(
2406
2412
  context.ownerId,
2407
2413
  context.sceneConfigId,
2408
2414
  nextQuestNode
2409
2415
  );
2416
+ await context.actions.upsert_quest_link_firestore(
2417
+ context.ownerId,
2418
+ context.sceneConfigId,
2419
+ nextQuestLink
2420
+ );
2410
2421
  await context.actions.update_view_counter(
2411
2422
  context.ownerId,
2412
2423
  context.sceneConfigId,
2413
2424
  nextCounter
2414
2425
  );
2426
+ if (specificParentData.links) {
2427
+ specificParentData.links.push(nextQuestLink);
2428
+ }
2429
+ if (specificParentData.nodes) {
2430
+ specificParentData.nodes.push(nextQuestNode);
2431
+ }
2432
+ if (isView && parentFileId === context.sceneConfigId) {
2433
+ if (!sceneDataRef.current.links) sceneDataRef.current.links = [];
2434
+ sceneDataRef.current.links.push(nextQuestLink);
2435
+ sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
2436
+ }
2415
2437
  if (stateRef.current.nodeObjects[String(nodeToSave.id)]) {
2416
2438
  const oldMeshPosition = stateRef.current.nodeObjects[String(nodeToSave.id)].position.clone();
2417
2439
  setTimeout(() => {
@@ -2430,8 +2452,8 @@ var userActionHandlers = {
2430
2452
  }
2431
2453
  }
2432
2454
  try {
2433
- const isView = ((_c = context.viewType) == null ? void 0 : _c.toLowerCase()) === "view";
2434
- if (isView && parentFileId === context.sceneConfigId) {
2455
+ const isView2 = ((_d = context.viewType) == null ? void 0 : _d.toLowerCase()) === "view";
2456
+ if (isView2 && parentFileId === context.sceneConfigId) {
2435
2457
  const visualNodeIndex = sceneDataRef.current.nodes.findIndex(
2436
2458
  (n) => String(n.id) === String(nodeToSave.id)
2437
2459
  );
@@ -2470,7 +2492,7 @@ var userActionHandlers = {
2470
2492
  );
2471
2493
  }
2472
2494
  graphDataRef.current[parentFileId] = specificParentData;
2473
- if (isView && parentFileId === context.sceneConfigId) {
2495
+ if (isView2 && parentFileId === context.sceneConfigId) {
2474
2496
  sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
2475
2497
  }
2476
2498
  updateExistingNodeVisuals(stateRef.current, nodeToSave);
@@ -2523,8 +2545,8 @@ var userActionHandlers = {
2523
2545
  return;
2524
2546
  }
2525
2547
  try {
2526
- const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2527
- if (isView && parentFileId === context.sceneConfigId) {
2548
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2549
+ if (isView2 && parentFileId === context.sceneConfigId) {
2528
2550
  const viewFilePayload = {
2529
2551
  parent_dbs: sceneDataRef.current.parent_dbs,
2530
2552
  nodes: sceneDataRef.current.nodes,
@@ -20159,8 +20181,8 @@ function XViewScene({
20159
20181
  if (!sceneDataRef.current) return;
20160
20182
  sceneDataRef.current.milestones = newMilestones;
20161
20183
  setSceneVersion((v) => v + 1);
20162
- const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20163
- if (!isView || !save_view_data || !sceneSaveUrl) return;
20184
+ const isView2 = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20185
+ if (!isView2 || !save_view_data || !sceneSaveUrl) return;
20164
20186
  const questFileData = {
20165
20187
  nodes: ((_b2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _b2.nodes) || sceneDataRef.current.quest_nodes || [],
20166
20188
  links: ((_c2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _c2.links) || sceneDataRef.current.quest_links || [],
@@ -20207,7 +20229,7 @@ function XViewScene({
20207
20229
  });
20208
20230
  sceneDataRef.current.nodes = currentNodes;
20209
20231
  sceneDataRef.current.links = currentLinks;
20210
- const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20232
+ const isView2 = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20211
20233
  const sceneFileData = {
20212
20234
  ...sceneDataRef.current,
20213
20235
  nodes: currentNodes,
@@ -20329,8 +20351,8 @@ function XViewScene({
20329
20351
  if (event.key.toLowerCase() === "q") {
20330
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;
20331
20353
  if (isUiClear) {
20332
- const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
20333
- if (!isView) return;
20354
+ const isView2 = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
20355
+ if (!isView2) return;
20334
20356
  const {
20335
20357
  graphGroup,
20336
20358
  glowTexture,
@@ -21115,11 +21137,11 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
21115
21137
  parentDbObjects.push({ db_id: scene_config, owner_id });
21116
21138
  }
21117
21139
  }
21118
- const isView = type && type.toLowerCase() === "view";
21140
+ const isView2 = type && type.toLowerCase() === "view";
21119
21141
  const parentResponsesPromises = parentDbObjects.map(
21120
21142
  (db_info) => db_services.get_file(`x_view_dbs/${db_info.owner_id}/${db_info.db_id}`)
21121
21143
  );
21122
- if (isView) {
21144
+ if (isView2) {
21123
21145
  const questFetchWithMigrationPromise = (async () => {
21124
21146
  try {
21125
21147
  const questsResponse = await db_services.get_view_quests_firestore(
@@ -21161,7 +21183,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
21161
21183
  let questDataObj = null;
21162
21184
  for (let i = 0; i < parentResponsesResults.length; i++) {
21163
21185
  const result = parentResponsesResults[i];
21164
- if (isView && i === parentResponsesResults.length - 1) {
21186
+ if (isView2 && i === parentResponsesResults.length - 1) {
21165
21187
  if (result.status === "fulfilled" && ((_a = result.value) == null ? void 0 : _a.success)) {
21166
21188
  questDataObj = result.value.data;
21167
21189
  if (result.value.quest_counter !== void 0) {
@@ -21183,7 +21205,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
21183
21205
  const currentQuestNodes = (questDataObj == null ? void 0 : questDataObj.nodes) || [];
21184
21206
  const currentQuestLinks = (questDataObj == null ? void 0 : questDataObj.links) || [];
21185
21207
  const currentMilestones = (questDataObj == null ? void 0 : questDataObj.milestones) || [];
21186
- if (isView) {
21208
+ if (isView2) {
21187
21209
  parentData[scene_config] = {
21188
21210
  dataset_name: "Quests Internas (View)",
21189
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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1247
- if (isView && parentFileId === context.sceneConfigId) {
1246
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1247
+ if (isView2 && 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 (isView && parentFileId === context.sceneConfigId) {
1276
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1525
- if (isView && parentFileIdToSave === context.sceneConfigId) {
1524
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1525
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1688
- if (isView && fileId === context.sceneConfigId) {
1687
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
1688
+ if (isView2 && 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 isView = ((_g = context.viewType) == null ? void 0 : _g.toLowerCase()) === "view";
1851
- if (isView && parentFileId === context.sceneConfigId) {
1850
+ const isView2 = ((_g = context.viewType) == null ? void 0 : _g.toLowerCase()) === "view";
1851
+ if (isView2 && 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 (isView && parentFileId === context.sceneConfigId && context.actions.delete_quest_link_firestore) {
1867
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2088
- if (isView && parentFileId === context.sceneConfigId) {
2087
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2088
+ if (isView2 && 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 isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2203
- if (isView && parentFileId === context.sceneConfigId) {
2202
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2203
+ if (isView2 && parentFileId === context.sceneConfigId) {
2204
2204
  filenameToSave = context.sceneSaveUrl;
2205
2205
  const newVisualNodes = sceneDataRef.current.nodes.filter(
2206
2206
  (n) => String(n.id) !== strNodeId
@@ -2263,7 +2263,7 @@ var userActionHandlers = {
2263
2263
  }
2264
2264
  },
2265
2265
  handleSaveNodeDetails: async (context, updatedNode, keepOpen = false) => {
2266
- var _a, _b, _c;
2266
+ var _a, _b, _c, _d;
2267
2267
  const { graphDataRef, sceneDataRef, stateRef, setters } = context;
2268
2268
  if (!graphDataRef.current || !sceneDataRef.current) return;
2269
2269
  const {
@@ -2363,16 +2363,38 @@ var userActionHandlers = {
2363
2363
  })),
2364
2364
  recurrence_config: nextRecurrenceConfig
2365
2365
  };
2366
+ const rootId = ((_c = nodeToSave.version_node) == null ? void 0 : _c.parent_node) || nodeToSave.id;
2367
+ const nextQuestLink = {
2368
+ id: `link_${short.generate()}`,
2369
+ source: rootId,
2370
+ target: nextQuestNode.id
2371
+ };
2366
2372
  await context.actions.upsert_quest_firestore(
2367
2373
  context.ownerId,
2368
2374
  context.sceneConfigId,
2369
2375
  nextQuestNode
2370
2376
  );
2377
+ await context.actions.upsert_quest_link_firestore(
2378
+ context.ownerId,
2379
+ context.sceneConfigId,
2380
+ nextQuestLink
2381
+ );
2371
2382
  await context.actions.update_view_counter(
2372
2383
  context.ownerId,
2373
2384
  context.sceneConfigId,
2374
2385
  nextCounter
2375
2386
  );
2387
+ if (specificParentData.links) {
2388
+ specificParentData.links.push(nextQuestLink);
2389
+ }
2390
+ if (specificParentData.nodes) {
2391
+ specificParentData.nodes.push(nextQuestNode);
2392
+ }
2393
+ if (isView && parentFileId === context.sceneConfigId) {
2394
+ if (!sceneDataRef.current.links) sceneDataRef.current.links = [];
2395
+ sceneDataRef.current.links.push(nextQuestLink);
2396
+ sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
2397
+ }
2376
2398
  if (stateRef.current.nodeObjects[String(nodeToSave.id)]) {
2377
2399
  const oldMeshPosition = stateRef.current.nodeObjects[String(nodeToSave.id)].position.clone();
2378
2400
  setTimeout(() => {
@@ -2391,8 +2413,8 @@ var userActionHandlers = {
2391
2413
  }
2392
2414
  }
2393
2415
  try {
2394
- const isView = ((_c = context.viewType) == null ? void 0 : _c.toLowerCase()) === "view";
2395
- if (isView && parentFileId === context.sceneConfigId) {
2416
+ const isView2 = ((_d = context.viewType) == null ? void 0 : _d.toLowerCase()) === "view";
2417
+ if (isView2 && parentFileId === context.sceneConfigId) {
2396
2418
  const visualNodeIndex = sceneDataRef.current.nodes.findIndex(
2397
2419
  (n) => String(n.id) === String(nodeToSave.id)
2398
2420
  );
@@ -2431,7 +2453,7 @@ var userActionHandlers = {
2431
2453
  );
2432
2454
  }
2433
2455
  graphDataRef.current[parentFileId] = specificParentData;
2434
- if (isView && parentFileId === context.sceneConfigId) {
2456
+ if (isView2 && parentFileId === context.sceneConfigId) {
2435
2457
  sceneDataRef.current.quest_nodes = [...specificParentData.nodes];
2436
2458
  }
2437
2459
  updateExistingNodeVisuals(stateRef.current, nodeToSave);
@@ -2484,8 +2506,8 @@ var userActionHandlers = {
2484
2506
  return;
2485
2507
  }
2486
2508
  try {
2487
- const isView = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2488
- if (isView && parentFileId === context.sceneConfigId) {
2509
+ const isView2 = ((_a = context.viewType) == null ? void 0 : _a.toLowerCase()) === "view";
2510
+ if (isView2 && parentFileId === context.sceneConfigId) {
2489
2511
  const viewFilePayload = {
2490
2512
  parent_dbs: sceneDataRef.current.parent_dbs,
2491
2513
  nodes: sceneDataRef.current.nodes,
@@ -20222,8 +20244,8 @@ function XViewScene({
20222
20244
  if (!sceneDataRef.current) return;
20223
20245
  sceneDataRef.current.milestones = newMilestones;
20224
20246
  setSceneVersion((v) => v + 1);
20225
- const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20226
- if (!isView || !save_view_data || !sceneSaveUrl) return;
20247
+ const isView2 = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20248
+ if (!isView2 || !save_view_data || !sceneSaveUrl) return;
20227
20249
  const questFileData = {
20228
20250
  nodes: ((_b2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _b2.nodes) || sceneDataRef.current.quest_nodes || [],
20229
20251
  links: ((_c2 = parentDataRef.current[sceneConfigId]) == null ? void 0 : _c2.links) || sceneDataRef.current.quest_links || [],
@@ -20270,7 +20292,7 @@ function XViewScene({
20270
20292
  });
20271
20293
  sceneDataRef.current.nodes = currentNodes;
20272
20294
  sceneDataRef.current.links = currentLinks;
20273
- const isView = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20295
+ const isView2 = ((_a2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _a2.toLowerCase()) === "view";
20274
20296
  const sceneFileData = {
20275
20297
  ...sceneDataRef.current,
20276
20298
  nodes: currentNodes,
@@ -20392,8 +20414,8 @@ function XViewScene({
20392
20414
  if (event.key.toLowerCase() === "q") {
20393
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;
20394
20416
  if (isUiClear) {
20395
- const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
20396
- if (!isView) return;
20417
+ const isView2 = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
20418
+ if (!isView2) return;
20397
20419
  const {
20398
20420
  graphGroup,
20399
20421
  glowTexture,
@@ -21178,11 +21200,11 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
21178
21200
  parentDbObjects.push({ db_id: scene_config, owner_id });
21179
21201
  }
21180
21202
  }
21181
- const isView = type && type.toLowerCase() === "view";
21203
+ const isView2 = type && type.toLowerCase() === "view";
21182
21204
  const parentResponsesPromises = parentDbObjects.map(
21183
21205
  (db_info) => db_services.get_file(`x_view_dbs/${db_info.owner_id}/${db_info.db_id}`)
21184
21206
  );
21185
- if (isView) {
21207
+ if (isView2) {
21186
21208
  const questFetchWithMigrationPromise = (async () => {
21187
21209
  try {
21188
21210
  const questsResponse = await db_services.get_view_quests_firestore(
@@ -21224,7 +21246,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
21224
21246
  let questDataObj = null;
21225
21247
  for (let i = 0; i < parentResponsesResults.length; i++) {
21226
21248
  const result = parentResponsesResults[i];
21227
- if (isView && i === parentResponsesResults.length - 1) {
21249
+ if (isView2 && i === parentResponsesResults.length - 1) {
21228
21250
  if (result.status === "fulfilled" && ((_a = result.value) == null ? void 0 : _a.success)) {
21229
21251
  questDataObj = result.value.data;
21230
21252
  if (result.value.quest_counter !== void 0) {
@@ -21246,7 +21268,7 @@ async function get_scene_view_data_logic(db_services, scene_config, owner_id, ty
21246
21268
  const currentQuestNodes = (questDataObj == null ? void 0 : questDataObj.nodes) || [];
21247
21269
  const currentQuestLinks = (questDataObj == null ? void 0 : questDataObj.links) || [];
21248
21270
  const currentMilestones = (questDataObj == null ? void 0 : questDataObj.milestones) || [];
21249
- if (isView) {
21271
+ if (isView2) {
21250
21272
  parentData[scene_config] = {
21251
21273
  dataset_name: "Quests Internas (View)",
21252
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.13",
3
+ "version": "1.2.8-dev.14",
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",