@industry-theme/principal-view-panels 0.1.2 → 0.1.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.
@@ -5304,8 +5304,23 @@ class CanvasConverter {
5304
5304
  var _a, _b;
5305
5305
  const pv = node.pv;
5306
5306
  const color = resolveCanvasColor(node.color);
5307
+ let nodeName;
5308
+ switch (node.type) {
5309
+ case "text":
5310
+ nodeName = node.text.split("\n")[0].replace(/^#+ /, "").substring(0, 50);
5311
+ break;
5312
+ case "file":
5313
+ nodeName = node.file.split("/").pop() || node.file;
5314
+ break;
5315
+ case "link":
5316
+ nodeName = node.url;
5317
+ break;
5318
+ case "group":
5319
+ nodeName = node.label || "Group";
5320
+ break;
5321
+ }
5307
5322
  const data = {
5308
- label: this.getNodeLabel(node),
5323
+ name: nodeName,
5309
5324
  nodeType: (pv == null ? void 0 : pv.nodeType) || node.id,
5310
5325
  canvasType: node.type,
5311
5326
  shape: (pv == null ? void 0 : pv.shape) || "rectangle",
@@ -5320,8 +5335,6 @@ class CanvasConverter {
5320
5335
  data.file = node.file;
5321
5336
  } else if (node.type === "link") {
5322
5337
  data.url = node.url;
5323
- } else if (node.type === "group") {
5324
- data.label = node.label || data.label;
5325
5338
  }
5326
5339
  if (pv) {
5327
5340
  data.states = pv.states;
@@ -5342,26 +5355,6 @@ class CanvasConverter {
5342
5355
  }
5343
5356
  };
5344
5357
  }
5345
- /**
5346
- * Get display label for a node
5347
- */
5348
- static getNodeLabel(node) {
5349
- var _a;
5350
- if ((_a = node.pv) == null ? void 0 : _a.nodeType) {
5351
- return node.pv.nodeType;
5352
- }
5353
- switch (node.type) {
5354
- case "text":
5355
- const firstLine = node.text.split("\n")[0];
5356
- return firstLine.replace(/^#+ /, "").substring(0, 50);
5357
- case "file":
5358
- return node.file.split("/").pop() || node.file;
5359
- case "link":
5360
- return node.url;
5361
- case "group":
5362
- return node.label || "Group";
5363
- }
5364
- }
5365
5358
  /**
5366
5359
  * Convert a single canvas edge to React Flow edge
5367
5360
  */
@@ -5411,11 +5404,27 @@ class CanvasConverter {
5411
5404
  if (canvas.nodes) {
5412
5405
  for (const node of canvas.nodes) {
5413
5406
  const pv = node.pv;
5407
+ let nodeName;
5408
+ switch (node.type) {
5409
+ case "text":
5410
+ nodeName = node.text.split("\n")[0].replace(/^#+ /, "").substring(0, 50);
5411
+ break;
5412
+ case "file":
5413
+ nodeName = node.file.split("/").pop() || node.file;
5414
+ break;
5415
+ case "link":
5416
+ nodeName = node.url;
5417
+ break;
5418
+ case "group":
5419
+ nodeName = node.label || "Group";
5420
+ break;
5421
+ }
5414
5422
  nodes.push({
5415
5423
  id: node.id,
5416
5424
  type: (pv == null ? void 0 : pv.nodeType) || node.type,
5417
5425
  data: {
5418
- label: this.getNodeLabel(node),
5426
+ name: nodeName,
5427
+ description: pv == null ? void 0 : pv.description,
5419
5428
  shape: (pv == null ? void 0 : pv.shape) || "rectangle",
5420
5429
  icon: pv == null ? void 0 : pv.icon,
5421
5430
  // Color priority: pv.fill > node.color
@@ -45053,7 +45062,7 @@ function requireCustomNode() {
45053
45062
  const react_1 = /* @__PURE__ */ requireUmd();
45054
45063
  const iconResolver_1 = requireIconResolver();
45055
45064
  const CustomNode$1 = ({ data, selected }) => {
45056
- var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o2;
45065
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2;
45057
45066
  const nodeProps = data;
45058
45067
  const { typeDefinition, state, hasViolations, data: nodeData, animationType, animationDuration = 1e3, editable = false } = nodeProps;
45059
45068
  if (!typeDefinition) {
@@ -45067,9 +45076,8 @@ function requireCustomNode() {
45067
45076
  const nodeDataStroke = nodeData.stroke;
45068
45077
  const strokeColor = nodeDataStroke || typeDefinition.stroke || fillColor;
45069
45078
  const color = fillColor;
45070
- const labelField = (_d = Object.entries(typeDefinition.dataSchema).find(([, schema2]) => schema2.displayInLabel)) == null ? void 0 : _d[0];
45071
- const displayLabel = labelField && nodeData[labelField] ? String(nodeData[labelField]) : nodeProps.label;
45072
- const icon = nodeData.icon || state && (((_e2 = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _e2.icon) || ((_g = (_f = typeDefinition.states) == null ? void 0 : _f[state]) == null ? void 0 : _g.icon)) || typeDefinition.icon;
45079
+ const displayName = nodeProps.name;
45080
+ const icon = nodeData.icon || state && (((_d = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _d.icon) || ((_f = (_e2 = typeDefinition.states) == null ? void 0 : _e2[state]) == null ? void 0 : _f.icon)) || typeDefinition.icon;
45073
45081
  const getAnimationClass = () => {
45074
45082
  switch (animationType) {
45075
45083
  case "pulse":
@@ -45153,8 +45161,8 @@ function requireCustomNode() {
45153
45161
  position: "relative",
45154
45162
  clipPath: hexagonClipPath,
45155
45163
  backgroundColor: hasViolations ? "#D0021B" : strokeColor,
45156
- width: ((_h = typeDefinition.size) == null ? void 0 : _h.width) || 120,
45157
- height: ((_i = typeDefinition.size) == null ? void 0 : _i.height) || 120,
45164
+ width: ((_g = typeDefinition.size) == null ? void 0 : _g.width) || 120,
45165
+ height: ((_h = typeDefinition.size) == null ? void 0 : _h.height) || 120,
45158
45166
  boxShadow: selected ? `0 0 0 2px ${strokeColor}` : "0 2px 4px rgba(0,0,0,0.1)",
45159
45167
  transition: "all 0.2s ease"
45160
45168
  } : {};
@@ -45212,25 +45220,25 @@ function requireCustomNode() {
45212
45220
  }
45213
45221
  return offsetStyle;
45214
45222
  };
45215
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Top, id: "top", style: getHandleStyle("top") }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Left, id: "left", style: getHandleStyle("left") }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Right, id: "right", style: getHandleStyle("right") }), isHexagon ? (0, jsx_runtime_1.jsx)("div", { style: hexagonBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: hexagonInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayLabel }), state && (0, jsx_runtime_1.jsx)("div", { style: {
45223
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Top, id: "top", style: getHandleStyle("top") }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Left, id: "left", style: getHandleStyle("left") }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Right, id: "right", style: getHandleStyle("right") }), isHexagon ? (0, jsx_runtime_1.jsx)("div", { style: hexagonBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: hexagonInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
45216
45224
  fontSize: "10px",
45217
45225
  backgroundColor: color,
45218
45226
  color: "white",
45219
45227
  padding: "2px 6px",
45220
45228
  borderRadius: "4px",
45221
45229
  textAlign: "center"
45222
- }, children: ((_j = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _j.label) || ((_l = (_k = typeDefinition.states) == null ? void 0 : _k[state]) == null ? void 0 : _l.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
45230
+ }, children: ((_i = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _i.label) || ((_k = (_j = typeDefinition.states) == null ? void 0 : _j[state]) == null ? void 0 : _k.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
45223
45231
  fontSize: "10px",
45224
45232
  color: "#D0021B",
45225
45233
  fontWeight: "bold"
45226
- }, children: "⚠️" })] }) }) : (0, jsx_runtime_1.jsx)("div", { style: getShapeStyles(), className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: isDiamond ? { transform: "rotate(-45deg)" } : {}, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayLabel }), state && (0, jsx_runtime_1.jsx)("div", { style: {
45234
+ }, children: "⚠️" })] }) }) : (0, jsx_runtime_1.jsx)("div", { style: getShapeStyles(), className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: isDiamond ? { transform: "rotate(-45deg)" } : {}, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
45227
45235
  fontSize: "10px",
45228
45236
  backgroundColor: color,
45229
45237
  color: "white",
45230
45238
  padding: "2px 6px",
45231
45239
  borderRadius: "4px",
45232
45240
  textAlign: "center"
45233
- }, children: ((_m = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _m.label) || ((_o2 = (_n2 = typeDefinition.states) == null ? void 0 : _n2[state]) == null ? void 0 : _o2.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
45241
+ }, children: ((_l = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _l.label) || ((_n2 = (_m = typeDefinition.states) == null ? void 0 : _m[state]) == null ? void 0 : _n2.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
45234
45242
  fontSize: "10px",
45235
45243
  color: "#D0021B",
45236
45244
  fontWeight: "bold"
@@ -45540,7 +45548,7 @@ function requireGraphConverter() {
45540
45548
  type: "custom",
45541
45549
  position: node.position || { x: 0, y: 0 },
45542
45550
  data: {
45543
- label: node.id,
45551
+ name: node.data.name || node.id,
45544
45552
  typeDefinition,
45545
45553
  state: node.state,
45546
45554
  hasViolations,
@@ -45814,20 +45822,13 @@ function requireNodeInfoPanel() {
45814
45822
  "GitPullRequest"
45815
45823
  ];
45816
45824
  const NodeInfoPanel$1 = ({ node, typeDefinition, availableNodeTypes, onClose, onDelete, onUpdate }) => {
45817
- var _a, _b, _c, _d, _e2, _f, _g;
45825
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i;
45818
45826
  const color = (typeDefinition == null ? void 0 : typeDefinition.color) || "#888";
45819
45827
  const canEdit = Boolean(onUpdate);
45820
- const [editingName, setEditingName] = (0, react_1.useState)(false);
45821
- const [nameValue, setNameValue] = (0, react_1.useState)("");
45822
45828
  const [showIconPicker, setShowIconPicker] = (0, react_1.useState)(false);
45829
+ const [showDetails, setShowDetails] = (0, react_1.useState)(false);
45823
45830
  const currentIcon = ((_a = node.data) == null ? void 0 : _a.icon) || (typeDefinition == null ? void 0 : typeDefinition.icon);
45824
45831
  const nameField = (typeDefinition == null ? void 0 : typeDefinition.dataSchema) ? (_b = Object.entries(typeDefinition.dataSchema).find(([, schema2]) => schema2.displayInLabel)) == null ? void 0 : _b[0] : null;
45825
- (0, react_1.useEffect)(() => {
45826
- var _a2;
45827
- if (nameField && ((_a2 = node.data) == null ? void 0 : _a2[nameField])) {
45828
- setNameValue(String(node.data[nameField]));
45829
- }
45830
- }, [node.id, nameField, node.data]);
45831
45832
  const displayFields = (typeDefinition == null ? void 0 : typeDefinition.dataSchema) ? Object.entries(typeDefinition.dataSchema).filter(([, schema2]) => schema2.displayInLabel).map(([field]) => {
45832
45833
  var _a2;
45833
45834
  return {
@@ -45837,16 +45838,8 @@ function requireNodeInfoPanel() {
45837
45838
  };
45838
45839
  }) : [];
45839
45840
  const hasSchemaFields = displayFields.length > 0;
45840
- const nodeDataEntries = node.data ? Object.entries(node.data).filter(([key]) => key !== "icon") : [];
45841
- const handleNameSave = () => {
45842
- var _a2;
45843
- if (onUpdate && nameField && nameValue !== ((_a2 = node.data) == null ? void 0 : _a2[nameField])) {
45844
- onUpdate(node.id, {
45845
- data: { ...node.data, [nameField]: nameValue }
45846
- });
45847
- }
45848
- setEditingName(false);
45849
- };
45841
+ const nodeDataEntries = node.data ? Object.entries(node.data).filter(([key]) => !["icon", "name", "description", "sources"].includes(key)) : [];
45842
+ const sources = ((_c = node.data) == null ? void 0 : _c.sources) || [];
45850
45843
  const handleTypeChange = (newType) => {
45851
45844
  if (onUpdate && newType !== node.type) {
45852
45845
  onUpdate(node.id, { type: newType });
@@ -45878,7 +45871,7 @@ function requireNodeInfoPanel() {
45878
45871
  marginBottom: "12px",
45879
45872
  paddingBottom: "8px",
45880
45873
  borderBottom: `2px solid ${color}`
45881
- }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontWeight: "bold", fontSize: "14px" }, children: "Node Information" }), (0, jsx_runtime_1.jsx)("button", { onClick: onClose, style: {
45874
+ }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontWeight: "bold", fontSize: "14px" }, children: ((_d = node.data) == null ? void 0 : _d.name) || node.id }), (0, jsx_runtime_1.jsx)("button", { onClick: onClose, style: {
45882
45875
  border: "none",
45883
45876
  background: "none",
45884
45877
  cursor: "pointer",
@@ -45890,7 +45883,30 @@ function requireNodeInfoPanel() {
45890
45883
  display: "flex",
45891
45884
  alignItems: "center",
45892
45885
  justifyContent: "center"
45893
- }, children: "×" })] }), (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "4px" }, children: "Icon" }), (0, jsx_runtime_1.jsxs)("div", { style: { position: "relative" }, children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => canEdit && setShowIconPicker(!showIconPicker), disabled: !canEdit, style: {
45886
+ }, children: "×" })] }), ((_e2 = node.data) == null ? void 0 : _e2.description) && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "4px" }, children: "Description" }), (0, jsx_runtime_1.jsx)("div", { style: {
45887
+ fontSize: "12px",
45888
+ color: "#333"
45889
+ }, children: String(node.data.description) })] }), sources.length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "4px" }, children: "Sources" }), (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: sources.map((source, index2) => (0, jsx_runtime_1.jsx)("span", { style: {
45890
+ fontSize: "11px",
45891
+ padding: "2px 8px",
45892
+ backgroundColor: "#f0f0f0",
45893
+ borderRadius: "4px",
45894
+ color: "#555"
45895
+ }, children: source }, index2)) })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowDetails(!showDetails), style: {
45896
+ width: "100%",
45897
+ padding: "8px",
45898
+ backgroundColor: "#f5f5f5",
45899
+ border: "1px solid #ddd",
45900
+ borderRadius: "4px",
45901
+ cursor: "pointer",
45902
+ fontSize: "12px",
45903
+ color: "#666",
45904
+ display: "flex",
45905
+ alignItems: "center",
45906
+ justifyContent: "center",
45907
+ gap: "6px",
45908
+ marginBottom: showDetails ? "12px" : "0"
45909
+ }, children: [(0, jsx_runtime_1.jsx)("span", { style: { transform: showDetails ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s" }, children: "▼" }), showDetails ? "Hide Details" : "Show Details"] }), showDetails && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "4px" }, children: "Icon" }), (0, jsx_runtime_1.jsxs)("div", { style: { position: "relative" }, children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => canEdit && setShowIconPicker(!showIconPicker), disabled: !canEdit, style: {
45894
45910
  display: "flex",
45895
45911
  alignItems: "center",
45896
45912
  gap: "8px",
@@ -45947,38 +45963,11 @@ function requireNodeInfoPanel() {
45947
45963
  }, children: node.type })] }), node.state && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "4px" }, children: "State" }), (0, jsx_runtime_1.jsx)("div", { style: {
45948
45964
  fontSize: "12px",
45949
45965
  padding: "4px 8px",
45950
- backgroundColor: ((_d = (_c = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _c[node.state]) == null ? void 0 : _d.color) || "#888",
45966
+ backgroundColor: ((_g = (_f = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _f[node.state]) == null ? void 0 : _g.color) || "#888",
45951
45967
  color: "white",
45952
45968
  borderRadius: "4px",
45953
45969
  display: "inline-block"
45954
- }, children: ((_f = (_e2 = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _e2[node.state]) == null ? void 0 : _f.label) || node.state })] }), nameField && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "4px" }, children: "Name" }), canEdit && editingName ? (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: "4px" }, children: [(0, jsx_runtime_1.jsx)("input", { type: "text", value: nameValue, onChange: (e) => setNameValue(e.target.value), onKeyDown: (e) => {
45955
- if (e.key === "Enter")
45956
- handleNameSave();
45957
- if (e.key === "Escape")
45958
- setEditingName(false);
45959
- }, autoFocus: true, style: {
45960
- flex: 1,
45961
- fontSize: "12px",
45962
- padding: "4px 8px",
45963
- borderRadius: "4px",
45964
- border: "1px solid #4A90E2",
45965
- outline: "none"
45966
- } }), (0, jsx_runtime_1.jsx)("button", { onClick: handleNameSave, style: {
45967
- padding: "4px 8px",
45968
- backgroundColor: "#4A90E2",
45969
- color: "white",
45970
- border: "none",
45971
- borderRadius: "4px",
45972
- cursor: "pointer",
45973
- fontSize: "11px"
45974
- }, children: "Save" })] }) : (0, jsx_runtime_1.jsxs)("div", { onClick: () => canEdit && setEditingName(true), style: {
45975
- fontSize: "12px",
45976
- padding: "4px 8px",
45977
- backgroundColor: "#f5f5f5",
45978
- borderRadius: "4px",
45979
- cursor: canEdit ? "pointer" : "default",
45980
- border: canEdit ? "1px dashed #ccc" : "none"
45981
- }, title: canEdit ? "Click to edit" : void 0, children: [((_g = node.data) == null ? void 0 : _g[nameField]) ?? "-", canEdit && (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: "8px", color: "#999", fontSize: "10px" }, children: "✎" })] })] }), hasSchemaFields && displayFields.filter((f) => f.field !== nameField).length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "8px", fontWeight: "bold" }, children: "Properties" }), displayFields.filter((f) => f.field !== nameField).map(({ field, label, value }) => (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "8px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "2px" }, children: label }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px", color: "#333" }, children: value !== void 0 && value !== null ? typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) : "-" })] }, field))] }), !hasSchemaFields && nodeDataEntries.length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "8px", fontWeight: "bold" }, children: "Data" }), nodeDataEntries.map(([key, value]) => (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "8px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "2px" }, children: key }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px", color: "#333", wordBreak: "break-word" }, children: value !== void 0 && value !== null ? typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) : "-" })] }, key))] }), (0, jsx_runtime_1.jsxs)("div", { style: { fontSize: "10px", color: "#999", marginTop: "12px", paddingTop: "8px", borderTop: "1px solid #eee" }, children: ["ID: ", node.id] }), onDelete && (0, jsx_runtime_1.jsx)("button", { onClick: () => {
45970
+ }, children: ((_i = (_h = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _h[node.state]) == null ? void 0 : _i.label) || node.state })] }), hasSchemaFields && displayFields.filter((f) => f.field !== nameField).length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "8px", fontWeight: "bold" }, children: "Properties" }), displayFields.filter((f) => f.field !== nameField).map(({ field, label, value }) => (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "8px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "2px" }, children: label }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px", color: "#333" }, children: value !== void 0 && value !== null ? typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) : "-" })] }, field))] }), !hasSchemaFields && nodeDataEntries.length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "8px", fontWeight: "bold" }, children: "Data" }), nodeDataEntries.map(([key, value]) => (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "8px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: "#666", marginBottom: "2px" }, children: key }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px", color: "#333", wordBreak: "break-word" }, children: value !== void 0 && value !== null ? typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) : "-" })] }, key))] }), (0, jsx_runtime_1.jsxs)("div", { style: { fontSize: "10px", color: "#999", marginTop: "12px", paddingTop: "8px", borderTop: "1px solid #eee" }, children: ["ID: ", node.id] })] }), onDelete && (0, jsx_runtime_1.jsx)("button", { onClick: () => {
45982
45971
  onDelete(node.id);
45983
45972
  onClose();
45984
45973
  }, style: {