@lv-x-software-house/x_view 1.2.2-dev.26 → 1.2.2-dev.27
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 +25 -7
- package/dist/index.mjs +25 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5530,6 +5530,7 @@ function CreateAncestryPanel({
|
|
|
5530
5530
|
} = ancestryMode;
|
|
5531
5531
|
const [isSaving, setIsSaving] = (0, import_react11.useState)(false);
|
|
5532
5532
|
const [isLinkCopied, setIsLinkCopied] = (0, import_react11.useState)(false);
|
|
5533
|
+
const [showDeleteBranchConfirm, setShowDeleteBranchConfirm] = (0, import_react11.useState)(false);
|
|
5533
5534
|
const handleCopyLink = (e) => {
|
|
5534
5535
|
e.stopPropagation();
|
|
5535
5536
|
if (!currentAncestryId || currentAncestryId === "temp_root" || currentAncestryId === "temp_creating") {
|
|
@@ -5547,6 +5548,9 @@ function CreateAncestryPanel({
|
|
|
5547
5548
|
const [customProps, setCustomProps] = (0, import_react11.useState)([]);
|
|
5548
5549
|
const propsEndRef = (0, import_react11.useRef)(null);
|
|
5549
5550
|
const [branchStack, setBranchStack] = (0, import_react11.useState)([]);
|
|
5551
|
+
(0, import_react11.useEffect)(() => {
|
|
5552
|
+
setShowDeleteBranchConfirm(false);
|
|
5553
|
+
}, [branchStack]);
|
|
5550
5554
|
const [targetRenderNodeId, setTargetRenderNodeId] = (0, import_react11.useState)(null);
|
|
5551
5555
|
const highlightedPathIds = (0, import_react11.useMemo)(() => {
|
|
5552
5556
|
var _a, _b;
|
|
@@ -5959,8 +5963,6 @@ function CreateAncestryPanel({
|
|
|
5959
5963
|
};
|
|
5960
5964
|
const handleDeleteBranch = async () => {
|
|
5961
5965
|
if (branchStack.length === 0) return;
|
|
5962
|
-
const confirmDelete = window.confirm("Tem certeza que deseja excluir esta ramifica\xE7\xE3o e todo o seu conte\xFAdo interno?");
|
|
5963
|
-
if (!confirmDelete) return;
|
|
5964
5966
|
const rootTreeClone = JSON.parse(JSON.stringify(ancestryMode.tree));
|
|
5965
5967
|
let ptr = rootTreeClone;
|
|
5966
5968
|
for (let i = 0; i < branchStack.length - 1; i++) {
|
|
@@ -5987,7 +5989,6 @@ function CreateAncestryPanel({
|
|
|
5987
5989
|
ancestryMode.ancestryDescription,
|
|
5988
5990
|
ancestryMode.ancestryDescriptionSections,
|
|
5989
5991
|
true,
|
|
5990
|
-
// keepOpen
|
|
5991
5992
|
rootTreeClone,
|
|
5992
5993
|
rootExtras
|
|
5993
5994
|
);
|
|
@@ -6683,16 +6684,33 @@ function CreateAncestryPanel({
|
|
|
6683
6684
|
},
|
|
6684
6685
|
/* @__PURE__ */ import_react11.default.createElement(import_fi9.FiArrowLeft, null),
|
|
6685
6686
|
" Voltar para Principal / N\xEDvel Anterior"
|
|
6686
|
-
), !isContextLinked && /* @__PURE__ */ import_react11.default.createElement(
|
|
6687
|
+
), !isContextLinked && /* @__PURE__ */ import_react11.default.createElement("div", { className: "relative animate-in fade-in duration-200" }, showDeleteBranchConfirm ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3 bg-rose-500/10 border border-rose-500/30 px-3 py-1 rounded-md shadow-inner" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "text-xs text-rose-300 font-medium" }, "Excluir?"), /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react11.default.createElement(
|
|
6688
|
+
"button",
|
|
6689
|
+
{
|
|
6690
|
+
onClick: () => {
|
|
6691
|
+
setShowDeleteBranchConfirm(false);
|
|
6692
|
+
handleDeleteBranch();
|
|
6693
|
+
},
|
|
6694
|
+
className: "text-xs font-bold text-rose-400 hover:text-rose-200 transition-colors"
|
|
6695
|
+
},
|
|
6696
|
+
"Sim"
|
|
6697
|
+
), /* @__PURE__ */ import_react11.default.createElement("span", { className: "text-slate-600/50" }, "|"), /* @__PURE__ */ import_react11.default.createElement(
|
|
6698
|
+
"button",
|
|
6699
|
+
{
|
|
6700
|
+
onClick: () => setShowDeleteBranchConfirm(false),
|
|
6701
|
+
className: "text-xs text-slate-400 hover:text-white transition-colors"
|
|
6702
|
+
},
|
|
6703
|
+
"N\xE3o"
|
|
6704
|
+
))) : /* @__PURE__ */ import_react11.default.createElement(
|
|
6687
6705
|
"button",
|
|
6688
6706
|
{
|
|
6689
|
-
onClick:
|
|
6690
|
-
className: "flex items-center gap-1.5 text-xs text-rose-400 hover:text-white hover:bg-rose-500/20 px-2 py-1 rounded transition-colors",
|
|
6707
|
+
onClick: () => setShowDeleteBranchConfirm(true),
|
|
6708
|
+
className: "flex items-center gap-1.5 text-xs text-rose-400/80 hover:text-white hover:bg-rose-500/20 px-2 py-1 rounded transition-colors",
|
|
6691
6709
|
title: "Excluir permanentemente esta ramifica\xE7\xE3o e seu conte\xFAdo"
|
|
6692
6710
|
},
|
|
6693
6711
|
/* @__PURE__ */ import_react11.default.createElement(import_fi9.FiTrash2, null),
|
|
6694
6712
|
" Excluir Ramifica\xE7\xE3o"
|
|
6695
|
-
)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "px-6 pb-4 pt-2 overflow-y-auto flex-grow custom-scrollbar" }, branchStack.length > 0 && /* @__PURE__ */ import_react11.default.createElement("div", { className: "mb-4" }, isContextLinked ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-3 rounded-lg bg-indigo-500/10 border border-indigo-500/30 flex items-center justify-between" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-8 h-8 rounded bg-indigo-500/20 text-indigo-300 grid place-content-center" }, /* @__PURE__ */ import_react11.default.createElement(import_fi9.FiLayers, null)), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("div", { className: "text-xs text-indigo-200 font-semibold uppercase tracking-wider" }, "Ancestralidade Vinculada"), /* @__PURE__ */ import_react11.default.createElement("div", { className: "text-sm text-white font-medium truncate max-w-[200px]" }, currentContext.name.replace("[REF] ", "")))), /* @__PURE__ */ import_react11.default.createElement(
|
|
6713
|
+
))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "px-6 pb-4 pt-2 overflow-y-auto flex-grow custom-scrollbar" }, branchStack.length > 0 && /* @__PURE__ */ import_react11.default.createElement("div", { className: "mb-4" }, isContextLinked ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-3 rounded-lg bg-indigo-500/10 border border-indigo-500/30 flex items-center justify-between" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-8 h-8 rounded bg-indigo-500/20 text-indigo-300 grid place-content-center" }, /* @__PURE__ */ import_react11.default.createElement(import_fi9.FiLayers, null)), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("div", { className: "text-xs text-indigo-200 font-semibold uppercase tracking-wider" }, "Ancestralidade Vinculada"), /* @__PURE__ */ import_react11.default.createElement("div", { className: "text-sm text-white font-medium truncate max-w-[200px]" }, currentContext.name.replace("[REF] ", "")))), /* @__PURE__ */ import_react11.default.createElement(
|
|
6696
6714
|
"button",
|
|
6697
6715
|
{
|
|
6698
6716
|
onClick: handleUnlinkAncestry,
|
package/dist/index.mjs
CHANGED
|
@@ -5517,6 +5517,7 @@ function CreateAncestryPanel({
|
|
|
5517
5517
|
} = ancestryMode;
|
|
5518
5518
|
const [isSaving, setIsSaving] = useState11(false);
|
|
5519
5519
|
const [isLinkCopied, setIsLinkCopied] = useState11(false);
|
|
5520
|
+
const [showDeleteBranchConfirm, setShowDeleteBranchConfirm] = useState11(false);
|
|
5520
5521
|
const handleCopyLink = (e) => {
|
|
5521
5522
|
e.stopPropagation();
|
|
5522
5523
|
if (!currentAncestryId || currentAncestryId === "temp_root" || currentAncestryId === "temp_creating") {
|
|
@@ -5534,6 +5535,9 @@ function CreateAncestryPanel({
|
|
|
5534
5535
|
const [customProps, setCustomProps] = useState11([]);
|
|
5535
5536
|
const propsEndRef = useRef8(null);
|
|
5536
5537
|
const [branchStack, setBranchStack] = useState11([]);
|
|
5538
|
+
useEffect10(() => {
|
|
5539
|
+
setShowDeleteBranchConfirm(false);
|
|
5540
|
+
}, [branchStack]);
|
|
5537
5541
|
const [targetRenderNodeId, setTargetRenderNodeId] = useState11(null);
|
|
5538
5542
|
const highlightedPathIds = useMemo8(() => {
|
|
5539
5543
|
var _a, _b;
|
|
@@ -5946,8 +5950,6 @@ function CreateAncestryPanel({
|
|
|
5946
5950
|
};
|
|
5947
5951
|
const handleDeleteBranch = async () => {
|
|
5948
5952
|
if (branchStack.length === 0) return;
|
|
5949
|
-
const confirmDelete = window.confirm("Tem certeza que deseja excluir esta ramifica\xE7\xE3o e todo o seu conte\xFAdo interno?");
|
|
5950
|
-
if (!confirmDelete) return;
|
|
5951
5953
|
const rootTreeClone = JSON.parse(JSON.stringify(ancestryMode.tree));
|
|
5952
5954
|
let ptr = rootTreeClone;
|
|
5953
5955
|
for (let i = 0; i < branchStack.length - 1; i++) {
|
|
@@ -5974,7 +5976,6 @@ function CreateAncestryPanel({
|
|
|
5974
5976
|
ancestryMode.ancestryDescription,
|
|
5975
5977
|
ancestryMode.ancestryDescriptionSections,
|
|
5976
5978
|
true,
|
|
5977
|
-
// keepOpen
|
|
5978
5979
|
rootTreeClone,
|
|
5979
5980
|
rootExtras
|
|
5980
5981
|
);
|
|
@@ -6670,16 +6671,33 @@ function CreateAncestryPanel({
|
|
|
6670
6671
|
},
|
|
6671
6672
|
/* @__PURE__ */ React10.createElement(FiArrowLeft2, null),
|
|
6672
6673
|
" Voltar para Principal / N\xEDvel Anterior"
|
|
6673
|
-
), !isContextLinked && /* @__PURE__ */ React10.createElement(
|
|
6674
|
+
), !isContextLinked && /* @__PURE__ */ React10.createElement("div", { className: "relative animate-in fade-in duration-200" }, showDeleteBranchConfirm ? /* @__PURE__ */ React10.createElement("div", { className: "flex items-center gap-3 bg-rose-500/10 border border-rose-500/30 px-3 py-1 rounded-md shadow-inner" }, /* @__PURE__ */ React10.createElement("span", { className: "text-xs text-rose-300 font-medium" }, "Excluir?"), /* @__PURE__ */ React10.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React10.createElement(
|
|
6675
|
+
"button",
|
|
6676
|
+
{
|
|
6677
|
+
onClick: () => {
|
|
6678
|
+
setShowDeleteBranchConfirm(false);
|
|
6679
|
+
handleDeleteBranch();
|
|
6680
|
+
},
|
|
6681
|
+
className: "text-xs font-bold text-rose-400 hover:text-rose-200 transition-colors"
|
|
6682
|
+
},
|
|
6683
|
+
"Sim"
|
|
6684
|
+
), /* @__PURE__ */ React10.createElement("span", { className: "text-slate-600/50" }, "|"), /* @__PURE__ */ React10.createElement(
|
|
6685
|
+
"button",
|
|
6686
|
+
{
|
|
6687
|
+
onClick: () => setShowDeleteBranchConfirm(false),
|
|
6688
|
+
className: "text-xs text-slate-400 hover:text-white transition-colors"
|
|
6689
|
+
},
|
|
6690
|
+
"N\xE3o"
|
|
6691
|
+
))) : /* @__PURE__ */ React10.createElement(
|
|
6674
6692
|
"button",
|
|
6675
6693
|
{
|
|
6676
|
-
onClick:
|
|
6677
|
-
className: "flex items-center gap-1.5 text-xs text-rose-400 hover:text-white hover:bg-rose-500/20 px-2 py-1 rounded transition-colors",
|
|
6694
|
+
onClick: () => setShowDeleteBranchConfirm(true),
|
|
6695
|
+
className: "flex items-center gap-1.5 text-xs text-rose-400/80 hover:text-white hover:bg-rose-500/20 px-2 py-1 rounded transition-colors",
|
|
6678
6696
|
title: "Excluir permanentemente esta ramifica\xE7\xE3o e seu conte\xFAdo"
|
|
6679
6697
|
},
|
|
6680
6698
|
/* @__PURE__ */ React10.createElement(FiTrash22, null),
|
|
6681
6699
|
" Excluir Ramifica\xE7\xE3o"
|
|
6682
|
-
)), /* @__PURE__ */ React10.createElement("div", { className: "px-6 pb-4 pt-2 overflow-y-auto flex-grow custom-scrollbar" }, branchStack.length > 0 && /* @__PURE__ */ React10.createElement("div", { className: "mb-4" }, isContextLinked ? /* @__PURE__ */ React10.createElement("div", { className: "p-3 rounded-lg bg-indigo-500/10 border border-indigo-500/30 flex items-center justify-between" }, /* @__PURE__ */ React10.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React10.createElement("div", { className: "w-8 h-8 rounded bg-indigo-500/20 text-indigo-300 grid place-content-center" }, /* @__PURE__ */ React10.createElement(FiLayers5, null)), /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement("div", { className: "text-xs text-indigo-200 font-semibold uppercase tracking-wider" }, "Ancestralidade Vinculada"), /* @__PURE__ */ React10.createElement("div", { className: "text-sm text-white font-medium truncate max-w-[200px]" }, currentContext.name.replace("[REF] ", "")))), /* @__PURE__ */ React10.createElement(
|
|
6700
|
+
))), /* @__PURE__ */ React10.createElement("div", { className: "px-6 pb-4 pt-2 overflow-y-auto flex-grow custom-scrollbar" }, branchStack.length > 0 && /* @__PURE__ */ React10.createElement("div", { className: "mb-4" }, isContextLinked ? /* @__PURE__ */ React10.createElement("div", { className: "p-3 rounded-lg bg-indigo-500/10 border border-indigo-500/30 flex items-center justify-between" }, /* @__PURE__ */ React10.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React10.createElement("div", { className: "w-8 h-8 rounded bg-indigo-500/20 text-indigo-300 grid place-content-center" }, /* @__PURE__ */ React10.createElement(FiLayers5, null)), /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement("div", { className: "text-xs text-indigo-200 font-semibold uppercase tracking-wider" }, "Ancestralidade Vinculada"), /* @__PURE__ */ React10.createElement("div", { className: "text-sm text-white font-medium truncate max-w-[200px]" }, currentContext.name.replace("[REF] ", "")))), /* @__PURE__ */ React10.createElement(
|
|
6683
6701
|
"button",
|
|
6684
6702
|
{
|
|
6685
6703
|
onClick: handleUnlinkAncestry,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.2-dev.
|
|
3
|
+
"version": "1.2.2-dev.27",
|
|
4
4
|
"description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
|
|
5
5
|
"author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
|
|
6
6
|
"license": "UNLICENSED",
|