@lv-x-software-house/x_view 1.2.4-dev.25 → 1.2.4-dev.26
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 +42 -17
- package/dist/index.mjs +42 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -505,7 +505,11 @@ function XViewSidebar({
|
|
|
505
505
|
let pool = base;
|
|
506
506
|
const qNorm = normalize(query);
|
|
507
507
|
if (qNorm) {
|
|
508
|
-
pool = pool.filter((n) =>
|
|
508
|
+
pool = pool.filter((n) => {
|
|
509
|
+
const matchName = normalize((n == null ? void 0 : n.name) || "").includes(qNorm);
|
|
510
|
+
const matchRawTitle = n.is_quest && n.raw_title ? normalize(n.raw_title).includes(qNorm) : false;
|
|
511
|
+
return matchName || matchRawTitle;
|
|
512
|
+
});
|
|
509
513
|
}
|
|
510
514
|
if (activeFilters.length > 0) {
|
|
511
515
|
pool = pool.filter((node) => {
|
|
@@ -8691,7 +8695,12 @@ function QuestDetailsPanel({
|
|
|
8691
8695
|
userRole,
|
|
8692
8696
|
currentDatasetName
|
|
8693
8697
|
}) {
|
|
8694
|
-
|
|
8698
|
+
var _a;
|
|
8699
|
+
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) || "";
|
|
8700
|
+
const [rawTitle, setRawTitle] = (0, import_react18.useState)(initialRawTitle);
|
|
8701
|
+
const prefixParts = ((node == null ? void 0 : node.name) || "").split(" - \xBB ");
|
|
8702
|
+
const questPrefix = prefixParts.length > 1 ? prefixParts[0] : "";
|
|
8703
|
+
const standardizedName = questPrefix ? `${questPrefix} - \xBB ${rawTitle || "Sem t\xEDtulo"}` : rawTitle;
|
|
8695
8704
|
const [types, setTypes] = (0, import_react18.useState)((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
|
|
8696
8705
|
const [typeInput, setTypeInput] = (0, import_react18.useState)("");
|
|
8697
8706
|
const [status, setStatus] = (0, import_react18.useState)((node == null ? void 0 : node.status) ?? "Backlog");
|
|
@@ -8720,15 +8729,17 @@ function QuestDetailsPanel({
|
|
|
8720
8729
|
const propsEndRef = (0, import_react18.useRef)(null);
|
|
8721
8730
|
const canEdit = userRole !== "viewer";
|
|
8722
8731
|
const availableImages = customProps.filter((p) => p.type === "images").flatMap((p) => Array.isArray(p.value) ? p.value : []).filter((img) => img.value && img.value.trim() !== "");
|
|
8723
|
-
const handleImageClickFromText = (url,
|
|
8732
|
+
const handleImageClickFromText = (url, name) => {
|
|
8724
8733
|
if (onOpenImageViewer) {
|
|
8725
|
-
onOpenImageViewer([{ name:
|
|
8734
|
+
onOpenImageViewer([{ name: name || "Imagem", value: url }], 0);
|
|
8726
8735
|
}
|
|
8727
8736
|
};
|
|
8728
8737
|
(0, import_react18.useEffect)(() => {
|
|
8738
|
+
var _a2;
|
|
8729
8739
|
if ((node == null ? void 0 : node.id) !== prevNodeIdRef.current) {
|
|
8730
8740
|
prevNodeIdRef.current = node == null ? void 0 : node.id;
|
|
8731
|
-
|
|
8741
|
+
const newRawTitle = (node == null ? void 0 : node.raw_title) || (((_a2 = node == null ? void 0 : node.name) == null ? void 0 : _a2.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
|
|
8742
|
+
setRawTitle(newRawTitle);
|
|
8732
8743
|
setTypes((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
|
|
8733
8744
|
setStatus((node == null ? void 0 : node.status) ?? "Backlog");
|
|
8734
8745
|
setSize((node == null ? void 0 : node.size) ?? "medium");
|
|
@@ -8763,9 +8774,10 @@ function QuestDetailsPanel({
|
|
|
8763
8774
|
};
|
|
8764
8775
|
const swallow = (e) => e.stopPropagation();
|
|
8765
8776
|
const handleNameChange = (e) => {
|
|
8766
|
-
const
|
|
8767
|
-
|
|
8768
|
-
|
|
8777
|
+
const val = e.target.value;
|
|
8778
|
+
setRawTitle(val);
|
|
8779
|
+
const newStandardName = questPrefix ? `${questPrefix} - \xBB ${val || "Sem t\xEDtulo"}` : val;
|
|
8780
|
+
onNameChange == null ? void 0 : onNameChange(node.id, newStandardName);
|
|
8769
8781
|
};
|
|
8770
8782
|
const handleSizeChange = (newSize) => {
|
|
8771
8783
|
setSize(newSize);
|
|
@@ -8801,8 +8813,8 @@ function QuestDetailsPanel({
|
|
|
8801
8813
|
const newProp = createNewCustomProperty(customProps);
|
|
8802
8814
|
setCustomProps((p) => [...p, newProp]);
|
|
8803
8815
|
setTimeout(() => {
|
|
8804
|
-
var
|
|
8805
|
-
(
|
|
8816
|
+
var _a2;
|
|
8817
|
+
(_a2 = propsEndRef.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
8806
8818
|
}, 100);
|
|
8807
8819
|
};
|
|
8808
8820
|
const handleRemoveProp = (i) => {
|
|
@@ -8824,14 +8836,15 @@ function QuestDetailsPanel({
|
|
|
8824
8836
|
triggerAutoSave({ description: newDescription });
|
|
8825
8837
|
};
|
|
8826
8838
|
const handleSave = async (keepOpen = false, overrides = {}) => {
|
|
8827
|
-
const
|
|
8839
|
+
const currentRawTitle = overrides.rawTitle !== void 0 ? overrides.rawTitle : rawTitle;
|
|
8840
|
+
const currentStandardName = questPrefix ? `${questPrefix} - \xBB ${currentRawTitle || "Sem t\xEDtulo"}` : currentRawTitle;
|
|
8828
8841
|
const currentTypes = overrides.types !== void 0 ? overrides.types : types;
|
|
8829
8842
|
const currentDescription = overrides.description !== void 0 ? overrides.description : description;
|
|
8830
8843
|
const currentCustomProps = overrides.customProps !== void 0 ? overrides.customProps : customProps;
|
|
8831
8844
|
const currentExistingSections = overrides.existingSections !== void 0 ? overrides.existingSections : existingSections;
|
|
8832
8845
|
const currentStatus = overrides.status !== void 0 ? overrides.status : status;
|
|
8833
|
-
if (!
|
|
8834
|
-
alert("O campo '
|
|
8846
|
+
if (!currentRawTitle.trim() || currentTypes.length === 0) {
|
|
8847
|
+
alert("O campo 'T\xEDtulo' e pelo menos um 'Tipo' s\xE3o obrigat\xF3rios.");
|
|
8835
8848
|
return;
|
|
8836
8849
|
}
|
|
8837
8850
|
setIsSaving(true);
|
|
@@ -8840,7 +8853,10 @@ function QuestDetailsPanel({
|
|
|
8840
8853
|
const processedSections = processDescriptionForSave(currentDescription, currentExistingSections);
|
|
8841
8854
|
const dataToSave = {
|
|
8842
8855
|
id: node.id,
|
|
8843
|
-
name:
|
|
8856
|
+
name: currentStandardName.trim(),
|
|
8857
|
+
// Salva o nome completo formatado
|
|
8858
|
+
raw_title: currentRawTitle.trim(),
|
|
8859
|
+
// Salva o título simples
|
|
8844
8860
|
type: currentTypes,
|
|
8845
8861
|
color: QUEST_STATUS_COLORS2[currentStatus],
|
|
8846
8862
|
status: currentStatus,
|
|
@@ -8895,7 +8911,7 @@ function QuestDetailsPanel({
|
|
|
8895
8911
|
isReadMode ? /* @__PURE__ */ import_react18.default.createElement(
|
|
8896
8912
|
DescriptionReadModePanel,
|
|
8897
8913
|
{
|
|
8898
|
-
title:
|
|
8914
|
+
title: standardizedName || (node == null ? void 0 : node.name),
|
|
8899
8915
|
description,
|
|
8900
8916
|
savedSections: existingSections,
|
|
8901
8917
|
onBack: () => setIsReadMode(false),
|
|
@@ -8913,7 +8929,16 @@ function QuestDetailsPanel({
|
|
|
8913
8929
|
onImageClick: handleImageClickFromText,
|
|
8914
8930
|
onSaveDescription: handleSaveDescriptionInline
|
|
8915
8931
|
}
|
|
8916
|
-
) : /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }), /* @__PURE__ */ import_react18.default.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react18.default.createElement("div", null, /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ import_react18.default.createElement(import_fi16.FiTarget, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ import_react18.default.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__ */ import_react18.default.createElement(import_fi16.FiCheck, { size: 12 }) : /* @__PURE__ */ import_react18.default.createElement(import_fi16.FiLink, { size: 12 }))), /* @__PURE__ */ import_react18.default.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" },
|
|
8932
|
+
) : /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }), /* @__PURE__ */ import_react18.default.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react18.default.createElement("div", null, /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ import_react18.default.createElement(import_fi16.FiTarget, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ import_react18.default.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__ */ import_react18.default.createElement(import_fi16.FiCheck, { size: 12 }) : /* @__PURE__ */ import_react18.default.createElement(import_fi16.FiLink, { size: 12 }))), /* @__PURE__ */ import_react18.default.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ import_react18.default.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 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__ */ import_react18.default.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react18.default.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8933
|
+
"input",
|
|
8934
|
+
{
|
|
8935
|
+
type: "text",
|
|
8936
|
+
value: rawTitle,
|
|
8937
|
+
onChange: handleNameChange,
|
|
8938
|
+
readOnly: !canEdit,
|
|
8939
|
+
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"}`
|
|
8940
|
+
}
|
|
8941
|
+
), /* @__PURE__ */ import_react18.default.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ import_react18.default.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }, "Preview:"), /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ import_react18.default.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ import_react18.default.createElement("label", { className: "text-xs text-slate-300" }, "Status da Quest"), /* @__PURE__ */ import_react18.default.createElement("div", { className: "relative" }, /* @__PURE__ */ import_react18.default.createElement(
|
|
8917
8942
|
"button",
|
|
8918
8943
|
{
|
|
8919
8944
|
type: "button",
|
|
@@ -8935,7 +8960,7 @@ function QuestDetailsPanel({
|
|
|
8935
8960
|
},
|
|
8936
8961
|
/* @__PURE__ */ import_react18.default.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS2[s] } }),
|
|
8937
8962
|
s
|
|
8938
|
-
)))))), /* @__PURE__ */ import_react18.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react18.default.createElement("label", { className: "text-xs text-slate-300" }, "
|
|
8963
|
+
)))))), /* @__PURE__ */ import_react18.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react18.default.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ import_react18.default.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__ */ import_react18.default.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__ */ import_react18.default.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ import_react18.default.createElement(import_fi16.FiX, { size: 12 })))), canEdit && /* @__PURE__ */ import_react18.default.createElement(
|
|
8939
8964
|
"input",
|
|
8940
8965
|
{
|
|
8941
8966
|
type: "text",
|
package/dist/index.mjs
CHANGED
|
@@ -461,7 +461,11 @@ function XViewSidebar({
|
|
|
461
461
|
let pool = base;
|
|
462
462
|
const qNorm = normalize(query);
|
|
463
463
|
if (qNorm) {
|
|
464
|
-
pool = pool.filter((n) =>
|
|
464
|
+
pool = pool.filter((n) => {
|
|
465
|
+
const matchName = normalize((n == null ? void 0 : n.name) || "").includes(qNorm);
|
|
466
|
+
const matchRawTitle = n.is_quest && n.raw_title ? normalize(n.raw_title).includes(qNorm) : false;
|
|
467
|
+
return matchName || matchRawTitle;
|
|
468
|
+
});
|
|
465
469
|
}
|
|
466
470
|
if (activeFilters.length > 0) {
|
|
467
471
|
pool = pool.filter((node) => {
|
|
@@ -8678,7 +8682,12 @@ function QuestDetailsPanel({
|
|
|
8678
8682
|
userRole,
|
|
8679
8683
|
currentDatasetName
|
|
8680
8684
|
}) {
|
|
8681
|
-
|
|
8685
|
+
var _a;
|
|
8686
|
+
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) || "";
|
|
8687
|
+
const [rawTitle, setRawTitle] = useState18(initialRawTitle);
|
|
8688
|
+
const prefixParts = ((node == null ? void 0 : node.name) || "").split(" - \xBB ");
|
|
8689
|
+
const questPrefix = prefixParts.length > 1 ? prefixParts[0] : "";
|
|
8690
|
+
const standardizedName = questPrefix ? `${questPrefix} - \xBB ${rawTitle || "Sem t\xEDtulo"}` : rawTitle;
|
|
8682
8691
|
const [types, setTypes] = useState18((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
|
|
8683
8692
|
const [typeInput, setTypeInput] = useState18("");
|
|
8684
8693
|
const [status, setStatus] = useState18((node == null ? void 0 : node.status) ?? "Backlog");
|
|
@@ -8707,15 +8716,17 @@ function QuestDetailsPanel({
|
|
|
8707
8716
|
const propsEndRef = useRef14(null);
|
|
8708
8717
|
const canEdit = userRole !== "viewer";
|
|
8709
8718
|
const availableImages = customProps.filter((p) => p.type === "images").flatMap((p) => Array.isArray(p.value) ? p.value : []).filter((img) => img.value && img.value.trim() !== "");
|
|
8710
|
-
const handleImageClickFromText = (url,
|
|
8719
|
+
const handleImageClickFromText = (url, name) => {
|
|
8711
8720
|
if (onOpenImageViewer) {
|
|
8712
|
-
onOpenImageViewer([{ name:
|
|
8721
|
+
onOpenImageViewer([{ name: name || "Imagem", value: url }], 0);
|
|
8713
8722
|
}
|
|
8714
8723
|
};
|
|
8715
8724
|
useEffect16(() => {
|
|
8725
|
+
var _a2;
|
|
8716
8726
|
if ((node == null ? void 0 : node.id) !== prevNodeIdRef.current) {
|
|
8717
8727
|
prevNodeIdRef.current = node == null ? void 0 : node.id;
|
|
8718
|
-
|
|
8728
|
+
const newRawTitle = (node == null ? void 0 : node.raw_title) || (((_a2 = node == null ? void 0 : node.name) == null ? void 0 : _a2.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
|
|
8729
|
+
setRawTitle(newRawTitle);
|
|
8719
8730
|
setTypes((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
|
|
8720
8731
|
setStatus((node == null ? void 0 : node.status) ?? "Backlog");
|
|
8721
8732
|
setSize((node == null ? void 0 : node.size) ?? "medium");
|
|
@@ -8750,9 +8761,10 @@ function QuestDetailsPanel({
|
|
|
8750
8761
|
};
|
|
8751
8762
|
const swallow = (e) => e.stopPropagation();
|
|
8752
8763
|
const handleNameChange = (e) => {
|
|
8753
|
-
const
|
|
8754
|
-
|
|
8755
|
-
|
|
8764
|
+
const val = e.target.value;
|
|
8765
|
+
setRawTitle(val);
|
|
8766
|
+
const newStandardName = questPrefix ? `${questPrefix} - \xBB ${val || "Sem t\xEDtulo"}` : val;
|
|
8767
|
+
onNameChange == null ? void 0 : onNameChange(node.id, newStandardName);
|
|
8756
8768
|
};
|
|
8757
8769
|
const handleSizeChange = (newSize) => {
|
|
8758
8770
|
setSize(newSize);
|
|
@@ -8788,8 +8800,8 @@ function QuestDetailsPanel({
|
|
|
8788
8800
|
const newProp = createNewCustomProperty(customProps);
|
|
8789
8801
|
setCustomProps((p) => [...p, newProp]);
|
|
8790
8802
|
setTimeout(() => {
|
|
8791
|
-
var
|
|
8792
|
-
(
|
|
8803
|
+
var _a2;
|
|
8804
|
+
(_a2 = propsEndRef.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
8793
8805
|
}, 100);
|
|
8794
8806
|
};
|
|
8795
8807
|
const handleRemoveProp = (i) => {
|
|
@@ -8811,14 +8823,15 @@ function QuestDetailsPanel({
|
|
|
8811
8823
|
triggerAutoSave({ description: newDescription });
|
|
8812
8824
|
};
|
|
8813
8825
|
const handleSave = async (keepOpen = false, overrides = {}) => {
|
|
8814
|
-
const
|
|
8826
|
+
const currentRawTitle = overrides.rawTitle !== void 0 ? overrides.rawTitle : rawTitle;
|
|
8827
|
+
const currentStandardName = questPrefix ? `${questPrefix} - \xBB ${currentRawTitle || "Sem t\xEDtulo"}` : currentRawTitle;
|
|
8815
8828
|
const currentTypes = overrides.types !== void 0 ? overrides.types : types;
|
|
8816
8829
|
const currentDescription = overrides.description !== void 0 ? overrides.description : description;
|
|
8817
8830
|
const currentCustomProps = overrides.customProps !== void 0 ? overrides.customProps : customProps;
|
|
8818
8831
|
const currentExistingSections = overrides.existingSections !== void 0 ? overrides.existingSections : existingSections;
|
|
8819
8832
|
const currentStatus = overrides.status !== void 0 ? overrides.status : status;
|
|
8820
|
-
if (!
|
|
8821
|
-
alert("O campo '
|
|
8833
|
+
if (!currentRawTitle.trim() || currentTypes.length === 0) {
|
|
8834
|
+
alert("O campo 'T\xEDtulo' e pelo menos um 'Tipo' s\xE3o obrigat\xF3rios.");
|
|
8822
8835
|
return;
|
|
8823
8836
|
}
|
|
8824
8837
|
setIsSaving(true);
|
|
@@ -8827,7 +8840,10 @@ function QuestDetailsPanel({
|
|
|
8827
8840
|
const processedSections = processDescriptionForSave(currentDescription, currentExistingSections);
|
|
8828
8841
|
const dataToSave = {
|
|
8829
8842
|
id: node.id,
|
|
8830
|
-
name:
|
|
8843
|
+
name: currentStandardName.trim(),
|
|
8844
|
+
// Salva o nome completo formatado
|
|
8845
|
+
raw_title: currentRawTitle.trim(),
|
|
8846
|
+
// Salva o título simples
|
|
8831
8847
|
type: currentTypes,
|
|
8832
8848
|
color: QUEST_STATUS_COLORS2[currentStatus],
|
|
8833
8849
|
status: currentStatus,
|
|
@@ -8882,7 +8898,7 @@ function QuestDetailsPanel({
|
|
|
8882
8898
|
isReadMode ? /* @__PURE__ */ React17.createElement(
|
|
8883
8899
|
DescriptionReadModePanel,
|
|
8884
8900
|
{
|
|
8885
|
-
title:
|
|
8901
|
+
title: standardizedName || (node == null ? void 0 : node.name),
|
|
8886
8902
|
description,
|
|
8887
8903
|
savedSections: existingSections,
|
|
8888
8904
|
onBack: () => setIsReadMode(false),
|
|
@@ -8900,7 +8916,16 @@ function QuestDetailsPanel({
|
|
|
8900
8916
|
onImageClick: handleImageClickFromText,
|
|
8901
8917
|
onSaveDescription: handleSaveDescriptionInline
|
|
8902
8918
|
}
|
|
8903
|
-
) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React17.createElement("div", null, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React17.createElement(FiTarget2, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React17.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React17.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__ */ React17.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React17.createElement(FiLink6, { size: 12 }))), /* @__PURE__ */ React17.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" },
|
|
8919
|
+
) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React17.createElement("div", null, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React17.createElement(FiTarget2, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React17.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React17.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__ */ React17.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React17.createElement(FiLink6, { size: 12 }))), /* @__PURE__ */ React17.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 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" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React17.createElement(
|
|
8920
|
+
"input",
|
|
8921
|
+
{
|
|
8922
|
+
type: "text",
|
|
8923
|
+
value: rawTitle,
|
|
8924
|
+
onChange: handleNameChange,
|
|
8925
|
+
readOnly: !canEdit,
|
|
8926
|
+
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"}`
|
|
8927
|
+
}
|
|
8928
|
+
), /* @__PURE__ */ React17.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React17.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }, "Preview:"), /* @__PURE__ */ React17.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Status da Quest"), /* @__PURE__ */ React17.createElement("div", { className: "relative" }, /* @__PURE__ */ React17.createElement(
|
|
8904
8929
|
"button",
|
|
8905
8930
|
{
|
|
8906
8931
|
type: "button",
|
|
@@ -8922,7 +8947,7 @@ function QuestDetailsPanel({
|
|
|
8922
8947
|
},
|
|
8923
8948
|
/* @__PURE__ */ React17.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS2[s] } }),
|
|
8924
8949
|
s
|
|
8925
|
-
)))))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "
|
|
8950
|
+
)))))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__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 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__ */ React17.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React17.createElement(FiX6, { size: 12 })))), canEdit && /* @__PURE__ */ React17.createElement(
|
|
8926
8951
|
"input",
|
|
8927
8952
|
{
|
|
8928
8953
|
type: "text",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.4-dev.
|
|
3
|
+
"version": "1.2.4-dev.26",
|
|
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",
|