@lv-x-software-house/x_view 1.2.5-dev.20 → 1.2.5-dev.22
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 +749 -456
- package/dist/index.mjs +649 -356
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/XViewScene.jsx
|
|
2
|
-
import
|
|
2
|
+
import React26, {
|
|
3
3
|
useCallback as useCallback4,
|
|
4
4
|
useEffect as useEffect22,
|
|
5
5
|
useRef as useRef19,
|
|
6
|
-
useState as
|
|
6
|
+
useState as useState26,
|
|
7
7
|
useMemo as useMemo12
|
|
8
8
|
} from "react";
|
|
9
9
|
import { useRouter, useSearchParams } from "next/navigation";
|
|
@@ -106,7 +106,8 @@ function ContextMenu({
|
|
|
106
106
|
onClose,
|
|
107
107
|
viewMembers,
|
|
108
108
|
currentUser,
|
|
109
|
-
onStartQuest
|
|
109
|
+
onStartQuest,
|
|
110
|
+
onFinishQuest
|
|
110
111
|
}) {
|
|
111
112
|
var _a, _b, _c;
|
|
112
113
|
const menuRef = useRef(null);
|
|
@@ -307,12 +308,13 @@ function ContextMenu({
|
|
|
307
308
|
});
|
|
308
309
|
};
|
|
309
310
|
const renderMainView = () => {
|
|
310
|
-
var _a2, _b2, _c2;
|
|
311
|
+
var _a2, _b2, _c2, _d;
|
|
311
312
|
const hasVersions = computedVersions.length > 0;
|
|
312
313
|
const canCreateVersion = ability.can("create", "Versioning");
|
|
313
314
|
const canReadVersion = ability.can("read", "Versioning");
|
|
314
315
|
const shouldShowVersioningBtn = canCreateVersion || canReadVersion && hasVersions;
|
|
315
316
|
const canStartQuest = isCurrentNodeQuest && (((_a2 = data.nodeData) == null ? void 0 : _a2.status) !== "In Progress" || ((_b2 = data.nodeData) == null ? void 0 : _b2.assignee_id) !== (currentUser == null ? void 0 : currentUser.id));
|
|
317
|
+
const canFinishQuest = isCurrentNodeQuest && ((_c2 = data.nodeData) == null ? void 0 : _c2.assignee_id) === (currentUser == null ? void 0 : currentUser.id);
|
|
316
318
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_12px_1px_rgba(99,102,241,0.5)]" }), /* @__PURE__ */ React.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "A\xE7\xF5es R\xE1pidas")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1" }, canStartQuest && /* @__PURE__ */ React.createElement(
|
|
317
319
|
"button",
|
|
318
320
|
{
|
|
@@ -325,7 +327,19 @@ function ContextMenu({
|
|
|
325
327
|
},
|
|
326
328
|
/* @__PURE__ */ React.createElement("span", null, "\u{1F680}"),
|
|
327
329
|
/* @__PURE__ */ React.createElement("span", null, "Iniciar Quest")
|
|
328
|
-
),
|
|
330
|
+
), canFinishQuest && /* @__PURE__ */ React.createElement(
|
|
331
|
+
"button",
|
|
332
|
+
{
|
|
333
|
+
onClick: () => {
|
|
334
|
+
onFinishQuest == null ? void 0 : onFinishQuest(data.nodeData);
|
|
335
|
+
onClose();
|
|
336
|
+
},
|
|
337
|
+
className: `w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20 hover:text-emerald-300 transition-colors duration-150 truncate font-semibold shadow-inner`,
|
|
338
|
+
title: "Finalizar esta quest"
|
|
339
|
+
},
|
|
340
|
+
/* @__PURE__ */ React.createElement("span", null, "\u2705"),
|
|
341
|
+
/* @__PURE__ */ React.createElement("span", null, "Finalizar Quest")
|
|
342
|
+
), ability.can("create", "Connection") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartConnection == null ? void 0 : onStartConnection(data.nodeData), className: baseButtonClass, title: "Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", null, "Conectar")), ability.can("create", "Node") && !((_d = data.nodeData) == null ? void 0 : _d.is_quest) && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartCreation == null ? void 0 : onStartCreation(data.nodeData), className: baseButtonClass, title: "Criar e Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "16" }), /* @__PURE__ */ React.createElement("line", { x1: "8", y1: "12", x2: "16", y2: "12" })), /* @__PURE__ */ React.createElement("span", null, "Criar e Conectar")), ability.can("create", "Ancestry") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartAncestryCreation == null ? void 0 : onStartAncestryCreation(data.nodeData), className: baseButtonClass, title: "Criar Ancestralidade" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 20.5c.5-.5.8-1.2.8-2s-.3-1.5-.8-2c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8c-.5.5-.8 1.2-.8 2s.3 1.5.8 2c.5.5 1.2-.8 2 .8s1.5-.3 2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M10 16v-3a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ React.createElement("path", { d: "M14 3.5c.5.5.8 1.2.8 2s-.3 1.5-.8 2c-.5-.5-1.2-.8-2 .8s1.5.3-2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M14 8v3a2 2 0 0 0 2 2h4" })), /* @__PURE__ */ React.createElement("span", null, "Criar Ancestralidade")), shouldShowVersioningBtn && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("versioning"), className: baseButtonClass, title: hasVersions ? "Versionamento" : "Criar Versionamento" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("line", { x1: "6", y1: "3", x2: "6", y2: "15" }), /* @__PURE__ */ React.createElement("circle", { cx: "18", cy: "6", r: "3" }), /* @__PURE__ */ React.createElement("circle", { cx: "6", cy: "18", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })), /* @__PURE__ */ React.createElement("span", null, hasVersions || !canCreateVersion ? "Versionamento" : "Criar Versionamento")), (connections.length > 0 || availableAncestries.length > 0) && ability.can("read", "Connection") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("connections"), className: baseButtonClass, title: "Conex\xF5es" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2z" }), /* @__PURE__ */ React.createElement("path", { d: "M8 12h8" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v8" })), /* @__PURE__ */ React.createElement("span", null, "Conex\xF5es (", totalConnectionsCount, ")"))), /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => {
|
|
329
343
|
onFocusNode == null ? void 0 : onFocusNode(data.nodeData);
|
|
330
344
|
onClose();
|
|
331
345
|
}, className: baseButtonClass, title: "Focar na c\xE2mera" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" })), /* @__PURE__ */ React.createElement("span", null, "Focar neste Node")), /* @__PURE__ */ React.createElement("button", { onClick: (e) => handleCopyLink(e, data.nodeData), className: baseButtonClass, title: "Copiar Link para Compartilhar" }, isLinkCopied ? /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#4ade80", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "20 6 9 17 4 12" })) : /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", { className: isLinkCopied ? "text-green-400" : "" }, isLinkCopied ? "Copiado!" : "Copiar Link")), ability.can("dismiss", "Node") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("button", { onClick: () => onDismissNode == null ? void 0 : onDismissNode(data.nodeData), className: baseButtonClass, title: "Remover da visualiza\xE7\xE3o" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React.createElement("line", { x1: "2", y1: "2", x2: "22", y2: "22" })), /* @__PURE__ */ React.createElement("span", null, "Dismiss")), /* @__PURE__ */ React.createElement("button", { onClick: () => onDismissOtherNodes == null ? void 0 : onDismissOtherNodes(data.nodeData), className: baseButtonClass, title: "Remover outros da visualiza\xE7\xE3o" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }), /* @__PURE__ */ React.createElement("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React.createElement("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }), /* @__PURE__ */ React.createElement("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })), /* @__PURE__ */ React.createElement("span", null, "Dismiss other nodes"))), ability.can("delete", "Node") && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("deleteConfirmation"), className: deleteButtonClass, title: "Excluir Node" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React.createElement("line", { x1: "10", y1: "11", x2: "10", y2: "17" }), /* @__PURE__ */ React.createElement("line", { x1: "14", y1: "11", x2: "14", y2: "17" })), /* @__PURE__ */ React.createElement("span", null, "Excluir Node"))));
|
|
@@ -2730,7 +2744,15 @@ var userActionHandlers = {
|
|
|
2730
2744
|
var _a;
|
|
2731
2745
|
const { graphDataRef, sceneDataRef, stateRef, setters } = context;
|
|
2732
2746
|
if (!graphDataRef.current || !sceneDataRef.current) return;
|
|
2733
|
-
const {
|
|
2747
|
+
const {
|
|
2748
|
+
_baseEmissiveIntensity,
|
|
2749
|
+
_baseScale,
|
|
2750
|
+
labelObject,
|
|
2751
|
+
labelOffset,
|
|
2752
|
+
timelineIntervalBar,
|
|
2753
|
+
timelineEndLabel,
|
|
2754
|
+
...nodeToSave
|
|
2755
|
+
} = updatedNode;
|
|
2734
2756
|
const parentInfo = getParentFileInfoForNode(graphDataRef.current, sceneDataRef.current, nodeToSave.id, context.sceneConfigId, context.ownerId);
|
|
2735
2757
|
if (!parentInfo || !parentInfo.ownerId) {
|
|
2736
2758
|
console.error("N\xE3o foi poss\xEDvel encontrar as informa\xE7\xF5es do arquivo pai (ou ownerId) para o Node a ser atualizado:", nodeToSave.id);
|
|
@@ -8358,8 +8380,116 @@ function InSceneVersionForm({
|
|
|
8358
8380
|
}
|
|
8359
8381
|
|
|
8360
8382
|
// src/components/InSceneQuestForm.jsx
|
|
8361
|
-
import
|
|
8362
|
-
import { FiPlus as
|
|
8383
|
+
import React16, { useState as useState17, useRef as useRef12 } from "react";
|
|
8384
|
+
import { FiPlus as FiPlus6, FiCheck as FiCheck9, FiEdit2 as FiEdit26, FiTarget, FiX as FiX5, FiChevronDown as FiChevronDown6, FiUser as FiUser2, FiSearch as FiSearch5 } from "react-icons/fi";
|
|
8385
|
+
|
|
8386
|
+
// src/components/QuestReviewStackEditor.jsx
|
|
8387
|
+
import React15, { useState as useState16 } from "react";
|
|
8388
|
+
import { FiPlus as FiPlus5, FiX as FiX4, FiUser, FiSearch as FiSearch4, FiChevronUp, FiChevronDown as FiChevronDown5, FiAlertCircle } from "react-icons/fi";
|
|
8389
|
+
function QuestReviewStackEditor({
|
|
8390
|
+
reviewStack = [],
|
|
8391
|
+
onChange,
|
|
8392
|
+
viewMembers = [],
|
|
8393
|
+
readOnly = false
|
|
8394
|
+
}) {
|
|
8395
|
+
const [isAdding, setIsAdding] = useState16(false);
|
|
8396
|
+
const [searchQuery, setSearchQuery] = useState16("");
|
|
8397
|
+
const handleAddReviewer = (userId) => {
|
|
8398
|
+
const newStack = [...reviewStack, { userId, status: "pending", mandatory: false }];
|
|
8399
|
+
onChange(newStack);
|
|
8400
|
+
setIsAdding(false);
|
|
8401
|
+
setSearchQuery("");
|
|
8402
|
+
};
|
|
8403
|
+
const handleRemoveReviewer = (index) => {
|
|
8404
|
+
const newStack = reviewStack.filter((_, i) => i !== index);
|
|
8405
|
+
onChange(newStack);
|
|
8406
|
+
};
|
|
8407
|
+
const handleToggleMandatory = (index) => {
|
|
8408
|
+
const newStack = [...reviewStack];
|
|
8409
|
+
newStack[index] = { ...newStack[index], mandatory: !newStack[index].mandatory };
|
|
8410
|
+
onChange(newStack);
|
|
8411
|
+
};
|
|
8412
|
+
const handleMove = (index, direction) => {
|
|
8413
|
+
const newStack = [...reviewStack];
|
|
8414
|
+
const targetIndex = index + direction;
|
|
8415
|
+
if (targetIndex < 0 || targetIndex >= newStack.length) return;
|
|
8416
|
+
[newStack[index], newStack[targetIndex]] = [newStack[targetIndex], newStack[index]];
|
|
8417
|
+
onChange(newStack);
|
|
8418
|
+
};
|
|
8419
|
+
const filteredMembers = viewMembers.filter((m) => {
|
|
8420
|
+
const search = searchQuery.toLowerCase();
|
|
8421
|
+
return (m.name || "").toLowerCase().includes(search) || (m.email || "").toLowerCase().includes(search);
|
|
8422
|
+
});
|
|
8423
|
+
return /* @__PURE__ */ React15.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Review Stack (Sequential)"), !readOnly && !isAdding && /* @__PURE__ */ React15.createElement(
|
|
8424
|
+
"button",
|
|
8425
|
+
{
|
|
8426
|
+
type: "button",
|
|
8427
|
+
onClick: () => setIsAdding(true),
|
|
8428
|
+
className: "flex items-center gap-1 px-2 py-1 text-[10px] bg-sky-500/20 text-sky-300 border border-sky-500/30 rounded hover:bg-sky-500/30 transition-colors"
|
|
8429
|
+
},
|
|
8430
|
+
/* @__PURE__ */ React15.createElement(FiPlus5, { size: 10 }),
|
|
8431
|
+
" Adicionar Camada"
|
|
8432
|
+
)), isAdding && /* @__PURE__ */ React15.createElement("div", { className: "bg-slate-900/50 border border-sky-500/30 rounded-lg p-2 space-y-2 animate-in fade-in slide-in-from-top-1 duration-200" }, /* @__PURE__ */ React15.createElement("div", { className: "relative" }, /* @__PURE__ */ React15.createElement(FiSearch4, { className: "absolute left-2 top-1/2 -translate-y-1/2 text-slate-500", size: 12 }), /* @__PURE__ */ React15.createElement(
|
|
8433
|
+
"input",
|
|
8434
|
+
{
|
|
8435
|
+
autoFocus: true,
|
|
8436
|
+
type: "text",
|
|
8437
|
+
placeholder: "Buscar revisor...",
|
|
8438
|
+
value: searchQuery,
|
|
8439
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
8440
|
+
className: "w-full bg-slate-800 border border-white/10 rounded p-1.5 pl-7 text-xs focus:outline-none focus:ring-1 focus:ring-sky-400"
|
|
8441
|
+
}
|
|
8442
|
+
), /* @__PURE__ */ React15.createElement("button", { onClick: () => setIsAdding(false), className: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-white" }, /* @__PURE__ */ React15.createElement(FiX4, { size: 14 }))), /* @__PURE__ */ React15.createElement("ul", { className: "max-h-32 overflow-y-auto custom-scrollbar space-y-1" }, filteredMembers.map((m) => /* @__PURE__ */ React15.createElement(
|
|
8443
|
+
"li",
|
|
8444
|
+
{
|
|
8445
|
+
key: m.id,
|
|
8446
|
+
onClick: () => handleAddReviewer(m.id),
|
|
8447
|
+
className: "px-2 py-1.5 hover:bg-white/5 rounded cursor-pointer text-xs flex items-center gap-2"
|
|
8448
|
+
},
|
|
8449
|
+
/* @__PURE__ */ React15.createElement(FiUser, { size: 12, className: "text-slate-400" }),
|
|
8450
|
+
/* @__PURE__ */ React15.createElement("span", { className: "truncate" }, m.name || m.email)
|
|
8451
|
+
)), filteredMembers.length === 0 && /* @__PURE__ */ React15.createElement("li", { className: "text-[10px] text-slate-500 text-center py-2 italic font-light" }, "Nenhum membro encontrado"))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5" }, reviewStack.map((item, index) => {
|
|
8452
|
+
const member = viewMembers.find((m) => m.id === item.userId);
|
|
8453
|
+
const isCompleted = item.status === "completed";
|
|
8454
|
+
return /* @__PURE__ */ React15.createElement(
|
|
8455
|
+
"div",
|
|
8456
|
+
{
|
|
8457
|
+
key: index,
|
|
8458
|
+
className: `group relative flex items-center gap-3 p-2 rounded-lg border ${isCompleted ? "bg-green-500/5 border-green-500/20" : "bg-white/5 border-white/10"} hover:border-white/20 transition-all`
|
|
8459
|
+
},
|
|
8460
|
+
/* @__PURE__ */ React15.createElement("div", { className: "flex flex-col items-center gap-0.5 text-slate-500" }, /* @__PURE__ */ React15.createElement("span", { className: "text-[10px] font-bold opacity-50" }, index + 1), !readOnly && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleMove(index, -1), disabled: index === 0, className: "hover:text-sky-400 disabled:opacity-20" }, /* @__PURE__ */ React15.createElement(FiChevronUp, { size: 12 })), /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleMove(index, 1), disabled: index === reviewStack.length - 1, className: "hover:text-sky-400 disabled:opacity-20" }, /* @__PURE__ */ React15.createElement(FiChevronDown5, { size: 12 })))),
|
|
8461
|
+
/* @__PURE__ */ React15.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement("span", { className: `truncate text-sm font-medium ${isCompleted ? "text-green-300" : "text-slate-200"}` }, (member == null ? void 0 : member.name) || (member == null ? void 0 : member.email) || "Unknown User"), item.mandatory && /* @__PURE__ */ React15.createElement("span", { className: "flex-shrink-0 px-1.5 py-0.5 rounded-full bg-amber-500/20 text-amber-300 text-[8px] font-bold uppercase tracking-tighter border border-amber-500/30" }, "Obrigat\xF3rio")), /* @__PURE__ */ React15.createElement("p", { className: "text-[10px] text-slate-500 flex items-center gap-1" }, isCompleted ? "\u2713 Review Conclu\xEDda" : "\u23F3 Pendente")),
|
|
8462
|
+
!readOnly && /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React15.createElement(
|
|
8463
|
+
"button",
|
|
8464
|
+
{
|
|
8465
|
+
type: "button",
|
|
8466
|
+
onClick: () => handleToggleMandatory(index),
|
|
8467
|
+
title: item.mandatory ? "Remover obrigatoriedade" : "Tornar obrigat\xF3rio",
|
|
8468
|
+
className: `p-1.5 rounded hover:bg-white/10 transition-colors ${item.mandatory ? "text-amber-400" : "text-slate-500"}`
|
|
8469
|
+
},
|
|
8470
|
+
/* @__PURE__ */ React15.createElement(FiAlertCircle, { size: 14 })
|
|
8471
|
+
), /* @__PURE__ */ React15.createElement(
|
|
8472
|
+
"button",
|
|
8473
|
+
{
|
|
8474
|
+
type: "button",
|
|
8475
|
+
onClick: () => handleRemoveReviewer(index),
|
|
8476
|
+
className: "p-1.5 rounded hover:bg-red-500/20 text-slate-500 hover:text-red-400 transition-colors"
|
|
8477
|
+
},
|
|
8478
|
+
/* @__PURE__ */ React15.createElement(FiX4, { size: 14 })
|
|
8479
|
+
))
|
|
8480
|
+
);
|
|
8481
|
+
}), reviewStack.length === 0 && !isAdding && /* @__PURE__ */ React15.createElement("div", { className: "py-6 border-2 border-dashed border-white/5 rounded-xl flex flex-col items-center justify-center gap-2" }, /* @__PURE__ */ React15.createElement("p", { className: "text-xs text-slate-500 font-light italic" }, "Nenhum revisor definido"), !readOnly && /* @__PURE__ */ React15.createElement(
|
|
8482
|
+
"button",
|
|
8483
|
+
{
|
|
8484
|
+
type: "button",
|
|
8485
|
+
onClick: () => setIsAdding(true),
|
|
8486
|
+
className: "text-[10px] text-sky-400 hover:underline"
|
|
8487
|
+
},
|
|
8488
|
+
"+ Come\xE7ar a Review Stack"
|
|
8489
|
+
))));
|
|
8490
|
+
}
|
|
8491
|
+
|
|
8492
|
+
// src/components/InSceneQuestForm.jsx
|
|
8363
8493
|
var QUEST_STATUS_COLORS2 = {
|
|
8364
8494
|
"Backlog": "#64748b",
|
|
8365
8495
|
"In Progress": "#eab308",
|
|
@@ -8383,22 +8513,24 @@ function InSceneQuestForm({
|
|
|
8383
8513
|
// NOVA PROP
|
|
8384
8514
|
questCounter = 1,
|
|
8385
8515
|
// NOVA PROP
|
|
8386
|
-
viewMembers = []
|
|
8516
|
+
viewMembers = [],
|
|
8517
|
+
session = null
|
|
8387
8518
|
}) {
|
|
8388
8519
|
var _a, _b;
|
|
8389
|
-
const [name, setName] =
|
|
8390
|
-
const [assigneeId, setAssigneeId] =
|
|
8391
|
-
const [types, setTypes] =
|
|
8392
|
-
const [typeInput, setTypeInput] =
|
|
8393
|
-
const [status, setStatus] =
|
|
8394
|
-
const [size, setSize] =
|
|
8395
|
-
const [intensity, setIntensity] =
|
|
8396
|
-
const [description, setDescription] =
|
|
8397
|
-
const [
|
|
8398
|
-
const [
|
|
8399
|
-
const [
|
|
8400
|
-
const [
|
|
8401
|
-
const [
|
|
8520
|
+
const [name, setName] = useState17("");
|
|
8521
|
+
const [assigneeId, setAssigneeId] = useState17("");
|
|
8522
|
+
const [types, setTypes] = useState17(["quest"]);
|
|
8523
|
+
const [typeInput, setTypeInput] = useState17("");
|
|
8524
|
+
const [status, setStatus] = useState17("Backlog");
|
|
8525
|
+
const [size, setSize] = useState17("medium");
|
|
8526
|
+
const [intensity, setIntensity] = useState17(0);
|
|
8527
|
+
const [description, setDescription] = useState17("");
|
|
8528
|
+
const [reviewStack, setReviewStack] = useState17([]);
|
|
8529
|
+
const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState17(false);
|
|
8530
|
+
const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState17(false);
|
|
8531
|
+
const [assigneeSearchQuery, setAssigneeSearchQuery] = useState17("");
|
|
8532
|
+
const [customProps, setCustomProps] = useState17([]);
|
|
8533
|
+
const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState17(false);
|
|
8402
8534
|
const propsEndRef = useRef12(null);
|
|
8403
8535
|
const standardizedName = `${viewName} - ${questCounter} - \xBB ${name || "Nova Quest"}`;
|
|
8404
8536
|
const handleAddProp = () => {
|
|
@@ -8435,6 +8567,7 @@ function InSceneQuestForm({
|
|
|
8435
8567
|
}
|
|
8436
8568
|
};
|
|
8437
8569
|
const handleSubmit = (e) => {
|
|
8570
|
+
var _a2, _b2, _c, _d;
|
|
8438
8571
|
e.preventDefault();
|
|
8439
8572
|
if (!name.trim()) {
|
|
8440
8573
|
alert("O campo 'T\xEDtulo' \xE9 obrigat\xF3rio.");
|
|
@@ -8444,6 +8577,22 @@ function InSceneQuestForm({
|
|
|
8444
8577
|
customProps.filter((prop) => prop.key.trim() && !prop.isEditing)
|
|
8445
8578
|
);
|
|
8446
8579
|
const processedSections = processDescriptionForSave(description, []);
|
|
8580
|
+
const initialTimeline = [{
|
|
8581
|
+
type: "quest_created",
|
|
8582
|
+
timestamp: Date.now(),
|
|
8583
|
+
actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || "unknown",
|
|
8584
|
+
description: `Quest criada por ${((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.name) || "usu\xE1rio"}.`
|
|
8585
|
+
}];
|
|
8586
|
+
if (assigneeId) {
|
|
8587
|
+
initialTimeline.push({
|
|
8588
|
+
type: "assignee_changed",
|
|
8589
|
+
timestamp: Date.now() + 1,
|
|
8590
|
+
// Ensure sequential timestamp
|
|
8591
|
+
actorId: ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.id) || "unknown",
|
|
8592
|
+
to_assignee_id: assigneeId,
|
|
8593
|
+
description: `Quest atribu\xEDda para ${((_d = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _d.name) || "respons\xE1vel"}.`
|
|
8594
|
+
});
|
|
8595
|
+
}
|
|
8447
8596
|
onSave({
|
|
8448
8597
|
name: standardizedName,
|
|
8449
8598
|
// SALVA O NOME FORMATADO
|
|
@@ -8459,13 +8608,15 @@ function InSceneQuestForm({
|
|
|
8459
8608
|
description_sections: processedSections,
|
|
8460
8609
|
useImageAsTexture: false,
|
|
8461
8610
|
textureImageUrl: null,
|
|
8611
|
+
reviewStack,
|
|
8612
|
+
timeline: initialTimeline,
|
|
8462
8613
|
...additionalData
|
|
8463
8614
|
});
|
|
8464
8615
|
};
|
|
8465
8616
|
const swallow = (e) => e.stopPropagation();
|
|
8466
8617
|
const currentUsedTypes = customProps.map((p) => p.type).filter((t) => UNIQUE_PROP_TYPES.includes(t));
|
|
8467
8618
|
const availableImages = customProps.filter((p) => p.type === "images").flatMap((p) => Array.isArray(p.value) ? p.value : []).filter((img) => img.value && img.value.trim() !== "");
|
|
8468
|
-
return /* @__PURE__ */
|
|
8619
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
8469
8620
|
"div",
|
|
8470
8621
|
{
|
|
8471
8622
|
ref: refEl,
|
|
@@ -8477,8 +8628,8 @@ function InSceneQuestForm({
|
|
|
8477
8628
|
onContextMenu: swallow,
|
|
8478
8629
|
onDoubleClick: swallow
|
|
8479
8630
|
},
|
|
8480
|
-
/* @__PURE__ */
|
|
8481
|
-
/* @__PURE__ */
|
|
8631
|
+
/* @__PURE__ */ React16.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }),
|
|
8632
|
+
/* @__PURE__ */ React16.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React16.createElement(FiTarget, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Nova quest")), /* @__PURE__ */ React16.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, "Criar Quest")), /* @__PURE__ */ React16.createElement(
|
|
8482
8633
|
"button",
|
|
8483
8634
|
{
|
|
8484
8635
|
type: "button",
|
|
@@ -8488,7 +8639,7 @@ function InSceneQuestForm({
|
|
|
8488
8639
|
},
|
|
8489
8640
|
"\xD7"
|
|
8490
8641
|
)),
|
|
8491
|
-
/* @__PURE__ */
|
|
8642
|
+
/* @__PURE__ */ React16.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React16.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React16.createElement(
|
|
8492
8643
|
"input",
|
|
8493
8644
|
{
|
|
8494
8645
|
required: true,
|
|
@@ -8502,16 +8653,16 @@ function InSceneQuestForm({
|
|
|
8502
8653
|
},
|
|
8503
8654
|
className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
|
|
8504
8655
|
}
|
|
8505
|
-
), /* @__PURE__ */
|
|
8656
|
+
), /* @__PURE__ */ React16.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React16.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Status da Quest"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
|
|
8506
8657
|
"button",
|
|
8507
8658
|
{
|
|
8508
8659
|
type: "button",
|
|
8509
8660
|
onClick: () => setIsStatusDropdownOpen(!isStatusDropdownOpen),
|
|
8510
8661
|
className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
|
|
8511
8662
|
},
|
|
8512
|
-
/* @__PURE__ */
|
|
8513
|
-
/* @__PURE__ */
|
|
8514
|
-
), isStatusDropdownOpen && /* @__PURE__ */
|
|
8663
|
+
/* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS2[status] } }), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, status)),
|
|
8664
|
+
/* @__PURE__ */ React16.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
|
|
8665
|
+
), isStatusDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React16.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS2).map((s) => /* @__PURE__ */ React16.createElement(
|
|
8515
8666
|
"li",
|
|
8516
8667
|
{
|
|
8517
8668
|
key: s,
|
|
@@ -8522,21 +8673,21 @@ function InSceneQuestForm({
|
|
|
8522
8673
|
},
|
|
8523
8674
|
className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${status === s ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
|
|
8524
8675
|
},
|
|
8525
|
-
/* @__PURE__ */
|
|
8676
|
+
/* @__PURE__ */ React16.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS2[s] } }),
|
|
8526
8677
|
s
|
|
8527
|
-
)))))), /* @__PURE__ */
|
|
8678
|
+
)))))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Assignee (Respons\xE1vel)"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
|
|
8528
8679
|
"button",
|
|
8529
8680
|
{
|
|
8530
8681
|
type: "button",
|
|
8531
8682
|
onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
|
|
8532
8683
|
className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
|
|
8533
8684
|
},
|
|
8534
|
-
/* @__PURE__ */
|
|
8535
|
-
/* @__PURE__ */
|
|
8536
|
-
), isAssigneeDropdownOpen && /* @__PURE__ */
|
|
8685
|
+
/* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiUser2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, ((_a = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _a.name) || ((_b = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _b.email) || "Nenhum")),
|
|
8686
|
+
/* @__PURE__ */ React16.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
|
|
8687
|
+
), isAssigneeDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
|
|
8537
8688
|
setIsAssigneeDropdownOpen(false);
|
|
8538
8689
|
setAssigneeSearchQuery("");
|
|
8539
|
-
} }), /* @__PURE__ */
|
|
8690
|
+
} }), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React16.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React16.createElement(
|
|
8540
8691
|
"input",
|
|
8541
8692
|
{
|
|
8542
8693
|
type: "text",
|
|
@@ -8547,7 +8698,7 @@ function InSceneQuestForm({
|
|
|
8547
8698
|
className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
|
|
8548
8699
|
onClick: (e) => e.stopPropagation()
|
|
8549
8700
|
}
|
|
8550
|
-
)), /* @__PURE__ */
|
|
8701
|
+
)), /* @__PURE__ */ React16.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React16.createElement(
|
|
8551
8702
|
"li",
|
|
8552
8703
|
{
|
|
8553
8704
|
onClick: () => {
|
|
@@ -8561,7 +8712,7 @@ function InSceneQuestForm({
|
|
|
8561
8712
|
), viewMembers.filter((member) => {
|
|
8562
8713
|
const search = assigneeSearchQuery.toLowerCase();
|
|
8563
8714
|
return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
|
|
8564
|
-
}).map((member) => /* @__PURE__ */
|
|
8715
|
+
}).map((member) => /* @__PURE__ */ React16.createElement(
|
|
8565
8716
|
"li",
|
|
8566
8717
|
{
|
|
8567
8718
|
key: member.id,
|
|
@@ -8576,7 +8727,14 @@ function InSceneQuestForm({
|
|
|
8576
8727
|
)), viewMembers.filter((member) => {
|
|
8577
8728
|
const search = assigneeSearchQuery.toLowerCase();
|
|
8578
8729
|
return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
|
|
8579
|
-
}).length === 0 && assigneeSearchQuery && /* @__PURE__ */
|
|
8730
|
+
}).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React16.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado")))))), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement(
|
|
8731
|
+
QuestReviewStackEditor,
|
|
8732
|
+
{
|
|
8733
|
+
reviewStack,
|
|
8734
|
+
onChange: setReviewStack,
|
|
8735
|
+
viewMembers
|
|
8736
|
+
}
|
|
8737
|
+
)), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tipos Adicionais"), /* @__PURE__ */ React16.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React16.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, t !== "quest" && /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React16.createElement(FiX5, { size: 12 })))), /* @__PURE__ */ React16.createElement(
|
|
8580
8738
|
"input",
|
|
8581
8739
|
{
|
|
8582
8740
|
type: "text",
|
|
@@ -8589,7 +8747,7 @@ function InSceneQuestForm({
|
|
|
8589
8747
|
className: "flex-1 bg-transparent text-sm min-w-[80px] focus:outline-none text-slate-200",
|
|
8590
8748
|
autoComplete: "off"
|
|
8591
8749
|
}
|
|
8592
|
-
))), /* @__PURE__ */
|
|
8750
|
+
))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Descri\xE7\xE3o (Opcional)"), /* @__PURE__ */ React16.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React16.createElement(
|
|
8593
8751
|
DescriptionDisplay,
|
|
8594
8752
|
{
|
|
8595
8753
|
description,
|
|
@@ -8599,7 +8757,7 @@ function InSceneQuestForm({
|
|
|
8599
8757
|
onMentionClick,
|
|
8600
8758
|
onSaveDescription: (newDesc) => setDescription(newDesc)
|
|
8601
8759
|
}
|
|
8602
|
-
), /* @__PURE__ */
|
|
8760
|
+
), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiEdit26, { size: 14 }))), !description && /* @__PURE__ */ React16.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React16.createElement(
|
|
8603
8761
|
"button",
|
|
8604
8762
|
{
|
|
8605
8763
|
key: s,
|
|
@@ -8610,9 +8768,9 @@ function InSceneQuestForm({
|
|
|
8610
8768
|
},
|
|
8611
8769
|
className: "flex items-center gap-2 group cursor-pointer focus:outline-none"
|
|
8612
8770
|
},
|
|
8613
|
-
/* @__PURE__ */
|
|
8614
|
-
/* @__PURE__ */
|
|
8615
|
-
)))), /* @__PURE__ */
|
|
8771
|
+
/* @__PURE__ */ React16.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${size === s ? "bg-indigo-500 border-indigo-500" : "border-slate-600 bg-transparent group-hover:border-slate-500"}` }, size === s && /* @__PURE__ */ React16.createElement(FiCheck9, { size: 12, className: "text-white" })),
|
|
8772
|
+
/* @__PURE__ */ React16.createElement("span", { className: `text-sm capitalize transition-colors ${size === s ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}` }, s)
|
|
8773
|
+
)))), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React16.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider" }, "Propriedades Adicionais"), /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiPlus6, { size: 14 }), " Adicionar")), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React16.createElement(
|
|
8616
8774
|
CustomPropertyDisplay,
|
|
8617
8775
|
{
|
|
8618
8776
|
key: prop.id,
|
|
@@ -8623,8 +8781,8 @@ function InSceneQuestForm({
|
|
|
8623
8781
|
unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type),
|
|
8624
8782
|
onUploadFile
|
|
8625
8783
|
}
|
|
8626
|
-
)), /* @__PURE__ */
|
|
8627
|
-
), isDescriptionModalOpen && /* @__PURE__ */
|
|
8784
|
+
)), /* @__PURE__ */ React16.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React16.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: onCancel, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm" }, "Cancelar"), /* @__PURE__ */ React16.createElement("button", { type: "submit", className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]" }, "Salvar Quest")))
|
|
8785
|
+
), isDescriptionModalOpen && /* @__PURE__ */ React16.createElement(
|
|
8628
8786
|
DescriptionEditModal,
|
|
8629
8787
|
{
|
|
8630
8788
|
isOpen: isDescriptionModalOpen,
|
|
@@ -8640,8 +8798,8 @@ function InSceneQuestForm({
|
|
|
8640
8798
|
}
|
|
8641
8799
|
|
|
8642
8800
|
// src/components/NodeDetailsPanel.jsx
|
|
8643
|
-
import
|
|
8644
|
-
import { FiPlus as
|
|
8801
|
+
import React17, { useState as useState18, useEffect as useEffect15, useRef as useRef13 } from "react";
|
|
8802
|
+
import { FiPlus as FiPlus7, FiMaximize2 as FiMaximize23, FiX as FiX6, FiCheck as FiCheck10, FiImage as FiImage3, FiEdit2 as FiEdit27, FiLoader as FiLoader2, FiBookOpen as FiBookOpen3, FiSun as FiSun2, FiLink as FiLink5, FiDatabase } from "react-icons/fi";
|
|
8645
8803
|
function NodeDetailsPanel({
|
|
8646
8804
|
node,
|
|
8647
8805
|
onClose,
|
|
@@ -8662,28 +8820,28 @@ function NodeDetailsPanel({
|
|
|
8662
8820
|
userRole,
|
|
8663
8821
|
currentDatasetName
|
|
8664
8822
|
}) {
|
|
8665
|
-
const [name, setName] =
|
|
8666
|
-
const [types, setTypes] =
|
|
8667
|
-
const [typeInput, setTypeInput] =
|
|
8668
|
-
const [color, setColor] =
|
|
8669
|
-
const [size, setSize] =
|
|
8670
|
-
const [description, setDescription] =
|
|
8671
|
-
const [intensity, setIntensity] =
|
|
8672
|
-
const [customProps, setCustomProps] =
|
|
8673
|
-
const [showTypeSuggestions, setShowTypeSuggestions] =
|
|
8674
|
-
const [filteredTypes, setFilteredTypes] =
|
|
8675
|
-
const [isDescriptionModalOpen, setIsDescriptionModalOpen] =
|
|
8676
|
-
const [isReadMode, setIsReadMode] =
|
|
8677
|
-
const [existingSections, setExistingSections] =
|
|
8678
|
-
const [isSaving, setIsSaving] =
|
|
8679
|
-
const [isLinkCopied, setIsLinkCopied] =
|
|
8680
|
-
const [useImageAsTexture, setUseImageAsTexture] =
|
|
8823
|
+
const [name, setName] = useState18((node == null ? void 0 : node.name) ?? "");
|
|
8824
|
+
const [types, setTypes] = useState18([]);
|
|
8825
|
+
const [typeInput, setTypeInput] = useState18("");
|
|
8826
|
+
const [color, setColor] = useState18((node == null ? void 0 : node.color) ?? "#8b5cf6");
|
|
8827
|
+
const [size, setSize] = useState18((node == null ? void 0 : node.size) ?? "medium");
|
|
8828
|
+
const [description, setDescription] = useState18((node == null ? void 0 : node.description) ?? "");
|
|
8829
|
+
const [intensity, setIntensity] = useState18((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
|
|
8830
|
+
const [customProps, setCustomProps] = useState18(() => extractCustomPropsFromNode(node || {}));
|
|
8831
|
+
const [showTypeSuggestions, setShowTypeSuggestions] = useState18(false);
|
|
8832
|
+
const [filteredTypes, setFilteredTypes] = useState18([]);
|
|
8833
|
+
const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState18(false);
|
|
8834
|
+
const [isReadMode, setIsReadMode] = useState18(false);
|
|
8835
|
+
const [existingSections, setExistingSections] = useState18((node == null ? void 0 : node.description_sections) || []);
|
|
8836
|
+
const [isSaving, setIsSaving] = useState18(false);
|
|
8837
|
+
const [isLinkCopied, setIsLinkCopied] = useState18(false);
|
|
8838
|
+
const [useImageAsTexture, setUseImageAsTexture] = useState18(() => {
|
|
8681
8839
|
if ((node == null ? void 0 : node.useImageAsTexture) === "true") return true;
|
|
8682
8840
|
if ((node == null ? void 0 : node.useImageAsTexture) === "false") return false;
|
|
8683
8841
|
return !!(node == null ? void 0 : node.useImageAsTexture);
|
|
8684
8842
|
});
|
|
8685
|
-
const [selectedImageUrl, setSelectedImageUrl] =
|
|
8686
|
-
const [hasUnsavedChanges, setHasUnsavedChanges] =
|
|
8843
|
+
const [selectedImageUrl, setSelectedImageUrl] = useState18((node == null ? void 0 : node.textureImageUrl) ?? null);
|
|
8844
|
+
const [hasUnsavedChanges, setHasUnsavedChanges] = useState18(false);
|
|
8687
8845
|
const maxPanelW = typeof window !== "undefined" ? window.innerWidth * 0.92 : 1200;
|
|
8688
8846
|
const { width: panelWidth, isResizing, handlePointerDown: handleResize, setWidth } = useResizablePanel({
|
|
8689
8847
|
initialWidth: isReadMode ? 700 : 440,
|
|
@@ -8926,7 +9084,7 @@ function NodeDetailsPanel({
|
|
|
8926
9084
|
onClose();
|
|
8927
9085
|
};
|
|
8928
9086
|
const currentUsedTypes = customProps.map((p) => p.type).filter((t) => UNIQUE_PROP_TYPES.includes(t));
|
|
8929
|
-
return /* @__PURE__ */
|
|
9087
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
8930
9088
|
"div",
|
|
8931
9089
|
{
|
|
8932
9090
|
className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
|
|
@@ -8939,7 +9097,7 @@ function NodeDetailsPanel({
|
|
|
8939
9097
|
onContextMenu: swallow,
|
|
8940
9098
|
onDoubleClick: swallow
|
|
8941
9099
|
},
|
|
8942
|
-
/* @__PURE__ */
|
|
9100
|
+
/* @__PURE__ */ React17.createElement(
|
|
8943
9101
|
"div",
|
|
8944
9102
|
{
|
|
8945
9103
|
onPointerDown: (e) => {
|
|
@@ -8950,7 +9108,7 @@ function NodeDetailsPanel({
|
|
|
8950
9108
|
title: "Arraste para redimensionar"
|
|
8951
9109
|
}
|
|
8952
9110
|
),
|
|
8953
|
-
isReadMode ? /* @__PURE__ */
|
|
9111
|
+
isReadMode ? /* @__PURE__ */ React17.createElement(
|
|
8954
9112
|
DescriptionReadModePanel,
|
|
8955
9113
|
{
|
|
8956
9114
|
title: name || (node == null ? void 0 : node.name),
|
|
@@ -8971,23 +9129,23 @@ function NodeDetailsPanel({
|
|
|
8971
9129
|
onImageClick: handleImageClickFromText,
|
|
8972
9130
|
onSaveDescription: handleSaveDescriptionInline
|
|
8973
9131
|
}
|
|
8974
|
-
) : /* @__PURE__ */
|
|
9132
|
+
) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React17.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React17.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-400/80 shadow-[0_0_18px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React17.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes do Node"), /* @__PURE__ */ React17.createElement(
|
|
8975
9133
|
"button",
|
|
8976
9134
|
{
|
|
8977
9135
|
onClick: handleCopyLink,
|
|
8978
9136
|
className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-indigo-400"}`,
|
|
8979
9137
|
title: isLinkCopied ? "Link Copiado!" : "Copiar link para este Node"
|
|
8980
9138
|
},
|
|
8981
|
-
isLinkCopied ? /* @__PURE__ */
|
|
8982
|
-
)), /* @__PURE__ */
|
|
9139
|
+
isLinkCopied ? /* @__PURE__ */ React17.createElement(FiCheck10, { size: 12 }) : /* @__PURE__ */ React17.createElement(FiLink5, { size: 12 })
|
|
9140
|
+
)), /* @__PURE__ */ React17.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || (node == null ? void 0 : node.name))), /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Tipos"), /* @__PURE__ */ React17.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React17.createElement("span", { key: index, className: "flex items-center gap-1 bg-indigo-500/30 text-indigo-100 px-1.5 py-0.5 rounded-md text-xs font-medium border border-indigo-500/20" }, t, canEdit && /* @__PURE__ */ React17.createElement(
|
|
8983
9141
|
"button",
|
|
8984
9142
|
{
|
|
8985
9143
|
type: "button",
|
|
8986
9144
|
onClick: () => handleRemoveType(index),
|
|
8987
9145
|
className: "hover:text-white transition-colors"
|
|
8988
9146
|
},
|
|
8989
|
-
/* @__PURE__ */
|
|
8990
|
-
))), canEdit && /* @__PURE__ */
|
|
9147
|
+
/* @__PURE__ */ React17.createElement(FiX6, { size: 12 })
|
|
9148
|
+
))), canEdit && /* @__PURE__ */ React17.createElement(
|
|
8991
9149
|
"input",
|
|
8992
9150
|
{
|
|
8993
9151
|
type: "text",
|
|
@@ -9008,7 +9166,7 @@ function NodeDetailsPanel({
|
|
|
9008
9166
|
placeholder: types.length === 0 ? "Ex.: Cliente" : "",
|
|
9009
9167
|
autoComplete: "off"
|
|
9010
9168
|
}
|
|
9011
|
-
), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */
|
|
9169
|
+
), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React17.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React17.createElement(
|
|
9012
9170
|
"li",
|
|
9013
9171
|
{
|
|
9014
9172
|
key: index,
|
|
@@ -9019,7 +9177,7 @@ function NodeDetailsPanel({
|
|
|
9019
9177
|
}
|
|
9020
9178
|
},
|
|
9021
9179
|
suggestedType
|
|
9022
|
-
))))), /* @__PURE__ */
|
|
9180
|
+
))))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Nome"), /* @__PURE__ */ React17.createElement(
|
|
9023
9181
|
"input",
|
|
9024
9182
|
{
|
|
9025
9183
|
type: "text",
|
|
@@ -9028,7 +9186,7 @@ function NodeDetailsPanel({
|
|
|
9028
9186
|
readOnly: !canEdit,
|
|
9029
9187
|
className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none ${canEdit ? "focus:ring-2 focus:ring-indigo-400/60" : "cursor-default text-slate-400"}`
|
|
9030
9188
|
}
|
|
9031
|
-
)), /* @__PURE__ */
|
|
9189
|
+
)), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React17.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React17.createElement(
|
|
9032
9190
|
DescriptionDisplay,
|
|
9033
9191
|
{
|
|
9034
9192
|
description,
|
|
@@ -9040,7 +9198,7 @@ function NodeDetailsPanel({
|
|
|
9040
9198
|
onImageClick: handleImageClickFromText,
|
|
9041
9199
|
onSaveDescription: handleSaveDescriptionInline
|
|
9042
9200
|
}
|
|
9043
|
-
), /* @__PURE__ */
|
|
9201
|
+
), /* @__PURE__ */ React17.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React17.createElement(
|
|
9044
9202
|
"button",
|
|
9045
9203
|
{
|
|
9046
9204
|
type: "button",
|
|
@@ -9048,8 +9206,8 @@ function NodeDetailsPanel({
|
|
|
9048
9206
|
className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`,
|
|
9049
9207
|
title: "Modo de Leitura"
|
|
9050
9208
|
},
|
|
9051
|
-
/* @__PURE__ */
|
|
9052
|
-
), canEdit && /* @__PURE__ */
|
|
9209
|
+
/* @__PURE__ */ React17.createElement(FiBookOpen3, { size: 14 })
|
|
9210
|
+
), canEdit && /* @__PURE__ */ React17.createElement(
|
|
9053
9211
|
"button",
|
|
9054
9212
|
{
|
|
9055
9213
|
type: "button",
|
|
@@ -9057,17 +9215,17 @@ function NodeDetailsPanel({
|
|
|
9057
9215
|
className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
|
|
9058
9216
|
title: "Editar descri\xE7\xE3o (Modo de Escrita)"
|
|
9059
9217
|
},
|
|
9060
|
-
/* @__PURE__ */
|
|
9061
|
-
)), canEdit && !description && /* @__PURE__ */
|
|
9218
|
+
/* @__PURE__ */ React17.createElement(FiEdit27, { size: 14 })
|
|
9219
|
+
)), canEdit && !description && /* @__PURE__ */ React17.createElement(
|
|
9062
9220
|
"div",
|
|
9063
9221
|
{
|
|
9064
9222
|
onClick: () => setIsDescriptionModalOpen(true),
|
|
9065
9223
|
className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
|
|
9066
9224
|
},
|
|
9067
9225
|
"Adicionar descri\xE7\xE3o..."
|
|
9068
|
-
))), /* @__PURE__ */
|
|
9226
|
+
))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Size"), /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
|
|
9069
9227
|
const isSelected = size === s;
|
|
9070
|
-
return /* @__PURE__ */
|
|
9228
|
+
return /* @__PURE__ */ React17.createElement(
|
|
9071
9229
|
"button",
|
|
9072
9230
|
{
|
|
9073
9231
|
key: s,
|
|
@@ -9075,10 +9233,10 @@ function NodeDetailsPanel({
|
|
|
9075
9233
|
onClick: () => canEdit && handleSizeChange(s),
|
|
9076
9234
|
className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}`
|
|
9077
9235
|
},
|
|
9078
|
-
/* @__PURE__ */
|
|
9079
|
-
/* @__PURE__ */
|
|
9236
|
+
/* @__PURE__ */ React17.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React17.createElement(FiCheck10, { size: 12, className: "text-white" })),
|
|
9237
|
+
/* @__PURE__ */ React17.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s)
|
|
9080
9238
|
);
|
|
9081
|
-
}))), /* @__PURE__ */
|
|
9239
|
+
}))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Cor e Brilho"), canEdit && hasImages && /* @__PURE__ */ React17.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React17.createElement("div", { className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}` }, useImageAsTexture && /* @__PURE__ */ React17.createElement(FiCheck10, { size: 12, className: "text-white" })), /* @__PURE__ */ React17.createElement(
|
|
9082
9240
|
"input",
|
|
9083
9241
|
{
|
|
9084
9242
|
type: "checkbox",
|
|
@@ -9086,14 +9244,14 @@ function NodeDetailsPanel({
|
|
|
9086
9244
|
onChange: handleToggleImageMode,
|
|
9087
9245
|
className: "hidden"
|
|
9088
9246
|
}
|
|
9089
|
-
), /* @__PURE__ */
|
|
9247
|
+
), /* @__PURE__ */ React17.createElement("span", { className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}` }, "Usar imagem para representar o node"))), /* @__PURE__ */ React17.createElement(
|
|
9090
9248
|
ColorPicker,
|
|
9091
9249
|
{
|
|
9092
9250
|
color,
|
|
9093
9251
|
onChange: handleColorChange,
|
|
9094
9252
|
disabled: !canEdit || useImageAsTexture
|
|
9095
9253
|
}
|
|
9096
|
-
), /* @__PURE__ */
|
|
9254
|
+
), /* @__PURE__ */ React17.createElement("div", { className: "mt-3 flex items-center gap-3" }, /* @__PURE__ */ React17.createElement(FiSun2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React17.createElement(
|
|
9097
9255
|
"input",
|
|
9098
9256
|
{
|
|
9099
9257
|
type: "range",
|
|
@@ -9106,7 +9264,7 @@ function NodeDetailsPanel({
|
|
|
9106
9264
|
className: `w-full h-1.5 bg-slate-700 rounded-lg appearance-none ${canEdit ? "cursor-pointer accent-indigo-500 hover:accent-indigo-400" : "cursor-default accent-slate-500"}`,
|
|
9107
9265
|
title: `Intensidade do brilho: ${intensity}`
|
|
9108
9266
|
}
|
|
9109
|
-
), /* @__PURE__ */
|
|
9267
|
+
), /* @__PURE__ */ React17.createElement("span", { className: "text-xs text-slate-400 w-6 text-right" }, intensity)), /* @__PURE__ */ React17.createElement("span", { className: `text-xs block mt-1 transition-opacity ${useImageAsTexture ? "opacity-40" : "text-slate-400"}` }, useImageAsTexture ? "Cor da borda (definida pela imagem)" : "Ajuste a cor e a intensidade do brilho.")), /* @__PURE__ */ React17.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React17.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React17.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React17.createElement(FiPlus7, { size: 14 }), " Adicionar")), /* @__PURE__ */ React17.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React17.createElement(
|
|
9110
9268
|
CustomPropertyDisplay,
|
|
9111
9269
|
{
|
|
9112
9270
|
key: prop.id,
|
|
@@ -9121,7 +9279,7 @@ function NodeDetailsPanel({
|
|
|
9121
9279
|
onUploadFile: canEdit ? onUploadFile : void 0,
|
|
9122
9280
|
readOnly: !canEdit
|
|
9123
9281
|
}
|
|
9124
|
-
)), /* @__PURE__ */
|
|
9282
|
+
)), /* @__PURE__ */ React17.createElement("div", { ref: propsEndRef }))), currentDatasetName && /* @__PURE__ */ React17.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React17.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React17.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React17.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React17.createElement(
|
|
9125
9283
|
"button",
|
|
9126
9284
|
{
|
|
9127
9285
|
onClick: () => handleSave(false),
|
|
@@ -9130,10 +9288,10 @@ function NodeDetailsPanel({
|
|
|
9130
9288
|
${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}
|
|
9131
9289
|
`
|
|
9132
9290
|
},
|
|
9133
|
-
isSaving && /* @__PURE__ */
|
|
9291
|
+
isSaving && /* @__PURE__ */ React17.createElement(FiLoader2, { className: "animate-spin" }),
|
|
9134
9292
|
isSaving ? "Salvando..." : "Salvar"
|
|
9135
9293
|
)))
|
|
9136
|
-
), isDescriptionModalOpen && canEdit && /* @__PURE__ */
|
|
9294
|
+
), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React17.createElement(
|
|
9137
9295
|
DescriptionEditModal,
|
|
9138
9296
|
{
|
|
9139
9297
|
isOpen: isDescriptionModalOpen,
|
|
@@ -9154,8 +9312,8 @@ function NodeDetailsPanel({
|
|
|
9154
9312
|
}
|
|
9155
9313
|
|
|
9156
9314
|
// src/components/QuestDetailsPanel.jsx
|
|
9157
|
-
import
|
|
9158
|
-
import { FiPlus as
|
|
9315
|
+
import React18, { useState as useState19, useEffect as useEffect16, useRef as useRef14 } from "react";
|
|
9316
|
+
import { FiPlus as FiPlus8, FiX as FiX7, FiCheck as FiCheck11, FiEdit2 as FiEdit28, FiLoader as FiLoader3, FiBookOpen as FiBookOpen4, FiLink as FiLink6, FiTarget as FiTarget2, FiChevronDown as FiChevronDown7, FiUser as FiUser3, FiSearch as FiSearch6 } from "react-icons/fi";
|
|
9159
9317
|
var QUEST_STATUS_COLORS3 = {
|
|
9160
9318
|
"Backlog": "#64748b",
|
|
9161
9319
|
"In Progress": "#eab308",
|
|
@@ -9183,29 +9341,31 @@ function QuestDetailsPanel({
|
|
|
9183
9341
|
}) {
|
|
9184
9342
|
var _a;
|
|
9185
9343
|
const initialRawTitle = (node == null ? void 0 : node.raw_title) || (((_a = node == null ? void 0 : node.name) == null ? void 0 : _a.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
|
|
9186
|
-
const [rawTitle, setRawTitle] =
|
|
9344
|
+
const [rawTitle, setRawTitle] = useState19(initialRawTitle);
|
|
9187
9345
|
const prefixParts = ((node == null ? void 0 : node.name) || "").split(" - \xBB ");
|
|
9188
9346
|
const questPrefix = prefixParts.length > 1 ? prefixParts[0] : "";
|
|
9189
9347
|
const standardizedName = questPrefix ? `${questPrefix} - \xBB ${rawTitle || "Sem t\xEDtulo"}` : rawTitle;
|
|
9190
|
-
const [types, setTypes] =
|
|
9191
|
-
const [typeInput, setTypeInput] =
|
|
9192
|
-
const [status, setStatus] =
|
|
9193
|
-
const [size, setSize] =
|
|
9194
|
-
const [assigneeId, setAssigneeId] =
|
|
9195
|
-
const [description, setDescription] =
|
|
9196
|
-
const [intensity, setIntensity] =
|
|
9197
|
-
const [isStatusDropdownOpen, setIsStatusDropdownOpen] =
|
|
9198
|
-
const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] =
|
|
9199
|
-
const [assigneeSearchQuery, setAssigneeSearchQuery] =
|
|
9200
|
-
const [customProps, setCustomProps] =
|
|
9201
|
-
const [
|
|
9202
|
-
const [
|
|
9203
|
-
const [
|
|
9204
|
-
const [
|
|
9205
|
-
const [
|
|
9206
|
-
const [
|
|
9207
|
-
const [
|
|
9208
|
-
const [
|
|
9348
|
+
const [types, setTypes] = useState19((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
|
|
9349
|
+
const [typeInput, setTypeInput] = useState19("");
|
|
9350
|
+
const [status, setStatus] = useState19((node == null ? void 0 : node.status) ?? "Backlog");
|
|
9351
|
+
const [size, setSize] = useState19((node == null ? void 0 : node.size) ?? "medium");
|
|
9352
|
+
const [assigneeId, setAssigneeId] = useState19((node == null ? void 0 : node.assignee_id) || "");
|
|
9353
|
+
const [description, setDescription] = useState19((node == null ? void 0 : node.description) ?? "");
|
|
9354
|
+
const [intensity, setIntensity] = useState19((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
|
|
9355
|
+
const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState19(false);
|
|
9356
|
+
const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState19(false);
|
|
9357
|
+
const [assigneeSearchQuery, setAssigneeSearchQuery] = useState19("");
|
|
9358
|
+
const [customProps, setCustomProps] = useState19(() => extractCustomPropsFromNode(node || {}));
|
|
9359
|
+
const [reviewStack, setReviewStack] = useState19((node == null ? void 0 : node.reviewStack) || []);
|
|
9360
|
+
const [timeline, setTimeline] = useState19((node == null ? void 0 : node.timeline) || []);
|
|
9361
|
+
const [showTypeSuggestions, setShowTypeSuggestions] = useState19(false);
|
|
9362
|
+
const [filteredTypes, setFilteredTypes] = useState19([]);
|
|
9363
|
+
const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState19(false);
|
|
9364
|
+
const [isReadMode, setIsReadMode] = useState19(false);
|
|
9365
|
+
const [existingSections, setExistingSections] = useState19((node == null ? void 0 : node.description_sections) || []);
|
|
9366
|
+
const [isSaving, setIsSaving] = useState19(false);
|
|
9367
|
+
const [isLinkCopied, setIsLinkCopied] = useState19(false);
|
|
9368
|
+
const [hasUnsavedChanges, setHasUnsavedChanges] = useState19(false);
|
|
9209
9369
|
const maxPanelW = typeof window !== "undefined" ? window.innerWidth * 0.92 : 1200;
|
|
9210
9370
|
const { width: panelWidth, isResizing, handlePointerDown: handleResize, setWidth } = useResizablePanel({
|
|
9211
9371
|
initialWidth: isReadMode ? 700 : 440,
|
|
@@ -9238,6 +9398,8 @@ function QuestDetailsPanel({
|
|
|
9238
9398
|
setIntensity((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
|
|
9239
9399
|
setExistingSections((node == null ? void 0 : node.description_sections) || []);
|
|
9240
9400
|
setCustomProps(extractCustomPropsFromNode(node || {}));
|
|
9401
|
+
setReviewStack((node == null ? void 0 : node.reviewStack) || []);
|
|
9402
|
+
setTimeline((node == null ? void 0 : node.timeline) || []);
|
|
9241
9403
|
setHasUnsavedChanges(false);
|
|
9242
9404
|
}
|
|
9243
9405
|
}, [node]);
|
|
@@ -9353,6 +9515,8 @@ function QuestDetailsPanel({
|
|
|
9353
9515
|
const currentAssigneeId = overrides.assigneeId !== void 0 ? overrides.assigneeId : assigneeId;
|
|
9354
9516
|
const currentDescription = overrides.description !== void 0 ? overrides.description : description;
|
|
9355
9517
|
const currentCustomProps = overrides.customProps !== void 0 ? overrides.customProps : customProps;
|
|
9518
|
+
const currentReviewStack = overrides.reviewStack !== void 0 ? overrides.reviewStack : reviewStack;
|
|
9519
|
+
const currentTimeline = overrides.timeline !== void 0 ? overrides.timeline : timeline;
|
|
9356
9520
|
const currentExistingSections = overrides.existingSections !== void 0 ? overrides.existingSections : existingSections;
|
|
9357
9521
|
const currentStatus = overrides.status !== void 0 ? overrides.status : status;
|
|
9358
9522
|
if (!keepOpen && !hasUnsavedChanges) {
|
|
@@ -9384,6 +9548,8 @@ function QuestDetailsPanel({
|
|
|
9384
9548
|
textureImageUrl: null,
|
|
9385
9549
|
intensity,
|
|
9386
9550
|
is_quest: true,
|
|
9551
|
+
reviewStack: currentReviewStack,
|
|
9552
|
+
timeline: currentTimeline,
|
|
9387
9553
|
...extrasObj,
|
|
9388
9554
|
version_node: node.version_node
|
|
9389
9555
|
};
|
|
@@ -9411,7 +9577,7 @@ function QuestDetailsPanel({
|
|
|
9411
9577
|
const currentUsedTypes = customProps.map((p) => p.type).filter((t) => UNIQUE_PROP_TYPES.includes(t));
|
|
9412
9578
|
const assigneeMember = viewMembers.find((m) => m.id === assigneeId);
|
|
9413
9579
|
const isAssigneeUndefined = assigneeId && !assigneeMember;
|
|
9414
|
-
return /* @__PURE__ */
|
|
9580
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
9415
9581
|
"div",
|
|
9416
9582
|
{
|
|
9417
9583
|
className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
|
|
@@ -9424,11 +9590,11 @@ function QuestDetailsPanel({
|
|
|
9424
9590
|
onContextMenu: swallow,
|
|
9425
9591
|
onDoubleClick: swallow
|
|
9426
9592
|
},
|
|
9427
|
-
/* @__PURE__ */
|
|
9593
|
+
/* @__PURE__ */ React18.createElement("div", { onPointerDown: (e) => {
|
|
9428
9594
|
e.stopPropagation();
|
|
9429
9595
|
handleResize(e);
|
|
9430
9596
|
}, className: "absolute left-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-indigo-500/50 z-[2000] transition-colors", title: "Arraste para redimensionar" }),
|
|
9431
|
-
isReadMode ? /* @__PURE__ */
|
|
9597
|
+
isReadMode ? /* @__PURE__ */ React18.createElement(
|
|
9432
9598
|
DescriptionReadModePanel,
|
|
9433
9599
|
{
|
|
9434
9600
|
title: standardizedName || (node == null ? void 0 : node.name),
|
|
@@ -9449,7 +9615,7 @@ function QuestDetailsPanel({
|
|
|
9449
9615
|
onImageClick: handleImageClickFromText,
|
|
9450
9616
|
onSaveDescription: handleSaveDescriptionInline
|
|
9451
9617
|
}
|
|
9452
|
-
) : /* @__PURE__ */
|
|
9618
|
+
) : /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS3[status]}, transparent)` } }), /* @__PURE__ */ React18.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React18.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React18.createElement(FiTarget2, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React18.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React18.createElement("button", { onClick: handleCopyLink, className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-sky-400"}`, title: isLinkCopied ? "Link Copiado!" : "Copiar link para esta Quest" }, isLinkCopied ? /* @__PURE__ */ React18.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React18.createElement(FiLink6, { size: 12 }))), /* @__PURE__ */ React18.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ React18.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React18.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React18.createElement(
|
|
9453
9619
|
"input",
|
|
9454
9620
|
{
|
|
9455
9621
|
type: "text",
|
|
@@ -9458,7 +9624,7 @@ function QuestDetailsPanel({
|
|
|
9458
9624
|
readOnly: !canEdit,
|
|
9459
9625
|
className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none ${canEdit ? "focus:ring-2 focus:ring-indigo-400/60" : "cursor-default text-slate-400"}`
|
|
9460
9626
|
}
|
|
9461
|
-
), /* @__PURE__ */
|
|
9627
|
+
), /* @__PURE__ */ React18.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React18.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React18.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Status da Quest"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
|
|
9462
9628
|
"button",
|
|
9463
9629
|
{
|
|
9464
9630
|
type: "button",
|
|
@@ -9466,9 +9632,9 @@ function QuestDetailsPanel({
|
|
|
9466
9632
|
disabled: !canEdit,
|
|
9467
9633
|
className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 transition-colors flex items-center justify-between ${canEdit ? "hover:border-white/20 focus:ring-2 focus:ring-indigo-400/60 cursor-pointer" : "cursor-default opacity-80"}`
|
|
9468
9634
|
},
|
|
9469
|
-
/* @__PURE__ */
|
|
9470
|
-
canEdit && /* @__PURE__ */
|
|
9471
|
-
), isStatusDropdownOpen && canEdit && /* @__PURE__ */
|
|
9635
|
+
/* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS3[status] } }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, status)),
|
|
9636
|
+
canEdit && /* @__PURE__ */ React18.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
|
|
9637
|
+
), isStatusDropdownOpen && canEdit && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React18.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS3).map((s) => /* @__PURE__ */ React18.createElement(
|
|
9472
9638
|
"li",
|
|
9473
9639
|
{
|
|
9474
9640
|
key: s,
|
|
@@ -9478,21 +9644,21 @@ function QuestDetailsPanel({
|
|
|
9478
9644
|
},
|
|
9479
9645
|
className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${status === s ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
|
|
9480
9646
|
},
|
|
9481
|
-
/* @__PURE__ */
|
|
9647
|
+
/* @__PURE__ */ React18.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS3[s] } }),
|
|
9482
9648
|
s
|
|
9483
|
-
)))))), /* @__PURE__ */
|
|
9649
|
+
)))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Assignee (Respons\xE1vel)"), canEdit ? /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
|
|
9484
9650
|
"button",
|
|
9485
9651
|
{
|
|
9486
9652
|
type: "button",
|
|
9487
9653
|
onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
|
|
9488
9654
|
className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
|
|
9489
9655
|
},
|
|
9490
|
-
/* @__PURE__ */
|
|
9491
|
-
/* @__PURE__ */
|
|
9492
|
-
), isAssigneeDropdownOpen && /* @__PURE__ */
|
|
9656
|
+
/* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser3, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, isAssigneeUndefined ? "Undefined" : (assigneeMember == null ? void 0 : assigneeMember.name) || (assigneeMember == null ? void 0 : assigneeMember.email) || "Nenhum")),
|
|
9657
|
+
/* @__PURE__ */ React18.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
|
|
9658
|
+
), isAssigneeDropdownOpen && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
|
|
9493
9659
|
setIsAssigneeDropdownOpen(false);
|
|
9494
9660
|
setAssigneeSearchQuery("");
|
|
9495
|
-
} }), /* @__PURE__ */
|
|
9661
|
+
} }), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React18.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiSearch6, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React18.createElement(
|
|
9496
9662
|
"input",
|
|
9497
9663
|
{
|
|
9498
9664
|
type: "text",
|
|
@@ -9503,11 +9669,19 @@ function QuestDetailsPanel({
|
|
|
9503
9669
|
className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
|
|
9504
9670
|
onClick: (e) => e.stopPropagation()
|
|
9505
9671
|
}
|
|
9506
|
-
)), /* @__PURE__ */
|
|
9672
|
+
)), /* @__PURE__ */ React18.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React18.createElement(
|
|
9507
9673
|
"li",
|
|
9508
9674
|
{
|
|
9509
9675
|
onClick: () => {
|
|
9510
9676
|
setAssigneeId("");
|
|
9677
|
+
const newTimeline = [...timeline, {
|
|
9678
|
+
type: "assignee_changed",
|
|
9679
|
+
timestamp: Date.now(),
|
|
9680
|
+
actorId: "user",
|
|
9681
|
+
to_assignee_id: null,
|
|
9682
|
+
description: `Respons\xE1vel removido.`
|
|
9683
|
+
}];
|
|
9684
|
+
setTimeline(newTimeline);
|
|
9511
9685
|
setHasUnsavedChanges(true);
|
|
9512
9686
|
setIsAssigneeDropdownOpen(false);
|
|
9513
9687
|
setAssigneeSearchQuery("");
|
|
@@ -9515,7 +9689,7 @@ function QuestDetailsPanel({
|
|
|
9515
9689
|
className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${!assigneeId ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
|
|
9516
9690
|
},
|
|
9517
9691
|
"Nenhum"
|
|
9518
|
-
), isAssigneeUndefined && /* @__PURE__ */
|
|
9692
|
+
), isAssigneeUndefined && /* @__PURE__ */ React18.createElement(
|
|
9519
9693
|
"li",
|
|
9520
9694
|
{
|
|
9521
9695
|
onClick: () => {
|
|
@@ -9528,12 +9702,20 @@ function QuestDetailsPanel({
|
|
|
9528
9702
|
), viewMembers.filter((member) => {
|
|
9529
9703
|
const search = assigneeSearchQuery.toLowerCase();
|
|
9530
9704
|
return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
|
|
9531
|
-
}).map((member) => /* @__PURE__ */
|
|
9705
|
+
}).map((member) => /* @__PURE__ */ React18.createElement(
|
|
9532
9706
|
"li",
|
|
9533
9707
|
{
|
|
9534
9708
|
key: member.id,
|
|
9535
9709
|
onClick: () => {
|
|
9536
9710
|
setAssigneeId(member.id);
|
|
9711
|
+
const newTimeline = [...timeline, {
|
|
9712
|
+
type: "assignee_changed",
|
|
9713
|
+
timestamp: Date.now(),
|
|
9714
|
+
actorId: "user",
|
|
9715
|
+
to_assignee_id: member.id,
|
|
9716
|
+
description: `Quest atribu\xEDda para ${member.name || member.email}.`
|
|
9717
|
+
}];
|
|
9718
|
+
setTimeline(newTimeline);
|
|
9537
9719
|
setHasUnsavedChanges(true);
|
|
9538
9720
|
setIsAssigneeDropdownOpen(false);
|
|
9539
9721
|
setAssigneeSearchQuery("");
|
|
@@ -9544,7 +9726,18 @@ function QuestDetailsPanel({
|
|
|
9544
9726
|
)), viewMembers.filter((member) => {
|
|
9545
9727
|
const search = assigneeSearchQuery.toLowerCase();
|
|
9546
9728
|
return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
|
|
9547
|
-
}).length === 0 && assigneeSearchQuery && /* @__PURE__ */
|
|
9729
|
+
}).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React18.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado"))))) : /* @__PURE__ */ React18.createElement("div", { className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser3, { className: "opacity-50", size: 14 }), assigneeId ? assigneeMember ? assigneeMember.name || assigneeMember.email : "Undefined" : "Nenhum")), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement(
|
|
9730
|
+
QuestReviewStackEditor,
|
|
9731
|
+
{
|
|
9732
|
+
reviewStack,
|
|
9733
|
+
onChange: (newStack) => {
|
|
9734
|
+
setReviewStack(newStack);
|
|
9735
|
+
setHasUnsavedChanges(true);
|
|
9736
|
+
},
|
|
9737
|
+
viewMembers,
|
|
9738
|
+
readOnly: !canEdit
|
|
9739
|
+
}
|
|
9740
|
+
)), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ React18.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React18.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, canEdit && t !== "quest" && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React18.createElement(FiX7, { size: 12 })))), canEdit && /* @__PURE__ */ React18.createElement(
|
|
9548
9741
|
"input",
|
|
9549
9742
|
{
|
|
9550
9743
|
type: "text",
|
|
@@ -9565,14 +9758,18 @@ function QuestDetailsPanel({
|
|
|
9565
9758
|
placeholder: "",
|
|
9566
9759
|
autoComplete: "off"
|
|
9567
9760
|
}
|
|
9568
|
-
), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */
|
|
9761
|
+
), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React18.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React18.createElement("li", { key: index, className: "px-3 py-2 text-sm text-slate-200 cursor-pointer hover:bg-indigo-600/50", onMouseDown: (e) => {
|
|
9569
9762
|
e.preventDefault();
|
|
9570
9763
|
handleAddType(suggestedType);
|
|
9571
|
-
} }, suggestedType))))), /* @__PURE__ */
|
|
9764
|
+
} }, suggestedType))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React18.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React18.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React18.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React18.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React18.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
|
|
9572
9765
|
const isSelected = size === s;
|
|
9573
|
-
return /* @__PURE__ */
|
|
9574
|
-
}))), /* @__PURE__ */
|
|
9575
|
-
|
|
9766
|
+
return /* @__PURE__ */ React18.createElement("button", { key: s, type: "button", onClick: () => canEdit && handleSizeChange(s), className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}` }, /* @__PURE__ */ React18.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React18.createElement(FiCheck11, { size: 12, className: "text-white" })), /* @__PURE__ */ React18.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s));
|
|
9767
|
+
}))), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React18.createElement(FiPlus8, { size: 14 }), " Adicionar")), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React18.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React18.createElement("div", { ref: propsEndRef }))), timeline && timeline.length > 0 && /* @__PURE__ */ React18.createElement("div", { className: "pt-4 pb-2 border-t border-white/10 mt-4" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider mb-3" }, "Timeline & Hist\xF3rico"), /* @__PURE__ */ React18.createElement("div", { className: "relative border-l border-white/10 ml-2.5 space-y-4" }, timeline.slice().sort((a, b) => a.timestamp - b.timestamp).map((event, idx) => {
|
|
9768
|
+
const dateObj = new Date(event.timestamp);
|
|
9769
|
+
const dateString = dateObj.toLocaleDateString("pt-BR", { day: "2-digit", month: "short", hour: "2-digit", minute: "2-digit" });
|
|
9770
|
+
return /* @__PURE__ */ React18.createElement("div", { key: idx, className: "relative pl-4 flex flex-col gap-0.5" }, /* @__PURE__ */ React18.createElement("div", { className: "absolute left-[-4.5px] top-1.5 w-2 h-2 rounded-full bg-slate-400/50 border-[1.5px] border-slate-900" }), /* @__PURE__ */ React18.createElement("p", { className: "text-[11px] text-slate-300" }, event.description), /* @__PURE__ */ React18.createElement("span", { className: "text-[9px] text-slate-500 font-mono tracking-tighter" }, dateString));
|
|
9771
|
+
}))), currentDatasetName && /* @__PURE__ */ React18.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React18.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React18.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React18.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React18.createElement("button", { onClick: () => handleSave(false), disabled: isSaving, className: `px-4 py-2 rounded-lg transition-all font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)] flex items-center gap-2 ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}` }, isSaving && /* @__PURE__ */ React18.createElement(FiLoader3, { className: "animate-spin" }), isSaving ? "Salvando..." : "Salvar Quest")))
|
|
9772
|
+
), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React18.createElement(
|
|
9576
9773
|
DescriptionEditModal,
|
|
9577
9774
|
{
|
|
9578
9775
|
isOpen: isDescriptionModalOpen,
|
|
@@ -9592,7 +9789,7 @@ function QuestDetailsPanel({
|
|
|
9592
9789
|
}
|
|
9593
9790
|
|
|
9594
9791
|
// src/components/MultiNodeContextMenu.jsx
|
|
9595
|
-
import
|
|
9792
|
+
import React19, { useLayoutEffect as useLayoutEffect3, useRef as useRef15, useState as useState20, useEffect as useEffect17 } from "react";
|
|
9596
9793
|
function MultiNodeContextMenu({
|
|
9597
9794
|
data,
|
|
9598
9795
|
userRole,
|
|
@@ -9602,8 +9799,8 @@ function MultiNodeContextMenu({
|
|
|
9602
9799
|
onDeleteNodes
|
|
9603
9800
|
}) {
|
|
9604
9801
|
const menuRef = useRef15(null);
|
|
9605
|
-
const [menuPos, setMenuPos] =
|
|
9606
|
-
const [isConfirmingDelete, setIsConfirmingDelete] =
|
|
9802
|
+
const [menuPos, setMenuPos] = useState20({ left: 0, top: 0 });
|
|
9803
|
+
const [isConfirmingDelete, setIsConfirmingDelete] = useState20(false);
|
|
9607
9804
|
const ability = defineAbilityFor(userRole);
|
|
9608
9805
|
const canDelete = ability.can("delete", "Node");
|
|
9609
9806
|
useLayoutEffect3(() => {
|
|
@@ -9634,7 +9831,7 @@ function MultiNodeContextMenu({
|
|
|
9634
9831
|
const baseButtonClass = "w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md hover:bg-indigo-500/20 text-slate-200 hover:text-white transition-colors duration-150 truncate";
|
|
9635
9832
|
const deleteButtonClass = "w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md hover:bg-red-500/25 text-red-400 hover:text-red-300 transition-colors duration-150 truncate";
|
|
9636
9833
|
const nodeCount = data.nodeIds.size;
|
|
9637
|
-
return /* @__PURE__ */
|
|
9834
|
+
return /* @__PURE__ */ React19.createElement(
|
|
9638
9835
|
"div",
|
|
9639
9836
|
{
|
|
9640
9837
|
ref: menuRef,
|
|
@@ -9648,28 +9845,28 @@ function MultiNodeContextMenu({
|
|
|
9648
9845
|
onContextMenu: swallow,
|
|
9649
9846
|
onDoubleClick: swallow
|
|
9650
9847
|
},
|
|
9651
|
-
/* @__PURE__ */
|
|
9652
|
-
/* @__PURE__ */
|
|
9848
|
+
/* @__PURE__ */ React19.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }),
|
|
9849
|
+
/* @__PURE__ */ React19.createElement("div", { className: "p-1.5" }, isConfirmingDelete ? /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-3 p-2" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center text-center gap-2" }, /* @__PURE__ */ React19.createElement("div", { className: "w-10 h-10 rounded-full bg-red-500/20 flex items-center justify-center text-red-400 mb-1" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React19.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }))), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-200" }, "Excluir ", /* @__PURE__ */ React19.createElement("strong", null, nodeCount, " Nodes"), "?"), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] text-slate-400 leading-tight" }, "Esta a\xE7\xE3o \xE9 irrevers\xEDvel. Todas as conex\xF5es associadas a eles ser\xE3o apagadas.")), /* @__PURE__ */ React19.createElement("div", { className: "flex gap-2 mt-1" }, /* @__PURE__ */ React19.createElement(
|
|
9653
9850
|
"button",
|
|
9654
9851
|
{
|
|
9655
9852
|
onClick: () => setIsConfirmingDelete(false),
|
|
9656
9853
|
className: "flex-1 px-2 py-2 text-xs font-medium bg-white/10 hover:bg-white/20 rounded-md text-white transition-colors"
|
|
9657
9854
|
},
|
|
9658
9855
|
"Cancelar"
|
|
9659
|
-
), /* @__PURE__ */
|
|
9856
|
+
), /* @__PURE__ */ React19.createElement(
|
|
9660
9857
|
"button",
|
|
9661
9858
|
{
|
|
9662
9859
|
onClick: () => onDeleteNodes(data.nodeIds),
|
|
9663
9860
|
className: "flex-1 px-2 py-2 text-xs font-medium bg-red-500 hover:bg-red-600 rounded-md text-white transition-colors"
|
|
9664
9861
|
},
|
|
9665
9862
|
"Excluir"
|
|
9666
|
-
))) : /* @__PURE__ */
|
|
9863
|
+
))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_12px_1px_rgba(99,102,241,0.5)]" }), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "A\xE7\xF5es em Grupo (", nodeCount, " Nodes)")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React19.createElement("button", { onClick: () => onDismissNodes(data.nodeIds), className: baseButtonClass, title: "Remover da visualiza\xE7\xE3o" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React19.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React19.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React19.createElement("line", { x1: "2", y1: "2", x2: "22", y2: "22" })), /* @__PURE__ */ React19.createElement("span", null, "Dismiss (", nodeCount, ")")), /* @__PURE__ */ React19.createElement("button", { onClick: () => onDismissOtherNodes(data.nodeIds), className: baseButtonClass, title: "Remover outros da visualiza\xE7\xE3o" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "12", r: "3" }), /* @__PURE__ */ React19.createElement("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }), /* @__PURE__ */ React19.createElement("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React19.createElement("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }), /* @__PURE__ */ React19.createElement("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })), /* @__PURE__ */ React19.createElement("span", null, "Dismiss other nodes")), canDelete && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React19.createElement("button", { onClick: () => setIsConfirmingDelete(true), className: deleteButtonClass, title: "Excluir Nodes" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React19.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React19.createElement("line", { x1: "10", y1: "11", x2: "10", y2: "17" }), /* @__PURE__ */ React19.createElement("line", { x1: "14", y1: "11", x2: "14", y2: "17" })), /* @__PURE__ */ React19.createElement("span", null, "Excluir Nodes (", nodeCount, ")"))))))
|
|
9667
9864
|
);
|
|
9668
9865
|
}
|
|
9669
9866
|
|
|
9670
9867
|
// src/components/RelationshipDetailsPanel.jsx
|
|
9671
|
-
import
|
|
9672
|
-
import { FiPlus as
|
|
9868
|
+
import React20, { useState as useState21, useEffect as useEffect18, useRef as useRef16, useMemo as useMemo9 } from "react";
|
|
9869
|
+
import { FiPlus as FiPlus9, FiEdit2 as FiEdit29, FiLoader as FiLoader4, FiBookOpen as FiBookOpen5 } from "react-icons/fi";
|
|
9673
9870
|
function RelationshipDetailsPanel({
|
|
9674
9871
|
link,
|
|
9675
9872
|
onClose,
|
|
@@ -9683,16 +9880,16 @@ function RelationshipDetailsPanel({
|
|
|
9683
9880
|
onUploadFile,
|
|
9684
9881
|
userRole
|
|
9685
9882
|
}) {
|
|
9686
|
-
const [name, setName] =
|
|
9687
|
-
const [description, setDescription] =
|
|
9688
|
-
const [customProps, setCustomProps] =
|
|
9689
|
-
const [existingSections, setExistingSections] =
|
|
9690
|
-
const [sourceLabel, setSourceLabel] =
|
|
9691
|
-
const [targetLabel, setTargetLabel] =
|
|
9692
|
-
const [isDescriptionModalOpen, setIsDescriptionModalOpen] =
|
|
9693
|
-
const [isSaving, setIsSaving] =
|
|
9694
|
-
const [isReadMode, setIsReadMode] =
|
|
9695
|
-
const [hasUnsavedChanges, setHasUnsavedChanges] =
|
|
9883
|
+
const [name, setName] = useState21((link == null ? void 0 : link.name) ?? "");
|
|
9884
|
+
const [description, setDescription] = useState21((link == null ? void 0 : link.description) ?? "");
|
|
9885
|
+
const [customProps, setCustomProps] = useState21(() => extractCustomPropsFromNode(link || {}));
|
|
9886
|
+
const [existingSections, setExistingSections] = useState21((link == null ? void 0 : link.description_sections) || []);
|
|
9887
|
+
const [sourceLabel, setSourceLabel] = useState21((link == null ? void 0 : link.source_label) ?? "");
|
|
9888
|
+
const [targetLabel, setTargetLabel] = useState21((link == null ? void 0 : link.target_label) ?? "");
|
|
9889
|
+
const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState21(false);
|
|
9890
|
+
const [isSaving, setIsSaving] = useState21(false);
|
|
9891
|
+
const [isReadMode, setIsReadMode] = useState21(false);
|
|
9892
|
+
const [hasUnsavedChanges, setHasUnsavedChanges] = useState21(false);
|
|
9696
9893
|
const propsEndRef = useRef16(null);
|
|
9697
9894
|
const canEdit = useMemo9(() => {
|
|
9698
9895
|
const ability = defineAbilityFor(userRole);
|
|
@@ -9789,7 +9986,7 @@ function RelationshipDetailsPanel({
|
|
|
9789
9986
|
onOpenImageViewer([{ name: name2 || "Imagem", value: url }], 0);
|
|
9790
9987
|
}
|
|
9791
9988
|
};
|
|
9792
|
-
return /* @__PURE__ */
|
|
9989
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
|
|
9793
9990
|
"div",
|
|
9794
9991
|
{
|
|
9795
9992
|
className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden transition-all duration-300 ease-out
|
|
@@ -9804,7 +10001,7 @@ function RelationshipDetailsPanel({
|
|
|
9804
10001
|
onContextMenu: swallow,
|
|
9805
10002
|
onDoubleClick: swallow
|
|
9806
10003
|
},
|
|
9807
|
-
isReadMode ? /* @__PURE__ */
|
|
10004
|
+
isReadMode ? /* @__PURE__ */ React20.createElement(
|
|
9808
10005
|
DescriptionReadModePanel,
|
|
9809
10006
|
{
|
|
9810
10007
|
title: name || "Rela\xE7\xE3o",
|
|
@@ -9825,7 +10022,7 @@ function RelationshipDetailsPanel({
|
|
|
9825
10022
|
onImageClick: handleImageClickFromText,
|
|
9826
10023
|
onSaveDescription: handleSaveDescriptionInline
|
|
9827
10024
|
}
|
|
9828
|
-
) : /* @__PURE__ */
|
|
10025
|
+
) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React20.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-teal-400/80 shadow-[0_0_18px_2px_rgba(45,212,191,0.55)]" }), /* @__PURE__ */ React20.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || "Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("button", { onClick: onClose, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React20.createElement("label", { className: "text-xs text-slate-300" }, "Nome da Rela\xE7\xE3o (Opcional)"), /* @__PURE__ */ React20.createElement(
|
|
9829
10026
|
"input",
|
|
9830
10027
|
{
|
|
9831
10028
|
type: "text",
|
|
@@ -9840,7 +10037,7 @@ function RelationshipDetailsPanel({
|
|
|
9840
10037
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
9841
10038
|
`
|
|
9842
10039
|
}
|
|
9843
|
-
)), /* @__PURE__ */
|
|
10040
|
+
)), /* @__PURE__ */ React20.createElement("div", { className: "rounded-xl border border-white/8 bg-slate-800/30 p-3 space-y-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-violet-400 flex-shrink-0" }, /* @__PURE__ */ React20.createElement("path", { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }), /* @__PURE__ */ React20.createElement("line", { x1: "7", y1: "7", x2: "7.01", y2: "7" })), /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-medium text-violet-300/80 uppercase tracking-wider" }, "Labels de Agrupamento")), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-slate-400 leading-relaxed" }, "Labels agrupam conex\xF5es no menu de Conex\xF5es. Cada lado da conex\xE3o pode ter sua pr\xF3pria label."), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Source"), /* @__PURE__ */ React20.createElement(
|
|
9844
10041
|
"input",
|
|
9845
10042
|
{
|
|
9846
10043
|
type: "text",
|
|
@@ -9855,7 +10052,7 @@ function RelationshipDetailsPanel({
|
|
|
9855
10052
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
9856
10053
|
`
|
|
9857
10054
|
}
|
|
9858
|
-
)), /* @__PURE__ */
|
|
10055
|
+
)), /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Target"), /* @__PURE__ */ React20.createElement(
|
|
9859
10056
|
"input",
|
|
9860
10057
|
{
|
|
9861
10058
|
type: "text",
|
|
@@ -9870,7 +10067,7 @@ function RelationshipDetailsPanel({
|
|
|
9870
10067
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
9871
10068
|
`
|
|
9872
10069
|
}
|
|
9873
|
-
)))), /* @__PURE__ */
|
|
10070
|
+
)))), /* @__PURE__ */ React20.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React20.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React20.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React20.createElement(
|
|
9874
10071
|
DescriptionDisplay,
|
|
9875
10072
|
{
|
|
9876
10073
|
description,
|
|
@@ -9882,7 +10079,7 @@ function RelationshipDetailsPanel({
|
|
|
9882
10079
|
onImageClick: handleImageClickFromText,
|
|
9883
10080
|
onSaveDescription: handleSaveDescriptionInline
|
|
9884
10081
|
}
|
|
9885
|
-
), /* @__PURE__ */
|
|
10082
|
+
), /* @__PURE__ */ React20.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React20.createElement(
|
|
9886
10083
|
"button",
|
|
9887
10084
|
{
|
|
9888
10085
|
type: "button",
|
|
@@ -9890,8 +10087,8 @@ function RelationshipDetailsPanel({
|
|
|
9890
10087
|
className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors border-r border-white/5",
|
|
9891
10088
|
title: "Modo de Leitura"
|
|
9892
10089
|
},
|
|
9893
|
-
/* @__PURE__ */
|
|
9894
|
-
), canEdit && /* @__PURE__ */
|
|
10090
|
+
/* @__PURE__ */ React20.createElement(FiBookOpen5, { size: 14 })
|
|
10091
|
+
), canEdit && /* @__PURE__ */ React20.createElement(
|
|
9895
10092
|
"button",
|
|
9896
10093
|
{
|
|
9897
10094
|
type: "button",
|
|
@@ -9899,15 +10096,15 @@ function RelationshipDetailsPanel({
|
|
|
9899
10096
|
className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
|
|
9900
10097
|
title: "Editar descri\xE7\xE3o"
|
|
9901
10098
|
},
|
|
9902
|
-
/* @__PURE__ */
|
|
9903
|
-
)), !description && canEdit && /* @__PURE__ */
|
|
10099
|
+
/* @__PURE__ */ React20.createElement(FiEdit29, { size: 14 })
|
|
10100
|
+
)), !description && canEdit && /* @__PURE__ */ React20.createElement(
|
|
9904
10101
|
"div",
|
|
9905
10102
|
{
|
|
9906
10103
|
onClick: () => setIsDescriptionModalOpen(true),
|
|
9907
10104
|
className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
|
|
9908
10105
|
},
|
|
9909
10106
|
"Adicionar descri\xE7\xE3o..."
|
|
9910
|
-
))), /* @__PURE__ */
|
|
10107
|
+
))), /* @__PURE__ */ React20.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React20.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React20.createElement(FiPlus9, { size: 14 }), " Adicionar")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React20.createElement(
|
|
9911
10108
|
CustomPropertyDisplay,
|
|
9912
10109
|
{
|
|
9913
10110
|
key: prop.id,
|
|
@@ -9919,7 +10116,7 @@ function RelationshipDetailsPanel({
|
|
|
9919
10116
|
onUploadFile,
|
|
9920
10117
|
disabled: !canEdit
|
|
9921
10118
|
}
|
|
9922
|
-
)), /* @__PURE__ */
|
|
10119
|
+
)), /* @__PURE__ */ React20.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React20.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React20.createElement("button", { onClick: onClose, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React20.createElement(
|
|
9923
10120
|
"button",
|
|
9924
10121
|
{
|
|
9925
10122
|
onClick: () => handleSave(false),
|
|
@@ -9928,10 +10125,10 @@ function RelationshipDetailsPanel({
|
|
|
9928
10125
|
${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-teal-600 to-teal-400 hover:from-teal-500 hover:to-teal-300 text-white"}
|
|
9929
10126
|
`
|
|
9930
10127
|
},
|
|
9931
|
-
isSaving && /* @__PURE__ */
|
|
10128
|
+
isSaving && /* @__PURE__ */ React20.createElement(FiLoader4, { className: "animate-spin" }),
|
|
9932
10129
|
isSaving ? "Salvando..." : "Salvar"
|
|
9933
10130
|
)))
|
|
9934
|
-
), isDescriptionModalOpen && /* @__PURE__ */
|
|
10131
|
+
), isDescriptionModalOpen && /* @__PURE__ */ React20.createElement(
|
|
9935
10132
|
DescriptionEditModal,
|
|
9936
10133
|
{
|
|
9937
10134
|
isOpen: isDescriptionModalOpen,
|
|
@@ -9953,7 +10150,7 @@ function RelationshipDetailsPanel({
|
|
|
9953
10150
|
}
|
|
9954
10151
|
|
|
9955
10152
|
// src/components/RelationshipContextMenu.jsx
|
|
9956
|
-
import
|
|
10153
|
+
import React21, { useLayoutEffect as useLayoutEffect4, useRef as useRef17, useState as useState22, useEffect as useEffect19, useMemo as useMemo10 } from "react";
|
|
9957
10154
|
function RelationshipContextMenu({
|
|
9958
10155
|
data,
|
|
9959
10156
|
userRole,
|
|
@@ -9964,8 +10161,8 @@ function RelationshipContextMenu({
|
|
|
9964
10161
|
onClose
|
|
9965
10162
|
}) {
|
|
9966
10163
|
const menuRef = useRef17(null);
|
|
9967
|
-
const [menuPos, setMenuPos] =
|
|
9968
|
-
const [isConfirmingDelete, setIsConfirmingDelete] =
|
|
10164
|
+
const [menuPos, setMenuPos] = useState22({ left: 0, top: 0 });
|
|
10165
|
+
const [isConfirmingDelete, setIsConfirmingDelete] = useState22(false);
|
|
9969
10166
|
const ability = useMemo10(() => defineAbilityFor(userRole), [userRole]);
|
|
9970
10167
|
const sourceName = useMemo10(
|
|
9971
10168
|
() => {
|
|
@@ -10010,7 +10207,7 @@ function RelationshipContextMenu({
|
|
|
10010
10207
|
const dangerButtonClass = "w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md hover:bg-rose-500/20 text-rose-300 hover:text-rose-100 transition-colors duration-150 truncate";
|
|
10011
10208
|
const canUpdate = ability.can("update", "Connection");
|
|
10012
10209
|
const canDelete = ability.can("delete", "Connection");
|
|
10013
|
-
return /* @__PURE__ */
|
|
10210
|
+
return /* @__PURE__ */ React21.createElement(
|
|
10014
10211
|
"div",
|
|
10015
10212
|
{
|
|
10016
10213
|
ref: menuRef,
|
|
@@ -10024,29 +10221,29 @@ function RelationshipContextMenu({
|
|
|
10024
10221
|
onContextMenu: swallow,
|
|
10025
10222
|
onDoubleClick: swallow
|
|
10026
10223
|
},
|
|
10027
|
-
/* @__PURE__ */
|
|
10028
|
-
/* @__PURE__ */
|
|
10224
|
+
/* @__PURE__ */ React21.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }),
|
|
10225
|
+
/* @__PURE__ */ React21.createElement("div", { className: "p-1.5" }, isConfirmingDelete ? /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-3 p-2" }, /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col items-center text-center gap-2" }, /* @__PURE__ */ React21.createElement("div", { className: "w-10 h-10 rounded-full bg-rose-500/20 flex items-center justify-center text-rose-400 mb-1" }, /* @__PURE__ */ React21.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React21.createElement("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), /* @__PURE__ */ React21.createElement("path", { d: "M10 11v6" }), /* @__PURE__ */ React21.createElement("path", { d: "M14 11v6" }), /* @__PURE__ */ React21.createElement("path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }))), /* @__PURE__ */ React21.createElement("p", { className: "text-sm text-slate-200" }, "Excluir rela\xE7\xE3o?"), /* @__PURE__ */ React21.createElement("p", { className: "text-[11px] text-slate-400 leading-tight break-words" }, "Desconectar ", /* @__PURE__ */ React21.createElement("strong", null, sourceName), " de ", /* @__PURE__ */ React21.createElement("strong", null, targetName), ".")), /* @__PURE__ */ React21.createElement("div", { className: "flex gap-2 mt-1" }, /* @__PURE__ */ React21.createElement(
|
|
10029
10226
|
"button",
|
|
10030
10227
|
{
|
|
10031
10228
|
onClick: () => setIsConfirmingDelete(false),
|
|
10032
10229
|
className: "flex-1 px-2 py-2 text-xs font-medium bg-white/10 hover:bg-white/20 rounded-md text-white transition-colors"
|
|
10033
10230
|
},
|
|
10034
10231
|
"Cancelar"
|
|
10035
|
-
), /* @__PURE__ */
|
|
10232
|
+
), /* @__PURE__ */ React21.createElement(
|
|
10036
10233
|
"button",
|
|
10037
10234
|
{
|
|
10038
10235
|
onClick: () => onDelete == null ? void 0 : onDelete(data.linkObject),
|
|
10039
10236
|
className: "flex-1 px-2 py-2 text-xs font-medium bg-rose-600 hover:bg-rose-500 rounded-md text-white transition-colors"
|
|
10040
10237
|
},
|
|
10041
10238
|
"Excluir"
|
|
10042
|
-
))) : /* @__PURE__ */
|
|
10239
|
+
))) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React21.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-teal-400/80 shadow-[0_0_12px_1px_rgba(45,212,191,0.5)]" }), /* @__PURE__ */ React21.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Rela\xE7\xE3o")), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-1" }, canUpdate && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
10043
10240
|
"button",
|
|
10044
10241
|
{
|
|
10045
10242
|
onClick: () => onRelinkSource == null ? void 0 : onRelinkSource(data.linkObject),
|
|
10046
10243
|
className: baseButtonClass,
|
|
10047
10244
|
title: "Desconectar ponta ligada ao Source"
|
|
10048
10245
|
},
|
|
10049
|
-
/* @__PURE__ */
|
|
10246
|
+
/* @__PURE__ */ React21.createElement(
|
|
10050
10247
|
"svg",
|
|
10051
10248
|
{
|
|
10052
10249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10059,18 +10256,18 @@ function RelationshipContextMenu({
|
|
|
10059
10256
|
strokeLinecap: "round",
|
|
10060
10257
|
strokeLinejoin: "round"
|
|
10061
10258
|
},
|
|
10062
|
-
/* @__PURE__ */
|
|
10063
|
-
/* @__PURE__ */
|
|
10259
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }),
|
|
10260
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })
|
|
10064
10261
|
),
|
|
10065
|
-
/* @__PURE__ */
|
|
10066
|
-
), /* @__PURE__ */
|
|
10262
|
+
/* @__PURE__ */ React21.createElement("span", null, "Desconectar Source (", sourceName, ")")
|
|
10263
|
+
), /* @__PURE__ */ React21.createElement(
|
|
10067
10264
|
"button",
|
|
10068
10265
|
{
|
|
10069
10266
|
onClick: () => onRelinkTarget == null ? void 0 : onRelinkTarget(data.linkObject),
|
|
10070
10267
|
className: baseButtonClass,
|
|
10071
10268
|
title: "Desconectar ponta ligada ao Target"
|
|
10072
10269
|
},
|
|
10073
|
-
/* @__PURE__ */
|
|
10270
|
+
/* @__PURE__ */ React21.createElement(
|
|
10074
10271
|
"svg",
|
|
10075
10272
|
{
|
|
10076
10273
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10083,21 +10280,21 @@ function RelationshipContextMenu({
|
|
|
10083
10280
|
strokeLinecap: "round",
|
|
10084
10281
|
strokeLinejoin: "round"
|
|
10085
10282
|
},
|
|
10086
|
-
/* @__PURE__ */
|
|
10087
|
-
/* @__PURE__ */
|
|
10088
|
-
/* @__PURE__ */
|
|
10089
|
-
/* @__PURE__ */
|
|
10090
|
-
/* @__PURE__ */
|
|
10283
|
+
/* @__PURE__ */ React21.createElement("polyline", { points: "16 3 21 3 21 8" }),
|
|
10284
|
+
/* @__PURE__ */ React21.createElement("line", { x1: "4", y1: "20", x2: "21", y2: "3" }),
|
|
10285
|
+
/* @__PURE__ */ React21.createElement("polyline", { points: "21 16 21 21 16 21" }),
|
|
10286
|
+
/* @__PURE__ */ React21.createElement("line", { x1: "15", y1: "15", x2: "21", y2: "21" }),
|
|
10287
|
+
/* @__PURE__ */ React21.createElement("line", { x1: "4", y1: "4", x2: "9", y2: "9" })
|
|
10091
10288
|
),
|
|
10092
|
-
/* @__PURE__ */
|
|
10093
|
-
), /* @__PURE__ */
|
|
10289
|
+
/* @__PURE__ */ React21.createElement("span", null, "Desconectar Target (", targetName, ")")
|
|
10290
|
+
), /* @__PURE__ */ React21.createElement("div", { className: "h-[1px] my-1 mx-1 bg-white/10" })), /* @__PURE__ */ React21.createElement(
|
|
10094
10291
|
"button",
|
|
10095
10292
|
{
|
|
10096
10293
|
onClick: () => onOpenDetails == null ? void 0 : onOpenDetails(data.linkObject),
|
|
10097
10294
|
className: baseButtonClass,
|
|
10098
10295
|
title: "Abrir detalhes da rela\xE7\xE3o"
|
|
10099
10296
|
},
|
|
10100
|
-
/* @__PURE__ */
|
|
10297
|
+
/* @__PURE__ */ React21.createElement(
|
|
10101
10298
|
"svg",
|
|
10102
10299
|
{
|
|
10103
10300
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10110,19 +10307,19 @@ function RelationshipContextMenu({
|
|
|
10110
10307
|
strokeLinecap: "round",
|
|
10111
10308
|
strokeLinejoin: "round"
|
|
10112
10309
|
},
|
|
10113
|
-
/* @__PURE__ */
|
|
10114
|
-
/* @__PURE__ */
|
|
10115
|
-
/* @__PURE__ */
|
|
10310
|
+
/* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
10311
|
+
/* @__PURE__ */ React21.createElement("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
10312
|
+
/* @__PURE__ */ React21.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "8" })
|
|
10116
10313
|
),
|
|
10117
|
-
/* @__PURE__ */
|
|
10118
|
-
), canDelete && /* @__PURE__ */
|
|
10314
|
+
/* @__PURE__ */ React21.createElement("span", null, "Abrir Detalhes")
|
|
10315
|
+
), canDelete && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "h-[1px] my-1 mx-1 bg-white/10" }), /* @__PURE__ */ React21.createElement(
|
|
10119
10316
|
"button",
|
|
10120
10317
|
{
|
|
10121
10318
|
onClick: () => setIsConfirmingDelete(true),
|
|
10122
10319
|
className: dangerButtonClass,
|
|
10123
10320
|
title: "Excluir esta conex\xE3o"
|
|
10124
10321
|
},
|
|
10125
|
-
/* @__PURE__ */
|
|
10322
|
+
/* @__PURE__ */ React21.createElement(
|
|
10126
10323
|
"svg",
|
|
10127
10324
|
{
|
|
10128
10325
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10135,19 +10332,19 @@ function RelationshipContextMenu({
|
|
|
10135
10332
|
strokeLinecap: "round",
|
|
10136
10333
|
strokeLinejoin: "round"
|
|
10137
10334
|
},
|
|
10138
|
-
/* @__PURE__ */
|
|
10139
|
-
/* @__PURE__ */
|
|
10140
|
-
/* @__PURE__ */
|
|
10141
|
-
/* @__PURE__ */
|
|
10142
|
-
/* @__PURE__ */
|
|
10335
|
+
/* @__PURE__ */ React21.createElement("polyline", { points: "3 6 5 6 21 6" }),
|
|
10336
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }),
|
|
10337
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M10 11v6" }),
|
|
10338
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M14 11v6" }),
|
|
10339
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
|
|
10143
10340
|
),
|
|
10144
|
-
/* @__PURE__ */
|
|
10341
|
+
/* @__PURE__ */ React21.createElement("span", null, "Excluir conex\xE3o (", sourceName, " \u2192 ", targetName, ")")
|
|
10145
10342
|
)))))
|
|
10146
10343
|
);
|
|
10147
10344
|
}
|
|
10148
10345
|
|
|
10149
10346
|
// src/components/LoadingScreen.jsx
|
|
10150
|
-
import
|
|
10347
|
+
import React22 from "react";
|
|
10151
10348
|
var styles = {
|
|
10152
10349
|
loadingOverlay: {
|
|
10153
10350
|
position: "fixed",
|
|
@@ -10179,11 +10376,11 @@ var styles = {
|
|
|
10179
10376
|
`
|
|
10180
10377
|
};
|
|
10181
10378
|
function LoadingScreen() {
|
|
10182
|
-
return /* @__PURE__ */
|
|
10379
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("style", null, styles.keyframes), /* @__PURE__ */ React22.createElement("div", { style: styles.loadingOverlay }, /* @__PURE__ */ React22.createElement("div", { style: styles.spinner })));
|
|
10183
10380
|
}
|
|
10184
10381
|
|
|
10185
10382
|
// src/components/ImportParentFileModal.jsx
|
|
10186
|
-
import
|
|
10383
|
+
import React23, { useEffect as useEffect20, useState as useState23 } from "react";
|
|
10187
10384
|
function ImportParentFileModal({
|
|
10188
10385
|
isOpen,
|
|
10189
10386
|
onClose,
|
|
@@ -10194,11 +10391,11 @@ function ImportParentFileModal({
|
|
|
10194
10391
|
onFetchAvailableFiles,
|
|
10195
10392
|
currentViewName
|
|
10196
10393
|
}) {
|
|
10197
|
-
const [activeTab, setActiveTab] =
|
|
10198
|
-
const [availableDbs, setAvailableDbs] =
|
|
10199
|
-
const [availableViews, setAvailableViews] =
|
|
10200
|
-
const [selectedItem, setSelectedItem] =
|
|
10201
|
-
const [isLoading, setIsLoading] =
|
|
10394
|
+
const [activeTab, setActiveTab] = useState23("databases");
|
|
10395
|
+
const [availableDbs, setAvailableDbs] = useState23([]);
|
|
10396
|
+
const [availableViews, setAvailableViews] = useState23([]);
|
|
10397
|
+
const [selectedItem, setSelectedItem] = useState23(null);
|
|
10398
|
+
const [isLoading, setIsLoading] = useState23(false);
|
|
10202
10399
|
useEffect20(() => {
|
|
10203
10400
|
if (isOpen && session && onFetchAvailableFiles) {
|
|
10204
10401
|
const fetchData = async () => {
|
|
@@ -10264,13 +10461,13 @@ function ImportParentFileModal({
|
|
|
10264
10461
|
const swallow = (e) => e.stopPropagation();
|
|
10265
10462
|
const currentList = activeTab === "databases" ? availableDbs : availableViews;
|
|
10266
10463
|
const emptyMessage = activeTab === "databases" ? "Nenhum novo arquivo parent dispon\xEDvel." : "Nenhuma view dispon\xEDvel para importa\xE7\xE3o.";
|
|
10267
|
-
return /* @__PURE__ */
|
|
10464
|
+
return /* @__PURE__ */ React23.createElement(
|
|
10268
10465
|
"div",
|
|
10269
10466
|
{
|
|
10270
10467
|
className: "ui-overlay fixed inset-0 z-[1200] flex items-center justify-center bg-black/60 backdrop-blur-sm",
|
|
10271
10468
|
onClick: onClose
|
|
10272
10469
|
},
|
|
10273
|
-
/* @__PURE__ */
|
|
10470
|
+
/* @__PURE__ */ React23.createElement(
|
|
10274
10471
|
"div",
|
|
10275
10472
|
{
|
|
10276
10473
|
className: "ui-overlay relative rounded-2xl border border-white/10 bg-slate-950/80 shadow-[0_20px_80px_rgba(0,0,0,0.6)] text-white w-[min(92vw,500px)] flex flex-col max-h-[85vh]",
|
|
@@ -10282,14 +10479,14 @@ function ImportParentFileModal({
|
|
|
10282
10479
|
onContextMenu: swallow,
|
|
10283
10480
|
onDoubleClick: swallow
|
|
10284
10481
|
},
|
|
10285
|
-
/* @__PURE__ */
|
|
10482
|
+
/* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-between px-6 py-4 border-b border-white/10 flex-shrink-0" }, /* @__PURE__ */ React23.createElement("h2", { className: "text-lg font-semibold" }, "Importar"), /* @__PURE__ */ React23.createElement(
|
|
10286
10483
|
"button",
|
|
10287
10484
|
{
|
|
10288
10485
|
onClick: onClose,
|
|
10289
10486
|
className: "p-2 rounded-md text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
|
|
10290
10487
|
title: "Fechar"
|
|
10291
10488
|
},
|
|
10292
|
-
/* @__PURE__ */
|
|
10489
|
+
/* @__PURE__ */ React23.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React23.createElement(
|
|
10293
10490
|
"path",
|
|
10294
10491
|
{
|
|
10295
10492
|
fillRule: "evenodd",
|
|
@@ -10298,14 +10495,14 @@ function ImportParentFileModal({
|
|
|
10298
10495
|
}
|
|
10299
10496
|
))
|
|
10300
10497
|
)),
|
|
10301
|
-
/* @__PURE__ */
|
|
10498
|
+
/* @__PURE__ */ React23.createElement("div", { className: "flex px-6 border-b border-white/10 bg-white/5 flex-shrink-0" }, /* @__PURE__ */ React23.createElement(
|
|
10302
10499
|
"button",
|
|
10303
10500
|
{
|
|
10304
10501
|
onClick: () => setActiveTab("databases"),
|
|
10305
10502
|
className: `flex-1 py-3 text-sm font-medium border-b-2 transition-colors ${activeTab === "databases" ? "border-indigo-500 text-white" : "border-transparent text-slate-400 hover:text-slate-200"}`
|
|
10306
10503
|
},
|
|
10307
10504
|
"Arquivos Parent"
|
|
10308
|
-
), /* @__PURE__ */
|
|
10505
|
+
), /* @__PURE__ */ React23.createElement(
|
|
10309
10506
|
"button",
|
|
10310
10507
|
{
|
|
10311
10508
|
onClick: () => setActiveTab("views"),
|
|
@@ -10313,24 +10510,24 @@ function ImportParentFileModal({
|
|
|
10313
10510
|
},
|
|
10314
10511
|
"Views (Ancestralidades)"
|
|
10315
10512
|
)),
|
|
10316
|
-
/* @__PURE__ */
|
|
10513
|
+
/* @__PURE__ */ React23.createElement("div", { className: "p-6 overflow-y-auto custom-scrollbar flex-grow min-h-[200px]" }, isLoading ? /* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-center h-40" }, /* @__PURE__ */ React23.createElement("div", { className: "w-8 h-8 border-4 border-t-indigo-500 border-slate-700 rounded-full animate-spin" })) : /* @__PURE__ */ React23.createElement("div", { className: "space-y-2" }, currentList.length > 0 ? currentList.map((item) => /* @__PURE__ */ React23.createElement(
|
|
10317
10514
|
"div",
|
|
10318
10515
|
{
|
|
10319
10516
|
key: item.id,
|
|
10320
10517
|
onClick: () => setSelectedItem(item),
|
|
10321
10518
|
className: `px-4 py-3 rounded-lg border cursor-pointer transition-all duration-150 flex flex-col gap-1 ${(selectedItem == null ? void 0 : selectedItem.id) === item.id ? "bg-indigo-600 border-indigo-500 shadow-lg" : "bg-slate-800/60 border-white/10 hover:border-white/20 hover:bg-slate-800"}`
|
|
10322
10519
|
},
|
|
10323
|
-
/* @__PURE__ */
|
|
10324
|
-
item.description && /* @__PURE__ */
|
|
10325
|
-
)) : /* @__PURE__ */
|
|
10326
|
-
/* @__PURE__ */
|
|
10520
|
+
/* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React23.createElement("span", { className: "font-medium text-slate-100" }, item.name), activeTab === "views" && /* @__PURE__ */ React23.createElement("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-black/30 text-indigo-300 border border-indigo-500/30" }, "VIEW")),
|
|
10521
|
+
item.description && /* @__PURE__ */ React23.createElement("p", { className: `text-xs ${(selectedItem == null ? void 0 : selectedItem.id) === item.id ? "text-indigo-200" : "text-slate-400"}` }, item.description)
|
|
10522
|
+
)) : /* @__PURE__ */ React23.createElement("p", { className: "text-slate-400 text-center py-10" }, emptyMessage))),
|
|
10523
|
+
/* @__PURE__ */ React23.createElement("div", { className: "px-6 py-4 border-t border-white/10 flex justify-end gap-3 flex-shrink-0 bg-slate-900/50" }, /* @__PURE__ */ React23.createElement(
|
|
10327
10524
|
"button",
|
|
10328
10525
|
{
|
|
10329
10526
|
onClick: onClose,
|
|
10330
10527
|
className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm text-slate-300"
|
|
10331
10528
|
},
|
|
10332
10529
|
"Cancelar"
|
|
10333
|
-
), /* @__PURE__ */
|
|
10530
|
+
), /* @__PURE__ */ React23.createElement(
|
|
10334
10531
|
"button",
|
|
10335
10532
|
{
|
|
10336
10533
|
onClick: handleConfirm,
|
|
@@ -10344,7 +10541,7 @@ function ImportParentFileModal({
|
|
|
10344
10541
|
}
|
|
10345
10542
|
|
|
10346
10543
|
// src/components/AncestryLinkDetailsPanel.jsx
|
|
10347
|
-
import
|
|
10544
|
+
import React24, { useState as useState24 } from "react";
|
|
10348
10545
|
import { FiBookOpen as FiBookOpen6 } from "react-icons/fi";
|
|
10349
10546
|
function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenReference, onMentionClick, onUploadFile }) {
|
|
10350
10547
|
var _a, _b, _c, _d;
|
|
@@ -10354,21 +10551,21 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
10354
10551
|
const customProps = extractCustomPropsFromNode(relationshipData);
|
|
10355
10552
|
const sourceName = ((_b = (_a = data.sourceNode) == null ? void 0 : _a.userData) == null ? void 0 : _b.name) || "Origem";
|
|
10356
10553
|
const targetName = ((_d = (_c = data.targetNode) == null ? void 0 : _c.userData) == null ? void 0 : _d.name) || "Destino";
|
|
10357
|
-
const [isReadMode, setIsReadMode] =
|
|
10554
|
+
const [isReadMode, setIsReadMode] = useState24(false);
|
|
10358
10555
|
const swallow = (e) => e.stopPropagation();
|
|
10359
10556
|
const handleImageClickFromText = (url, name) => {
|
|
10360
10557
|
if (onOpenImageViewer) {
|
|
10361
10558
|
onOpenImageViewer([{ name: name || "Imagem", value: url }], 0);
|
|
10362
10559
|
}
|
|
10363
10560
|
};
|
|
10364
|
-
return /* @__PURE__ */
|
|
10561
|
+
return /* @__PURE__ */ React24.createElement(
|
|
10365
10562
|
"div",
|
|
10366
10563
|
{
|
|
10367
10564
|
className: "ui-overlay fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-[1200]",
|
|
10368
10565
|
onClick: onClose,
|
|
10369
10566
|
onPointerDown: swallow
|
|
10370
10567
|
},
|
|
10371
|
-
/* @__PURE__ */
|
|
10568
|
+
/* @__PURE__ */ React24.createElement(
|
|
10372
10569
|
"div",
|
|
10373
10570
|
{
|
|
10374
10571
|
className: `relative group rounded-2xl border border-white/10 bg-slate-950/80 shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col max-h-[calc(100vh-4rem)] transition-all duration-300 ease-out
|
|
@@ -10376,7 +10573,7 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
10376
10573
|
`,
|
|
10377
10574
|
onClick: swallow
|
|
10378
10575
|
},
|
|
10379
|
-
isReadMode ? /* @__PURE__ */
|
|
10576
|
+
isReadMode ? /* @__PURE__ */ React24.createElement(
|
|
10380
10577
|
DescriptionReadModePanel,
|
|
10381
10578
|
{
|
|
10382
10579
|
title: `${sourceName} \u2794 ${targetName}`,
|
|
@@ -10388,15 +10585,15 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
10388
10585
|
onMentionClick,
|
|
10389
10586
|
onImageClick: handleImageClickFromText
|
|
10390
10587
|
}
|
|
10391
|
-
) : /* @__PURE__ */
|
|
10588
|
+
) : /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ React24.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React24.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React24.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ React24.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ React24.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "truncate max-w-[150px]" }, sourceName), /* @__PURE__ */ React24.createElement("span", { className: "text-slate-500 text-sm" }, "\u2794"), /* @__PURE__ */ React24.createElement("span", { className: "truncate max-w-[150px]" }, targetName))), /* @__PURE__ */ React24.createElement("button", { onClick: onClose, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React24.createElement("div", { className: "px-6 pb-6 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, description && /* @__PURE__ */ React24.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React24.createElement("label", { className: "text-xs text-slate-300 font-medium" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React24.createElement(
|
|
10392
10589
|
"button",
|
|
10393
10590
|
{
|
|
10394
10591
|
onClick: () => setIsReadMode(true),
|
|
10395
10592
|
className: "p-1 text-slate-400 hover:text-white transition-colors",
|
|
10396
10593
|
title: "Modo de Leitura"
|
|
10397
10594
|
},
|
|
10398
|
-
/* @__PURE__ */
|
|
10399
|
-
)), /* @__PURE__ */
|
|
10595
|
+
/* @__PURE__ */ React24.createElement(FiBookOpen6, { size: 14 })
|
|
10596
|
+
)), /* @__PURE__ */ React24.createElement("div", { className: "bg-slate-800/40 rounded-lg border border-white/10 p-1 relative group" }, /* @__PURE__ */ React24.createElement(
|
|
10400
10597
|
DescriptionDisplay,
|
|
10401
10598
|
{
|
|
10402
10599
|
description,
|
|
@@ -10405,7 +10602,7 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
10405
10602
|
onMentionClick,
|
|
10406
10603
|
onImageClick: handleImageClickFromText
|
|
10407
10604
|
}
|
|
10408
|
-
))), customProps.length > 0 && /* @__PURE__ */
|
|
10605
|
+
))), customProps.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React24.createElement("label", { className: "text-xs text-slate-300 font-medium mb-2 block" }, "Propriedades"), /* @__PURE__ */ React24.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop) => /* @__PURE__ */ React24.createElement(
|
|
10409
10606
|
CustomPropertyDisplay,
|
|
10410
10607
|
{
|
|
10411
10608
|
key: prop.id,
|
|
@@ -10414,25 +10611,25 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
10414
10611
|
onOpenImageViewer,
|
|
10415
10612
|
onUploadFile
|
|
10416
10613
|
}
|
|
10417
|
-
)))), !description && customProps.length === 0 && /* @__PURE__ */
|
|
10614
|
+
)))), !description && customProps.length === 0 && /* @__PURE__ */ React24.createElement("div", { className: "py-8 text-center text-slate-500 text-sm italic border border-dashed border-white/10 rounded-lg" }, "Nenhum detalhe adicional dispon\xEDvel para esta conex\xE3o."), /* @__PURE__ */ React24.createElement("div", { className: "mt-4 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg text-xs text-blue-200/80 text-center" }, 'Para editar esta conex\xE3o, utilize o menu "Editar Ancestralidade".')))
|
|
10418
10615
|
)
|
|
10419
10616
|
);
|
|
10420
10617
|
}
|
|
10421
10618
|
|
|
10422
10619
|
// src/components/AncestryBoard.jsx
|
|
10423
|
-
import
|
|
10620
|
+
import React25, { useState as useState25, useMemo as useMemo11, useEffect as useEffect21, useRef as useRef18 } from "react";
|
|
10424
10621
|
import {
|
|
10425
|
-
FiSearch as
|
|
10622
|
+
FiSearch as FiSearch7,
|
|
10426
10623
|
FiLayers as FiLayers6,
|
|
10427
10624
|
FiCornerUpRight as FiCornerUpRight4,
|
|
10428
10625
|
FiPlay,
|
|
10429
|
-
FiPlus as
|
|
10626
|
+
FiPlus as FiPlus10,
|
|
10430
10627
|
FiTrash2 as FiTrash23,
|
|
10431
10628
|
FiArrowLeft as FiArrowLeft3,
|
|
10432
10629
|
FiArrowRight,
|
|
10433
10630
|
FiCheckCircle,
|
|
10434
10631
|
FiLoader as FiLoader5,
|
|
10435
|
-
FiX as
|
|
10632
|
+
FiX as FiX8,
|
|
10436
10633
|
FiAlertTriangle
|
|
10437
10634
|
} from "react-icons/fi";
|
|
10438
10635
|
var GroupItem = ({
|
|
@@ -10464,7 +10661,7 @@ var GroupItem = ({
|
|
|
10464
10661
|
useEffect21(() => {
|
|
10465
10662
|
adjustHeight();
|
|
10466
10663
|
}, [group.text]);
|
|
10467
|
-
return /* @__PURE__ */
|
|
10664
|
+
return /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col gap-2 mb-3 pl-3 border-l border-white/10 relative group/item animate-in fade-in slide-in-from-left-2 duration-300" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute -left-[1px] top-4 w-2 h-px bg-white/20" }), /* @__PURE__ */ React25.createElement(
|
|
10468
10665
|
"div",
|
|
10469
10666
|
{
|
|
10470
10667
|
className: `
|
|
@@ -10472,7 +10669,7 @@ var GroupItem = ({
|
|
|
10472
10669
|
${isPickingForThisGroup ? "bg-indigo-500/10 border-l-2 border-indigo-500" : "hover:bg-white/5 border-l-2 border-transparent hover:border-white/20"}
|
|
10473
10670
|
`
|
|
10474
10671
|
},
|
|
10475
|
-
/* @__PURE__ */
|
|
10672
|
+
/* @__PURE__ */ React25.createElement(
|
|
10476
10673
|
"textarea",
|
|
10477
10674
|
{
|
|
10478
10675
|
ref: textareaRef,
|
|
@@ -10490,9 +10687,9 @@ var GroupItem = ({
|
|
|
10490
10687
|
}
|
|
10491
10688
|
}
|
|
10492
10689
|
),
|
|
10493
|
-
group.ancestries && group.ancestries.length > 0 && /* @__PURE__ */
|
|
10690
|
+
group.ancestries && group.ancestries.length > 0 && /* @__PURE__ */ React25.createElement("div", { className: "flex flex-wrap gap-2 mt-1" }, group.ancestries.map((anc) => {
|
|
10494
10691
|
const isValid = availableIds.has(String(anc.ancestry_id));
|
|
10495
|
-
return /* @__PURE__ */
|
|
10692
|
+
return /* @__PURE__ */ React25.createElement(
|
|
10496
10693
|
"div",
|
|
10497
10694
|
{
|
|
10498
10695
|
key: anc.ancestry_id,
|
|
@@ -10504,40 +10701,40 @@ var GroupItem = ({
|
|
|
10504
10701
|
},
|
|
10505
10702
|
isValid ? (
|
|
10506
10703
|
// [MANTIDO] Botão Play visível para todos
|
|
10507
|
-
/* @__PURE__ */
|
|
10704
|
+
/* @__PURE__ */ React25.createElement(
|
|
10508
10705
|
"button",
|
|
10509
10706
|
{
|
|
10510
10707
|
onClick: () => onPlayAncestry(anc.ancestry_id),
|
|
10511
10708
|
className: "text-indigo-400 hover:text-white hover:bg-indigo-500 p-1 rounded-full transition-colors",
|
|
10512
10709
|
title: "Renderizar no cen\xE1rio"
|
|
10513
10710
|
},
|
|
10514
|
-
/* @__PURE__ */
|
|
10711
|
+
/* @__PURE__ */ React25.createElement(FiPlay, { size: 10, className: "ml-0.5 fill-current" })
|
|
10515
10712
|
)
|
|
10516
|
-
) : /* @__PURE__ */
|
|
10517
|
-
/* @__PURE__ */
|
|
10713
|
+
) : /* @__PURE__ */ React25.createElement("div", { className: "p-1 text-red-500 cursor-not-allowed" }, /* @__PURE__ */ React25.createElement(FiAlertTriangle, { size: 10 })),
|
|
10714
|
+
/* @__PURE__ */ React25.createElement(
|
|
10518
10715
|
"span",
|
|
10519
10716
|
{
|
|
10520
10717
|
className: `font-medium truncate max-w-[150px] ${!isValid && "line-through decoration-red-500/50"}`
|
|
10521
10718
|
},
|
|
10522
10719
|
anc.name
|
|
10523
10720
|
),
|
|
10524
|
-
canEdit && /* @__PURE__ */
|
|
10721
|
+
canEdit && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
10525
10722
|
"div",
|
|
10526
10723
|
{
|
|
10527
10724
|
className: `w-px h-3 mx-0.5 ${isValid ? "bg-white/10" : "bg-red-500/20"}`
|
|
10528
10725
|
}
|
|
10529
|
-
), /* @__PURE__ */
|
|
10726
|
+
), /* @__PURE__ */ React25.createElement(
|
|
10530
10727
|
"button",
|
|
10531
10728
|
{
|
|
10532
10729
|
onClick: () => onRemoveAncestry(group.id, anc.ancestry_id),
|
|
10533
10730
|
className: `${isValid ? "text-slate-500 hover:text-red-400" : "text-red-400 hover:text-red-200"} p-0.5 rounded transition-colors`,
|
|
10534
10731
|
title: "Remover men\xE7\xE3o"
|
|
10535
10732
|
},
|
|
10536
|
-
/* @__PURE__ */
|
|
10733
|
+
/* @__PURE__ */ React25.createElement(FiX8, { size: 12 })
|
|
10537
10734
|
))
|
|
10538
10735
|
);
|
|
10539
10736
|
})),
|
|
10540
|
-
canEdit && /* @__PURE__ */
|
|
10737
|
+
canEdit && /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between pt-2 mt-1 border-t border-white/5 opacity-40 group-hover/item:opacity-100 transition-opacity" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React25.createElement(
|
|
10541
10738
|
"button",
|
|
10542
10739
|
{
|
|
10543
10740
|
onClick: () => onRequestPickAncestry(group.id),
|
|
@@ -10547,17 +10744,17 @@ var GroupItem = ({
|
|
|
10547
10744
|
`,
|
|
10548
10745
|
title: "Adicionar Ancestralidade a este grupo"
|
|
10549
10746
|
},
|
|
10550
|
-
isPickingForThisGroup ? /* @__PURE__ */
|
|
10747
|
+
isPickingForThisGroup ? /* @__PURE__ */ React25.createElement(FiCheckCircle, { size: 12 }) : /* @__PURE__ */ React25.createElement(FiSearch7, { size: 12 }),
|
|
10551
10748
|
isPickingForThisGroup ? "Selecionando..." : "Adicionar"
|
|
10552
|
-
), /* @__PURE__ */
|
|
10749
|
+
), /* @__PURE__ */ React25.createElement(
|
|
10553
10750
|
"button",
|
|
10554
10751
|
{
|
|
10555
10752
|
onClick: () => onAddSubgroup(group.id),
|
|
10556
10753
|
className: "p-1.5 text-slate-500 hover:text-white hover:bg-white/10 rounded transition-colors",
|
|
10557
10754
|
title: "Criar Subgrupo"
|
|
10558
10755
|
},
|
|
10559
|
-
/* @__PURE__ */
|
|
10560
|
-
)), /* @__PURE__ */
|
|
10756
|
+
/* @__PURE__ */ React25.createElement(FiPlus10, { size: 14 })
|
|
10757
|
+
)), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React25.createElement(
|
|
10561
10758
|
"button",
|
|
10562
10759
|
{
|
|
10563
10760
|
onClick: () => onIndent(group.id),
|
|
@@ -10565,25 +10762,25 @@ var GroupItem = ({
|
|
|
10565
10762
|
className: `p-1.5 rounded transition-colors ${!canIndent ? "text-slate-800 cursor-not-allowed" : "text-slate-500 hover:text-white hover:bg-white/10"}`,
|
|
10566
10763
|
title: "Aninhar no grupo acima"
|
|
10567
10764
|
},
|
|
10568
|
-
/* @__PURE__ */
|
|
10569
|
-
), /* @__PURE__ */
|
|
10765
|
+
/* @__PURE__ */ React25.createElement(FiArrowRight, { size: 14 })
|
|
10766
|
+
), /* @__PURE__ */ React25.createElement(
|
|
10570
10767
|
"button",
|
|
10571
10768
|
{
|
|
10572
10769
|
onClick: () => onOutdent(group.id),
|
|
10573
10770
|
className: "p-1.5 text-slate-500 hover:text-white hover:bg-white/10 rounded transition-colors",
|
|
10574
10771
|
title: "Desaninhar"
|
|
10575
10772
|
},
|
|
10576
|
-
/* @__PURE__ */
|
|
10577
|
-
), /* @__PURE__ */
|
|
10773
|
+
/* @__PURE__ */ React25.createElement(FiArrowLeft3, { size: 14 })
|
|
10774
|
+
), /* @__PURE__ */ React25.createElement("div", { className: "w-px h-3 bg-white/10 mx-1" }), /* @__PURE__ */ React25.createElement(
|
|
10578
10775
|
"button",
|
|
10579
10776
|
{
|
|
10580
10777
|
onClick: () => onDelete(group.id),
|
|
10581
10778
|
className: "p-1.5 text-slate-600 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors",
|
|
10582
10779
|
title: "Remover Grupo"
|
|
10583
10780
|
},
|
|
10584
|
-
/* @__PURE__ */
|
|
10781
|
+
/* @__PURE__ */ React25.createElement(FiTrash23, { size: 14 })
|
|
10585
10782
|
)))
|
|
10586
|
-
), group.children && group.children.length > 0 && /* @__PURE__ */
|
|
10783
|
+
), group.children && group.children.length > 0 && /* @__PURE__ */ React25.createElement("div", { className: "ml-2" }, group.children.map((childGroup, idx) => /* @__PURE__ */ React25.createElement(
|
|
10587
10784
|
GroupItem,
|
|
10588
10785
|
{
|
|
10589
10786
|
key: childGroup.id,
|
|
@@ -10615,11 +10812,11 @@ function AncestryBoard({
|
|
|
10615
10812
|
userRole
|
|
10616
10813
|
// [NOVO] Recebe a role do usuário
|
|
10617
10814
|
}) {
|
|
10618
|
-
const [searchTerm, setSearchTerm] =
|
|
10619
|
-
const [groups, setGroups] =
|
|
10620
|
-
const [isLoaded, setIsLoaded] =
|
|
10621
|
-
const [pickingGroupId, setPickingGroupId] =
|
|
10622
|
-
const [saveStatus, setSaveStatus] =
|
|
10815
|
+
const [searchTerm, setSearchTerm] = useState25("");
|
|
10816
|
+
const [groups, setGroups] = useState25([]);
|
|
10817
|
+
const [isLoaded, setIsLoaded] = useState25(false);
|
|
10818
|
+
const [pickingGroupId, setPickingGroupId] = useState25(null);
|
|
10819
|
+
const [saveStatus, setSaveStatus] = useState25("idle");
|
|
10623
10820
|
const canEdit = useMemo11(() => {
|
|
10624
10821
|
return userRole !== "viewer";
|
|
10625
10822
|
}, [userRole]);
|
|
@@ -10838,33 +11035,33 @@ function AncestryBoard({
|
|
|
10838
11035
|
});
|
|
10839
11036
|
};
|
|
10840
11037
|
if (!isOpen) return null;
|
|
10841
|
-
return /* @__PURE__ */
|
|
11038
|
+
return /* @__PURE__ */ React25.createElement(
|
|
10842
11039
|
"div",
|
|
10843
11040
|
{
|
|
10844
11041
|
className: "fixed inset-0 z-[2200] bg-black/80 backdrop-blur-sm flex items-center justify-center p-2",
|
|
10845
11042
|
onClick: onClose
|
|
10846
11043
|
},
|
|
10847
|
-
/* @__PURE__ */
|
|
11044
|
+
/* @__PURE__ */ React25.createElement(
|
|
10848
11045
|
"div",
|
|
10849
11046
|
{
|
|
10850
11047
|
className: "bg-slate-950 border border-white/10 rounded-xl w-[98vw] h-[97vh] flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-200",
|
|
10851
11048
|
onClick: (e) => e.stopPropagation()
|
|
10852
11049
|
},
|
|
10853
|
-
/* @__PURE__ */
|
|
11050
|
+
/* @__PURE__ */ React25.createElement("div", { className: "h-14 px-4 border-b border-white/10 bg-slate-900/90 flex items-center justify-between shrink-0" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React25.createElement("h3", { className: "text-base font-semibold text-white flex items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ React25.createElement(FiLayers6, { className: "text-indigo-400" }), "Ancestry Board"), saveStatus !== "idle" && /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-2 animate-in fade-in slide-in-from-left-2 duration-300" }, /* @__PURE__ */ React25.createElement("div", { className: "w-px h-4 bg-white/10 mx-1" }), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-slate-900/50 border border-white/5" }, saveStatus === "saving" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
10854
11051
|
FiLoader5,
|
|
10855
11052
|
{
|
|
10856
11053
|
className: "animate-spin text-indigo-400",
|
|
10857
11054
|
size: 12
|
|
10858
11055
|
}
|
|
10859
|
-
), /* @__PURE__ */
|
|
11056
|
+
), /* @__PURE__ */ React25.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-indigo-300" }, "Salvando")), saveStatus === "saved" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(FiCheckCircle, { className: "text-emerald-400", size: 12 }), /* @__PURE__ */ React25.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-slate-400" }, "Salvo")), saveStatus === "error" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("span", { className: "w-2 h-2 rounded-full bg-red-500" }), /* @__PURE__ */ React25.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-red-400" }, "Erro"))))), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-3" }, pickingGroupId && /* @__PURE__ */ React25.createElement("span", { className: "text-xs text-indigo-300 font-medium animate-pulse hidden sm:inline-block mr-2" }, "Selecione na lateral..."), canEdit && /* @__PURE__ */ React25.createElement(
|
|
10860
11057
|
"button",
|
|
10861
11058
|
{
|
|
10862
11059
|
onClick: handleAddRootGroup,
|
|
10863
11060
|
className: "\n flex items-center gap-2 px-3 py-1.5 \n bg-white/5 hover:bg-white/10 \n border border-white/10 hover:border-white/20\n backdrop-blur-sm\n text-slate-200 hover:text-white\n rounded-md transition-all duration-200\n text-xs font-medium shadow-sm\n "
|
|
10864
11061
|
},
|
|
10865
|
-
/* @__PURE__ */
|
|
10866
|
-
/* @__PURE__ */
|
|
10867
|
-
), /* @__PURE__ */
|
|
11062
|
+
/* @__PURE__ */ React25.createElement(FiPlus10, { size: 14, className: "text-indigo-400" }),
|
|
11063
|
+
/* @__PURE__ */ React25.createElement("span", { className: "hidden sm:inline" }, "Novo Grupo")
|
|
11064
|
+
), /* @__PURE__ */ React25.createElement(
|
|
10868
11065
|
"button",
|
|
10869
11066
|
{
|
|
10870
11067
|
onClick: onClose,
|
|
@@ -10872,7 +11069,7 @@ function AncestryBoard({
|
|
|
10872
11069
|
},
|
|
10873
11070
|
"\xD7"
|
|
10874
11071
|
))),
|
|
10875
|
-
/* @__PURE__ */
|
|
11072
|
+
/* @__PURE__ */ React25.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React25.createElement(
|
|
10876
11073
|
"div",
|
|
10877
11074
|
{
|
|
10878
11075
|
className: `
|
|
@@ -10881,12 +11078,12 @@ function AncestryBoard({
|
|
|
10881
11078
|
min-w-[280px] max-w-[500px] bg-slate-900
|
|
10882
11079
|
`
|
|
10883
11080
|
},
|
|
10884
|
-
/* @__PURE__ */
|
|
10885
|
-
|
|
11081
|
+
/* @__PURE__ */ React25.createElement("div", { className: "p-3 border-b border-white/5 bg-slate-900/50" }, /* @__PURE__ */ React25.createElement("div", { className: "relative group" }, /* @__PURE__ */ React25.createElement(
|
|
11082
|
+
FiSearch7,
|
|
10886
11083
|
{
|
|
10887
11084
|
className: `absolute left-3 top-1/2 -translate-y-1/2 transition-colors ${pickingGroupId ? "text-indigo-400" : "text-slate-500 group-focus-within:text-indigo-400"}`
|
|
10888
11085
|
}
|
|
10889
|
-
), /* @__PURE__ */
|
|
11086
|
+
), /* @__PURE__ */ React25.createElement(
|
|
10890
11087
|
"input",
|
|
10891
11088
|
{
|
|
10892
11089
|
type: "text",
|
|
@@ -10900,10 +11097,10 @@ function AncestryBoard({
|
|
|
10900
11097
|
autoFocus: !pickingGroupId
|
|
10901
11098
|
}
|
|
10902
11099
|
))),
|
|
10903
|
-
/* @__PURE__ */
|
|
11100
|
+
/* @__PURE__ */ React25.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, filtered.map((anc) => {
|
|
10904
11101
|
const parentNodeName = nodeNamesMap.get(String(anc.ancestral_node)) || "Node Desconhecido";
|
|
10905
11102
|
const isPicking = !!pickingGroupId;
|
|
10906
|
-
return /* @__PURE__ */
|
|
11103
|
+
return /* @__PURE__ */ React25.createElement(
|
|
10907
11104
|
"div",
|
|
10908
11105
|
{
|
|
10909
11106
|
key: anc.ancestry_id,
|
|
@@ -10915,7 +11112,7 @@ function AncestryBoard({
|
|
|
10915
11112
|
${isPicking ? "border-indigo-500/30 bg-indigo-500/5 hover:bg-indigo-500/20 hover:border-indigo-400 cursor-pointer" : "border-white/5 bg-slate-800/40 hover:bg-indigo-600/10 hover:border-indigo-500/30 cursor-default"}
|
|
10916
11113
|
`
|
|
10917
11114
|
},
|
|
10918
|
-
/* @__PURE__ */
|
|
11115
|
+
/* @__PURE__ */ React25.createElement(
|
|
10919
11116
|
"div",
|
|
10920
11117
|
{
|
|
10921
11118
|
className: `
|
|
@@ -10923,10 +11120,10 @@ function AncestryBoard({
|
|
|
10923
11120
|
${isPicking ? "bg-indigo-500 text-white border-indigo-400" : "bg-slate-800 text-indigo-400 border-white/5 group-hover:bg-indigo-500 group-hover:text-white"}
|
|
10924
11121
|
`
|
|
10925
11122
|
},
|
|
10926
|
-
isPicking ? /* @__PURE__ */
|
|
11123
|
+
isPicking ? /* @__PURE__ */ React25.createElement(FiPlus10, { size: 16 }) : /* @__PURE__ */ React25.createElement(FiLayers6, { size: 14 })
|
|
10927
11124
|
),
|
|
10928
|
-
/* @__PURE__ */
|
|
10929
|
-
!isPicking && /* @__PURE__ */
|
|
11125
|
+
/* @__PURE__ */ React25.createElement("div", { className: "flex-1 min-w-0 pb-2" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React25.createElement("h4", { className: "text-sm font-medium text-slate-200 group-hover:text-white truncate transition-colors" }, anc.name || "Sem Nome"), anc.is_private && /* @__PURE__ */ React25.createElement("span", { className: "text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-300 border border-amber-500/20" }, "Priv")), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1.5 mt-0.5 text-[11px] text-slate-500 group-hover:text-indigo-200/70 transition-colors" }, /* @__PURE__ */ React25.createElement(FiCornerUpRight4, { size: 10 }), /* @__PURE__ */ React25.createElement("span", { className: "truncate max-w-[120px]" }, parentNodeName)), anc.description && /* @__PURE__ */ React25.createElement("p", { className: "mt-1.5 text-[11px] text-slate-400 line-clamp-2 leading-relaxed opacity-80" }, anc.description)),
|
|
11126
|
+
!isPicking && /* @__PURE__ */ React25.createElement(
|
|
10930
11127
|
"button",
|
|
10931
11128
|
{
|
|
10932
11129
|
onClick: (e) => {
|
|
@@ -10936,11 +11133,11 @@ function AncestryBoard({
|
|
|
10936
11133
|
className: "absolute right-2 bottom-2 opacity-0 group-hover:opacity-100 transition-all duration-300 transform translate-y-2 group-hover:translate-y-0 z-10",
|
|
10937
11134
|
title: "Renderizar Ancestralidade"
|
|
10938
11135
|
},
|
|
10939
|
-
/* @__PURE__ */
|
|
11136
|
+
/* @__PURE__ */ React25.createElement("div", { className: "bg-indigo-500 text-white p-2 rounded-full shadow-lg hover:bg-indigo-400 hover:scale-110 transition-all" }, /* @__PURE__ */ React25.createElement(FiPlay, { size: 14, className: "ml-0.5" }))
|
|
10940
11137
|
)
|
|
10941
11138
|
);
|
|
10942
11139
|
}))
|
|
10943
|
-
), /* @__PURE__ */
|
|
11140
|
+
), /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col flex-1 bg-slate-950/30" }, /* @__PURE__ */ React25.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 space-y-4" }, groups.length === 0 ? /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col items-center justify-center h-full text-slate-500 gap-3 border-2 border-dashed border-white/5 rounded-xl m-4 bg-slate-900/20" }, /* @__PURE__ */ React25.createElement(FiLayers6, { size: 24, className: "opacity-20" }), /* @__PURE__ */ React25.createElement("p", { className: "text-xs text-center px-4" }, canEdit ? /* @__PURE__ */ React25.createElement(React25.Fragment, null, "Nenhum grupo criado.", /* @__PURE__ */ React25.createElement("br", null), 'Use o bot\xE3o "Novo Grupo" acima.') : /* @__PURE__ */ React25.createElement(React25.Fragment, null, "Nenhum grupo dispon\xEDvel para visualiza\xE7\xE3o."))) : groups.map((group, index) => /* @__PURE__ */ React25.createElement(
|
|
10944
11141
|
GroupItem,
|
|
10945
11142
|
{
|
|
10946
11143
|
key: group.id,
|
|
@@ -10960,7 +11157,7 @@ function AncestryBoard({
|
|
|
10960
11157
|
canEdit
|
|
10961
11158
|
}
|
|
10962
11159
|
))))),
|
|
10963
|
-
/* @__PURE__ */
|
|
11160
|
+
/* @__PURE__ */ React25.createElement("div", { className: "px-5 py-2 border-t border-white/10 bg-slate-950/50 text-xs text-slate-500 flex justify-between flex-shrink-0" }, /* @__PURE__ */ React25.createElement("span", null, filtered.length, " itens encontrados"), /* @__PURE__ */ React25.createElement("span", null, groups.length, " grupos raiz"))
|
|
10964
11161
|
)
|
|
10965
11162
|
);
|
|
10966
11163
|
}
|
|
@@ -11118,42 +11315,42 @@ function XViewScene({
|
|
|
11118
11315
|
const sceneDataRef = useRef19(null);
|
|
11119
11316
|
const parentDataRef = useRef19(null);
|
|
11120
11317
|
const ancestryDataRef = useRef19(null);
|
|
11121
|
-
const [isLoading, setIsLoading] =
|
|
11122
|
-
const [permissionStatus, setPermissionStatus] =
|
|
11123
|
-
const [userPermissionRole, setUserPermissionRole] =
|
|
11124
|
-
const [viewMembers, setViewMembers] =
|
|
11125
|
-
const [isInitialized, setIsInitialized] =
|
|
11126
|
-
const [sceneVersion, setSceneVersion] =
|
|
11127
|
-
const [contextMenu, setContextMenu] =
|
|
11318
|
+
const [isLoading, setIsLoading] = useState26(true);
|
|
11319
|
+
const [permissionStatus, setPermissionStatus] = useState26("loading");
|
|
11320
|
+
const [userPermissionRole, setUserPermissionRole] = useState26(null);
|
|
11321
|
+
const [viewMembers, setViewMembers] = useState26([]);
|
|
11322
|
+
const [isInitialized, setIsInitialized] = useState26(false);
|
|
11323
|
+
const [sceneVersion, setSceneVersion] = useState26(0);
|
|
11324
|
+
const [contextMenu, setContextMenu] = useState26({
|
|
11128
11325
|
visible: false,
|
|
11129
11326
|
x: 0,
|
|
11130
11327
|
y: 0,
|
|
11131
11328
|
nodeData: null
|
|
11132
11329
|
});
|
|
11133
|
-
const [multiContextMenu, setMultiContextMenu] =
|
|
11330
|
+
const [multiContextMenu, setMultiContextMenu] = useState26({
|
|
11134
11331
|
visible: false,
|
|
11135
11332
|
x: 0,
|
|
11136
11333
|
y: 0,
|
|
11137
11334
|
nodeIds: null
|
|
11138
11335
|
});
|
|
11139
|
-
const [relationshipMenu, setRelationshipMenu] =
|
|
11336
|
+
const [relationshipMenu, setRelationshipMenu] = useState26({
|
|
11140
11337
|
visible: false,
|
|
11141
11338
|
x: 0,
|
|
11142
11339
|
y: 0,
|
|
11143
11340
|
linkObject: null
|
|
11144
11341
|
});
|
|
11145
|
-
const [creationMode, setCreationMode] =
|
|
11342
|
+
const [creationMode, setCreationMode] = useState26({
|
|
11146
11343
|
isActive: false,
|
|
11147
11344
|
sourceNodeData: null
|
|
11148
11345
|
});
|
|
11149
|
-
const [versionMode, setVersionMode] =
|
|
11346
|
+
const [versionMode, setVersionMode] = useState26({
|
|
11150
11347
|
isActive: false,
|
|
11151
11348
|
sourceNodeData: null
|
|
11152
11349
|
});
|
|
11153
|
-
const [questMode, setQuestMode] =
|
|
11154
|
-
const [hasFocusedInitial, setHasFocusedInitial] =
|
|
11155
|
-
const [hasOpenedInitialAncestry, setHasOpenedInitialAncestry] =
|
|
11156
|
-
const [ancestryMode, setAncestryMode] =
|
|
11350
|
+
const [questMode, setQuestMode] = useState26({ isActive: false });
|
|
11351
|
+
const [hasFocusedInitial, setHasFocusedInitial] = useState26(false);
|
|
11352
|
+
const [hasOpenedInitialAncestry, setHasOpenedInitialAncestry] = useState26(false);
|
|
11353
|
+
const [ancestryMode, setAncestryMode] = useState26({
|
|
11157
11354
|
isActive: false,
|
|
11158
11355
|
tree: null,
|
|
11159
11356
|
selectedParentId: null,
|
|
@@ -11164,37 +11361,37 @@ function XViewScene({
|
|
|
11164
11361
|
ancestryDescriptionSections: [],
|
|
11165
11362
|
isAddingNodes: false
|
|
11166
11363
|
});
|
|
11167
|
-
const [readingMode, setReadingMode] =
|
|
11364
|
+
const [readingMode, setReadingMode] = useState26({
|
|
11168
11365
|
isActive: false,
|
|
11169
11366
|
ancestry: null,
|
|
11170
11367
|
branchStack: [],
|
|
11171
11368
|
autoAbstraction: false
|
|
11172
11369
|
});
|
|
11173
|
-
const [formPosition, setFormPosition] =
|
|
11370
|
+
const [formPosition, setFormPosition] = useState26({
|
|
11174
11371
|
left: 16,
|
|
11175
11372
|
top: 16,
|
|
11176
11373
|
opacity: 0
|
|
11177
11374
|
});
|
|
11178
|
-
const [detailsNode, setDetailsNode] =
|
|
11179
|
-
const [detailsLink, setDetailsLink] =
|
|
11180
|
-
const [ancestryLinkDetails, setAncestryLinkDetails] =
|
|
11181
|
-
const [imageViewer, setImageViewer] =
|
|
11375
|
+
const [detailsNode, setDetailsNode] = useState26(null);
|
|
11376
|
+
const [detailsLink, setDetailsLink] = useState26(null);
|
|
11377
|
+
const [ancestryLinkDetails, setAncestryLinkDetails] = useState26(null);
|
|
11378
|
+
const [imageViewer, setImageViewer] = useState26({
|
|
11182
11379
|
visible: false,
|
|
11183
11380
|
images: [],
|
|
11184
11381
|
startIndex: 0
|
|
11185
11382
|
});
|
|
11186
|
-
const [editingAncestryRel, setEditingAncestryRel] =
|
|
11383
|
+
const [editingAncestryRel, setEditingAncestryRel] = useState26({
|
|
11187
11384
|
visible: false,
|
|
11188
11385
|
data: null,
|
|
11189
11386
|
path: null
|
|
11190
11387
|
});
|
|
11191
|
-
const [isImportModalOpen, setIsImportModalOpen] =
|
|
11192
|
-
const [importSuccessMessage, setImportSuccessMessage] =
|
|
11193
|
-
const [invalidTargetError, setInvalidTargetError] =
|
|
11194
|
-
const [highlightedNodeId, setHighlightedNodeId] =
|
|
11195
|
-
const [isAncestryBoardOpen, setIsAncestryBoardOpen] =
|
|
11196
|
-
const [ancestryBoardData, setAncestryBoardData] =
|
|
11197
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
11388
|
+
const [isImportModalOpen, setIsImportModalOpen] = useState26(false);
|
|
11389
|
+
const [importSuccessMessage, setImportSuccessMessage] = useState26("");
|
|
11390
|
+
const [invalidTargetError, setInvalidTargetError] = useState26(null);
|
|
11391
|
+
const [highlightedNodeId, setHighlightedNodeId] = useState26(null);
|
|
11392
|
+
const [isAncestryBoardOpen, setIsAncestryBoardOpen] = useState26(false);
|
|
11393
|
+
const [ancestryBoardData, setAncestryBoardData] = useState26([]);
|
|
11394
|
+
const [isSidebarOpen, setIsSidebarOpen] = useState26(false);
|
|
11198
11395
|
const mountRef = useRef19(null);
|
|
11199
11396
|
const tooltipRef = useRef19(null);
|
|
11200
11397
|
const formRef = useRef19(null);
|
|
@@ -13040,18 +13237,113 @@ function XViewScene({
|
|
|
13040
13237
|
userActionHandlers.handleStartVersioning(actionHandlerContext, nodeData);
|
|
13041
13238
|
};
|
|
13042
13239
|
const handleStartQuestQuick = useCallback4((questNode) => {
|
|
13043
|
-
var _a2;
|
|
13240
|
+
var _a2, _b2, _c2;
|
|
13044
13241
|
if (!questNode || !actionHandlerContext) return;
|
|
13242
|
+
const {
|
|
13243
|
+
labelObject,
|
|
13244
|
+
labelOffset,
|
|
13245
|
+
aura,
|
|
13246
|
+
borderRing,
|
|
13247
|
+
timelineIntervalBar,
|
|
13248
|
+
timelineEndLabel,
|
|
13249
|
+
...cleanQuestNode
|
|
13250
|
+
} = questNode;
|
|
13251
|
+
const newTimeline = [...cleanQuestNode.timeline || [], {
|
|
13252
|
+
type: "status_changed",
|
|
13253
|
+
timestamp: Date.now(),
|
|
13254
|
+
actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || "unknown",
|
|
13255
|
+
description: `Quest iniciada ("In Progress") por ${((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.name) || "usu\xE1rio"}.`
|
|
13256
|
+
}];
|
|
13045
13257
|
const updatedNode = {
|
|
13046
|
-
...
|
|
13258
|
+
...cleanQuestNode,
|
|
13047
13259
|
status: "In Progress",
|
|
13048
13260
|
color: "#eab308",
|
|
13049
|
-
assignee_id: (
|
|
13261
|
+
assignee_id: (_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.id,
|
|
13262
|
+
timeline: newTimeline
|
|
13050
13263
|
};
|
|
13051
13264
|
if (userActionHandlers.handleSaveNodeDetails) {
|
|
13052
13265
|
userActionHandlers.handleSaveNodeDetails(actionHandlerContext, updatedNode);
|
|
13053
13266
|
}
|
|
13054
13267
|
}, [session, actionHandlerContext]);
|
|
13268
|
+
const handleFinishQuestQuick = useCallback4((questNode) => {
|
|
13269
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
13270
|
+
if (!questNode || !actionHandlerContext) return;
|
|
13271
|
+
const {
|
|
13272
|
+
labelObject,
|
|
13273
|
+
labelOffset,
|
|
13274
|
+
aura,
|
|
13275
|
+
borderRing,
|
|
13276
|
+
timelineIntervalBar,
|
|
13277
|
+
timelineEndLabel,
|
|
13278
|
+
...cleanQuestNode
|
|
13279
|
+
} = questNode;
|
|
13280
|
+
let nextAssigneeId = cleanQuestNode.assignee_id;
|
|
13281
|
+
let nextStatus = "Done";
|
|
13282
|
+
let newTimeline = [...cleanQuestNode.timeline || []];
|
|
13283
|
+
const reviewStack = [...cleanQuestNode.reviewStack || []];
|
|
13284
|
+
const currentReviewerIdx = reviewStack.findIndex((r) => r.status !== "completed");
|
|
13285
|
+
let nextIdxToAssign = 0;
|
|
13286
|
+
if (currentReviewerIdx !== -1 && reviewStack[currentReviewerIdx].userId === cleanQuestNode.assignee_id) {
|
|
13287
|
+
reviewStack[currentReviewerIdx].status = "completed";
|
|
13288
|
+
nextIdxToAssign = currentReviewerIdx + 1;
|
|
13289
|
+
newTimeline.push({
|
|
13290
|
+
type: "review_completed",
|
|
13291
|
+
timestamp: Date.now(),
|
|
13292
|
+
actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || cleanQuestNode.assignee_id,
|
|
13293
|
+
description: `Review conclu\xEDda por ${((_b2 = viewMembers.find((m) => m.id === cleanQuestNode.assignee_id)) == null ? void 0 : _b2.name) || "revisor"}.`
|
|
13294
|
+
});
|
|
13295
|
+
} else {
|
|
13296
|
+
nextIdxToAssign = currentReviewerIdx !== -1 ? currentReviewerIdx : reviewStack.length;
|
|
13297
|
+
newTimeline.push({
|
|
13298
|
+
type: "task_completed",
|
|
13299
|
+
timestamp: Date.now(),
|
|
13300
|
+
actorId: ((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.id) || cleanQuestNode.assignee_id,
|
|
13301
|
+
description: `Tarefa principal entregue por ${((_d2 = viewMembers.find((m) => m.id === cleanQuestNode.assignee_id)) == null ? void 0 : _d2.name) || ((_e2 = session == null ? void 0 : session.user) == null ? void 0 : _e2.name) || "respons\xE1vel"}.`
|
|
13302
|
+
});
|
|
13303
|
+
}
|
|
13304
|
+
if (nextIdxToAssign < reviewStack.length) {
|
|
13305
|
+
const remainingMandatory = reviewStack.slice(nextIdxToAssign).some((r) => r.mandatory);
|
|
13306
|
+
const hasAnyMandatory = reviewStack.some((r) => r.mandatory);
|
|
13307
|
+
if (!hasAnyMandatory || remainingMandatory) {
|
|
13308
|
+
const nextReviewer = reviewStack[nextIdxToAssign];
|
|
13309
|
+
nextAssigneeId = nextReviewer.userId;
|
|
13310
|
+
nextStatus = "Review";
|
|
13311
|
+
newTimeline.push({
|
|
13312
|
+
type: "assignee_changed",
|
|
13313
|
+
timestamp: Date.now() + 1,
|
|
13314
|
+
actorId: ((_f2 = session == null ? void 0 : session.user) == null ? void 0 : _f2.id) || "system",
|
|
13315
|
+
to_assignee_id: nextAssigneeId,
|
|
13316
|
+
description: `Quest atribu\xEDda para revis\xE3o a ${((_g2 = viewMembers.find((m) => m.id === nextAssigneeId)) == null ? void 0 : _g2.name) || "revisor"}.`
|
|
13317
|
+
});
|
|
13318
|
+
} else {
|
|
13319
|
+
nextStatus = "Done";
|
|
13320
|
+
for (let i = nextIdxToAssign; i < reviewStack.length; i++) {
|
|
13321
|
+
reviewStack[i].status = "skipped";
|
|
13322
|
+
}
|
|
13323
|
+
}
|
|
13324
|
+
} else {
|
|
13325
|
+
nextStatus = "Done";
|
|
13326
|
+
}
|
|
13327
|
+
if (nextStatus === "Done") {
|
|
13328
|
+
newTimeline.push({
|
|
13329
|
+
type: "quest_finished",
|
|
13330
|
+
timestamp: Date.now() + 2,
|
|
13331
|
+
actorId: ((_h2 = session == null ? void 0 : session.user) == null ? void 0 : _h2.id) || "system",
|
|
13332
|
+
description: `Quest finalizada!`
|
|
13333
|
+
});
|
|
13334
|
+
}
|
|
13335
|
+
const updatedNode = {
|
|
13336
|
+
...cleanQuestNode,
|
|
13337
|
+
status: nextStatus,
|
|
13338
|
+
color: nextStatus === "Done" ? "#22c55e" : "#a855f7",
|
|
13339
|
+
assignee_id: nextAssigneeId,
|
|
13340
|
+
reviewStack,
|
|
13341
|
+
timeline: newTimeline
|
|
13342
|
+
};
|
|
13343
|
+
if (userActionHandlers.handleSaveNodeDetails) {
|
|
13344
|
+
userActionHandlers.handleSaveNodeDetails(actionHandlerContext, updatedNode);
|
|
13345
|
+
}
|
|
13346
|
+
}, [session, actionHandlerContext, viewMembers]);
|
|
13055
13347
|
const handleCancelQuest = useCallback4(() => {
|
|
13056
13348
|
const { graphGroup, ghostElements } = stateRef.current;
|
|
13057
13349
|
if (ghostElements.node && graphGroup) {
|
|
@@ -15046,10 +15338,10 @@ function XViewScene({
|
|
|
15046
15338
|
// <-- handleCancelQuest adicionado aqui
|
|
15047
15339
|
]);
|
|
15048
15340
|
if (isLoading || status === "loading" || permissionStatus === "loading") {
|
|
15049
|
-
return /* @__PURE__ */
|
|
15341
|
+
return /* @__PURE__ */ React26.createElement(LoadingScreen, null);
|
|
15050
15342
|
}
|
|
15051
15343
|
if (permissionStatus === "denied") {
|
|
15052
|
-
return /* @__PURE__ */
|
|
15344
|
+
return /* @__PURE__ */ React26.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React26.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md" }, /* @__PURE__ */ React26.createElement("div", { className: "mb-4 text-red-500" }, /* @__PURE__ */ React26.createElement(
|
|
15053
15345
|
"svg",
|
|
15054
15346
|
{
|
|
15055
15347
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15059,7 +15351,7 @@ function XViewScene({
|
|
|
15059
15351
|
stroke: "currentColor",
|
|
15060
15352
|
className: "w-16 h-16 mx-auto"
|
|
15061
15353
|
},
|
|
15062
|
-
/* @__PURE__ */
|
|
15354
|
+
/* @__PURE__ */ React26.createElement(
|
|
15063
15355
|
"path",
|
|
15064
15356
|
{
|
|
15065
15357
|
strokeLinecap: "round",
|
|
@@ -15067,13 +15359,13 @@ function XViewScene({
|
|
|
15067
15359
|
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
|
|
15068
15360
|
}
|
|
15069
15361
|
)
|
|
15070
|
-
)), /* @__PURE__ */
|
|
15362
|
+
)), /* @__PURE__ */ React26.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Acesso Negado"), /* @__PURE__ */ React26.createElement("p", { className: "text-slate-400 mb-6" }, "Voc\xEA n\xE3o tem permiss\xE3o para acessar este conte\xFAdo. Solicite acesso ao propriet\xE1rio ou verifique se est\xE1 na conta correta."), /* @__PURE__ */ React26.createElement(
|
|
15071
15363
|
"button",
|
|
15072
15364
|
{
|
|
15073
15365
|
onClick: () => router.push("/dashboard/scenes"),
|
|
15074
15366
|
className: "flex items-center justify-center gap-2 w-full py-3 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors font-medium"
|
|
15075
15367
|
},
|
|
15076
|
-
/* @__PURE__ */
|
|
15368
|
+
/* @__PURE__ */ React26.createElement(
|
|
15077
15369
|
"svg",
|
|
15078
15370
|
{
|
|
15079
15371
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15083,7 +15375,7 @@ function XViewScene({
|
|
|
15083
15375
|
stroke: "currentColor",
|
|
15084
15376
|
className: "w-5 h-5"
|
|
15085
15377
|
},
|
|
15086
|
-
/* @__PURE__ */
|
|
15378
|
+
/* @__PURE__ */ React26.createElement(
|
|
15087
15379
|
"path",
|
|
15088
15380
|
{
|
|
15089
15381
|
strokeLinecap: "round",
|
|
@@ -15095,7 +15387,7 @@ function XViewScene({
|
|
|
15095
15387
|
"Voltar para Scenes"
|
|
15096
15388
|
)));
|
|
15097
15389
|
}
|
|
15098
|
-
return /* @__PURE__ */
|
|
15390
|
+
return /* @__PURE__ */ React26.createElement(
|
|
15099
15391
|
"div",
|
|
15100
15392
|
{
|
|
15101
15393
|
ref: mountRef,
|
|
@@ -15107,7 +15399,7 @@ function XViewScene({
|
|
|
15107
15399
|
cursor: stateRef.current.connection.isActive || stateRef.current.relink.isActive || ancestryMode.isActive ? "crosshair" : creationMode.isActive ? "default" : "grab"
|
|
15108
15400
|
}
|
|
15109
15401
|
},
|
|
15110
|
-
userPermissionRole !== "link_viewer" && /* @__PURE__ */
|
|
15402
|
+
userPermissionRole !== "link_viewer" && /* @__PURE__ */ React26.createElement(
|
|
15111
15403
|
XViewSidebar,
|
|
15112
15404
|
{
|
|
15113
15405
|
dbNodes: searchableDbNodes,
|
|
@@ -15127,7 +15419,7 @@ function XViewScene({
|
|
|
15127
15419
|
userRole: userPermissionRole
|
|
15128
15420
|
}
|
|
15129
15421
|
),
|
|
15130
|
-
creationMode.isActive && /* @__PURE__ */
|
|
15422
|
+
creationMode.isActive && /* @__PURE__ */ React26.createElement(
|
|
15131
15423
|
InSceneCreationForm,
|
|
15132
15424
|
{
|
|
15133
15425
|
onSave: (data) => userActionHandlers.handleSaveNode(actionHandlerContext, data),
|
|
@@ -15159,7 +15451,7 @@ function XViewScene({
|
|
|
15159
15451
|
availableAncestries: allAvailableAncestries
|
|
15160
15452
|
}
|
|
15161
15453
|
),
|
|
15162
|
-
versionMode.isActive && /* @__PURE__ */
|
|
15454
|
+
versionMode.isActive && /* @__PURE__ */ React26.createElement(
|
|
15163
15455
|
InSceneVersionForm,
|
|
15164
15456
|
{
|
|
15165
15457
|
onSave: (data) => userActionHandlers.handleSaveVersionNode(actionHandlerContext, data),
|
|
@@ -15185,7 +15477,7 @@ function XViewScene({
|
|
|
15185
15477
|
availableAncestries: allAvailableAncestries
|
|
15186
15478
|
}
|
|
15187
15479
|
),
|
|
15188
|
-
questMode.isActive && /* @__PURE__ */
|
|
15480
|
+
questMode.isActive && /* @__PURE__ */ React26.createElement(
|
|
15189
15481
|
InSceneQuestForm,
|
|
15190
15482
|
{
|
|
15191
15483
|
onSave: (data) => handleSaveQuestNode(actionHandlerContext, data),
|
|
@@ -15211,7 +15503,7 @@ function XViewScene({
|
|
|
15211
15503
|
viewMembers
|
|
15212
15504
|
}
|
|
15213
15505
|
),
|
|
15214
|
-
readingMode.isActive && readingMode.ancestry && /* @__PURE__ */
|
|
15506
|
+
readingMode.isActive && readingMode.ancestry && /* @__PURE__ */ React26.createElement(
|
|
15215
15507
|
"div",
|
|
15216
15508
|
{
|
|
15217
15509
|
className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isReadModeResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
|
|
@@ -15224,7 +15516,7 @@ function XViewScene({
|
|
|
15224
15516
|
maxWidth: "92vw"
|
|
15225
15517
|
}
|
|
15226
15518
|
},
|
|
15227
|
-
/* @__PURE__ */
|
|
15519
|
+
/* @__PURE__ */ React26.createElement(
|
|
15228
15520
|
"div",
|
|
15229
15521
|
{
|
|
15230
15522
|
onPointerDown: (e) => {
|
|
@@ -15235,7 +15527,7 @@ function XViewScene({
|
|
|
15235
15527
|
title: "Arraste para redimensionar"
|
|
15236
15528
|
}
|
|
15237
15529
|
),
|
|
15238
|
-
/* @__PURE__ */
|
|
15530
|
+
/* @__PURE__ */ React26.createElement(
|
|
15239
15531
|
DescriptionReadModePanel,
|
|
15240
15532
|
{
|
|
15241
15533
|
key: readingMode.branchStack.length > 0 ? readingMode.branchStack[readingMode.branchStack.length - 1].branchId : readingMode.ancestry.ancestry_id,
|
|
@@ -15270,7 +15562,7 @@ function XViewScene({
|
|
|
15270
15562
|
}
|
|
15271
15563
|
)
|
|
15272
15564
|
),
|
|
15273
|
-
ancestryMode.isActive && ancestryMode.tree && /* @__PURE__ */
|
|
15565
|
+
ancestryMode.isActive && ancestryMode.tree && /* @__PURE__ */ React26.createElement(
|
|
15274
15566
|
CreateAncestryPanel,
|
|
15275
15567
|
{
|
|
15276
15568
|
ancestryMode,
|
|
@@ -15306,7 +15598,7 @@ function XViewScene({
|
|
|
15306
15598
|
onRenderAbstractionTree: (data, targetId) => handleRenderAbstractionTree(data, targetId)
|
|
15307
15599
|
}
|
|
15308
15600
|
),
|
|
15309
|
-
editingAncestryRel.visible && /* @__PURE__ */
|
|
15601
|
+
editingAncestryRel.visible && /* @__PURE__ */ React26.createElement(
|
|
15310
15602
|
AncestryRelationshipPanel,
|
|
15311
15603
|
{
|
|
15312
15604
|
data: editingAncestryRel.data,
|
|
@@ -15320,7 +15612,7 @@ function XViewScene({
|
|
|
15320
15612
|
onUploadFile: upload_file_action
|
|
15321
15613
|
}
|
|
15322
15614
|
),
|
|
15323
|
-
detailsNode && detailsNode.is_quest && /* @__PURE__ */
|
|
15615
|
+
detailsNode && detailsNode.is_quest && /* @__PURE__ */ React26.createElement(
|
|
15324
15616
|
QuestDetailsPanel,
|
|
15325
15617
|
{
|
|
15326
15618
|
node: detailsNode,
|
|
@@ -15342,7 +15634,7 @@ function XViewScene({
|
|
|
15342
15634
|
viewMembers
|
|
15343
15635
|
}
|
|
15344
15636
|
),
|
|
15345
|
-
detailsNode && !detailsNode.is_quest && /* @__PURE__ */
|
|
15637
|
+
detailsNode && !detailsNode.is_quest && /* @__PURE__ */ React26.createElement(
|
|
15346
15638
|
NodeDetailsPanel,
|
|
15347
15639
|
{
|
|
15348
15640
|
node: detailsNode,
|
|
@@ -15374,7 +15666,7 @@ function XViewScene({
|
|
|
15374
15666
|
currentDatasetName: detailsNodeDatasetInfo == null ? void 0 : detailsNodeDatasetInfo.datasetName
|
|
15375
15667
|
}
|
|
15376
15668
|
),
|
|
15377
|
-
detailsLink && /* @__PURE__ */
|
|
15669
|
+
detailsLink && /* @__PURE__ */ React26.createElement(
|
|
15378
15670
|
RelationshipDetailsPanel,
|
|
15379
15671
|
{
|
|
15380
15672
|
link: detailsLink,
|
|
@@ -15388,7 +15680,7 @@ function XViewScene({
|
|
|
15388
15680
|
userRole: userPermissionRole
|
|
15389
15681
|
}
|
|
15390
15682
|
),
|
|
15391
|
-
ancestryLinkDetails && /* @__PURE__ */
|
|
15683
|
+
ancestryLinkDetails && /* @__PURE__ */ React26.createElement(
|
|
15392
15684
|
AncestryLinkDetailsPanel,
|
|
15393
15685
|
{
|
|
15394
15686
|
data: ancestryLinkDetails,
|
|
@@ -15399,7 +15691,7 @@ function XViewScene({
|
|
|
15399
15691
|
onUploadFile: upload_file_action
|
|
15400
15692
|
}
|
|
15401
15693
|
),
|
|
15402
|
-
/* @__PURE__ */
|
|
15694
|
+
/* @__PURE__ */ React26.createElement(
|
|
15403
15695
|
"div",
|
|
15404
15696
|
{
|
|
15405
15697
|
ref: tooltipRef,
|
|
@@ -15426,7 +15718,7 @@ function XViewScene({
|
|
|
15426
15718
|
}
|
|
15427
15719
|
}
|
|
15428
15720
|
),
|
|
15429
|
-
/* @__PURE__ */
|
|
15721
|
+
/* @__PURE__ */ React26.createElement(
|
|
15430
15722
|
ContextMenu,
|
|
15431
15723
|
{
|
|
15432
15724
|
data: contextMenu,
|
|
@@ -15455,10 +15747,11 @@ function XViewScene({
|
|
|
15455
15747
|
onFocusNode: handleFocusNode,
|
|
15456
15748
|
viewMembers,
|
|
15457
15749
|
currentUser: session == null ? void 0 : session.user,
|
|
15458
|
-
onStartQuest: handleStartQuestQuick
|
|
15750
|
+
onStartQuest: handleStartQuestQuick,
|
|
15751
|
+
onFinishQuest: handleFinishQuestQuick
|
|
15459
15752
|
}
|
|
15460
15753
|
),
|
|
15461
|
-
/* @__PURE__ */
|
|
15754
|
+
/* @__PURE__ */ React26.createElement(
|
|
15462
15755
|
MultiNodeContextMenu,
|
|
15463
15756
|
{
|
|
15464
15757
|
data: multiContextMenu,
|
|
@@ -15478,7 +15771,7 @@ function XViewScene({
|
|
|
15478
15771
|
)
|
|
15479
15772
|
}
|
|
15480
15773
|
),
|
|
15481
|
-
/* @__PURE__ */
|
|
15774
|
+
/* @__PURE__ */ React26.createElement(
|
|
15482
15775
|
RelationshipContextMenu,
|
|
15483
15776
|
{
|
|
15484
15777
|
data: relationshipMenu,
|
|
@@ -15496,14 +15789,14 @@ function XViewScene({
|
|
|
15496
15789
|
onDelete: (data) => userActionHandlers.handleDeleteLink(actionHandlerContext, data)
|
|
15497
15790
|
}
|
|
15498
15791
|
),
|
|
15499
|
-
/* @__PURE__ */
|
|
15792
|
+
/* @__PURE__ */ React26.createElement(
|
|
15500
15793
|
ImageViewer,
|
|
15501
15794
|
{
|
|
15502
15795
|
data: imageViewer,
|
|
15503
15796
|
onClose: () => setImageViewer({ ...imageViewer, visible: false })
|
|
15504
15797
|
}
|
|
15505
15798
|
),
|
|
15506
|
-
/* @__PURE__ */
|
|
15799
|
+
/* @__PURE__ */ React26.createElement(
|
|
15507
15800
|
AncestryBoard,
|
|
15508
15801
|
{
|
|
15509
15802
|
isOpen: isAncestryBoardOpen,
|
|
@@ -15516,7 +15809,7 @@ function XViewScene({
|
|
|
15516
15809
|
userRole: userPermissionRole
|
|
15517
15810
|
}
|
|
15518
15811
|
),
|
|
15519
|
-
/* @__PURE__ */
|
|
15812
|
+
/* @__PURE__ */ React26.createElement(
|
|
15520
15813
|
ImportParentFileModal,
|
|
15521
15814
|
{
|
|
15522
15815
|
isOpen: isImportModalOpen,
|
|
@@ -15529,7 +15822,7 @@ function XViewScene({
|
|
|
15529
15822
|
currentAncestries: ancestryDataRef.current || []
|
|
15530
15823
|
}
|
|
15531
15824
|
),
|
|
15532
|
-
invalidTargetError && /* @__PURE__ */
|
|
15825
|
+
invalidTargetError && /* @__PURE__ */ React26.createElement(
|
|
15533
15826
|
"div",
|
|
15534
15827
|
{
|
|
15535
15828
|
className: "ui-overlay",
|
|
@@ -15554,13 +15847,13 @@ function XViewScene({
|
|
|
15554
15847
|
animation: "fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
15555
15848
|
}
|
|
15556
15849
|
},
|
|
15557
|
-
/* @__PURE__ */
|
|
15850
|
+
/* @__PURE__ */ React26.createElement("style", null, `
|
|
15558
15851
|
@keyframes fadeInDown {
|
|
15559
15852
|
from { opacity: 0; transform: translate(-50%, -20px); }
|
|
15560
15853
|
to { opacity: 1; transform: translate(-50%, 0); }
|
|
15561
15854
|
}
|
|
15562
15855
|
`),
|
|
15563
|
-
/* @__PURE__ */
|
|
15856
|
+
/* @__PURE__ */ React26.createElement(
|
|
15564
15857
|
"svg",
|
|
15565
15858
|
{
|
|
15566
15859
|
width: "20",
|
|
@@ -15572,12 +15865,12 @@ function XViewScene({
|
|
|
15572
15865
|
strokeLinecap: "round",
|
|
15573
15866
|
strokeLinejoin: "round"
|
|
15574
15867
|
},
|
|
15575
|
-
/* @__PURE__ */
|
|
15576
|
-
/* @__PURE__ */
|
|
15577
|
-
/* @__PURE__ */
|
|
15868
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
15869
|
+
/* @__PURE__ */ React26.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
15870
|
+
/* @__PURE__ */ React26.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
15578
15871
|
),
|
|
15579
|
-
/* @__PURE__ */
|
|
15580
|
-
/* @__PURE__ */
|
|
15872
|
+
/* @__PURE__ */ React26.createElement("span", { style: { fontSize: "14px", fontWeight: 500 } }, invalidTargetError),
|
|
15873
|
+
/* @__PURE__ */ React26.createElement(
|
|
15581
15874
|
"button",
|
|
15582
15875
|
{
|
|
15583
15876
|
onClick: () => setInvalidTargetError(null),
|