@abgov/jsonforms-components 1.43.6 → 1.43.8

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,11 +1,11 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import React, { createContext, useContext, useReducer, useMemo, useEffect, useState, useRef, useCallback } from 'react';
3
- import { GoAFormItem, GoAInput, GoATextArea, GoACallout, GoAInputDate, GoAInputDateTime, GoAInputTime, GoARadioGroup, GoARadioItem, GoACheckbox, GoAGrid, GoAFormStepper, GoAFormStep, GoAPages, GoAButton, GoAModal, GoAButtonGroup, GoAIconButton, GoAFileUploadInput, GoACircularProgress, GoAContainer, GoATable, GoADropdown, GoADropdownItem, GoADetails } from '@abgov/react-components';
3
+ import { GoAFormItem, GoAInput, GoATextArea, GoACallout, GoAInputDate, GoAInputDateTime, GoAInputTime, GoARadioGroup, GoARadioItem, GoACheckbox, GoAGrid, GoAFormStepper, GoAFormStep, GoAPages, GoAButton, GoAModal, GoAButtonGroup, GoAIconButton, GoAFileUploadInput, GoACircularProgress, GoAContainer, GoATable, GoADropdown, GoADropdownItem, GoADetails, GoASpinner } from '@abgov/react-components';
4
+ import { useJsonForms, withJsonFormsControlProps, withJsonFormsRendererProps, withJsonFormsEnumProps, withTranslateProps, JsonFormsDispatch, withJsonFormsLayoutProps, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
4
5
  import styled from 'styled-components';
5
6
  import axios from 'axios';
6
7
  import get$1 from 'lodash/get';
7
8
  import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, getAjv, isVisible, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, Paths, or, isObjectArrayControl, isPrimitiveArrayControl, isControl, isScoped, hasType, isCategorization, isLayout } from '@jsonforms/core';
8
- import { withJsonFormsControlProps, withJsonFormsRendererProps, withJsonFormsEnumProps, withTranslateProps, useJsonForms, JsonFormsDispatch, withJsonFormsLayoutProps, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
9
9
  import { isEqual, isEmpty as isEmpty$2, isObject as isObject$e } from 'lodash';
10
10
  import merge from 'lodash/merge';
11
11
  import isEmpty$1 from 'lodash/isEmpty';
@@ -1628,32 +1628,6 @@ $$l({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }
1628
1628
  assign: assign
1629
1629
  });
1630
1630
 
1631
- let _$9 = t => t,
1632
- _t$9;
1633
- const FormFieldWrapper = styled.div(_t$9 || (_t$9 = _$9`
1634
- margin-bottom: var(--goa-space-l);
1635
- `));
1636
-
1637
- var $$k = _export;
1638
- var toObject$3 = toObject$7;
1639
- var lengthOfArrayLike$3 = lengthOfArrayLike$5;
1640
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$6;
1641
- var addToUnscopables$1 = addToUnscopables$3;
1642
-
1643
- // `Array.prototype.at` method
1644
- // https://tc39.es/ecma262/#sec-array.prototype.at
1645
- $$k({ target: 'Array', proto: true }, {
1646
- at: function at(index) {
1647
- var O = toObject$3(this);
1648
- var len = lengthOfArrayLike$3(O);
1649
- var relativeIndex = toIntegerOrInfinity$3(index);
1650
- var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
1651
- return (k < 0 || k >= len) ? undefined : O[k];
1652
- }
1653
- });
1654
-
1655
- addToUnscopables$1('at');
1656
-
1657
1631
  var wellKnownSymbol$c = wellKnownSymbol$j;
1658
1632
 
1659
1633
  var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
@@ -1702,6 +1676,92 @@ var toString$e = function (argument) {
1702
1676
  return $String$1(argument);
1703
1677
  };
1704
1678
 
1679
+ var makeBuiltIn = makeBuiltIn$3.exports;
1680
+ var defineProperty$1 = objectDefineProperty;
1681
+
1682
+ var defineBuiltInAccessor$3 = function (target, name, descriptor) {
1683
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1684
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1685
+ return defineProperty$1.f(target, name, descriptor);
1686
+ };
1687
+
1688
+ var $$k = _export;
1689
+ var DESCRIPTORS$7 = descriptors;
1690
+ var global$d = global$o;
1691
+ var uncurryThis$h = functionUncurryThis;
1692
+ var hasOwn$4 = hasOwnProperty_1;
1693
+ var isCallable$b = isCallable$q;
1694
+ var isPrototypeOf$5 = objectIsPrototypeOf;
1695
+ var toString$d = toString$e;
1696
+ var defineBuiltInAccessor$2 = defineBuiltInAccessor$3;
1697
+ var copyConstructorProperties$1 = copyConstructorProperties$3;
1698
+
1699
+ var NativeSymbol = global$d.Symbol;
1700
+ var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
1701
+
1702
+ if (DESCRIPTORS$7 && isCallable$b(NativeSymbol) && (!('description' in SymbolPrototype) ||
1703
+ // Safari 12 bug
1704
+ NativeSymbol().description !== undefined
1705
+ )) {
1706
+ var EmptyStringDescriptionStore = {};
1707
+ // wrap Symbol constructor for correct work with undefined description
1708
+ var SymbolWrapper = function Symbol() {
1709
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$d(arguments[0]);
1710
+ var result = isPrototypeOf$5(SymbolPrototype, this)
1711
+ ? new NativeSymbol(description)
1712
+ // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
1713
+ : description === undefined ? NativeSymbol() : NativeSymbol(description);
1714
+ if (description === '') EmptyStringDescriptionStore[result] = true;
1715
+ return result;
1716
+ };
1717
+
1718
+ copyConstructorProperties$1(SymbolWrapper, NativeSymbol);
1719
+ SymbolWrapper.prototype = SymbolPrototype;
1720
+ SymbolPrototype.constructor = SymbolWrapper;
1721
+
1722
+ var NATIVE_SYMBOL$1 = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
1723
+ var thisSymbolValue = uncurryThis$h(SymbolPrototype.valueOf);
1724
+ var symbolDescriptiveString = uncurryThis$h(SymbolPrototype.toString);
1725
+ var regexp = /^Symbol\((.*)\)[^)]+$/;
1726
+ var replace$6 = uncurryThis$h(''.replace);
1727
+ var stringSlice$6 = uncurryThis$h(''.slice);
1728
+
1729
+ defineBuiltInAccessor$2(SymbolPrototype, 'description', {
1730
+ configurable: true,
1731
+ get: function description() {
1732
+ var symbol = thisSymbolValue(this);
1733
+ if (hasOwn$4(EmptyStringDescriptionStore, symbol)) return '';
1734
+ var string = symbolDescriptiveString(symbol);
1735
+ var desc = NATIVE_SYMBOL$1 ? stringSlice$6(string, 7, -1) : replace$6(string, regexp, '$1');
1736
+ return desc === '' ? undefined : desc;
1737
+ }
1738
+ });
1739
+
1740
+ $$k({ global: true, constructor: true, forced: true }, {
1741
+ Symbol: SymbolWrapper
1742
+ });
1743
+ }
1744
+
1745
+ var $$j = _export;
1746
+ var toObject$3 = toObject$7;
1747
+ var lengthOfArrayLike$3 = lengthOfArrayLike$5;
1748
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$6;
1749
+ var addToUnscopables$1 = addToUnscopables$3;
1750
+
1751
+ // `Array.prototype.at` method
1752
+ // https://tc39.es/ecma262/#sec-array.prototype.at
1753
+ $$j({ target: 'Array', proto: true }, {
1754
+ at: function at(index) {
1755
+ var O = toObject$3(this);
1756
+ var len = lengthOfArrayLike$3(O);
1757
+ var relativeIndex = toIntegerOrInfinity$3(index);
1758
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
1759
+ return (k < 0 || k >= len) ? undefined : O[k];
1760
+ }
1761
+ });
1762
+
1763
+ addToUnscopables$1('at');
1764
+
1705
1765
  var anObject$a = anObject$f;
1706
1766
 
1707
1767
  // `RegExp.prototype.flags` getter implementation
@@ -1721,10 +1781,10 @@ var regexpFlags$1 = function () {
1721
1781
  };
1722
1782
 
1723
1783
  var fails$f = fails$r;
1724
- var global$d = global$o;
1784
+ var global$c = global$o;
1725
1785
 
1726
1786
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1727
- var $RegExp$2 = global$d.RegExp;
1787
+ var $RegExp$2 = global$c.RegExp;
1728
1788
 
1729
1789
  var UNSUPPORTED_Y$2 = fails$f(function () {
1730
1790
  var re = $RegExp$2('a', 'y');
@@ -1752,10 +1812,10 @@ var regexpStickyHelpers = {
1752
1812
  };
1753
1813
 
1754
1814
  var fails$e = fails$r;
1755
- var global$c = global$o;
1815
+ var global$b = global$o;
1756
1816
 
1757
1817
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1758
- var $RegExp$1 = global$c.RegExp;
1818
+ var $RegExp$1 = global$b.RegExp;
1759
1819
 
1760
1820
  var regexpUnsupportedDotAll = fails$e(function () {
1761
1821
  var re = $RegExp$1('.', 's');
@@ -1763,10 +1823,10 @@ var regexpUnsupportedDotAll = fails$e(function () {
1763
1823
  });
1764
1824
 
1765
1825
  var fails$d = fails$r;
1766
- var global$b = global$o;
1826
+ var global$a = global$o;
1767
1827
 
1768
1828
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1769
- var $RegExp = global$b.RegExp;
1829
+ var $RegExp = global$a.RegExp;
1770
1830
 
1771
1831
  var regexpUnsupportedNcg = fails$d(function () {
1772
1832
  var re = $RegExp('(?<a>b)', 'g');
@@ -1777,8 +1837,8 @@ var regexpUnsupportedNcg = fails$d(function () {
1777
1837
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1778
1838
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1779
1839
  var call$e = functionCall;
1780
- var uncurryThis$h = functionUncurryThis;
1781
- var toString$d = toString$e;
1840
+ var uncurryThis$g = functionUncurryThis;
1841
+ var toString$c = toString$e;
1782
1842
  var regexpFlags = regexpFlags$1;
1783
1843
  var stickyHelpers$1 = regexpStickyHelpers;
1784
1844
  var shared = shared$4;
@@ -1790,10 +1850,10 @@ var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
1790
1850
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1791
1851
  var nativeExec = RegExp.prototype.exec;
1792
1852
  var patchedExec = nativeExec;
1793
- var charAt$6 = uncurryThis$h(''.charAt);
1794
- var indexOf = uncurryThis$h(''.indexOf);
1795
- var replace$6 = uncurryThis$h(''.replace);
1796
- var stringSlice$6 = uncurryThis$h(''.slice);
1853
+ var charAt$6 = uncurryThis$g(''.charAt);
1854
+ var indexOf = uncurryThis$g(''.indexOf);
1855
+ var replace$5 = uncurryThis$g(''.replace);
1856
+ var stringSlice$5 = uncurryThis$g(''.slice);
1797
1857
 
1798
1858
  var UPDATES_LAST_INDEX_WRONG = (function () {
1799
1859
  var re1 = /a/;
@@ -1814,7 +1874,7 @@ if (PATCH) {
1814
1874
  patchedExec = function exec(string) {
1815
1875
  var re = this;
1816
1876
  var state = getInternalState$1(re);
1817
- var str = toString$d(string);
1877
+ var str = toString$c(string);
1818
1878
  var raw = state.raw;
1819
1879
  var result, reCopy, lastIndex, match, i, object, group;
1820
1880
 
@@ -1833,12 +1893,12 @@ if (PATCH) {
1833
1893
  var strCopy = str;
1834
1894
 
1835
1895
  if (sticky) {
1836
- flags = replace$6(flags, 'y', '');
1896
+ flags = replace$5(flags, 'y', '');
1837
1897
  if (indexOf(flags, 'g') === -1) {
1838
1898
  flags += 'g';
1839
1899
  }
1840
1900
 
1841
- strCopy = stringSlice$6(str, re.lastIndex);
1901
+ strCopy = stringSlice$5(str, re.lastIndex);
1842
1902
  // Support anchored sticky behavior.
1843
1903
  if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$6(str, re.lastIndex - 1) !== '\n')) {
1844
1904
  source = '(?: ' + source + ')';
@@ -1859,8 +1919,8 @@ if (PATCH) {
1859
1919
 
1860
1920
  if (sticky) {
1861
1921
  if (match) {
1862
- match.input = stringSlice$6(match.input, charsAdded);
1863
- match[0] = stringSlice$6(match[0], charsAdded);
1922
+ match.input = stringSlice$5(match.input, charsAdded);
1923
+ match[0] = stringSlice$5(match[0], charsAdded);
1864
1924
  match.index = re.lastIndex;
1865
1925
  re.lastIndex += match[0].length;
1866
1926
  } else re.lastIndex = 0;
@@ -1891,22 +1951,22 @@ if (PATCH) {
1891
1951
 
1892
1952
  var regexpExec$2 = patchedExec;
1893
1953
 
1894
- var $$j = _export;
1954
+ var $$i = _export;
1895
1955
  var exec$3 = regexpExec$2;
1896
1956
 
1897
1957
  // `RegExp.prototype.exec` method
1898
1958
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1899
- $$j({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
1959
+ $$i({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
1900
1960
  exec: exec$3
1901
1961
  });
1902
1962
 
1903
1963
  // TODO: Remove from `core-js@4` since it's moved to entry points
1904
1964
 
1905
- var $$i = _export;
1965
+ var $$h = _export;
1906
1966
  var call$d = functionCall;
1907
- var isCallable$b = isCallable$q;
1967
+ var isCallable$a = isCallable$q;
1908
1968
  var anObject$9 = anObject$f;
1909
- var toString$c = toString$e;
1969
+ var toString$b = toString$e;
1910
1970
 
1911
1971
  var DELEGATES_TO_EXEC = function () {
1912
1972
  var execCalled = false;
@@ -1922,12 +1982,12 @@ var nativeTest = /./.test;
1922
1982
 
1923
1983
  // `RegExp.prototype.test` method
1924
1984
  // https://tc39.es/ecma262/#sec-regexp.prototype.test
1925
- $$i({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1985
+ $$h({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1926
1986
  test: function (S) {
1927
1987
  var R = anObject$9(this);
1928
- var string = toString$c(S);
1988
+ var string = toString$b(S);
1929
1989
  var exec = R.exec;
1930
- if (!isCallable$b(exec)) return call$d(nativeTest, R, string);
1990
+ if (!isCallable$a(exec)) return call$d(nativeTest, R, string);
1931
1991
  var result = call$d(exec, R, string);
1932
1992
  if (result === null) return false;
1933
1993
  anObject$9(result);
@@ -1936,15 +1996,15 @@ $$i({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1936
1996
  });
1937
1997
 
1938
1998
  var call$c = functionCall;
1939
- var hasOwn$4 = hasOwnProperty_1;
1940
- var isPrototypeOf$5 = objectIsPrototypeOf;
1999
+ var hasOwn$3 = hasOwnProperty_1;
2000
+ var isPrototypeOf$4 = objectIsPrototypeOf;
1941
2001
  var regExpFlags = regexpFlags$1;
1942
2002
 
1943
2003
  var RegExpPrototype$4 = RegExp.prototype;
1944
2004
 
1945
2005
  var regexpGetFlags = function (R) {
1946
2006
  var flags = R.flags;
1947
- return flags === undefined && !('flags' in RegExpPrototype$4) && !hasOwn$4(R, 'flags') && isPrototypeOf$5(RegExpPrototype$4, R)
2007
+ return flags === undefined && !('flags' in RegExpPrototype$4) && !hasOwn$3(R, 'flags') && isPrototypeOf$4(RegExpPrototype$4, R)
1948
2008
  ? call$c(regExpFlags, R) : flags;
1949
2009
  };
1950
2010
 
@@ -1974,14 +2034,14 @@ if (NOT_GENERIC || INCORRECT_NAME) {
1974
2034
  }, { unsafe: true });
1975
2035
  }
1976
2036
 
1977
- var $$h = _export;
1978
- var uncurryThis$g = functionUncurryThis;
2037
+ var $$g = _export;
2038
+ var uncurryThis$f = functionUncurryThis;
1979
2039
  var requireObjectCoercible$7 = requireObjectCoercible$b;
1980
2040
  var toIntegerOrInfinity$2 = toIntegerOrInfinity$6;
1981
- var toString$b = toString$e;
2041
+ var toString$a = toString$e;
1982
2042
  var fails$b = fails$r;
1983
2043
 
1984
- var charAt$5 = uncurryThis$g(''.charAt);
2044
+ var charAt$5 = uncurryThis$f(''.charAt);
1985
2045
 
1986
2046
  var FORCED$3 = fails$b(function () {
1987
2047
  // eslint-disable-next-line es/no-array-string-prototype-at -- safe
@@ -1990,9 +2050,9 @@ var FORCED$3 = fails$b(function () {
1990
2050
 
1991
2051
  // `String.prototype.at` method
1992
2052
  // https://tc39.es/ecma262/#sec-string.prototype.at
1993
- $$h({ target: 'String', proto: true, forced: FORCED$3 }, {
2053
+ $$g({ target: 'String', proto: true, forced: FORCED$3 }, {
1994
2054
  at: function at(index) {
1995
- var S = toString$b(requireObjectCoercible$7(this));
2055
+ var S = toString$a(requireObjectCoercible$7(this));
1996
2056
  var len = S.length;
1997
2057
  var relativeIndex = toIntegerOrInfinity$2(index);
1998
2058
  var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
@@ -2087,18 +2147,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2087
2147
  if (SHAM) createNonEnumerableProperty$4(RegExpPrototype$2[SYMBOL], 'sham', true);
2088
2148
  };
2089
2149
 
2090
- var uncurryThis$f = functionUncurryThis;
2150
+ var uncurryThis$e = functionUncurryThis;
2091
2151
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$6;
2092
- var toString$a = toString$e;
2152
+ var toString$9 = toString$e;
2093
2153
  var requireObjectCoercible$6 = requireObjectCoercible$b;
2094
2154
 
2095
- var charAt$4 = uncurryThis$f(''.charAt);
2096
- var charCodeAt$1 = uncurryThis$f(''.charCodeAt);
2097
- var stringSlice$5 = uncurryThis$f(''.slice);
2155
+ var charAt$4 = uncurryThis$e(''.charAt);
2156
+ var charCodeAt$1 = uncurryThis$e(''.charCodeAt);
2157
+ var stringSlice$4 = uncurryThis$e(''.slice);
2098
2158
 
2099
2159
  var createMethod$2 = function (CONVERT_TO_STRING) {
2100
2160
  return function ($this, pos) {
2101
- var S = toString$a(requireObjectCoercible$6($this));
2161
+ var S = toString$9(requireObjectCoercible$6($this));
2102
2162
  var position = toIntegerOrInfinity$1(pos);
2103
2163
  var size = S.length;
2104
2164
  var first, second;
@@ -2110,7 +2170,7 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
2110
2170
  ? charAt$4(S, position)
2111
2171
  : first
2112
2172
  : CONVERT_TO_STRING
2113
- ? stringSlice$5(S, position, position + 2)
2173
+ ? stringSlice$4(S, position, position + 2)
2114
2174
  : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2115
2175
  };
2116
2176
  };
@@ -2132,13 +2192,13 @@ var advanceStringIndex$2 = function (S, index, unicode) {
2132
2192
  return index + (unicode ? charAt$3(S, index).length : 1);
2133
2193
  };
2134
2194
 
2135
- var uncurryThis$e = functionUncurryThis;
2195
+ var uncurryThis$d = functionUncurryThis;
2136
2196
  var toObject$2 = toObject$7;
2137
2197
 
2138
2198
  var floor = Math.floor;
2139
- var charAt$2 = uncurryThis$e(''.charAt);
2140
- var replace$5 = uncurryThis$e(''.replace);
2141
- var stringSlice$4 = uncurryThis$e(''.slice);
2199
+ var charAt$2 = uncurryThis$d(''.charAt);
2200
+ var replace$4 = uncurryThis$d(''.replace);
2201
+ var stringSlice$3 = uncurryThis$d(''.slice);
2142
2202
  // eslint-disable-next-line redos/no-vulnerable -- safe
2143
2203
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2144
2204
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
@@ -2153,15 +2213,15 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2153
2213
  namedCaptures = toObject$2(namedCaptures);
2154
2214
  symbols = SUBSTITUTION_SYMBOLS;
2155
2215
  }
2156
- return replace$5(replacement, symbols, function (match, ch) {
2216
+ return replace$4(replacement, symbols, function (match, ch) {
2157
2217
  var capture;
2158
2218
  switch (charAt$2(ch, 0)) {
2159
2219
  case '$': return '$';
2160
2220
  case '&': return matched;
2161
- case '`': return stringSlice$4(str, 0, position);
2162
- case "'": return stringSlice$4(str, tailPos);
2221
+ case '`': return stringSlice$3(str, 0, position);
2222
+ case "'": return stringSlice$3(str, tailPos);
2163
2223
  case '<':
2164
- capture = namedCaptures[stringSlice$4(ch, 1, -1)];
2224
+ capture = namedCaptures[stringSlice$3(ch, 1, -1)];
2165
2225
  break;
2166
2226
  default: // \d\d?
2167
2227
  var n = +ch;
@@ -2180,7 +2240,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2180
2240
 
2181
2241
  var call$9 = functionCall;
2182
2242
  var anObject$7 = anObject$f;
2183
- var isCallable$a = isCallable$q;
2243
+ var isCallable$9 = isCallable$q;
2184
2244
  var classof$7 = classofRaw$2;
2185
2245
  var regexpExec = regexpExec$2;
2186
2246
 
@@ -2190,7 +2250,7 @@ var $TypeError$b = TypeError;
2190
2250
  // https://tc39.es/ecma262/#sec-regexpexec
2191
2251
  var regexpExecAbstract = function (R, S) {
2192
2252
  var exec = R.exec;
2193
- if (isCallable$a(exec)) {
2253
+ if (isCallable$9(exec)) {
2194
2254
  var result = call$9(exec, R, S);
2195
2255
  if (result !== null) anObject$7(result);
2196
2256
  return result;
@@ -2201,15 +2261,15 @@ var regexpExecAbstract = function (R, S) {
2201
2261
 
2202
2262
  var apply$3 = functionApply;
2203
2263
  var call$8 = functionCall;
2204
- var uncurryThis$d = functionUncurryThis;
2264
+ var uncurryThis$c = functionUncurryThis;
2205
2265
  var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
2206
2266
  var fails$9 = fails$r;
2207
2267
  var anObject$6 = anObject$f;
2208
- var isCallable$9 = isCallable$q;
2268
+ var isCallable$8 = isCallable$q;
2209
2269
  var isNullOrUndefined$3 = isNullOrUndefined$6;
2210
2270
  var toIntegerOrInfinity = toIntegerOrInfinity$6;
2211
2271
  var toLength$3 = toLength$5;
2212
- var toString$9 = toString$e;
2272
+ var toString$8 = toString$e;
2213
2273
  var requireObjectCoercible$5 = requireObjectCoercible$b;
2214
2274
  var advanceStringIndex$1 = advanceStringIndex$2;
2215
2275
  var getMethod$3 = getMethod$5;
@@ -2220,10 +2280,10 @@ var wellKnownSymbol$9 = wellKnownSymbol$j;
2220
2280
  var REPLACE = wellKnownSymbol$9('replace');
2221
2281
  var max = Math.max;
2222
2282
  var min$2 = Math.min;
2223
- var concat = uncurryThis$d([].concat);
2224
- var push$1 = uncurryThis$d([].push);
2225
- var stringIndexOf$2 = uncurryThis$d(''.indexOf);
2226
- var stringSlice$3 = uncurryThis$d(''.slice);
2283
+ var concat = uncurryThis$c([].concat);
2284
+ var push$1 = uncurryThis$c([].push);
2285
+ var stringIndexOf$2 = uncurryThis$c(''.indexOf);
2286
+ var stringSlice$2 = uncurryThis$c(''.slice);
2227
2287
 
2228
2288
  var maybeToString = function (it) {
2229
2289
  return it === undefined ? it : String(it);
@@ -2267,13 +2327,13 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2267
2327
  var replacer = isNullOrUndefined$3(searchValue) ? undefined : getMethod$3(searchValue, REPLACE);
2268
2328
  return replacer
2269
2329
  ? call$8(replacer, searchValue, O, replaceValue)
2270
- : call$8(nativeReplace, toString$9(O), searchValue, replaceValue);
2330
+ : call$8(nativeReplace, toString$8(O), searchValue, replaceValue);
2271
2331
  },
2272
2332
  // `RegExp.prototype[@@replace]` method
2273
2333
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2274
2334
  function (string, replaceValue) {
2275
2335
  var rx = anObject$6(this);
2276
- var S = toString$9(string);
2336
+ var S = toString$8(string);
2277
2337
 
2278
2338
  if (
2279
2339
  typeof replaceValue == 'string' &&
@@ -2284,8 +2344,8 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2284
2344
  if (res.done) return res.value;
2285
2345
  }
2286
2346
 
2287
- var functionalReplace = isCallable$9(replaceValue);
2288
- if (!functionalReplace) replaceValue = toString$9(replaceValue);
2347
+ var functionalReplace = isCallable$8(replaceValue);
2348
+ if (!functionalReplace) replaceValue = toString$8(replaceValue);
2289
2349
 
2290
2350
  var global = rx.global;
2291
2351
  var fullUnicode;
@@ -2303,7 +2363,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2303
2363
  push$1(results, result);
2304
2364
  if (!global) break;
2305
2365
 
2306
- var matchStr = toString$9(result[0]);
2366
+ var matchStr = toString$8(result[0]);
2307
2367
  if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$3(rx.lastIndex), fullUnicode);
2308
2368
  }
2309
2369
 
@@ -2312,7 +2372,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2312
2372
  for (var i = 0; i < results.length; i++) {
2313
2373
  result = results[i];
2314
2374
 
2315
- var matched = toString$9(result[0]);
2375
+ var matched = toString$8(result[0]);
2316
2376
  var position = max(min$2(toIntegerOrInfinity(result.index), S.length), 0);
2317
2377
  var captures = [];
2318
2378
  var replacement;
@@ -2326,17 +2386,17 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2326
2386
  if (functionalReplace) {
2327
2387
  var replacerArgs = concat([matched], captures, position, S);
2328
2388
  if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
2329
- replacement = toString$9(apply$3(replaceValue, undefined, replacerArgs));
2389
+ replacement = toString$8(apply$3(replaceValue, undefined, replacerArgs));
2330
2390
  } else {
2331
2391
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2332
2392
  }
2333
2393
  if (position >= nextSourcePosition) {
2334
- accumulatedResult += stringSlice$3(S, nextSourcePosition, position) + replacement;
2394
+ accumulatedResult += stringSlice$2(S, nextSourcePosition, position) + replacement;
2335
2395
  nextSourcePosition = position + matched.length;
2336
2396
  }
2337
2397
  }
2338
2398
 
2339
- return accumulatedResult + stringSlice$3(S, nextSourcePosition);
2399
+ return accumulatedResult + stringSlice$2(S, nextSourcePosition);
2340
2400
  }
2341
2401
  ];
2342
2402
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
@@ -2408,20 +2468,18 @@ const validateSinWithLuhn = input => {
2408
2468
  }
2409
2469
  return sum % 10 === 0;
2410
2470
  };
2411
- /**
2412
- * Check if a required, defined input value is valid. Returns an appropriate
2413
- * error message if not.
2414
- * @param props
2415
- * @returns error message
2416
- */
2417
- const checkFieldValidity = props => {
2471
+ const checkFieldValidity = (props, ctx) => {
2472
+ var _a, _b, _c, _d, _e;
2418
2473
  const {
2419
2474
  data,
2420
2475
  errors: ajvErrors,
2421
2476
  required,
2422
2477
  label,
2423
2478
  uischema,
2424
- schema
2479
+ schema,
2480
+ path,
2481
+ id,
2482
+ description
2425
2483
  } = props;
2426
2484
  const labelToUpdate = getLabelText(uischema.scope, label);
2427
2485
  const extraSchema = schema;
@@ -2433,7 +2491,32 @@ const checkFieldValidity = props => {
2433
2491
  }
2434
2492
  }
2435
2493
  if (required) {
2436
- if (data === undefined) return '';
2494
+ if ((_a = ctx.core) === null || _a === void 0 ? void 0 : _a.ajv) {
2495
+ const newError = {
2496
+ instancePath: path,
2497
+ message: ajvErrors,
2498
+ schemaPath: id,
2499
+ keyword: description || '',
2500
+ params: {}
2501
+ };
2502
+ const index = (ctx.core.ajv.errors || []).findIndex(error => {
2503
+ return (error === null || error === void 0 ? void 0 : error.schemaPath) === id;
2504
+ });
2505
+ if (schema && (isEmptyBoolean(schema, data) || isEmptyNumber(schema, data))) {
2506
+ if (index > -1) {
2507
+ (ctx.core.ajv.errors || [])[index] = newError;
2508
+ } else {
2509
+ ctx.core.ajv.errors = [...(ctx.core.ajv.errors || []), newError];
2510
+ }
2511
+ } else {
2512
+ if (index > -1) {
2513
+ delete (ctx.core.ajv.errors || [])[index];
2514
+ }
2515
+ }
2516
+ }
2517
+ if ((_c = (_b = ctx.core) === null || _b === void 0 ? void 0 : _b.ajv) === null || _c === void 0 ? void 0 : _c.errors) {
2518
+ ctx.core.ajv.errors = (_e = (_d = ctx.core) === null || _d === void 0 ? void 0 : _d.ajv) === null || _e === void 0 ? void 0 : _e.errors.filter(e => e !== null);
2519
+ }
2437
2520
  if (schema) {
2438
2521
  if (isEmptyBoolean(schema, data)) {
2439
2522
  return `${labelToUpdate} is required`;
@@ -2795,16 +2878,16 @@ const onChangeForNumericControl = props => {
2795
2878
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2796
2879
  const onChangeForCheckboxData = (data, name, value) => data ? !value ? data === null || data === void 0 ? void 0 : data.filter(item => item !== name) : [...data, name] : [name];
2797
2880
 
2798
- let _$8 = t => t,
2799
- _t$8,
2881
+ let _$9 = t => t,
2882
+ _t$9,
2800
2883
  _t2$5;
2801
- styled.div(_t$8 || (_t$8 = _$8`
2884
+ styled.div(_t$9 || (_t$9 = _$9`
2802
2885
  height: 70vh;
2803
2886
  overflow-y: auto;
2804
2887
  padding-left: var(--goa-space-2xs);
2805
2888
  padding-right: var(--goa-space-2xs);
2806
2889
  `));
2807
- const Visible = styled.div(_t2$5 || (_t2$5 = _$8`
2890
+ const Visible = styled.div(_t2$5 || (_t2$5 = _$9`
2808
2891
  display: ${0};
2809
2892
  `), p => p.visible ? 'initial' : 'none');
2810
2893
 
@@ -2822,7 +2905,7 @@ var isArray$2 = Array.isArray || function isArray(argument) {
2822
2905
  return classof$6(argument) === 'Array';
2823
2906
  };
2824
2907
 
2825
- var DESCRIPTORS$7 = descriptors;
2908
+ var DESCRIPTORS$6 = descriptors;
2826
2909
  var isArray$1 = isArray$2;
2827
2910
 
2828
2911
  var $TypeError$a = TypeError;
@@ -2830,7 +2913,7 @@ var $TypeError$a = TypeError;
2830
2913
  var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
2831
2914
 
2832
2915
  // Safari < 13 does not throw an error in this case
2833
- var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$7 && !function () {
2916
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$6 && !function () {
2834
2917
  // makes no sense without proper strict mode support
2835
2918
  if (this !== undefined) return true;
2836
2919
  try {
@@ -2857,7 +2940,7 @@ var doesNotExceedSafeInteger$1 = function (it) {
2857
2940
  return it;
2858
2941
  };
2859
2942
 
2860
- var $$g = _export;
2943
+ var $$f = _export;
2861
2944
  var toObject$1 = toObject$7;
2862
2945
  var lengthOfArrayLike$2 = lengthOfArrayLike$5;
2863
2946
  var setArrayLength = arraySetLength;
@@ -2883,7 +2966,7 @@ var FORCED$2 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2883
2966
 
2884
2967
  // `Array.prototype.push` method
2885
2968
  // https://tc39.es/ecma262/#sec-array.prototype.push
2886
- $$g({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
2969
+ $$f({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
2887
2970
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2888
2971
  push: function push(item) {
2889
2972
  var O = toObject$1(this);
@@ -2934,7 +3017,7 @@ function registerReducer(state, action) {
2934
3017
  return state;
2935
3018
  }
2936
3019
 
2937
- var $$f = _export;
3020
+ var $$e = _export;
2938
3021
  var $includes = arrayIncludes.includes;
2939
3022
  var fails$7 = fails$r;
2940
3023
  var addToUnscopables = addToUnscopables$3;
@@ -2947,7 +3030,7 @@ var BROKEN_ON_SPARSE = fails$7(function () {
2947
3030
 
2948
3031
  // `Array.prototype.includes` method
2949
3032
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2950
- $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
3033
+ $$e({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2951
3034
  includes: function includes(el /* , fromIndex = 0 */) {
2952
3035
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2953
3036
  }
@@ -2956,27 +3039,27 @@ $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2956
3039
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2957
3040
  addToUnscopables('includes');
2958
3041
 
2959
- var uncurryThis$c = functionUncurryThis;
3042
+ var uncurryThis$b = functionUncurryThis;
2960
3043
 
2961
- var arraySlice$2 = uncurryThis$c([].slice);
3044
+ var arraySlice$2 = uncurryThis$b([].slice);
2962
3045
 
2963
- var uncurryThis$b = functionUncurryThis;
3046
+ var uncurryThis$a = functionUncurryThis;
2964
3047
  var isArray = isArray$2;
2965
- var isCallable$8 = isCallable$q;
3048
+ var isCallable$7 = isCallable$q;
2966
3049
  var classof$5 = classofRaw$2;
2967
- var toString$8 = toString$e;
3050
+ var toString$7 = toString$e;
2968
3051
 
2969
- var push = uncurryThis$b([].push);
3052
+ var push = uncurryThis$a([].push);
2970
3053
 
2971
3054
  var getJsonReplacerFunction = function (replacer) {
2972
- if (isCallable$8(replacer)) return replacer;
3055
+ if (isCallable$7(replacer)) return replacer;
2973
3056
  if (!isArray(replacer)) return;
2974
3057
  var rawLength = replacer.length;
2975
3058
  var keys = [];
2976
3059
  for (var i = 0; i < rawLength; i++) {
2977
3060
  var element = replacer[i];
2978
3061
  if (typeof element == 'string') push(keys, element);
2979
- else if (typeof element == 'number' || classof$5(element) === 'Number' || classof$5(element) === 'String') push(keys, toString$8(element));
3062
+ else if (typeof element == 'number' || classof$5(element) === 'Number' || classof$5(element) === 'String') push(keys, toString$7(element));
2980
3063
  }
2981
3064
  var keysLength = keys.length;
2982
3065
  var root = true;
@@ -2990,31 +3073,31 @@ var getJsonReplacerFunction = function (replacer) {
2990
3073
  };
2991
3074
  };
2992
3075
 
2993
- var $$e = _export;
3076
+ var $$d = _export;
2994
3077
  var getBuiltIn$5 = getBuiltIn$9;
2995
3078
  var apply$2 = functionApply;
2996
3079
  var call$7 = functionCall;
2997
- var uncurryThis$a = functionUncurryThis;
3080
+ var uncurryThis$9 = functionUncurryThis;
2998
3081
  var fails$6 = fails$r;
2999
- var isCallable$7 = isCallable$q;
3082
+ var isCallable$6 = isCallable$q;
3000
3083
  var isSymbol = isSymbol$3;
3001
3084
  var arraySlice$1 = arraySlice$2;
3002
3085
  var getReplacerFunction = getJsonReplacerFunction;
3003
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
3086
+ var NATIVE_SYMBOL = symbolConstructorDetection;
3004
3087
 
3005
3088
  var $String = String;
3006
3089
  var $stringify = getBuiltIn$5('JSON', 'stringify');
3007
- var exec$2 = uncurryThis$a(/./.exec);
3008
- var charAt$1 = uncurryThis$a(''.charAt);
3009
- var charCodeAt = uncurryThis$a(''.charCodeAt);
3010
- var replace$4 = uncurryThis$a(''.replace);
3011
- var numberToString = uncurryThis$a(1.0.toString);
3090
+ var exec$2 = uncurryThis$9(/./.exec);
3091
+ var charAt$1 = uncurryThis$9(''.charAt);
3092
+ var charCodeAt = uncurryThis$9(''.charCodeAt);
3093
+ var replace$3 = uncurryThis$9(''.replace);
3094
+ var numberToString = uncurryThis$9(1.0.toString);
3012
3095
 
3013
3096
  var tester = /[\uD800-\uDFFF]/g;
3014
3097
  var low = /^[\uD800-\uDBFF]$/;
3015
3098
  var hi = /^[\uDC00-\uDFFF]$/;
3016
3099
 
3017
- var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL$1 || fails$6(function () {
3100
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$6(function () {
3018
3101
  var symbol = getBuiltIn$5('Symbol')('stringify detection');
3019
3102
  // MS Edge converts symbol values to JSON as {}
3020
3103
  return $stringify([symbol]) !== '[null]'
@@ -3033,10 +3116,10 @@ var ILL_FORMED_UNICODE = fails$6(function () {
3033
3116
  var stringifyWithSymbolsFix = function (it, replacer) {
3034
3117
  var args = arraySlice$1(arguments);
3035
3118
  var $replacer = getReplacerFunction(replacer);
3036
- if (!isCallable$7($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
3119
+ if (!isCallable$6($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
3037
3120
  args[1] = function (key, value) {
3038
3121
  // some old implementations (like WebKit) could pass numbers as keys
3039
- if (isCallable$7($replacer)) value = call$7($replacer, this, $String(key), value);
3122
+ if (isCallable$6($replacer)) value = call$7($replacer, this, $String(key), value);
3040
3123
  if (!isSymbol(value)) return value;
3041
3124
  };
3042
3125
  return apply$2($stringify, null, args);
@@ -3053,12 +3136,12 @@ var fixIllFormed = function (match, offset, string) {
3053
3136
  if ($stringify) {
3054
3137
  // `JSON.stringify` method
3055
3138
  // https://tc39.es/ecma262/#sec-json.stringify
3056
- $$e({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
3139
+ $$d({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
3057
3140
  // eslint-disable-next-line no-unused-vars -- required for `.length`
3058
3141
  stringify: function stringify(it, replacer, space) {
3059
3142
  var args = arraySlice$1(arguments);
3060
3143
  var result = apply$2(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
3061
- return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$4(result, tester, fixIllFormed) : result;
3144
+ return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$3(result, tester, fixIllFormed) : result;
3062
3145
  }
3063
3146
  });
3064
3147
  }
@@ -3102,22 +3185,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
3102
3185
  } return false;
3103
3186
  };
3104
3187
 
3105
- var $$d = _export;
3106
- var uncurryThis$9 = functionUncurryThis;
3188
+ var $$c = _export;
3189
+ var uncurryThis$8 = functionUncurryThis;
3107
3190
  var notARegExp$2 = notARegexp;
3108
3191
  var requireObjectCoercible$4 = requireObjectCoercible$b;
3109
- var toString$7 = toString$e;
3192
+ var toString$6 = toString$e;
3110
3193
  var correctIsRegExpLogic$2 = correctIsRegexpLogic;
3111
3194
 
3112
- var stringIndexOf$1 = uncurryThis$9(''.indexOf);
3195
+ var stringIndexOf$1 = uncurryThis$8(''.indexOf);
3113
3196
 
3114
3197
  // `String.prototype.includes` method
3115
3198
  // https://tc39.es/ecma262/#sec-string.prototype.includes
3116
- $$d({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
3199
+ $$c({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
3117
3200
  includes: function includes(searchString /* , position = 0 */) {
3118
3201
  return !!~stringIndexOf$1(
3119
- toString$7(requireObjectCoercible$4(this)),
3120
- toString$7(notARegExp$2(searchString)),
3202
+ toString$6(requireObjectCoercible$4(this)),
3203
+ toString$6(notARegExp$2(searchString)),
3121
3204
  arguments.length > 1 ? arguments[1] : undefined
3122
3205
  );
3123
3206
  }
@@ -3165,7 +3248,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
3165
3248
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3166
3249
  };
3167
3250
 
3168
- var isCallable$6 = isCallable$q;
3251
+ var isCallable$5 = isCallable$q;
3169
3252
  var isObject$3 = isObject$d;
3170
3253
  var setPrototypeOf$2 = objectSetPrototypeOf;
3171
3254
 
@@ -3176,7 +3259,7 @@ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
3176
3259
  // it can work only with native `setPrototypeOf`
3177
3260
  setPrototypeOf$2 &&
3178
3261
  // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3179
- isCallable$6(NewTarget = dummy.constructor) &&
3262
+ isCallable$5(NewTarget = dummy.constructor) &&
3180
3263
  NewTarget !== Wrapper &&
3181
3264
  isObject$3(NewTargetPrototype = NewTarget.prototype) &&
3182
3265
  NewTargetPrototype !== Wrapper.prototype
@@ -3184,60 +3267,51 @@ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
3184
3267
  return $this;
3185
3268
  };
3186
3269
 
3187
- var defineProperty$1 = objectDefineProperty.f;
3270
+ var defineProperty = objectDefineProperty.f;
3188
3271
 
3189
3272
  var proxyAccessor$2 = function (Target, Source, key) {
3190
- key in Target || defineProperty$1(Target, key, {
3273
+ key in Target || defineProperty(Target, key, {
3191
3274
  configurable: true,
3192
3275
  get: function () { return Source[key]; },
3193
3276
  set: function (it) { Source[key] = it; }
3194
3277
  });
3195
3278
  };
3196
3279
 
3197
- var makeBuiltIn = makeBuiltIn$3.exports;
3198
- var defineProperty = objectDefineProperty;
3199
-
3200
- var defineBuiltInAccessor$3 = function (target, name, descriptor) {
3201
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
3202
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
3203
- return defineProperty.f(target, name, descriptor);
3204
- };
3205
-
3206
3280
  var getBuiltIn$4 = getBuiltIn$9;
3207
- var defineBuiltInAccessor$2 = defineBuiltInAccessor$3;
3281
+ var defineBuiltInAccessor$1 = defineBuiltInAccessor$3;
3208
3282
  var wellKnownSymbol$6 = wellKnownSymbol$j;
3209
- var DESCRIPTORS$6 = descriptors;
3283
+ var DESCRIPTORS$5 = descriptors;
3210
3284
 
3211
3285
  var SPECIES$2 = wellKnownSymbol$6('species');
3212
3286
 
3213
3287
  var setSpecies$2 = function (CONSTRUCTOR_NAME) {
3214
3288
  var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
3215
3289
 
3216
- if (DESCRIPTORS$6 && Constructor && !Constructor[SPECIES$2]) {
3217
- defineBuiltInAccessor$2(Constructor, SPECIES$2, {
3290
+ if (DESCRIPTORS$5 && Constructor && !Constructor[SPECIES$2]) {
3291
+ defineBuiltInAccessor$1(Constructor, SPECIES$2, {
3218
3292
  configurable: true,
3219
3293
  get: function () { return this; }
3220
3294
  });
3221
3295
  }
3222
3296
  };
3223
3297
 
3224
- var DESCRIPTORS$5 = descriptors;
3225
- var global$a = global$o;
3226
- var uncurryThis$8 = functionUncurryThis;
3298
+ var DESCRIPTORS$4 = descriptors;
3299
+ var global$9 = global$o;
3300
+ var uncurryThis$7 = functionUncurryThis;
3227
3301
  var isForced$1 = isForced_1;
3228
3302
  var inheritIfRequired$1 = inheritIfRequired$2;
3229
3303
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$9;
3230
3304
  var create = objectCreate;
3231
3305
  var getOwnPropertyNames = objectGetOwnPropertyNames.f;
3232
- var isPrototypeOf$4 = objectIsPrototypeOf;
3306
+ var isPrototypeOf$3 = objectIsPrototypeOf;
3233
3307
  var isRegExp = isRegexp;
3234
- var toString$6 = toString$e;
3308
+ var toString$5 = toString$e;
3235
3309
  var getRegExpFlags = regexpGetFlags;
3236
3310
  var stickyHelpers = regexpStickyHelpers;
3237
3311
  var proxyAccessor$1 = proxyAccessor$2;
3238
3312
  var defineBuiltIn$2 = defineBuiltIn$8;
3239
3313
  var fails$5 = fails$r;
3240
- var hasOwn$3 = hasOwnProperty_1;
3314
+ var hasOwn$2 = hasOwnProperty_1;
3241
3315
  var enforceInternalState = internalState.enforce;
3242
3316
  var setSpecies$1 = setSpecies$2;
3243
3317
  var wellKnownSymbol$5 = wellKnownSymbol$j;
@@ -3245,14 +3319,14 @@ var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
3245
3319
  var UNSUPPORTED_NCG = regexpUnsupportedNcg;
3246
3320
 
3247
3321
  var MATCH = wellKnownSymbol$5('match');
3248
- var NativeRegExp = global$a.RegExp;
3322
+ var NativeRegExp = global$9.RegExp;
3249
3323
  var RegExpPrototype$1 = NativeRegExp.prototype;
3250
- var SyntaxError = global$a.SyntaxError;
3251
- var exec$1 = uncurryThis$8(RegExpPrototype$1.exec);
3252
- var charAt = uncurryThis$8(''.charAt);
3253
- var replace$3 = uncurryThis$8(''.replace);
3254
- var stringIndexOf = uncurryThis$8(''.indexOf);
3255
- var stringSlice$2 = uncurryThis$8(''.slice);
3324
+ var SyntaxError = global$9.SyntaxError;
3325
+ var exec$1 = uncurryThis$7(RegExpPrototype$1.exec);
3326
+ var charAt = uncurryThis$7(''.charAt);
3327
+ var replace$2 = uncurryThis$7(''.replace);
3328
+ var stringIndexOf = uncurryThis$7(''.indexOf);
3329
+ var stringSlice$1 = uncurryThis$7(''.slice);
3256
3330
  // TODO: Use only proper RegExpIdentifierName
3257
3331
  var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
3258
3332
  var re1 = /a/g;
@@ -3264,7 +3338,7 @@ var CORRECT_NEW = new NativeRegExp(re1) !== re1;
3264
3338
  var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
3265
3339
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
3266
3340
 
3267
- var BASE_FORCED = DESCRIPTORS$5 &&
3341
+ var BASE_FORCED = DESCRIPTORS$4 &&
3268
3342
  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG || fails$5(function () {
3269
3343
  re2[MATCH] = false;
3270
3344
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
@@ -3317,7 +3391,7 @@ var handleNCG = function (string) {
3317
3391
  brackets = true;
3318
3392
  break;
3319
3393
  case chr === '(':
3320
- if (exec$1(IS_NCG, stringSlice$2(string, index + 1))) {
3394
+ if (exec$1(IS_NCG, stringSlice$1(string, index + 1))) {
3321
3395
  index += 2;
3322
3396
  ncg = true;
3323
3397
  }
@@ -3325,7 +3399,7 @@ var handleNCG = function (string) {
3325
3399
  groupid++;
3326
3400
  continue;
3327
3401
  case chr === '>' && ncg:
3328
- if (groupname === '' || hasOwn$3(names, groupname)) {
3402
+ if (groupname === '' || hasOwn$2(names, groupname)) {
3329
3403
  throw new SyntaxError('Invalid capture group name');
3330
3404
  }
3331
3405
  names[groupname] = true;
@@ -3343,7 +3417,7 @@ var handleNCG = function (string) {
3343
3417
  // https://tc39.es/ecma262/#sec-regexp-constructor
3344
3418
  if (isForced$1('RegExp', BASE_FORCED)) {
3345
3419
  var RegExpWrapper = function RegExp(pattern, flags) {
3346
- var thisIsRegExp = isPrototypeOf$4(RegExpPrototype$1, this);
3420
+ var thisIsRegExp = isPrototypeOf$3(RegExpPrototype$1, this);
3347
3421
  var patternIsRegExp = isRegExp(pattern);
3348
3422
  var flagsAreUndefined = flags === undefined;
3349
3423
  var groups = [];
@@ -3354,25 +3428,25 @@ if (isForced$1('RegExp', BASE_FORCED)) {
3354
3428
  return pattern;
3355
3429
  }
3356
3430
 
3357
- if (patternIsRegExp || isPrototypeOf$4(RegExpPrototype$1, pattern)) {
3431
+ if (patternIsRegExp || isPrototypeOf$3(RegExpPrototype$1, pattern)) {
3358
3432
  pattern = pattern.source;
3359
3433
  if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);
3360
3434
  }
3361
3435
 
3362
- pattern = pattern === undefined ? '' : toString$6(pattern);
3363
- flags = flags === undefined ? '' : toString$6(flags);
3436
+ pattern = pattern === undefined ? '' : toString$5(pattern);
3437
+ flags = flags === undefined ? '' : toString$5(flags);
3364
3438
  rawPattern = pattern;
3365
3439
 
3366
3440
  if (UNSUPPORTED_DOT_ALL$1 && 'dotAll' in re1) {
3367
3441
  dotAll = !!flags && stringIndexOf(flags, 's') > -1;
3368
- if (dotAll) flags = replace$3(flags, /s/g, '');
3442
+ if (dotAll) flags = replace$2(flags, /s/g, '');
3369
3443
  }
3370
3444
 
3371
3445
  rawFlags = flags;
3372
3446
 
3373
3447
  if (MISSED_STICKY && 'sticky' in re1) {
3374
3448
  sticky = !!flags && stringIndexOf(flags, 'y') > -1;
3375
- if (sticky && UNSUPPORTED_Y) flags = replace$3(flags, /y/g, '');
3449
+ if (sticky && UNSUPPORTED_Y) flags = replace$2(flags, /y/g, '');
3376
3450
  }
3377
3451
 
3378
3452
  if (UNSUPPORTED_NCG) {
@@ -3407,16 +3481,16 @@ if (isForced$1('RegExp', BASE_FORCED)) {
3407
3481
 
3408
3482
  RegExpPrototype$1.constructor = RegExpWrapper;
3409
3483
  RegExpWrapper.prototype = RegExpPrototype$1;
3410
- defineBuiltIn$2(global$a, 'RegExp', RegExpWrapper, { constructor: true });
3484
+ defineBuiltIn$2(global$9, 'RegExp', RegExpWrapper, { constructor: true });
3411
3485
  }
3412
3486
 
3413
3487
  // https://tc39.es/ecma262/#sec-get-regexp-@@species
3414
3488
  setSpecies$1('RegExp');
3415
3489
 
3416
- var DESCRIPTORS$4 = descriptors;
3490
+ var DESCRIPTORS$3 = descriptors;
3417
3491
  var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
3418
3492
  var classof$3 = classofRaw$2;
3419
- var defineBuiltInAccessor$1 = defineBuiltInAccessor$3;
3493
+ var defineBuiltInAccessor = defineBuiltInAccessor$3;
3420
3494
  var getInternalState = internalState.get;
3421
3495
 
3422
3496
  var RegExpPrototype = RegExp.prototype;
@@ -3424,8 +3498,8 @@ var $TypeError$7 = TypeError;
3424
3498
 
3425
3499
  // `RegExp.prototype.dotAll` getter
3426
3500
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
3427
- if (DESCRIPTORS$4 && UNSUPPORTED_DOT_ALL) {
3428
- defineBuiltInAccessor$1(RegExpPrototype, 'dotAll', {
3501
+ if (DESCRIPTORS$3 && UNSUPPORTED_DOT_ALL) {
3502
+ defineBuiltInAccessor(RegExpPrototype, 'dotAll', {
3429
3503
  configurable: true,
3430
3504
  get: function dotAll() {
3431
3505
  if (this === RegExpPrototype) return;
@@ -3632,6 +3706,12 @@ const JsonFormRegisterProvider = ({
3632
3706
  });
3633
3707
  };
3634
3708
 
3709
+ let _$8 = t => t,
3710
+ _t$8;
3711
+ const FormFieldWrapper = styled.div(_t$8 || (_t$8 = _$8`
3712
+ margin-bottom: var(--goa-space-l);
3713
+ `));
3714
+
3635
3715
  const GoAInputBaseControl = props => {
3636
3716
  var _a, _b;
3637
3717
  const {
@@ -3646,7 +3726,8 @@ const GoAInputBaseControl = props => {
3646
3726
  } = props;
3647
3727
  const InnerComponent = input;
3648
3728
  const labelToUpdate = getLabelText(uischema.scope, label || '');
3649
- let modifiedErrors = checkFieldValidity(props);
3729
+ const ctx = useJsonForms();
3730
+ let modifiedErrors = checkFieldValidity(props, ctx);
3650
3731
  if (modifiedErrors === 'must be equal to one of the allowed values') {
3651
3732
  modifiedErrors = '';
3652
3733
  }
@@ -3692,63 +3773,6 @@ const GoAInputBaseControl = props => {
3692
3773
  });
3693
3774
  };
3694
3775
 
3695
- var $$c = _export;
3696
- var DESCRIPTORS$3 = descriptors;
3697
- var global$9 = global$o;
3698
- var uncurryThis$7 = functionUncurryThis;
3699
- var hasOwn$2 = hasOwnProperty_1;
3700
- var isCallable$5 = isCallable$q;
3701
- var isPrototypeOf$3 = objectIsPrototypeOf;
3702
- var toString$5 = toString$e;
3703
- var defineBuiltInAccessor = defineBuiltInAccessor$3;
3704
- var copyConstructorProperties$1 = copyConstructorProperties$3;
3705
-
3706
- var NativeSymbol = global$9.Symbol;
3707
- var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
3708
-
3709
- if (DESCRIPTORS$3 && isCallable$5(NativeSymbol) && (!('description' in SymbolPrototype) ||
3710
- // Safari 12 bug
3711
- NativeSymbol().description !== undefined
3712
- )) {
3713
- var EmptyStringDescriptionStore = {};
3714
- // wrap Symbol constructor for correct work with undefined description
3715
- var SymbolWrapper = function Symbol() {
3716
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$5(arguments[0]);
3717
- var result = isPrototypeOf$3(SymbolPrototype, this)
3718
- ? new NativeSymbol(description)
3719
- // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
3720
- : description === undefined ? NativeSymbol() : NativeSymbol(description);
3721
- if (description === '') EmptyStringDescriptionStore[result] = true;
3722
- return result;
3723
- };
3724
-
3725
- copyConstructorProperties$1(SymbolWrapper, NativeSymbol);
3726
- SymbolWrapper.prototype = SymbolPrototype;
3727
- SymbolPrototype.constructor = SymbolWrapper;
3728
-
3729
- var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
3730
- var thisSymbolValue = uncurryThis$7(SymbolPrototype.valueOf);
3731
- var symbolDescriptiveString = uncurryThis$7(SymbolPrototype.toString);
3732
- var regexp = /^Symbol\((.*)\)[^)]+$/;
3733
- var replace$2 = uncurryThis$7(''.replace);
3734
- var stringSlice$1 = uncurryThis$7(''.slice);
3735
-
3736
- defineBuiltInAccessor(SymbolPrototype, 'description', {
3737
- configurable: true,
3738
- get: function description() {
3739
- var symbol = thisSymbolValue(this);
3740
- if (hasOwn$2(EmptyStringDescriptionStore, symbol)) return '';
3741
- var string = symbolDescriptiveString(symbol);
3742
- var desc = NATIVE_SYMBOL ? stringSlice$1(string, 7, -1) : replace$2(string, regexp, '$1');
3743
- return desc === '' ? undefined : desc;
3744
- }
3745
- });
3746
-
3747
- $$c({ global: true, constructor: true, forced: true }, {
3748
- Symbol: SymbolWrapper
3749
- });
3750
- }
3751
-
3752
3776
  var call$6 = functionCall;
3753
3777
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
3754
3778
  var anObject$5 = anObject$f;
@@ -3824,7 +3848,8 @@ const GoAInputText = props => {
3824
3848
  } = props;
3825
3849
  const appliedUiSchemaOptions = Object.assign(Object.assign({}, config), uischema === null || uischema === void 0 ? void 0 : uischema.options);
3826
3850
  const placeholder = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.placeholder) || (schema === null || schema === void 0 ? void 0 : schema.description) || '';
3827
- const errorsFormInput = checkFieldValidity(props);
3851
+ const ctx = useJsonForms();
3852
+ const errorsFormInput = checkFieldValidity(props, ctx);
3828
3853
  const isSinField = schema.title === sinTitle;
3829
3854
  const autoCapitalize = ((_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.autoCapitalize) === true || ((_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.autoCapitalize) === true;
3830
3855
  const readOnly = (_f = (_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.componentProps) === null || _e === void 0 ? void 0 : _e.readOnly) !== null && _f !== void 0 ? _f : false;
@@ -3897,7 +3922,8 @@ const MultiLineText = props => {
3897
3922
  const [textAreaValue, _] = React.useState(data);
3898
3923
  const appliedUiSchemaOptions = Object.assign(Object.assign({}, config), uischema === null || uischema === void 0 ? void 0 : uischema.options);
3899
3924
  const placeholder = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.placeholder) || (schema === null || schema === void 0 ? void 0 : schema.description) || '';
3900
- const errorsFormInput = checkFieldValidity(props);
3925
+ const ctx = useJsonForms();
3926
+ const errorsFormInput = checkFieldValidity(props, ctx);
3901
3927
  const width = (_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 : '100%';
3902
3928
  const autoCapitalize = ((_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.componentProps) === null || _e === void 0 ? void 0 : _e.autoCapitalize) === true || ((_f = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _f === void 0 ? void 0 : _f.autoCapitalize) === true;
3903
3929
  const readOnly = (_j = (_h = (_g = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _g === void 0 ? void 0 : _g.componentProps) === null || _h === void 0 ? void 0 : _h.readOnly) !== null && _j !== void 0 ? _j : false;
@@ -4010,6 +4036,7 @@ const reformatDateProps = props => {
4010
4036
  };
4011
4037
  const GoADateInput = props => {
4012
4038
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4039
+ const ctx = useJsonForms();
4013
4040
  const {
4014
4041
  data,
4015
4042
  config,
@@ -4032,7 +4059,7 @@ const GoADateInput = props => {
4032
4059
  return invalidDateFormat(uischema.scope, 'Max');
4033
4060
  }
4034
4061
  return jsx(GoAInputDate, Object.assign({
4035
- error: checkFieldValidity(props).length > 0,
4062
+ error: checkFieldValidity(props, ctx).length > 0,
4036
4063
  width: width,
4037
4064
  name: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
4038
4065
  value: standardizeDate(data) || '',
@@ -4093,7 +4120,8 @@ const GoANumberInput = props => {
4093
4120
  const MaxValue = clonedSchema.exclusiveMaximum ? clonedSchema.exclusiveMaximum : '';
4094
4121
  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;
4095
4122
  const width = (_f = (_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.componentProps) === null || _e === void 0 ? void 0 : _e.width) !== null && _f !== void 0 ? _f : '100%';
4096
- const errorsFormInput = checkFieldValidity(props);
4123
+ const ctx = useJsonForms();
4124
+ const errorsFormInput = checkFieldValidity(props, ctx);
4097
4125
  return jsx(GoAInput, Object.assign({
4098
4126
  type: "number",
4099
4127
  error: errorsFormInput.length > 0,
@@ -4161,7 +4189,8 @@ const GoAInputInteger = props => {
4161
4189
  const MaxValue = clonedSchema.exclusiveMaximum ? clonedSchema.exclusiveMaximum : '';
4162
4190
  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;
4163
4191
  const width = (_f = (_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.componentProps) === null || _e === void 0 ? void 0 : _e.width) !== null && _f !== void 0 ? _f : '100%';
4164
- const errorsFormInput = checkFieldValidity(props);
4192
+ const ctx = useJsonForms();
4193
+ const errorsFormInput = checkFieldValidity(props, ctx);
4165
4194
  return jsx(GoAInput, Object.assign({
4166
4195
  type: "number",
4167
4196
  error: errorsFormInput.length > 0,
@@ -4224,8 +4253,9 @@ const GoADateTimeInput = props => {
4224
4253
  const appliedUiSchemaOptions = Object.assign(Object.assign({}, config), uischema === null || uischema === void 0 ? void 0 : uischema.options);
4225
4254
  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;
4226
4255
  const width = (_f = (_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.componentProps) === null || _e === void 0 ? void 0 : _e.width) !== null && _f !== void 0 ? _f : '100%';
4256
+ const ctx = useJsonForms();
4227
4257
  return jsx(GoAInputDateTime, Object.assign({
4228
- error: checkFieldValidity(props).length > 0,
4258
+ error: checkFieldValidity(props, ctx).length > 0,
4229
4259
  width: width,
4230
4260
  name: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
4231
4261
  value: data ? new Date(data).toISOString() : '',
@@ -4280,7 +4310,8 @@ const GoATimeInput = props => {
4280
4310
  const appliedUiSchemaOptions = Object.assign(Object.assign({}, config), uischema === null || uischema === void 0 ? void 0 : uischema.options);
4281
4311
  (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.placeholder) || (schema === null || schema === void 0 ? void 0 : schema.description) || '';
4282
4312
  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;
4283
- const errorsFormInput = checkFieldValidity(props);
4313
+ const ctx = useJsonForms();
4314
+ const errorsFormInput = checkFieldValidity(props, ctx);
4284
4315
  const width = (_f = (_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.componentProps) === null || _e === void 0 ? void 0 : _e.readOnly) !== null && _f !== void 0 ? _f : '100%';
4285
4316
  return jsx(GoAInputTime, Object.assign({
4286
4317
  error: errorsFormInput.length > 0,
@@ -4844,7 +4875,8 @@ const RadioGroup = props => {
4844
4875
  } = props;
4845
4876
  const enumData = (schema === null || schema === void 0 ? void 0 : schema.enum) || [];
4846
4877
  const appliedUiSchemaOptions = merge({}, config, props.uischema.options, options);
4847
- const errorsFormInput = checkFieldValidity(props);
4878
+ const ctx = useJsonForms();
4879
+ const errorsFormInput = checkFieldValidity(props, ctx);
4848
4880
  return jsx(GoARadioGroup, Object.assign({
4849
4881
  error: errorsFormInput.length > 0,
4850
4882
  name: `${options || appliedUiSchemaOptions.label}`,
@@ -4880,31 +4912,35 @@ const BooleanComponent = ({
4880
4912
  path,
4881
4913
  label,
4882
4914
  required,
4883
- errors
4915
+ errors,
4916
+ schema
4884
4917
  }) => {
4885
- var _a;
4918
+ var _a, _b;
4919
+ const ctx = useJsonForms();
4886
4920
  const errorsFormInput = checkFieldValidity({
4887
4921
  data,
4888
4922
  uischema,
4889
4923
  label,
4890
4924
  required,
4891
- errors
4892
- });
4893
- const text = label + (required ? ' (required)' : '');
4925
+ errors,
4926
+ schema
4927
+ }, ctx);
4928
+ const text = `${(schema === null || schema === void 0 ? void 0 : schema.title) || (schema === null || schema === void 0 ? void 0 : schema.description) ? (schema === null || schema === void 0 ? void 0 : schema.title) ? schema === null || schema === void 0 ? void 0 : schema.title : schema === null || schema === void 0 ? void 0 : schema.description : (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.text}${required ? ' (required)' : ''}`;
4894
4929
  return jsx(GoACheckbox, Object.assign({
4895
4930
  error: errorsFormInput.length > 0,
4896
4931
  testId: `${path}-checkbox-test-id`,
4897
4932
  disabled: !enabled,
4898
- text: text,
4933
+ text: text && text !== 'undefined' ? text : getLabelText(uischema.scope, label || ''),
4899
4934
  name: `${path}`,
4900
4935
  checked: data,
4901
4936
  onChange: (_, checked) => {
4902
4937
  handleChange(path, checked);
4903
4938
  }
4904
- }, (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps));
4939
+ }, (_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.componentProps, {
4940
+ mb: "none"
4941
+ }));
4905
4942
  };
4906
4943
  const BooleanControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
4907
- noLabel: true,
4908
4944
  input: BooleanComponent
4909
4945
  }));
4910
4946
  const GoABooleanControlTester = rankWith(2, isBooleanControl);
@@ -4931,13 +4967,14 @@ const BooleanRadioComponent = ({
4931
4967
  const TrueDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForTrue);
4932
4968
  const FalseDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForFalse);
4933
4969
  const BaseTestId = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${path}-boolean-radio-jsonform`;
4970
+ const ctx = useJsonForms();
4934
4971
  const errorsFormInput = checkFieldValidity({
4935
4972
  data,
4936
4973
  uischema,
4937
4974
  label,
4938
4975
  required,
4939
4976
  errors
4940
- });
4977
+ }, ctx);
4941
4978
  return jsx(Visible, {
4942
4979
  visible: visible,
4943
4980
  children: jsxs(GoARadioGroup, Object.assign({
@@ -7534,6 +7571,20 @@ const SearchBox = styled.div(_t$1 || (_t$1 = _$1`
7534
7571
  cursor: pointer;
7535
7572
  font-weight: var(--fw-bold);
7536
7573
  }
7574
+ .input-container {
7575
+ position: relative;
7576
+ display: inline-block;
7577
+ width: 100%; /* Ensures it spans the parent container */
7578
+ }
7579
+
7580
+ .input-container .input-spinner {
7581
+ position: absolute;
7582
+ top: 50%;
7583
+ right: 8px; /* Adjust based on padding or margin of the input field */
7584
+ transform: translateY(-50%);
7585
+ z-index: 1; /* Ensure it appears above the input */
7586
+ pointer-events: none; /* Prevent spinner from interfering with clicks */
7587
+ }
7537
7588
  `));
7538
7589
  const AddressIndent = styled.div(_t2 || (_t2 = _$1`
7539
7590
  margin: 1em 1.5em 0 1.5em;
@@ -8122,28 +8173,33 @@ const AddressLookUpControl = props => {
8122
8173
  error: (_g = errors === null || errors === void 0 ? void 0 : errors['addressLine1']) !== null && _g !== void 0 ? _g : '',
8123
8174
  "data-testId": "form-address-line1",
8124
8175
  children: jsxs(SearchBox, {
8125
- children: [jsx(GoAInput, {
8126
- leadingIcon: autocompletion && enabled ? 'search' : undefined,
8127
- id: "goaInput",
8128
- name: "addressLine1",
8129
- testId: "address-form-address1",
8130
- readonly: readOnly,
8131
- disabled: !enabled,
8132
- ariaLabel: 'address-form-address1',
8133
- placeholder: "Start typing the first line of your address, required.",
8134
- value: (address === null || address === void 0 ? void 0 : address.addressLine1) || '',
8135
- onChange: (e, value) => handleDropdownChange(value),
8136
- onBlur: name => handleRequiredFieldBlur(name),
8137
- width: "100%",
8138
- onKeyPress: (e, value, key) => {
8139
- if (open) {
8140
- handleKeyDown(e, value, key);
8176
+ children: [jsxs("div", {
8177
+ className: "input-container",
8178
+ children: [jsx(GoAInput, {
8179
+ leadingIcon: autocompletion && enabled ? 'search' : undefined,
8180
+ id: "goaInput",
8181
+ name: "addressLine1",
8182
+ testId: "address-form-address1",
8183
+ readonly: readOnly,
8184
+ disabled: !enabled,
8185
+ ariaLabel: 'address-form-address1',
8186
+ placeholder: "Start typing the first line of your address, required.",
8187
+ value: (address === null || address === void 0 ? void 0 : address.addressLine1) || '',
8188
+ onChange: (e, value) => handleDropdownChange(value),
8189
+ onBlur: name => handleRequiredFieldBlur(name),
8190
+ width: "100%",
8191
+ onKeyPress: (e, value, key) => {
8192
+ if (open) {
8193
+ handleKeyDown(e, value, key);
8194
+ }
8141
8195
  }
8142
- }
8143
- }), loading && autocompletion && jsx(GoACircularProgress, {
8144
- variant: "inline",
8145
- size: "small",
8146
- visible: true
8196
+ }), loading && jsx("div", {
8197
+ className: "input-spinner",
8198
+ children: jsx(GoASpinner, {
8199
+ type: "infinite",
8200
+ size: "small"
8201
+ })
8202
+ })]
8147
8203
  }), !loading && suggestions && autocompletion && jsx("ul", {
8148
8204
  ref: dropdownRef,
8149
8205
  className: "suggestions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.43.6",
3
+ "version": "1.43.8",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { RankedTester, ControlProps } from '@jsonforms/core';
3
- export declare const BooleanComponent: ({ data, enabled, uischema, handleChange, path, label, required, errors, }: ControlProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const BooleanComponent: ({ data, enabled, uischema, handleChange, path, label, required, errors, schema, }: ControlProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const BooleanControl: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const GoABooleanControlTester: RankedTester;
6
6
  export declare const GoABooleanControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
@@ -1,4 +1,5 @@
1
1
  import { ControlProps, JsonSchema } from '@jsonforms/core';
2
+ import { JsonFormsStateContext } from '@jsonforms/react';
2
3
  /**
3
4
  * Sets the first word to be capitalized so that it is sentence cased.
4
5
  * @param words
@@ -22,13 +23,7 @@ export declare const getLabelText: (scope: string, label: string) => string;
22
23
  export declare const isEmptyBoolean: (schema: JsonSchema, data: unknown) => boolean;
23
24
  export declare const isEmptyNumber: (schema: JsonSchema, data: unknown) => boolean;
24
25
  export declare const validateSinWithLuhn: (input: number) => boolean;
25
- /**
26
- * Check if a required, defined input value is valid. Returns an appropriate
27
- * error message if not.
28
- * @param props
29
- * @returns error message
30
- */
31
- export declare const checkFieldValidity: (props: ControlProps) => string;
26
+ export declare const checkFieldValidity: (props: ControlProps, ctx: JsonFormsStateContext) => string;
32
27
  /**
33
28
  * Check if the date is a valid date/time
34
29
  */