@tsed/react-formio 1.13.7-rc.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1800,7 +1800,9 @@ function FormParameters({
1800
1800
  enableTags = true,
1801
1801
  typeChoices = [],
1802
1802
  displayChoices = defaultDisplayChoices,
1803
- className = ""
1803
+ className = "",
1804
+ readonly = {},
1805
+ baseUrl = window.location.origin
1804
1806
  }) {
1805
1807
  const hasTypeChoices = typeChoices && typeChoices.length > 1;
1806
1808
  return /*#__PURE__*/React.createElement("div", {
@@ -1813,6 +1815,7 @@ function FormParameters({
1813
1815
  name: "title",
1814
1816
  required: true,
1815
1817
  value: form.title,
1818
+ disabled: !!readonly["title"],
1816
1819
  onChange: onChange
1817
1820
  })), /*#__PURE__*/React.createElement("div", {
1818
1821
  className: "w-1/3"
@@ -1821,6 +1824,7 @@ function FormParameters({
1821
1824
  placeholder: "Enter the form machine name",
1822
1825
  name: "name",
1823
1826
  required: true,
1827
+ disabled: !!readonly["name"],
1824
1828
  value: form.name,
1825
1829
  onChange: onChange
1826
1830
  })), /*#__PURE__*/React.createElement("div", {
@@ -1834,9 +1838,10 @@ function FormParameters({
1834
1838
  className: "text-xxs flex items-center"
1835
1839
  }, /*#__PURE__*/React.createElement("i", {
1836
1840
  className: "bx bx-link ml-1 mr-1"
1837
- }), window.location.origin + "/" + form.path),
1841
+ }), `${baseUrl}/${form.path}`),
1838
1842
  required: true,
1839
1843
  value: form.path,
1844
+ disabled: !!readonly["path"],
1840
1845
  style: {
1841
1846
  textTransform: "lowercase",
1842
1847
  width: "120px"
@@ -1847,6 +1852,7 @@ function FormParameters({
1847
1852
  }, /*#__PURE__*/React.createElement(Select, {
1848
1853
  label: "Display as",
1849
1854
  name: "display",
1855
+ disabled: !!readonly["display"],
1850
1856
  value: form.display,
1851
1857
  choices: displayChoices,
1852
1858
  onChange: onChange