@arpproject/recrate 0.1.47 → 0.1.48

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.
@@ -3,6 +3,7 @@ export declare const ICON_TAB_PANE_WIDTH = 80;
3
3
  export declare const MIN_LABEL_TAB_PANE_WIDTH = 100;
4
4
  export declare const MAX_LABEL_TAB_PANE_WIDTH = 250;
5
5
  export declare const getProfileTabKey: (tab: any) => string;
6
+ export declare const localizeProfileTabLabel: (tab: any, translate: (key: string) => string) => string;
6
7
  export declare const isProfileTab: (tab: any) => boolean;
7
8
  export declare const findAddedProfileTab: (tabs: any[], previousTabKeys: Set<string>) => any;
8
9
  export declare const isAboutTab: (tab: any) => boolean;
@@ -0,0 +1,2 @@
1
+ export declare const TYPE_LABEL_KEYS: Record<string, string>;
2
+ export declare function localizeTypeLabel(type: string, profileLabel: string | undefined, translate: (key: string) => string): string;
@@ -104,6 +104,7 @@ declare namespace en {
104
104
  let preview_loading: string;
105
105
  let search_for_connection: string;
106
106
  let filter_by_type: string;
107
+ let save_template: string;
107
108
  let save_template_prompt: string;
108
109
  let provide_name_for_template: string;
109
110
  let name_field_label: string;
@@ -112,6 +113,30 @@ declare namespace en {
112
113
  let associate_existing_prompt: string;
113
114
  let associate_any_prompt: string;
114
115
  let add_text: string;
116
+ let bulk_add_label: string;
117
+ let bulk_add_no_lookup_warning: string;
118
+ let bulk_add_delete_row: string;
119
+ let bulk_add_add_row: string;
120
+ let bulk_add_create_entities: string;
121
+ let type_text: string;
122
+ let type_text_area: string;
123
+ let type_date: string;
124
+ let type_date_time: string;
125
+ let type_time: string;
126
+ let type_number: string;
127
+ let type_float: string;
128
+ let type_integer: string;
129
+ let type_url: string;
130
+ let type_value: string;
131
+ let type_select: string;
132
+ let type_select_url: string;
133
+ let type_select_object: string;
134
+ let type_geo: string;
135
+ let type_geometry: string;
136
+ let type_geo_coordinates: string;
137
+ let type_geo_shape: string;
138
+ let type_boolean: string;
139
+ let type_any: string;
115
140
  let invalid_type_for_text: string;
116
141
  let text_constraints_error_message: string;
117
142
  let pick_a_date: string;
@@ -127,6 +152,7 @@ declare namespace en {
127
152
  let invalid_url_value: string;
128
153
  let true_label: string;
129
154
  let false_label: string;
155
+ let no_data: string;
130
156
  let invalid_selecturl_value: string;
131
157
  let invalid_selecturl_values: string;
132
158
  let invalid_selectobject_values: string;
@@ -140,6 +166,10 @@ declare namespace en {
140
166
  let provide_name_for_location: string;
141
167
  let provide_name_for_location_error: string;
142
168
  let select_existing_location: string;
169
+ let save_template_label: string;
170
+ let template_preview: string;
171
+ let template_depth: string;
172
+ let no_entity_selected: string;
143
173
  let invalid_value_value: string;
144
174
  let select_existing_or_create_new: string;
145
175
  let create_new_of_type: string;
@@ -157,6 +187,8 @@ declare namespace en {
157
187
  let profile_actions_aria: string;
158
188
  let profile_sections_aria: string;
159
189
  let remove_profile_aria: string;
190
+ let about_tab_label: string;
191
+ let other_tab_label: string;
160
192
  let scroll_profile_tabs_up: string;
161
193
  let scroll_profile_tabs_down: string;
162
194
  let switch_to_icon_view: string;
@@ -104,6 +104,7 @@ declare namespace hu {
104
104
  let preview_loading: string;
105
105
  let search_for_connection: string;
106
106
  let filter_by_type: string;
107
+ let save_template: string;
107
108
  let save_template_prompt: string;
108
109
  let provide_name_for_template: string;
109
110
  let name_field_label: string;
@@ -112,6 +113,30 @@ declare namespace hu {
112
113
  let associate_existing_prompt: string;
113
114
  let associate_any_prompt: string;
114
115
  let add_text: string;
116
+ let bulk_add_label: string;
117
+ let bulk_add_no_lookup_warning: string;
118
+ let bulk_add_delete_row: string;
119
+ let bulk_add_add_row: string;
120
+ let bulk_add_create_entities: string;
121
+ let type_text: string;
122
+ let type_text_area: string;
123
+ let type_date: string;
124
+ let type_date_time: string;
125
+ let type_time: string;
126
+ let type_number: string;
127
+ let type_float: string;
128
+ let type_integer: string;
129
+ let type_url: string;
130
+ let type_value: string;
131
+ let type_select: string;
132
+ let type_select_url: string;
133
+ let type_select_object: string;
134
+ let type_geo: string;
135
+ let type_geometry: string;
136
+ let type_geo_coordinates: string;
137
+ let type_geo_shape: string;
138
+ let type_boolean: string;
139
+ let type_any: string;
115
140
  let invalid_type_for_text: string;
116
141
  let text_constraints_error_message: string;
117
142
  let pick_a_date: string;
@@ -127,6 +152,7 @@ declare namespace hu {
127
152
  let invalid_url_value: string;
128
153
  let true_label: string;
129
154
  let false_label: string;
155
+ let no_data: string;
130
156
  let invalid_selecturl_value: string;
131
157
  let invalid_selecturl_values: string;
132
158
  let invalid_selectobject_values: string;
@@ -140,6 +166,10 @@ declare namespace hu {
140
166
  let provide_name_for_location: string;
141
167
  let provide_name_for_location_error: string;
142
168
  let select_existing_location: string;
169
+ let save_template_label: string;
170
+ let template_preview: string;
171
+ let template_depth: string;
172
+ let no_entity_selected: string;
143
173
  let invalid_value_value: string;
144
174
  let select_existing_or_create_new: string;
145
175
  let create_new_of_type: string;
@@ -157,6 +187,8 @@ declare namespace hu {
157
187
  let profile_actions_aria: string;
158
188
  let profile_sections_aria: string;
159
189
  let remove_profile_aria: string;
190
+ let about_tab_label: string;
191
+ let other_tab_label: string;
160
192
  let scroll_profile_tabs_up: string;
161
193
  let scroll_profile_tabs_down: string;
162
194
  let switch_to_icon_view: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -60934,6 +60934,18 @@ const ICON_TAB_PANE_WIDTH = 80;
60934
60934
  const MIN_LABEL_TAB_PANE_WIDTH = 100;
60935
60935
  const MAX_LABEL_TAB_PANE_WIDTH = 250;
60936
60936
  const getProfileTabKey = (tab) => String((tab == null ? void 0 : tab.profileUrl) || (tab == null ? void 0 : tab.name) || "");
60937
+ const localizeProfileTabLabel = (tab, translate) => {
60938
+ const name2 = String((tab == null ? void 0 : tab.name) || "").trim().toLowerCase();
60939
+ const rawLabel = String((tab == null ? void 0 : tab.label) || (tab == null ? void 0 : tab.name) || "");
60940
+ const label = rawLabel.trim().toLowerCase();
60941
+ if (name2 === "about" && label === "about") {
60942
+ return translate("about_tab_label");
60943
+ }
60944
+ if (["overflow", "other"].includes(name2) && ["...", "other", "overflow"].includes(label)) {
60945
+ return translate("other_tab_label");
60946
+ }
60947
+ return rawLabel;
60948
+ };
60937
60949
  const ABOUT_CORE_PROPERTIES = ["@id", "@type", "name"];
60938
60950
  const isAboutCoreProperty = (property) => ABOUT_CORE_PROPERTIES.includes(property);
60939
60951
  const isProfileTab = (tab) => {
@@ -61049,7 +61061,7 @@ const ProfileRailActions = ({
61049
61061
  type: "default",
61050
61062
  shape: "circle",
61051
61063
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$v, {}),
61052
- "aria-label": "Add Profile",
61064
+ "aria-label": String(t2("add_profile_button_aria")),
61053
61065
  "aria-controls": "add-property-panel",
61054
61066
  "aria-expanded": showAddPanel,
61055
61067
  onClick: onAddNewProfile
@@ -61074,8 +61086,9 @@ const ProfileTabRail = ({
61074
61086
  onScrollTabRail,
61075
61087
  onUpdateTabRailScrollState
61076
61088
  }) => {
61089
+ const { t: t2 } = useTranslation();
61077
61090
  if (actionsOnly) {
61078
- return /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: "recrate-tab-rail recrate-tab-rail-actions-only", "aria-label": "Profile actions", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
61091
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: "recrate-tab-rail recrate-tab-rail-actions-only", "aria-label": String(t2("profile_actions_aria")), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
61079
61092
  ProfileRailActions,
61080
61093
  {
61081
61094
  iconView,
@@ -61089,7 +61102,7 @@ const ProfileTabRail = ({
61089
61102
  "nav",
61090
61103
  {
61091
61104
  className: `recrate-tab-rail ${tabRailScrollState.canScrollUp ? "recrate-tab-rail-can-scroll-up" : ""} ${tabRailScrollState.canScrollDown ? "recrate-tab-rail-can-scroll-down" : ""}`,
61092
- "aria-label": "Profile sections",
61105
+ "aria-label": String(t2("profile_sections_aria")),
61093
61106
  children: [
61094
61107
  /* @__PURE__ */ jsxRuntimeExports.jsx(
61095
61108
  ProfileRailActions,
@@ -61129,14 +61142,14 @@ const ProfileTabRail = ({
61129
61142
  onMouseLeave: () => onHoveredTabKeyChange == null ? void 0 : onHoveredTabKeyChange(null),
61130
61143
  children: iconView ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recrate-tab-icon", children: idx + 1 }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
61131
61144
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "recrate-tab-rail-row", children: [
61132
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recrate-tab-rail-title", children: tab.label || tab.name }),
61145
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recrate-tab-rail-title", children: localizeProfileTabLabel(tab, t2) }),
61133
61146
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "recrate-tab-rail-status", children: [
61134
61147
  tab.missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCircleXmark, size: "lg" }) }),
61135
61148
  tab.hasData && !tab.missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-green-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCircleCheck, size: "lg" }) }),
61136
61149
  /* @__PURE__ */ jsxRuntimeExports.jsx(
61137
61150
  Button$1,
61138
61151
  {
61139
- "aria-label": canRemove ? "Remove profile" : void 0,
61152
+ "aria-label": canRemove ? String(t2("remove_profile_aria")) : void 0,
61140
61153
  "aria-hidden": !canRemove,
61141
61154
  tabIndex: canRemove ? 0 : -1,
61142
61155
  type: "text",
@@ -61172,7 +61185,7 @@ const ProfileTabRail = ({
61172
61185
  size: "small",
61173
61186
  className: "recrate-tab-rail-scroll-button recrate-tab-rail-scroll-button-up",
61174
61187
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$u, {}),
61175
- "aria-label": "Scroll profile tabs up",
61188
+ "aria-label": String(t2("scroll_profile_tabs_up")),
61176
61189
  onClick: () => onScrollTabRail == null ? void 0 : onScrollTabRail("up")
61177
61190
  }
61178
61191
  ),
@@ -61184,7 +61197,7 @@ const ProfileTabRail = ({
61184
61197
  size: "small",
61185
61198
  className: "recrate-tab-rail-scroll-button recrate-tab-rail-scroll-button-down",
61186
61199
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$A, {}),
61187
- "aria-label": "Scroll profile tabs down",
61200
+ "aria-label": String(t2("scroll_profile_tabs_down")),
61188
61201
  onClick: () => onScrollTabRail == null ? void 0 : onScrollTabRail("down")
61189
61202
  }
61190
61203
  )
@@ -92870,6 +92883,34 @@ const DeleteProperty = ({
92870
92883
  }
92871
92884
  );
92872
92885
  };
92886
+ const TYPE_LABEL_KEYS = {
92887
+ Text: "type_text",
92888
+ TextArea: "type_text_area",
92889
+ Date: "type_date",
92890
+ DateTime: "type_date_time",
92891
+ Time: "type_time",
92892
+ Number: "type_number",
92893
+ Float: "type_float",
92894
+ Integer: "type_integer",
92895
+ URL: "type_url",
92896
+ Value: "type_value",
92897
+ Select: "type_select",
92898
+ SelectURL: "type_select_url",
92899
+ SelectObject: "type_select_object",
92900
+ Geo: "type_geo",
92901
+ Geometry: "type_geometry",
92902
+ GeoCoordinates: "type_geo_coordinates",
92903
+ GeoShape: "type_geo_shape",
92904
+ Boolean: "type_boolean",
92905
+ ANY: "type_any"
92906
+ };
92907
+ function localizeTypeLabel(type4, profileLabel, translate) {
92908
+ if (profileLabel && profileLabel !== type4) {
92909
+ return profileLabel;
92910
+ }
92911
+ const key = TYPE_LABEL_KEYS[type4];
92912
+ return key ? translate(key) : profileLabel || type4;
92913
+ }
92873
92914
  const AddControl = ({
92874
92915
  types: types2,
92875
92916
  selectedType,
@@ -92879,6 +92920,7 @@ const AddControl = ({
92879
92920
  onClose
92880
92921
  }) => {
92881
92922
  var _a2;
92923
+ const { t: t2 } = useTranslation();
92882
92924
  const profileManager = useContext(ProfileManagerContext);
92883
92925
  const state = useStateStore();
92884
92926
  const notOnlyPrimitives = lodashExports.difference(
@@ -92887,7 +92929,7 @@ const AddControl = ({
92887
92929
  );
92888
92930
  const showBulkAdd = ((_a2 = state.configuration) == null ? void 0 : _a2.enableBulkAdd) !== false && notOnlyPrimitives.length > 0;
92889
92931
  const getTypeLabelFromProfile = (type4) => {
92890
- return profileManager == null ? void 0 : profileManager.getTypeLabel(type4);
92932
+ return localizeTypeLabel(type4, profileManager == null ? void 0 : profileManager.getTypeLabel(type4), t2);
92891
92933
  };
92892
92934
  const toggle = (type4) => {
92893
92935
  if (selectedType === type4) {
@@ -92918,7 +92960,7 @@ const AddControl = ({
92918
92960
  ]
92919
92961
  }
92920
92962
  ) }, idx)),
92921
- showBulkAdd && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "m-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
92963
+ showBulkAdd && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "m-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
92922
92964
  Button$1,
92923
92965
  {
92924
92966
  onClick: handleBulkAdd,
@@ -92926,7 +92968,10 @@ const AddControl = ({
92926
92968
  size: "middle",
92927
92969
  className: "focus:outline-none focus:border-2 focus:border-green-600",
92928
92970
  icon: !selectedType || selectedType !== "bulkAdd" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$G, {}),
92929
- children: "  Bulk Add"
92971
+ children: [
92972
+ "  ",
92973
+ t2("bulk_add_label")
92974
+ ]
92930
92975
  }
92931
92976
  ) })
92932
92977
  ] });
@@ -93409,6 +93454,7 @@ const GeoInputComponent = ({
93409
93454
  onCreateEntity,
93410
93455
  onLinkEntity
93411
93456
  }) => {
93457
+ const { t: t2 } = useTranslation();
93412
93458
  const mapRef = useRef(null);
93413
93459
  const [mode, setMode] = useState("box");
93414
93460
  const [locationName, setLocationName] = useState("");
@@ -93517,8 +93563,8 @@ const GeoInputComponent = ({
93517
93563
  };
93518
93564
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col text-gray-600 recrate-property-type-geo", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col space-y-4", children: [
93519
93565
  existingEntities.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
93520
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 5, children: "Select Existing Location" }),
93521
- /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, { label: "Select", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
93566
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 5, children: t2("select_existing_location") }),
93567
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, { label: t2("select"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
93522
93568
  Select,
93523
93569
  {
93524
93570
  value: selectValue,
@@ -93530,12 +93576,12 @@ const GeoInputComponent = ({
93530
93576
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { className: "border border-gray-400" })
93531
93577
  ] }),
93532
93578
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col space-y-2", children: [
93533
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 5, children: "Define Location" }),
93579
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 5, children: t2("define_location") }),
93534
93580
  /* @__PURE__ */ jsxRuntimeExports.jsx(
93535
93581
  Input2,
93536
93582
  {
93537
93583
  size: "middle",
93538
- placeholder: "Provide name for location",
93584
+ placeholder: String(t2("provide_name_for_location")),
93539
93585
  value: locationName,
93540
93586
  onChange: (e3) => setLocationName(e3.target.value),
93541
93587
  onKeyDown: (e3) => {
@@ -93553,13 +93599,13 @@ const GeoInputComponent = ({
93553
93599
  updateHandlers();
93554
93600
  },
93555
93601
  children: [
93556
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "box", children: "Select Region" }),
93557
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "point", children: "Select Point" })
93602
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "box", children: t2("select_region") }),
93603
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "point", children: t2("select_point") })
93558
93604
  ]
93559
93605
  }
93560
93606
  ),
93561
- mode === "box" && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "pt-1 text-gray-600", children: "Press Shift and drag to select region" }),
93562
- mode === "point" && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "pt-1 text-gray-600", children: "Click on map to select point" })
93607
+ mode === "box" && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "pt-1 text-gray-600", children: t2("press_shift_drag_to_select") }),
93608
+ mode === "point" && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "pt-1 text-gray-600", children: t2("click_on_map_to_select_point") })
93563
93609
  ] })
93564
93610
  ] }),
93565
93611
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "map", className: "map-style", style: { width: 700, height: 500 } })
@@ -94057,6 +94103,7 @@ const AutoComplete = ({ type: type4, onLinkEntity, onCreateEntity }) => {
94057
94103
  };
94058
94104
  const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
94059
94105
  const { t: t2 } = useTranslation();
94106
+ const profileManager = useContext(ProfileManagerContext);
94060
94107
  const [selectedType, setSelectedType] = useState("");
94061
94108
  const [data, setData] = useState([
94062
94109
  { id: "", name: "" },
@@ -94091,7 +94138,7 @@ const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
94091
94138
  });
94092
94139
  };
94093
94140
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col space-y-2 m-1", children: [
94094
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 5, className: "my-1 text-lg text-center", children: "Note beforehand: This does not lookup existing entities." }),
94141
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 5, className: "my-1 text-lg text-center", children: t2("bulk_add_no_lookup_warning") }),
94095
94142
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
94096
94143
  /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: "@type" }),
94097
94144
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -94100,18 +94147,18 @@ const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
94100
94147
  value: selectedType,
94101
94148
  onChange: (value) => setSelectedType(value),
94102
94149
  style: { width: "100%" },
94103
- placeholder: "Select a type",
94150
+ placeholder: t2("select_a_type_to_add"),
94104
94151
  size: "middle",
94105
94152
  children: [
94106
- /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Option, { value: "", children: "Select a type" }),
94107
- availableTypes.map((type4) => /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Option, { value: type4, children: type4 }, type4))
94153
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Option, { value: "", children: t2("select_a_type_to_add") }),
94154
+ availableTypes.map((type4) => /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Option, { value: type4, children: localizeTypeLabel(type4, profileManager == null ? void 0 : profileManager.getTypeLabel(type4), t2) }, type4))
94108
94155
  ]
94109
94156
  }
94110
94157
  )
94111
94158
  ] }),
94112
94159
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { className: "flex-row space-x-1", children: [
94113
94160
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1/2", children: "@id" }),
94114
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1/2", children: "name" }),
94161
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1/2", children: t2("name_field_label") }),
94115
94162
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-12" })
94116
94163
  ] }),
94117
94164
  data.map((row, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { className: "flex-row space-x-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Space.Compact, { style: { width: "100%" }, children: [
@@ -94140,7 +94187,8 @@ const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
94140
94187
  variant: "solid",
94141
94188
  color: "red",
94142
94189
  onClick: () => deleteRow(idx),
94143
- icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$k, {})
94190
+ icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$k, {}),
94191
+ "aria-label": String(t2("bulk_add_delete_row"))
94144
94192
  }
94145
94193
  )
94146
94194
  ] }) }, idx)),
@@ -94151,7 +94199,7 @@ const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
94151
94199
  type: "primary",
94152
94200
  onClick: addRow,
94153
94201
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$v, {}),
94154
- children: "Add row"
94202
+ children: t2("bulk_add_add_row")
94155
94203
  }
94156
94204
  ),
94157
94205
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -94162,7 +94210,7 @@ const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
94162
94210
  color: "green",
94163
94211
  onClick: createEntities,
94164
94212
  disabled: !selectedType,
94165
- children: "Create these entities"
94213
+ children: t2("bulk_add_create_entities")
94166
94214
  }
94167
94215
  )
94168
94216
  ] })
@@ -94223,7 +94271,7 @@ const Add = ({
94223
94271
  }, [enableBulkAdd, addType]);
94224
94272
  const add2 = ({ type: type4 }) => {
94225
94273
  setAddType(type4);
94226
- setLocalisedAddType(profileManager == null ? void 0 : profileManager.getTypeLabel(type4));
94274
+ setLocalisedAddType(localizeTypeLabel(type4, profileManager == null ? void 0 : profileManager.getTypeLabel(type4), t2));
94227
94275
  };
94228
94276
  const bulkAdd = () => {
94229
94277
  setAddType("bulkAdd");
@@ -121544,7 +121592,7 @@ const DialogSaveEntityTemplate = ({
121544
121592
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
121545
121593
  Drawer2,
121546
121594
  {
121547
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 4, style: { margin: 0 }, children: "Save Entity Template" }),
121595
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { level: 4, style: { margin: 0 }, children: t2("save_entity_template_label") }),
121548
121596
  placement: "right",
121549
121597
  onClose,
121550
121598
  open,
@@ -121557,8 +121605,8 @@ const DialogSaveEntityTemplate = ({
121557
121605
  onChange: (e3) => setResolveDepth(e3.target.value),
121558
121606
  value: resolveDepth,
121559
121607
  children: [
121560
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "0", children: "Depth: 0" }),
121561
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "1", children: "Depth: 1" })
121608
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "0", children: t2("template_depth", { depth: 0 }) }),
121609
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "1", children: t2("template_depth", { depth: 1 }) })
121562
121610
  ]
121563
121611
  }
121564
121612
  ),
@@ -121571,12 +121619,12 @@ const DialogSaveEntityTemplate = ({
121571
121619
  onSaveEntityTemplate({ resolveDepth: parseInt(resolveDepth) });
121572
121620
  onClose();
121573
121621
  },
121574
- children: "Save Template"
121622
+ children: t2("save_template_label")
121575
121623
  }
121576
121624
  )
121577
121625
  ] }),
121578
121626
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, className: "flex-grow overflow-auto", children: [
121579
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { strong: true, className: "mb-2", children: "Template Preview" }),
121627
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { strong: true, className: "mb-2", children: t2("template_preview") }),
121580
121628
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded bg-gray-50 font-mono text-sm overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "whitespace-pre-wrap", children: JSON.stringify(exportedEntity, null, 2) }) })
121581
121629
  ] })
121582
121630
  ] }) })
@@ -122521,47 +122569,50 @@ const EntityEditorToolbar = ({
122521
122569
  onUpdateContext,
122522
122570
  onToggleQuickSettings,
122523
122571
  onToggleReverseSidebar
122524
- }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between pb-1 border-b border-slate-700", children: [
122525
- /* @__PURE__ */ jsxRuntimeExports.jsx(
122526
- RenderControls,
122527
- {
122528
- entity,
122529
- onLoadEntity,
122530
- onBack,
122531
- onForward,
122532
- onAddPropertyPlaceholder,
122533
- onDeleteEntity,
122534
- onSaveEntityTemplate,
122535
- onUpdateContext
122536
- }
122537
- ),
122538
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-grow" }),
122539
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: "Quick filter settings", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
122540
- Button$1,
122541
- {
122542
- style: { marginRight: 8 },
122543
- onClick: onToggleQuickSettings,
122544
- type: quickSettingsVisible ? "primary" : "default",
122545
- icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$b, {}),
122546
- "aria-label": "Quick filter settings",
122547
- "aria-pressed": quickSettingsVisible
122548
- }
122549
- ) }),
122550
- enableReverseLinkBrowser && /* @__PURE__ */ jsxRuntimeExports.jsx(
122551
- "button",
122552
- {
122553
- className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-2 rounded text-sm",
122554
- onClick: onToggleReverseSidebar,
122555
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
122556
- FontAwesomeIcon,
122557
- {
122558
- icon: reverseSidebarVisible ? faChevronRight : faChevronLeft,
122559
- size: "sm"
122560
- }
122561
- )
122562
- }
122563
- )
122564
- ] });
122572
+ }) => {
122573
+ const { t: t2 } = useTranslation();
122574
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row place-content-between pb-1 border-b border-slate-700", children: [
122575
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
122576
+ RenderControls,
122577
+ {
122578
+ entity,
122579
+ onLoadEntity,
122580
+ onBack,
122581
+ onForward,
122582
+ onAddPropertyPlaceholder,
122583
+ onDeleteEntity,
122584
+ onSaveEntityTemplate,
122585
+ onUpdateContext
122586
+ }
122587
+ ),
122588
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-grow" }),
122589
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("quick_filter_settings"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
122590
+ Button$1,
122591
+ {
122592
+ style: { marginRight: 8 },
122593
+ onClick: onToggleQuickSettings,
122594
+ type: quickSettingsVisible ? "primary" : "default",
122595
+ icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$b, {}),
122596
+ "aria-label": String(t2("quick_filter_settings_aria")),
122597
+ "aria-pressed": quickSettingsVisible
122598
+ }
122599
+ ) }),
122600
+ enableReverseLinkBrowser && /* @__PURE__ */ jsxRuntimeExports.jsx(
122601
+ "button",
122602
+ {
122603
+ className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-2 rounded text-sm",
122604
+ onClick: onToggleReverseSidebar,
122605
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
122606
+ FontAwesomeIcon,
122607
+ {
122608
+ icon: reverseSidebarVisible ? faChevronRight : faChevronLeft,
122609
+ size: "sm"
122610
+ }
122611
+ )
122612
+ }
122613
+ )
122614
+ ] });
122615
+ };
122565
122616
  function _extends() {
122566
122617
  return _extends = Object.assign ? Object.assign.bind() : function(n2) {
122567
122618
  for (var e3 = 1; e3 < arguments.length; e3++) {
@@ -126372,7 +126423,7 @@ const RenderEntity = forwardRef((props, ref) => {
126372
126423
  renderEntityPropertyFields(entityPropertyNames, "untabbed")
126373
126424
  ] });
126374
126425
  if (!entity || !entity["@id"]) {
126375
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No entity selected" });
126426
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("no_entity_selected") });
126376
126427
  }
126377
126428
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row", children: [
126378
126429
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full", children: [
@@ -133836,6 +133887,7 @@ const en = {
133836
133887
  search_for_connection: "Search for a connection",
133837
133888
  filter_by_type: "Filter by type",
133838
133889
  // DialogSaveCrateAsTemplate.tsx
133890
+ save_template: "Save as Template",
133839
133891
  save_template_prompt: "Save this crate as a template for re-use",
133840
133892
  provide_name_for_template: "provide a name for the crate template",
133841
133893
  // EntityName.tsx
@@ -133846,6 +133898,30 @@ const en = {
133846
133898
  associate_existing_prompt: "Associate an existing '{{addType}}' (lookup by identifier or name) or create a new '{{addType}}' by typing a name for it.",
133847
133899
  associate_any_prompt: "Associate any entity (lookup by identifier or name).",
133848
133900
  add_text: "Add text",
133901
+ bulk_add_label: "Bulk Add",
133902
+ bulk_add_no_lookup_warning: "Note: existing entities are not looked up.",
133903
+ bulk_add_delete_row: "Delete row",
133904
+ bulk_add_add_row: "Add row",
133905
+ bulk_add_create_entities: "Create these entities",
133906
+ type_text: "Text",
133907
+ type_text_area: "Text area",
133908
+ type_date: "Date",
133909
+ type_date_time: "Date and time",
133910
+ type_time: "Time",
133911
+ type_number: "Number",
133912
+ type_float: "Decimal number",
133913
+ type_integer: "Integer",
133914
+ type_url: "URL",
133915
+ type_value: "Value",
133916
+ type_select: "Option list",
133917
+ type_select_url: "URL option list",
133918
+ type_select_object: "Object option list",
133919
+ type_geo: "Location",
133920
+ type_geometry: "Geometry",
133921
+ type_geo_coordinates: "Geographic coordinates",
133922
+ type_geo_shape: "Geographic shape",
133923
+ type_boolean: "Boolean",
133924
+ type_any: "Any",
133849
133925
  // Text.tsx
133850
133926
  invalid_type_for_text: "The type '{{type}}' is not valid for this component. It can only be 'text' or 'textarea'",
133851
133927
  text_constraints_error_message: "The specified value does not meet the following constraints: {{- value}}, or it is considered invalid.",
@@ -133871,6 +133947,7 @@ const en = {
133871
133947
  false_label: "False",
133872
133948
  // SelectUrl.tsx
133873
133949
  // select: as above
133950
+ no_data: "No data",
133874
133951
  invalid_selecturl_value: "The value '{{value}}' provided to this component is of the wrong from. It can only be a valid URL.",
133875
133952
  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.",
133876
133953
  // SelectObject.tsx
@@ -133887,6 +133964,11 @@ const en = {
133887
133964
  provide_name_for_location: "Please provide a name for this location - optional",
133888
133965
  provide_name_for_location_error: "You need to provide a name for this location",
133889
133966
  select_existing_location: "Select a location that has already been defined",
133967
+ // BulkAdd.tsx / DialogSaveEntityTemplate.tsx
133968
+ save_template_label: "Save Template",
133969
+ template_preview: "Template Preview",
133970
+ template_depth: "Depth: {{depth}}",
133971
+ no_entity_selected: "No entity selected",
133890
133972
  // Value.tsx
133891
133973
  invalid_value_value: "The supplied value '{{value}}' is invalid. It can only be a string.",
133892
133974
  // AutoComplete.tsx
@@ -133908,6 +133990,8 @@ const en = {
133908
133990
  profile_actions_aria: "Profile actions",
133909
133991
  profile_sections_aria: "Profile sections",
133910
133992
  remove_profile_aria: "Remove profile",
133993
+ about_tab_label: "About",
133994
+ other_tab_label: "Other",
133911
133995
  scroll_profile_tabs_up: "Scroll profile tabs up",
133912
133996
  scroll_profile_tabs_down: "Scroll profile tabs down",
133913
133997
  switch_to_icon_view: "Switch to icon view",
@@ -134142,6 +134226,7 @@ const hu = {
134142
134226
  search_for_connection: "Kapcsolt entitás keresése",
134143
134227
  filter_by_type: "Típus szerinti szűrés",
134144
134228
  // DialogSaveCrateAsTemplate.tsx
134229
+ save_template: "Mentés mintaként",
134145
134230
  save_template_prompt: "Csomag mentése mintaként",
134146
134231
  provide_name_for_template: "minta neve",
134147
134232
  // EntityName.tsx
@@ -134152,6 +134237,30 @@ const hu = {
134152
134237
  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",
134153
134238
  associate_any_prompt: "Bármely entitás hozzárendelése (azonosító vagy név alapján)",
134154
134239
  add_text: "Szöveg hozzáadása",
134240
+ bulk_add_label: "Tömeges hozzáadás",
134241
+ bulk_add_no_lookup_warning: "Megjegyzés: a meglévő entitások között nem történik keresés.",
134242
+ bulk_add_delete_row: "Sor törlése",
134243
+ bulk_add_add_row: "Sor hozzáadása",
134244
+ bulk_add_create_entities: "Entitások létrehozása",
134245
+ type_text: "Szöveg",
134246
+ type_text_area: "Hosszú szöveg",
134247
+ type_date: "Dátum",
134248
+ type_date_time: "Dátum és idő",
134249
+ type_time: "Idő",
134250
+ type_number: "Szám",
134251
+ type_float: "Tizedes tört",
134252
+ type_integer: "Egész szám",
134253
+ type_url: "URL",
134254
+ type_value: "Érték",
134255
+ type_select: "Választéklista",
134256
+ type_select_url: "URL-választéklista",
134257
+ type_select_object: "Objektumválasztéklista",
134258
+ type_geo: "Helyadat",
134259
+ type_geometry: "Geometria",
134260
+ type_geo_coordinates: "Földrajzi koordináták",
134261
+ type_geo_shape: "Földrajzi alakzat",
134262
+ type_boolean: "Logikai érték",
134263
+ type_any: "Bármely",
134155
134264
  // Text.tsx
134156
134265
  invalid_type_for_text: "'{{type}}' típus nem használható ezzel a komponenssel. A típus csak 'text' vagy 'textarea' lehet",
134157
134266
  text_constraints_error_message: "A megadott érték nem felel meg a következő megszorításoknak: {{- value}}, vagy érvénytelen.",
@@ -134177,6 +134286,7 @@ const hu = {
134177
134286
  false_label: "Hamis",
134178
134287
  // SelectUrl.tsx
134179
134288
  // select: as above
134289
+ no_data: "Nincs adat",
134180
134290
  invalid_selecturl_value: "A megadott '{{value}}' érték nem megfelelő formátumú. Csak érvényes URL lehet.",
134181
134291
  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.",
134182
134292
  // SelectObject.tsx
@@ -134193,6 +134303,11 @@ const hu = {
134193
134303
  provide_name_for_location: "Adj nevet ennek a helynek!",
134194
134304
  provide_name_for_location_error: "A hely nevének megadása kötelező!",
134195
134305
  select_existing_location: "Válassz egy már meghatározott helyet a csomagban!",
134306
+ // BulkAdd.tsx / DialogSaveEntityTemplate.tsx
134307
+ save_template_label: "Minta mentése",
134308
+ template_preview: "Minta előnézete",
134309
+ template_depth: "Mélység: {{depth}}",
134310
+ no_entity_selected: "Nincs kijelölt entitás",
134196
134311
  // Value.tsx
134197
134312
  invalid_value_value: "A megadott '{{value}}' érték érvénytelen. Csak karakterlánc lehet.",
134198
134313
  // AutoComplete.tsx
@@ -134214,6 +134329,8 @@ const hu = {
134214
134329
  profile_actions_aria: "Profilműveletek",
134215
134330
  profile_sections_aria: "Profilszakaszok",
134216
134331
  remove_profile_aria: "Profil eltávolítása",
134332
+ about_tab_label: "Alapadatok",
134333
+ other_tab_label: "Egyéb",
134217
134334
  scroll_profile_tabs_up: "Profilfülek görgetése felfelé",
134218
134335
  scroll_profile_tabs_down: "Profilfülek görgetése lefelé",
134219
134336
  switch_to_icon_view: "Ikon nézetre váltás",
@@ -135198,7 +135315,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
135198
135315
  }) : null
135199
135316
  );
135200
135317
  var CacheProvider = EmotionCacheContext.Provider;
135201
- const version = "0.1.47";
135318
+ const version = "0.1.48";
135202
135319
  const pkg = {
135203
135320
  version
135204
135321
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arpproject/recrate",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "type": "module",
5
5
  "main": "./dist/recrate.es.js",
6
6
  "module": "./dist/recrate.es.js",