@arpproject/recrate 0.1.32-test3 → 0.1.32-test5

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.
@@ -67670,7 +67670,8 @@ const AiEditedFieldBadge = ({
67670
67670
  ariaLabel,
67671
67671
  variant = "edited"
67672
67672
  }) => {
67673
- const label = variant === "deleted" ? "Deleted by AI" : "Edited by AI";
67673
+ const { t: t2 } = useTranslation();
67674
+ const label = variant === "deleted" ? t2("ai_deleted_by_ai") : t2("ai_edited_by_ai");
67674
67675
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: title ?? label, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `describo-ai-edited-icon ${className}`, "aria-label": ariaLabel ?? label, children: "✦" }) });
67675
67676
  };
67676
67677
  const EntityId = ({
@@ -67680,6 +67681,7 @@ const EntityId = ({
67680
67681
  aiEditedVariant = "edited"
67681
67682
  }) => {
67682
67683
  var _a2;
67684
+ const { t: t2 } = useTranslation();
67683
67685
  const state = useStateStore();
67684
67686
  const handleSave = async (data) => {
67685
67687
  onUpdate(data);
@@ -67703,7 +67705,7 @@ const EntityId = ({
67703
67705
  type: "link",
67704
67706
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$6, {}),
67705
67707
  onClick: () => openInNewTab(entity["@id"]),
67706
- title: "Open in new tab"
67708
+ title: String(t2("open_in_new_tab"))
67707
67709
  }
67708
67710
  ),
67709
67711
  isDatasetOrFile() ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: entity["@id"] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-grow", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -67803,8 +67805,8 @@ const valueIsEmpty = (value) => {
67803
67805
  if (Array.isArray(value)) return value.length === 0;
67804
67806
  return false;
67805
67807
  };
67806
- const formatValue = (value) => {
67807
- if (valueIsEmpty(value)) return "empty";
67808
+ const formatValue = (value, emptyLabel) => {
67809
+ if (valueIsEmpty(value)) return emptyLabel;
67808
67810
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
67809
67811
  return String(value);
67810
67812
  }
@@ -67819,13 +67821,15 @@ const AiFieldDiffView = ({
67819
67821
  currentValue,
67820
67822
  operation
67821
67823
  }) => {
67824
+ const { t: t2 } = useTranslation();
67822
67825
  const isDelete = operation === "delete";
67823
- const removedValue = formatValue(previousValue);
67824
- const addedValue = isDelete ? "empty" : formatValue(currentValue);
67825
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-field-diff", "aria-label": "AI field diff", children: [
67826
+ const emptyLabel = String(t2("ai_empty_value"));
67827
+ const removedValue = formatValue(previousValue, emptyLabel);
67828
+ const addedValue = isDelete ? emptyLabel : formatValue(currentValue, emptyLabel);
67829
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-field-diff", "aria-label": String(t2("ai_field_diff_aria")), children: [
67826
67830
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-field-diff-head", children: [
67827
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isDelete ? "Proposed deletion" : "Proposed change" }),
67828
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-field-diff-chip", children: "AI edit" })
67831
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isDelete ? t2("ai_proposed_deletion") : t2("ai_proposed_change") }),
67832
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-field-diff-chip", children: t2("ai_edit_chip") })
67829
67833
  ] }),
67830
67834
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-field-diff-line describo-ai-field-diff-line-removed", children: [
67831
67835
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-field-diff-marker", children: "-" }),
@@ -67846,7 +67850,7 @@ const EntityName = ({
67846
67850
  aiReview
67847
67851
  }) => {
67848
67852
  var _a2;
67849
- const [t2, i18n] = useTranslation();
67853
+ const { t: t2 } = useTranslation();
67850
67854
  const state = useStateStore();
67851
67855
  const [showAiDiff, setShowAiDiff] = useState(false);
67852
67856
  const showAiReview = Boolean(aiReview);
@@ -67861,7 +67865,7 @@ const EntityName = ({
67861
67865
  children: [
67862
67866
  showAiReview && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-suggestion-badge", children: [
67863
67867
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-suggestion-badge-icon", children: "✦" }),
67864
- isAiDelete ? "AI delete" : "AI suggestion"
67868
+ isAiDelete ? t2("ai_delete_badge") : t2("ai_suggestion_badge")
67865
67869
  ] }),
67866
67870
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-32 w-1/3 xl:w-1/5 flex flex-col", children: [
67867
67871
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-property-name describo-property-name-with-ai", children: [
@@ -67887,33 +67891,33 @@ const EntityName = ({
67887
67891
  }
67888
67892
  ) }),
67889
67893
  showAiReview && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-actions", children: [
67890
- (aiReview == null ? void 0 : aiReview.previousValueDiffers) && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showAiDiff ? "Hide diff" : "Show diff", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
67894
+ (aiReview == null ? void 0 : aiReview.previousValueDiffers) && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showAiDiff ? t2("ai_hide_diff") : t2("ai_show_diff"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
67891
67895
  Button$1,
67892
67896
  {
67893
67897
  size: "middle",
67894
67898
  className: "describo-ai-action-diff",
67895
67899
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
67896
- "aria-label": showAiDiff ? "Hide AI diff" : "Show AI diff",
67900
+ "aria-label": showAiDiff ? String(t2("ai_hide_ai_diff_aria")) : String(t2("ai_show_ai_diff_aria")),
67897
67901
  "aria-pressed": showAiDiff,
67898
67902
  onClick: () => setShowAiDiff((visible) => !visible)
67899
67903
  }
67900
67904
  ) }),
67901
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isAiDelete ? "Approve this AI deletion" : "Approve this AI-suggested value", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
67905
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isAiDelete ? t2("ai_approve_deletion_tooltip") : t2("ai_approve_suggested_value_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
67902
67906
  Button$1,
67903
67907
  {
67904
67908
  size: "middle",
67905
67909
  className: "describo-ai-action-approve",
67906
67910
  onClick: aiReview == null ? void 0 : aiReview.onApprove,
67907
- children: isAiDelete ? "Delete" : "Accept"
67911
+ children: isAiDelete ? t2("ai_delete") : t2("ai_accept")
67908
67912
  }
67909
67913
  ) }),
67910
- (aiReview == null ? void 0 : aiReview.previousValueDiffers) && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Restore the previous value and mark this suggestion reviewed", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
67914
+ (aiReview == null ? void 0 : aiReview.previousValueDiffers) && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_restore_previous_value_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
67911
67915
  Button$1,
67912
67916
  {
67913
67917
  size: "middle",
67914
67918
  className: "describo-ai-action-reject",
67915
67919
  onClick: aiReview == null ? void 0 : aiReview.onReject,
67916
- children: isAiDelete ? "Restore" : "Reject"
67920
+ children: isAiDelete ? t2("ai_restore") : t2("ai_reject")
67917
67921
  }
67918
67922
  ) })
67919
67923
  ] })
@@ -79832,9 +79836,9 @@ const Map$1 = ({ entity, crateManager }) => {
79832
79836
  };
79833
79837
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: mapId, className: "w-[600px] h-[520px] describo-property-type-map", ref: mapRef });
79834
79838
  };
79835
- const formatEntityDiffValue = (value) => {
79836
- if (value === void 0 || value === null) return "empty";
79837
- if (Array.isArray(value)) return value.map(formatEntityDiffValue).join(", ");
79839
+ const formatEntityDiffValue = (value, emptyLabel) => {
79840
+ if (value === void 0 || value === null) return emptyLabel;
79841
+ if (Array.isArray(value)) return value.map((item) => formatEntityDiffValue(item, emptyLabel)).join(", ");
79838
79842
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
79839
79843
  return String(value);
79840
79844
  }
@@ -79854,20 +79858,21 @@ const AiEntityDiffView = ({
79854
79858
  onAccept,
79855
79859
  onReject
79856
79860
  }) => {
79861
+ const { t: t2 } = useTranslation();
79857
79862
  const isDelete = operation === "delete";
79858
79863
  const isUnlink = operation === "unlink";
79859
- const title = isDelete ? `AI deleted entity: ${entityId}` : isUnlink ? `AI unlinked entity: ${entityId}` : `AI edited entity: ${entityId}`;
79864
+ const title = isDelete ? t2("ai_deleted_entity_title", { entityId }) : isUnlink ? t2("ai_unlinked_entity_title", { entityId }) : t2("ai_edited_entity_title", { entityId });
79860
79865
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `describo-ai-entity-diff-card ${isDelete ? "describo-ai-entity-diff-card-delete" : ""} ${isUnlink ? "describo-ai-entity-diff-card-unlink" : ""}`, children: [
79861
79866
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-entity-diff-head", children: [
79862
79867
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: title }),
79863
- onClose && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Hide entity diff", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
79868
+ onClose && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_hide_entity_diff"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
79864
79869
  Button$1,
79865
79870
  {
79866
79871
  type: "text",
79867
79872
  size: "small",
79868
79873
  className: "describo-ai-entity-diff-close",
79869
79874
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$A, {}),
79870
- "aria-label": "Hide AI entity diff",
79875
+ "aria-label": String(t2("ai_hide_entity_diff_aria")),
79871
79876
  onClick: (event) => {
79872
79877
  event.stopPropagation();
79873
79878
  onClose();
@@ -79882,13 +79887,13 @@ const AiEntityDiffView = ({
79882
79887
  children: [
79883
79888
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-entity-diff-marker", children: row.kind === "removed" ? "-" : row.kind === "added" ? "+" : "" }),
79884
79889
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-entity-diff-key", children: row.label }),
79885
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-entity-diff-value", children: formatEntityDiffValue(row.value) })
79890
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-entity-diff-value", children: formatEntityDiffValue(row.value, String(t2("ai_empty_value"))) })
79886
79891
  ]
79887
79892
  },
79888
79893
  `${row.kind}-${row.propertyName}-${index2}`
79889
79894
  )) }),
79890
79895
  !readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-entity-diff-actions", children: [
79891
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isDelete ? "Approve this AI deletion" : isUnlink ? "Approve this AI unlink" : "Accept every AI edit for this entity", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
79896
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isDelete ? t2("ai_approve_deletion_tooltip") : isUnlink ? t2("ai_approve_unlink_tooltip") : t2("ai_accept_entity_edits_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
79892
79897
  Button$1,
79893
79898
  {
79894
79899
  size: "middle",
@@ -79897,10 +79902,10 @@ const AiEntityDiffView = ({
79897
79902
  event.stopPropagation();
79898
79903
  onAccept == null ? void 0 : onAccept();
79899
79904
  },
79900
- children: isDelete ? "Delete entity" : isUnlink ? "Unlink entity" : "Accept edit"
79905
+ children: isDelete ? t2("ai_delete_entity") : isUnlink ? t2("ai_unlink_entity") : t2("ai_accept_edit")
79901
79906
  }
79902
79907
  ) }),
79903
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isDelete ? "Restore this entity and mark the deletion reviewed" : isUnlink ? "Restore this link and mark the unlink reviewed" : "Restore previous values for this entity", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
79908
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isDelete ? t2("ai_restore_deleted_entity_tooltip") : isUnlink ? t2("ai_restore_link_tooltip") : t2("ai_restore_entity_values_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
79904
79909
  Button$1,
79905
79910
  {
79906
79911
  size: "middle",
@@ -79909,7 +79914,7 @@ const AiEntityDiffView = ({
79909
79914
  event.stopPropagation();
79910
79915
  onReject == null ? void 0 : onReject();
79911
79916
  },
79912
- children: isDelete ? "Keep entity" : isUnlink ? "Restore link" : "Reject edit"
79917
+ children: isDelete ? t2("ai_keep_entity") : isUnlink ? t2("ai_restore_link") : t2("ai_reject_edit")
79913
79918
  }
79914
79919
  ) })
79915
79920
  ] })
@@ -80012,6 +80017,7 @@ const DeletedLinkedEntityCard = ({
80012
80017
  onAcceptDelete,
80013
80018
  onRestore
80014
80019
  }) => {
80020
+ const { t: t2 } = useTranslation();
80015
80021
  const [showDeletedFields, setShowDeletedFields] = useState(false);
80016
80022
  const deletedDiffRows = fields.map((field) => ({
80017
80023
  kind: "removed",
@@ -80049,22 +80055,19 @@ const DeletedLinkedEntityCard = ({
80049
80055
  children: [
80050
80056
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-suggestion-badge describo-ai-entity-status-badge", children: [
80051
80057
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-suggestion-badge-icon", children: "✦" }),
80052
- "AI delete"
80058
+ t2("ai_delete_badge")
80053
80059
  ] }),
80054
80060
  /* @__PURE__ */ jsxRuntimeExports.jsx(LinkedEntityCardHeader, { entity: displayEntity }),
80055
80061
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-deleted-entity-controls", children: [
80056
80062
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-deleted-entity-summary", children: [
80057
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
80058
- fieldCount,
80059
- " fields can be restored."
80060
- ] }),
80061
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showDeletedFields ? "Hide deleted fields" : "Show deleted fields", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80063
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2("ai_fields_can_be_restored", { count: fieldCount }) }),
80064
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showDeletedFields ? t2("ai_hide_deleted_fields") : t2("ai_show_deleted_fields"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80062
80065
  Button$1,
80063
80066
  {
80064
80067
  size: "small",
80065
80068
  className: "describo-ai-entity-delete-details-toggle",
80066
80069
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
80067
- "aria-label": showDeletedFields ? "Hide deleted AI fields" : "Show deleted AI fields",
80070
+ "aria-label": showDeletedFields ? String(t2("ai_hide_deleted_fields_aria")) : String(t2("ai_show_deleted_fields_aria")),
80068
80071
  "aria-pressed": showDeletedFields,
80069
80072
  onClick: (event) => {
80070
80073
  event.stopPropagation();
@@ -80074,7 +80077,7 @@ const DeletedLinkedEntityCard = ({
80074
80077
  ) })
80075
80078
  ] }),
80076
80079
  !readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-actions", children: [
80077
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Approve this AI deletion", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80080
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_approve_deletion_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80078
80081
  Button$1,
80079
80082
  {
80080
80083
  size: "small",
@@ -80083,10 +80086,10 @@ const DeletedLinkedEntityCard = ({
80083
80086
  event.stopPropagation();
80084
80087
  onAcceptDelete == null ? void 0 : onAcceptDelete(entity);
80085
80088
  },
80086
- children: "Delete"
80089
+ children: t2("ai_delete")
80087
80090
  }
80088
80091
  ) }),
80089
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Restore this entity and mark the deletion reviewed", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80092
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_restore_deleted_entity_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80090
80093
  Button$1,
80091
80094
  {
80092
80095
  size: "small",
@@ -80095,7 +80098,7 @@ const DeletedLinkedEntityCard = ({
80095
80098
  event.stopPropagation();
80096
80099
  onRestore == null ? void 0 : onRestore(entity);
80097
80100
  },
80098
- children: "Restore"
80101
+ children: t2("ai_restore")
80099
80102
  }
80100
80103
  ) })
80101
80104
  ] })
@@ -80114,19 +80117,20 @@ const UnlinkedLinkedEntityCard = ({
80114
80117
  onAcceptUnlink,
80115
80118
  onRejectUnlink
80116
80119
  }) => {
80120
+ const { t: t2 } = useTranslation();
80117
80121
  const [showDiff, setShowDiff] = useState(false);
80118
80122
  const targetEntityId = entity["@id"];
80119
80123
  const diffRows = [
80120
80124
  {
80121
80125
  kind: "context",
80122
80126
  propertyName: "@id",
80123
- label: "entity",
80127
+ label: t2("ai_diff_label_entity"),
80124
80128
  value: targetEntityId
80125
80129
  },
80126
80130
  {
80127
80131
  kind: "context",
80128
80132
  propertyName: "source",
80129
- label: "linked from",
80133
+ label: t2("ai_diff_label_linked_from"),
80130
80134
  value: sourceEntityId
80131
80135
  },
80132
80136
  {
@@ -80166,17 +80170,17 @@ const UnlinkedLinkedEntityCard = ({
80166
80170
  children: [
80167
80171
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-suggestion-badge describo-ai-entity-status-badge", children: [
80168
80172
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-suggestion-badge-icon", children: "✦" }),
80169
- "AI unlink"
80173
+ t2("ai_unlink_badge")
80170
80174
  ] }),
80171
80175
  /* @__PURE__ */ jsxRuntimeExports.jsx(LinkedEntityCardHeader, { entity: displayEntity }),
80172
80176
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-deleted-entity-controls", children: [
80173
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-deleted-entity-summary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showDiff ? "Hide unlink diff" : "Show unlink diff", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80177
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-ai-deleted-entity-summary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showDiff ? t2("ai_hide_unlink_diff") : t2("ai_show_unlink_diff"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80174
80178
  Button$1,
80175
80179
  {
80176
80180
  size: "small",
80177
80181
  className: "describo-ai-entity-delete-details-toggle",
80178
80182
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
80179
- "aria-label": showDiff ? "Hide AI unlink diff" : "Show AI unlink diff",
80183
+ "aria-label": showDiff ? String(t2("ai_hide_unlink_diff_aria")) : String(t2("ai_show_unlink_diff_aria")),
80180
80184
  "aria-pressed": showDiff,
80181
80185
  onClick: (event) => {
80182
80186
  event.stopPropagation();
@@ -80185,7 +80189,7 @@ const UnlinkedLinkedEntityCard = ({
80185
80189
  }
80186
80190
  ) }) }),
80187
80191
  !readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-actions", children: [
80188
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Approve this AI unlink", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80192
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_approve_unlink_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80189
80193
  Button$1,
80190
80194
  {
80191
80195
  size: "small",
@@ -80194,10 +80198,10 @@ const UnlinkedLinkedEntityCard = ({
80194
80198
  event.stopPropagation();
80195
80199
  onAcceptUnlink == null ? void 0 : onAcceptUnlink({ sourceEntityId, property, targetEntityId });
80196
80200
  },
80197
- children: "Unlink"
80201
+ children: t2("ai_unlink_entity")
80198
80202
  }
80199
80203
  ) }),
80200
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Restore this link and mark the unlink reviewed", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80204
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_restore_link_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80201
80205
  Button$1,
80202
80206
  {
80203
80207
  size: "small",
@@ -80206,7 +80210,7 @@ const UnlinkedLinkedEntityCard = ({
80206
80210
  event.stopPropagation();
80207
80211
  onRejectUnlink == null ? void 0 : onRejectUnlink({ sourceEntityId, property, targetEntityId });
80208
80212
  },
80209
- children: "Restore"
80213
+ children: t2("ai_restore")
80210
80214
  }
80211
80215
  ) })
80212
80216
  ] })
@@ -80243,23 +80247,18 @@ const AiEntityReviewSummary = ({
80243
80247
  onReview,
80244
80248
  onDiff
80245
80249
  }) => {
80250
+ const { t: t2 } = useTranslation();
80246
80251
  if (fieldCount <= 0) return null;
80247
- const fieldLabel = fieldCount === 1 ? "field" : "fields";
80248
80252
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-entity-review-summary", children: [
80249
80253
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-entity-review-meta", children: [
80250
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "describo-ai-entity-review-count", children: [
80251
- fieldCount,
80252
- " ",
80253
- fieldLabel,
80254
- " to review"
80255
- ] }),
80256
- onDiff && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Show entity diff", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80254
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-entity-review-count", children: t2("ai_fields_to_review", { count: fieldCount }) }),
80255
+ onDiff && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_show_entity_diff"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80257
80256
  Button$1,
80258
80257
  {
80259
80258
  className: "describo-ai-entity-diff-toggle",
80260
80259
  size: "small",
80261
80260
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
80262
- "aria-label": "Show AI entity diff",
80261
+ "aria-label": String(t2("ai_show_entity_diff_aria")),
80263
80262
  onClick: (event) => {
80264
80263
  event.stopPropagation();
80265
80264
  onDiff();
@@ -80276,7 +80275,7 @@ const AiEntityReviewSummary = ({
80276
80275
  event.stopPropagation();
80277
80276
  onReview();
80278
80277
  },
80279
- children: "Review entity"
80278
+ children: t2("ai_review_entity")
80280
80279
  }
80281
80280
  )
80282
80281
  ] });
@@ -80291,47 +80290,51 @@ const LinkedEntityCard = ({
80291
80290
  onLoadEntity,
80292
80291
  onUnlinkEntity,
80293
80292
  onShowEntityDiff
80294
- }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
80295
- Card,
80296
- {
80297
- className: `${hasPendingAiReview ? "describo-ai-entity-review-card" : ""} ${hasAiTouchedEntity ? "describo-ai-entity-reviewed-card" : ""}`,
80298
- style: {
80299
- backgroundColor: hasPendingAiReview ? "#e6f8ef" : "#e6f0ff",
80300
- cursor: "pointer",
80301
- transition: "background-color 0.2s",
80302
- borderLeft: hasPendingAiReview ? "3px solid #38c88a" : "3px solid #409eff"
80303
- },
80304
- styles: { body: { padding: hasPendingAiReview ? "22px 12px 8px" : "8px 12px" } },
80305
- hoverable: true,
80306
- onClick: () => onLoadEntity({ id: entity["@id"] }),
80307
- children: [
80308
- hasPendingAiReview && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-suggestion-badge describo-ai-entity-status-badge", children: [
80309
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-suggestion-badge-icon", children: "✦" }),
80310
- "AI suggestion"
80311
- ] }),
80312
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", align: "middle", gap: 8, children: [
80313
- /* @__PURE__ */ jsxRuntimeExports.jsx(LinkedEntityCardHeader, { entity: displayEntity }),
80314
- !readonly && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(UnlinkEntity, { entity, onUnlinkEntity }) })
80315
- ] }),
80316
- hasAiTouchedEntity && !hasPendingAiReview && /* @__PURE__ */ jsxRuntimeExports.jsx(
80317
- AiEditedFieldBadge,
80318
- {
80319
- className: "describo-ai-entity-edited-badge",
80320
- title: "Entity was added by AI",
80321
- ariaLabel: "Entity was added by AI"
80322
- }
80323
- ),
80324
- /* @__PURE__ */ jsxRuntimeExports.jsx(
80325
- AiEntityReviewSummary,
80326
- {
80327
- fieldCount: hasPendingAiReview ? pendingAiReviewFieldCount : 0,
80328
- onReview: () => onLoadEntity({ id: entity["@id"] }),
80329
- onDiff: hasPendingAiReview ? onShowEntityDiff : void 0
80330
- }
80331
- )
80332
- ]
80333
- }
80334
- );
80293
+ }) => {
80294
+ const { t: t2 } = useTranslation();
80295
+ const entityAddedLabel = t2("ai_entity_was_added_by_ai");
80296
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
80297
+ Card,
80298
+ {
80299
+ className: `${hasPendingAiReview ? "describo-ai-entity-review-card" : ""} ${hasAiTouchedEntity ? "describo-ai-entity-reviewed-card" : ""}`,
80300
+ style: {
80301
+ backgroundColor: hasPendingAiReview ? "#e6f8ef" : "#e6f0ff",
80302
+ cursor: "pointer",
80303
+ transition: "background-color 0.2s",
80304
+ borderLeft: hasPendingAiReview ? "3px solid #38c88a" : "3px solid #409eff"
80305
+ },
80306
+ styles: { body: { padding: hasPendingAiReview ? "22px 12px 8px" : "8px 12px" } },
80307
+ hoverable: true,
80308
+ onClick: () => onLoadEntity({ id: entity["@id"] }),
80309
+ children: [
80310
+ hasPendingAiReview && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-suggestion-badge describo-ai-entity-status-badge", children: [
80311
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-suggestion-badge-icon", children: "" }),
80312
+ t2("ai_suggestion_badge")
80313
+ ] }),
80314
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", align: "middle", gap: 8, children: [
80315
+ /* @__PURE__ */ jsxRuntimeExports.jsx(LinkedEntityCardHeader, { entity: displayEntity }),
80316
+ !readonly && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(UnlinkEntity, { entity, onUnlinkEntity }) })
80317
+ ] }),
80318
+ hasAiTouchedEntity && !hasPendingAiReview && /* @__PURE__ */ jsxRuntimeExports.jsx(
80319
+ AiEditedFieldBadge,
80320
+ {
80321
+ className: "describo-ai-entity-edited-badge",
80322
+ title: entityAddedLabel,
80323
+ ariaLabel: entityAddedLabel
80324
+ }
80325
+ ),
80326
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
80327
+ AiEntityReviewSummary,
80328
+ {
80329
+ fieldCount: hasPendingAiReview ? pendingAiReviewFieldCount : 0,
80330
+ onReview: () => onLoadEntity({ id: entity["@id"] }),
80331
+ onDiff: hasPendingAiReview ? onShowEntityDiff : void 0
80332
+ }
80333
+ )
80334
+ ]
80335
+ }
80336
+ );
80337
+ };
80335
80338
  const approvalIsApproved = (approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.approved) === true || (approvalRecord == null ? void 0 : approvalRecord.approved) === "true";
80336
80339
  const getApprovalEntities = (approvalData) => {
80337
80340
  if (!approvalData) return [];
@@ -80413,6 +80416,19 @@ const getPendingDeletedEntitiesForReverseProperty = (approvalData, sourceEntityI
80413
80416
  return [].concat(reverseValue).some((sourceRef) => entityIdsMatch(sourceRef == null ? void 0 : sourceRef["@id"], sourceEntityId));
80414
80417
  });
80415
80418
  };
80419
+ const getPendingDeletedEntitiesForRemovedReferences = (approvalData, sourceEntityId, property, currentValue) => {
80420
+ if (!sourceEntityId || !property) return [];
80421
+ return getPendingUnlinkedReferenceApprovals(approvalData, sourceEntityId, property, currentValue).map(({ approvalRecord, targetEntityId }) => {
80422
+ const deletedEntity = getPendingDeletedEntityFromApproval(approvalData, targetEntityId);
80423
+ if (!deletedEntity) return void 0;
80424
+ return {
80425
+ ...deletedEntity,
80426
+ __aiDeleteSourceEntityId: sourceEntityId,
80427
+ __aiDeleteSourceProperty: property,
80428
+ __aiDeleteSourceApprovalRecord: approvalRecord
80429
+ };
80430
+ }).filter(Boolean);
80431
+ };
80416
80432
  const getDeletedEntityReviewTarget = (entityApproval) => {
80417
80433
  const deletedEntity = getDeletedEntityFromApproval(entityApproval);
80418
80434
  const reverse = deletedEntity == null ? void 0 : deletedEntity["@reverse"];
@@ -80456,11 +80472,20 @@ const getRemovedReferenceValues = (previousValue, currentValue) => {
80456
80472
  const currentIds = getReferenceValues(currentValue).map(getReferenceId).filter((id2) => typeof id2 === "string");
80457
80473
  return getReferenceValues(previousValue).filter((previousReference) => !currentIds.some((currentId) => entityIdsMatch(currentId, getReferenceId(previousReference))));
80458
80474
  };
80475
+ const getAddedReferenceValues = (previousValue, currentValue) => {
80476
+ const previousIds = getReferenceValues(previousValue).map(getReferenceId).filter((id2) => typeof id2 === "string");
80477
+ return getReferenceValues(currentValue).filter((currentReference) => !previousIds.some((previousId) => entityIdsMatch(previousId, getReferenceId(currentReference))));
80478
+ };
80459
80479
  const getPendingUnlinkedReferenceApprovals = (approvalData, sourceEntityId, property, currentValue) => getEntityApprovalRecords(approvalData, sourceEntityId, property).filter((approvalRecord) => !approvalIsApproved(approvalRecord) && ["update", "delete", "remove"].includes(String(approvalRecord == null ? void 0 : approvalRecord.operation))).flatMap((approvalRecord) => getRemovedReferenceValues(approvalRecord == null ? void 0 : approvalRecord.previousValue, currentValue).map((reference) => ({
80460
80480
  approvalRecord,
80461
80481
  reference,
80462
80482
  targetEntityId: getReferenceId(reference) || ""
80463
80483
  })).filter((item) => item.targetEntityId));
80484
+ const getPendingAddedReferenceApprovals = (approvalData, sourceEntityId, property, currentValue) => getEntityApprovalRecords(approvalData, sourceEntityId, property).filter((approvalRecord) => !approvalIsApproved(approvalRecord) && ["update", "create", "add"].includes(String(approvalRecord == null ? void 0 : approvalRecord.operation))).flatMap((approvalRecord) => getAddedReferenceValues(approvalRecord == null ? void 0 : approvalRecord.previousValue, currentValue).map((reference) => ({
80485
+ approvalRecord,
80486
+ reference,
80487
+ targetEntityId: getReferenceId(reference) || ""
80488
+ })).filter((item) => item.targetEntityId));
80464
80489
  const getPendingEntityApprovalRecords = (approvalData, entityId) => {
80465
80490
  const entityApproval = getEntityApproval(approvalData, entityId);
80466
80491
  if (!Array.isArray(entityApproval == null ? void 0 : entityApproval.approval)) return [];
@@ -80520,6 +80545,7 @@ const RenderLinkedItem = ({
80520
80545
  onRejectAiEntityUnlink
80521
80546
  }) => {
80522
80547
  var _a2, _b, _c, _d, _e2;
80548
+ const { t: t2 } = useTranslation();
80523
80549
  const state = useStateStore();
80524
80550
  const crateManager = useContext(CrateManagerContext);
80525
80551
  const profileManager = useContext(ProfileManagerContext);
@@ -80640,8 +80666,8 @@ const RenderLinkedItem = ({
80640
80666
  const getEntityDiffLabel = (fieldName) => {
80641
80667
  var _a3, _b2;
80642
80668
  if (fieldName === "@id") return "@id";
80643
- if (fieldName === "@type") return "type";
80644
- if (fieldName === "name") return "name";
80669
+ if (fieldName === "@type") return t2("type_field_label");
80670
+ if (fieldName === "name") return t2("name_field_label");
80645
80671
  return ((_b2 = (_a3 = profileManager == null ? void 0 : profileManager.getPropertyDefinition({
80646
80672
  property: fieldName,
80647
80673
  entity: effectiveEntity
@@ -80690,7 +80716,7 @@ const RenderLinkedItem = ({
80690
80716
  return rows;
80691
80717
  });
80692
80718
  return [...contextRows, ...changedRows];
80693
- }, [effectiveEntity, entity, pendingAiEntityDiffRecords, profileManager]);
80719
+ }, [effectiveEntity, entity, pendingAiEntityDiffRecords, profileManager, t2]);
80694
80720
  if (showMap) {
80695
80721
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { className: "describo-render-item-link py-1 rounded bg-blue-200 hover:text-black hover:bg-blue-300 hover:rounded-r-none", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, className: "space-y-2", children: [
80696
80722
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { className: "p-2", children: [
@@ -80792,18 +80818,27 @@ const PaginateLinkedEntities = ({
80792
80818
  );
80793
80819
  const [displayEntities, setDisplayEntities] = useState([]);
80794
80820
  const [total, setTotal] = useState(entities.length);
80821
+ const getAiReviewEntityPage = (sourceEntities = entities) => {
80822
+ const reviewEntityIndex = sourceEntities.findIndex((entity) => {
80823
+ var _a3, _b2, _c;
80824
+ return ((_a3 = entity.value) == null ? void 0 : _a3.__aiDeletedEntity) || ((_b2 = entity.value) == null ? void 0 : _b2.__aiUnlinkedEntity) || ((_c = entity.value) == null ? void 0 : _c.__aiLinkedEntityReview);
80825
+ });
80826
+ if (reviewEntityIndex < 0) return void 0;
80827
+ return Math.floor(reviewEntityIndex / pageSize) + 1;
80828
+ };
80795
80829
  useEffect(() => {
80796
80830
  var _a3, _b2;
80831
+ const nextPage = getAiReviewEntityPage() ?? ((_b2 = (_a3 = editorState.editorState.latest()[property]) == null ? void 0 : _a3.paginator) == null ? void 0 : _b2.currentPage) ?? 1;
80797
80832
  setTotal(entities.length);
80798
- setCurrentPage(((_b2 = (_a3 = editorState.editorState.latest()[property]) == null ? void 0 : _a3.paginator) == null ? void 0 : _b2.currentPage) ?? 1);
80799
- filterAndChunkEntitiesForDisplay();
80833
+ setCurrentPage(nextPage);
80834
+ filterAndChunkEntitiesForDisplay(nextPage);
80800
80835
  }, [entities]);
80801
- const filterAndChunkEntitiesForDisplay = () => {
80836
+ const filterAndChunkEntitiesForDisplay = (page = currentPage) => {
80802
80837
  var _a3, _b2;
80803
80838
  if (total < pageSize) {
80804
80839
  setCurrentPage(1);
80805
80840
  }
80806
- const offset2 = (currentPage - 1) * pageSize;
80841
+ const offset2 = (page - 1) * pageSize;
80807
80842
  let filteredEntities = entities;
80808
80843
  if (filter2) {
80809
80844
  const re2 = new RegExp(filter2, "i");
@@ -80819,10 +80854,10 @@ const PaginateLinkedEntities = ({
80819
80854
  }
80820
80855
  setDisplayEntities(filteredEntities.slice(offset2, offset2 + pageSize));
80821
80856
  const currentState = editorState.editorState.latest();
80822
- if (currentPage !== ((_b2 = (_a3 = currentState[property]) == null ? void 0 : _a3.paginator) == null ? void 0 : _b2.currentPage)) {
80857
+ if (page !== ((_b2 = (_a3 = currentState[property]) == null ? void 0 : _a3.paginator) == null ? void 0 : _b2.currentPage)) {
80823
80858
  currentState[property] = {
80824
80859
  paginator: {
80825
- currentPage
80860
+ currentPage: page
80826
80861
  }
80827
80862
  };
80828
80863
  editorState.editorState.update(currentState);
@@ -82568,18 +82603,50 @@ const EntityProperty = ({
82568
82603
  );
82569
82604
  }, [values]);
82570
82605
  const renderedLinkInstances = useMemo$1(() => {
82571
- const deletedEntities = getPendingDeletedEntitiesForReverseProperty(
82606
+ const reverseDeletedEntities = getPendingDeletedEntitiesForReverseProperty(
82572
82607
  approvalContext == null ? void 0 : approvalContext.roCrateApproval,
82573
82608
  entity == null ? void 0 : entity["@id"],
82574
82609
  property
82575
82610
  );
82611
+ const removedReferenceDeletedEntities = getPendingDeletedEntitiesForRemovedReferences(
82612
+ approvalContext == null ? void 0 : approvalContext.roCrateApproval,
82613
+ entity == null ? void 0 : entity["@id"],
82614
+ property,
82615
+ (entity == null ? void 0 : entity[property]) ?? values
82616
+ );
82617
+ const deletedEntities = [...reverseDeletedEntities, ...removedReferenceDeletedEntities].filter((deletedEntity, idx, allDeletedEntities) => allDeletedEntities.findIndex((item) => entityIdsMatch(item == null ? void 0 : item["@id"], deletedEntity == null ? void 0 : deletedEntity["@id"])) === idx);
82576
82618
  const unlinkedApprovals = getPendingUnlinkedReferenceApprovals(
82577
82619
  approvalContext == null ? void 0 : approvalContext.roCrateApproval,
82578
82620
  entity == null ? void 0 : entity["@id"],
82579
82621
  property,
82580
82622
  (entity == null ? void 0 : entity[property]) ?? values
82581
82623
  );
82582
- if (!deletedEntities.length && !unlinkedApprovals.length) return linkInstances;
82624
+ const addedReferenceApprovals = getPendingAddedReferenceApprovals(
82625
+ approvalContext == null ? void 0 : approvalContext.roCrateApproval,
82626
+ entity == null ? void 0 : entity["@id"],
82627
+ property,
82628
+ (entity == null ? void 0 : entity[property]) ?? values
82629
+ );
82630
+ const addedReferenceIds = new Set(
82631
+ addedReferenceApprovals.filter(({ targetEntityId }) => getPendingEntityApprovalRecords(approvalContext == null ? void 0 : approvalContext.roCrateApproval, targetEntityId).some((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) !== "@reverse")).map(({ targetEntityId }) => targetEntityId)
82632
+ );
82633
+ const linkedReviewInstances = linkInstances.map((instance2) => {
82634
+ var _a3;
82635
+ const targetEntityId = (_a3 = instance2.value) == null ? void 0 : _a3["@id"];
82636
+ if (!targetEntityId || !Array.from(addedReferenceIds).some((id2) => entityIdsMatch(id2, targetEntityId))) {
82637
+ return instance2;
82638
+ }
82639
+ return {
82640
+ ...instance2,
82641
+ value: {
82642
+ ...instance2.value,
82643
+ __aiLinkedEntityReview: true,
82644
+ __aiLinkSourceEntityId: entity == null ? void 0 : entity["@id"],
82645
+ __aiLinkSourceProperty: property
82646
+ }
82647
+ };
82648
+ });
82649
+ if (!deletedEntities.length && !unlinkedApprovals.length && !addedReferenceIds.size) return linkedReviewInstances;
82583
82650
  const linkedEntityIds = linkInstances.map((instance2) => {
82584
82651
  var _a3;
82585
82652
  return (_a3 = instance2.value) == null ? void 0 : _a3["@id"];
@@ -82608,10 +82675,10 @@ const EntityProperty = ({
82608
82675
  };
82609
82676
  });
82610
82677
  return lodashExports.orderBy(
82611
- [...linkInstances, ...deletedLinkInstances, ...unlinkedLinkInstances],
82678
+ [...linkedReviewInstances, ...deletedLinkInstances, ...unlinkedLinkInstances],
82612
82679
  [(instance2) => {
82613
- var _a3, _b2;
82614
- return ((_a3 = instance2.value) == null ? void 0 : _a3.__aiDeletedEntity) || ((_b2 = instance2.value) == null ? void 0 : _b2.__aiUnlinkedEntity) ? 0 : 1;
82680
+ var _a3, _b2, _c;
82681
+ return ((_a3 = instance2.value) == null ? void 0 : _a3.__aiDeletedEntity) || ((_b2 = instance2.value) == null ? void 0 : _b2.__aiUnlinkedEntity) || ((_c = instance2.value) == null ? void 0 : _c.__aiLinkedEntityReview) ? 0 : 1;
82615
82682
  }, "value.@id"]
82616
82683
  );
82617
82684
  }, [approvalContext == null ? void 0 : approvalContext.roCrateApproval, crateManager, entity, linkInstances, property, values]);
@@ -82715,7 +82782,7 @@ const EntityProperty = ({
82715
82782
  children: [
82716
82783
  showAiReview && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-suggestion-badge", children: [
82717
82784
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-suggestion-badge-icon", children: "✦" }),
82718
- isAiDelete ? "AI delete" : "AI suggestion"
82785
+ isAiDelete ? t2("ai_delete_badge") : t2("ai_suggestion_badge")
82719
82786
  ] }),
82720
82787
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-32 w-1/3 xl:w-1/5 flex flex-col describo-property-heading", children: [
82721
82788
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-center", children: [
@@ -82762,33 +82829,33 @@ const EntityProperty = ({
82762
82829
  }
82763
82830
  ) }),
82764
82831
  showAiReview && instance2.idx === ((_a3 = renderedSimpleInstances[0]) == null ? void 0 : _a3.idx) && !((_b2 = state.configuration) == null ? void 0 : _b2.readonly) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-actions", children: [
82765
- showAiDiffToggle && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showAiDiff ? "Hide diff" : "Show diff", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82832
+ showAiDiffToggle && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showAiDiff ? t2("ai_hide_diff") : t2("ai_show_diff"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82766
82833
  Button$1,
82767
82834
  {
82768
82835
  size: "middle",
82769
82836
  className: "describo-ai-action-diff",
82770
82837
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
82771
- "aria-label": showAiDiff ? "Hide AI diff" : "Show AI diff",
82838
+ "aria-label": showAiDiff ? String(t2("ai_hide_ai_diff_aria")) : String(t2("ai_show_ai_diff_aria")),
82772
82839
  "aria-pressed": showAiDiff,
82773
82840
  onClick: () => setShowAiDiff((visible) => !visible)
82774
82841
  }
82775
82842
  ) }),
82776
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isAiDelete ? "Approve this AI deletion" : "Approve this AI-suggested value", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82843
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: isAiDelete ? t2("ai_approve_deletion_tooltip") : t2("ai_approve_suggested_value_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82777
82844
  Button$1,
82778
82845
  {
82779
82846
  size: "middle",
82780
82847
  className: "describo-ai-action-approve",
82781
82848
  onClick: handleApproveAiSuggestion,
82782
- children: isAiDelete ? "Delete" : "Accept"
82849
+ children: isAiDelete ? t2("ai_delete") : t2("ai_accept")
82783
82850
  }
82784
82851
  ) }),
82785
- previousValueDiffers && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Restore the previous value and mark this suggestion reviewed", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82852
+ previousValueDiffers && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_restore_previous_value_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82786
82853
  Button$1,
82787
82854
  {
82788
82855
  size: "middle",
82789
82856
  className: "describo-ai-action-reject",
82790
82857
  onClick: () => handleRejectAiSuggestion(instance2.idx),
82791
- children: isAiDelete ? "Restore" : "Reject"
82858
+ children: isAiDelete ? t2("ai_restore") : t2("ai_reject")
82792
82859
  }
82793
82860
  ) })
82794
82861
  ] }),
@@ -108277,6 +108344,7 @@ const DialogBrowseEntities = ({
108277
108344
  const hasReviewedAiEdits = approvedFieldCount > 0;
108278
108345
  const hasPendingAiReview = pendingFieldCount > 0 && !hasReviewedAiEdits;
108279
108346
  const hasAiTouchedEntity = hasPendingAiReview || hasReviewedAiEdits;
108347
+ const entityAddedLabel = t2("ai_entity_was_added_by_ai");
108280
108348
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
108281
108349
  Card,
108282
108350
  {
@@ -108305,8 +108373,8 @@ const DialogBrowseEntities = ({
108305
108373
  AiEditedFieldBadge,
108306
108374
  {
108307
108375
  className: "describo-ai-entity-edited-badge",
108308
- title: "Entity was added by AI",
108309
- ariaLabel: "Entity was added by AI"
108376
+ title: entityAddedLabel,
108377
+ ariaLabel: entityAddedLabel
108310
108378
  }
108311
108379
  ),
108312
108380
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -110693,55 +110761,58 @@ const QuickSettingsHeader = ({
110693
110761
  onFieldTitleFilterChange,
110694
110762
  onToggleEmptyFields,
110695
110763
  onToggleAiEditedFields
110696
- }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-quick-settings-header", role: "region", "aria-label": "Quick filter settings", children: [
110697
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-quick-settings-actions", "aria-label": "Field display settings", children: [
110698
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showFieldHelp ? "Hide field help" : "Show field help", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110699
- Button$1,
110700
- {
110701
- type: showFieldHelp ? "default" : "primary",
110702
- icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$l, {}),
110703
- "aria-label": showFieldHelp ? "Hide field help" : "Show field help",
110704
- "aria-pressed": !showFieldHelp,
110705
- onClick: onToggleFieldHelp
110706
- }
110707
- ) }),
110708
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: hideEmptyFields ? "Show fields with no value" : "Hide fields with no value", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110709
- Button$1,
110710
- {
110711
- type: hideEmptyFields ? "primary" : "default",
110712
- icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$5, {}),
110713
- "aria-label": hideEmptyFields ? "Show fields with no value" : "Hide fields with no value",
110714
- "aria-pressed": hideEmptyFields,
110715
- onClick: onToggleEmptyFields
110716
- }
110717
- ) }),
110718
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showAiEditedFields ? "Show all fields" : "Show AI-edited fields", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110719
- Button$1,
110764
+ }) => {
110765
+ const { t: t2 } = useTranslation();
110766
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-quick-settings-header", role: "region", "aria-label": String(t2("quick_filter_settings_aria")), children: [
110767
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-quick-settings-actions", "aria-label": String(t2("field_display_settings_aria")), children: [
110768
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showFieldHelp ? t2("hide_field_help") : t2("show_field_help"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110769
+ Button$1,
110770
+ {
110771
+ type: showFieldHelp ? "default" : "primary",
110772
+ icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$l, {}),
110773
+ "aria-label": showFieldHelp ? String(t2("hide_field_help")) : String(t2("show_field_help")),
110774
+ "aria-pressed": !showFieldHelp,
110775
+ onClick: onToggleFieldHelp
110776
+ }
110777
+ ) }),
110778
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: hideEmptyFields ? t2("show_empty_fields") : t2("hide_empty_fields"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110779
+ Button$1,
110780
+ {
110781
+ type: hideEmptyFields ? "primary" : "default",
110782
+ icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$5, {}),
110783
+ "aria-label": hideEmptyFields ? String(t2("show_empty_fields")) : String(t2("hide_empty_fields")),
110784
+ "aria-pressed": hideEmptyFields,
110785
+ onClick: onToggleEmptyFields
110786
+ }
110787
+ ) }),
110788
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: showAiEditedFields ? t2("show_all_fields") : t2("show_ai_edited_fields"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110789
+ Button$1,
110790
+ {
110791
+ type: showAiEditedFields ? "primary" : "default",
110792
+ className: "describo-ai-edited-filter-button",
110793
+ "aria-label": showAiEditedFields ? String(t2("show_all_fields")) : String(t2("show_ai_edited_fields")),
110794
+ "aria-pressed": showAiEditedFields,
110795
+ disabled: aiEditedFieldCount === 0,
110796
+ onClick: onToggleAiEditedFields,
110797
+ children: "✦"
110798
+ }
110799
+ ) })
110800
+ ] }),
110801
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
110802
+ Input2,
110720
110803
  {
110721
- type: showAiEditedFields ? "primary" : "default",
110722
- className: "describo-ai-edited-filter-button",
110723
- "aria-label": showAiEditedFields ? "Show all fields" : "Show AI-edited fields",
110724
- "aria-pressed": showAiEditedFields,
110725
- disabled: aiEditedFieldCount === 0,
110726
- onClick: onToggleAiEditedFields,
110727
- children: ""
110728
- }
110729
- ) })
110730
- ] }),
110731
- /* @__PURE__ */ jsxRuntimeExports.jsx(
110732
- Input2,
110733
- {
110734
- className: "describo-quick-settings-filter",
110735
- value: fieldTitleFilter,
110736
- placeholder: "Filter fields by name or value",
110737
- "aria-label": "Filter fields by name or value",
110738
- onChange: (event) => onFieldTitleFilterChange(event.target.value),
110739
- allowClear: {
110740
- clearIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$B, { "aria-label": "Clear field filter" })
110804
+ className: "describo-quick-settings-filter",
110805
+ value: fieldTitleFilter,
110806
+ placeholder: String(t2("filter_fields_by_name_or_value")),
110807
+ "aria-label": String(t2("filter_fields_by_name_or_value")),
110808
+ onChange: (event) => onFieldTitleFilterChange(event.target.value),
110809
+ allowClear: {
110810
+ clearIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$B, { "aria-label": String(t2("clear_field_filter")) })
110811
+ }
110741
110812
  }
110742
- }
110743
- )
110744
- ] });
110813
+ )
110814
+ ] });
110815
+ };
110745
110816
  const AiApprovalStepperHeader = ({
110746
110817
  activeIndex,
110747
110818
  pendingCount,
@@ -110757,12 +110828,17 @@ const AiApprovalStepperHeader = ({
110757
110828
  onRejectAll,
110758
110829
  onReviewNextEntity
110759
110830
  }) => {
110831
+ const { t: t2 } = useTranslation();
110760
110832
  if (!pendingCount && !remainingEntityCount) return null;
110761
110833
  if (!pendingCount) {
110762
- const entityLabel = remainingEntityCount === 1 ? "entity" : "entities";
110763
- const fieldLabel = remainingFieldCount === 1 ? "field" : "fields";
110764
- const remainingMessage = `${remainingFieldCount} AI ${fieldLabel} still need review in ${remainingEntityCount} other ${entityLabel}`;
110765
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-bar describo-ai-confirm-bar-remaining", role: "status", "aria-label": "AI changes remaining", children: [
110834
+ const entityLabel = t2("ai_entity", { count: remainingEntityCount });
110835
+ const remainingMessage = t2("ai_remaining_review_message", {
110836
+ count: remainingFieldCount,
110837
+ fieldCount: remainingFieldCount,
110838
+ entityCount: remainingEntityCount,
110839
+ entityLabel
110840
+ });
110841
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-bar describo-ai-confirm-bar-remaining", role: "status", "aria-label": String(t2("ai_changes_remaining_aria")), children: [
110766
110842
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-message", children: [
110767
110843
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-confirm-spark", children: "✦" }),
110768
110844
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: remainingMessage })
@@ -110772,66 +110848,66 @@ const AiApprovalStepperHeader = ({
110772
110848
  {
110773
110849
  className: "describo-ai-review-next-entity",
110774
110850
  onClick: onReviewNextEntity,
110775
- children: "Review next"
110851
+ children: t2("ai_review_next")
110776
110852
  }
110777
110853
  ) })
110778
110854
  ] });
110779
110855
  }
110780
110856
  const stepLabel = `${Math.min(activeIndex + 1, pendingCount)}/${pendingCount}`;
110781
- const message = activePropertyLabel ? `AI changes need review: ${activePropertyLabel}` : "AI changes need review";
110782
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-bar", role: "region", "aria-label": "AI change review", children: [
110857
+ const message = activePropertyLabel ? t2("ai_changes_need_review_property", { property: activePropertyLabel }) : t2("ai_changes_need_review");
110858
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-bar", role: "region", "aria-label": String(t2("ai_change_review_aria")), children: [
110783
110859
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-message", children: [
110784
110860
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-confirm-spark", children: "✦" }),
110785
110861
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: message })
110786
110862
  ] }),
110787
110863
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-confirm-controls", children: [
110788
- onReviewNextEntity && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: remainingEntityCount > 0 ? "Review the next entity with pending AI changes" : "No other entities need AI review", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110864
+ onReviewNextEntity && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: remainingEntityCount > 0 ? t2("ai_review_next_entity_tooltip") : t2("ai_no_other_entities_need_review"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110789
110865
  Button$1,
110790
110866
  {
110791
110867
  className: "describo-ai-review-next-entity",
110792
110868
  disabled: remainingEntityCount === 0,
110793
110869
  onClick: onReviewNextEntity,
110794
- children: "Review next"
110870
+ children: t2("ai_review_next")
110795
110871
  }
110796
110872
  ) }),
110797
110873
  !readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
110798
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Accept every pending AI change in this entity", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110874
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_accept_all_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110799
110875
  Button$1,
110800
110876
  {
110801
110877
  className: "describo-ai-bulk-action describo-ai-bulk-accept",
110802
110878
  onClick: onAcceptAll,
110803
- children: "Accept all"
110879
+ children: t2("ai_accept_all")
110804
110880
  }
110805
110881
  ) }),
110806
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Restore previous values for every pending AI change in this entity", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110882
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_reject_all_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110807
110883
  Button$1,
110808
110884
  {
110809
110885
  className: "describo-ai-bulk-action describo-ai-bulk-reject",
110810
110886
  onClick: onRejectAll,
110811
- children: "Reject all"
110887
+ children: t2("ai_reject_all")
110812
110888
  }
110813
110889
  ) })
110814
110890
  ] }),
110815
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-stepper", "aria-label": "Pending AI field navigation", children: [
110816
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Previous pending field", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110891
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-ai-stepper", "aria-label": String(t2("ai_pending_field_navigation_aria")), children: [
110892
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_previous_pending_field"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110817
110893
  Button$1,
110818
110894
  {
110819
110895
  type: "text",
110820
110896
  size: "small",
110821
110897
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$p, {}),
110822
- "aria-label": "Previous pending AI field",
110898
+ "aria-label": String(t2("ai_previous_pending_field_aria")),
110823
110899
  disabled: !canGoPrevious,
110824
110900
  onClick: onPrevious
110825
110901
  }
110826
110902
  ) }),
110827
110903
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-ai-step-count", children: stepLabel }),
110828
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Next pending field", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110904
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_next_pending_field"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110829
110905
  Button$1,
110830
110906
  {
110831
110907
  type: "text",
110832
110908
  size: "small",
110833
110909
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$u, {}),
110834
- "aria-label": "Next pending AI field",
110910
+ "aria-label": String(t2("ai_next_pending_field_aria")),
110835
110911
  disabled: !canGoNext,
110836
110912
  onClick: onNext
110837
110913
  }
@@ -112467,15 +112543,25 @@ const findAddedProfileTab = (tabs, previousTabKeys) => {
112467
112543
  const profileTabs = tabs.filter(isProfileTab);
112468
112544
  return profileTabs.find((tab) => !previousTabKeys.has(getProfileTabKey(tab))) ?? profileTabs[profileTabs.length - 1];
112469
112545
  };
112470
- const findTabForProperty = (tabs, property) => tabs.find((tab) => {
112546
+ const isAboutTab = (tab) => {
112547
+ const name2 = String((tab == null ? void 0 : tab.name) || "").toLowerCase();
112548
+ const label = String((tab == null ? void 0 : tab.label) || (tab == null ? void 0 : tab.name) || "").toLowerCase();
112549
+ return name2 === "about" || label === "about";
112550
+ };
112551
+ const tabContainsProperty = (tab, property) => {
112471
112552
  var _a2;
112472
- return (_a2 = tab == null ? void 0 : tab.inputs) == null ? void 0 : _a2.some((input) => (input == null ? void 0 : input.name) === property);
112473
- }) ?? tabs.find((tab) => ["overflow", "other"].includes(String((tab == null ? void 0 : tab.name) || "").toLowerCase()));
112553
+ return (_a2 = tab == null ? void 0 : tab.inputs) == null ? void 0 : _a2.some((input) => (input == null ? void 0 : input.name) === property || (input == null ? void 0 : input.id) === property);
112554
+ };
112555
+ const findTabForProperty = (tabs, property) => {
112556
+ const matchingTabs = tabs.filter((tab) => tabContainsProperty(tab, property));
112557
+ return matchingTabs.find((tab) => !isAboutTab(tab)) ?? matchingTabs[0] ?? tabs.find((tab) => ["overflow", "other"].includes(String((tab == null ? void 0 : tab.name) || "").toLowerCase()));
112558
+ };
112474
112559
  const getPendingAddedProfileStorageKey = (entityId) => `recrate.pending-added-profile-tab.${entityId}`;
112475
112560
  const DEFAULT_TAB_PANE_WIDTH = 240;
112476
112561
  const ICON_TAB_PANE_WIDTH = 80;
112477
112562
  const MIN_LABEL_TAB_PANE_WIDTH = 100;
112478
112563
  const MAX_LABEL_TAB_PANE_WIDTH = 250;
112564
+ const AI_SCROLL_RESTORE_SUPPRESSION_MS = 2500;
112479
112565
  const clampLabelTabPaneWidth = (width) => Math.max(MIN_LABEL_TAB_PANE_WIDTH, Math.min(MAX_LABEL_TAB_PANE_WIDTH, Math.round(width)));
112480
112566
  const readPendingAddedProfileTabKeys = (entityId) => {
112481
112567
  if (typeof window === "undefined") return null;
@@ -112510,8 +112596,20 @@ const clearPendingAddedProfileTabKeys = (entityId) => {
112510
112596
  } catch {
112511
112597
  }
112512
112598
  };
112599
+ const buildAiApprovalNavigationKey = (entityId, approvalRecord) => {
112600
+ const propertyName2 = String((approvalRecord == null ? void 0 : approvalRecord.propertyName) ?? "");
112601
+ const operation = String((approvalRecord == null ? void 0 : approvalRecord.operation) ?? "");
112602
+ const timestamp = String((approvalRecord == null ? void 0 : approvalRecord.timestamp) ?? "");
112603
+ let previousValue = "";
112604
+ try {
112605
+ previousValue = JSON.stringify((approvalRecord == null ? void 0 : approvalRecord.previousValue) ?? null);
112606
+ } catch {
112607
+ previousValue = String((approvalRecord == null ? void 0 : approvalRecord.previousValue) ?? "");
112608
+ }
112609
+ return `${entityId}:${propertyName2}:${operation}:${timestamp}:${previousValue}`;
112610
+ };
112513
112611
  const RenderEntity = forwardRef((props, ref) => {
112514
- var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
112612
+ var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
112515
112613
  const { entity, onLoadEntity, onSaveCrate, onSaveEntityTemplate, onWarning, onError, onAddNewProfileRequest, onRemoveProfile } = props;
112516
112614
  const state = useStateStore();
112517
112615
  const profileManager = useContext(ProfileManagerContext);
@@ -112561,21 +112659,56 @@ const RenderEntity = forwardRef((props, ref) => {
112561
112659
  const pendingAddedProfileSelectionRef = useRef(null);
112562
112660
  const pendingAddedPropertyRef = useRef(null);
112563
112661
  const pendingAiScrollPropertyRef = useRef(null);
112662
+ const aiScrollRestoreSuppressedUntilRef = useRef(0);
112564
112663
  const lastAutoNavigatedAiApprovalRef = useRef(null);
112565
112664
  const [tabRailScrollState, setTabRailScrollState] = useState({ canScrollUp: false, canScrollDown: false });
112566
112665
  const debugScroll = (...args) => console.log("[recrate-scroll-debug]", ...args);
112666
+ const suppressAiScrollRestore = () => {
112667
+ aiScrollRestoreSuppressedUntilRef.current = Date.now() + AI_SCROLL_RESTORE_SUPPRESSION_MS;
112668
+ };
112669
+ const isAiScrollRestoreSuppressed = () => Date.now() < aiScrollRestoreSuppressedUntilRef.current;
112567
112670
  const pendingAiApprovals = useMemo$1(() => getPendingEntityApprovalRecords(approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]), [approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]]);
112568
112671
  const pendingAiApprovalProperties = useMemo$1(() => pendingAiApprovals.map((approvalRecord) => approvalRecord == null ? void 0 : approvalRecord.propertyName).filter((property) => typeof property === "string" && property.length > 0), [pendingAiApprovals]);
112569
- const pendingDeletedEntityReviewProperties = useMemo$1(() => getPendingDeletedEntityReversePropertiesForSource(
112570
- approvalContext == null ? void 0 : approvalContext.roCrateApproval,
112571
- contextEntity == null ? void 0 : contextEntity["@id"]
112572
- ), [approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]]);
112672
+ const pendingDeletedEntityReviewProperties = useMemo$1(() => {
112673
+ const reverseDeletedEntityProperties = getPendingDeletedEntityReversePropertiesForSource(
112674
+ approvalContext == null ? void 0 : approvalContext.roCrateApproval,
112675
+ contextEntity == null ? void 0 : contextEntity["@id"]
112676
+ );
112677
+ const removedReferenceDeletedEntityProperties = pendingAiApprovals.map((approvalRecord) => approvalRecord == null ? void 0 : approvalRecord.propertyName).filter((property) => typeof property === "string" && property.length > 0).filter((property) => getPendingDeletedEntitiesForRemovedReferences(
112678
+ approvalContext == null ? void 0 : approvalContext.roCrateApproval,
112679
+ contextEntity == null ? void 0 : contextEntity["@id"],
112680
+ property,
112681
+ contextEntity == null ? void 0 : contextEntity[property]
112682
+ ).length > 0);
112683
+ return Array.from(/* @__PURE__ */ new Set([
112684
+ ...reverseDeletedEntityProperties,
112685
+ ...removedReferenceDeletedEntityProperties
112686
+ ]));
112687
+ }, [approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity, pendingAiApprovals]);
112573
112688
  const approvedAiApprovals = useMemo$1(() => getApprovedEntityApprovalRecords(approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]), [approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]]);
112574
112689
  const approvedAiApprovalProperties = useMemo$1(() => Array.from(new Set(
112575
112690
  approvedAiApprovals.map((approvalRecord) => approvalRecord == null ? void 0 : approvalRecord.propertyName).filter((property) => typeof property === "string" && property.length > 0)
112576
112691
  )), [approvedAiApprovals]);
112577
112692
  const selectedAiApproval = pendingAiApprovals[selectedAiApprovalIndex] ?? pendingAiApprovals[0];
112578
- const selectedAiApprovalProperty = selectedAiApproval == null ? void 0 : selectedAiApproval.propertyName;
112693
+ const selectedAiApprovalProperty = (selectedAiApproval == null ? void 0 : selectedAiApproval.propertyName) ?? pendingDeletedEntityReviewProperties[0];
112694
+ useCallback((entityApproval) => {
112695
+ const entityId = entityApproval == null ? void 0 : entityApproval["@id"];
112696
+ if (!entityId) return false;
112697
+ if (isPendingEntityDeleteApproval(entityApproval)) {
112698
+ const reviewTarget = getDeletedEntityReviewTarget(entityApproval);
112699
+ if (!(reviewTarget == null ? void 0 : reviewTarget.entityId)) return false;
112700
+ return Boolean(crateManager == null ? void 0 : crateManager.getEntity({
112701
+ id: reviewTarget.entityId,
112702
+ link: false,
112703
+ materialise: false
112704
+ }));
112705
+ }
112706
+ return Boolean(crateManager == null ? void 0 : crateManager.getEntity({
112707
+ id: entityId,
112708
+ link: false,
112709
+ materialise: false
112710
+ }));
112711
+ }, [crateManager]);
112579
112712
  const pendingOtherAiApprovalEntities = useMemo$1(() => getPendingApprovalEntities(approvalContext == null ? void 0 : approvalContext.roCrateApproval).filter((entityApproval) => !entityIdsMatch(entityApproval == null ? void 0 : entityApproval["@id"], contextEntity == null ? void 0 : contextEntity["@id"])), [approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]]);
112580
112713
  const pendingOtherAiApprovalFieldCount = useMemo$1(() => getPendingApprovalFieldCount(approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]), [approvalContext == null ? void 0 : approvalContext.roCrateApproval, contextEntity == null ? void 0 : contextEntity["@id"]]);
112581
112714
  const handleReviewNextAiApprovalEntity = useCallback(() => {
@@ -112924,6 +113057,7 @@ const RenderEntity = forwardRef((props, ref) => {
112924
113057
  if (!navigationRestoreReadyRef.current) return;
112925
113058
  if (!(contextEntity == null ? void 0 : contextEntity["@id"])) return;
112926
113059
  if (((_a3 = pendingAddedPropertyRef.current) == null ? void 0 : _a3.entityId) === contextEntity["@id"]) return;
113060
+ if (isAiScrollRestoreSuppressed()) return;
112927
113061
  const viewport = activeContentRef.current;
112928
113062
  if (!viewport) return;
112929
113063
  const restoreTarget = ((_d2 = (_c2 = (_b2 = state.editorState.getNavigationState(contextEntity["@id"])) == null ? void 0 : _b2.tabStates) == null ? void 0 : _c2[activeTab]) == null ? void 0 : _d2.scrollTop) ?? 0;
@@ -112947,6 +113081,11 @@ const RenderEntity = forwardRef((props, ref) => {
112947
113081
  viewport.style.scrollBehavior = "auto";
112948
113082
  const attemptRestore = () => {
112949
113083
  if (cancelled) return;
113084
+ if (isAiScrollRestoreSuppressed()) {
113085
+ restoreInProgressRef.current = false;
113086
+ viewport.style.scrollBehavior = previousInlineScrollBehavior;
113087
+ return;
113088
+ }
112950
113089
  attempts += 1;
112951
113090
  const maxScrollable = Math.max(0, viewport.scrollHeight - viewport.clientHeight);
112952
113091
  const target = Math.min(restoreTarget, maxScrollable);
@@ -112992,7 +113131,7 @@ const RenderEntity = forwardRef((props, ref) => {
112992
113131
  cancelled = true;
112993
113132
  restoreInProgressRef.current = false;
112994
113133
  viewport.style.scrollBehavior = previousInlineScrollBehavior;
112995
- if (navigationRestoreReadyRef.current) {
113134
+ if (navigationRestoreReadyRef.current && !isAiScrollRestoreSuppressed()) {
112996
113135
  captureViewContext(activeTab, viewport.scrollTop);
112997
113136
  }
112998
113137
  viewport.removeEventListener("scroll", handleScroll);
@@ -113005,6 +113144,7 @@ const RenderEntity = forwardRef((props, ref) => {
113005
113144
  const pendingTab = pendingRestoredTabRef.current;
113006
113145
  if (!(contextEntity == null ? void 0 : contextEntity["@id"])) return;
113007
113146
  if (((_a3 = pendingAddedPropertyRef.current) == null ? void 0 : _a3.entityId) === contextEntity["@id"]) return;
113147
+ if (isAiScrollRestoreSuppressed()) return;
113008
113148
  if (pendingTab) {
113009
113149
  debugScroll("restore.pending-tab", {
113010
113150
  entityId: contextEntity["@id"],
@@ -113569,17 +113709,13 @@ const RenderEntity = forwardRef((props, ref) => {
113569
113709
  window.clearTimeout(timerId);
113570
113710
  };
113571
113711
  }, []);
113572
- const navigateToAiApproval = useCallback((index2) => {
113573
- if (!pendingAiApprovals.length) return;
113574
- if (index2 < 0 || index2 >= pendingAiApprovals.length) return;
113575
- const approvalRecord = pendingAiApprovals[index2];
113576
- const property = approvalRecord == null ? void 0 : approvalRecord.propertyName;
113712
+ const navigateToAiApprovalProperty = useCallback((property) => {
113577
113713
  if (!property) return;
113578
- setSelectedAiApprovalIndex(index2);
113579
113714
  setFieldTitleFilter("");
113580
113715
  if (!hasFieldValue(contextEntity == null ? void 0 : contextEntity[property]) && hideEmptyFields) {
113581
113716
  setHideEmptyFields(false);
113582
113717
  }
113718
+ suppressAiScrollRestore();
113583
113719
  pendingAiScrollPropertyRef.current = property;
113584
113720
  const propertyTab = renderTabs ? findTabForProperty(tabs, property) : null;
113585
113721
  if ((propertyTab == null ? void 0 : propertyTab.name) && propertyTab.name !== activeTab) {
@@ -113598,19 +113734,46 @@ const RenderEntity = forwardRef((props, ref) => {
113598
113734
  scrollToAiApprovalProperty,
113599
113735
  tabs
113600
113736
  ]);
113737
+ const navigateToAiApproval = useCallback((index2) => {
113738
+ if (!pendingAiApprovals.length) return;
113739
+ if (index2 < 0 || index2 >= pendingAiApprovals.length) return;
113740
+ const approvalRecord = pendingAiApprovals[index2];
113741
+ const property = approvalRecord == null ? void 0 : approvalRecord.propertyName;
113742
+ if (!property) return;
113743
+ setSelectedAiApprovalIndex(index2);
113744
+ navigateToAiApprovalProperty(property);
113745
+ }, [navigateToAiApprovalProperty, pendingAiApprovals]);
113601
113746
  useEffect(() => {
113602
- var _a3;
113747
+ var _a3, _b2;
113603
113748
  const entityId = contextEntity == null ? void 0 : contextEntity["@id"];
113604
- const firstPendingProperty = (_a3 = pendingAiApprovals[0]) == null ? void 0 : _a3.propertyName;
113749
+ const profileHasTabbedLayout = Boolean((_b2 = (_a3 = profileManager == null ? void 0 : profileManager.profile) == null ? void 0 : _a3.layouts) == null ? void 0 : _b2.length);
113750
+ if (profileHasTabbedLayout && tabs.length === 0) {
113751
+ return;
113752
+ }
113753
+ const firstPendingApproval = pendingAiApprovals[0];
113754
+ const firstPendingProperty = (firstPendingApproval == null ? void 0 : firstPendingApproval.propertyName) ?? pendingDeletedEntityReviewProperties[0];
113605
113755
  if (!entityId || !firstPendingProperty) {
113606
113756
  lastAutoNavigatedAiApprovalRef.current = null;
113607
113757
  return;
113608
113758
  }
113609
- const autoNavigationKey = `${entityId}:${firstPendingProperty}`;
113759
+ const autoNavigationKey = firstPendingApproval ? `${(profileManager == null ? void 0 : profileManager.$key) ?? 0}:${buildAiApprovalNavigationKey(entityId, firstPendingApproval)}` : `${(profileManager == null ? void 0 : profileManager.$key) ?? 0}:${entityId}:${firstPendingProperty}:deleted-entity-review`;
113610
113760
  if (lastAutoNavigatedAiApprovalRef.current === autoNavigationKey) return;
113611
113761
  lastAutoNavigatedAiApprovalRef.current = autoNavigationKey;
113612
- navigateToAiApproval(0);
113613
- }, [contextEntity == null ? void 0 : contextEntity["@id"], navigateToAiApproval, pendingAiApprovals]);
113762
+ if (firstPendingApproval) {
113763
+ navigateToAiApproval(0);
113764
+ return;
113765
+ }
113766
+ navigateToAiApprovalProperty(firstPendingProperty);
113767
+ }, [
113768
+ contextEntity == null ? void 0 : contextEntity["@id"],
113769
+ navigateToAiApproval,
113770
+ navigateToAiApprovalProperty,
113771
+ pendingAiApprovals,
113772
+ pendingDeletedEntityReviewProperties,
113773
+ profileManager == null ? void 0 : profileManager.$key,
113774
+ (_b = (_a2 = profileManager == null ? void 0 : profileManager.profile) == null ? void 0 : _a2.layouts) == null ? void 0 : _b.length,
113775
+ tabs.length
113776
+ ]);
113614
113777
  useEffect(() => {
113615
113778
  const pendingProperty = pendingAiScrollPropertyRef.current;
113616
113779
  if (!pendingProperty) return;
@@ -113621,8 +113784,16 @@ const RenderEntity = forwardRef((props, ref) => {
113621
113784
  return;
113622
113785
  }
113623
113786
  const cancelScroll = scrollToAiApprovalProperty(pendingProperty);
113787
+ const captureTimer = window.setTimeout(() => {
113788
+ if (activeContentRef.current) {
113789
+ captureViewContext(activeTab, activeContentRef.current.scrollTop);
113790
+ }
113791
+ }, 350);
113624
113792
  pendingAiScrollPropertyRef.current = null;
113625
- return cancelScroll;
113793
+ return () => {
113794
+ cancelScroll();
113795
+ window.clearTimeout(captureTimer);
113796
+ };
113626
113797
  }, [activeTab, contextEntity == null ? void 0 : contextEntity["@id"], renderTabs, selectedAiApprovalIndex, tabs, scrollToAiApprovalProperty]);
113627
113798
  const isEntityReference2 = (value) => Boolean(value && typeof value === "object" && typeof value["@id"] === "string");
113628
113799
  const restoreNonCoreApprovalValue = (approvalRecord) => {
@@ -113871,23 +114042,55 @@ const RenderEntity = forwardRef((props, ref) => {
113871
114042
  });
113872
114043
  });
113873
114044
  };
113874
- const handleAcceptAiEntityDelete = (deletedEntity = contextEntity, navigateToRoot = false) => {
113875
- var _a3;
113876
- (_a3 = approvalContext == null ? void 0 : approvalContext.markApprovalEntityApproved) == null ? void 0 : _a3.call(approvalContext, {
114045
+ const getDeletedEntitySourceApproval = (deletedEntity) => {
114046
+ const sourceEntityId = deletedEntity == null ? void 0 : deletedEntity.__aiDeleteSourceEntityId;
114047
+ const sourceProperty = deletedEntity == null ? void 0 : deletedEntity.__aiDeleteSourceProperty;
114048
+ if (!sourceEntityId || !sourceProperty) return void 0;
114049
+ return getPendingEntityApprovalRecords(approvalContext == null ? void 0 : approvalContext.roCrateApproval, sourceEntityId).find((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) === sourceProperty);
114050
+ };
114051
+ const markDeletedEntityApprovalResolved = (deletedEntity, decision, value) => {
114052
+ var _a3, _b2;
114053
+ const sourceEntityId = deletedEntity == null ? void 0 : deletedEntity.__aiDeleteSourceEntityId;
114054
+ const sourceProperty = deletedEntity == null ? void 0 : deletedEntity.__aiDeleteSourceProperty;
114055
+ if (sourceEntityId && sourceProperty) {
114056
+ (_a3 = approvalContext == null ? void 0 : approvalContext.markApprovalEntityAndPropertyApproved) == null ? void 0 : _a3.call(approvalContext, {
114057
+ entityId: deletedEntity == null ? void 0 : deletedEntity["@id"],
114058
+ propertyEntityId: sourceEntityId,
114059
+ propertyName: sourceProperty,
114060
+ decision,
114061
+ value
114062
+ });
114063
+ return;
114064
+ }
114065
+ (_b2 = approvalContext == null ? void 0 : approvalContext.markApprovalEntityApproved) == null ? void 0 : _b2.call(approvalContext, {
113877
114066
  entityId: deletedEntity == null ? void 0 : deletedEntity["@id"],
113878
- decision: "accept"
114067
+ decision,
114068
+ value
113879
114069
  });
114070
+ };
114071
+ const handleAcceptAiEntityDelete = (deletedEntity = contextEntity, navigateToRoot = false) => {
114072
+ markDeletedEntityApprovalResolved(deletedEntity, "accept");
113880
114073
  if (navigateToRoot) {
113881
114074
  onLoadEntity({ id: "./" });
113882
114075
  }
113883
114076
  };
113884
114077
  const handleRestoreAiDeletedEntity = (deletedEntity = contextEntity, navigateToRestored = false) => {
113885
- var _a3;
113886
114078
  try {
113887
114079
  const approvalRecords = getPendingDeletedEntityApprovalRecords(deletedEntity);
113888
114080
  const restoredEntity = buildRestoredDeletedEntity(deletedEntity, approvalRecords);
113889
114081
  crateManager.addEntity(restoredEntity);
113890
114082
  restoreDeletedEntityReverseConnections(restoredEntity["@id"], approvalRecords);
114083
+ const sourceApprovalRecord = getDeletedEntitySourceApproval(deletedEntity);
114084
+ if (sourceApprovalRecord) {
114085
+ const sourceEntity = crateManager.getEntity({
114086
+ id: deletedEntity.__aiDeleteSourceEntityId,
114087
+ link: false,
114088
+ materialise: false
114089
+ });
114090
+ if (sourceEntity) {
114091
+ restoreEntityApprovalValue(sourceEntity, sourceApprovalRecord);
114092
+ }
114093
+ }
113891
114094
  const nextEntityId = navigateToRestored ? restoredEntity["@id"] : entity["@id"];
113892
114095
  const nextEntity = crateManager.getEntity({
113893
114096
  id: nextEntityId,
@@ -113896,11 +114099,7 @@ const RenderEntity = forwardRef((props, ref) => {
113896
114099
  });
113897
114100
  if (nextEntity) init2({ entity: nextEntity });
113898
114101
  saveCratePreservingView();
113899
- (_a3 = approvalContext == null ? void 0 : approvalContext.markApprovalEntityApproved) == null ? void 0 : _a3.call(approvalContext, {
113900
- entityId: deletedEntity == null ? void 0 : deletedEntity["@id"],
113901
- decision: "reject",
113902
- value: restoredEntity
113903
- });
114102
+ markDeletedEntityApprovalResolved(deletedEntity, "reject", restoredEntity);
113904
114103
  if (navigateToRestored) {
113905
114104
  onLoadEntity({ id: restoredEntity["@id"], updateState: false });
113906
114105
  }
@@ -113992,7 +114191,7 @@ const RenderEntity = forwardRef((props, ref) => {
113992
114191
  }
113993
114192
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row", children: [
113994
114193
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full", children: [
113995
- ((_a2 = state.configuration) == null ? void 0 : _a2.showControls) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between pb-1 border-b border-slate-700", children: [
114194
+ ((_c = state.configuration) == null ? void 0 : _c.showControls) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between pb-1 border-b border-slate-700", children: [
113996
114195
  /* @__PURE__ */ jsxRuntimeExports.jsx(
113997
114196
  RenderControls,
113998
114197
  {
@@ -114018,7 +114217,7 @@ const RenderEntity = forwardRef((props, ref) => {
114018
114217
  "aria-pressed": quickSettingsVisible
114019
114218
  }
114020
114219
  ) }),
114021
- ((_b = state.configuration) == null ? void 0 : _b.enableReverseLinkBrowser) && /* @__PURE__ */ jsxRuntimeExports.jsx(
114220
+ ((_d = state.configuration) == null ? void 0 : _d.enableReverseLinkBrowser) && /* @__PURE__ */ jsxRuntimeExports.jsx(
114022
114221
  "button",
114023
114222
  {
114024
114223
  className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-2 rounded text-sm",
@@ -114041,7 +114240,7 @@ const RenderEntity = forwardRef((props, ref) => {
114041
114240
  activePropertyLabel: selectedAiApprovalProperty ? getFieldTitle(selectedAiApprovalProperty) : void 0,
114042
114241
  remainingEntityCount: pendingOtherAiApprovalEntities.length,
114043
114242
  remainingFieldCount: pendingOtherAiApprovalFieldCount,
114044
- readonly: (_c = state.configuration) == null ? void 0 : _c.readonly,
114243
+ readonly: (_e2 = state.configuration) == null ? void 0 : _e2.readonly,
114045
114244
  canGoPrevious: selectedAiApprovalIndex > 0,
114046
114245
  canGoNext: selectedAiApprovalIndex < pendingAiApprovals.length - 1,
114047
114246
  onPrevious: () => navigateToAiApproval(selectedAiApprovalIndex - 1),
@@ -114051,13 +114250,13 @@ const RenderEntity = forwardRef((props, ref) => {
114051
114250
  onReviewNextEntity: handleReviewNextAiApprovalEntity
114052
114251
  }
114053
114252
  ),
114054
- !renderTabs && (((_d = state.configuration) == null ? void 0 : _d.tabLocation) === "left" || ((_e2 = state.configuration) == null ? void 0 : _e2.tabLocation) === "right" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: contentContainerRef, className: "min-h-0 overflow-hidden", style: { height: scrollViewportHeight ? `${scrollViewportHeight}px` : "calc(100vh - 200px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Ve, { vertical: false, proportionalLayout: false, separator: !iconView, onChange: (sizes2) => {
114253
+ !renderTabs && (((_f = state.configuration) == null ? void 0 : _f.tabLocation) === "left" || ((_g = state.configuration) == null ? void 0 : _g.tabLocation) === "right" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: contentContainerRef, className: "min-h-0 overflow-hidden", style: { height: scrollViewportHeight ? `${scrollViewportHeight}px` : "calc(100vh - 200px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Ve, { vertical: false, proportionalLayout: false, separator: !iconView, onChange: (sizes2) => {
114055
114254
  var _a3;
114056
114255
  const w2 = ((_a3 = state.configuration) == null ? void 0 : _a3.tabLocation) === "left" ? sizes2[0] : sizes2[1];
114057
114256
  setTabPaneWidth(w2);
114058
114257
  persistTabWidth(w2);
114059
114258
  }, children: [
114060
- ((_f = state.configuration) == null ? void 0 : _f.tabLocation) === "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full border-r border-slate-200", children: [
114259
+ ((_h = state.configuration) == null ? void 0 : _h.tabLocation) === "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full border-r border-slate-200", children: [
114061
114260
  renderProfileActionRail(),
114062
114261
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0 bottom-0 w-1 bg-slate-300 opacity-0 group-hover:opacity-100" })
114063
114262
  ] }) }),
@@ -114080,7 +114279,7 @@ const RenderEntity = forwardRef((props, ref) => {
114080
114279
  )
114081
114280
  }
114082
114281
  ),
114083
- !((_g = state.configuration) == null ? void 0 : _g.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx(
114282
+ !((_i = state.configuration) == null ? void 0 : _i.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx(
114084
114283
  "button",
114085
114284
  {
114086
114285
  className: "bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",
@@ -114089,7 +114288,7 @@ const RenderEntity = forwardRef((props, ref) => {
114089
114288
  }
114090
114289
  )
114091
114290
  ] }),
114092
- !shouldRenderCoreField("@id") && !((_h = state.configuration) == null ? void 0 : _h.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between my-2 p-2", children: [
114291
+ !shouldRenderCoreField("@id") && !((_j = state.configuration) == null ? void 0 : _j.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between my-2 p-2", children: [
114093
114292
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-grow" }),
114094
114293
  /* @__PURE__ */ jsxRuntimeExports.jsx(
114095
114294
  "button",
@@ -114167,11 +114366,11 @@ const RenderEntity = forwardRef((props, ref) => {
114167
114366
  return null;
114168
114367
  })
114169
114368
  ] }) }),
114170
- ((_i = state.configuration) == null ? void 0 : _i.tabLocation) === "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full border-l border-slate-200", children: [
114369
+ ((_k = state.configuration) == null ? void 0 : _k.tabLocation) === "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full border-l border-slate-200", children: [
114171
114370
  renderProfileActionRail(),
114172
114371
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-slate-300 opacity-0 group-hover:opacity-100" })
114173
114372
  ] }) })
114174
- ] }, `untabbed-${(_j = state.configuration) == null ? void 0 : _j.tabLocation}-${iconView ? "icon" : "label"}`) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: contentContainerRef, className: "flex min-h-0 overflow-hidden", style: {
114373
+ ] }, `untabbed-${(_l = state.configuration) == null ? void 0 : _l.tabLocation}-${iconView ? "icon" : "label"}`) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: contentContainerRef, className: "flex min-h-0 overflow-hidden", style: {
114175
114374
  flexDirection: "column",
114176
114375
  height: scrollViewportHeight ? `${scrollViewportHeight}px` : "calc(100vh - 200px)"
114177
114376
  }, children: [
@@ -114206,7 +114405,7 @@ const RenderEntity = forwardRef((props, ref) => {
114206
114405
  )
114207
114406
  }
114208
114407
  ),
114209
- !((_k = state.configuration) == null ? void 0 : _k.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx(
114408
+ !((_m = state.configuration) == null ? void 0 : _m.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx(
114210
114409
  "button",
114211
114410
  {
114212
114411
  className: "bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",
@@ -114215,7 +114414,7 @@ const RenderEntity = forwardRef((props, ref) => {
114215
114414
  }
114216
114415
  )
114217
114416
  ] }),
114218
- !shouldRenderCoreField("@id") && !((_l = state.configuration) == null ? void 0 : _l.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between my-2 p-2", children: [
114417
+ !shouldRenderCoreField("@id") && !((_n = state.configuration) == null ? void 0 : _n.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between my-2 p-2", children: [
114219
114418
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-grow" }),
114220
114419
  /* @__PURE__ */ jsxRuntimeExports.jsx(
114221
114420
  "button",
@@ -114306,7 +114505,7 @@ const RenderEntity = forwardRef((props, ref) => {
114306
114505
  ] }) }),
114307
114506
  /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: activeContentRef, className: `${editorScrollClassName} h-full overflow-y-auto scroll-smooth min-h-0`, children: [
114308
114507
  renderQuickSettingsHeader(),
114309
- !((_m = state.configuration) == null ? void 0 : _m.readonly) && ((_n = tabs.find((t22) => t22.name === activeTab)) == null ? void 0 : _n.missingRequiredData) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-red-600 float-right mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
114508
+ !((_o = state.configuration) == null ? void 0 : _o.readonly) && ((_p = tabs.find((t22) => t22.name === activeTab)) == null ? void 0 : _p.missingRequiredData) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-red-600 float-right mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
114310
114509
  "button",
114311
114510
  {
114312
114511
  className: "bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded text-sm",
@@ -114358,7 +114557,7 @@ const RenderEntity = forwardRef((props, ref) => {
114358
114557
  )
114359
114558
  }
114360
114559
  ),
114361
- (_o = tabs.find((tab) => tab.name === "about")) == null ? void 0 : _o.inputs.map((input) => {
114560
+ (_q = tabs.find((tab) => tab.name === "about")) == null ? void 0 : _q.inputs.map((input) => {
114362
114561
  if (!["@id", "@type", "name", "@reverse"].includes(input.name) && shouldRenderField(input.name, input.label)) {
114363
114562
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
114364
114563
  "div",
@@ -114443,7 +114642,7 @@ const RenderEntity = forwardRef((props, ref) => {
114443
114642
  return null;
114444
114643
  })
114445
114644
  ] }) })
114446
- ] }, `tabbed-${(_p = state.configuration) == null ? void 0 : _p.tabLocation}-${iconView ? "icon" : "label"}`) })
114645
+ ] }, `tabbed-${(_r = state.configuration) == null ? void 0 : _r.tabLocation}-${iconView ? "icon" : "label"}`) })
114447
114646
  ] }),
114448
114647
  /* @__PURE__ */ jsxRuntimeExports.jsx(
114449
114648
  Drawer2,
@@ -121716,7 +121915,7 @@ const en = {
121716
121915
  translation: {
121717
121916
  hello_one: "hello world",
121718
121917
  hello_other: "hello worlds",
121719
- // RenderControls.component.vue
121918
+ // RenderControls.tsx
121720
121919
  root_dataset_label: "Root dataset",
121721
121920
  add_label: "Add",
121722
121921
  edit_context_label: "Edit context",
@@ -121732,56 +121931,57 @@ const en = {
121732
121931
  edit_context: "Edit Context",
121733
121932
  preview_crate: "Preview Crate",
121734
121933
  browse_entities: "Browse entities",
121735
- // DialogAddProperty.component.vue
121934
+ // DialogAddProperty.tsx
121736
121935
  filter_attribute_set: "Filter the attribute set",
121737
- // DialogEditContext.component.vue
121936
+ // DialogEditContext.tsx
121738
121937
  save_label: "Save",
121739
- // DialogPreviewCrate.component.vue
121938
+ // DialogPreviewCrate.tsx
121740
121939
  preview_loading: "loading ...",
121741
- // DialogBrowseEntities.component.vue
121940
+ // DialogBrowseEntities.tsx
121742
121941
  search_for_connection: "Search for a connection",
121743
121942
  filter_by_type: "Filter by type",
121744
- // DialogSaveCrateAsTemplate.component.vue
121943
+ // DialogSaveCrateAsTemplate.tsx
121745
121944
  save_template_prompt: "Save this crate as a template for re-use",
121746
121945
  provide_name_for_template: "provide a name for the crate template",
121747
- // RenderEntityName.component.vue
121946
+ // EntityName.tsx
121748
121947
  name_field_label: "Name",
121749
121948
  name_field_help: "A short, descriptive name for this item.",
121750
- // Add.component.vue
121949
+ type_field_label: "Type",
121950
+ // Add.tsx
121751
121951
  associate_existing_prompt: "Associate an existing '{{addType}}' (lookup by identifier or name) or create a new '{{addType}}' by typing a name for it.",
121752
121952
  associate_any_prompt: "Associate any entity (lookup by identifier or name).",
121753
121953
  add_text: "Add text",
121754
- // Text.component.vue
121954
+ // Text.tsx
121755
121955
  invalid_type_for_text: "The type '{{type}}' is not valid for this component. It can only be 'text' or 'textarea'",
121756
121956
  text_constraints_error_message: "The specified value does not meet the following constraints: {{- value}}, or it is considered invalid.",
121757
- // Date.component.vue
121957
+ // Date.tsx
121758
121958
  pick_a_date: "Pick a date",
121759
121959
  invalid_date_value: "The supplied date '{{value}}' is invalid. Date format is: YYYY-MM-DD or an ISO String. e.g. 2021-03-22 or 2022-09-28T02:20:56.521Z.",
121760
- // DateTime.component.vue
121960
+ // DateTime.tsx
121761
121961
  pick_a_datetime: "Pick a date and time",
121762
121962
  invalid_datetime_value: "The supplied date/time '{{value}}' is invalid. Date/Time format is: YYYY-MM-DD HH:mm:ss or an ISO String. e.g. 2021-03-22 03:23:00 or 2022-09-28T02:20:56.521Z.",
121763
- // Time.component.vue
121963
+ // Time.tsx
121764
121964
  provide_time: "Please provide a time.",
121765
121965
  invalid_time_value: "The supplied time '{{value}}' is invalid. Time format is: HH:mm::ss. e.g. 09:03:59",
121766
- // Number.component.vue
121966
+ // Number.tsx
121767
121967
  invalid_number_value: "The supplied number '{{value}}' is invalid. The value must be a valid number passed in as a String or a Number.",
121768
121968
  number_constraints_error_message: "The specified number does not meet the following constraints: {{value}}",
121769
- // Select.component.vue
121969
+ // Select.tsx
121770
121970
  select: "Select",
121771
121971
  invalid_select_value: "The definition provided to this component has values of the wrong from. It can only be an array of strings",
121772
- // Url.component.vue
121972
+ // Url.tsx
121773
121973
  invalid_url_value: "The entry needs to be a valid url. The accepted protocols are: http, https, ftp, ftps and arcp.",
121774
- // Boolean.component.vue
121974
+ // Boolean.tsx
121775
121975
  true_label: "True",
121776
121976
  false_label: "False",
121777
- // SelectUrl.component.vue
121977
+ // SelectUrl.tsx
121778
121978
  // select: as above
121779
121979
  invalid_selecturl_value: "The value '{{value}}' provided to this component is of the wrong from. It can only be a valid URL.",
121780
121980
  invalid_selecturl_values: "The definition provided to this component has values of the wrong from. It can only be an array of strings which are each valid URLs.",
121781
- // SelectObject.component.vue
121981
+ // SelectObject.tsx
121782
121982
  // select: as above
121783
121983
  invalid_selectobject_values: "The definition provided to this component has values of the wrong from. It can only be an array of JSON-LD objects and each object, at a minimum, must have '@id', '@type' and 'name' defined.",
121784
- // Geo.component.vue
121984
+ // Geo.tsx
121785
121985
  define_location: "Define a location by selecting on the map",
121786
121986
  center_map: "center map",
121787
121987
  select_region: "select region",
@@ -121792,9 +121992,9 @@ const en = {
121792
121992
  provide_name_for_location: "Please provide a name for this location - optional",
121793
121993
  provide_name_for_location_error: "You need to provide a name for this location",
121794
121994
  select_existing_location: "Select a location that has already been defined",
121795
- // Value.component.vue
121995
+ // Value.tsx
121796
121996
  invalid_value_value: "The supplied value '{{value}}' is invalid. It can only be a string.",
121797
- // AutoComplete.component.vue
121997
+ // AutoComplete.tsx
121798
121998
  select_existing_or_create_new: "select an existing entity or create a new one",
121799
121999
  create_new_of_type: "Create new {{type}}",
121800
122000
  external_lookup_timeout_error: "External Lookup Timeout",
@@ -121805,7 +122005,7 @@ const en = {
121805
122005
  associate_user_created_entity: "Associate a user created entity",
121806
122006
  associate_from_datapack: "Associate a verified entity from a datapack",
121807
122007
  create_new_entity: "Create new entity",
121808
- // AddControl.component.vue
122008
+ // AddControl.tsx
121809
122009
  select_a_type_to_add: "Select a type to add",
121810
122010
  // Shell2.tsx
121811
122011
  add_profile_button_tooltip: "Add a new profile",
@@ -121813,21 +122013,120 @@ const en = {
121813
122013
  switch_to_label_view: "Switch to default view",
121814
122014
  // EntityType.tsx
121815
122015
  select_a_class_to_add: "Select a class to add",
121816
- // PaginateLinkedEntities.component.vue
122016
+ // PaginateLinkedEntities.tsx
121817
122017
  filter_the_entities: "Filter the entities",
121818
122018
  pagination_total: "Total: {{total}}",
121819
- // RenderEntityProperty.component.vue
122019
+ // EntityProperty.tsx
121820
122020
  not_defined_in_profile: "not defined in profile",
121821
- // RenderReverseConnections.component.vue
122021
+ // RenderReverseConnections.tsx
121822
122022
  // search_for_connection: defined before
121823
- links_to_this_entity: "Links to this entity:"
122023
+ links_to_this_entity: "Links to this entity:",
122024
+ // AiEditedFieldBadge.tsx
122025
+ ai_edited_by_ai: "Edited by AI",
122026
+ ai_deleted_by_ai: "Deleted by AI",
122027
+ // AiApprovalStepperHeader.tsx
122028
+ ai_field_one: "field",
122029
+ ai_field_other: "fields",
122030
+ ai_entity_one: "entity",
122031
+ ai_entity_other: "entities",
122032
+ ai_changes_remaining_aria: "AI changes remaining",
122033
+ ai_remaining_review_message_one: "{{fieldCount}} AI field still needs review in {{entityCount}} other {{entityLabel}}",
122034
+ ai_remaining_review_message_other: "{{fieldCount}} AI fields still need review in {{entityCount}} other {{entityLabel}}",
122035
+ ai_review_next: "Review next",
122036
+ ai_changes_need_review: "AI changes need review",
122037
+ ai_changes_need_review_property: "AI changes need review: {{property}}",
122038
+ ai_change_review_aria: "AI change review",
122039
+ ai_review_next_entity_tooltip: "Review the next entity with pending AI changes",
122040
+ ai_no_other_entities_need_review: "No other entities need AI review",
122041
+ ai_accept_all_tooltip: "Accept every pending AI change in this entity",
122042
+ ai_accept_all: "Accept all",
122043
+ ai_reject_all_tooltip: "Restore previous values for every pending AI change in this entity",
122044
+ ai_reject_all: "Reject all",
122045
+ ai_pending_field_navigation_aria: "Pending AI field navigation",
122046
+ ai_previous_pending_field: "Previous pending field",
122047
+ ai_previous_pending_field_aria: "Previous pending AI field",
122048
+ ai_next_pending_field: "Next pending field",
122049
+ ai_next_pending_field_aria: "Next pending AI field",
122050
+ // AiEntityReviewSummary.tsx
122051
+ ai_fields_to_review_one: "{{count}} field to review",
122052
+ ai_fields_to_review_other: "{{count}} fields to review",
122053
+ ai_show_entity_diff: "Show entity diff",
122054
+ ai_show_entity_diff_aria: "Show AI entity diff",
122055
+ ai_review_entity: "Review entity",
122056
+ // AiEntityDiffView.tsx
122057
+ ai_empty_value: "empty",
122058
+ ai_deleted_entity_title: "AI deleted entity: {{entityId}}",
122059
+ ai_unlinked_entity_title: "AI unlinked entity: {{entityId}}",
122060
+ ai_edited_entity_title: "AI edited entity: {{entityId}}",
122061
+ ai_hide_entity_diff: "Hide entity diff",
122062
+ ai_hide_entity_diff_aria: "Hide AI entity diff",
122063
+ ai_approve_deletion_tooltip: "Approve this AI deletion",
122064
+ ai_approve_unlink_tooltip: "Approve this AI unlink",
122065
+ ai_accept_entity_edits_tooltip: "Accept every AI edit for this entity",
122066
+ ai_delete_entity: "Delete entity",
122067
+ ai_unlink_entity: "Unlink entity",
122068
+ ai_accept_edit: "Accept edit",
122069
+ ai_restore_deleted_entity_tooltip: "Restore this entity and mark the deletion reviewed",
122070
+ ai_restore_link_tooltip: "Restore this link and mark the unlink reviewed",
122071
+ ai_restore_entity_values_tooltip: "Restore previous values for this entity",
122072
+ ai_keep_entity: "Keep entity",
122073
+ ai_restore_link: "Restore link",
122074
+ ai_reject_edit: "Reject edit",
122075
+ // AiFieldDiffView.tsx
122076
+ ai_field_diff_aria: "AI field diff",
122077
+ ai_proposed_deletion: "Proposed deletion",
122078
+ ai_proposed_change: "Proposed change",
122079
+ ai_edit_chip: "AI edit",
122080
+ // AI review controls
122081
+ ai_delete_badge: "AI delete",
122082
+ ai_suggestion_badge: "AI suggestion",
122083
+ ai_unlink_badge: "AI unlink",
122084
+ ai_hide_diff: "Hide diff",
122085
+ ai_show_diff: "Show diff",
122086
+ ai_hide_ai_diff_aria: "Hide AI diff",
122087
+ ai_show_ai_diff_aria: "Show AI diff",
122088
+ ai_approve_suggested_value_tooltip: "Approve this AI-suggested value",
122089
+ ai_restore_previous_value_tooltip: "Restore the previous value and mark this suggestion reviewed",
122090
+ ai_delete: "Delete",
122091
+ ai_accept: "Accept",
122092
+ ai_restore: "Restore",
122093
+ ai_reject: "Reject",
122094
+ // DeletedLinkedEntityCard.tsx
122095
+ ai_fields_can_be_restored_one: "{{count}} field can be restored.",
122096
+ ai_fields_can_be_restored_other: "{{count}} fields can be restored.",
122097
+ ai_hide_deleted_fields: "Hide deleted fields",
122098
+ ai_show_deleted_fields: "Show deleted fields",
122099
+ ai_hide_deleted_fields_aria: "Hide deleted AI fields",
122100
+ ai_show_deleted_fields_aria: "Show deleted AI fields",
122101
+ // UnlinkedLinkedEntityCard.tsx
122102
+ ai_diff_label_entity: "entity",
122103
+ ai_diff_label_linked_from: "linked from",
122104
+ ai_hide_unlink_diff: "Hide unlink diff",
122105
+ ai_show_unlink_diff: "Show unlink diff",
122106
+ ai_hide_unlink_diff_aria: "Hide AI unlink diff",
122107
+ ai_show_unlink_diff_aria: "Show AI unlink diff",
122108
+ // LinkedEntityCard.tsx / DialogBrowseEntities.tsx
122109
+ ai_entity_was_added_by_ai: "Entity was added by AI",
122110
+ // QuickSettingsHeader.tsx
122111
+ quick_filter_settings_aria: "Quick filter settings",
122112
+ field_display_settings_aria: "Field display settings",
122113
+ hide_field_help: "Hide field help",
122114
+ show_field_help: "Show field help",
122115
+ show_empty_fields: "Show fields with no value",
122116
+ hide_empty_fields: "Hide fields with no value",
122117
+ show_all_fields: "Show all fields",
122118
+ show_ai_edited_fields: "Show AI-edited fields",
122119
+ filter_fields_by_name_or_value: "Filter fields by name or value",
122120
+ clear_field_filter: "Clear field filter",
122121
+ // EntityId.tsx
122122
+ open_in_new_tab: "Open in new tab"
121824
122123
  }
121825
122124
  };
121826
122125
  const hu = {
121827
122126
  translation: {
121828
122127
  hello_one: "szia világ",
121829
122128
  hello_other: "sziasztok világok",
121830
- // RenderControls.component.vue
122129
+ // RenderControls.tsx
121831
122130
  root_dataset_label: "Gyökér adatcsomag",
121832
122131
  add_label: "Új elem",
121833
122132
  edit_context_label: "Kontextus szerkesztése",
@@ -121843,56 +122142,57 @@ const hu = {
121843
122142
  edit_context: "Kontextus szerkesztése",
121844
122143
  preview_crate: "Csomag előnézete",
121845
122144
  browse_entities: "Entitások böngészése",
121846
- // DialogAddProperty.component.vue
122145
+ // DialogAddProperty.tsx
121847
122146
  filter_attribute_set: "Attribútumok szűrése",
121848
- // DialogEditContext.component.vue
122147
+ // DialogEditContext.tsx
121849
122148
  save_label: "Mentés",
121850
- // DialogPreviewCrate.component.vue
122149
+ // DialogPreviewCrate.tsx
121851
122150
  preview_loading: "betöltés ...",
121852
- // DialogBrowseEntities.component.vue
122151
+ // DialogBrowseEntities.tsx
121853
122152
  search_for_connection: "Kapcsolt entitás keresése",
121854
122153
  filter_by_type: "Típus szerinti szűrés",
121855
- // DialogSaveCrateAsTemplate.component.vue
122154
+ // DialogSaveCrateAsTemplate.tsx
121856
122155
  save_template_prompt: "Csomag mentése mintaként",
121857
122156
  provide_name_for_template: "minta neve",
121858
- // RenderEntityName.component.vue
122157
+ // EntityName.tsx
121859
122158
  name_field_label: "Név",
121860
122159
  name_field_help: "Az entitás rövid, leíró neve",
121861
- // Add.component.vue
122160
+ type_field_label: "Típus",
122161
+ // Add.tsx
121862
122162
  associate_existing_prompt: "Egy létező '{{addType}}' társítása (név vagy azonosító alapú kereséssel) vagy egy új '{{addType}}' létrehozása a név megadásával",
121863
122163
  associate_any_prompt: "Bármely entitás hozzárendelése (azonosító vagy név alapján)",
121864
122164
  add_text: "Szöveg hozzáadása",
121865
- // Text.component.vue
122165
+ // Text.tsx
121866
122166
  invalid_type_for_text: "'{{type}}' típus nem használható ezzel a komponenssel. A típus csak 'text' vagy 'textarea' lehet",
121867
122167
  text_constraints_error_message: "A megadott érték nem felel meg a következő megszorításoknak: {{- value}}, vagy érvénytelen.",
121868
- // Date.component.vue
122168
+ // Date.tsx
121869
122169
  pick_a_date: "Válassz dátumot!",
121870
122170
  invalid_date_value: "A megadott dátum '{{value}}' nem megfelelő. Az elvárt dátum formátum: YYYY-MM-DD vagy egy ISO dátum, pl. 2021-03-22 or 2022-09-28T02:20:56.521Z.",
121871
- // DateTime.component.vue
122171
+ // DateTime.tsx
121872
122172
  pick_a_datetime: "Válassz dátumot és időt!",
121873
122173
  invalid_datetime_value: "A megadott dátum/idő '{{value}}' nem megfelelő. Az elvárt dátum/idő formátum: YYYY-MM-DD HH:mm:ss vagy egy ISO dátum, pl. 2021-03-22 03:23:00 or 2022-09-28T02:20:56.521Z.",
121874
- // Time.component.vue
122174
+ // Time.tsx
121875
122175
  provide_time: "Add meg az időt!",
121876
122176
  invalid_time_value: "A megadott érték '{{value}}' nem megfelelő. Az elvárt idő formátum: HH:mm::ss. pl. 09:03:59",
121877
- // Number.component.vue
122177
+ // Number.tsx
121878
122178
  invalid_number_value: "A megadott érték '{{value}}' nem megfelelő. Az értéket String vagy Number típusként kell megadni",
121879
122179
  number_constraints_error_message: "A megadott szám nem felel meg a következő megszorításoknak: {{value}}",
121880
- // Select.component.vue
122180
+ // Select.tsx
121881
122181
  select: "Válassz!",
121882
122182
  invalid_select_value: "A komponensnek adott definíció értékei nem megfelelő formátumban vannak. Csak karakterláncokból álló tömb lehet.",
121883
- // Url.component.vue
122183
+ // Url.tsx
121884
122184
  invalid_url_value: "A bejegyzésnek érvényes URL-nek kell lennie. Az elfogadott protokollok: http, https, ftp, ftps és arcp.",
121885
- // Boolean.component.vue
122185
+ // Boolean.tsx
121886
122186
  true_label: "Igaz",
121887
122187
  false_label: "Hamis",
121888
- // SelectUrl.component.vue
122188
+ // SelectUrl.tsx
121889
122189
  // select: as above
121890
122190
  invalid_selecturl_value: "A megadott '{{value}}' érték nem megfelelő formátumú. Csak érvényes URL lehet.",
121891
122191
  invalid_selecturl_values: "A komponensnek adott definíció értékei nem megfelelő formátumban vannak. Csak olyan karakterláncokból álló tömb lehet, amelyek mindegyike érvényes URL.",
121892
- // SelectObject.component.vue
122192
+ // SelectObject.tsx
121893
122193
  // select: as above
121894
122194
  invalid_selectobject_values: "A komponensnek adott definíció értékei nem megfelelő formátumban vannak. Csak JSON-LD objektumokból álló tömb lehet, és minden objektumnak legalább '@id', '@type' és 'name' meghatározással kell rendelkeznie.",
121895
- // Geo.component.vue
122195
+ // Geo.tsx
121896
122196
  define_location: "Határozz meg egy helyet a térképen történő kiválasztással!",
121897
122197
  center_map: "térkép középre állítása",
121898
122198
  select_region: "régió kiválasztása",
@@ -121903,9 +122203,9 @@ const hu = {
121903
122203
  provide_name_for_location: "Adj nevet ennek a helynek!",
121904
122204
  provide_name_for_location_error: "A hely nevének megadása kötelező!",
121905
122205
  select_existing_location: "Válassz egy már meghatározott helyet a csomagban!",
121906
- // Value.component.vue
122206
+ // Value.tsx
121907
122207
  invalid_value_value: "A megadott '{{value}}' érték érvénytelen. Csak karakterlánc lehet.",
121908
- // AutoComplete.component.vue
122208
+ // AutoComplete.tsx
121909
122209
  select_existing_or_create_new: "válassz egy meglévő entitást vagy hozz létre egy újat",
121910
122210
  create_new_of_type: "Új {{type}} létrehozása",
121911
122211
  external_lookup_timeout_error: "Külső lekérdezési időtúllépés",
@@ -121916,7 +122216,7 @@ const hu = {
121916
122216
  associate_user_created_entity: "Kapcsolj egy felhasználó által létrehozott entitást",
121917
122217
  associate_from_datapack: "Kapcsolj egy ellenőrzött entitást egy adatcsomagból",
121918
122218
  create_new_entity: "Új entitás létrehozása",
121919
- // AddControl.component.vue
122219
+ // AddControl.tsx
121920
122220
  select_a_type_to_add: "Válassz hozzáadandó típust",
121921
122221
  // Shell2.tsx
121922
122222
  add_profile_button_tooltip: "Új profil hozzáadása",
@@ -121924,14 +122224,113 @@ const hu = {
121924
122224
  switch_to_label_view: "Alap nézetre váltás",
121925
122225
  // EntityType.tsx
121926
122226
  select_a_class_to_add: "Válassz hozzáadandó osztályt",
121927
- // PaginateLinkedEntities.component.vue
122227
+ // PaginateLinkedEntities.tsx
121928
122228
  filter_the_entities: "Entitások szűrése",
121929
122229
  pagination_total: "Összesen: {{total}}",
121930
- // RenderEntityProperty.component.vue
122230
+ // EntityProperty.tsx
121931
122231
  not_defined_in_profile: "nincs definiálva a profilban",
121932
- // RenderReverseConnections.component.vue
122232
+ // RenderReverseConnections.tsx
121933
122233
  // search_for_connection: defined before
121934
- links_to_this_entity: "Entitásra mutató hivatkozások:"
122234
+ links_to_this_entity: "Entitásra mutató hivatkozások:",
122235
+ // AiEditedFieldBadge.tsx
122236
+ ai_edited_by_ai: "AI által szerkesztve",
122237
+ ai_deleted_by_ai: "AI által törölve",
122238
+ // AiApprovalStepperHeader.tsx
122239
+ ai_field_one: "mező",
122240
+ ai_field_other: "mező",
122241
+ ai_entity_one: "entitás",
122242
+ ai_entity_other: "entitás",
122243
+ ai_changes_remaining_aria: "Fennmaradó AI módosítások",
122244
+ ai_remaining_review_message_one: "{{fieldCount}} AI mező még ellenőrzésre vár {{entityCount}} másik {{entityLabel}} esetén",
122245
+ ai_remaining_review_message_other: "{{fieldCount}} AI mező még ellenőrzésre vár {{entityCount}} másik {{entityLabel}} esetén",
122246
+ ai_review_next: "Következő ellenőrzése",
122247
+ ai_changes_need_review: "AI módosítások ellenőrzésre várnak",
122248
+ ai_changes_need_review_property: "AI módosítások ellenőrzésre várnak: {{property}}",
122249
+ ai_change_review_aria: "AI módosítás ellenőrzése",
122250
+ ai_review_next_entity_tooltip: "Következő, AI módosítással rendelkező entitás ellenőrzése",
122251
+ ai_no_other_entities_need_review: "Nincs több AI ellenőrzésre váró entitás",
122252
+ ai_accept_all_tooltip: "Az entitás összes függőben lévő AI módosításának elfogadása",
122253
+ ai_accept_all: "Összes elfogadása",
122254
+ ai_reject_all_tooltip: "Az entitás összes függőben lévő AI módosításának visszaállítása az előző értékre",
122255
+ ai_reject_all: "Összes elutasítása",
122256
+ ai_pending_field_navigation_aria: "Függőben lévő AI mezők navigációja",
122257
+ ai_previous_pending_field: "Előző függő mező",
122258
+ ai_previous_pending_field_aria: "Előző függőben lévő AI mező",
122259
+ ai_next_pending_field: "Következő függő mező",
122260
+ ai_next_pending_field_aria: "Következő függőben lévő AI mező",
122261
+ // AiEntityReviewSummary.tsx
122262
+ ai_fields_to_review_one: "{{count}} mező ellenőrzésre vár",
122263
+ ai_fields_to_review_other: "{{count}} mező ellenőrzésre vár",
122264
+ ai_show_entity_diff: "Entitás eltéréseinek megjelenítése",
122265
+ ai_show_entity_diff_aria: "AI entitáseltérés megjelenítése",
122266
+ ai_review_entity: "Entitás ellenőrzése",
122267
+ // AiEntityDiffView.tsx
122268
+ ai_empty_value: "üres",
122269
+ ai_deleted_entity_title: "AI által törölt entitás: {{entityId}}",
122270
+ ai_unlinked_entity_title: "AI által leválasztott entitás: {{entityId}}",
122271
+ ai_edited_entity_title: "AI által szerkesztett entitás: {{entityId}}",
122272
+ ai_hide_entity_diff: "Entitáseltérés elrejtése",
122273
+ ai_hide_entity_diff_aria: "AI entitáseltérés elrejtése",
122274
+ ai_approve_deletion_tooltip: "AI törlés jóváhagyása",
122275
+ ai_approve_unlink_tooltip: "AI leválasztás jóváhagyása",
122276
+ ai_accept_entity_edits_tooltip: "Az entitás összes AI szerkesztésének elfogadása",
122277
+ ai_delete_entity: "Entitás törlése",
122278
+ ai_unlink_entity: "Entitás leválasztása",
122279
+ ai_accept_edit: "Szerkesztés elfogadása",
122280
+ ai_restore_deleted_entity_tooltip: "Entitás visszaállítása és a törlés ellenőrzöttként jelölése",
122281
+ ai_restore_link_tooltip: "Kapcsolat visszaállítása és a leválasztás ellenőrzöttként jelölése",
122282
+ ai_restore_entity_values_tooltip: "Az entitás előző értékeinek visszaállítása",
122283
+ ai_keep_entity: "Entitás megtartása",
122284
+ ai_restore_link: "Kapcsolat visszaállítása",
122285
+ ai_reject_edit: "Szerkesztés elutasítása",
122286
+ // AiFieldDiffView.tsx
122287
+ ai_field_diff_aria: "AI mezőeltérés",
122288
+ ai_proposed_deletion: "Javasolt törlés",
122289
+ ai_proposed_change: "Javasolt módosítás",
122290
+ ai_edit_chip: "AI szerkesztés",
122291
+ // AI review controls
122292
+ ai_delete_badge: "AI törlés",
122293
+ ai_suggestion_badge: "AI javaslat",
122294
+ ai_unlink_badge: "AI leválasztás",
122295
+ ai_hide_diff: "Eltérés elrejtése",
122296
+ ai_show_diff: "Eltérés megjelenítése",
122297
+ ai_hide_ai_diff_aria: "AI eltérés elrejtése",
122298
+ ai_show_ai_diff_aria: "AI eltérés megjelenítése",
122299
+ ai_approve_suggested_value_tooltip: "AI által javasolt érték jóváhagyása",
122300
+ ai_restore_previous_value_tooltip: "Előző érték visszaállítása és a javaslat ellenőrzöttként jelölése",
122301
+ ai_delete: "Törlés",
122302
+ ai_accept: "Elfogadás",
122303
+ ai_restore: "Visszaállítás",
122304
+ ai_reject: "Elutasítás",
122305
+ // DeletedLinkedEntityCard.tsx
122306
+ ai_fields_can_be_restored_one: "{{count}} mező visszaállítható.",
122307
+ ai_fields_can_be_restored_other: "{{count}} mező visszaállítható.",
122308
+ ai_hide_deleted_fields: "Törölt mezők elrejtése",
122309
+ ai_show_deleted_fields: "Törölt mezők megjelenítése",
122310
+ ai_hide_deleted_fields_aria: "Törölt AI mezők elrejtése",
122311
+ ai_show_deleted_fields_aria: "Törölt AI mezők megjelenítése",
122312
+ // UnlinkedLinkedEntityCard.tsx
122313
+ ai_diff_label_entity: "entitás",
122314
+ ai_diff_label_linked_from: "kapcsolva innen",
122315
+ ai_hide_unlink_diff: "Leválasztási eltérés elrejtése",
122316
+ ai_show_unlink_diff: "Leválasztási eltérés megjelenítése",
122317
+ ai_hide_unlink_diff_aria: "AI leválasztási eltérés elrejtése",
122318
+ ai_show_unlink_diff_aria: "AI leválasztási eltérés megjelenítése",
122319
+ // LinkedEntityCard.tsx / DialogBrowseEntities.tsx
122320
+ ai_entity_was_added_by_ai: "Az entitást AI adta hozzá",
122321
+ // QuickSettingsHeader.tsx
122322
+ quick_filter_settings_aria: "Gyors szűrési beállítások",
122323
+ field_display_settings_aria: "Mezőmegjelenítési beállítások",
122324
+ hide_field_help: "Mezősúgó elrejtése",
122325
+ show_field_help: "Mezősúgó megjelenítése",
122326
+ show_empty_fields: "Érték nélküli mezők megjelenítése",
122327
+ hide_empty_fields: "Érték nélküli mezők elrejtése",
122328
+ show_all_fields: "Összes mező megjelenítése",
122329
+ show_ai_edited_fields: "AI által szerkesztett mezők megjelenítése",
122330
+ filter_fields_by_name_or_value: "Mezők szűrése név vagy érték alapján",
122331
+ clear_field_filter: "Mezőszűrő törlése",
122332
+ // EntityId.tsx
122333
+ open_in_new_tab: "Megnyitás új lapon"
121935
122334
  }
121936
122335
  };
121937
122336
  instance.use(initReactI18next).init({
@@ -122793,7 +123192,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
122793
123192
  }) : null
122794
123193
  );
122795
123194
  var CacheProvider = EmotionCacheContext.Provider;
122796
- const version = "0.1.32-test3";
123195
+ const version = "0.1.32-test5";
122797
123196
  const pkg = {
122798
123197
  version
122799
123198
  };
@@ -123005,11 +123404,48 @@ function DescriboCrateBuilderInner(props) {
123005
123404
  value
123006
123405
  });
123007
123406
  }, [approvalState, onSaveRoCrateApproval]);
123407
+ const markApprovalEntityAndPropertyApproved = useCallback((params) => {
123408
+ const { entityId: entityId2, propertyEntityId, propertyName: propertyName2, decision, value } = params;
123409
+ if (!entityId2) return;
123410
+ let nextApprovalState = approvalState;
123411
+ const approvalRecords = [];
123412
+ let changed = false;
123413
+ if (propertyEntityId && propertyName2) {
123414
+ const propertyResult = markApprovalRecordsApproved(
123415
+ nextApprovalState,
123416
+ propertyEntityId,
123417
+ propertyName2,
123418
+ decision
123419
+ );
123420
+ nextApprovalState = propertyResult.nextApprovalState;
123421
+ approvalRecords.push(...propertyResult.approvalRecords);
123422
+ changed = changed || propertyResult.changed;
123423
+ }
123424
+ const entityResult = markEntityApprovalRecordsApproved(
123425
+ nextApprovalState,
123426
+ entityId2,
123427
+ decision
123428
+ );
123429
+ nextApprovalState = entityResult.nextApprovalState;
123430
+ approvalRecords.push(...entityResult.approvalRecords);
123431
+ changed = changed || entityResult.changed;
123432
+ if (!changed && approvalRecords.length === 0) return;
123433
+ setApprovalState(nextApprovalState);
123434
+ onSaveRoCrateApproval == null ? void 0 : onSaveRoCrateApproval({
123435
+ roCrateApproval: nextApprovalState,
123436
+ entityId: entityId2,
123437
+ propertyName: propertyName2 ?? "*",
123438
+ decision,
123439
+ approvalRecords,
123440
+ value
123441
+ });
123442
+ }, [approvalState, onSaveRoCrateApproval]);
123008
123443
  const approvalContextValue = useMemo$1(() => ({
123009
123444
  roCrateApproval: approvalState,
123010
123445
  markApprovalPropertyApproved,
123011
- markApprovalEntityApproved
123012
- }), [approvalState, markApprovalEntityApproved, markApprovalPropertyApproved]);
123446
+ markApprovalEntityApproved,
123447
+ markApprovalEntityAndPropertyApproved
123448
+ }), [approvalState, markApprovalEntityAndPropertyApproved, markApprovalEntityApproved, markApprovalPropertyApproved]);
123013
123449
  const configuration = useMemo$1(() => {
123014
123450
  const config2 = {
123015
123451
  enableContextEditor,