@abgov/jsonforms-components 1.10.0 → 1.10.2

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.
package/index.esm.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { withAjvProps, materialSliderControlTester, MaterialSliderControl, materialObjectControlTester, MaterialObjectRenderer, materialAllOfControlTester, MaterialAllOfRenderer, materialAnyOfControlTester, MaterialAnyOfRenderer, materialOneOfControlTester, MaterialOneOfRenderer, materialOneOfRadioGroupControlTester, MaterialOneOfRadioGroupControl, materialOneOfEnumControlTester, MaterialOneOfEnumControl, materialHorizontalLayoutTester, materialVerticalLayoutTester, materialArrayLayoutTester, MaterialArrayLayout, materialAnyOfStringOrEnumControlTester, MaterialAnyOfStringOrEnumControl, materialEnumArrayRendererTester, MaterialEnumArrayRenderer, materialBooleanCellTester, MaterialBooleanCell, materialBooleanToggleCellTester, MaterialBooleanToggleCell, materialEnumCellTester, MaterialEnumCell, materialOneOfEnumCellTester, MaterialOneOfEnumCell } from '@jsonforms/material-renderers';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import React, { createContext, useContext, useEffect, useMemo, useState, useCallback } from 'react';
3
4
  import { GoACallout, GoAInputDate, GoAFormItem, GoAInput, GoATextArea, GoAInputDateTime, GoAInputTime, GoADropdown, GoADropdownItem, GoARadioGroup, GoARadioItem, GoACheckbox, GoAFormStepper, GoAFormStep, GoAPages, GoAGrid, GoAButton, GoAModal, GoAButtonGroup, GoAIconButton, GoAFileUploadInput, GoACircularProgress, GoAContainer, GoADetails } from '@abgov/react-components';
4
5
  import styled from 'styled-components';
5
6
  import { rankWith, uiTypeIs, isDateControl, isStringControl, and, optionIs, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, isDescriptionHidden, isVisible, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, Paths, or, isObjectArrayControl, isPrimitiveArrayControl, withIncreasedRank, hasType, isControl, isCategorization, isLayout } from '@jsonforms/core';
6
- import { withJsonFormsRendererProps, withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, withJsonFormsLayoutProps, JsonFormsDispatch, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
7
- import React, { createContext, useEffect, useState, useMemo, useContext, useCallback } from 'react';
7
+ import { withJsonFormsRendererProps, withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, JsonFormsDispatch, withJsonFormsLayoutProps, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
8
8
  import merge from 'lodash/merge';
9
9
  import axios from 'axios';
10
- import isEmpty from 'lodash/isEmpty';
10
+ import isEmpty$1 from 'lodash/isEmpty';
11
11
  import range from 'lodash/range';
12
12
  import Ajv from 'ajv';
13
13
 
@@ -1556,122 +1556,8 @@ for (var COLLECTION_NAME in DOMIterables) {
1556
1556
 
1557
1557
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1558
1558
 
1559
- var wellKnownSymbol$5 = wellKnownSymbol$c;
1560
-
1561
- var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag');
1562
- var test = {};
1563
-
1564
- test[TO_STRING_TAG$1] = 'z';
1565
-
1566
- var toStringTagSupport = String(test) === '[object z]';
1567
-
1568
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1569
- var isCallable$3 = isCallable$h;
1570
- var classofRaw = classofRaw$1;
1571
- var wellKnownSymbol$4 = wellKnownSymbol$c;
1572
-
1573
- var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
1574
- var $Object = Object;
1575
-
1576
- // ES3 wrong here
1577
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1578
-
1579
- // fallback for IE11 Script Access Denied error
1580
- var tryGet = function (it, key) {
1581
- try {
1582
- return it[key];
1583
- } catch (error) { /* empty */ }
1584
- };
1585
-
1586
- // getting tag from ES6+ `Object.prototype.toString`
1587
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1588
- var O, tag, result;
1589
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1590
- // @@toStringTag case
1591
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1592
- // builtinTag case
1593
- : CORRECT_ARGUMENTS ? classofRaw(O)
1594
- // ES3 arguments fallback
1595
- : (result = classofRaw(O)) === 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
1596
- };
1597
-
1598
- var classof$2 = classof$3;
1599
-
1600
- var $String = String;
1601
-
1602
- var toString$5 = function (argument) {
1603
- if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1604
- return $String(argument);
1605
- };
1606
-
1607
- var makeBuiltIn = makeBuiltIn$3.exports;
1608
- var defineProperty$1 = objectDefineProperty;
1609
-
1610
- var defineBuiltInAccessor$1 = function (target, name, descriptor) {
1611
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1612
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1613
- return defineProperty$1.f(target, name, descriptor);
1614
- };
1615
-
1616
- var $$4 = _export;
1617
1559
  var DESCRIPTORS$1 = descriptors;
1618
- var global$4 = global$f;
1619
1560
  var uncurryThis$6 = functionUncurryThis;
1620
- var hasOwn$1 = hasOwnProperty_1;
1621
- var isCallable$2 = isCallable$h;
1622
- var isPrototypeOf$1 = objectIsPrototypeOf;
1623
- var toString$4 = toString$5;
1624
- var defineBuiltInAccessor = defineBuiltInAccessor$1;
1625
- var copyConstructorProperties = copyConstructorProperties$2;
1626
-
1627
- var NativeSymbol = global$4.Symbol;
1628
- var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
1629
-
1630
- if (DESCRIPTORS$1 && isCallable$2(NativeSymbol) && (!('description' in SymbolPrototype) ||
1631
- // Safari 12 bug
1632
- NativeSymbol().description !== undefined
1633
- )) {
1634
- var EmptyStringDescriptionStore = {};
1635
- // wrap Symbol constructor for correct work with undefined description
1636
- var SymbolWrapper = function Symbol() {
1637
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$4(arguments[0]);
1638
- var result = isPrototypeOf$1(SymbolPrototype, this)
1639
- ? new NativeSymbol(description)
1640
- // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
1641
- : description === undefined ? NativeSymbol() : NativeSymbol(description);
1642
- if (description === '') EmptyStringDescriptionStore[result] = true;
1643
- return result;
1644
- };
1645
-
1646
- copyConstructorProperties(SymbolWrapper, NativeSymbol);
1647
- SymbolWrapper.prototype = SymbolPrototype;
1648
- SymbolPrototype.constructor = SymbolWrapper;
1649
-
1650
- var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
1651
- var thisSymbolValue = uncurryThis$6(SymbolPrototype.valueOf);
1652
- var symbolDescriptiveString = uncurryThis$6(SymbolPrototype.toString);
1653
- var regexp = /^Symbol\((.*)\)[^)]+$/;
1654
- var replace$2 = uncurryThis$6(''.replace);
1655
- var stringSlice$4 = uncurryThis$6(''.slice);
1656
-
1657
- defineBuiltInAccessor(SymbolPrototype, 'description', {
1658
- configurable: true,
1659
- get: function description() {
1660
- var symbol = thisSymbolValue(this);
1661
- if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
1662
- var string = symbolDescriptiveString(symbol);
1663
- var desc = NATIVE_SYMBOL ? stringSlice$4(string, 7, -1) : replace$2(string, regexp, '$1');
1664
- return desc === '' ? undefined : desc;
1665
- }
1666
- });
1667
-
1668
- $$4({ global: true, constructor: true, forced: true }, {
1669
- Symbol: SymbolWrapper
1670
- });
1671
- }
1672
-
1673
- var DESCRIPTORS = descriptors;
1674
- var uncurryThis$5 = functionUncurryThis;
1675
1561
  var call$6 = functionCall;
1676
1562
  var fails$7 = fails$i;
1677
1563
  var objectKeys = objectKeys$2;
@@ -1683,17 +1569,17 @@ var IndexedObject = indexedObject;
1683
1569
  // eslint-disable-next-line es/no-object-assign -- safe
1684
1570
  var $assign = Object.assign;
1685
1571
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1686
- var defineProperty = Object.defineProperty;
1687
- var concat$1 = uncurryThis$5([].concat);
1572
+ var defineProperty$1 = Object.defineProperty;
1573
+ var concat$1 = uncurryThis$6([].concat);
1688
1574
 
1689
1575
  // `Object.assign` method
1690
1576
  // https://tc39.es/ecma262/#sec-object.assign
1691
1577
  var objectAssign = !$assign || fails$7(function () {
1692
1578
  // should have correct order of operations (Edge bug)
1693
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1579
+ if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
1694
1580
  enumerable: true,
1695
1581
  get: function () {
1696
- defineProperty(this, 'b', {
1582
+ defineProperty$1(this, 'b', {
1697
1583
  value: 3,
1698
1584
  enumerable: false
1699
1585
  });
@@ -1722,18 +1608,18 @@ var objectAssign = !$assign || fails$7(function () {
1722
1608
  var key;
1723
1609
  while (length > j) {
1724
1610
  key = keys[j++];
1725
- if (!DESCRIPTORS || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
1611
+ if (!DESCRIPTORS$1 || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
1726
1612
  }
1727
1613
  } return T;
1728
1614
  } : $assign;
1729
1615
 
1730
- var $$3 = _export;
1616
+ var $$4 = _export;
1731
1617
  var assign = objectAssign;
1732
1618
 
1733
1619
  // `Object.assign` method
1734
1620
  // https://tc39.es/ecma262/#sec-object.assign
1735
1621
  // eslint-disable-next-line es/no-object-assign -- required for testing
1736
- $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1622
+ $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1737
1623
  assign: assign
1738
1624
  });
1739
1625
 
@@ -1743,6 +1629,54 @@ const FormFieldWrapper = styled.div(_t$7 || (_t$7 = _$7`
1743
1629
  margin-bottom: var(--goa-space-l);
1744
1630
  `));
1745
1631
 
1632
+ var wellKnownSymbol$5 = wellKnownSymbol$c;
1633
+
1634
+ var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag');
1635
+ var test = {};
1636
+
1637
+ test[TO_STRING_TAG$1] = 'z';
1638
+
1639
+ var toStringTagSupport = String(test) === '[object z]';
1640
+
1641
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1642
+ var isCallable$3 = isCallable$h;
1643
+ var classofRaw = classofRaw$1;
1644
+ var wellKnownSymbol$4 = wellKnownSymbol$c;
1645
+
1646
+ var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
1647
+ var $Object = Object;
1648
+
1649
+ // ES3 wrong here
1650
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1651
+
1652
+ // fallback for IE11 Script Access Denied error
1653
+ var tryGet = function (it, key) {
1654
+ try {
1655
+ return it[key];
1656
+ } catch (error) { /* empty */ }
1657
+ };
1658
+
1659
+ // getting tag from ES6+ `Object.prototype.toString`
1660
+ var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1661
+ var O, tag, result;
1662
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1663
+ // @@toStringTag case
1664
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1665
+ // builtinTag case
1666
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1667
+ // ES3 arguments fallback
1668
+ : (result = classofRaw(O)) === 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
1669
+ };
1670
+
1671
+ var classof$2 = classof$3;
1672
+
1673
+ var $String = String;
1674
+
1675
+ var toString$5 = function (argument) {
1676
+ if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1677
+ return $String(argument);
1678
+ };
1679
+
1746
1680
  var anObject$3 = anObject$9;
1747
1681
 
1748
1682
  // `RegExp.prototype.flags` getter implementation
@@ -1762,10 +1696,10 @@ var regexpFlags$1 = function () {
1762
1696
  };
1763
1697
 
1764
1698
  var fails$6 = fails$i;
1765
- var global$3 = global$f;
1699
+ var global$4 = global$f;
1766
1700
 
1767
1701
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1768
- var $RegExp$2 = global$3.RegExp;
1702
+ var $RegExp$2 = global$4.RegExp;
1769
1703
 
1770
1704
  var UNSUPPORTED_Y$1 = fails$6(function () {
1771
1705
  var re = $RegExp$2('a', 'y');
@@ -1793,10 +1727,10 @@ var regexpStickyHelpers = {
1793
1727
  };
1794
1728
 
1795
1729
  var fails$5 = fails$i;
1796
- var global$2 = global$f;
1730
+ var global$3 = global$f;
1797
1731
 
1798
1732
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1799
- var $RegExp$1 = global$2.RegExp;
1733
+ var $RegExp$1 = global$3.RegExp;
1800
1734
 
1801
1735
  var regexpUnsupportedDotAll = fails$5(function () {
1802
1736
  var re = $RegExp$1('.', 's');
@@ -1804,10 +1738,10 @@ var regexpUnsupportedDotAll = fails$5(function () {
1804
1738
  });
1805
1739
 
1806
1740
  var fails$4 = fails$i;
1807
- var global$1 = global$f;
1741
+ var global$2 = global$f;
1808
1742
 
1809
1743
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1810
- var $RegExp = global$1.RegExp;
1744
+ var $RegExp = global$2.RegExp;
1811
1745
 
1812
1746
  var regexpUnsupportedNcg = fails$4(function () {
1813
1747
  var re = $RegExp('(?<a>b)', 'g');
@@ -1818,8 +1752,8 @@ var regexpUnsupportedNcg = fails$4(function () {
1818
1752
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1819
1753
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1820
1754
  var call$5 = functionCall;
1821
- var uncurryThis$4 = functionUncurryThis;
1822
- var toString$3 = toString$5;
1755
+ var uncurryThis$5 = functionUncurryThis;
1756
+ var toString$4 = toString$5;
1823
1757
  var regexpFlags = regexpFlags$1;
1824
1758
  var stickyHelpers = regexpStickyHelpers;
1825
1759
  var shared = shared$4;
@@ -1831,10 +1765,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1831
1765
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1832
1766
  var nativeExec = RegExp.prototype.exec;
1833
1767
  var patchedExec = nativeExec;
1834
- var charAt$3 = uncurryThis$4(''.charAt);
1835
- var indexOf = uncurryThis$4(''.indexOf);
1836
- var replace$1 = uncurryThis$4(''.replace);
1837
- var stringSlice$3 = uncurryThis$4(''.slice);
1768
+ var charAt$3 = uncurryThis$5(''.charAt);
1769
+ var indexOf = uncurryThis$5(''.indexOf);
1770
+ var replace$2 = uncurryThis$5(''.replace);
1771
+ var stringSlice$4 = uncurryThis$5(''.slice);
1838
1772
 
1839
1773
  var UPDATES_LAST_INDEX_WRONG = (function () {
1840
1774
  var re1 = /a/;
@@ -1855,7 +1789,7 @@ if (PATCH) {
1855
1789
  patchedExec = function exec(string) {
1856
1790
  var re = this;
1857
1791
  var state = getInternalState(re);
1858
- var str = toString$3(string);
1792
+ var str = toString$4(string);
1859
1793
  var raw = state.raw;
1860
1794
  var result, reCopy, lastIndex, match, i, object, group;
1861
1795
 
@@ -1874,12 +1808,12 @@ if (PATCH) {
1874
1808
  var strCopy = str;
1875
1809
 
1876
1810
  if (sticky) {
1877
- flags = replace$1(flags, 'y', '');
1811
+ flags = replace$2(flags, 'y', '');
1878
1812
  if (indexOf(flags, 'g') === -1) {
1879
1813
  flags += 'g';
1880
1814
  }
1881
1815
 
1882
- strCopy = stringSlice$3(str, re.lastIndex);
1816
+ strCopy = stringSlice$4(str, re.lastIndex);
1883
1817
  // Support anchored sticky behavior.
1884
1818
  if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1885
1819
  source = '(?: ' + source + ')';
@@ -1900,8 +1834,8 @@ if (PATCH) {
1900
1834
 
1901
1835
  if (sticky) {
1902
1836
  if (match) {
1903
- match.input = stringSlice$3(match.input, charsAdded);
1904
- match[0] = stringSlice$3(match[0], charsAdded);
1837
+ match.input = stringSlice$4(match.input, charsAdded);
1838
+ match[0] = stringSlice$4(match[0], charsAdded);
1905
1839
  match.index = re.lastIndex;
1906
1840
  re.lastIndex += match[0].length;
1907
1841
  } else re.lastIndex = 0;
@@ -1932,12 +1866,12 @@ if (PATCH) {
1932
1866
 
1933
1867
  var regexpExec$2 = patchedExec;
1934
1868
 
1935
- var $$2 = _export;
1869
+ var $$3 = _export;
1936
1870
  var exec = regexpExec$2;
1937
1871
 
1938
1872
  // `RegExp.prototype.exec` method
1939
1873
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1940
- $$2({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1874
+ $$3({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1941
1875
  exec: exec
1942
1876
  });
1943
1877
 
@@ -2028,18 +1962,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2028
1962
  if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
2029
1963
  };
2030
1964
 
2031
- var uncurryThis$3 = functionUncurryThis;
1965
+ var uncurryThis$4 = functionUncurryThis;
2032
1966
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
2033
- var toString$2 = toString$5;
1967
+ var toString$3 = toString$5;
2034
1968
  var requireObjectCoercible$2 = requireObjectCoercible$5;
2035
1969
 
2036
- var charAt$2 = uncurryThis$3(''.charAt);
2037
- var charCodeAt = uncurryThis$3(''.charCodeAt);
2038
- var stringSlice$2 = uncurryThis$3(''.slice);
1970
+ var charAt$2 = uncurryThis$4(''.charAt);
1971
+ var charCodeAt = uncurryThis$4(''.charCodeAt);
1972
+ var stringSlice$3 = uncurryThis$4(''.slice);
2039
1973
 
2040
1974
  var createMethod = function (CONVERT_TO_STRING) {
2041
1975
  return function ($this, pos) {
2042
- var S = toString$2(requireObjectCoercible$2($this));
1976
+ var S = toString$3(requireObjectCoercible$2($this));
2043
1977
  var position = toIntegerOrInfinity$1(pos);
2044
1978
  var size = S.length;
2045
1979
  var first, second;
@@ -2051,7 +1985,7 @@ var createMethod = function (CONVERT_TO_STRING) {
2051
1985
  ? charAt$2(S, position)
2052
1986
  : first
2053
1987
  : CONVERT_TO_STRING
2054
- ? stringSlice$2(S, position, position + 2)
1988
+ ? stringSlice$3(S, position, position + 2)
2055
1989
  : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2056
1990
  };
2057
1991
  };
@@ -2073,13 +2007,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
2073
2007
  return index + (unicode ? charAt$1(S, index).length : 1);
2074
2008
  };
2075
2009
 
2076
- var uncurryThis$2 = functionUncurryThis;
2010
+ var uncurryThis$3 = functionUncurryThis;
2077
2011
  var toObject = toObject$4;
2078
2012
 
2079
2013
  var floor = Math.floor;
2080
- var charAt = uncurryThis$2(''.charAt);
2081
- var replace = uncurryThis$2(''.replace);
2082
- var stringSlice$1 = uncurryThis$2(''.slice);
2014
+ var charAt = uncurryThis$3(''.charAt);
2015
+ var replace$1 = uncurryThis$3(''.replace);
2016
+ var stringSlice$2 = uncurryThis$3(''.slice);
2083
2017
  // eslint-disable-next-line redos/no-vulnerable -- safe
2084
2018
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2085
2019
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
@@ -2094,15 +2028,15 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2094
2028
  namedCaptures = toObject(namedCaptures);
2095
2029
  symbols = SUBSTITUTION_SYMBOLS;
2096
2030
  }
2097
- return replace(replacement, symbols, function (match, ch) {
2031
+ return replace$1(replacement, symbols, function (match, ch) {
2098
2032
  var capture;
2099
2033
  switch (charAt(ch, 0)) {
2100
2034
  case '$': return '$';
2101
2035
  case '&': return matched;
2102
- case '`': return stringSlice$1(str, 0, position);
2103
- case "'": return stringSlice$1(str, tailPos);
2036
+ case '`': return stringSlice$2(str, 0, position);
2037
+ case "'": return stringSlice$2(str, tailPos);
2104
2038
  case '<':
2105
- capture = namedCaptures[stringSlice$1(ch, 1, -1)];
2039
+ capture = namedCaptures[stringSlice$2(ch, 1, -1)];
2106
2040
  break;
2107
2041
  default: // \d\d?
2108
2042
  var n = +ch;
@@ -2121,7 +2055,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2121
2055
 
2122
2056
  var call$2 = functionCall;
2123
2057
  var anObject$2 = anObject$9;
2124
- var isCallable$1 = isCallable$h;
2058
+ var isCallable$2 = isCallable$h;
2125
2059
  var classof$1 = classofRaw$1;
2126
2060
  var regexpExec = regexpExec$2;
2127
2061
 
@@ -2131,7 +2065,7 @@ var $TypeError$1 = TypeError;
2131
2065
  // https://tc39.es/ecma262/#sec-regexpexec
2132
2066
  var regexpExecAbstract = function (R, S) {
2133
2067
  var exec = R.exec;
2134
- if (isCallable$1(exec)) {
2068
+ if (isCallable$2(exec)) {
2135
2069
  var result = call$2(exec, R, S);
2136
2070
  if (result !== null) anObject$2(result);
2137
2071
  return result;
@@ -2142,15 +2076,15 @@ var regexpExecAbstract = function (R, S) {
2142
2076
 
2143
2077
  var apply = functionApply;
2144
2078
  var call$1 = functionCall;
2145
- var uncurryThis$1 = functionUncurryThis;
2079
+ var uncurryThis$2 = functionUncurryThis;
2146
2080
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2147
2081
  var fails$2 = fails$i;
2148
2082
  var anObject$1 = anObject$9;
2149
- var isCallable = isCallable$h;
2083
+ var isCallable$1 = isCallable$h;
2150
2084
  var isNullOrUndefined = isNullOrUndefined$3;
2151
2085
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
2152
2086
  var toLength = toLength$2;
2153
- var toString$1 = toString$5;
2087
+ var toString$2 = toString$5;
2154
2088
  var requireObjectCoercible$1 = requireObjectCoercible$5;
2155
2089
  var advanceStringIndex = advanceStringIndex$1;
2156
2090
  var getMethod = getMethod$2;
@@ -2161,10 +2095,10 @@ var wellKnownSymbol$2 = wellKnownSymbol$c;
2161
2095
  var REPLACE = wellKnownSymbol$2('replace');
2162
2096
  var max = Math.max;
2163
2097
  var min = Math.min;
2164
- var concat = uncurryThis$1([].concat);
2165
- var push = uncurryThis$1([].push);
2166
- var stringIndexOf$1 = uncurryThis$1(''.indexOf);
2167
- var stringSlice = uncurryThis$1(''.slice);
2098
+ var concat = uncurryThis$2([].concat);
2099
+ var push = uncurryThis$2([].push);
2100
+ var stringIndexOf$1 = uncurryThis$2(''.indexOf);
2101
+ var stringSlice$1 = uncurryThis$2(''.slice);
2168
2102
 
2169
2103
  var maybeToString = function (it) {
2170
2104
  return it === undefined ? it : String(it);
@@ -2208,13 +2142,13 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2208
2142
  var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
2209
2143
  return replacer
2210
2144
  ? call$1(replacer, searchValue, O, replaceValue)
2211
- : call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
2145
+ : call$1(nativeReplace, toString$2(O), searchValue, replaceValue);
2212
2146
  },
2213
2147
  // `RegExp.prototype[@@replace]` method
2214
2148
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2215
2149
  function (string, replaceValue) {
2216
2150
  var rx = anObject$1(this);
2217
- var S = toString$1(string);
2151
+ var S = toString$2(string);
2218
2152
 
2219
2153
  if (
2220
2154
  typeof replaceValue == 'string' &&
@@ -2225,8 +2159,8 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2225
2159
  if (res.done) return res.value;
2226
2160
  }
2227
2161
 
2228
- var functionalReplace = isCallable(replaceValue);
2229
- if (!functionalReplace) replaceValue = toString$1(replaceValue);
2162
+ var functionalReplace = isCallable$1(replaceValue);
2163
+ if (!functionalReplace) replaceValue = toString$2(replaceValue);
2230
2164
 
2231
2165
  var global = rx.global;
2232
2166
  var fullUnicode;
@@ -2244,7 +2178,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2244
2178
  push(results, result);
2245
2179
  if (!global) break;
2246
2180
 
2247
- var matchStr = toString$1(result[0]);
2181
+ var matchStr = toString$2(result[0]);
2248
2182
  if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
2249
2183
  }
2250
2184
 
@@ -2253,7 +2187,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2253
2187
  for (var i = 0; i < results.length; i++) {
2254
2188
  result = results[i];
2255
2189
 
2256
- var matched = toString$1(result[0]);
2190
+ var matched = toString$2(result[0]);
2257
2191
  var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
2258
2192
  var captures = [];
2259
2193
  var replacement;
@@ -2267,17 +2201,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2267
2201
  if (functionalReplace) {
2268
2202
  var replacerArgs = concat([matched], captures, position, S);
2269
2203
  if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
2270
- replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
2204
+ replacement = toString$2(apply(replaceValue, undefined, replacerArgs));
2271
2205
  } else {
2272
2206
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2273
2207
  }
2274
2208
  if (position >= nextSourcePosition) {
2275
- accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
2209
+ accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
2276
2210
  nextSourcePosition = position + matched.length;
2277
2211
  }
2278
2212
  }
2279
2213
 
2280
- return accumulatedResult + stringSlice(S, nextSourcePosition);
2214
+ return accumulatedResult + stringSlice$1(S, nextSourcePosition);
2281
2215
  }
2282
2216
  ];
2283
2217
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
@@ -2302,10 +2236,7 @@ const controlScopeMatchesLabel = (scope, label) => {
2302
2236
  // Get the property name in the string from the scope
2303
2237
  const splitIdName = (_c = (_b = (_a = scope.replace(' ', '').split('/')) === null || _a === void 0 ? void 0 : _a.at(-1)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) !== null && _c !== void 0 ? _c : '';
2304
2238
  const labelWithNoSpaces = label.replace(' ', '').toLowerCase();
2305
- if (splitIdName === labelWithNoSpaces) {
2306
- return true;
2307
- }
2308
- return false;
2239
+ return splitIdName === labelWithNoSpaces;
2309
2240
  };
2310
2241
  /**
2311
2242
  * Gets the label text in sentence case
@@ -2370,6 +2301,43 @@ const isValidDate = function isValidDate(date) {
2370
2301
  }
2371
2302
  };
2372
2303
 
2304
+ const StepperContext = /*#__PURE__*/createContext({
2305
+ updateStatus: status => {},
2306
+ // return true because in the default case we don't want the
2307
+ // input controls to take action if it is false.
2308
+ isInitialized: _ => true,
2309
+ stepId: 0
2310
+ });
2311
+ const isEmpty = value => {
2312
+ return value === undefined || value === null || typeof value === 'string' && value.length < 1;
2313
+ };
2314
+ const getCompletionStatus = (table, step) => {
2315
+ const nonEmptyCount = getNonEmptyCount(table, step);
2316
+ if (nonEmptyCount === 0) {
2317
+ return undefined;
2318
+ }
2319
+ const requiredCount = getRequiredCount(table, step);
2320
+ const requiredNonEmptyCount = getNonEmptyRequiredCount(table, step);
2321
+ if (requiredNonEmptyCount === requiredCount) {
2322
+ return 'complete';
2323
+ }
2324
+ return 'incomplete';
2325
+ };
2326
+ const getNonEmptyCount = (table, step) => {
2327
+ const nonEmptyStatuses = Object.keys(table).filter(k => table[k].step === step && !isEmpty(table[k].value));
2328
+ return nonEmptyStatuses.length;
2329
+ };
2330
+ const getRequiredCount = (table, step) => {
2331
+ const requiredStatuses = Object.keys(table).filter(k => {
2332
+ return table[k].step === step && table[k].required;
2333
+ });
2334
+ return requiredStatuses.length;
2335
+ };
2336
+ const getNonEmptyRequiredCount = (table, step) => {
2337
+ const requiredNonEmptyStatuses = Object.keys(table).filter(k => table[k].step === step && table[k].required && !isEmpty(table[k].value));
2338
+ return requiredNonEmptyStatuses.length;
2339
+ };
2340
+
2373
2341
  // Used locally for callout presentation
2374
2342
  const callout = props => {
2375
2343
  const componentProps = Object.assign({
@@ -2748,25 +2716,43 @@ const Visible = styled.div(_t2$4 || (_t2$4 = _$6`
2748
2716
 
2749
2717
  const GoAInputBaseControl = props => {
2750
2718
  var _a, _b, _c;
2751
- // eslint-disable-next-line
2752
2719
  const {
2753
- id,
2754
- description,
2755
- errors,
2756
2720
  uischema,
2757
2721
  visible,
2758
- config,
2759
2722
  label,
2760
2723
  input,
2761
2724
  required
2762
2725
  } = props;
2763
- errors.length === 0;
2764
2726
  const InnerComponent = input;
2765
2727
  const labelToUpdate = getLabelText(uischema.scope, label || '');
2766
2728
  let modifiedErrors = checkFieldValidity(props);
2767
2729
  if (modifiedErrors === 'should be equal to one of the allowed values' && ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.enumContext)) {
2768
2730
  modifiedErrors = '';
2769
2731
  }
2732
+ const getStepStatus = (props, value) => {
2733
+ return {
2734
+ id: props.id,
2735
+ value: value,
2736
+ required: props.required || false,
2737
+ type: props.schema.type,
2738
+ step: stepperContext.stepId
2739
+ };
2740
+ };
2741
+ const stepperContext = useContext(StepperContext);
2742
+ const handlerWithStepperUpdate = (path, value) => {
2743
+ stepperContext.updateStatus(getStepStatus(props, value));
2744
+ props.handleChange(path, value);
2745
+ };
2746
+ const modifiedProps = Object.assign(Object.assign({}, props), {
2747
+ handleChange: handlerWithStepperUpdate
2748
+ });
2749
+ useEffect(() => {
2750
+ if (!stepperContext.isInitialized(props.id)) {
2751
+ const status = getStepStatus(props, props.data);
2752
+ stepperContext.updateStatus(status);
2753
+ }
2754
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2755
+ }, []);
2770
2756
  return jsx(Visible, {
2771
2757
  visible: visible,
2772
2758
  children: jsx(FormFieldWrapper, {
@@ -2775,12 +2761,78 @@ const GoAInputBaseControl = props => {
2775
2761
  error: modifiedErrors,
2776
2762
  label: (props === null || props === void 0 ? void 0 : props.noLabel) === true ? '' : labelToUpdate,
2777
2763
  helpText: typeof ((_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.help) === 'string' ? (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.help : '',
2778
- children: jsx(InnerComponent, Object.assign({}, props))
2764
+ children: jsx(InnerComponent, Object.assign({}, modifiedProps))
2779
2765
  })
2780
2766
  })
2781
2767
  });
2782
2768
  };
2783
2769
 
2770
+ var makeBuiltIn = makeBuiltIn$3.exports;
2771
+ var defineProperty = objectDefineProperty;
2772
+
2773
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
2774
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2775
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2776
+ return defineProperty.f(target, name, descriptor);
2777
+ };
2778
+
2779
+ var $$2 = _export;
2780
+ var DESCRIPTORS = descriptors;
2781
+ var global$1 = global$f;
2782
+ var uncurryThis$1 = functionUncurryThis;
2783
+ var hasOwn$1 = hasOwnProperty_1;
2784
+ var isCallable = isCallable$h;
2785
+ var isPrototypeOf$1 = objectIsPrototypeOf;
2786
+ var toString$1 = toString$5;
2787
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
2788
+ var copyConstructorProperties = copyConstructorProperties$2;
2789
+
2790
+ var NativeSymbol = global$1.Symbol;
2791
+ var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
2792
+
2793
+ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
2794
+ // Safari 12 bug
2795
+ NativeSymbol().description !== undefined
2796
+ )) {
2797
+ var EmptyStringDescriptionStore = {};
2798
+ // wrap Symbol constructor for correct work with undefined description
2799
+ var SymbolWrapper = function Symbol() {
2800
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$1(arguments[0]);
2801
+ var result = isPrototypeOf$1(SymbolPrototype, this)
2802
+ ? new NativeSymbol(description)
2803
+ // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2804
+ : description === undefined ? NativeSymbol() : NativeSymbol(description);
2805
+ if (description === '') EmptyStringDescriptionStore[result] = true;
2806
+ return result;
2807
+ };
2808
+
2809
+ copyConstructorProperties(SymbolWrapper, NativeSymbol);
2810
+ SymbolWrapper.prototype = SymbolPrototype;
2811
+ SymbolPrototype.constructor = SymbolWrapper;
2812
+
2813
+ var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
2814
+ var thisSymbolValue = uncurryThis$1(SymbolPrototype.valueOf);
2815
+ var symbolDescriptiveString = uncurryThis$1(SymbolPrototype.toString);
2816
+ var regexp = /^Symbol\((.*)\)[^)]+$/;
2817
+ var replace = uncurryThis$1(''.replace);
2818
+ var stringSlice = uncurryThis$1(''.slice);
2819
+
2820
+ defineBuiltInAccessor(SymbolPrototype, 'description', {
2821
+ configurable: true,
2822
+ get: function description() {
2823
+ var symbol = thisSymbolValue(this);
2824
+ if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
2825
+ var string = symbolDescriptiveString(symbol);
2826
+ var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
2827
+ return desc === '' ? undefined : desc;
2828
+ }
2829
+ });
2830
+
2831
+ $$2({ global: true, constructor: true, forced: true }, {
2832
+ Symbol: SymbolWrapper
2833
+ });
2834
+ }
2835
+
2784
2836
  const GoAInputText = props => {
2785
2837
  var _a, _b, _c, _d, _e, _f, _g;
2786
2838
  const {
@@ -2789,10 +2841,6 @@ const GoAInputText = props => {
2789
2841
  id,
2790
2842
  enabled,
2791
2843
  uischema,
2792
- isValid,
2793
- errors,
2794
- path,
2795
- handleChange,
2796
2844
  schema,
2797
2845
  label
2798
2846
  } = props;
@@ -2812,9 +2860,9 @@ const GoAInputText = props => {
2812
2860
  // maxLength={appliedUiSchemaOptions?.maxLength}
2813
2861
  name: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
2814
2862
  testId: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`,
2815
- // Dont use handleChange in the onChange event, use the keyPress or onBlur.
2863
+ // Don't use handleChange in the onChange event, use the keyPress or onBlur.
2816
2864
  // If you use it onChange along with keyPress event it will cause a
2817
- // side effect that causes the validation to render when it shouldnt.
2865
+ // side effect that causes the validation to render when it shouldn't.
2818
2866
  onChange: (name, value) => {},
2819
2867
  onKeyPress: (name, value, key) => {
2820
2868
  onKeyPressForTextControl({
@@ -3277,14 +3325,16 @@ function addDataByOptions(key, url, location, type, values) {
3277
3325
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3278
3326
  const enumValues = new Map();
3279
3327
  const enumFunctions = new Map();
3328
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3329
+ const enumSubmitFunctions = new Map();
3280
3330
  const baseEnumerator = {
3281
3331
  data: enumValues,
3282
- functions: enumFunctions
3332
+ functions: enumFunctions,
3333
+ submitFunction: enumSubmitFunctions
3283
3334
  };
3284
3335
  const JsonFormContext = /*#__PURE__*/createContext(baseEnumerator);
3285
3336
  function ContextProvider(props) {
3286
3337
  var _a;
3287
- React.useContext(JsonFormContext);
3288
3338
  if (props.fileManagement) {
3289
3339
  const {
3290
3340
  fileList,
@@ -3301,6 +3351,13 @@ function ContextProvider(props) {
3301
3351
  enumFunctions.set('download-file', () => downloadFileFunction);
3302
3352
  enumFunctions.set('delete-file', () => deleteFileFunction);
3303
3353
  }
3354
+ if (props.submit) {
3355
+ const {
3356
+ submitForm
3357
+ } = props.submit;
3358
+ const submitFunction = submitForm ? submitForm : () => {};
3359
+ enumSubmitFunctions.set('submit-form', () => submitFunction);
3360
+ }
3304
3361
  if (props.data) {
3305
3362
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3306
3363
  (_a = props.data) === null || _a === void 0 ? void 0 : _a.forEach(item => {
@@ -3319,6 +3376,8 @@ function ContextProvider(props) {
3319
3376
  * Grabs data stored under a given key
3320
3377
  *
3321
3378
  */
3379
+ // FIXME give some clue as to what data is being fetched.
3380
+ // e.g.is it getFormContextData?
3322
3381
  function getData(key) {
3323
3382
  const dataFunction = baseEnumerator.data.get(key);
3324
3383
  return dataFunction && dataFunction();
@@ -3407,7 +3466,7 @@ const GoAEnumControlTester = rankWith(2, isEnumControl);
3407
3466
  const GoAEnumControl = withJsonFormsEnumProps(withTranslateProps(numControl), true);
3408
3467
 
3409
3468
  const EnumSelectAutoComplete = props => {
3410
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
3469
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
3411
3470
  const {
3412
3471
  data,
3413
3472
  schema,
@@ -3432,22 +3491,31 @@ const EnumSelectAutoComplete = props => {
3432
3491
  // eslint-disable-next-line
3433
3492
  enumData = newData;
3434
3493
  }
3435
- return jsx(GoADropdown, {
3436
- value: data,
3437
- onChange: (name, value) => {
3438
- handleChange(path, value);
3439
- },
3440
- testId: `autocomplete-dropdown-${label}`,
3441
- id: `autocomplete-dropdown-${label}`,
3442
- width: "100%",
3443
- filterable: true,
3444
- relative: true,
3445
- ariaLabel: label,
3446
- children: enumData === null || enumData === void 0 ? void 0 : enumData.map(item => {
3447
- return jsx(GoADropdownItem, {
3448
- value: item,
3449
- label: item
3450
- }, `autocomplete-${item}`);
3494
+ const readOnly = (_o = (_m = (_l = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _l === void 0 ? void 0 : _l.componentProps) === null || _m === void 0 ? void 0 : _m.readOnly) !== null && _o !== void 0 ? _o : false;
3495
+ return jsx("div", {
3496
+ children: readOnly ? jsx("div", {
3497
+ children: jsx(GoADropdown, {
3498
+ disabled: true,
3499
+ placeholder: data,
3500
+ onChange: () => {}
3501
+ })
3502
+ }) : jsx(GoADropdown, {
3503
+ value: data,
3504
+ onChange: (name, value) => {
3505
+ handleChange(path, value);
3506
+ },
3507
+ testId: `autocomplete-dropdown-${label}`,
3508
+ id: `autocomplete-dropdown-${label}`,
3509
+ width: "100%",
3510
+ filterable: true,
3511
+ relative: true,
3512
+ ariaLabel: label,
3513
+ children: enumData === null || enumData === void 0 ? void 0 : enumData.map(item => {
3514
+ return jsx(GoADropdownItem, {
3515
+ value: item,
3516
+ label: item
3517
+ }, `autocomplete-${item}`);
3518
+ })
3451
3519
  })
3452
3520
  });
3453
3521
  };
@@ -3670,7 +3738,7 @@ const GridItem = styled.div(_t2$3 || (_t2$3 = _$5`
3670
3738
  let _$4 = t => t,
3671
3739
  _t$4,
3672
3740
  _t2$2,
3673
- _t3$1,
3741
+ _t3$2,
3674
3742
  _t4$1,
3675
3743
  _t5,
3676
3744
  _t6,
@@ -3693,7 +3761,7 @@ const ReviewItemSection = styled.div(_t2$2 || (_t2$2 = _$4`
3693
3761
  border: 1px solid #dcdcdc;
3694
3762
  border-radius: 5px;
3695
3763
  `));
3696
- const ReviewItemHeader = styled.div(_t3$1 || (_t3$1 = _$4`
3764
+ const ReviewItemHeader = styled.div(_t3$2 || (_t3$2 = _$4`
3697
3765
  display: flex;
3698
3766
  align-items: center;
3699
3767
  justify-content: space-between;
@@ -3859,53 +3927,100 @@ requiredFields) => elements.map((element, index) => {
3859
3927
  return null;
3860
3928
  });
3861
3929
 
3862
- const FormStepper = ({
3863
- uischema,
3864
- data,
3865
- schema,
3866
- // eslint-disable-next-line
3867
- ajv,
3868
- path,
3869
- cells,
3870
- renderers,
3871
- config,
3872
- visible,
3873
- enabled,
3874
- t
3875
- }) => {
3930
+ const RenderStepElements = props => {
3931
+ return (
3932
+ /*
3933
+ [Mar-04-2024][Paul Li] the GoAPages internal state cannot handle the hidden/display well. We need extra hide/display control to it appropriately.
3934
+ */
3935
+ jsx(Visible, {
3936
+ visible: props.categoryIndex === props.step - 1,
3937
+ children: props.category.elements.map((uiSchema, index) => {
3938
+ return jsx(JsonFormsDispatch, {
3939
+ schema: props.schema,
3940
+ uischema: uiSchema,
3941
+ renderers: props.renderers,
3942
+ cells: props.cells,
3943
+ path: props.path,
3944
+ visible: props.visible,
3945
+ enabled: props.enabled && !props.disabledCategoryMap[props.categoryIndex]
3946
+ }, index);
3947
+ })
3948
+ })
3949
+ );
3950
+ };
3951
+
3952
+ const FormStepper = props => {
3953
+ var _a, _b, _c, _d;
3954
+ const {
3955
+ uischema,
3956
+ data,
3957
+ schema,
3958
+ ajv,
3959
+ path,
3960
+ cells,
3961
+ renderers,
3962
+ visible,
3963
+ enabled,
3964
+ t
3965
+ } = props;
3966
+ const enumerators = useContext(JsonFormContext);
3967
+ const submitFormFunction = enumerators.submitFunction.get('submit-form');
3968
+ const submitForm = submitFormFunction && submitFormFunction();
3876
3969
  const categorization = uischema;
3877
3970
  const rawCategories = JSON.parse(JSON.stringify(categorization));
3878
- const [step, setStep] = useState(1);
3879
- const [isFormValid, setIsFormValid] = useState(false);
3880
- const [showNextBtn, setShowNextBtn] = useState(true);
3881
- const [isOpen, setIsOpen] = useState(false);
3882
- const [categories, setCategories] = useState(categorization.elements);
3971
+ const [step, setStep] = React.useState(0);
3972
+ const [isFormValid, setIsFormValid] = React.useState(false);
3973
+ const [showNextBtn, setShowNextBtn] = React.useState(true);
3974
+ const [isOpen, setIsOpen] = React.useState(false);
3975
+ const [categories, setCategories] = React.useState(categorization.elements);
3976
+ const [inputStatuses, setInputStatuses] = React.useState({});
3977
+ const [stepStatuses, setStepStatuses] = React.useState([]);
3883
3978
  useEffect(() => {
3884
- const cates = categorization.elements.filter(category => isVisible(category, data, '', ajv));
3885
- setCategories(cates);
3979
+ const cats = categorization.elements.filter(category => isVisible(category, data, '', ajv));
3980
+ setCategories(cats);
3886
3981
  }, [categorization, data, ajv]);
3887
3982
  const disabledCategoryMap = categories.map(c => !isEnabled(c, data, '', ajv));
3888
3983
  const handleSubmit = () => {
3889
- setIsOpen(true);
3890
- console.log('submitted', data);
3984
+ if (submitForm) {
3985
+ submitForm(data);
3986
+ } else {
3987
+ setIsOpen(true);
3988
+ }
3891
3989
  };
3892
3990
  const onSubmit = () => {
3893
3991
  setIsOpen(false);
3894
- console.log('submitted', data);
3895
3992
  };
3896
3993
  const CategoryLabels = useMemo(() => {
3897
- return categories.map(e => deriveLabelForUISchemaElement(e, t));
3994
+ return categories.map(c => deriveLabelForUISchemaElement(c, t));
3898
3995
  }, [categories, t]);
3899
3996
  useEffect(() => {}, [categories.length]);
3900
- // eslint-disable-next-line react-hooks/exhaustive-deps
3901
- const vslidateFormData = formData => {
3902
- const validate = ajv.compile(schema);
3903
- return validate(formData);
3904
- };
3905
3997
  useEffect(() => {
3906
- const valid = vslidateFormData(data);
3907
- setIsFormValid(valid);
3908
- }, [data, vslidateFormData]);
3998
+ const statuses = Array(categories.length);
3999
+ categories.forEach((_, i) => {
4000
+ statuses[i] = getCompletionStatus(inputStatuses, i + 1);
4001
+ });
4002
+ setStepStatuses(statuses);
4003
+ }, [inputStatuses, categories]);
4004
+ useEffect(() => {
4005
+ const newSchema = JSON.parse(JSON.stringify(schema));
4006
+ Object.keys(newSchema.properties || {}).forEach(propertyName => {
4007
+ var _a;
4008
+ const property = newSchema.properties || {};
4009
+ property[propertyName].enum = getData(propertyName);
4010
+ if (((_a = property[propertyName]) === null || _a === void 0 ? void 0 : _a.format) === 'file-urn') {
4011
+ delete property[propertyName].format;
4012
+ }
4013
+ });
4014
+ const validate = ajv.compile(newSchema);
4015
+ setIsFormValid(validate(data));
4016
+ }, [ajv, data, schema]);
4017
+ useEffect(() => {
4018
+ var _a, _b;
4019
+ // Override the "controlled Navigation", if property is supplied
4020
+ // Default: no controlled nav.
4021
+ setStep(((_b = (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) === null || _b === void 0 ? void 0 : _b.controlledNav) ? 1 : 0);
4022
+ // eslint-disable-next-line react-hooks/exhaustive-deps
4023
+ }, []);
3909
4024
  if ((categories === null || categories === void 0 ? void 0 : categories.length) < 1) {
3910
4025
  // eslint-disable-next-line
3911
4026
  return jsx(Fragment, {});
@@ -3924,159 +4039,168 @@ const FormStepper = ({
3924
4039
  }
3925
4040
  setPage(page);
3926
4041
  }
3927
- function setTab(page) {
4042
+ const getNextStep = step => {
3928
4043
  const rawCategoryLabels = rawCategories.elements.map(category => category.label);
3929
4044
  if (rawCategoryLabels.length !== CategoryLabels.length) {
3930
- if (page > 1 && page <= rawCategoryLabels.length) {
3931
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3932
- const selectedTabLabel = rawCategoryLabels[page - 1];
4045
+ if (step > 1 && step <= rawCategoryLabels.length) {
4046
+ const selectedTabLabel = rawCategoryLabels[step - 1];
3933
4047
  const selectedTab = CategoryLabels.indexOf(selectedTabLabel);
3934
- const newStep = selectedTab !== -1 ? selectedTab + 1 : page;
3935
- page = newStep;
4048
+ const newStep = selectedTab !== -1 ? selectedTab + 1 : step;
4049
+ return newStep;
3936
4050
  }
3937
- if (page > rawCategoryLabels.length) {
3938
- page = page - 1;
4051
+ if (step > rawCategoryLabels.length) {
4052
+ return step - 1;
3939
4053
  }
3940
4054
  }
4055
+ return step;
4056
+ };
4057
+ function setTab(page) {
4058
+ page = getNextStep(page);
3941
4059
  setStep(page);
3942
4060
  if (page < 1 || page > categories.length + 1) return;
3943
- if (categories.length + 1 === page) {
3944
- setShowNextBtn(false);
3945
- } else {
3946
- setShowNextBtn(true);
3947
- }
4061
+ setShowNextBtn(categories.length + 1 !== page);
3948
4062
  }
3949
4063
  function setPage(page) {
3950
4064
  setStep(page);
3951
4065
  if (page < 1 || page > categories.length + 1) return;
3952
- if (categories.length + 1 === page) {
3953
- setShowNextBtn(false);
3954
- } else {
3955
- setShowNextBtn(true);
3956
- }
4066
+ setShowNextBtn(categories.length + 1 !== page);
3957
4067
  }
3958
- // eslint-disable-next-line react-hooks/rules-of-hooks
3959
- useEffect(() => {
3960
- setStep(0);
3961
- // eslint-disable-next-line react-hooks/exhaustive-deps
3962
- }, []);
3963
- const renderStepElements = (category, indexOfCategory) => {
3964
- return (
3965
- /*
3966
- [Mar-04-2024][Paul Li] the GoAPages internal state cannot handle the hidden/display well. We need extra hide/display control to it appropriately.
3967
- */
3968
- jsx(Visible, {
3969
- visible: indexOfCategory === step - 1,
3970
- children: category.elements.map((elementUiSchema, index) => {
3971
- return jsx(JsonFormsDispatch, {
3972
- schema: schema,
3973
- uischema: elementUiSchema,
3974
- renderers: renderers,
3975
- cells: cells,
3976
- path: path,
3977
- visible: visible,
3978
- enabled: enabled && !disabledCategoryMap[indexOfCategory]
3979
- }, index);
3980
- })
3981
- })
3982
- );
3983
- };
3984
- const handleEdit = index => {
4068
+ const changePage = index => {
3985
4069
  setPage(index + 1);
3986
4070
  };
3987
- return jsx(Visible, {
3988
- visible: visible,
3989
- children: jsxs("div", {
3990
- id: `${path || `goa`}-form-stepper`,
3991
- className: "formStepper",
3992
- children: [jsxs(GoAFormStepper, {
3993
- testId: "form-stepper-test",
3994
- step: step,
3995
- onChange: step => {
3996
- setTab(step);
3997
- },
3998
- children: [categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
3999
- return jsx(GoAFormStep, {
4000
- text: `${CategoryLabels[index]}`,
4001
- status: 'incomplete'
4002
- }, `${CategoryLabels[index]}-tab`);
4003
- }), jsx(GoAFormStep, {
4004
- text: "Review",
4005
- status: "incomplete"
4006
- })]
4007
- }), jsxs(GoAPages, {
4008
- current: step,
4009
- mb: "xl",
4010
- children: [categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
4011
- return jsx("div", {
4012
- "data-testid": `step_${index}-content`,
4013
- children: renderStepElements(category, index)
4014
- }, `${CategoryLabels[index]}`);
4015
- }), jsxs("div", {
4016
- children: [jsx("h3", {
4017
- style: {
4018
- flex: 1
4019
- },
4020
- children: "Summary"
4021
- }), jsx(ReviewItem, {
4022
- children: categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
4023
- const categoryLabel = category.label || category.i18n || 'Unknown Category';
4024
- const requiredFields = getAllRequiredFields(schema);
4025
- return jsxs(ReviewItemSection, {
4026
- children: [jsxs(ReviewItemHeader, {
4027
- children: [jsx(ReviewItemTitle, {
4028
- children: categoryLabel
4029
- }), jsx(Anchor, {
4030
- onClick: () => handleEdit(index),
4031
- children: "Edit"
4071
+ const updateInputStatus = inputStatus => {
4072
+ inputStatuses[inputStatus.id] = inputStatus;
4073
+ setInputStatuses(Object.assign({}, inputStatuses));
4074
+ };
4075
+ const isInputInitialized = inputId => {
4076
+ return inputId in inputStatuses;
4077
+ };
4078
+ const readOnly = (_c = (_b = (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) === null || _b === void 0 ? void 0 : _b.readOnly) !== null && _c !== void 0 ? _c : false;
4079
+ return jsx("div", {
4080
+ "data-testid": "form-stepper-test-wrapper",
4081
+ children: jsx(Visible, {
4082
+ visible: visible,
4083
+ children: jsxs("div", {
4084
+ id: `${path || `goa`}-form-stepper`,
4085
+ className: "formStepper",
4086
+ children: [jsxs(GoAFormStepper, {
4087
+ testId: ((_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.testId) || 'form-stepper-test',
4088
+ step: step,
4089
+ onChange: step => {
4090
+ setTab(step);
4091
+ },
4092
+ children: [categories === null || categories === void 0 ? void 0 : categories.map((_, index) => {
4093
+ return jsx(GoAFormStep, {
4094
+ text: `${CategoryLabels[index]}`,
4095
+ status: stepStatuses[index]
4096
+ }, `${CategoryLabels[index]}-tab`);
4097
+ }), jsx(GoAFormStep, {
4098
+ text: "Review"
4099
+ })]
4100
+ }), jsxs(GoAPages, {
4101
+ current: step,
4102
+ mb: "xl",
4103
+ children: [categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
4104
+ const props = {
4105
+ category,
4106
+ categoryIndex: index,
4107
+ step: index + 1,
4108
+ schema,
4109
+ enabled,
4110
+ visible,
4111
+ path,
4112
+ disabledCategoryMap,
4113
+ renderers,
4114
+ cells
4115
+ };
4116
+ return jsx("div", {
4117
+ "data-testid": `step_${index}-content`,
4118
+ style: {
4119
+ marginTop: '1.5rem'
4120
+ },
4121
+ children: jsx(StepperContext.Provider, {
4122
+ value: {
4123
+ stepId: index + 1,
4124
+ updateStatus: updateInputStatus,
4125
+ isInitialized: isInputInitialized
4126
+ },
4127
+ children: RenderStepElements(props)
4128
+ })
4129
+ }, `${CategoryLabels[index]}`);
4130
+ }), jsxs("div", {
4131
+ "data-testid": "summary_step-content",
4132
+ children: [jsx("h3", {
4133
+ style: {
4134
+ flex: 1,
4135
+ marginBottom: '1rem'
4136
+ },
4137
+ children: "Summary"
4138
+ }), jsx(ReviewItem, {
4139
+ children: categories.map((category, index) => {
4140
+ const categoryLabel = category.label || category.i18n || 'Unknown Category';
4141
+ const requiredFields = getAllRequiredFields(schema);
4142
+ return jsxs(ReviewItemSection, {
4143
+ children: [jsxs(ReviewItemHeader, {
4144
+ children: [jsx(ReviewItemTitle, {
4145
+ children: categoryLabel
4146
+ }), jsx(Anchor, {
4147
+ onClick: () => changePage(index),
4148
+ children: readOnly ? 'View' : 'Edit'
4149
+ })]
4150
+ }), jsx(Grid, {
4151
+ children: renderFormFields(category.elements, data, requiredFields)
4032
4152
  })]
4033
- }), jsx(Grid, {
4034
- children: renderFormFields(category.elements, data, requiredFields)
4035
- })]
4036
- }, index);
4037
- })
4153
+ }, index);
4154
+ })
4155
+ })]
4038
4156
  })]
4039
- })]
4040
- }), step && step !== 0 && jsxs(GoAGrid, {
4041
- minChildWidth: "100px",
4042
- children: [jsx("div", {
4043
- children: step !== 1 && jsx(GoAButton, {
4044
- type: "secondary",
4045
- disabled: disabledCategoryMap[step - 1] || !enabled,
4046
- onClick: () => prevPage(step, disabledCategoryMap),
4047
- children: "Previous"
4048
- })
4049
- }), jsxs(RightAlignmentDiv, {
4050
- children: [step !== null && showNextBtn && jsx(GoAButton, {
4051
- type: "primary",
4052
- disabled: disabledCategoryMap[step - 1] || !enabled,
4053
- onClick: () => nextPage(step, disabledCategoryMap),
4054
- children: "Next"
4055
- }), !showNextBtn && jsx(GoAButton, {
4056
- type: "primary",
4057
- onClick: handleSubmit,
4058
- disabled: !isFormValid || !enabled,
4059
- children: "Submit"
4157
+ }), step && step !== 0 && jsxs(GoAGrid, {
4158
+ minChildWidth: "100px",
4159
+ children: [jsx("div", {
4160
+ children: step !== 1 ? jsx(GoAButton, {
4161
+ type: "secondary",
4162
+ disabled: disabledCategoryMap[step - 1] || !enabled,
4163
+ onClick: () => prevPage(step, disabledCategoryMap),
4164
+ testId: "prev-button",
4165
+ children: "Previous"
4166
+ }) : jsx("div", {})
4167
+ }), jsxs(RightAlignmentDiv, {
4168
+ children: [step !== null && showNextBtn && jsx(GoAButton, {
4169
+ type: "primary",
4170
+ disabled: disabledCategoryMap[step - 1] || !enabled,
4171
+ onClick: () => nextPage(step, disabledCategoryMap),
4172
+ testId: "next-button",
4173
+ children: "Next"
4174
+ }), !showNextBtn && jsx("div", {
4175
+ children: jsx(GoAButton, {
4176
+ type: "primary",
4177
+ onClick: handleSubmit,
4178
+ disabled: !isFormValid || !enabled,
4179
+ children: "Submit"
4180
+ })
4181
+ })]
4060
4182
  })]
4061
- })]
4062
- }), jsxs(GoAModal, {
4063
- testId: "submit-confirmation",
4064
- open: isOpen,
4065
- heading: 'Form Submitted',
4066
- width: "640px",
4067
- actions: jsx(GoAButtonGroup, {
4068
- alignment: "end",
4069
- children: jsx(GoAButton, {
4070
- type: "primary",
4071
- testId: "submit-form",
4072
- onClick: onSubmit,
4073
- children: "Close"
4183
+ }), jsx(GoAModal, {
4184
+ testId: "submit-confirmation",
4185
+ open: isOpen,
4186
+ heading: 'Form Submitted',
4187
+ width: "640px",
4188
+ actions: jsxs(GoAButtonGroup, {
4189
+ alignment: "end",
4190
+ children: [jsx(GoAButton, {
4191
+ type: "primary",
4192
+ testId: "submit-form",
4193
+ onClick: onSubmit,
4194
+ children: "Close"
4195
+ }), !showNextBtn && jsx(GoAButton, {
4196
+ type: "primary",
4197
+ onClick: handleSubmit,
4198
+ disabled: !isFormValid || !enabled,
4199
+ children: "Submit"
4200
+ })]
4074
4201
  })
4075
- }),
4076
- children: [jsx("b", {
4077
- children: "Submit is a test for preview purposes "
4078
- }), "(i.e. no actual form is being submitted)"]
4079
- })]
4202
+ })]
4203
+ })
4080
4204
  })
4081
4205
  });
4082
4206
  };
@@ -4192,11 +4316,12 @@ const DeleteFileModal = ({
4192
4316
 
4193
4317
  let _$2 = t => t,
4194
4318
  _t$2,
4195
- _t2$1;
4319
+ _t2$1,
4320
+ _t3$1;
4196
4321
  const DELAY_UPLOAD_TIMEOUT_MS = 200;
4197
4322
  const DELAY_DELETE_TIMEOUT_MS = 80;
4198
4323
  const FileUploader = _a => {
4199
- var _b;
4324
+ var _b, _c, _d, _e;
4200
4325
  var {
4201
4326
  data,
4202
4327
  path,
@@ -4260,6 +4385,7 @@ const FileUploader = _a => {
4260
4385
  const timeoutId = setTimeout(delayedFunction, 1);
4261
4386
  return () => clearTimeout(timeoutId);
4262
4387
  }, [handleChange, fileList, propertyId]);
4388
+ const readOnly = (_e = (_d = (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.componentProps) === null || _d === void 0 ? void 0 : _d.readOnly) !== null && _e !== void 0 ? _e : false;
4263
4389
  return jsxs(FileUploaderStyle, {
4264
4390
  id: "file-upload",
4265
4391
  className: "FileUploader",
@@ -4269,7 +4395,7 @@ const FileUploader = _a => {
4269
4395
  }) : jsx("div", {
4270
4396
  className: "label",
4271
4397
  children: props.label
4272
- }), jsx("div", {
4398
+ }), !readOnly && jsx("div", {
4273
4399
  className: "file-upload",
4274
4400
  children: jsx(GoAFileUploadInput, {
4275
4401
  variant: variant,
@@ -4287,43 +4413,61 @@ const FileUploader = _a => {
4287
4413
  })
4288
4414
  })
4289
4415
  }) : jsx("div", {
4290
- children: fileList && getFile() && jsxs(AttachmentBorder, {
4291
- children: [jsx("div", {
4292
- children: getFileName()
4293
- }), jsxs(GoAContextMenu, {
4294
- children: [jsx(GoAContextMenuIcon, {
4416
+ children: fileList && getFile() && jsx("div", {
4417
+ children: readOnly ? jsxs(AttachmentBorderDisabled, {
4418
+ children: [getFileName(), ' ', jsx(GoAContextMenuIcon, {
4295
4419
  testId: "download-icon",
4296
4420
  title: "Download",
4297
4421
  type: "download",
4298
4422
  onClick: () => downloadFile(getFile())
4299
- }), jsx(GoAContextMenuIcon, {
4300
- "data-testid": "delete-icon",
4301
- title: "Delete",
4302
- type: "trash",
4303
- onClick: () => {
4304
- setShowFileDeleteConfirmation(true);
4423
+ })]
4424
+ }) : jsxs(AttachmentBorder, {
4425
+ children: [jsx("div", {
4426
+ children: getFileName()
4427
+ }), jsxs(GoAContextMenu, {
4428
+ children: [jsx(GoAContextMenuIcon, {
4429
+ testId: "download-icon",
4430
+ title: "Download",
4431
+ type: "download",
4432
+ onClick: () => downloadFile(getFile())
4433
+ }), jsx(GoAContextMenuIcon, {
4434
+ "data-testid": "delete-icon",
4435
+ title: "Delete",
4436
+ type: "trash",
4437
+ onClick: () => {
4438
+ setShowFileDeleteConfirmation(true);
4439
+ }
4440
+ })]
4441
+ }), jsx(DeleteFileModal, {
4442
+ isOpen: showFileDeleteConfirmation,
4443
+ title: "Delete file",
4444
+ content: `Delete file ${getFile().filename} ?`,
4445
+ onCancel: () => setShowFileDeleteConfirmation(false),
4446
+ onDelete: () => {
4447
+ setShowFileDeleteConfirmation(false);
4448
+ deleteFile(getFile());
4449
+ const handleFunction = () => {
4450
+ handleChange(propertyId, '');
4451
+ };
4452
+ setTimeout(handleFunction, DELAY_DELETE_TIMEOUT_MS);
4305
4453
  }
4306
4454
  })]
4307
- }), jsx(DeleteFileModal, {
4308
- isOpen: showFileDeleteConfirmation,
4309
- title: "Delete file",
4310
- content: `Delete file ${getFile().filename} ?`,
4311
- onCancel: () => setShowFileDeleteConfirmation(false),
4312
- onDelete: () => {
4313
- setShowFileDeleteConfirmation(false);
4314
- deleteFile(getFile());
4315
- const handleFunction = () => {
4316
- handleChange(propertyId, '');
4317
- };
4318
- setTimeout(handleFunction, DELAY_DELETE_TIMEOUT_MS);
4319
- }
4320
- })]
4455
+ })
4321
4456
  })
4322
4457
  })
4323
4458
  })]
4324
4459
  });
4325
4460
  };
4326
- const AttachmentBorder = styled.div(_t$2 || (_t$2 = _$2`
4461
+ const AttachmentBorderDisabled = styled.div(_t$2 || (_t$2 = _$2`
4462
+ display: flex;
4463
+ flex-direction: row;
4464
+ border: var(--goa-border-width-s) solid #dcdcdc;
4465
+ border-radius: var(--goa-border-radius-m);
4466
+ padding: var(--goa-space-xs);
4467
+ width: fit-content;
4468
+ background-color: #f1f1f1;
4469
+ `));
4470
+ const AttachmentBorder = styled.div(_t2$1 || (_t2$1 = _$2`
4327
4471
  display: flex;
4328
4472
  flex-direction: row;
4329
4473
  border: var(--goa-border-width-s) solid #dcdcdc;
@@ -4332,7 +4476,7 @@ const AttachmentBorder = styled.div(_t$2 || (_t$2 = _$2`
4332
4476
  width: fit-content;
4333
4477
  margin-top: var(--goa-space-2xs);
4334
4478
  `));
4335
- const FileUploaderStyle = styled.div(_t2$1 || (_t2$1 = _$2`
4479
+ const FileUploaderStyle = styled.div(_t3$1 || (_t3$1 = _$2`
4336
4480
  .label {
4337
4481
  display: block;
4338
4482
  font-weight: var(--goa-font-weight-bold);
@@ -4535,7 +4679,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
4535
4679
  const NonEmptyCell = ownProps => {
4536
4680
  const ctx = useJsonForms();
4537
4681
  const emptyCellProps = ctxToNonEmptyCellProps(ctx, ownProps);
4538
- const isValid = isEmpty(emptyCellProps.errors);
4682
+ const isValid = isEmpty$1(emptyCellProps.errors);
4539
4683
  return jsx(NonEmptyCellComponent, Object.assign({}, emptyCellProps, {
4540
4684
  isValid: isValid
4541
4685
  }));
@@ -4800,7 +4944,7 @@ const LayoutRenderer = ({
4800
4944
  cells,
4801
4945
  visible
4802
4946
  }) => {
4803
- if (isEmpty(elements)) {
4947
+ if (isEmpty$1(elements)) {
4804
4948
  return null;
4805
4949
  } else {
4806
4950
  if (direction === 'row') {
@@ -5125,7 +5269,7 @@ const getUISchemaErrors = (uiSchema, schema) => {
5125
5269
  const invalidCategorizations = [];
5126
5270
  const invalidCategories = [];
5127
5271
  uiSchema.elements.forEach(e => {
5128
- if (e.type !== 'Category') {
5272
+ if (e.type !== 'Category' && e.type !== 'Categorization') {
5129
5273
  invalidCategorizations.push(e.type);
5130
5274
  }
5131
5275
  if (!hasElements(e) || isEmptyElements(e)) {