@juv/codego-react-ui 3.4.2 → 3.4.3
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.cjs +21 -1
- package/dist/index.global.js +23 -3
- package/dist/index.js +23 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6747,7 +6747,27 @@ function EditModal({
|
|
|
6747
6747
|
try {
|
|
6748
6748
|
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute("content");
|
|
6749
6749
|
if (!csrfToken) throw new Error("[Table] CSRF token not found.");
|
|
6750
|
-
|
|
6750
|
+
const hasFiles = Object.values(form).some(
|
|
6751
|
+
(v) => Array.isArray(v) && v.length > 0 && v[0] instanceof File || v instanceof File
|
|
6752
|
+
);
|
|
6753
|
+
let body;
|
|
6754
|
+
if (hasFiles) {
|
|
6755
|
+
const fd = new FormData();
|
|
6756
|
+
fd.append("_method", "PUT");
|
|
6757
|
+
Object.entries(form).forEach(([k, v]) => {
|
|
6758
|
+
if (Array.isArray(v) && v[0] instanceof File) {
|
|
6759
|
+
v.forEach((f) => fd.append(k, f));
|
|
6760
|
+
} else if (v instanceof File) {
|
|
6761
|
+
fd.append(k, v);
|
|
6762
|
+
} else if (v !== null && v !== void 0) {
|
|
6763
|
+
fd.append(k, String(v));
|
|
6764
|
+
}
|
|
6765
|
+
});
|
|
6766
|
+
body = fd;
|
|
6767
|
+
} else {
|
|
6768
|
+
body = form;
|
|
6769
|
+
}
|
|
6770
|
+
await import_axios3.default.put(`${baseUrl}/${itemId}/update`, body, { headers: { "X-CSRF-Token": csrfToken } });
|
|
6751
6771
|
const updated = { ...item, ...form };
|
|
6752
6772
|
if (notif && (notif.type ?? "toast") === "notification") {
|
|
6753
6773
|
setBanner(true);
|
package/dist/index.global.js
CHANGED
|
@@ -63192,7 +63192,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
|
|
|
63192
63192
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
63193
63193
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
63194
63194
|
];
|
|
63195
|
-
var
|
|
63195
|
+
var File2 = createLucideIcon("file", __iconNode30);
|
|
63196
63196
|
|
|
63197
63197
|
// node_modules/lucide-react/dist/esm/icons/flip-horizontal.js
|
|
63198
63198
|
var __iconNode31 = [
|
|
@@ -69893,7 +69893,27 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
|
|
|
69893
69893
|
try {
|
|
69894
69894
|
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute("content");
|
|
69895
69895
|
if (!csrfToken) throw new Error("[Table] CSRF token not found.");
|
|
69896
|
-
|
|
69896
|
+
const hasFiles = Object.values(form).some(
|
|
69897
|
+
(v) => Array.isArray(v) && v.length > 0 && v[0] instanceof File || v instanceof File
|
|
69898
|
+
);
|
|
69899
|
+
let body;
|
|
69900
|
+
if (hasFiles) {
|
|
69901
|
+
const fd = new FormData();
|
|
69902
|
+
fd.append("_method", "PUT");
|
|
69903
|
+
Object.entries(form).forEach(([k, v]) => {
|
|
69904
|
+
if (Array.isArray(v) && v[0] instanceof File) {
|
|
69905
|
+
v.forEach((f) => fd.append(k, f));
|
|
69906
|
+
} else if (v instanceof File) {
|
|
69907
|
+
fd.append(k, v);
|
|
69908
|
+
} else if (v !== null && v !== void 0) {
|
|
69909
|
+
fd.append(k, String(v));
|
|
69910
|
+
}
|
|
69911
|
+
});
|
|
69912
|
+
body = fd;
|
|
69913
|
+
} else {
|
|
69914
|
+
body = form;
|
|
69915
|
+
}
|
|
69916
|
+
await axios_default.put(`${baseUrl}/${itemId}/update`, body, { headers: { "X-CSRF-Token": csrfToken } });
|
|
69897
69917
|
const updated = { ...item, ...form };
|
|
69898
69918
|
if (notif && (notif.type ?? "toast") === "notification") {
|
|
69899
69919
|
setBanner(true);
|
|
@@ -75724,7 +75744,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
|
|
|
75724
75744
|
const hasChildren = !!node.children?.length;
|
|
75725
75745
|
const isExpanded = expanded.includes(node.id);
|
|
75726
75746
|
const isSelected = selected.includes(node.id);
|
|
75727
|
-
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FolderOpen, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Folder, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
75747
|
+
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FolderOpen, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Folder, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(File2, { className: "h-4 w-4 text-muted-foreground" });
|
|
75728
75748
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { children: [
|
|
75729
75749
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
75730
75750
|
"div",
|
package/dist/index.js
CHANGED
|
@@ -6626,7 +6626,27 @@ function EditModal({
|
|
|
6626
6626
|
try {
|
|
6627
6627
|
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute("content");
|
|
6628
6628
|
if (!csrfToken) throw new Error("[Table] CSRF token not found.");
|
|
6629
|
-
|
|
6629
|
+
const hasFiles = Object.values(form).some(
|
|
6630
|
+
(v) => Array.isArray(v) && v.length > 0 && v[0] instanceof File || v instanceof File
|
|
6631
|
+
);
|
|
6632
|
+
let body;
|
|
6633
|
+
if (hasFiles) {
|
|
6634
|
+
const fd = new FormData();
|
|
6635
|
+
fd.append("_method", "PUT");
|
|
6636
|
+
Object.entries(form).forEach(([k, v]) => {
|
|
6637
|
+
if (Array.isArray(v) && v[0] instanceof File) {
|
|
6638
|
+
v.forEach((f) => fd.append(k, f));
|
|
6639
|
+
} else if (v instanceof File) {
|
|
6640
|
+
fd.append(k, v);
|
|
6641
|
+
} else if (v !== null && v !== void 0) {
|
|
6642
|
+
fd.append(k, String(v));
|
|
6643
|
+
}
|
|
6644
|
+
});
|
|
6645
|
+
body = fd;
|
|
6646
|
+
} else {
|
|
6647
|
+
body = form;
|
|
6648
|
+
}
|
|
6649
|
+
await axios3.put(`${baseUrl}/${itemId}/update`, body, { headers: { "X-CSRF-Token": csrfToken } });
|
|
6630
6650
|
const updated = { ...item, ...form };
|
|
6631
6651
|
if (notif && (notif.type ?? "toast") === "notification") {
|
|
6632
6652
|
setBanner(true);
|
|
@@ -12039,13 +12059,13 @@ function Timeline({ items, align = "left", className }) {
|
|
|
12039
12059
|
|
|
12040
12060
|
// src/components/ui/tree-view.tsx
|
|
12041
12061
|
import * as React48 from "react";
|
|
12042
|
-
import { ChevronRight as ChevronRight11, Folder, FolderOpen, File } from "lucide-react";
|
|
12062
|
+
import { ChevronRight as ChevronRight11, Folder, FolderOpen, File as File2 } from "lucide-react";
|
|
12043
12063
|
import { jsx as jsx60, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
12044
12064
|
function TreeNodeItem({ node, depth, selected, expanded, onToggleExpand, onSelect, multiple }) {
|
|
12045
12065
|
const hasChildren = !!node.children?.length;
|
|
12046
12066
|
const isExpanded = expanded.includes(node.id);
|
|
12047
12067
|
const isSelected = selected.includes(node.id);
|
|
12048
|
-
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ jsx60(FolderOpen, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ jsx60(Folder, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ jsx60(
|
|
12068
|
+
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ jsx60(FolderOpen, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ jsx60(Folder, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ jsx60(File2, { className: "h-4 w-4 text-muted-foreground" });
|
|
12049
12069
|
return /* @__PURE__ */ jsxs53("div", { children: [
|
|
12050
12070
|
/* @__PURE__ */ jsxs53(
|
|
12051
12071
|
"div",
|