@luomus/laji-form 15.1.89 → 15.1.90

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.
@@ -60,7 +60,7 @@ function EnumRangeArrayField(props) {
60
60
  propsOnChange(value);
61
61
  }, [propsOnChange]);
62
62
  const getEnumOptionsAsync = (0, react_1.useCallback)(() => __awaiter(this, void 0, void 0, function* () {
63
- const enums = yield props.formContext.apiClient.get(`/metadata/ranges/${range}`);
63
+ const enums = (yield props.formContext.apiClient.get("/metadata/alts/{alt}", { path: { alt: range } })).results;
64
64
  return enums.map(({ value }) => ({ value, label: value }));
65
65
  }), [props.formContext.apiClient, range]);
66
66
  const { Label } = props.formContext;
@@ -189,7 +189,7 @@ function MediaArrayField(ComposedComponent) {
189
189
  const metadataForm = this.state.metadataForm || {};
190
190
  if (typeof metadataModalOpen === "number" && !this.state.metadataForm) {
191
191
  const { metadataFormId = this.METADATA_FORM_ID } = (0, utils_1.getUiOptions)(this.props.uiSchema);
192
- this.apiClient.get("/forms/{id}", { path: { id: metadataFormId }, query: { lang, format: "schema" } })
192
+ this.apiClient.get("/forms/{id}", { path: { id: metadataFormId }, query: { format: "schema" } })
193
193
  .then(metadataForm => {
194
194
  if (this.mounted) {
195
195
  this.setState({ metadataForm });
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { ByLang, FormContext } from "../../LajiForm";
3
3
  import memoize from "memoizee";
4
4
  import type { components } from "generated/api.d";
5
- type NamedPlace = components["schemas"]["namedPlace"];
5
+ type NamedPlace = components["schemas"]["store-namedPlace"];
6
6
  type Props = {
7
7
  places: NamedPlace[];
8
8
  failed?: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { FieldProps, JSONSchemaArray, JSONSchemaObject } from "../../../types";
3
3
  import type { components } from "generated/api.d";
4
- type NamedPlace = components["schemas"]["namedPlace"];
4
+ type NamedPlace = components["schemas"]["store-namedPlace"];
5
5
  type Props = FieldProps<NamedPlace, JSONSchemaObject | JSONSchemaArray<JSONSchemaObject>>;
6
6
  type State = {
7
7
  show?: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { FormContext } from "src/components/LajiForm";
3
3
  import type { components } from "generated/api.d";
4
- type NamedPlace = components["schemas"]["namedPlace"];
4
+ type NamedPlace = components["schemas"]["store-namedPlace"];
5
5
  type Props = {
6
6
  onPlaceSelected: (place: NamedPlace) => void;
7
7
  onPlaceDeleted: (place: NamedPlace) => void;
@@ -917,7 +917,7 @@ class _TaxonWrapper extends React.Component {
917
917
  }
918
918
  }
919
919
  this.setState(Object.assign(Object.assign({}, state), { higherThanOrder: !state.order && !state.family }));
920
- const taxonRanks = yield this.props.formContext.apiClient.get("/metadata/ranges/MX.taxonRankEnum");
920
+ const taxonRanks = (yield this.props.formContext.apiClient.get("/metadata/properties/MX.taxonRank/alt")).results;
921
921
  if (!this.mounted)
922
922
  return;
923
923
  this.setState({ taxonRanks: (0, utils_1.dictionarify)(taxonRanks, function getKey(rank) { return rank.id; }, function getValue(rank) { return rank.value; }) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luomus/laji-form",
3
- "version": "15.1.89",
3
+ "version": "15.1.90",
4
4
  "description": "React module capable of building dynamic forms from Laji form json schemas",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",