@object-ui/plugin-designer 17.5.0 → 17.6.0
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/CHANGELOG.md +188 -0
- package/dist/DashboardEditor.d.ts.map +1 -1
- package/dist/MetadataFieldsPage.d.ts.map +1 -1
- package/dist/hooks/useDesignerTranslation.d.ts.map +1 -1
- package/dist/index.js +193 -201
- package/dist/index.umd.cjs +2 -2
- package/package.json +13 -13
- package/dist/__tests__/__mocks__/plugin-form.d.ts +0 -4
- package/dist/__tests__/__mocks__/plugin-form.d.ts.map +0 -1
- package/dist/__tests__/__mocks__/plugin-grid.d.ts +0 -3
- package/dist/__tests__/__mocks__/plugin-grid.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ComponentRegistry as e, ValueDataSource as t } from "@object-ui/core";
|
|
2
2
|
import n, { createContext as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
3
|
-
import { AlertTriangle as u, ArrowLeft as d, AtSign as f, BarChart3 as p, Calendar as m, Check as h, ChevronDown as g, ChevronLeft as _, ChevronRight as v, ChevronUp as y, Clipboard as b, Clock as x, Code as S, Columns3 as C, Copy as w, Database as T, Diamond as E, Download as D, Eye as O, EyeOff as k, FileText as A, FolderOpen as j, GitBranch as M, Globe as N, Grid3X3 as P, GripVertical as F, Hash as I, History as L, Image as R, ImageIcon as z, Layers as ee, Layout as B, LayoutDashboard as te,
|
|
3
|
+
import { AlertTriangle as u, ArrowLeft as d, AtSign as f, BarChart3 as p, Calendar as m, Check as h, ChevronDown as g, ChevronLeft as _, ChevronRight as v, ChevronUp as y, Clipboard as b, Clock as x, Code as S, Columns3 as C, Copy as w, Database as T, Diamond as E, Download as D, Eye as O, EyeOff as k, FileText as A, FolderOpen as j, GitBranch as M, Globe as N, Grid3X3 as P, GripVertical as F, Hash as I, History as L, Image as R, ImageIcon as z, Layers as ee, Layout as B, LayoutDashboard as te, LayoutTemplate as ne, LineChart as re, Link as ie, Link2 as ae, ListOrdered as oe, Lock as V, Map as se, MapPin as ce, Maximize2 as le, Minus as ue, Moon as de, MousePointerClick as H, Palette as fe, PanelLeft as pe, PanelLeftClose as me, PanelRightClose as he, PanelRightOpen as ge, Pencil as U, Phone as W, PieChart as _e, Play as ve, Plus as ye, Puzzle as be, Redo2 as xe, RotateCcw as Se, Search as Ce, SlidersHorizontal as we, Square as Te, Star as Ee, Sun as De, Table2 as Oe, ToggleLeft as ke, Trash2 as Ae, TrendingUp as je, Type as Me, Undo2 as Ne, Upload as Pe, User as Fe, Users as Ie, X as Le, ZoomIn as Re, ZoomOut as ze } from "lucide-react";
|
|
4
4
|
import { clsx as G } from "clsx";
|
|
5
5
|
import { twMerge as K } from "tailwind-merge";
|
|
6
6
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
7
|
-
import { DESIGNER_FIELD_TYPES as
|
|
8
|
-
import { resolveKeyedI18nLabel as
|
|
9
|
-
import { createSafeTranslation as
|
|
7
|
+
import { DESIGNER_FIELD_TYPES as Be, isValidAppName as Ve, liftLegacyDashboardFilterDefaults as He, wizardDraftToAppSchema as Ue } from "@object-ui/types";
|
|
8
|
+
import { resolveKeyedI18nLabel as We, useAdapter as Ge, useMetadata as Ke } from "@object-ui/react";
|
|
9
|
+
import { createSafeTranslation as qe, pickLocalized as Je, setLocalized as Ye } from "@object-ui/i18n";
|
|
10
10
|
import { ObjectGrid as Xe } from "@object-ui/plugin-grid";
|
|
11
11
|
import { DrawerForm as Ze, ModalForm as Qe } from "@object-ui/plugin-form";
|
|
12
12
|
import { useNavigate as $e, useParams as et } from "react-router-dom";
|
|
@@ -710,7 +710,7 @@ function St({ canvas: e = {
|
|
|
710
710
|
x,
|
|
711
711
|
g,
|
|
712
712
|
T
|
|
713
|
-
]),
|
|
713
|
+
]), ae = i(() => {
|
|
714
714
|
if (d) return;
|
|
715
715
|
let e = T.paste();
|
|
716
716
|
if (!e || e.length === 0) return;
|
|
@@ -737,15 +737,15 @@ function St({ canvas: e = {
|
|
|
737
737
|
_,
|
|
738
738
|
x,
|
|
739
739
|
k
|
|
740
|
-
]),
|
|
740
|
+
]), oe = i((e, t) => {
|
|
741
741
|
d || (L.current = {
|
|
742
742
|
id: t.id,
|
|
743
743
|
startX: e.clientX,
|
|
744
744
|
startY: e.clientY
|
|
745
745
|
}, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t.id));
|
|
746
|
-
}, [d]),
|
|
746
|
+
}, [d]), V = i((e) => {
|
|
747
747
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
748
|
-
}, []),
|
|
748
|
+
}, []), ce = i((e) => {
|
|
749
749
|
e.preventDefault();
|
|
750
750
|
let t = L.current;
|
|
751
751
|
if (!t || d) return;
|
|
@@ -769,7 +769,7 @@ function St({ canvas: e = {
|
|
|
769
769
|
_,
|
|
770
770
|
z,
|
|
771
771
|
k
|
|
772
|
-
]),
|
|
772
|
+
]), de = s(() => C ? [
|
|
773
773
|
{
|
|
774
774
|
name: "label",
|
|
775
775
|
label: "Label",
|
|
@@ -805,7 +805,7 @@ function St({ canvas: e = {
|
|
|
805
805
|
value: C.position.height,
|
|
806
806
|
group: "Size"
|
|
807
807
|
}
|
|
808
|
-
] : [], [C]),
|
|
808
|
+
] : [], [C]), H = s(() => g.map((e) => ({
|
|
809
809
|
id: e.id,
|
|
810
810
|
x: e.position.x,
|
|
811
811
|
y: e.position.y,
|
|
@@ -844,7 +844,7 @@ function St({ canvas: e = {
|
|
|
844
844
|
return;
|
|
845
845
|
}
|
|
846
846
|
if (n && e.key === "v" && !d) {
|
|
847
|
-
e.preventDefault(),
|
|
847
|
+
e.preventDefault(), ae();
|
|
848
848
|
return;
|
|
849
849
|
}
|
|
850
850
|
if (n && e.key === "a") {
|
|
@@ -861,7 +861,7 @@ function St({ canvas: e = {
|
|
|
861
861
|
d,
|
|
862
862
|
h,
|
|
863
863
|
ie,
|
|
864
|
-
|
|
864
|
+
ae,
|
|
865
865
|
g
|
|
866
866
|
]), /* @__PURE__ */ Y("div", {
|
|
867
867
|
ref: R,
|
|
@@ -886,7 +886,7 @@ function St({ canvas: e = {
|
|
|
886
886
|
type: "button",
|
|
887
887
|
onClick: () => B(e.type, e.label),
|
|
888
888
|
className: "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent text-left",
|
|
889
|
-
children: [/* @__PURE__ */ J(
|
|
889
|
+
children: [/* @__PURE__ */ J(ye, { className: "h-3 w-3" }), e.label]
|
|
890
890
|
}, e.type))]
|
|
891
891
|
}, e.name))
|
|
892
892
|
})] })
|
|
@@ -904,7 +904,7 @@ function St({ canvas: e = {
|
|
|
904
904
|
title: A ? "Collapse palette" : "Expand palette",
|
|
905
905
|
"aria-label": A ? "Collapse palette" : "Expand palette",
|
|
906
906
|
onClick: () => j((e) => !e),
|
|
907
|
-
children: /* @__PURE__ */ J(
|
|
907
|
+
children: /* @__PURE__ */ J(me, { className: X("h-4 w-4", !A && "rotate-180") })
|
|
908
908
|
}),
|
|
909
909
|
a && !d && /* @__PURE__ */ Y(q, { children: [
|
|
910
910
|
/* @__PURE__ */ J("div", { className: "w-px h-5 bg-border mx-1" }),
|
|
@@ -915,7 +915,7 @@ function St({ canvas: e = {
|
|
|
915
915
|
"aria-label": "Undo",
|
|
916
916
|
disabled: !h.canUndo,
|
|
917
917
|
onClick: () => h.undo(),
|
|
918
|
-
children: /* @__PURE__ */ J(
|
|
918
|
+
children: /* @__PURE__ */ J(Ne, { className: "h-4 w-4" })
|
|
919
919
|
}),
|
|
920
920
|
/* @__PURE__ */ J("button", {
|
|
921
921
|
type: "button",
|
|
@@ -924,7 +924,7 @@ function St({ canvas: e = {
|
|
|
924
924
|
"aria-label": "Redo",
|
|
925
925
|
disabled: !h.canRedo,
|
|
926
926
|
onClick: () => h.redo(),
|
|
927
|
-
children: /* @__PURE__ */ J(
|
|
927
|
+
children: /* @__PURE__ */ J(xe, { className: "h-4 w-4" })
|
|
928
928
|
}),
|
|
929
929
|
/* @__PURE__ */ J("div", { className: "w-px h-5 bg-border mx-1" })
|
|
930
930
|
] }),
|
|
@@ -944,7 +944,7 @@ function St({ canvas: e = {
|
|
|
944
944
|
title: "Paste (Ctrl+V)",
|
|
945
945
|
"aria-label": "Paste",
|
|
946
946
|
disabled: !T.hasContent,
|
|
947
|
-
onClick:
|
|
947
|
+
onClick: ae,
|
|
948
948
|
children: /* @__PURE__ */ J(b, { className: "h-4 w-4" })
|
|
949
949
|
}),
|
|
950
950
|
/* @__PURE__ */ J("div", { className: "w-px h-5 bg-border mx-1" })
|
|
@@ -956,7 +956,7 @@ function St({ canvas: e = {
|
|
|
956
956
|
"aria-label": "Delete selected",
|
|
957
957
|
disabled: x.count === 0,
|
|
958
958
|
onClick: ne,
|
|
959
|
-
children: /* @__PURE__ */ J(
|
|
959
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-4 w-4" })
|
|
960
960
|
}),
|
|
961
961
|
/* @__PURE__ */ J("button", {
|
|
962
962
|
type: "button",
|
|
@@ -993,7 +993,7 @@ function St({ canvas: e = {
|
|
|
993
993
|
className: "p-1 rounded hover:bg-accent text-xs",
|
|
994
994
|
"aria-label": "Zoom in",
|
|
995
995
|
onClick: v.zoomIn,
|
|
996
|
-
children: /* @__PURE__ */ J(
|
|
996
|
+
children: /* @__PURE__ */ J(ye, { className: "h-3 w-3" })
|
|
997
997
|
}),
|
|
998
998
|
/* @__PURE__ */ J("button", {
|
|
999
999
|
type: "button",
|
|
@@ -1010,7 +1010,7 @@ function St({ canvas: e = {
|
|
|
1010
1010
|
title: M ? "Collapse panel" : "Expand panel",
|
|
1011
1011
|
"aria-label": M ? "Collapse panel" : "Expand panel",
|
|
1012
1012
|
onClick: () => N((e) => !e),
|
|
1013
|
-
children: /* @__PURE__ */ J(
|
|
1013
|
+
children: /* @__PURE__ */ J(he, { className: X("h-4 w-4", !M && "rotate-180") })
|
|
1014
1014
|
})
|
|
1015
1015
|
]
|
|
1016
1016
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -1019,8 +1019,8 @@ function St({ canvas: e = {
|
|
|
1019
1019
|
"aria-label": "Design canvas",
|
|
1020
1020
|
onWheel: v.handleWheel,
|
|
1021
1021
|
onMouseDown: v.startPan,
|
|
1022
|
-
onDragOver:
|
|
1023
|
-
onDrop:
|
|
1022
|
+
onDragOver: V,
|
|
1023
|
+
onDrop: ce,
|
|
1024
1024
|
children: /* @__PURE__ */ Y("div", {
|
|
1025
1025
|
className: "relative bg-background border rounded shadow-sm mx-auto",
|
|
1026
1026
|
style: {
|
|
@@ -1034,7 +1034,7 @@ function St({ canvas: e = {
|
|
|
1034
1034
|
let t = x.isSelected(e.id);
|
|
1035
1035
|
return /* @__PURE__ */ Y("div", {
|
|
1036
1036
|
draggable: !d,
|
|
1037
|
-
onDragStart: (t) =>
|
|
1037
|
+
onDragStart: (t) => oe(t, e),
|
|
1038
1038
|
className: X("absolute border rounded cursor-move select-none transition-shadow", t ? "border-primary ring-2 ring-primary/20 shadow-md" : "border-border hover:border-primary/50"),
|
|
1039
1039
|
style: {
|
|
1040
1040
|
left: e.position.x * y,
|
|
@@ -1058,7 +1058,7 @@ function St({ canvas: e = {
|
|
|
1058
1058
|
},
|
|
1059
1059
|
className: "ml-auto p-0.5 rounded hover:bg-destructive/10",
|
|
1060
1060
|
"aria-label": `Delete ${e.label ?? e.type}`,
|
|
1061
|
-
children: /* @__PURE__ */ J(
|
|
1061
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-3 w-3 text-destructive" })
|
|
1062
1062
|
})
|
|
1063
1063
|
]
|
|
1064
1064
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -1067,7 +1067,7 @@ function St({ canvas: e = {
|
|
|
1067
1067
|
})]
|
|
1068
1068
|
}, e.id);
|
|
1069
1069
|
}), P && /* @__PURE__ */ J(ht, {
|
|
1070
|
-
items:
|
|
1070
|
+
items: H,
|
|
1071
1071
|
canvasWidth: e.width,
|
|
1072
1072
|
canvasHeight: e.height
|
|
1073
1073
|
})]
|
|
@@ -1102,7 +1102,7 @@ function St({ canvas: e = {
|
|
|
1102
1102
|
className: "border-t",
|
|
1103
1103
|
children: /* @__PURE__ */ J(ft, {
|
|
1104
1104
|
title: `Properties – ${C.label ?? C.type}`,
|
|
1105
|
-
fields:
|
|
1105
|
+
fields: de,
|
|
1106
1106
|
onChange: re
|
|
1107
1107
|
})
|
|
1108
1108
|
}) : C && /* @__PURE__ */ Y("div", {
|
|
@@ -1432,14 +1432,14 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1432
1432
|
a,
|
|
1433
1433
|
p,
|
|
1434
1434
|
_
|
|
1435
|
-
]),
|
|
1435
|
+
]), oe = i(() => {
|
|
1436
1436
|
let e = m.filter((e) => x.isSelected(e.id));
|
|
1437
1437
|
e.length > 0 && C.copy(e);
|
|
1438
1438
|
}, [
|
|
1439
1439
|
m,
|
|
1440
1440
|
x,
|
|
1441
1441
|
C
|
|
1442
|
-
]),
|
|
1442
|
+
]), V = i(() => {
|
|
1443
1443
|
if (a) return;
|
|
1444
1444
|
let e = C.paste();
|
|
1445
1445
|
if (!e || e.length === 0) return;
|
|
@@ -1463,7 +1463,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1463
1463
|
p,
|
|
1464
1464
|
_,
|
|
1465
1465
|
x
|
|
1466
|
-
]),
|
|
1466
|
+
]), se = i((e) => {
|
|
1467
1467
|
if (a) return;
|
|
1468
1468
|
let t = p.current, n = {
|
|
1469
1469
|
entities: t.entities.map((t) => {
|
|
@@ -1485,12 +1485,12 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1485
1485
|
a,
|
|
1486
1486
|
p,
|
|
1487
1487
|
_
|
|
1488
|
-
]),
|
|
1488
|
+
]), ce = i((e, t, n) => {
|
|
1489
1489
|
a || (N({
|
|
1490
1490
|
entityId: e,
|
|
1491
1491
|
fieldIndex: t
|
|
1492
1492
|
}), I(n));
|
|
1493
|
-
}, [a]),
|
|
1493
|
+
}, [a]), le = i(() => {
|
|
1494
1494
|
if (!M) return;
|
|
1495
1495
|
let e = F.trim();
|
|
1496
1496
|
if (e === "") {
|
|
@@ -1517,11 +1517,11 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1517
1517
|
F,
|
|
1518
1518
|
p,
|
|
1519
1519
|
_
|
|
1520
|
-
]),
|
|
1520
|
+
]), ue = i(() => {
|
|
1521
1521
|
N(null);
|
|
1522
|
-
}, []),
|
|
1522
|
+
}, []), de = i((e, t) => {
|
|
1523
1523
|
a || (R(e), ee(t));
|
|
1524
|
-
}, [a]),
|
|
1524
|
+
}, [a]), H = i(() => {
|
|
1525
1525
|
if (!L) return;
|
|
1526
1526
|
let e = z.trim();
|
|
1527
1527
|
if (e === "") {
|
|
@@ -1669,13 +1669,13 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1669
1669
|
let t = e.target.tagName;
|
|
1670
1670
|
if (t === "INPUT" || t === "TEXTAREA" || t === "SELECT") return;
|
|
1671
1671
|
let n = e.ctrlKey || e.metaKey;
|
|
1672
|
-
n && e.key === "z" ? (e.preventDefault(), p.undo()) : n && (e.key === "y" || e.shiftKey && e.key === "Z") ? (e.preventDefault(), p.redo()) : n && e.key === "c" ? (e.preventDefault(),
|
|
1672
|
+
n && e.key === "z" ? (e.preventDefault(), p.undo()) : n && (e.key === "y" || e.shiftKey && e.key === "Z") ? (e.preventDefault(), p.redo()) : n && e.key === "c" ? (e.preventDefault(), oe()) : n && e.key === "v" ? (e.preventDefault(), V()) : (e.key === "Delete" || e.key === "Backspace") && x.count > 0 ? (e.preventDefault(), re()) : e.key === "Escape" && (x.clearSelection(), N(null), R(null));
|
|
1673
1673
|
};
|
|
1674
1674
|
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
1675
1675
|
}, [
|
|
1676
1676
|
p,
|
|
1677
|
+
oe,
|
|
1677
1678
|
V,
|
|
1678
|
-
H,
|
|
1679
1679
|
re,
|
|
1680
1680
|
x
|
|
1681
1681
|
]);
|
|
@@ -1714,7 +1714,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1714
1714
|
"aria-label": "Undo",
|
|
1715
1715
|
title: "Undo (Ctrl+Z)",
|
|
1716
1716
|
className: "p-1 rounded hover:bg-accent disabled:opacity-40",
|
|
1717
|
-
children: /* @__PURE__ */ J(
|
|
1717
|
+
children: /* @__PURE__ */ J(Ne, { className: "h-3.5 w-3.5" })
|
|
1718
1718
|
}), /* @__PURE__ */ J("button", {
|
|
1719
1719
|
type: "button",
|
|
1720
1720
|
onClick: () => p.redo(),
|
|
@@ -1722,7 +1722,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1722
1722
|
"aria-label": "Redo",
|
|
1723
1723
|
title: "Redo (Ctrl+Y)",
|
|
1724
1724
|
className: "p-1 rounded hover:bg-accent disabled:opacity-40",
|
|
1725
|
-
children: /* @__PURE__ */ J(
|
|
1725
|
+
children: /* @__PURE__ */ J(xe, { className: "h-3.5 w-3.5" })
|
|
1726
1726
|
})]
|
|
1727
1727
|
}),
|
|
1728
1728
|
/* @__PURE__ */ Y("div", {
|
|
@@ -1734,7 +1734,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1734
1734
|
"aria-label": "Zoom Out",
|
|
1735
1735
|
title: "Zoom Out",
|
|
1736
1736
|
className: "p-1 rounded hover:bg-accent",
|
|
1737
|
-
children: /* @__PURE__ */ J(
|
|
1737
|
+
children: /* @__PURE__ */ J(ze, { className: "h-3.5 w-3.5" })
|
|
1738
1738
|
}),
|
|
1739
1739
|
/* @__PURE__ */ Y("span", {
|
|
1740
1740
|
className: "text-xs tabular-nums w-10 text-center",
|
|
@@ -1746,7 +1746,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1746
1746
|
"aria-label": "Zoom In",
|
|
1747
1747
|
title: "Zoom In",
|
|
1748
1748
|
className: "p-1 rounded hover:bg-accent",
|
|
1749
|
-
children: /* @__PURE__ */ J(
|
|
1749
|
+
children: /* @__PURE__ */ J(Re, { className: "h-3.5 w-3.5" })
|
|
1750
1750
|
}),
|
|
1751
1751
|
/* @__PURE__ */ J("button", {
|
|
1752
1752
|
type: "button",
|
|
@@ -1754,7 +1754,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1754
1754
|
"aria-label": "Reset Zoom",
|
|
1755
1755
|
title: "Reset Zoom",
|
|
1756
1756
|
className: "p-1 rounded hover:bg-accent",
|
|
1757
|
-
children: /* @__PURE__ */ J(
|
|
1757
|
+
children: /* @__PURE__ */ J(Se, { className: "h-3 w-3" })
|
|
1758
1758
|
})
|
|
1759
1759
|
]
|
|
1760
1760
|
}),
|
|
@@ -1762,7 +1762,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1762
1762
|
className: "flex items-center gap-1 border-l pl-2",
|
|
1763
1763
|
children: [/* @__PURE__ */ J("button", {
|
|
1764
1764
|
type: "button",
|
|
1765
|
-
onClick:
|
|
1765
|
+
onClick: oe,
|
|
1766
1766
|
disabled: x.count === 0,
|
|
1767
1767
|
"aria-label": "Copy",
|
|
1768
1768
|
title: "Copy (Ctrl+C)",
|
|
@@ -1770,7 +1770,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1770
1770
|
children: /* @__PURE__ */ J(w, { className: "h-3.5 w-3.5" })
|
|
1771
1771
|
}), /* @__PURE__ */ J("button", {
|
|
1772
1772
|
type: "button",
|
|
1773
|
-
onClick:
|
|
1773
|
+
onClick: V,
|
|
1774
1774
|
disabled: !C.hasContent,
|
|
1775
1775
|
"aria-label": "Paste",
|
|
1776
1776
|
title: "Paste (Ctrl+V)",
|
|
@@ -1791,7 +1791,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1791
1791
|
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
1792
1792
|
role: "status",
|
|
1793
1793
|
"aria-label": "Collaboration active",
|
|
1794
|
-
children: [/* @__PURE__ */ J(
|
|
1794
|
+
children: [/* @__PURE__ */ J(Ie, { className: "h-3 w-3" }), /* @__PURE__ */ Y("span", { children: [
|
|
1795
1795
|
D.users.length,
|
|
1796
1796
|
" user",
|
|
1797
1797
|
D.users.length === 1 ? "" : "s"
|
|
@@ -1806,7 +1806,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1806
1806
|
onClick: te,
|
|
1807
1807
|
"aria-label": "Add Entity",
|
|
1808
1808
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1809
|
-
children: [/* @__PURE__ */ J(
|
|
1809
|
+
children: [/* @__PURE__ */ J(ye, { className: "h-3 w-3" }), " Add Entity"]
|
|
1810
1810
|
}), /* @__PURE__ */ Y("button", {
|
|
1811
1811
|
type: "button",
|
|
1812
1812
|
"aria-label": "Add Relationship",
|
|
@@ -1881,9 +1881,9 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1881
1881
|
type: "text",
|
|
1882
1882
|
value: z,
|
|
1883
1883
|
onChange: (e) => ee(e.target.value),
|
|
1884
|
-
onBlur:
|
|
1884
|
+
onBlur: H,
|
|
1885
1885
|
onKeyDown: (e) => {
|
|
1886
|
-
e.key === "Enter" &&
|
|
1886
|
+
e.key === "Enter" && H(), e.key === "Escape" && fe();
|
|
1887
1887
|
},
|
|
1888
1888
|
className: "text-sm font-medium px-1 py-0 border rounded bg-background w-32 focus:outline-none focus:ring-1 focus:ring-primary",
|
|
1889
1889
|
autoFocus: !0,
|
|
@@ -1892,7 +1892,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1892
1892
|
}) : /* @__PURE__ */ J("span", {
|
|
1893
1893
|
className: "truncate cursor-text",
|
|
1894
1894
|
onDoubleClick: (t) => {
|
|
1895
|
-
t.stopPropagation(),
|
|
1895
|
+
t.stopPropagation(), de(e.id, e.label);
|
|
1896
1896
|
},
|
|
1897
1897
|
title: "Double-click to edit label",
|
|
1898
1898
|
"data-testid": `entity-label-${e.id}`,
|
|
@@ -1905,7 +1905,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1905
1905
|
},
|
|
1906
1906
|
"aria-label": `Delete ${e.label}`,
|
|
1907
1907
|
className: "ml-auto p-0.5 rounded hover:bg-destructive/20",
|
|
1908
|
-
children: /* @__PURE__ */ J(
|
|
1908
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-3 w-3 text-destructive" })
|
|
1909
1909
|
})
|
|
1910
1910
|
]
|
|
1911
1911
|
}),
|
|
@@ -1918,9 +1918,9 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1918
1918
|
type: "text",
|
|
1919
1919
|
value: F,
|
|
1920
1920
|
onChange: (e) => I(e.target.value),
|
|
1921
|
-
onBlur:
|
|
1921
|
+
onBlur: le,
|
|
1922
1922
|
onKeyDown: (e) => {
|
|
1923
|
-
e.key === "Enter" &&
|
|
1923
|
+
e.key === "Enter" && le(), e.key === "Escape" && ue();
|
|
1924
1924
|
},
|
|
1925
1925
|
className: "font-mono text-xs px-1 py-0 border rounded bg-background w-24 focus:outline-none focus:ring-1 focus:ring-primary",
|
|
1926
1926
|
autoFocus: !0,
|
|
@@ -1928,7 +1928,7 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1928
1928
|
}) : /* @__PURE__ */ Y("span", {
|
|
1929
1929
|
className: Tt("font-mono cursor-text", t.primaryKey && "font-bold text-primary"),
|
|
1930
1930
|
onClick: (r) => {
|
|
1931
|
-
r.stopPropagation(),
|
|
1931
|
+
r.stopPropagation(), ce(e.id, n, t.name);
|
|
1932
1932
|
},
|
|
1933
1933
|
title: "Click to edit field name",
|
|
1934
1934
|
children: [t.primaryKey && /* @__PURE__ */ J("span", {
|
|
@@ -1964,11 +1964,11 @@ function Ot({ entities: e = [], relationships: t = [], canvas: n = {
|
|
|
1964
1964
|
children: /* @__PURE__ */ Y("button", {
|
|
1965
1965
|
type: "button",
|
|
1966
1966
|
onClick: (t) => {
|
|
1967
|
-
t.stopPropagation(),
|
|
1967
|
+
t.stopPropagation(), se(e.id);
|
|
1968
1968
|
},
|
|
1969
1969
|
"aria-label": `Add field to ${e.label}`,
|
|
1970
1970
|
className: "flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground w-full py-0.5",
|
|
1971
|
-
children: [/* @__PURE__ */ J(
|
|
1971
|
+
children: [/* @__PURE__ */ J(ye, { className: "h-3 w-3" }), " Add Field"]
|
|
1972
1972
|
})
|
|
1973
1973
|
})
|
|
1974
1974
|
]
|
|
@@ -2079,11 +2079,11 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2079
2079
|
]), x = at(), S = ot(), C = st(), T = ct({ initialZoom: 1 }), D = yt(), [O, k] = l(null), [A, j] = l(!1), [N, P] = l(null), [F, I] = l(null), [L, R] = l(!0), [z, ee] = l(null), [te, ne] = l({
|
|
2080
2080
|
x: 0,
|
|
2081
2081
|
y: 0
|
|
2082
|
-
}), re = c(null),
|
|
2083
|
-
|
|
2084
|
-
|
|
2082
|
+
}), re = c(null), ae = c(p), oe = c(m);
|
|
2083
|
+
ae.current = p, oe.current = m, o(() => {
|
|
2084
|
+
ae.current?.(_), oe.current?.(v);
|
|
2085
2085
|
}, [g.current]);
|
|
2086
|
-
let
|
|
2086
|
+
let V = i((e, t) => {
|
|
2087
2087
|
if (f) return;
|
|
2088
2088
|
let n = {
|
|
2089
2089
|
id: `node-${Date.now()}`,
|
|
@@ -2107,7 +2107,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2107
2107
|
y,
|
|
2108
2108
|
S,
|
|
2109
2109
|
D
|
|
2110
|
-
]),
|
|
2110
|
+
]), se = i(async (e) => {
|
|
2111
2111
|
if (f) return;
|
|
2112
2112
|
let t = _.find((t) => t.id === e);
|
|
2113
2113
|
if (!await x.confirm("Delete Node", `Are you sure you want to delete "${t?.label ?? e}"? This will also remove all connected edges.`)) return;
|
|
@@ -2127,7 +2127,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2127
2127
|
x,
|
|
2128
2128
|
S,
|
|
2129
2129
|
D
|
|
2130
|
-
]),
|
|
2130
|
+
]), ce = i(async () => {
|
|
2131
2131
|
if (f || S.count === 0 || !await x.confirm("Delete Selected Nodes", `Are you sure you want to delete ${S.count} selected node(s) and their connected edges?`)) return;
|
|
2132
2132
|
let e = S.selectedIds, t = _.filter((t) => !e.has(t.id)), n = v.filter((t) => !e.has(t.source) && !e.has(t.target));
|
|
2133
2133
|
y(t, n), k(null), S.clearSelection();
|
|
@@ -2138,7 +2138,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2138
2138
|
y,
|
|
2139
2139
|
x,
|
|
2140
2140
|
S
|
|
2141
|
-
]),
|
|
2141
|
+
]), le = i(() => {
|
|
2142
2142
|
let e = S.count > 0 ? S.selectedIds : O ? /* @__PURE__ */ new Set([O]) : /* @__PURE__ */ new Set();
|
|
2143
2143
|
if (e.size === 0) return;
|
|
2144
2144
|
let t = _.filter((t) => e.has(t.id));
|
|
@@ -2148,7 +2148,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2148
2148
|
O,
|
|
2149
2149
|
S,
|
|
2150
2150
|
C
|
|
2151
|
-
]),
|
|
2151
|
+
]), ue = i(() => {
|
|
2152
2152
|
if (f) return;
|
|
2153
2153
|
let e = C.paste();
|
|
2154
2154
|
if (!e || e.length === 0) return;
|
|
@@ -2168,9 +2168,9 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2168
2168
|
C,
|
|
2169
2169
|
y,
|
|
2170
2170
|
S
|
|
2171
|
-
]),
|
|
2171
|
+
]), de = i(() => {
|
|
2172
2172
|
j((e) => !e || (P(null), !1));
|
|
2173
|
-
}, []),
|
|
2173
|
+
}, []), H = i((e) => {
|
|
2174
2174
|
if (!A) return !1;
|
|
2175
2175
|
if (!N) return P(e), !0;
|
|
2176
2176
|
if (N === e) return !0;
|
|
@@ -2231,7 +2231,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2231
2231
|
T.zoom,
|
|
2232
2232
|
T.panOffset,
|
|
2233
2233
|
y
|
|
2234
|
-
]),
|
|
2234
|
+
]), U = i((e) => {
|
|
2235
2235
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
2236
2236
|
}, []), W = s(() => _.find((e) => e.id === O) ?? null, [_, O]), _e = s(() => W ? [
|
|
2237
2237
|
{
|
|
@@ -2289,7 +2289,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2289
2289
|
value: W.description ?? "",
|
|
2290
2290
|
group: "General"
|
|
2291
2291
|
}
|
|
2292
|
-
] : [], [W]),
|
|
2292
|
+
] : [], [W]), ye = i((e, t) => {
|
|
2293
2293
|
if (f || !O) return;
|
|
2294
2294
|
let n = _.map((n) => n.id === O ? {
|
|
2295
2295
|
...n,
|
|
@@ -2315,7 +2315,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2315
2315
|
case "script-task": return "rounded bg-purple-100 border-purple-500 text-purple-700";
|
|
2316
2316
|
default: return "rounded bg-gray-100 border-gray-500 text-gray-700";
|
|
2317
2317
|
}
|
|
2318
|
-
},
|
|
2318
|
+
}, Ce = s(() => _.map((e) => ({
|
|
2319
2319
|
id: e.id,
|
|
2320
2320
|
x: e.position.x,
|
|
2321
2321
|
y: e.position.y,
|
|
@@ -2343,15 +2343,15 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2343
2343
|
return;
|
|
2344
2344
|
}
|
|
2345
2345
|
if (n && e.key === "c") {
|
|
2346
|
-
e.preventDefault(),
|
|
2346
|
+
e.preventDefault(), le();
|
|
2347
2347
|
return;
|
|
2348
2348
|
}
|
|
2349
2349
|
if (n && e.key === "v") {
|
|
2350
|
-
e.preventDefault(),
|
|
2350
|
+
e.preventDefault(), ue();
|
|
2351
2351
|
return;
|
|
2352
2352
|
}
|
|
2353
2353
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
2354
|
-
S.count > 0 ? (e.preventDefault(),
|
|
2354
|
+
S.count > 0 ? (e.preventDefault(), ce()) : O && (e.preventDefault(), se(O));
|
|
2355
2355
|
return;
|
|
2356
2356
|
}
|
|
2357
2357
|
if (e.key === "Escape") {
|
|
@@ -2365,10 +2365,10 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2365
2365
|
A,
|
|
2366
2366
|
S,
|
|
2367
2367
|
g,
|
|
2368
|
-
ce,
|
|
2369
2368
|
le,
|
|
2370
|
-
|
|
2371
|
-
se
|
|
2369
|
+
ue,
|
|
2370
|
+
se,
|
|
2371
|
+
ce
|
|
2372
2372
|
]);
|
|
2373
2373
|
let we = i((e) => {
|
|
2374
2374
|
e.target === e.currentTarget && (k(null), S.clearSelection(), A && (j(!1), P(null)));
|
|
@@ -2419,7 +2419,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2419
2419
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent disabled:opacity-40",
|
|
2420
2420
|
title: "Undo (Ctrl+Z)",
|
|
2421
2421
|
"aria-label": "Undo",
|
|
2422
|
-
children: /* @__PURE__ */ J(
|
|
2422
|
+
children: /* @__PURE__ */ J(Ne, { className: "h-3 w-3" })
|
|
2423
2423
|
}),
|
|
2424
2424
|
/* @__PURE__ */ J("button", {
|
|
2425
2425
|
type: "button",
|
|
@@ -2428,12 +2428,12 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2428
2428
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent disabled:opacity-40",
|
|
2429
2429
|
title: "Redo (Ctrl+Y)",
|
|
2430
2430
|
"aria-label": "Redo",
|
|
2431
|
-
children: /* @__PURE__ */ J(
|
|
2431
|
+
children: /* @__PURE__ */ J(xe, { className: "h-3 w-3" })
|
|
2432
2432
|
}),
|
|
2433
2433
|
/* @__PURE__ */ J("div", { className: "w-px h-4 bg-border mx-1" }),
|
|
2434
2434
|
/* @__PURE__ */ J("button", {
|
|
2435
2435
|
type: "button",
|
|
2436
|
-
onClick:
|
|
2436
|
+
onClick: le,
|
|
2437
2437
|
disabled: S.count === 0 && !O,
|
|
2438
2438
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent disabled:opacity-40",
|
|
2439
2439
|
title: "Copy (Ctrl+C)",
|
|
@@ -2442,7 +2442,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2442
2442
|
}),
|
|
2443
2443
|
/* @__PURE__ */ J("button", {
|
|
2444
2444
|
type: "button",
|
|
2445
|
-
onClick:
|
|
2445
|
+
onClick: ue,
|
|
2446
2446
|
disabled: !C.hasContent,
|
|
2447
2447
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent disabled:opacity-40",
|
|
2448
2448
|
title: "Paste (Ctrl+V)",
|
|
@@ -2452,12 +2452,12 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2452
2452
|
/* @__PURE__ */ J("div", { className: "w-px h-4 bg-border mx-1" }),
|
|
2453
2453
|
/* @__PURE__ */ Y("button", {
|
|
2454
2454
|
type: "button",
|
|
2455
|
-
onClick:
|
|
2455
|
+
onClick: de,
|
|
2456
2456
|
className: kt("flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent", A && "bg-primary text-primary-foreground"),
|
|
2457
2457
|
title: "Connect nodes",
|
|
2458
2458
|
"aria-label": "Connect nodes",
|
|
2459
2459
|
"aria-pressed": A,
|
|
2460
|
-
children: [/* @__PURE__ */ J(
|
|
2460
|
+
children: [/* @__PURE__ */ J(ie, { className: "h-3 w-3" }), " Connect"]
|
|
2461
2461
|
}),
|
|
2462
2462
|
/* @__PURE__ */ Y("button", {
|
|
2463
2463
|
type: "button",
|
|
@@ -2474,7 +2474,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2474
2474
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2475
2475
|
title: "Zoom in",
|
|
2476
2476
|
"aria-label": "Zoom in",
|
|
2477
|
-
children: /* @__PURE__ */ J(
|
|
2477
|
+
children: /* @__PURE__ */ J(Re, { className: "h-3 w-3" })
|
|
2478
2478
|
}),
|
|
2479
2479
|
/* @__PURE__ */ Y("span", {
|
|
2480
2480
|
className: "text-xs tabular-nums min-w-[3ch] text-center",
|
|
@@ -2487,7 +2487,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2487
2487
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2488
2488
|
title: "Zoom out",
|
|
2489
2489
|
"aria-label": "Zoom out",
|
|
2490
|
-
children: /* @__PURE__ */ J(
|
|
2490
|
+
children: /* @__PURE__ */ J(ze, { className: "h-3 w-3" })
|
|
2491
2491
|
}),
|
|
2492
2492
|
/* @__PURE__ */ J("button", {
|
|
2493
2493
|
type: "button",
|
|
@@ -2495,28 +2495,28 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2495
2495
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2496
2496
|
title: "Reset zoom",
|
|
2497
2497
|
"aria-label": "Reset zoom",
|
|
2498
|
-
children: /* @__PURE__ */ J(
|
|
2498
|
+
children: /* @__PURE__ */ J(Se, { className: "h-3 w-3" })
|
|
2499
2499
|
}),
|
|
2500
2500
|
/* @__PURE__ */ J("div", { className: "w-px h-4 bg-border mx-1" }),
|
|
2501
2501
|
/* @__PURE__ */ Y("button", {
|
|
2502
2502
|
type: "button",
|
|
2503
|
-
onClick: () =>
|
|
2503
|
+
onClick: () => V("start-event", "Start"),
|
|
2504
2504
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2505
2505
|
title: "Add Start Event",
|
|
2506
2506
|
"aria-label": "Add Start Event",
|
|
2507
|
-
children: [/* @__PURE__ */ J(
|
|
2507
|
+
children: [/* @__PURE__ */ J(ve, { className: "h-3 w-3 text-green-600" }), " Start"]
|
|
2508
2508
|
}),
|
|
2509
2509
|
/* @__PURE__ */ Y("button", {
|
|
2510
2510
|
type: "button",
|
|
2511
|
-
onClick: () =>
|
|
2511
|
+
onClick: () => V("user-task", "User Task"),
|
|
2512
2512
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2513
2513
|
title: "Add User Task",
|
|
2514
2514
|
"aria-label": "Add User Task",
|
|
2515
|
-
children: [/* @__PURE__ */ J(
|
|
2515
|
+
children: [/* @__PURE__ */ J(Te, { className: "h-3 w-3 text-blue-600" }), " Task"]
|
|
2516
2516
|
}),
|
|
2517
2517
|
/* @__PURE__ */ Y("button", {
|
|
2518
2518
|
type: "button",
|
|
2519
|
-
onClick: () =>
|
|
2519
|
+
onClick: () => V("exclusive-gateway", "Decision"),
|
|
2520
2520
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2521
2521
|
title: "Add Gateway",
|
|
2522
2522
|
"aria-label": "Add Gateway",
|
|
@@ -2524,11 +2524,11 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2524
2524
|
}),
|
|
2525
2525
|
/* @__PURE__ */ Y("button", {
|
|
2526
2526
|
type: "button",
|
|
2527
|
-
onClick: () =>
|
|
2527
|
+
onClick: () => V("end-event", "End"),
|
|
2528
2528
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
2529
2529
|
title: "Add End Event",
|
|
2530
2530
|
"aria-label": "Add End Event",
|
|
2531
|
-
children: [/* @__PURE__ */ J(
|
|
2531
|
+
children: [/* @__PURE__ */ J(Te, { className: "h-3 w-3 text-red-600" }), " End"]
|
|
2532
2532
|
}),
|
|
2533
2533
|
/* @__PURE__ */ J("div", { className: "w-px h-4 bg-border mx-1" }),
|
|
2534
2534
|
/* @__PURE__ */ J("button", {
|
|
@@ -2538,7 +2538,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2538
2538
|
title: L ? "Hide properties" : "Show properties",
|
|
2539
2539
|
"aria-label": L ? "Hide property panel" : "Show property panel",
|
|
2540
2540
|
"aria-expanded": L,
|
|
2541
|
-
children: J(L ?
|
|
2541
|
+
children: J(L ? he : ge, { className: "h-3 w-3" })
|
|
2542
2542
|
})
|
|
2543
2543
|
]
|
|
2544
2544
|
})
|
|
@@ -2563,7 +2563,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2563
2563
|
},
|
|
2564
2564
|
onClick: we,
|
|
2565
2565
|
onDrop: me,
|
|
2566
|
-
onDragOver:
|
|
2566
|
+
onDragOver: U,
|
|
2567
2567
|
children: [
|
|
2568
2568
|
/* @__PURE__ */ Y("svg", {
|
|
2569
2569
|
className: "absolute inset-0 pointer-events-none",
|
|
@@ -2621,7 +2621,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2621
2621
|
onMouseEnter: () => I(e.id),
|
|
2622
2622
|
onMouseLeave: () => I(null),
|
|
2623
2623
|
onClick: (t) => {
|
|
2624
|
-
|
|
2624
|
+
H(e.id) || (t.shiftKey ? S.toggle(e.id, !0) : (k(e.id), S.selectOne(e.id)));
|
|
2625
2625
|
},
|
|
2626
2626
|
children: [
|
|
2627
2627
|
/* @__PURE__ */ J("div", {
|
|
@@ -2640,7 +2640,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2640
2640
|
},
|
|
2641
2641
|
title: "Input port",
|
|
2642
2642
|
onClick: (t) => {
|
|
2643
|
-
t.stopPropagation(),
|
|
2643
|
+
t.stopPropagation(), H(e.id);
|
|
2644
2644
|
}
|
|
2645
2645
|
}),
|
|
2646
2646
|
/* @__PURE__ */ J("div", {
|
|
@@ -2651,7 +2651,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2651
2651
|
},
|
|
2652
2652
|
title: "Output port",
|
|
2653
2653
|
onClick: (t) => {
|
|
2654
|
-
t.stopPropagation(), A ?
|
|
2654
|
+
t.stopPropagation(), A ? H(e.id) : (j(!0), P(e.id));
|
|
2655
2655
|
}
|
|
2656
2656
|
}),
|
|
2657
2657
|
/* @__PURE__ */ J("div", {
|
|
@@ -2662,7 +2662,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2662
2662
|
},
|
|
2663
2663
|
title: "Port",
|
|
2664
2664
|
onClick: (t) => {
|
|
2665
|
-
t.stopPropagation(),
|
|
2665
|
+
t.stopPropagation(), H(e.id);
|
|
2666
2666
|
}
|
|
2667
2667
|
}),
|
|
2668
2668
|
/* @__PURE__ */ J("div", {
|
|
@@ -2673,24 +2673,24 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2673
2673
|
},
|
|
2674
2674
|
title: "Port",
|
|
2675
2675
|
onClick: (t) => {
|
|
2676
|
-
t.stopPropagation(),
|
|
2676
|
+
t.stopPropagation(), H(e.id);
|
|
2677
2677
|
}
|
|
2678
2678
|
})
|
|
2679
2679
|
] }),
|
|
2680
2680
|
!f && t && !A && /* @__PURE__ */ J("button", {
|
|
2681
2681
|
type: "button",
|
|
2682
2682
|
onClick: (t) => {
|
|
2683
|
-
t.stopPropagation(),
|
|
2683
|
+
t.stopPropagation(), se(e.id);
|
|
2684
2684
|
},
|
|
2685
2685
|
className: "absolute -top-2 -right-2 p-0.5 rounded-full bg-destructive text-destructive-foreground shadow",
|
|
2686
2686
|
"aria-label": "Delete node",
|
|
2687
|
-
children: /* @__PURE__ */ J(
|
|
2687
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-3 w-3" })
|
|
2688
2688
|
})
|
|
2689
2689
|
]
|
|
2690
2690
|
}, e.id);
|
|
2691
2691
|
}),
|
|
2692
2692
|
u && _.length > 0 && /* @__PURE__ */ J(ht, {
|
|
2693
|
-
items:
|
|
2693
|
+
items: Ce,
|
|
2694
2694
|
canvasWidth: a.width ?? 1400,
|
|
2695
2695
|
canvasHeight: a.height ?? 800,
|
|
2696
2696
|
position: "bottom-right"
|
|
@@ -2704,7 +2704,7 @@ function Nt({ processName: e = "New Process", nodes: t = [], edges: n = [], lane
|
|
|
2704
2704
|
children: /* @__PURE__ */ J(ft, {
|
|
2705
2705
|
title: W ? `Properties: ${W.label}` : "Properties",
|
|
2706
2706
|
fields: _e,
|
|
2707
|
-
onChange:
|
|
2707
|
+
onChange: ye
|
|
2708
2708
|
})
|
|
2709
2709
|
})]
|
|
2710
2710
|
})
|
|
@@ -2993,9 +2993,9 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
2993
2993
|
startX: e.clientX,
|
|
2994
2994
|
startY: e.clientY
|
|
2995
2995
|
}, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t.id));
|
|
2996
|
-
}, [m]),
|
|
2996
|
+
}, [m]), ae = i((e) => {
|
|
2997
2997
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
2998
|
-
}, []),
|
|
2998
|
+
}, []), oe = i((e, t) => {
|
|
2999
2999
|
e.preventDefault();
|
|
3000
3000
|
let n = j.current;
|
|
3001
3001
|
if (!n || m) return;
|
|
@@ -3047,7 +3047,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3047
3047
|
v,
|
|
3048
3048
|
y,
|
|
3049
3049
|
D
|
|
3050
|
-
]),
|
|
3050
|
+
]), V = s(() => {
|
|
3051
3051
|
if (!L) return [];
|
|
3052
3052
|
let e = [
|
|
3053
3053
|
{
|
|
@@ -3178,7 +3178,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3178
3178
|
"aria-label": Z.undo,
|
|
3179
3179
|
disabled: !_.canUndo,
|
|
3180
3180
|
onClick: () => _.undo(),
|
|
3181
|
-
children: /* @__PURE__ */ J(
|
|
3181
|
+
children: /* @__PURE__ */ J(Ne, { className: "h-4 w-4" })
|
|
3182
3182
|
}),
|
|
3183
3183
|
/* @__PURE__ */ J("button", {
|
|
3184
3184
|
type: "button",
|
|
@@ -3187,7 +3187,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3187
3187
|
"aria-label": Z.redo,
|
|
3188
3188
|
disabled: !_.canRedo,
|
|
3189
3189
|
onClick: () => _.redo(),
|
|
3190
|
-
children: /* @__PURE__ */ J(
|
|
3190
|
+
children: /* @__PURE__ */ J(xe, { className: "h-4 w-4" })
|
|
3191
3191
|
}),
|
|
3192
3192
|
/* @__PURE__ */ J("div", { className: "w-px h-5 bg-border mx-1" })
|
|
3193
3193
|
] }),
|
|
@@ -3219,7 +3219,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3219
3219
|
"aria-label": Z.deleteSelected,
|
|
3220
3220
|
disabled: x.count === 0,
|
|
3221
3221
|
onClick: B,
|
|
3222
|
-
children: /* @__PURE__ */ J(
|
|
3222
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-4 w-4" })
|
|
3223
3223
|
}),
|
|
3224
3224
|
/* @__PURE__ */ J("div", { className: "flex-1" }),
|
|
3225
3225
|
E?.isConnected && /* @__PURE__ */ Y("span", {
|
|
@@ -3244,7 +3244,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3244
3244
|
title: O ? Z.collapsePanel : Z.expandPanel,
|
|
3245
3245
|
"aria-label": O ? Z.collapsePanel : Z.expandPanel,
|
|
3246
3246
|
onClick: () => k((e) => !e),
|
|
3247
|
-
children: /* @__PURE__ */ J(
|
|
3247
|
+
children: /* @__PURE__ */ J(he, { className: Pt("h-4 w-4", !O && "rotate-180") })
|
|
3248
3248
|
})
|
|
3249
3249
|
]
|
|
3250
3250
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -3260,8 +3260,8 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3260
3260
|
children: v.map((e, t) => /* @__PURE__ */ Y("div", {
|
|
3261
3261
|
className: "relative border-b border-dashed border-gray-300",
|
|
3262
3262
|
style: { minHeight: e.height },
|
|
3263
|
-
onDragOver:
|
|
3264
|
-
onDrop: (e) =>
|
|
3263
|
+
onDragOver: ae,
|
|
3264
|
+
onDrop: (e) => oe(e, t),
|
|
3265
3265
|
children: [
|
|
3266
3266
|
/* @__PURE__ */ Y("div", {
|
|
3267
3267
|
className: "absolute left-0 top-0 px-2 py-0.5 bg-muted text-xs text-muted-foreground border-r border-b rounded-br",
|
|
@@ -3276,7 +3276,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3276
3276
|
className: "p-0.5 rounded hover:bg-accent",
|
|
3277
3277
|
title: Z.addText,
|
|
3278
3278
|
"aria-label": Z.addText,
|
|
3279
|
-
children: /* @__PURE__ */ J(
|
|
3279
|
+
children: /* @__PURE__ */ J(Me, { className: "h-3 w-3" })
|
|
3280
3280
|
}),
|
|
3281
3281
|
/* @__PURE__ */ J("button", {
|
|
3282
3282
|
type: "button",
|
|
@@ -3284,7 +3284,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3284
3284
|
className: "p-0.5 rounded hover:bg-accent",
|
|
3285
3285
|
title: Z.addField,
|
|
3286
3286
|
"aria-label": Z.addField,
|
|
3287
|
-
children: /* @__PURE__ */ J(
|
|
3287
|
+
children: /* @__PURE__ */ J(ye, { className: "h-3 w-3" })
|
|
3288
3288
|
}),
|
|
3289
3289
|
/* @__PURE__ */ J("button", {
|
|
3290
3290
|
type: "button",
|
|
@@ -3308,7 +3308,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3308
3308
|
className: "p-0.5 rounded hover:bg-accent",
|
|
3309
3309
|
title: Z.addTable,
|
|
3310
3310
|
"aria-label": Z.addTable,
|
|
3311
|
-
children: /* @__PURE__ */ J(
|
|
3311
|
+
children: /* @__PURE__ */ J(Oe, { className: "h-3 w-3" })
|
|
3312
3312
|
})
|
|
3313
3313
|
]
|
|
3314
3314
|
}),
|
|
@@ -3350,7 +3350,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3350
3350
|
},
|
|
3351
3351
|
className: "absolute -top-2 -right-2 p-0.5 rounded-full bg-destructive text-destructive-foreground shadow",
|
|
3352
3352
|
"aria-label": Z.deleteElement,
|
|
3353
|
-
children: /* @__PURE__ */ J(
|
|
3353
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-2.5 w-2.5" })
|
|
3354
3354
|
})]
|
|
3355
3355
|
}, e.id);
|
|
3356
3356
|
})]
|
|
@@ -3366,7 +3366,7 @@ function Lt({ reportName: e = Z.untitledReport, objectName: t, pageSize: n = "A4
|
|
|
3366
3366
|
className: Pt("border-l bg-muted/30 flex flex-col transition-[width] duration-200", O ? "w-56" : "w-0 overflow-hidden"),
|
|
3367
3367
|
children: O && (S && L ? /* @__PURE__ */ J(ft, {
|
|
3368
3368
|
title: `${Z.properties} – ${L.type}`,
|
|
3369
|
-
fields:
|
|
3369
|
+
fields: V,
|
|
3370
3370
|
onChange: te
|
|
3371
3371
|
}) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("div", {
|
|
3372
3372
|
className: "p-3 border-b font-medium text-sm",
|
|
@@ -3531,7 +3531,6 @@ var Rt = {
|
|
|
3531
3531
|
"appDesigner.fieldDesigner.unique": "Unique",
|
|
3532
3532
|
"appDesigner.fieldDesigner.readOnly": "Read Only",
|
|
3533
3533
|
"appDesigner.fieldDesigner.hidden": "Hidden",
|
|
3534
|
-
"appDesigner.fieldDesigner.indexed": "Indexed",
|
|
3535
3534
|
"appDesigner.fieldDesigner.externalId": "External ID",
|
|
3536
3535
|
"appDesigner.fieldDesigner.trackHistory": "Track History",
|
|
3537
3536
|
"appDesigner.fieldDesigner.defaultValue": "Default Value",
|
|
@@ -3557,7 +3556,7 @@ var Rt = {
|
|
|
3557
3556
|
"appDesigner.fieldDesigner.typeCategory.advanced": "Advanced",
|
|
3558
3557
|
"common.edit": "Edit",
|
|
3559
3558
|
"common.delete": "Delete"
|
|
3560
|
-
}, zt =
|
|
3559
|
+
}, zt = qe(Rt, "appDesigner.basicInfo");
|
|
3561
3560
|
//#endregion
|
|
3562
3561
|
//#region src/AppCreationWizard.tsx
|
|
3563
3562
|
function Q(...e) {
|
|
@@ -3613,7 +3612,7 @@ function Wt({ steps: e, currentIndex: t, onStepClick: r }) {
|
|
|
3613
3612
|
});
|
|
3614
3613
|
}
|
|
3615
3614
|
function Gt({ draft: e, templates: t, readOnly: n, onChange: r, t: i }) {
|
|
3616
|
-
let a = e.name.length > 0 && !
|
|
3615
|
+
let a = e.name.length > 0 && !Ve(e.name);
|
|
3617
3616
|
return /* @__PURE__ */ Y("div", {
|
|
3618
3617
|
"data-testid": "wizard-step-basic-content",
|
|
3619
3618
|
className: "mx-auto max-w-lg space-y-5",
|
|
@@ -3737,7 +3736,7 @@ function Gt({ draft: e, templates: t, readOnly: n, onChange: r, t: i }) {
|
|
|
3737
3736
|
{
|
|
3738
3737
|
value: "sidebar",
|
|
3739
3738
|
labelKey: "appDesigner.layoutSidebar",
|
|
3740
|
-
Icon:
|
|
3739
|
+
Icon: pe
|
|
3741
3740
|
},
|
|
3742
3741
|
{
|
|
3743
3742
|
value: "header",
|
|
@@ -3747,7 +3746,7 @@ function Gt({ draft: e, templates: t, readOnly: n, onChange: r, t: i }) {
|
|
|
3747
3746
|
{
|
|
3748
3747
|
value: "empty",
|
|
3749
3748
|
labelKey: "appDesigner.layoutEmpty",
|
|
3750
|
-
Icon:
|
|
3749
|
+
Icon: ne
|
|
3751
3750
|
}
|
|
3752
3751
|
].map(({ value: t, labelKey: a, Icon: o }) => /* @__PURE__ */ Y("label", {
|
|
3753
3752
|
"data-testid": `app-layout-${t}`,
|
|
@@ -3787,7 +3786,7 @@ function Kt({ objects: e, readOnly: t, onToggle: n, onToggleAll: r, search: i, o
|
|
|
3787
3786
|
className: "flex items-center gap-3",
|
|
3788
3787
|
children: [/* @__PURE__ */ Y("div", {
|
|
3789
3788
|
className: "relative flex-1",
|
|
3790
|
-
children: [/* @__PURE__ */ J(
|
|
3789
|
+
children: [/* @__PURE__ */ J(Ce, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-gray-400" }), /* @__PURE__ */ J("input", {
|
|
3791
3790
|
"data-testid": "object-search",
|
|
3792
3791
|
type: "text",
|
|
3793
3792
|
value: i,
|
|
@@ -3868,7 +3867,7 @@ function Jt({ items: e, readOnly: t, onAdd: n, onRemove: r, onReorder: i, t: a }
|
|
|
3868
3867
|
onClick: () => n("url"),
|
|
3869
3868
|
disabled: t,
|
|
3870
3869
|
className: "inline-flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3871
|
-
children: [/* @__PURE__ */ J(
|
|
3870
|
+
children: [/* @__PURE__ */ J(ie, { className: "h-3.5 w-3.5" }), a("appDesigner.addUrl")]
|
|
3872
3871
|
}),
|
|
3873
3872
|
/* @__PURE__ */ Y("button", {
|
|
3874
3873
|
type: "button",
|
|
@@ -3894,7 +3893,7 @@ function Jt({ items: e, readOnly: t, onAdd: n, onRemove: r, onReorder: i, t: a }
|
|
|
3894
3893
|
}),
|
|
3895
3894
|
/* @__PURE__ */ J("span", {
|
|
3896
3895
|
className: "flex-1 truncate text-sm text-gray-800",
|
|
3897
|
-
children: n.type === "separator" ? a("appDesigner.separatorLabel") :
|
|
3896
|
+
children: n.type === "separator" ? a("appDesigner.separatorLabel") : We(n.label)
|
|
3898
3897
|
}),
|
|
3899
3898
|
/* @__PURE__ */ J("span", {
|
|
3900
3899
|
className: Q("rounded-full px-2 py-0.5 text-[10px] font-medium", qt[n.type] ?? "bg-gray-100 text-gray-600"),
|
|
@@ -3925,7 +3924,7 @@ function Jt({ items: e, readOnly: t, onAdd: n, onRemove: r, onReorder: i, t: a }
|
|
|
3925
3924
|
disabled: t,
|
|
3926
3925
|
className: "rounded p-0.5 text-gray-400 transition-colors hover:text-red-500 disabled:opacity-30",
|
|
3927
3926
|
"aria-label": "Remove",
|
|
3928
|
-
children: /* @__PURE__ */ J(
|
|
3927
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-3.5 w-3.5" })
|
|
3929
3928
|
})
|
|
3930
3929
|
]
|
|
3931
3930
|
})
|
|
@@ -3967,7 +3966,7 @@ function Yt({ branding: e, title: t, readOnly: n, onChange: r, t: i }) {
|
|
|
3967
3966
|
children: i("appDesigner.primaryColor")
|
|
3968
3967
|
}), /* @__PURE__ */ Y("div", {
|
|
3969
3968
|
className: "relative",
|
|
3970
|
-
children: [/* @__PURE__ */ J(
|
|
3969
|
+
children: [/* @__PURE__ */ J(fe, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-gray-400" }), /* @__PURE__ */ J("input", {
|
|
3971
3970
|
id: "branding-color",
|
|
3972
3971
|
"data-testid": "branding-color-input",
|
|
3973
3972
|
type: "text",
|
|
@@ -4078,7 +4077,7 @@ function Xt({ availableObjects: e = [], templates: t = [], initialDraft: n, onCo
|
|
|
4078
4077
|
description: d("appDesigner.stepBrandingDesc"),
|
|
4079
4078
|
icon: "Palette"
|
|
4080
4079
|
}
|
|
4081
|
-
], [d]), C = p === 0, w = p === S.length - 1, T = s(() => b.name.length > 0 &&
|
|
4080
|
+
], [d]), C = p === 0, w = p === S.length - 1, T = s(() => b.name.length > 0 && Ve(b.name) && b.title.trim().length > 0, [b.name, b.title]), E = s(() => p !== 0 || T, [p, T]), D = i((e) => {
|
|
4082
4081
|
x((t) => ({
|
|
4083
4082
|
...t,
|
|
4084
4083
|
...e
|
|
@@ -4180,7 +4179,7 @@ function Xt({ availableObjects: e = [], templates: t = [], initialDraft: n, onCo
|
|
|
4180
4179
|
onClick: f.onCancel,
|
|
4181
4180
|
className: "rounded p-1 text-gray-400 hover:text-gray-600",
|
|
4182
4181
|
"aria-label": d("common.close"),
|
|
4183
|
-
children: /* @__PURE__ */ J(
|
|
4182
|
+
children: /* @__PURE__ */ J(Le, { className: "h-4 w-4" })
|
|
4184
4183
|
})]
|
|
4185
4184
|
}),
|
|
4186
4185
|
/* @__PURE__ */ J("p", {
|
|
@@ -4331,12 +4330,12 @@ var en = {
|
|
|
4331
4330
|
url: {
|
|
4332
4331
|
labelKey: "appDesigner.navTypeUrl",
|
|
4333
4332
|
color: "bg-sky-100 text-sky-700",
|
|
4334
|
-
Icon:
|
|
4333
|
+
Icon: ie
|
|
4335
4334
|
},
|
|
4336
4335
|
component: {
|
|
4337
4336
|
labelKey: "appDesigner.navTypeComponent",
|
|
4338
4337
|
color: "bg-indigo-100 text-indigo-700",
|
|
4339
|
-
Icon:
|
|
4338
|
+
Icon: be
|
|
4340
4339
|
},
|
|
4341
4340
|
group: {
|
|
4342
4341
|
labelKey: "appDesigner.navTypeGroup",
|
|
@@ -4351,7 +4350,7 @@ var en = {
|
|
|
4351
4350
|
action: {
|
|
4352
4351
|
labelKey: "appDesigner.navTypeAction",
|
|
4353
4352
|
color: "bg-orange-100 text-orange-700",
|
|
4354
|
-
Icon:
|
|
4353
|
+
Icon: H
|
|
4355
4354
|
}
|
|
4356
4355
|
}, tn = [
|
|
4357
4356
|
{
|
|
@@ -4384,10 +4383,10 @@ var en = {
|
|
|
4384
4383
|
}
|
|
4385
4384
|
];
|
|
4386
4385
|
function nn({ item: e, depth: t, index: n, total: r, readOnly: i, onRemove: a, onMoveUp: o, onMoveDown: s, onToggleExpand: c, onUpdateLabel: u, onUpdateIcon: d, onToggleVisible: f, onAddChild: p, expandedIds: m, t: h }) {
|
|
4387
|
-
let [_, b] = l(!1), [x, S] = l(
|
|
4386
|
+
let [_, b] = l(!1), [x, S] = l(We(e.label) ?? ""), [C, w] = l(!1), [T, E] = l(e.icon || ""), D = en[e.type];
|
|
4388
4387
|
e.type === "group" && e.children && e.children.length;
|
|
4389
4388
|
let A = m.has(e.id), j = e.visible === !1, M = () => {
|
|
4390
|
-
x.trim() ? u(e.id, x.trim()) : S(
|
|
4389
|
+
x.trim() ? u(e.id, x.trim()) : S(We(e.label) ?? ""), b(!1);
|
|
4391
4390
|
}, N = () => {
|
|
4392
4391
|
d(e.id, T.trim()), w(!1);
|
|
4393
4392
|
};
|
|
@@ -4426,7 +4425,7 @@ function nn({ item: e, depth: t, index: n, total: r, readOnly: i, onRemove: a, o
|
|
|
4426
4425
|
className: "rounded p-0.5 text-gray-300 hover:text-blue-500",
|
|
4427
4426
|
"aria-label": h("appDesigner.navEditIcon"),
|
|
4428
4427
|
"data-testid": `nav-designer-edit-icon-${e.id}`,
|
|
4429
|
-
children: /* @__PURE__ */ J(
|
|
4428
|
+
children: /* @__PURE__ */ J(U, { className: "h-2.5 w-2.5" })
|
|
4430
4429
|
})]
|
|
4431
4430
|
}),
|
|
4432
4431
|
e.type === "separator" ? /* @__PURE__ */ J("span", {
|
|
@@ -4438,16 +4437,16 @@ function nn({ item: e, depth: t, index: n, total: r, readOnly: i, onRemove: a, o
|
|
|
4438
4437
|
onChange: (e) => S(e.target.value),
|
|
4439
4438
|
onBlur: M,
|
|
4440
4439
|
onKeyDown: (t) => {
|
|
4441
|
-
t.key === "Enter" && M(), t.key === "Escape" && (S(
|
|
4440
|
+
t.key === "Enter" && M(), t.key === "Escape" && (S(We(e.label) ?? ""), b(!1));
|
|
4442
4441
|
},
|
|
4443
4442
|
autoFocus: !0,
|
|
4444
4443
|
className: "flex-1 rounded border border-blue-300 px-1.5 py-0.5 text-sm outline-none focus:ring-1 focus:ring-blue-400"
|
|
4445
4444
|
}) : /* @__PURE__ */ J("span", {
|
|
4446
4445
|
className: Zt("flex-1 truncate text-sm text-gray-800", !i && "cursor-text"),
|
|
4447
4446
|
onDoubleClick: () => {
|
|
4448
|
-
!i && e.type !== "separator" && (S(
|
|
4447
|
+
!i && e.type !== "separator" && (S(We(e.label) ?? ""), b(!0));
|
|
4449
4448
|
},
|
|
4450
|
-
children:
|
|
4449
|
+
children: We(e.label)
|
|
4451
4450
|
}),
|
|
4452
4451
|
/* @__PURE__ */ J("span", {
|
|
4453
4452
|
className: Zt("rounded-full px-2 py-0.5 text-[10px] font-medium", D.color),
|
|
@@ -4472,7 +4471,7 @@ function nn({ item: e, depth: t, index: n, total: r, readOnly: i, onRemove: a, o
|
|
|
4472
4471
|
className: "rounded p-0.5 text-gray-400 hover:text-blue-500",
|
|
4473
4472
|
"aria-label": h("appDesigner.navAddChild"),
|
|
4474
4473
|
"data-testid": `nav-designer-add-child-${e.id}`,
|
|
4475
|
-
children: /* @__PURE__ */ J(
|
|
4474
|
+
children: /* @__PURE__ */ J(ye, { className: "h-3.5 w-3.5" })
|
|
4476
4475
|
}),
|
|
4477
4476
|
/* @__PURE__ */ J("button", {
|
|
4478
4477
|
type: "button",
|
|
@@ -4497,7 +4496,7 @@ function nn({ item: e, depth: t, index: n, total: r, readOnly: i, onRemove: a, o
|
|
|
4497
4496
|
className: "rounded p-0.5 text-gray-400 hover:text-red-500 disabled:opacity-30",
|
|
4498
4497
|
"aria-label": h("appDesigner.navRemove"),
|
|
4499
4498
|
"data-testid": `nav-designer-remove-${e.id}`,
|
|
4500
|
-
children: /* @__PURE__ */ J(
|
|
4499
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-3.5 w-3.5" })
|
|
4501
4500
|
})
|
|
4502
4501
|
]
|
|
4503
4502
|
}), e.type === "group" && A && e.children && /* @__PURE__ */ J(q, { children: e.children.map((n, r) => /* @__PURE__ */ J(nn, {
|
|
@@ -4547,7 +4546,7 @@ function an({ item: e, depth: t }) {
|
|
|
4547
4546
|
style: { marginLeft: t * 12 },
|
|
4548
4547
|
children: [/* @__PURE__ */ J(n.Icon, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ J("span", {
|
|
4549
4548
|
className: "truncate",
|
|
4550
|
-
children:
|
|
4549
|
+
children: We(e.label)
|
|
4551
4550
|
})]
|
|
4552
4551
|
}), e.type === "group" && e.children?.map((e) => /* @__PURE__ */ J(an, {
|
|
4553
4552
|
item: e,
|
|
@@ -4682,7 +4681,7 @@ function on({ items: e, onChange: t, readOnly: n = !1, showPreview: r = !0, clas
|
|
|
4682
4681
|
onClick: () => b(e),
|
|
4683
4682
|
disabled: n,
|
|
4684
4683
|
className: Zt("inline-flex items-center gap-1 rounded-md border border-gray-200 px-2.5 py-1 text-xs font-medium transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50"),
|
|
4685
|
-
children: [/* @__PURE__ */ J(
|
|
4684
|
+
children: [/* @__PURE__ */ J(ye, { className: "h-3 w-3" }), u(t)]
|
|
4686
4685
|
}, e);
|
|
4687
4686
|
}),
|
|
4688
4687
|
/* @__PURE__ */ J("span", { className: "mx-1 hidden h-4 w-px bg-gray-200 sm:block" }),
|
|
@@ -4697,7 +4696,7 @@ function on({ items: e, onChange: t, readOnly: n = !1, showPreview: r = !0, clas
|
|
|
4697
4696
|
"data-testid": "nav-designer-import",
|
|
4698
4697
|
className: Zt("inline-flex cursor-pointer items-center gap-1 rounded-md border border-gray-200 px-2.5 py-1 text-xs font-medium transition-colors hover:bg-gray-50", n && "cursor-not-allowed opacity-50"),
|
|
4699
4698
|
children: [
|
|
4700
|
-
/* @__PURE__ */ J(
|
|
4699
|
+
/* @__PURE__ */ J(Pe, { className: "h-3 w-3" }),
|
|
4701
4700
|
u("appDesigner.navImportSchema"),
|
|
4702
4701
|
/* @__PURE__ */ J("input", {
|
|
4703
4702
|
ref: d,
|
|
@@ -4750,7 +4749,7 @@ var cn = [
|
|
|
4750
4749
|
{
|
|
4751
4750
|
value: "edit",
|
|
4752
4751
|
label: "Edit",
|
|
4753
|
-
Icon:
|
|
4752
|
+
Icon: U
|
|
4754
4753
|
},
|
|
4755
4754
|
{
|
|
4756
4755
|
value: "preview",
|
|
@@ -4790,7 +4789,7 @@ var dn = [
|
|
|
4790
4789
|
{
|
|
4791
4790
|
type: "metric",
|
|
4792
4791
|
label: "KPI Metric",
|
|
4793
|
-
Icon:
|
|
4792
|
+
Icon: je
|
|
4794
4793
|
},
|
|
4795
4794
|
{
|
|
4796
4795
|
type: "bar",
|
|
@@ -4800,32 +4799,27 @@ var dn = [
|
|
|
4800
4799
|
{
|
|
4801
4800
|
type: "line",
|
|
4802
4801
|
label: "Line Chart",
|
|
4803
|
-
Icon:
|
|
4802
|
+
Icon: re
|
|
4804
4803
|
},
|
|
4805
4804
|
{
|
|
4806
4805
|
type: "pie",
|
|
4807
4806
|
label: "Pie Chart",
|
|
4808
|
-
Icon:
|
|
4807
|
+
Icon: _e
|
|
4809
4808
|
},
|
|
4810
4809
|
{
|
|
4811
4810
|
type: "table",
|
|
4812
4811
|
label: "Table",
|
|
4813
|
-
Icon:
|
|
4814
|
-
},
|
|
4815
|
-
{
|
|
4816
|
-
type: "grid",
|
|
4817
|
-
label: "Grid",
|
|
4818
|
-
Icon: ne
|
|
4812
|
+
Icon: Oe
|
|
4819
4813
|
}
|
|
4820
4814
|
], fn = 0;
|
|
4821
4815
|
function pn() {
|
|
4822
4816
|
return fn += 1, `widget_${Date.now()}_${fn}`;
|
|
4823
4817
|
}
|
|
4824
4818
|
function mn(e, t) {
|
|
4825
|
-
return
|
|
4819
|
+
return Je(e, t);
|
|
4826
4820
|
}
|
|
4827
|
-
function hn(e) {
|
|
4828
|
-
return e
|
|
4821
|
+
function hn(e, t, n) {
|
|
4822
|
+
return Ye(e, t, n);
|
|
4829
4823
|
}
|
|
4830
4824
|
function gn({ widget: e, index: t, total: n, selected: r, readOnly: i, onSelect: a, onRemove: o, onMoveUp: s, onMoveDown: c }) {
|
|
4831
4825
|
let l = e.type || "metric", u = dn.find((e) => e.type === l) || dn[0], { language: d } = zt(), f = mn(e.title, d);
|
|
@@ -4876,7 +4870,7 @@ function gn({ widget: e, index: t, total: n, selected: r, readOnly: i, onSelect:
|
|
|
4876
4870
|
className: "rounded p-0.5 text-gray-400 hover:text-red-500",
|
|
4877
4871
|
"aria-label": "Remove widget",
|
|
4878
4872
|
"data-testid": `dashboard-widget-remove-${e.id}`,
|
|
4879
|
-
children: /* @__PURE__ */ J(
|
|
4873
|
+
children: /* @__PURE__ */ J(Ae, { className: "h-3.5 w-3.5" })
|
|
4880
4874
|
})
|
|
4881
4875
|
]
|
|
4882
4876
|
})]
|
|
@@ -4905,7 +4899,7 @@ function _n({ widget: e, readOnly: t, onChange: n, onClose: r }) {
|
|
|
4905
4899
|
onClick: r,
|
|
4906
4900
|
className: "rounded p-0.5 text-gray-400 hover:text-gray-600",
|
|
4907
4901
|
"aria-label": "Close",
|
|
4908
|
-
children: /* @__PURE__ */ J(
|
|
4902
|
+
children: /* @__PURE__ */ J(Le, { className: "h-4 w-4" })
|
|
4909
4903
|
})]
|
|
4910
4904
|
}),
|
|
4911
4905
|
/* @__PURE__ */ Y("div", {
|
|
@@ -4918,13 +4912,12 @@ function _n({ widget: e, readOnly: t, onChange: n, onClose: r }) {
|
|
|
4918
4912
|
id: "widget-title",
|
|
4919
4913
|
"data-testid": "widget-prop-title",
|
|
4920
4914
|
type: "text",
|
|
4921
|
-
value:
|
|
4915
|
+
value: o,
|
|
4922
4916
|
onChange: (t) => {
|
|
4923
|
-
hn(e.title
|
|
4917
|
+
n({ title: hn(e.title, a, t.target.value) });
|
|
4924
4918
|
},
|
|
4925
|
-
readOnly: !hn(e.title),
|
|
4926
4919
|
disabled: t,
|
|
4927
|
-
className: "block w-full rounded-md border border-gray-300 px-2.5 py-1.5 text-sm outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 disabled:bg-gray-50
|
|
4920
|
+
className: "block w-full rounded-md border border-gray-300 px-2.5 py-1.5 text-sm outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 disabled:bg-gray-50"
|
|
4928
4921
|
})]
|
|
4929
4922
|
}),
|
|
4930
4923
|
/* @__PURE__ */ Y("div", {
|
|
@@ -4937,7 +4930,10 @@ function _n({ widget: e, readOnly: t, onChange: n, onClose: r }) {
|
|
|
4937
4930
|
id: "widget-type",
|
|
4938
4931
|
"data-testid": "widget-prop-type",
|
|
4939
4932
|
value: e.type ?? "metric",
|
|
4940
|
-
onChange: (e) =>
|
|
4933
|
+
onChange: (e) => {
|
|
4934
|
+
let t = dn.find((t) => t.type === e.target.value);
|
|
4935
|
+
t && n({ type: t.type });
|
|
4936
|
+
},
|
|
4941
4937
|
disabled: t,
|
|
4942
4938
|
className: "block w-full rounded-md border border-gray-300 px-2.5 py-1.5 text-sm outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 disabled:bg-gray-50",
|
|
4943
4939
|
children: dn.map((e) => /* @__PURE__ */ J("option", {
|
|
@@ -5238,7 +5234,7 @@ function yn({ schema: e, onChange: t, readOnly: n = !1, className: r, onExport:
|
|
|
5238
5234
|
disabled: !C,
|
|
5239
5235
|
className: "rounded p-1.5 text-gray-400 hover:text-gray-700 disabled:opacity-30",
|
|
5240
5236
|
"aria-label": f("appDesigner.undo"),
|
|
5241
|
-
children: /* @__PURE__ */ J(
|
|
5237
|
+
children: /* @__PURE__ */ J(Ne, { className: "h-4 w-4" })
|
|
5242
5238
|
}), /* @__PURE__ */ J("button", {
|
|
5243
5239
|
type: "button",
|
|
5244
5240
|
"data-testid": "dashboard-redo",
|
|
@@ -5246,7 +5242,7 @@ function yn({ schema: e, onChange: t, readOnly: n = !1, className: r, onExport:
|
|
|
5246
5242
|
disabled: !w,
|
|
5247
5243
|
className: "rounded p-1.5 text-gray-400 hover:text-gray-700 disabled:opacity-30",
|
|
5248
5244
|
"aria-label": f("appDesigner.redo"),
|
|
5249
|
-
children: /* @__PURE__ */ J(
|
|
5245
|
+
children: /* @__PURE__ */ J(xe, { className: "h-4 w-4" })
|
|
5250
5246
|
})] }),
|
|
5251
5247
|
/* @__PURE__ */ J("button", {
|
|
5252
5248
|
type: "button",
|
|
@@ -5262,7 +5258,7 @@ function yn({ schema: e, onChange: t, readOnly: n = !1, className: r, onExport:
|
|
|
5262
5258
|
onClick: z,
|
|
5263
5259
|
className: "rounded p-1.5 text-gray-400 hover:text-gray-700",
|
|
5264
5260
|
"aria-label": f("appDesigner.navImportSchema"),
|
|
5265
|
-
children: /* @__PURE__ */ J(
|
|
5261
|
+
children: /* @__PURE__ */ J(Pe, { className: "h-4 w-4" })
|
|
5266
5262
|
}),
|
|
5267
5263
|
/* @__PURE__ */ J("button", {
|
|
5268
5264
|
type: "button",
|
|
@@ -5458,7 +5454,7 @@ function Sn({ branding: e, onChange: t, appTitle: n = "My App", readOnly: r = !1
|
|
|
5458
5454
|
disabled: !g || r,
|
|
5459
5455
|
className: $("inline-flex items-center gap-1 rounded-md border px-2.5 py-1.5 text-xs font-medium shadow-sm transition-colors", g && !r ? "border-gray-300 bg-white text-gray-700 hover:bg-gray-50" : "border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed"),
|
|
5460
5456
|
title: d("appDesigner.undo"),
|
|
5461
|
-
children: [/* @__PURE__ */ J(
|
|
5457
|
+
children: [/* @__PURE__ */ J(Ne, { className: "h-3.5 w-3.5" }), d("appDesigner.undo")]
|
|
5462
5458
|
}),
|
|
5463
5459
|
/* @__PURE__ */ Y("button", {
|
|
5464
5460
|
"data-testid": "branding-redo",
|
|
@@ -5467,7 +5463,7 @@ function Sn({ branding: e, onChange: t, appTitle: n = "My App", readOnly: r = !1
|
|
|
5467
5463
|
disabled: !_ || r,
|
|
5468
5464
|
className: $("inline-flex items-center gap-1 rounded-md border px-2.5 py-1.5 text-xs font-medium shadow-sm transition-colors", _ && !r ? "border-gray-300 bg-white text-gray-700 hover:bg-gray-50" : "border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed"),
|
|
5469
5465
|
title: d("appDesigner.redo"),
|
|
5470
|
-
children: [/* @__PURE__ */ J(
|
|
5466
|
+
children: [/* @__PURE__ */ J(xe, { className: "h-3.5 w-3.5" }), d("appDesigner.redo")]
|
|
5471
5467
|
}),
|
|
5472
5468
|
/* @__PURE__ */ Y("button", {
|
|
5473
5469
|
"data-testid": "branding-export",
|
|
@@ -5484,7 +5480,7 @@ function Sn({ branding: e, onChange: t, appTitle: n = "My App", readOnly: r = !1
|
|
|
5484
5480
|
disabled: r,
|
|
5485
5481
|
className: $("inline-flex items-center gap-1 rounded-md border px-2.5 py-1.5 text-xs font-medium shadow-sm transition-colors", r ? "border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed" : "border-gray-300 bg-white text-gray-700 hover:bg-gray-50"),
|
|
5486
5482
|
title: d("appDesigner.brandingImport"),
|
|
5487
|
-
children: [/* @__PURE__ */ J(
|
|
5483
|
+
children: [/* @__PURE__ */ J(Pe, { className: "h-3.5 w-3.5" }), d("appDesigner.brandingImport")]
|
|
5488
5484
|
})
|
|
5489
5485
|
]
|
|
5490
5486
|
}), /* @__PURE__ */ Y("div", {
|
|
@@ -5524,7 +5520,7 @@ function Sn({ branding: e, onChange: t, appTitle: n = "My App", readOnly: r = !1
|
|
|
5524
5520
|
className: "flex items-center gap-2",
|
|
5525
5521
|
children: [/* @__PURE__ */ Y("div", {
|
|
5526
5522
|
className: "relative flex-1",
|
|
5527
|
-
children: [/* @__PURE__ */ J(
|
|
5523
|
+
children: [/* @__PURE__ */ J(fe, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-gray-400" }), /* @__PURE__ */ J("input", {
|
|
5528
5524
|
id: "be-color",
|
|
5529
5525
|
"data-testid": "branding-color-input",
|
|
5530
5526
|
type: "text",
|
|
@@ -5592,7 +5588,7 @@ function Sn({ branding: e, onChange: t, appTitle: n = "My App", readOnly: r = !1
|
|
|
5592
5588
|
children: d("appDesigner.fontFamily")
|
|
5593
5589
|
}), /* @__PURE__ */ Y("div", {
|
|
5594
5590
|
className: "relative",
|
|
5595
|
-
children: [/* @__PURE__ */ J(
|
|
5591
|
+
children: [/* @__PURE__ */ J(Me, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-gray-400" }), /* @__PURE__ */ Y("select", {
|
|
5596
5592
|
id: "be-font",
|
|
5597
5593
|
"data-testid": "branding-font-select",
|
|
5598
5594
|
value: m.fontFamily ?? "",
|
|
@@ -5626,7 +5622,7 @@ function Sn({ branding: e, onChange: t, appTitle: n = "My App", readOnly: r = !1
|
|
|
5626
5622
|
type: "button",
|
|
5627
5623
|
onClick: () => p("light"),
|
|
5628
5624
|
className: $("inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium transition-colors", f === "light" ? "bg-blue-50 text-blue-700" : "bg-white text-gray-600 hover:bg-gray-50"),
|
|
5629
|
-
children: [/* @__PURE__ */ J(
|
|
5625
|
+
children: [/* @__PURE__ */ J(De, { className: "h-3.5 w-3.5" }), d("appDesigner.modeLight")]
|
|
5630
5626
|
}), /* @__PURE__ */ Y("button", {
|
|
5631
5627
|
"data-testid": "branding-mode-dark",
|
|
5632
5628
|
type: "button",
|
|
@@ -6002,7 +5998,7 @@ function Dn(...e) {
|
|
|
6002
5998
|
var On = {
|
|
6003
5999
|
text: {
|
|
6004
6000
|
label: "Text",
|
|
6005
|
-
Icon:
|
|
6001
|
+
Icon: Me
|
|
6006
6002
|
},
|
|
6007
6003
|
textarea: {
|
|
6008
6004
|
label: "Text Area",
|
|
@@ -6014,7 +6010,7 @@ var On = {
|
|
|
6014
6010
|
},
|
|
6015
6011
|
boolean: {
|
|
6016
6012
|
label: "Checkbox",
|
|
6017
|
-
Icon:
|
|
6013
|
+
Icon: ke
|
|
6018
6014
|
},
|
|
6019
6015
|
date: {
|
|
6020
6016
|
label: "Date",
|
|
@@ -6030,7 +6026,7 @@ var On = {
|
|
|
6030
6026
|
},
|
|
6031
6027
|
select: {
|
|
6032
6028
|
label: "Picklist",
|
|
6033
|
-
Icon:
|
|
6029
|
+
Icon: oe
|
|
6034
6030
|
},
|
|
6035
6031
|
email: {
|
|
6036
6032
|
label: "Email",
|
|
@@ -6038,7 +6034,7 @@ var On = {
|
|
|
6038
6034
|
},
|
|
6039
6035
|
phone: {
|
|
6040
6036
|
label: "Phone",
|
|
6041
|
-
Icon:
|
|
6037
|
+
Icon: W
|
|
6042
6038
|
},
|
|
6043
6039
|
url: {
|
|
6044
6040
|
label: "URL",
|
|
@@ -6046,7 +6042,7 @@ var On = {
|
|
|
6046
6042
|
},
|
|
6047
6043
|
password: {
|
|
6048
6044
|
label: "Password",
|
|
6049
|
-
Icon:
|
|
6045
|
+
Icon: V
|
|
6050
6046
|
},
|
|
6051
6047
|
currency: {
|
|
6052
6048
|
label: "Currency",
|
|
@@ -6086,7 +6082,7 @@ var On = {
|
|
|
6086
6082
|
},
|
|
6087
6083
|
color: {
|
|
6088
6084
|
label: "Color",
|
|
6089
|
-
Icon:
|
|
6085
|
+
Icon: fe
|
|
6090
6086
|
},
|
|
6091
6087
|
code: {
|
|
6092
6088
|
label: "Code",
|
|
@@ -6102,11 +6098,11 @@ var On = {
|
|
|
6102
6098
|
},
|
|
6103
6099
|
rating: {
|
|
6104
6100
|
label: "Rating",
|
|
6105
|
-
Icon:
|
|
6101
|
+
Icon: Ee
|
|
6106
6102
|
},
|
|
6107
6103
|
slider: {
|
|
6108
6104
|
label: "Slider",
|
|
6109
|
-
Icon:
|
|
6105
|
+
Icon: we
|
|
6110
6106
|
}
|
|
6111
6107
|
}, kn = {
|
|
6112
6108
|
text: [
|
|
@@ -6224,7 +6220,6 @@ function jn({ objectName: e, fields: n, onFieldsChange: r, readOnly: a = !1, cla
|
|
|
6224
6220
|
unique: e.unique === !0,
|
|
6225
6221
|
readonly: e.readonly === !0,
|
|
6226
6222
|
hidden: e.hidden === !0,
|
|
6227
|
-
indexed: e.indexed === !0,
|
|
6228
6223
|
externalId: e.externalId === !0,
|
|
6229
6224
|
trackHistory: e.trackHistory === !0,
|
|
6230
6225
|
defaultValue: e.defaultValue ? String(e.defaultValue) : void 0,
|
|
@@ -6245,7 +6240,6 @@ function jn({ objectName: e, fields: n, onFieldsChange: r, readOnly: a = !1, cla
|
|
|
6245
6240
|
unique: e.unique === !0,
|
|
6246
6241
|
readonly: e.readonly === !0,
|
|
6247
6242
|
hidden: e.hidden === !0,
|
|
6248
|
-
indexed: e.indexed === !0,
|
|
6249
6243
|
externalId: e.externalId === !0,
|
|
6250
6244
|
trackHistory: e.trackHistory === !0,
|
|
6251
6245
|
defaultValue: e.defaultValue ? String(e.defaultValue) : void 0,
|
|
@@ -6378,12 +6372,6 @@ function jn({ objectName: e, fields: n, onFieldsChange: r, readOnly: a = !1, cla
|
|
|
6378
6372
|
collapsible: !0,
|
|
6379
6373
|
collapsed: !0,
|
|
6380
6374
|
fields: [
|
|
6381
|
-
{
|
|
6382
|
-
name: "indexed",
|
|
6383
|
-
label: c("appDesigner.fieldDesigner.indexed"),
|
|
6384
|
-
type: "boolean",
|
|
6385
|
-
disabled: a
|
|
6386
|
-
},
|
|
6387
6375
|
{
|
|
6388
6376
|
name: "externalId",
|
|
6389
6377
|
label: c("appDesigner.fieldDesigner.externalId"),
|
|
@@ -6421,7 +6409,6 @@ function jn({ objectName: e, fields: n, onFieldsChange: r, readOnly: a = !1, cla
|
|
|
6421
6409
|
unique: p.unique || !1,
|
|
6422
6410
|
readonly: p.readonly || !1,
|
|
6423
6411
|
hidden: p.hidden || !1,
|
|
6424
|
-
indexed: p.indexed || !1,
|
|
6425
6412
|
externalId: p.externalId || !1,
|
|
6426
6413
|
trackHistory: p.trackHistory || !1,
|
|
6427
6414
|
defaultValue: p.defaultValue == null ? "" : String(p.defaultValue),
|
|
@@ -6548,7 +6535,7 @@ function Nn({ versions: e, onRestore: t, className: n }) {
|
|
|
6548
6535
|
/* @__PURE__ */ Y("div", {
|
|
6549
6536
|
className: "flex items-center gap-2 mt-1 text-[0.65rem] text-muted-foreground/70",
|
|
6550
6537
|
children: [
|
|
6551
|
-
/* @__PURE__ */ J(
|
|
6538
|
+
/* @__PURE__ */ J(Fe, { className: "h-2.5 w-2.5" }),
|
|
6552
6539
|
/* @__PURE__ */ J("span", { children: e.userName }),
|
|
6553
6540
|
/* @__PURE__ */ J(x, { className: "h-2.5 w-2.5 ml-1" }),
|
|
6554
6541
|
/* @__PURE__ */ J("span", { children: new Date(e.timestamp).toLocaleString() })
|
|
@@ -6571,7 +6558,7 @@ function Nn({ versions: e, onRestore: t, className: n }) {
|
|
|
6571
6558
|
//#region src/pages/CreateAppPage.tsx
|
|
6572
6559
|
var Pn = "objectui-app-wizard-draft";
|
|
6573
6560
|
function Fn() {
|
|
6574
|
-
let e = $e(), { appName: t } = et(), { objects: n, refresh: r } =
|
|
6561
|
+
let e = $e(), { appName: t } = et(), { objects: n, refresh: r } = Ke(), a = Ge(), o = (n || []).map((e) => ({
|
|
6575
6562
|
name: e.name,
|
|
6576
6563
|
label: e.label || e.name,
|
|
6577
6564
|
pluralLabel: e.pluralLabel,
|
|
@@ -6584,7 +6571,7 @@ function Fn() {
|
|
|
6584
6571
|
} catch {}
|
|
6585
6572
|
}, []), c = i(async (t) => {
|
|
6586
6573
|
try {
|
|
6587
|
-
let n =
|
|
6574
|
+
let n = Ue(t), i = a?.getClient();
|
|
6588
6575
|
i && await i.meta.saveItem("app", t.name, n), localStorage.removeItem(Pn), tt.success(`Application "${t.title}" created successfully`), await r?.(), e(`/apps/${t.name}`);
|
|
6589
6576
|
} catch (e) {
|
|
6590
6577
|
tt.error(e?.message || "Failed to create application");
|
|
@@ -6615,7 +6602,7 @@ function Fn() {
|
|
|
6615
6602
|
//#endregion
|
|
6616
6603
|
//#region src/pages/EditAppPage.tsx
|
|
6617
6604
|
function In() {
|
|
6618
|
-
let e = $e(), { appName: t, editAppName: n } = et(), { apps: r, objects: a, refresh: o } =
|
|
6605
|
+
let e = $e(), { appName: t, editAppName: n } = et(), { apps: r, objects: a, refresh: o } = Ke(), c = Ge(), l = n || t, u = r.find((e) => e.name === l), d = (a || []).map((e) => ({
|
|
6619
6606
|
name: e.name,
|
|
6620
6607
|
label: e.label || e.name,
|
|
6621
6608
|
pluralLabel: e.pluralLabel,
|
|
@@ -6637,7 +6624,7 @@ function In() {
|
|
|
6637
6624
|
};
|
|
6638
6625
|
}, [u]), p = i(async (t) => {
|
|
6639
6626
|
try {
|
|
6640
|
-
let n =
|
|
6627
|
+
let n = Ue(t), r = {
|
|
6641
6628
|
...u,
|
|
6642
6629
|
...n
|
|
6643
6630
|
}, i = c?.getClient();
|
|
@@ -6683,7 +6670,7 @@ function In() {
|
|
|
6683
6670
|
//#endregion
|
|
6684
6671
|
//#region src/pages/DashboardDesignPage.tsx
|
|
6685
6672
|
function Ln() {
|
|
6686
|
-
let e = $e(), { dashboardName: t } = et(), n =
|
|
6673
|
+
let e = $e(), { dashboardName: t } = et(), n = Ge(), { dashboards: r, refresh: a } = Ke(), s = r?.find((e) => e.name === t), [u, f] = l(() => He(s) || {
|
|
6687
6674
|
type: "dashboard",
|
|
6688
6675
|
name: t ?? "",
|
|
6689
6676
|
title: t ?? "",
|
|
@@ -6701,7 +6688,7 @@ function Ln() {
|
|
|
6701
6688
|
t,
|
|
6702
6689
|
a
|
|
6703
6690
|
]), h = i(async (e) => {
|
|
6704
|
-
let t =
|
|
6691
|
+
let t = He(e);
|
|
6705
6692
|
f(t), await m(t);
|
|
6706
6693
|
}, [m]);
|
|
6707
6694
|
o(() => {
|
|
@@ -6864,7 +6851,7 @@ function zn({ client: e, clientConfig: t, hideSystemObjects: n = !1, readOnly: r
|
|
|
6864
6851
|
}
|
|
6865
6852
|
//#endregion
|
|
6866
6853
|
//#region src/MetadataFieldsPage.tsx
|
|
6867
|
-
var Bn = new Set(
|
|
6854
|
+
var Bn = new Set(Be);
|
|
6868
6855
|
function Vn(e) {
|
|
6869
6856
|
return e && Bn.has(e) ? e : "text";
|
|
6870
6857
|
}
|
|
@@ -6885,14 +6872,20 @@ function Hn(e, t) {
|
|
|
6885
6872
|
isSystem: t.isSystem,
|
|
6886
6873
|
externalId: t.externalId,
|
|
6887
6874
|
trackHistory: t.trackHistory,
|
|
6888
|
-
indexed: t.indexed,
|
|
6889
6875
|
referenceTo: t.referenceTo,
|
|
6890
6876
|
formula: t.formula
|
|
6891
6877
|
};
|
|
6892
6878
|
}
|
|
6893
|
-
|
|
6879
|
+
var Un = ["indexed"];
|
|
6880
|
+
function Wn(e) {
|
|
6881
|
+
if (!e) return {};
|
|
6882
|
+
let t = { ...e };
|
|
6883
|
+
for (let e of Un) delete t[e];
|
|
6884
|
+
return t;
|
|
6885
|
+
}
|
|
6886
|
+
function Gn(e, t) {
|
|
6894
6887
|
return {
|
|
6895
|
-
...t
|
|
6888
|
+
...Wn(t),
|
|
6896
6889
|
type: e.type,
|
|
6897
6890
|
label: e.label,
|
|
6898
6891
|
description: e.description,
|
|
@@ -6903,14 +6896,13 @@ function Un(e, t) {
|
|
|
6903
6896
|
defaultValue: e.defaultValue,
|
|
6904
6897
|
placeholder: e.placeholder,
|
|
6905
6898
|
group: e.group,
|
|
6906
|
-
indexed: e.indexed,
|
|
6907
6899
|
externalId: e.externalId,
|
|
6908
6900
|
trackHistory: e.trackHistory,
|
|
6909
6901
|
referenceTo: e.referenceTo,
|
|
6910
6902
|
formula: e.formula
|
|
6911
6903
|
};
|
|
6912
6904
|
}
|
|
6913
|
-
function
|
|
6905
|
+
function Kn({ objectName: e, client: t, clientConfig: n, readOnly: r = !1, className: a }) {
|
|
6914
6906
|
let c = s(() => {
|
|
6915
6907
|
if (t) return t;
|
|
6916
6908
|
if (!n) throw Error("MetadataFieldsPage: provide either `client` or `clientConfig`.");
|
|
@@ -6954,7 +6946,7 @@ function Wn({ objectName: e, client: t, clientConfig: n, readOnly: r = !1, class
|
|
|
6954
6946
|
let p = s(() => u.raw?.fields ? Object.entries(u.raw.fields).map(([e, t]) => Hn(e, t)) : [], [u.raw]), m = i(async (t) => {
|
|
6955
6947
|
if (!u.raw) return;
|
|
6956
6948
|
let n = u.raw.fields ?? {}, r = {};
|
|
6957
|
-
for (let e of t) r[e.name] =
|
|
6949
|
+
for (let e of t) r[e.name] = Gn(e, n[e.name]);
|
|
6958
6950
|
let i = {
|
|
6959
6951
|
...u.raw,
|
|
6960
6952
|
fields: r
|
|
@@ -7262,4 +7254,4 @@ e.register("page-designer", St, {
|
|
|
7262
7254
|
]
|
|
7263
7255
|
});
|
|
7264
7256
|
//#endregion
|
|
7265
|
-
export { Xt as AppCreationWizard, Sn as BrandingEditor, vt as CollaborationProvider, ut as ConfirmDialog, bt as ConnectionStatusIndicator, Fn as CreateAppPage, Rt as DESIGNER_DEFAULT_TRANSLATIONS, Ln as DashboardDesignPage, yn as DashboardEditor, Ot as DataModelDesigner, In as EditAppPage, ln as EditorModeToggle, jn as FieldDesigner,
|
|
7257
|
+
export { Xt as AppCreationWizard, Sn as BrandingEditor, vt as CollaborationProvider, ut as ConfirmDialog, bt as ConnectionStatusIndicator, Fn as CreateAppPage, Rt as DESIGNER_DEFAULT_TRANSLATIONS, Ln as DashboardDesignPage, yn as DashboardEditor, Ot as DataModelDesigner, In as EditAppPage, ln as EditorModeToggle, jn as FieldDesigner, Kn as MetadataFieldsPage, zn as MetadataObjectsPage, ht as Minimap, on as NavigationDesigner, En as ObjectManager, St as PageDesigner, Nt as ProcessDesigner, ft as PropertyEditor, Lt as ReportDesigner, Nn as VersionHistory, ct as useCanvasPanZoom, st as useClipboard, at as useConfirmDialog, wt as useDesignerHistory, ot as useMultiSelect, it as useUndoRedo };
|