@lv-x-software-house/x_view 1.2.6-dev.51 → 1.2.6-dev.53
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 +254 -344
- package/dist/index.mjs +254 -344
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3830,6 +3830,49 @@ function ContextMenu({
|
|
|
3830
3830
|
// src/components/XViewSidebar.jsx
|
|
3831
3831
|
import React2, { useMemo as useMemo2, useState as useState3, useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
3832
3832
|
import { FiLayers } from "react-icons/fi";
|
|
3833
|
+
var CustomSelect = ({ value, onChange, options, placeholder }) => {
|
|
3834
|
+
const [isOpen, setIsOpen] = useState3(false);
|
|
3835
|
+
const selectRef = useRef2(null);
|
|
3836
|
+
useEffect2(() => {
|
|
3837
|
+
const handleClickOutside = (e) => {
|
|
3838
|
+
if (selectRef.current && !selectRef.current.contains(e.target)) {
|
|
3839
|
+
setIsOpen(false);
|
|
3840
|
+
}
|
|
3841
|
+
};
|
|
3842
|
+
if (isOpen) {
|
|
3843
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
3844
|
+
}
|
|
3845
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3846
|
+
}, [isOpen]);
|
|
3847
|
+
const selectedOption = options.find((o) => String(o.value) === String(value));
|
|
3848
|
+
return /* @__PURE__ */ React2.createElement("div", { ref: selectRef, className: "relative w-full text-slate-200 text-sm" }, /* @__PURE__ */ React2.createElement(
|
|
3849
|
+
"button",
|
|
3850
|
+
{
|
|
3851
|
+
type: "button",
|
|
3852
|
+
onClick: () => setIsOpen(!isOpen),
|
|
3853
|
+
className: `w-full bg-slate-900/80 px-3 py-2.5 rounded-md border text-left transition-all flex items-center justify-between
|
|
3854
|
+
${isOpen ? "border-indigo-500/50 bg-slate-800" : "border-white/10 hover:bg-slate-800"}`
|
|
3855
|
+
},
|
|
3856
|
+
/* @__PURE__ */ React2.createElement("span", { className: "truncate" }, selectedOption ? selectedOption.label : placeholder),
|
|
3857
|
+
/* @__PURE__ */ React2.createElement("svg", { className: `w-4 h-4 text-slate-500 transition-transform flex-shrink-0 ${isOpen ? "rotate-180" : ""}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
|
|
3858
|
+
), isOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute z-50 w-full mt-2 bg-slate-800 border border-white/10 rounded-lg shadow-2xl max-h-56 overflow-y-auto custom-scrollbar animate-in fade-in zoom-in-95 duration-100 py-1" }, options.map((opt, idx) => {
|
|
3859
|
+
const isSelected = String(value) === String(opt.value);
|
|
3860
|
+
return /* @__PURE__ */ React2.createElement(
|
|
3861
|
+
"button",
|
|
3862
|
+
{
|
|
3863
|
+
key: idx,
|
|
3864
|
+
type: "button",
|
|
3865
|
+
onClick: () => {
|
|
3866
|
+
onChange(opt.value);
|
|
3867
|
+
setIsOpen(false);
|
|
3868
|
+
},
|
|
3869
|
+
className: `w-full text-left px-3 py-2.5 text-sm transition-colors
|
|
3870
|
+
${isSelected ? "bg-indigo-600/30 text-indigo-200 font-medium" : "text-slate-300 hover:bg-white/10"}`
|
|
3871
|
+
},
|
|
3872
|
+
opt.label
|
|
3873
|
+
);
|
|
3874
|
+
})));
|
|
3875
|
+
};
|
|
3833
3876
|
function XViewSidebar({
|
|
3834
3877
|
dbNodes = [],
|
|
3835
3878
|
isNodeInView = () => false,
|
|
@@ -3869,11 +3912,11 @@ function XViewSidebar({
|
|
|
3869
3912
|
const [isFilterMenuOpen, setIsFilterMenuOpen] = useState3(false);
|
|
3870
3913
|
const [filterCategory, setFilterCategory] = useState3("Type");
|
|
3871
3914
|
const [filterValue, setFilterValue] = useState3("");
|
|
3915
|
+
const [activeSubMenu, setActiveSubMenu] = useState3(null);
|
|
3872
3916
|
const [questFilterAssignee, setQuestFilterAssignee] = useState3("");
|
|
3873
3917
|
const [questFilterStatus, setQuestFilterStatus] = useState3("");
|
|
3874
|
-
const [isQuestLensMenuOpen, setIsQuestLensMenuOpen] = useState3(false);
|
|
3875
3918
|
const [questFilterMilestone, setQuestFilterMilestone] = useState3("");
|
|
3876
|
-
const [
|
|
3919
|
+
const [isQuestLensLoading, setIsQuestLensLoading] = useState3(false);
|
|
3877
3920
|
const [reshapeLayoutType, setReshapeLayoutType] = useState3("Star");
|
|
3878
3921
|
const [reshapeColumnCount, setReshapeColumnCount] = useState3(4);
|
|
3879
3922
|
const [reshapeCenterNodeId, setReshapeCenterNodeId] = useState3("");
|
|
@@ -3883,8 +3926,7 @@ function XViewSidebar({
|
|
|
3883
3926
|
const inputRef = useRef2(null);
|
|
3884
3927
|
const filterMenuRef = useRef2(null);
|
|
3885
3928
|
const typeDropdownRef = useRef2(null);
|
|
3886
|
-
const
|
|
3887
|
-
const reshapeLensRef = useRef2(null);
|
|
3929
|
+
const annexedPanelRef = useRef2(null);
|
|
3888
3930
|
const ability = useMemo2(() => {
|
|
3889
3931
|
return defineAbilityFor(userRole);
|
|
3890
3932
|
}, [userRole]);
|
|
@@ -3990,19 +4032,17 @@ function XViewSidebar({
|
|
|
3990
4032
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3991
4033
|
}, [isFilterMenuOpen, isTypeDropdownOpen]);
|
|
3992
4034
|
useEffect2(() => {
|
|
3993
|
-
const
|
|
3994
|
-
if (
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
if (reshapeLensRef.current && !reshapeLensRef.current.contains(event.target)) {
|
|
3998
|
-
setIsReshapeLensMenuOpen(false);
|
|
4035
|
+
const handleClickOutsideAnnexed = (event) => {
|
|
4036
|
+
if (annexedPanelRef.current && !annexedPanelRef.current.contains(event.target)) {
|
|
4037
|
+
if (event.target.closest(".lens-button")) return;
|
|
4038
|
+
setActiveSubMenu(null);
|
|
3999
4039
|
}
|
|
4000
4040
|
};
|
|
4001
|
-
if (
|
|
4002
|
-
document.addEventListener("mousedown",
|
|
4041
|
+
if (activeSubMenu) {
|
|
4042
|
+
document.addEventListener("mousedown", handleClickOutsideAnnexed);
|
|
4003
4043
|
}
|
|
4004
|
-
return () => document.removeEventListener("mousedown",
|
|
4005
|
-
}, [
|
|
4044
|
+
return () => document.removeEventListener("mousedown", handleClickOutsideAnnexed);
|
|
4045
|
+
}, [activeSubMenu]);
|
|
4006
4046
|
useEffect2(() => {
|
|
4007
4047
|
if (!query) setSelectedNodeId(null);
|
|
4008
4048
|
}, [query]);
|
|
@@ -4100,359 +4140,229 @@ function XViewSidebar({
|
|
|
4100
4140
|
if (!isOpen) return ToggleButton;
|
|
4101
4141
|
const buttonBaseClass = "w-full px-3 py-2 rounded-md bg-indigo-500/10 hover:bg-indigo-500/20 border border-indigo-500/30 text-sm text-indigo-200 transition-colors flex items-center justify-center gap-2";
|
|
4102
4142
|
const buttonDisabledClass = "w-full px-3 py-2 rounded-md bg-slate-800/50 border border-white/5 text-sm text-slate-500 cursor-not-allowed flex items-center justify-center gap-2";
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
className: "ui-overlay fixed left-0 top-0 h-[100dvh] w-[min(92vw,320px)] z-40 overflow-hidden",
|
|
4108
|
-
onPointerDown: swallow,
|
|
4109
|
-
onPointerMove: swallow,
|
|
4110
|
-
onPointerUp: swallow,
|
|
4111
|
-
onClick: swallow,
|
|
4112
|
-
onWheel: swallow,
|
|
4113
|
-
onContextMenu: swallow,
|
|
4114
|
-
onDoubleClick: swallow
|
|
4115
|
-
},
|
|
4116
|
-
/* @__PURE__ */ React2.createElement("div", { className: "h-full flex flex-col overflow-hidden bg-slate-950/80 backdrop-blur-xl border-r border-white/10 shadow-[0_0_40px_rgba(0,0,0,0.45)]" }, /* @__PURE__ */ React2.createElement("div", { className: "relative px-4 py-3 border-b border-white/10 flex items-center gap-2" }, /* @__PURE__ */ React2.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_10px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React2.createElement("h3", { className: "text-sm font-medium text-slate-100" }, "Ferramentas"), /* @__PURE__ */ React2.createElement(
|
|
4117
|
-
"button",
|
|
4143
|
+
const renderAnnexedPanel = () => {
|
|
4144
|
+
if (!activeSubMenu) return null;
|
|
4145
|
+
return /* @__PURE__ */ React2.createElement(
|
|
4146
|
+
"div",
|
|
4118
4147
|
{
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
title: "Fechar"
|
|
4148
|
+
ref: annexedPanelRef,
|
|
4149
|
+
className: "flex flex-col h-full w-[100vw] md:w-[280px] min-w-[100vw] md:min-w-[280px] bg-slate-950/95 md:bg-slate-950/80 backdrop-blur-2xl border-r border-white/10 shadow-2xl"
|
|
4122
4150
|
},
|
|
4123
|
-
/* @__PURE__ */ React2.createElement("
|
|
4124
|
-
"
|
|
4151
|
+
/* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-b border-white/10 flex items-center gap-2 bg-white/5" }, /* @__PURE__ */ React2.createElement(
|
|
4152
|
+
"button",
|
|
4125
4153
|
{
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4154
|
+
onClick: () => setActiveSubMenu(null),
|
|
4155
|
+
className: "p-1.5 -ml-1 rounded-md text-slate-400 hover:text-white hover:bg-white/10 md:hidden transition-colors",
|
|
4156
|
+
title: "Voltar"
|
|
4157
|
+
},
|
|
4158
|
+
/* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { fillRule: "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", clipRule: "evenodd" }))
|
|
4159
|
+
), /* @__PURE__ */ React2.createElement("h3", { className: "text-sm font-semibold text-indigo-100 uppercase tracking-wider" }, activeSubMenu === "quest" ? "Quest Lens" : "Reshape Lens"), /* @__PURE__ */ React2.createElement(
|
|
4160
|
+
"button",
|
|
4161
|
+
{
|
|
4162
|
+
className: "ml-auto p-1.5 rounded-md text-slate-400 hover:text-white hover:bg-white/10 transition-colors hidden md:block",
|
|
4163
|
+
onClick: () => setActiveSubMenu(null),
|
|
4164
|
+
title: "Fechar Sub-menu"
|
|
4165
|
+
},
|
|
4166
|
+
/* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }))
|
|
4167
|
+
)),
|
|
4168
|
+
/* @__PURE__ */ React2.createElement("div", { className: "flex-1 overflow-y-auto p-4 space-y-6" }, activeSubMenu === "quest" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-6 animate-in fade-in slide-in-from-bottom-2 duration-500" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Respons\xE1vel"), /* @__PURE__ */ React2.createElement(
|
|
4169
|
+
CustomSelect,
|
|
4170
|
+
{
|
|
4171
|
+
value: questFilterAssignee,
|
|
4172
|
+
onChange: (val) => setQuestFilterAssignee(val),
|
|
4173
|
+
options: [
|
|
4174
|
+
{ value: "", label: "Todos os Respons\xE1veis" },
|
|
4175
|
+
...viewMembers.map((m) => ({ value: m.id, label: m.name || m.email }))
|
|
4176
|
+
],
|
|
4177
|
+
placeholder: "Selecione um Respons\xE1vel"
|
|
4129
4178
|
}
|
|
4130
|
-
))
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4179
|
+
)), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Status"), /* @__PURE__ */ React2.createElement(
|
|
4180
|
+
CustomSelect,
|
|
4181
|
+
{
|
|
4182
|
+
value: questFilterStatus,
|
|
4183
|
+
onChange: (val) => setQuestFilterStatus(val),
|
|
4184
|
+
options: [
|
|
4185
|
+
{ value: "", label: "Todos (Exclui Done)" },
|
|
4186
|
+
{ value: "Backlog", label: "Backlog" },
|
|
4187
|
+
{ value: "In Progress", label: "In Progress" },
|
|
4188
|
+
{ value: "Review", label: "Review" },
|
|
4189
|
+
{ value: "Done", label: "Done" }
|
|
4190
|
+
],
|
|
4191
|
+
placeholder: "Selecione um Status"
|
|
4138
4192
|
}
|
|
4139
|
-
},
|
|
4140
|
-
|
|
4141
|
-
"span",
|
|
4193
|
+
)), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Milestone"), /* @__PURE__ */ React2.createElement(
|
|
4194
|
+
CustomSelect,
|
|
4142
4195
|
{
|
|
4143
|
-
|
|
4144
|
-
|
|
4196
|
+
value: questFilterMilestone,
|
|
4197
|
+
onChange: (val) => setQuestFilterMilestone(val),
|
|
4198
|
+
options: [
|
|
4199
|
+
{ value: "", label: "Todos os Milestones" },
|
|
4200
|
+
...milestones.map((ms) => ({
|
|
4201
|
+
value: ms.id,
|
|
4202
|
+
label: `${ms.name} ${ms.status === "inactive" ? "(Inativo)" : ""}`
|
|
4203
|
+
}))
|
|
4204
|
+
],
|
|
4205
|
+
placeholder: "Todos os Milestones"
|
|
4145
4206
|
}
|
|
4146
|
-
), /* @__PURE__ */ React2.createElement("
|
|
4207
|
+
)), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-3 pt-4" }, /* @__PURE__ */ React2.createElement(
|
|
4147
4208
|
"button",
|
|
4148
4209
|
{
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4210
|
+
onClick: () => {
|
|
4211
|
+
setQuestFilterAssignee("");
|
|
4212
|
+
setQuestFilterStatus("");
|
|
4213
|
+
setQuestFilterMilestone("");
|
|
4153
4214
|
},
|
|
4154
|
-
className: "hover:
|
|
4215
|
+
className: "flex-1 py-3 bg-white/[0.03] hover:bg-white/[0.08] text-slate-400 hover:text-slate-200 text-[10px] font-black uppercase tracking-widest rounded-xl transition-all border border-white/5 active:scale-95"
|
|
4155
4216
|
},
|
|
4156
|
-
|
|
4157
|
-
)
|
|
4158
|
-
|
|
4217
|
+
"Limpar"
|
|
4218
|
+
), /* @__PURE__ */ React2.createElement(
|
|
4219
|
+
"button",
|
|
4220
|
+
{
|
|
4221
|
+
onClick: () => {
|
|
4222
|
+
onActivateQuestLens({
|
|
4223
|
+
assigneeId: questFilterAssignee,
|
|
4224
|
+
status: questFilterStatus,
|
|
4225
|
+
milestoneId: questFilterMilestone
|
|
4226
|
+
});
|
|
4227
|
+
setActiveSubMenu(null);
|
|
4228
|
+
},
|
|
4229
|
+
className: "flex-[2] py-3 bg-indigo-600 hover:bg-indigo-500 text-white text-[10px] font-black uppercase tracking-widest rounded-xl shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95"
|
|
4230
|
+
},
|
|
4231
|
+
"Aplicar Lente"
|
|
4232
|
+
))), activeSubMenu === "reshape" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-6 animate-in fade-in slide-in-from-bottom-2 duration-500" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Layout Type"), /* @__PURE__ */ React2.createElement(
|
|
4233
|
+
CustomSelect,
|
|
4234
|
+
{
|
|
4235
|
+
value: reshapeLayoutType,
|
|
4236
|
+
onChange: (val) => setReshapeLayoutType(val),
|
|
4237
|
+
options: [
|
|
4238
|
+
{ value: "Star", label: "Star" },
|
|
4239
|
+
{ value: "Circle", label: "Circle" },
|
|
4240
|
+
{ value: "Column", label: "Column" }
|
|
4241
|
+
],
|
|
4242
|
+
placeholder: "Selecione um Formato"
|
|
4243
|
+
}
|
|
4244
|
+
)), reshapeLayoutType === "Column" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Colunas"), /* @__PURE__ */ React2.createElement(
|
|
4159
4245
|
"input",
|
|
4160
4246
|
{
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
onKeyDown: handleKeyDown,
|
|
4168
|
-
placeholder: activeFilters.length === 0 ? "Digite parte do nome..." : "",
|
|
4169
|
-
className: "bg-transparent border-none outline-none flex-1 min-w-[80px] text-sm text-slate-100 placeholder-slate-500",
|
|
4170
|
-
autoComplete: "off"
|
|
4247
|
+
type: "number",
|
|
4248
|
+
min: "1",
|
|
4249
|
+
max: "12",
|
|
4250
|
+
value: reshapeColumnCount,
|
|
4251
|
+
onChange: (e) => setReshapeColumnCount(parseInt(e.target.value) || 4),
|
|
4252
|
+
className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white hover:bg-slate-800/50 transition-all"
|
|
4171
4253
|
}
|
|
4172
|
-
)
|
|
4173
|
-
|
|
4174
|
-
const inView = isNodeInView(n.id);
|
|
4175
|
-
const active = selectedNodeId === n.id;
|
|
4176
|
-
const typeLabel = Array.isArray(n.type) ? n.type.join(", ") : n.type;
|
|
4177
|
-
return /* @__PURE__ */ React2.createElement(
|
|
4178
|
-
"li",
|
|
4254
|
+
)), reshapeLayoutType === "Star" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "N\xF3 Central"), /* @__PURE__ */ React2.createElement(
|
|
4255
|
+
CustomSelect,
|
|
4179
4256
|
{
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
{
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
{
|
|
4201
|
-
onClick: () => setIsFilterMenuOpen(!isFilterMenuOpen),
|
|
4202
|
-
className: `px-3 py-2 rounded-md text-sm font-medium border transition-colors flex items-center gap-2 ${isFilterMenuOpen || activeFilters.length > 0 ? "bg-indigo-500/30 text-indigo-200 border-indigo-500/40" : "bg-indigo-500/10 text-indigo-200 border-indigo-500/30 hover:bg-indigo-500/20"}`,
|
|
4203
|
-
title: "Adicionar filtros"
|
|
4204
|
-
},
|
|
4205
|
-
/* @__PURE__ */ React2.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__ */ React2.createElement("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })),
|
|
4206
|
-
"Filters"
|
|
4207
|
-
), isFilterMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute right-0 top-full mt-2 w-56 p-3 rounded-lg bg-slate-900 border border-white/10 shadow-xl z-50 flex flex-col gap-3 animate-in fade-in zoom-in-95 duration-100" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Filtro"), /* @__PURE__ */ React2.createElement("div", { className: "flex bg-slate-800/50 p-1 rounded-md" }, ["Type", "Color", "Dataset"].map((opt) => /* @__PURE__ */ React2.createElement(
|
|
4208
|
-
"button",
|
|
4209
|
-
{
|
|
4210
|
-
key: opt,
|
|
4211
|
-
onClick: () => {
|
|
4212
|
-
setFilterCategory(opt);
|
|
4213
|
-
setFilterValue("");
|
|
4257
|
+
value: reshapeCenterNodeId,
|
|
4258
|
+
onChange: (val) => setReshapeCenterNodeId(val),
|
|
4259
|
+
options: [
|
|
4260
|
+
{ value: "", label: "Selecione um n\xF3..." },
|
|
4261
|
+
...(Array.isArray(dbNodes) ? dbNodes.filter((n) => isNodeInView(n.id)) : []).map((n) => ({
|
|
4262
|
+
value: n.id,
|
|
4263
|
+
label: n.name
|
|
4264
|
+
}))
|
|
4265
|
+
],
|
|
4266
|
+
placeholder: "Selecione um n\xF3..."
|
|
4267
|
+
}
|
|
4268
|
+
)), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-3 pt-4" }, /* @__PURE__ */ React2.createElement(
|
|
4269
|
+
"button",
|
|
4270
|
+
{
|
|
4271
|
+
onClick: () => {
|
|
4272
|
+
setReshapeLayoutType("Star");
|
|
4273
|
+
setReshapeColumnCount(4);
|
|
4274
|
+
setReshapeCenterNodeId("");
|
|
4275
|
+
},
|
|
4276
|
+
className: "flex-1 py-3 bg-white/[0.03] hover:bg-white/[0.08] text-slate-400 hover:text-slate-200 text-[10px] font-black uppercase tracking-widest rounded-xl transition-all border border-white/5 active:scale-95"
|
|
4214
4277
|
},
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4278
|
+
"Resetar"
|
|
4279
|
+
), /* @__PURE__ */ React2.createElement(
|
|
4280
|
+
"button",
|
|
4281
|
+
{
|
|
4282
|
+
onClick: () => {
|
|
4283
|
+
onActivateReshapeLens({
|
|
4284
|
+
type: reshapeLayoutType,
|
|
4285
|
+
columns: reshapeColumnCount,
|
|
4286
|
+
centerNodeId: reshapeCenterNodeId
|
|
4287
|
+
});
|
|
4288
|
+
setActiveSubMenu(null);
|
|
4289
|
+
},
|
|
4290
|
+
disabled: reshapeLayoutType === "Star" && !reshapeCenterNodeId,
|
|
4291
|
+
className: "flex-[2] py-3 bg-indigo-600 hover:bg-indigo-500 text-white text-[10px] font-black uppercase tracking-widest rounded-xl shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95 disabled:opacity-30 disabled:grayscale disabled:cursor-not-allowed"
|
|
4227
4292
|
},
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
)))) : /* @__PURE__ */ React2.createElement("div", { className: "relative flex items-center" }, /* @__PURE__ */ React2.createElement(
|
|
4293
|
+
"Aplicar Lente"
|
|
4294
|
+
)))),
|
|
4295
|
+
/* @__PURE__ */ React2.createElement("div", { className: "p-5 border-t border-white/5 bg-white/[0.02] flex items-center justify-center gap-2" }, /* @__PURE__ */ React2.createElement("span", { className: "h-1 w-1 rounded-full bg-slate-700" }), /* @__PURE__ */ React2.createElement("p", { className: "text-[9px] text-slate-600 uppercase font-bold tracking-[0.2em]" }, "X-View Environment"), /* @__PURE__ */ React2.createElement("span", { className: "h-1 w-1 rounded-full bg-slate-700" }))
|
|
4296
|
+
);
|
|
4297
|
+
};
|
|
4298
|
+
return /* @__PURE__ */ React2.createElement(
|
|
4299
|
+
"div",
|
|
4300
|
+
{
|
|
4301
|
+
ref: containerRef,
|
|
4302
|
+
className: "ui-overlay fixed left-0 top-0 h-[100dvh] flex items-stretch z-40 pointer-events-none",
|
|
4303
|
+
onPointerDown: swallow,
|
|
4304
|
+
onPointerMove: swallow,
|
|
4305
|
+
onPointerUp: swallow,
|
|
4306
|
+
onClick: swallow,
|
|
4307
|
+
onWheel: swallow,
|
|
4308
|
+
onContextMenu: swallow,
|
|
4309
|
+
onDoubleClick: swallow
|
|
4310
|
+
},
|
|
4311
|
+
/* @__PURE__ */ React2.createElement(
|
|
4248
4312
|
"div",
|
|
4249
4313
|
{
|
|
4250
|
-
className:
|
|
4251
|
-
|
|
4252
|
-
}
|
|
4253
|
-
), /* @__PURE__ */ React2.createElement(
|
|
4254
|
-
"input",
|
|
4255
|
-
{
|
|
4256
|
-
type: "text",
|
|
4257
|
-
value: filterValue,
|
|
4258
|
-
onChange: (e) => setFilterValue(e.target.value),
|
|
4259
|
-
placeholder: "#RRGGBB",
|
|
4260
|
-
className: "w-full bg-slate-800 pl-7 pr-2 py-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white font-mono",
|
|
4261
|
-
autoFocus: true
|
|
4262
|
-
}
|
|
4263
|
-
))), /* @__PURE__ */ React2.createElement(
|
|
4264
|
-
"button",
|
|
4265
|
-
{
|
|
4266
|
-
onClick: handleAddFilter,
|
|
4267
|
-
disabled: !filterValue.trim(),
|
|
4268
|
-
className: "w-full py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed text-white text-xs font-medium rounded transition-colors"
|
|
4269
|
-
},
|
|
4270
|
-
"Aplicar Filtro"
|
|
4271
|
-
))), selectedNodeId && isNodeInView(selectedNodeId) && /* @__PURE__ */ React2.createElement("span", { className: "text-xs text-emerald-400 absolute bottom-[-18px] left-0" }, "J\xE1 vis\xEDvel")), viewType === "view" && ability.can("import", "File") && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
4272
|
-
"button",
|
|
4273
|
-
{
|
|
4274
|
-
onClick: onOpenImportModal,
|
|
4275
|
-
className: `${buttonBaseClass} mt-2`
|
|
4276
|
-
},
|
|
4277
|
-
/* @__PURE__ */ React2.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__ */ React2.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), /* @__PURE__ */ React2.createElement("polyline", { points: "17 8 12 3 7 8" }), /* @__PURE__ */ React2.createElement("line", { x1: "12", y1: "3", x2: "12", y2: "15" })),
|
|
4278
|
-
"Importar arquivo"
|
|
4279
|
-
), /* @__PURE__ */ React2.createElement("p", { className: "mt-1.5 text-xs text-slate-400 text-center px-1 leading-tight" }, "Importar datasets ou ancestralidades das views."), /* @__PURE__ */ React2.createElement("div", { className: "h-9 mt-1 flex items-center justify-center" }, importSuccessMessage && /* @__PURE__ */ React2.createElement("p", { className: "w-full text-center text-xs font-medium text-indigo-300 bg-indigo-500/10 border border-indigo-500/20 rounded-md py-1.5 px-2" }, importSuccessMessage)))), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Lentes"), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: questLensRef }, /* @__PURE__ */ React2.createElement(
|
|
4280
|
-
"button",
|
|
4281
|
-
{
|
|
4282
|
-
onClick: () => setIsQuestLensMenuOpen(!isQuestLensMenuOpen),
|
|
4283
|
-
className: `${buttonBaseClass} ${isQuestLensMenuOpen || questFilterAssignee || questFilterStatus || questFilterMilestone ? "bg-indigo-500/30 border-indigo-400" : ""}`,
|
|
4284
|
-
title: "Abrir filtros da Lente de Quests"
|
|
4285
|
-
},
|
|
4286
|
-
/* @__PURE__ */ React2.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__ */ React2.createElement("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), /* @__PURE__ */ React2.createElement("path", { d: "M9 12l2 2 4-4" })),
|
|
4287
|
-
"Quest Lens",
|
|
4288
|
-
(questFilterAssignee || questFilterStatus || questFilterMilestone) && /* @__PURE__ */ React2.createElement("span", { className: "ml-1 px-1.5 py-0.5 rounded-full bg-indigo-500 text-[9px] font-bold" }, "!")
|
|
4289
|
-
), isQuestLensMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute left-0 bottom-full mb-2 w-full p-4 rounded-xl bg-slate-900 border border-white/10 shadow-2xl z-50 flex flex-col gap-4 animate-in fade-in slide-in-from-bottom-2 duration-200" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Respons\xE1vel"), /* @__PURE__ */ React2.createElement(
|
|
4290
|
-
"select",
|
|
4291
|
-
{
|
|
4292
|
-
value: questFilterAssignee,
|
|
4293
|
-
onChange: (e) => setQuestFilterAssignee(e.target.value),
|
|
4294
|
-
className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
|
|
4295
|
-
},
|
|
4296
|
-
/* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Respons\xE1veis"),
|
|
4297
|
-
viewMembers.map((m) => /* @__PURE__ */ React2.createElement("option", { key: m.id, value: m.id }, m.name || m.email))
|
|
4298
|
-
)), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Status"), /* @__PURE__ */ React2.createElement(
|
|
4299
|
-
"select",
|
|
4300
|
-
{
|
|
4301
|
-
value: questFilterStatus,
|
|
4302
|
-
onChange: (e) => setQuestFilterStatus(e.target.value),
|
|
4303
|
-
className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
|
|
4314
|
+
className: `h-full w-[300px] flex-shrink-0 flex flex-col overflow-hidden bg-slate-950/80 backdrop-blur-2xl border-r border-white/10 shadow-[20px_0_40px_rgba(0,0,0,0.4)] pointer-events-auto transition-transform duration-500 ease-in-out absolute md:relative z-20 md:z-auto
|
|
4315
|
+
${activeSubMenu ? "-translate-x-full md:translate-x-0" : "translate-x-0"}`
|
|
4304
4316
|
},
|
|
4305
|
-
/* @__PURE__ */ React2.createElement("
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
"select",
|
|
4312
|
-
{
|
|
4313
|
-
value: questFilterMilestone,
|
|
4314
|
-
onChange: (e) => setQuestFilterMilestone(e.target.value),
|
|
4315
|
-
className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
|
|
4316
|
-
},
|
|
4317
|
-
/* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Milestones"),
|
|
4318
|
-
milestones.map((ms) => /* @__PURE__ */ React2.createElement("option", { key: ms.id, value: ms.id }, ms.name, " ", ms.status === "inactive" ? "(Inativo)" : ""))
|
|
4319
|
-
)), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-2 pt-1" }, /* @__PURE__ */ React2.createElement(
|
|
4320
|
-
"button",
|
|
4321
|
-
{
|
|
4322
|
-
onClick: () => {
|
|
4323
|
-
setQuestFilterAssignee("");
|
|
4324
|
-
setQuestFilterStatus("");
|
|
4325
|
-
setQuestFilterMilestone("");
|
|
4326
|
-
},
|
|
4327
|
-
className: "flex-1 py-2 bg-white/5 hover:bg-white/10 text-slate-300 text-[11px] font-medium rounded-lg transition-colors border border-white/5"
|
|
4328
|
-
},
|
|
4329
|
-
"Limpar"
|
|
4330
|
-
), /* @__PURE__ */ React2.createElement(
|
|
4331
|
-
"button",
|
|
4332
|
-
{
|
|
4333
|
-
onClick: () => {
|
|
4334
|
-
onActivateQuestLens({
|
|
4335
|
-
assigneeId: questFilterAssignee,
|
|
4336
|
-
status: questFilterStatus,
|
|
4337
|
-
milestoneId: questFilterMilestone
|
|
4338
|
-
});
|
|
4339
|
-
setIsQuestLensMenuOpen(false);
|
|
4340
|
-
onToggle(false);
|
|
4317
|
+
/* @__PURE__ */ React2.createElement("div", { className: "relative px-5 py-5 border-b border-white/5 flex items-center gap-3 bg-white/[0.02]" }, /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-500 shadow-[0_0_12px_rgba(99,102,241,0.8)]" }), /* @__PURE__ */ React2.createElement("span", { className: "absolute inset-0 h-2.5 w-2.5 rounded-full bg-indigo-400 animate-ping opacity-40" })), /* @__PURE__ */ React2.createElement("h3", { className: "text-xs font-black text-slate-200 uppercase tracking-[0.2em]" }, "Ferramentas"), /* @__PURE__ */ React2.createElement(
|
|
4318
|
+
"button",
|
|
4319
|
+
{
|
|
4320
|
+
className: "ml-auto p-2 rounded-full text-slate-500 hover:text-white hover:bg-white/10 transition-all duration-200",
|
|
4321
|
+
onClick: () => onToggle(false),
|
|
4322
|
+
title: "Fechar Painel"
|
|
4341
4323
|
},
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
},
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
},
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
"input",
|
|
4366
|
-
{
|
|
4367
|
-
type: "number",
|
|
4368
|
-
min: "1",
|
|
4369
|
-
max: "12",
|
|
4370
|
-
value: reshapeColumnCount,
|
|
4371
|
-
onChange: (e) => setReshapeColumnCount(parseInt(e.target.value) || 4),
|
|
4372
|
-
className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white"
|
|
4373
|
-
}
|
|
4374
|
-
)), reshapeLayoutType === "Star" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "N\xF3 Central"), /* @__PURE__ */ React2.createElement(
|
|
4375
|
-
"select",
|
|
4376
|
-
{
|
|
4377
|
-
value: reshapeCenterNodeId,
|
|
4378
|
-
onChange: (e) => setReshapeCenterNodeId(e.target.value),
|
|
4379
|
-
className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
|
|
4380
|
-
},
|
|
4381
|
-
/* @__PURE__ */ React2.createElement("option", { value: "" }, "Selecione..."),
|
|
4382
|
-
(Array.isArray(dbNodes) ? dbNodes.filter((n) => isNodeInView(n.id)) : []).map((n) => /* @__PURE__ */ React2.createElement("option", { key: n.id, value: n.id }, n.name))
|
|
4383
|
-
)), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-2 pt-1" }, /* @__PURE__ */ React2.createElement(
|
|
4384
|
-
"button",
|
|
4385
|
-
{
|
|
4386
|
-
onClick: () => {
|
|
4387
|
-
setReshapeLayoutType("Star");
|
|
4388
|
-
setReshapeColumnCount(4);
|
|
4389
|
-
setReshapeCenterNodeId("");
|
|
4324
|
+
/* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement(
|
|
4325
|
+
"path",
|
|
4326
|
+
{
|
|
4327
|
+
fillRule: "evenodd",
|
|
4328
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
4329
|
+
clipRule: "evenodd"
|
|
4330
|
+
}
|
|
4331
|
+
))
|
|
4332
|
+
), /* @__PURE__ */ React2.createElement("div", { className: "absolute top-0 left-0 right-0 h-[1px] bg-gradient-to-r from-transparent via-indigo-500/20 to-transparent" })),
|
|
4333
|
+
/* @__PURE__ */ React2.createElement("div", { className: "flex-1 overflow-y-auto px-5 py-6 space-y-8 custom-scrollbar relative" }, /* @__PURE__ */ React2.createElement("section", null, /* @__PURE__ */ React2.createElement("div", { className: "mb-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Pesquisar Node")), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement("div", { className: "w-full bg-slate-800/70 p-1.5 flex flex-wrap items-center gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all cursor-text min-h-[42px]", onClick: () => {
|
|
4334
|
+
var _a;
|
|
4335
|
+
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
4336
|
+
} }, activeFilters.map((filter, idx) => /* @__PURE__ */ React2.createElement("span", { key: idx, className: "flex items-center gap-1.5 bg-indigo-500/20 text-indigo-200 border border-indigo-500/30 px-2 py-0.5 rounded text-xs font-medium max-w-full" }, filter.type === "Color" && /* @__PURE__ */ React2.createElement("span", { className: "inline-block w-2.5 h-2.5 rounded-full border border-white/20", style: { backgroundColor: filter.value } }), /* @__PURE__ */ React2.createElement("span", { className: "truncate max-w-[120px]" }, filter.type, ": ", filter.value), /* @__PURE__ */ React2.createElement("button", { type: "button", onClick: (e) => {
|
|
4337
|
+
e.stopPropagation();
|
|
4338
|
+
handleRemoveFilter(idx);
|
|
4339
|
+
}, className: "hover:text-white transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ React2.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))), /* @__PURE__ */ React2.createElement("input", { ref: inputRef, type: "text", value: query, onChange: (e) => setQuery(e.target.value), onFocus: () => setShowList(true), onBlur: () => setTimeout(() => setShowList(false), 120), onKeyDown: handleKeyDown, placeholder: activeFilters.length === 0 ? "Digite parte do nome..." : "", className: "bg-transparent border-none outline-none flex-1 min-w-[80px] text-sm text-slate-100 placeholder-slate-500", autoComplete: "off" })), showList && /* @__PURE__ */ React2.createElement("ul", { className: "custom-scrollbar absolute mt-1 z-10 w-full max-h-[min(448px,50dvh)] overflow-y-auto rounded-lg bg-slate-900/95 border border-white/10 shadow-xl" }, filteredAndSorted.length > 0 ? filteredAndSorted.map((n) => /* @__PURE__ */ React2.createElement("li", { key: n.id, onMouseDown: () => handlePick(n), className: `px-3 py-2 text-sm flex items-center gap-2 cursor-pointer ${selectedNodeId === n.id ? "bg-indigo-600/60 text-white" : "text-slate-200 hover:bg-indigo-500/30"}`, title: n.name }, /* @__PURE__ */ React2.createElement("span", { className: `inline-block h-2 w-2 rounded-full flex-shrink-0 ${isNodeInView(n.id) ? "bg-emerald-400" : "bg-slate-500"}` }), /* @__PURE__ */ React2.createElement("span", { className: "truncate flex-1" }, n.name))) : /* @__PURE__ */ React2.createElement("li", { className: "px-3 py-2 text-sm text-slate-400" }, "Nenhum resultado"))), /* @__PURE__ */ React2.createElement("div", { className: "mt-3 flex items-center gap-2" }, /* @__PURE__ */ React2.createElement("button", { onClick: handleConfirm, disabled: !selectedNodeId, className: `flex-1 ${selectedNodeId ? buttonBaseClass : buttonDisabledClass}` }, /* @__PURE__ */ React2.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__ */ React2.createElement("polygon", { points: "5 3 19 12 5 21 5 3" })), "Renderizar"), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: filterMenuRef }, /* @__PURE__ */ React2.createElement("button", { onClick: () => setIsFilterMenuOpen(!isFilterMenuOpen), className: `px-3 py-2 rounded-md text-sm font-medium border transition-colors flex items-center gap-2 ${isFilterMenuOpen || activeFilters.length > 0 ? "bg-indigo-500/30 text-indigo-200 border-indigo-500/40" : "bg-indigo-500/10 text-indigo-200 border-indigo-500/30 hover:bg-indigo-500/20"}` }, /* @__PURE__ */ React2.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__ */ React2.createElement("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })), "Filters"), isFilterMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute right-0 top-full mt-2 w-56 p-3 rounded-lg bg-slate-900 border border-white/10 shadow-xl z-50 flex flex-col gap-3 animate-in fade-in zoom-in-95 duration-100" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Filtro"), /* @__PURE__ */ React2.createElement("div", { className: "flex bg-slate-800/50 p-1 rounded-md" }, ["Type", "Color", "Dataset"].map((opt) => /* @__PURE__ */ React2.createElement("button", { key: opt, onClick: () => {
|
|
4340
|
+
setFilterCategory(opt);
|
|
4341
|
+
setFilterValue("");
|
|
4342
|
+
}, className: `flex-1 text-xs py-1 rounded transition-colors ${filterCategory === opt ? "bg-indigo-600 text-white" : "text-slate-400 hover:text-slate-200"}` }, opt)))), /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Valor"), /* @__PURE__ */ React2.createElement("input", { type: "text", value: filterValue, onChange: (e) => setFilterValue(e.target.value), className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white" })), /* @__PURE__ */ React2.createElement("button", { onClick: handleAddFilter, disabled: !filterValue.trim(), className: "w-full py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs font-medium rounded transition-colors" }, "Aplicar Filtro"))))), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Lentes"), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement(
|
|
4343
|
+
"button",
|
|
4344
|
+
{
|
|
4345
|
+
onClick: () => setActiveSubMenu(activeSubMenu === "quest" ? null : "quest"),
|
|
4346
|
+
className: `${buttonBaseClass} lens-button ${activeSubMenu === "quest" || questFilterAssignee || questFilterStatus || questFilterMilestone ? "bg-indigo-500/30 border-indigo-400" : ""}`
|
|
4390
4347
|
},
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
"
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
onActivateReshapeLens({
|
|
4399
|
-
type: reshapeLayoutType,
|
|
4400
|
-
columns: reshapeColumnCount,
|
|
4401
|
-
centerNodeId: reshapeCenterNodeId
|
|
4402
|
-
});
|
|
4403
|
-
setIsReshapeLensMenuOpen(false);
|
|
4404
|
-
onToggle(false);
|
|
4348
|
+
/* @__PURE__ */ React2.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__ */ React2.createElement("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), /* @__PURE__ */ React2.createElement("path", { d: "M9 12l2 2 4-4" })),
|
|
4349
|
+
"Quest Lens"
|
|
4350
|
+
)), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement(
|
|
4351
|
+
"button",
|
|
4352
|
+
{
|
|
4353
|
+
onClick: () => setActiveSubMenu(activeSubMenu === "reshape" ? null : "reshape"),
|
|
4354
|
+
className: `${buttonBaseClass} lens-button ${activeSubMenu === "reshape" ? "bg-indigo-500/30 border-indigo-400" : ""}`
|
|
4405
4355
|
},
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
},
|
|
4409
|
-
"
|
|
4410
|
-
|
|
4411
|
-
"
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
},
|
|
4417
|
-
/* @__PURE__ */ React2.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__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React2.createElement("polyline", { points: "12 6 12 12 16 14" })),
|
|
4418
|
-
"Timeline"
|
|
4419
|
-
), /* @__PURE__ */ React2.createElement(
|
|
4420
|
-
"button",
|
|
4421
|
-
{
|
|
4422
|
-
onClick: onOpenBoards,
|
|
4423
|
-
className: buttonBaseClass,
|
|
4424
|
-
title: "Abrir painel de Boards"
|
|
4425
|
-
},
|
|
4426
|
-
/* @__PURE__ */ React2.createElement(FiLayers, { size: 16 }),
|
|
4427
|
-
"Boards"
|
|
4428
|
-
)), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-3" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Milestones"), /* @__PURE__ */ React2.createElement(
|
|
4429
|
-
"button",
|
|
4430
|
-
{
|
|
4431
|
-
onClick: onOpenMilestoneManager,
|
|
4432
|
-
className: buttonBaseClass,
|
|
4433
|
-
title: "Gerenciar os milestones deste cen\xE1rio"
|
|
4434
|
-
},
|
|
4435
|
-
/* @__PURE__ */ React2.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__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "6" }), /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "2" })),
|
|
4436
|
-
"Gerenciar Milestones"
|
|
4437
|
-
))), /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/30" }, /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Navega\xE7\xE3o")), ability.can("update", "Scene") && /* @__PURE__ */ React2.createElement(
|
|
4438
|
-
"button",
|
|
4439
|
-
{
|
|
4440
|
-
onClick: handleSaveClick,
|
|
4441
|
-
disabled: isSaving,
|
|
4442
|
-
className: isSaving ? buttonDisabledClass : buttonBaseClass,
|
|
4443
|
-
title: "Salvar a visualiza\xE7\xE3o atual como o cen\xE1rio inicial"
|
|
4444
|
-
},
|
|
4445
|
-
isSaving ? /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("svg", { className: "animate-spin h-4 w-4 text-slate-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React2.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React2.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })), "Salvando...") : /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.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__ */ React2.createElement("path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }), /* @__PURE__ */ React2.createElement("polyline", { points: "17 21 17 13 7 13 7 21" }), /* @__PURE__ */ React2.createElement("polyline", { points: "7 3 7 8 15 8" })), "Atualizar cen\xE1rio inicial")
|
|
4446
|
-
), /* @__PURE__ */ React2.createElement(
|
|
4447
|
-
"button",
|
|
4448
|
-
{
|
|
4449
|
-
onClick: onNavigateBack,
|
|
4450
|
-
className: buttonBaseClass,
|
|
4451
|
-
title: "Voltar \xE0 p\xE1gina de cen\xE1rios"
|
|
4452
|
-
},
|
|
4453
|
-
/* @__PURE__ */ React2.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__ */ React2.createElement("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), /* @__PURE__ */ React2.createElement("polyline", { points: "12 19 5 12 12 5" })),
|
|
4454
|
-
"Voltar \xE0 p\xE1gina de cen\xE1rios"
|
|
4455
|
-
))), contextLabel && /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/50" }, /* @__PURE__ */ React2.createElement("div", { className: "flex items-center gap-2", title: contextLabel }, /* @__PURE__ */ React2.createElement("span", { className: "text-sm font-medium text-slate-200 truncate" }, contextLabel))), /* @__PURE__ */ React2.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }))
|
|
4356
|
+
/* @__PURE__ */ React2.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__ */ React2.createElement("polygon", { points: "12 2 2 7 12 12 22 7 12 2" }), /* @__PURE__ */ React2.createElement("polyline", { points: "2 17 12 22 22 17" }), /* @__PURE__ */ React2.createElement("polyline", { points: "2 12 12 17 22 12" })),
|
|
4357
|
+
"Reshape Lens"
|
|
4358
|
+
)), /* @__PURE__ */ React2.createElement("button", { onClick: onActivateTimeline, className: buttonBaseClass }, /* @__PURE__ */ React2.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__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React2.createElement("polyline", { points: "12 6 12 12 16 14" })), "Timeline"), /* @__PURE__ */ React2.createElement("button", { onClick: onOpenBoards, className: buttonBaseClass }, /* @__PURE__ */ React2.createElement(FiLayers, { size: 16 }), "Boards")), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-3" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Milestones"), /* @__PURE__ */ React2.createElement("button", { onClick: onOpenMilestoneManager, className: buttonBaseClass }, "Gerenciar Milestones"))),
|
|
4359
|
+
/* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/30" }, /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Navega\xE7\xE3o"), ability.can("update", "Scene") && /* @__PURE__ */ React2.createElement("button", { onClick: handleSaveClick, disabled: isSaving, className: isSaving ? buttonDisabledClass : buttonBaseClass }, isSaving ? "Salvando..." : "Atualizar cen\xE1rio inicial"), /* @__PURE__ */ React2.createElement("button", { onClick: onNavigateBack, className: buttonBaseClass }, "Voltar \xE0 p\xE1gina de cen\xE1rios"))),
|
|
4360
|
+
contextLabel && /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/50 truncate text-sm font-medium text-slate-200" }, contextLabel),
|
|
4361
|
+
/* @__PURE__ */ React2.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" })
|
|
4362
|
+
),
|
|
4363
|
+
/* @__PURE__ */ React2.createElement("div", { className: `h-full pointer-events-auto transition-all duration-500 ease-out absolute md:relative left-0 top-0 z-30 md:z-10 flex-shrink-0 overflow-hidden
|
|
4364
|
+
${activeSubMenu ? "translate-x-0 md:translate-x-0 w-[100vw] md:w-[280px] opacity-100" : "-translate-x-full md:translate-x-0 w-[100vw] md:w-0 opacity-0 md:opacity-100"}
|
|
4365
|
+
` }, renderAnnexedPanel())
|
|
4456
4366
|
);
|
|
4457
4367
|
}
|
|
4458
4368
|
|