@abgov/jsonforms-components 1.43.7 → 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,26 +1628,6 @@ $$l({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }
1628
1628
  assign: assign
1629
1629
  });
1630
1630
 
1631
- var $$k = _export;
1632
- var toObject$3 = toObject$7;
1633
- var lengthOfArrayLike$3 = lengthOfArrayLike$5;
1634
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$6;
1635
- var addToUnscopables$1 = addToUnscopables$3;
1636
-
1637
- // `Array.prototype.at` method
1638
- // https://tc39.es/ecma262/#sec-array.prototype.at
1639
- $$k({ target: 'Array', proto: true }, {
1640
- at: function at(index) {
1641
- var O = toObject$3(this);
1642
- var len = lengthOfArrayLike$3(O);
1643
- var relativeIndex = toIntegerOrInfinity$3(index);
1644
- var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
1645
- return (k < 0 || k >= len) ? undefined : O[k];
1646
- }
1647
- });
1648
-
1649
- addToUnscopables$1('at');
1650
-
1651
1631
  var wellKnownSymbol$c = wellKnownSymbol$j;
1652
1632
 
1653
1633
  var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
@@ -1696,6 +1676,92 @@ var toString$e = function (argument) {
1696
1676
  return $String$1(argument);
1697
1677
  };
1698
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
+
1699
1765
  var anObject$a = anObject$f;
1700
1766
 
1701
1767
  // `RegExp.prototype.flags` getter implementation
@@ -1715,10 +1781,10 @@ var regexpFlags$1 = function () {
1715
1781
  };
1716
1782
 
1717
1783
  var fails$f = fails$r;
1718
- var global$d = global$o;
1784
+ var global$c = global$o;
1719
1785
 
1720
1786
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1721
- var $RegExp$2 = global$d.RegExp;
1787
+ var $RegExp$2 = global$c.RegExp;
1722
1788
 
1723
1789
  var UNSUPPORTED_Y$2 = fails$f(function () {
1724
1790
  var re = $RegExp$2('a', 'y');
@@ -1746,10 +1812,10 @@ var regexpStickyHelpers = {
1746
1812
  };
1747
1813
 
1748
1814
  var fails$e = fails$r;
1749
- var global$c = global$o;
1815
+ var global$b = global$o;
1750
1816
 
1751
1817
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1752
- var $RegExp$1 = global$c.RegExp;
1818
+ var $RegExp$1 = global$b.RegExp;
1753
1819
 
1754
1820
  var regexpUnsupportedDotAll = fails$e(function () {
1755
1821
  var re = $RegExp$1('.', 's');
@@ -1757,10 +1823,10 @@ var regexpUnsupportedDotAll = fails$e(function () {
1757
1823
  });
1758
1824
 
1759
1825
  var fails$d = fails$r;
1760
- var global$b = global$o;
1826
+ var global$a = global$o;
1761
1827
 
1762
1828
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1763
- var $RegExp = global$b.RegExp;
1829
+ var $RegExp = global$a.RegExp;
1764
1830
 
1765
1831
  var regexpUnsupportedNcg = fails$d(function () {
1766
1832
  var re = $RegExp('(?<a>b)', 'g');
@@ -1771,8 +1837,8 @@ var regexpUnsupportedNcg = fails$d(function () {
1771
1837
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1772
1838
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1773
1839
  var call$e = functionCall;
1774
- var uncurryThis$h = functionUncurryThis;
1775
- var toString$d = toString$e;
1840
+ var uncurryThis$g = functionUncurryThis;
1841
+ var toString$c = toString$e;
1776
1842
  var regexpFlags = regexpFlags$1;
1777
1843
  var stickyHelpers$1 = regexpStickyHelpers;
1778
1844
  var shared = shared$4;
@@ -1784,10 +1850,10 @@ var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
1784
1850
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1785
1851
  var nativeExec = RegExp.prototype.exec;
1786
1852
  var patchedExec = nativeExec;
1787
- var charAt$6 = uncurryThis$h(''.charAt);
1788
- var indexOf = uncurryThis$h(''.indexOf);
1789
- var replace$6 = uncurryThis$h(''.replace);
1790
- 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);
1791
1857
 
1792
1858
  var UPDATES_LAST_INDEX_WRONG = (function () {
1793
1859
  var re1 = /a/;
@@ -1808,7 +1874,7 @@ if (PATCH) {
1808
1874
  patchedExec = function exec(string) {
1809
1875
  var re = this;
1810
1876
  var state = getInternalState$1(re);
1811
- var str = toString$d(string);
1877
+ var str = toString$c(string);
1812
1878
  var raw = state.raw;
1813
1879
  var result, reCopy, lastIndex, match, i, object, group;
1814
1880
 
@@ -1827,12 +1893,12 @@ if (PATCH) {
1827
1893
  var strCopy = str;
1828
1894
 
1829
1895
  if (sticky) {
1830
- flags = replace$6(flags, 'y', '');
1896
+ flags = replace$5(flags, 'y', '');
1831
1897
  if (indexOf(flags, 'g') === -1) {
1832
1898
  flags += 'g';
1833
1899
  }
1834
1900
 
1835
- strCopy = stringSlice$6(str, re.lastIndex);
1901
+ strCopy = stringSlice$5(str, re.lastIndex);
1836
1902
  // Support anchored sticky behavior.
1837
1903
  if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$6(str, re.lastIndex - 1) !== '\n')) {
1838
1904
  source = '(?: ' + source + ')';
@@ -1853,8 +1919,8 @@ if (PATCH) {
1853
1919
 
1854
1920
  if (sticky) {
1855
1921
  if (match) {
1856
- match.input = stringSlice$6(match.input, charsAdded);
1857
- match[0] = stringSlice$6(match[0], charsAdded);
1922
+ match.input = stringSlice$5(match.input, charsAdded);
1923
+ match[0] = stringSlice$5(match[0], charsAdded);
1858
1924
  match.index = re.lastIndex;
1859
1925
  re.lastIndex += match[0].length;
1860
1926
  } else re.lastIndex = 0;
@@ -1885,22 +1951,22 @@ if (PATCH) {
1885
1951
 
1886
1952
  var regexpExec$2 = patchedExec;
1887
1953
 
1888
- var $$j = _export;
1954
+ var $$i = _export;
1889
1955
  var exec$3 = regexpExec$2;
1890
1956
 
1891
1957
  // `RegExp.prototype.exec` method
1892
1958
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1893
- $$j({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
1959
+ $$i({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
1894
1960
  exec: exec$3
1895
1961
  });
1896
1962
 
1897
1963
  // TODO: Remove from `core-js@4` since it's moved to entry points
1898
1964
 
1899
- var $$i = _export;
1965
+ var $$h = _export;
1900
1966
  var call$d = functionCall;
1901
- var isCallable$b = isCallable$q;
1967
+ var isCallable$a = isCallable$q;
1902
1968
  var anObject$9 = anObject$f;
1903
- var toString$c = toString$e;
1969
+ var toString$b = toString$e;
1904
1970
 
1905
1971
  var DELEGATES_TO_EXEC = function () {
1906
1972
  var execCalled = false;
@@ -1916,12 +1982,12 @@ var nativeTest = /./.test;
1916
1982
 
1917
1983
  // `RegExp.prototype.test` method
1918
1984
  // https://tc39.es/ecma262/#sec-regexp.prototype.test
1919
- $$i({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1985
+ $$h({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1920
1986
  test: function (S) {
1921
1987
  var R = anObject$9(this);
1922
- var string = toString$c(S);
1988
+ var string = toString$b(S);
1923
1989
  var exec = R.exec;
1924
- if (!isCallable$b(exec)) return call$d(nativeTest, R, string);
1990
+ if (!isCallable$a(exec)) return call$d(nativeTest, R, string);
1925
1991
  var result = call$d(exec, R, string);
1926
1992
  if (result === null) return false;
1927
1993
  anObject$9(result);
@@ -1930,15 +1996,15 @@ $$i({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1930
1996
  });
1931
1997
 
1932
1998
  var call$c = functionCall;
1933
- var hasOwn$4 = hasOwnProperty_1;
1934
- var isPrototypeOf$5 = objectIsPrototypeOf;
1999
+ var hasOwn$3 = hasOwnProperty_1;
2000
+ var isPrototypeOf$4 = objectIsPrototypeOf;
1935
2001
  var regExpFlags = regexpFlags$1;
1936
2002
 
1937
2003
  var RegExpPrototype$4 = RegExp.prototype;
1938
2004
 
1939
2005
  var regexpGetFlags = function (R) {
1940
2006
  var flags = R.flags;
1941
- 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)
1942
2008
  ? call$c(regExpFlags, R) : flags;
1943
2009
  };
1944
2010
 
@@ -1968,14 +2034,14 @@ if (NOT_GENERIC || INCORRECT_NAME) {
1968
2034
  }, { unsafe: true });
1969
2035
  }
1970
2036
 
1971
- var $$h = _export;
1972
- var uncurryThis$g = functionUncurryThis;
2037
+ var $$g = _export;
2038
+ var uncurryThis$f = functionUncurryThis;
1973
2039
  var requireObjectCoercible$7 = requireObjectCoercible$b;
1974
2040
  var toIntegerOrInfinity$2 = toIntegerOrInfinity$6;
1975
- var toString$b = toString$e;
2041
+ var toString$a = toString$e;
1976
2042
  var fails$b = fails$r;
1977
2043
 
1978
- var charAt$5 = uncurryThis$g(''.charAt);
2044
+ var charAt$5 = uncurryThis$f(''.charAt);
1979
2045
 
1980
2046
  var FORCED$3 = fails$b(function () {
1981
2047
  // eslint-disable-next-line es/no-array-string-prototype-at -- safe
@@ -1984,9 +2050,9 @@ var FORCED$3 = fails$b(function () {
1984
2050
 
1985
2051
  // `String.prototype.at` method
1986
2052
  // https://tc39.es/ecma262/#sec-string.prototype.at
1987
- $$h({ target: 'String', proto: true, forced: FORCED$3 }, {
2053
+ $$g({ target: 'String', proto: true, forced: FORCED$3 }, {
1988
2054
  at: function at(index) {
1989
- var S = toString$b(requireObjectCoercible$7(this));
2055
+ var S = toString$a(requireObjectCoercible$7(this));
1990
2056
  var len = S.length;
1991
2057
  var relativeIndex = toIntegerOrInfinity$2(index);
1992
2058
  var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
@@ -2081,18 +2147,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2081
2147
  if (SHAM) createNonEnumerableProperty$4(RegExpPrototype$2[SYMBOL], 'sham', true);
2082
2148
  };
2083
2149
 
2084
- var uncurryThis$f = functionUncurryThis;
2150
+ var uncurryThis$e = functionUncurryThis;
2085
2151
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$6;
2086
- var toString$a = toString$e;
2152
+ var toString$9 = toString$e;
2087
2153
  var requireObjectCoercible$6 = requireObjectCoercible$b;
2088
2154
 
2089
- var charAt$4 = uncurryThis$f(''.charAt);
2090
- var charCodeAt$1 = uncurryThis$f(''.charCodeAt);
2091
- 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);
2092
2158
 
2093
2159
  var createMethod$2 = function (CONVERT_TO_STRING) {
2094
2160
  return function ($this, pos) {
2095
- var S = toString$a(requireObjectCoercible$6($this));
2161
+ var S = toString$9(requireObjectCoercible$6($this));
2096
2162
  var position = toIntegerOrInfinity$1(pos);
2097
2163
  var size = S.length;
2098
2164
  var first, second;
@@ -2104,7 +2170,7 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
2104
2170
  ? charAt$4(S, position)
2105
2171
  : first
2106
2172
  : CONVERT_TO_STRING
2107
- ? stringSlice$5(S, position, position + 2)
2173
+ ? stringSlice$4(S, position, position + 2)
2108
2174
  : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2109
2175
  };
2110
2176
  };
@@ -2126,13 +2192,13 @@ var advanceStringIndex$2 = function (S, index, unicode) {
2126
2192
  return index + (unicode ? charAt$3(S, index).length : 1);
2127
2193
  };
2128
2194
 
2129
- var uncurryThis$e = functionUncurryThis;
2195
+ var uncurryThis$d = functionUncurryThis;
2130
2196
  var toObject$2 = toObject$7;
2131
2197
 
2132
2198
  var floor = Math.floor;
2133
- var charAt$2 = uncurryThis$e(''.charAt);
2134
- var replace$5 = uncurryThis$e(''.replace);
2135
- 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);
2136
2202
  // eslint-disable-next-line redos/no-vulnerable -- safe
2137
2203
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2138
2204
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
@@ -2147,15 +2213,15 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2147
2213
  namedCaptures = toObject$2(namedCaptures);
2148
2214
  symbols = SUBSTITUTION_SYMBOLS;
2149
2215
  }
2150
- return replace$5(replacement, symbols, function (match, ch) {
2216
+ return replace$4(replacement, symbols, function (match, ch) {
2151
2217
  var capture;
2152
2218
  switch (charAt$2(ch, 0)) {
2153
2219
  case '$': return '$';
2154
2220
  case '&': return matched;
2155
- case '`': return stringSlice$4(str, 0, position);
2156
- case "'": return stringSlice$4(str, tailPos);
2221
+ case '`': return stringSlice$3(str, 0, position);
2222
+ case "'": return stringSlice$3(str, tailPos);
2157
2223
  case '<':
2158
- capture = namedCaptures[stringSlice$4(ch, 1, -1)];
2224
+ capture = namedCaptures[stringSlice$3(ch, 1, -1)];
2159
2225
  break;
2160
2226
  default: // \d\d?
2161
2227
  var n = +ch;
@@ -2174,7 +2240,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2174
2240
 
2175
2241
  var call$9 = functionCall;
2176
2242
  var anObject$7 = anObject$f;
2177
- var isCallable$a = isCallable$q;
2243
+ var isCallable$9 = isCallable$q;
2178
2244
  var classof$7 = classofRaw$2;
2179
2245
  var regexpExec = regexpExec$2;
2180
2246
 
@@ -2184,7 +2250,7 @@ var $TypeError$b = TypeError;
2184
2250
  // https://tc39.es/ecma262/#sec-regexpexec
2185
2251
  var regexpExecAbstract = function (R, S) {
2186
2252
  var exec = R.exec;
2187
- if (isCallable$a(exec)) {
2253
+ if (isCallable$9(exec)) {
2188
2254
  var result = call$9(exec, R, S);
2189
2255
  if (result !== null) anObject$7(result);
2190
2256
  return result;
@@ -2195,15 +2261,15 @@ var regexpExecAbstract = function (R, S) {
2195
2261
 
2196
2262
  var apply$3 = functionApply;
2197
2263
  var call$8 = functionCall;
2198
- var uncurryThis$d = functionUncurryThis;
2264
+ var uncurryThis$c = functionUncurryThis;
2199
2265
  var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
2200
2266
  var fails$9 = fails$r;
2201
2267
  var anObject$6 = anObject$f;
2202
- var isCallable$9 = isCallable$q;
2268
+ var isCallable$8 = isCallable$q;
2203
2269
  var isNullOrUndefined$3 = isNullOrUndefined$6;
2204
2270
  var toIntegerOrInfinity = toIntegerOrInfinity$6;
2205
2271
  var toLength$3 = toLength$5;
2206
- var toString$9 = toString$e;
2272
+ var toString$8 = toString$e;
2207
2273
  var requireObjectCoercible$5 = requireObjectCoercible$b;
2208
2274
  var advanceStringIndex$1 = advanceStringIndex$2;
2209
2275
  var getMethod$3 = getMethod$5;
@@ -2214,10 +2280,10 @@ var wellKnownSymbol$9 = wellKnownSymbol$j;
2214
2280
  var REPLACE = wellKnownSymbol$9('replace');
2215
2281
  var max = Math.max;
2216
2282
  var min$2 = Math.min;
2217
- var concat = uncurryThis$d([].concat);
2218
- var push$1 = uncurryThis$d([].push);
2219
- var stringIndexOf$2 = uncurryThis$d(''.indexOf);
2220
- 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);
2221
2287
 
2222
2288
  var maybeToString = function (it) {
2223
2289
  return it === undefined ? it : String(it);
@@ -2261,13 +2327,13 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2261
2327
  var replacer = isNullOrUndefined$3(searchValue) ? undefined : getMethod$3(searchValue, REPLACE);
2262
2328
  return replacer
2263
2329
  ? call$8(replacer, searchValue, O, replaceValue)
2264
- : call$8(nativeReplace, toString$9(O), searchValue, replaceValue);
2330
+ : call$8(nativeReplace, toString$8(O), searchValue, replaceValue);
2265
2331
  },
2266
2332
  // `RegExp.prototype[@@replace]` method
2267
2333
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2268
2334
  function (string, replaceValue) {
2269
2335
  var rx = anObject$6(this);
2270
- var S = toString$9(string);
2336
+ var S = toString$8(string);
2271
2337
 
2272
2338
  if (
2273
2339
  typeof replaceValue == 'string' &&
@@ -2278,8 +2344,8 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2278
2344
  if (res.done) return res.value;
2279
2345
  }
2280
2346
 
2281
- var functionalReplace = isCallable$9(replaceValue);
2282
- if (!functionalReplace) replaceValue = toString$9(replaceValue);
2347
+ var functionalReplace = isCallable$8(replaceValue);
2348
+ if (!functionalReplace) replaceValue = toString$8(replaceValue);
2283
2349
 
2284
2350
  var global = rx.global;
2285
2351
  var fullUnicode;
@@ -2297,7 +2363,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2297
2363
  push$1(results, result);
2298
2364
  if (!global) break;
2299
2365
 
2300
- var matchStr = toString$9(result[0]);
2366
+ var matchStr = toString$8(result[0]);
2301
2367
  if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$3(rx.lastIndex), fullUnicode);
2302
2368
  }
2303
2369
 
@@ -2306,7 +2372,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2306
2372
  for (var i = 0; i < results.length; i++) {
2307
2373
  result = results[i];
2308
2374
 
2309
- var matched = toString$9(result[0]);
2375
+ var matched = toString$8(result[0]);
2310
2376
  var position = max(min$2(toIntegerOrInfinity(result.index), S.length), 0);
2311
2377
  var captures = [];
2312
2378
  var replacement;
@@ -2320,17 +2386,17 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2320
2386
  if (functionalReplace) {
2321
2387
  var replacerArgs = concat([matched], captures, position, S);
2322
2388
  if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
2323
- replacement = toString$9(apply$3(replaceValue, undefined, replacerArgs));
2389
+ replacement = toString$8(apply$3(replaceValue, undefined, replacerArgs));
2324
2390
  } else {
2325
2391
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2326
2392
  }
2327
2393
  if (position >= nextSourcePosition) {
2328
- accumulatedResult += stringSlice$3(S, nextSourcePosition, position) + replacement;
2394
+ accumulatedResult += stringSlice$2(S, nextSourcePosition, position) + replacement;
2329
2395
  nextSourcePosition = position + matched.length;
2330
2396
  }
2331
2397
  }
2332
2398
 
2333
- return accumulatedResult + stringSlice$3(S, nextSourcePosition);
2399
+ return accumulatedResult + stringSlice$2(S, nextSourcePosition);
2334
2400
  }
2335
2401
  ];
2336
2402
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
@@ -2402,20 +2468,18 @@ const validateSinWithLuhn = input => {
2402
2468
  }
2403
2469
  return sum % 10 === 0;
2404
2470
  };
2405
- /**
2406
- * Check if a required, defined input value is valid. Returns an appropriate
2407
- * error message if not.
2408
- * @param props
2409
- * @returns error message
2410
- */
2411
- const checkFieldValidity = props => {
2471
+ const checkFieldValidity = (props, ctx) => {
2472
+ var _a, _b, _c, _d, _e;
2412
2473
  const {
2413
2474
  data,
2414
2475
  errors: ajvErrors,
2415
2476
  required,
2416
2477
  label,
2417
2478
  uischema,
2418
- schema
2479
+ schema,
2480
+ path,
2481
+ id,
2482
+ description
2419
2483
  } = props;
2420
2484
  const labelToUpdate = getLabelText(uischema.scope, label);
2421
2485
  const extraSchema = schema;
@@ -2427,7 +2491,32 @@ const checkFieldValidity = props => {
2427
2491
  }
2428
2492
  }
2429
2493
  if (required) {
2430
- 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
+ }
2431
2520
  if (schema) {
2432
2521
  if (isEmptyBoolean(schema, data)) {
2433
2522
  return `${labelToUpdate} is required`;
@@ -2816,7 +2905,7 @@ var isArray$2 = Array.isArray || function isArray(argument) {
2816
2905
  return classof$6(argument) === 'Array';
2817
2906
  };
2818
2907
 
2819
- var DESCRIPTORS$7 = descriptors;
2908
+ var DESCRIPTORS$6 = descriptors;
2820
2909
  var isArray$1 = isArray$2;
2821
2910
 
2822
2911
  var $TypeError$a = TypeError;
@@ -2824,7 +2913,7 @@ var $TypeError$a = TypeError;
2824
2913
  var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
2825
2914
 
2826
2915
  // Safari < 13 does not throw an error in this case
2827
- var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$7 && !function () {
2916
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$6 && !function () {
2828
2917
  // makes no sense without proper strict mode support
2829
2918
  if (this !== undefined) return true;
2830
2919
  try {
@@ -2851,7 +2940,7 @@ var doesNotExceedSafeInteger$1 = function (it) {
2851
2940
  return it;
2852
2941
  };
2853
2942
 
2854
- var $$g = _export;
2943
+ var $$f = _export;
2855
2944
  var toObject$1 = toObject$7;
2856
2945
  var lengthOfArrayLike$2 = lengthOfArrayLike$5;
2857
2946
  var setArrayLength = arraySetLength;
@@ -2877,7 +2966,7 @@ var FORCED$2 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2877
2966
 
2878
2967
  // `Array.prototype.push` method
2879
2968
  // https://tc39.es/ecma262/#sec-array.prototype.push
2880
- $$g({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
2969
+ $$f({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
2881
2970
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2882
2971
  push: function push(item) {
2883
2972
  var O = toObject$1(this);
@@ -2928,7 +3017,7 @@ function registerReducer(state, action) {
2928
3017
  return state;
2929
3018
  }
2930
3019
 
2931
- var $$f = _export;
3020
+ var $$e = _export;
2932
3021
  var $includes = arrayIncludes.includes;
2933
3022
  var fails$7 = fails$r;
2934
3023
  var addToUnscopables = addToUnscopables$3;
@@ -2941,7 +3030,7 @@ var BROKEN_ON_SPARSE = fails$7(function () {
2941
3030
 
2942
3031
  // `Array.prototype.includes` method
2943
3032
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2944
- $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
3033
+ $$e({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2945
3034
  includes: function includes(el /* , fromIndex = 0 */) {
2946
3035
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2947
3036
  }
@@ -2950,27 +3039,27 @@ $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2950
3039
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2951
3040
  addToUnscopables('includes');
2952
3041
 
2953
- var uncurryThis$c = functionUncurryThis;
3042
+ var uncurryThis$b = functionUncurryThis;
2954
3043
 
2955
- var arraySlice$2 = uncurryThis$c([].slice);
3044
+ var arraySlice$2 = uncurryThis$b([].slice);
2956
3045
 
2957
- var uncurryThis$b = functionUncurryThis;
3046
+ var uncurryThis$a = functionUncurryThis;
2958
3047
  var isArray = isArray$2;
2959
- var isCallable$8 = isCallable$q;
3048
+ var isCallable$7 = isCallable$q;
2960
3049
  var classof$5 = classofRaw$2;
2961
- var toString$8 = toString$e;
3050
+ var toString$7 = toString$e;
2962
3051
 
2963
- var push = uncurryThis$b([].push);
3052
+ var push = uncurryThis$a([].push);
2964
3053
 
2965
3054
  var getJsonReplacerFunction = function (replacer) {
2966
- if (isCallable$8(replacer)) return replacer;
3055
+ if (isCallable$7(replacer)) return replacer;
2967
3056
  if (!isArray(replacer)) return;
2968
3057
  var rawLength = replacer.length;
2969
3058
  var keys = [];
2970
3059
  for (var i = 0; i < rawLength; i++) {
2971
3060
  var element = replacer[i];
2972
3061
  if (typeof element == 'string') push(keys, element);
2973
- 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));
2974
3063
  }
2975
3064
  var keysLength = keys.length;
2976
3065
  var root = true;
@@ -2984,31 +3073,31 @@ var getJsonReplacerFunction = function (replacer) {
2984
3073
  };
2985
3074
  };
2986
3075
 
2987
- var $$e = _export;
3076
+ var $$d = _export;
2988
3077
  var getBuiltIn$5 = getBuiltIn$9;
2989
3078
  var apply$2 = functionApply;
2990
3079
  var call$7 = functionCall;
2991
- var uncurryThis$a = functionUncurryThis;
3080
+ var uncurryThis$9 = functionUncurryThis;
2992
3081
  var fails$6 = fails$r;
2993
- var isCallable$7 = isCallable$q;
3082
+ var isCallable$6 = isCallable$q;
2994
3083
  var isSymbol = isSymbol$3;
2995
3084
  var arraySlice$1 = arraySlice$2;
2996
3085
  var getReplacerFunction = getJsonReplacerFunction;
2997
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
3086
+ var NATIVE_SYMBOL = symbolConstructorDetection;
2998
3087
 
2999
3088
  var $String = String;
3000
3089
  var $stringify = getBuiltIn$5('JSON', 'stringify');
3001
- var exec$2 = uncurryThis$a(/./.exec);
3002
- var charAt$1 = uncurryThis$a(''.charAt);
3003
- var charCodeAt = uncurryThis$a(''.charCodeAt);
3004
- var replace$4 = uncurryThis$a(''.replace);
3005
- 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);
3006
3095
 
3007
3096
  var tester = /[\uD800-\uDFFF]/g;
3008
3097
  var low = /^[\uD800-\uDBFF]$/;
3009
3098
  var hi = /^[\uDC00-\uDFFF]$/;
3010
3099
 
3011
- var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL$1 || fails$6(function () {
3100
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$6(function () {
3012
3101
  var symbol = getBuiltIn$5('Symbol')('stringify detection');
3013
3102
  // MS Edge converts symbol values to JSON as {}
3014
3103
  return $stringify([symbol]) !== '[null]'
@@ -3027,10 +3116,10 @@ var ILL_FORMED_UNICODE = fails$6(function () {
3027
3116
  var stringifyWithSymbolsFix = function (it, replacer) {
3028
3117
  var args = arraySlice$1(arguments);
3029
3118
  var $replacer = getReplacerFunction(replacer);
3030
- 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
3031
3120
  args[1] = function (key, value) {
3032
3121
  // some old implementations (like WebKit) could pass numbers as keys
3033
- 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);
3034
3123
  if (!isSymbol(value)) return value;
3035
3124
  };
3036
3125
  return apply$2($stringify, null, args);
@@ -3047,12 +3136,12 @@ var fixIllFormed = function (match, offset, string) {
3047
3136
  if ($stringify) {
3048
3137
  // `JSON.stringify` method
3049
3138
  // https://tc39.es/ecma262/#sec-json.stringify
3050
- $$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 }, {
3051
3140
  // eslint-disable-next-line no-unused-vars -- required for `.length`
3052
3141
  stringify: function stringify(it, replacer, space) {
3053
3142
  var args = arraySlice$1(arguments);
3054
3143
  var result = apply$2(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
3055
- 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;
3056
3145
  }
3057
3146
  });
3058
3147
  }
@@ -3096,22 +3185,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
3096
3185
  } return false;
3097
3186
  };
3098
3187
 
3099
- var $$d = _export;
3100
- var uncurryThis$9 = functionUncurryThis;
3188
+ var $$c = _export;
3189
+ var uncurryThis$8 = functionUncurryThis;
3101
3190
  var notARegExp$2 = notARegexp;
3102
3191
  var requireObjectCoercible$4 = requireObjectCoercible$b;
3103
- var toString$7 = toString$e;
3192
+ var toString$6 = toString$e;
3104
3193
  var correctIsRegExpLogic$2 = correctIsRegexpLogic;
3105
3194
 
3106
- var stringIndexOf$1 = uncurryThis$9(''.indexOf);
3195
+ var stringIndexOf$1 = uncurryThis$8(''.indexOf);
3107
3196
 
3108
3197
  // `String.prototype.includes` method
3109
3198
  // https://tc39.es/ecma262/#sec-string.prototype.includes
3110
- $$d({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
3199
+ $$c({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
3111
3200
  includes: function includes(searchString /* , position = 0 */) {
3112
3201
  return !!~stringIndexOf$1(
3113
- toString$7(requireObjectCoercible$4(this)),
3114
- toString$7(notARegExp$2(searchString)),
3202
+ toString$6(requireObjectCoercible$4(this)),
3203
+ toString$6(notARegExp$2(searchString)),
3115
3204
  arguments.length > 1 ? arguments[1] : undefined
3116
3205
  );
3117
3206
  }
@@ -3159,7 +3248,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
3159
3248
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3160
3249
  };
3161
3250
 
3162
- var isCallable$6 = isCallable$q;
3251
+ var isCallable$5 = isCallable$q;
3163
3252
  var isObject$3 = isObject$d;
3164
3253
  var setPrototypeOf$2 = objectSetPrototypeOf;
3165
3254
 
@@ -3170,7 +3259,7 @@ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
3170
3259
  // it can work only with native `setPrototypeOf`
3171
3260
  setPrototypeOf$2 &&
3172
3261
  // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3173
- isCallable$6(NewTarget = dummy.constructor) &&
3262
+ isCallable$5(NewTarget = dummy.constructor) &&
3174
3263
  NewTarget !== Wrapper &&
3175
3264
  isObject$3(NewTargetPrototype = NewTarget.prototype) &&
3176
3265
  NewTargetPrototype !== Wrapper.prototype
@@ -3178,60 +3267,51 @@ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
3178
3267
  return $this;
3179
3268
  };
3180
3269
 
3181
- var defineProperty$1 = objectDefineProperty.f;
3270
+ var defineProperty = objectDefineProperty.f;
3182
3271
 
3183
3272
  var proxyAccessor$2 = function (Target, Source, key) {
3184
- key in Target || defineProperty$1(Target, key, {
3273
+ key in Target || defineProperty(Target, key, {
3185
3274
  configurable: true,
3186
3275
  get: function () { return Source[key]; },
3187
3276
  set: function (it) { Source[key] = it; }
3188
3277
  });
3189
3278
  };
3190
3279
 
3191
- var makeBuiltIn = makeBuiltIn$3.exports;
3192
- var defineProperty = objectDefineProperty;
3193
-
3194
- var defineBuiltInAccessor$3 = function (target, name, descriptor) {
3195
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
3196
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
3197
- return defineProperty.f(target, name, descriptor);
3198
- };
3199
-
3200
3280
  var getBuiltIn$4 = getBuiltIn$9;
3201
- var defineBuiltInAccessor$2 = defineBuiltInAccessor$3;
3281
+ var defineBuiltInAccessor$1 = defineBuiltInAccessor$3;
3202
3282
  var wellKnownSymbol$6 = wellKnownSymbol$j;
3203
- var DESCRIPTORS$6 = descriptors;
3283
+ var DESCRIPTORS$5 = descriptors;
3204
3284
 
3205
3285
  var SPECIES$2 = wellKnownSymbol$6('species');
3206
3286
 
3207
3287
  var setSpecies$2 = function (CONSTRUCTOR_NAME) {
3208
3288
  var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
3209
3289
 
3210
- if (DESCRIPTORS$6 && Constructor && !Constructor[SPECIES$2]) {
3211
- defineBuiltInAccessor$2(Constructor, SPECIES$2, {
3290
+ if (DESCRIPTORS$5 && Constructor && !Constructor[SPECIES$2]) {
3291
+ defineBuiltInAccessor$1(Constructor, SPECIES$2, {
3212
3292
  configurable: true,
3213
3293
  get: function () { return this; }
3214
3294
  });
3215
3295
  }
3216
3296
  };
3217
3297
 
3218
- var DESCRIPTORS$5 = descriptors;
3219
- var global$a = global$o;
3220
- var uncurryThis$8 = functionUncurryThis;
3298
+ var DESCRIPTORS$4 = descriptors;
3299
+ var global$9 = global$o;
3300
+ var uncurryThis$7 = functionUncurryThis;
3221
3301
  var isForced$1 = isForced_1;
3222
3302
  var inheritIfRequired$1 = inheritIfRequired$2;
3223
3303
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$9;
3224
3304
  var create = objectCreate;
3225
3305
  var getOwnPropertyNames = objectGetOwnPropertyNames.f;
3226
- var isPrototypeOf$4 = objectIsPrototypeOf;
3306
+ var isPrototypeOf$3 = objectIsPrototypeOf;
3227
3307
  var isRegExp = isRegexp;
3228
- var toString$6 = toString$e;
3308
+ var toString$5 = toString$e;
3229
3309
  var getRegExpFlags = regexpGetFlags;
3230
3310
  var stickyHelpers = regexpStickyHelpers;
3231
3311
  var proxyAccessor$1 = proxyAccessor$2;
3232
3312
  var defineBuiltIn$2 = defineBuiltIn$8;
3233
3313
  var fails$5 = fails$r;
3234
- var hasOwn$3 = hasOwnProperty_1;
3314
+ var hasOwn$2 = hasOwnProperty_1;
3235
3315
  var enforceInternalState = internalState.enforce;
3236
3316
  var setSpecies$1 = setSpecies$2;
3237
3317
  var wellKnownSymbol$5 = wellKnownSymbol$j;
@@ -3239,14 +3319,14 @@ var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
3239
3319
  var UNSUPPORTED_NCG = regexpUnsupportedNcg;
3240
3320
 
3241
3321
  var MATCH = wellKnownSymbol$5('match');
3242
- var NativeRegExp = global$a.RegExp;
3322
+ var NativeRegExp = global$9.RegExp;
3243
3323
  var RegExpPrototype$1 = NativeRegExp.prototype;
3244
- var SyntaxError = global$a.SyntaxError;
3245
- var exec$1 = uncurryThis$8(RegExpPrototype$1.exec);
3246
- var charAt = uncurryThis$8(''.charAt);
3247
- var replace$3 = uncurryThis$8(''.replace);
3248
- var stringIndexOf = uncurryThis$8(''.indexOf);
3249
- 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);
3250
3330
  // TODO: Use only proper RegExpIdentifierName
3251
3331
  var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
3252
3332
  var re1 = /a/g;
@@ -3258,7 +3338,7 @@ var CORRECT_NEW = new NativeRegExp(re1) !== re1;
3258
3338
  var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
3259
3339
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
3260
3340
 
3261
- var BASE_FORCED = DESCRIPTORS$5 &&
3341
+ var BASE_FORCED = DESCRIPTORS$4 &&
3262
3342
  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG || fails$5(function () {
3263
3343
  re2[MATCH] = false;
3264
3344
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
@@ -3311,7 +3391,7 @@ var handleNCG = function (string) {
3311
3391
  brackets = true;
3312
3392
  break;
3313
3393
  case chr === '(':
3314
- if (exec$1(IS_NCG, stringSlice$2(string, index + 1))) {
3394
+ if (exec$1(IS_NCG, stringSlice$1(string, index + 1))) {
3315
3395
  index += 2;
3316
3396
  ncg = true;
3317
3397
  }
@@ -3319,7 +3399,7 @@ var handleNCG = function (string) {
3319
3399
  groupid++;
3320
3400
  continue;
3321
3401
  case chr === '>' && ncg:
3322
- if (groupname === '' || hasOwn$3(names, groupname)) {
3402
+ if (groupname === '' || hasOwn$2(names, groupname)) {
3323
3403
  throw new SyntaxError('Invalid capture group name');
3324
3404
  }
3325
3405
  names[groupname] = true;
@@ -3337,7 +3417,7 @@ var handleNCG = function (string) {
3337
3417
  // https://tc39.es/ecma262/#sec-regexp-constructor
3338
3418
  if (isForced$1('RegExp', BASE_FORCED)) {
3339
3419
  var RegExpWrapper = function RegExp(pattern, flags) {
3340
- var thisIsRegExp = isPrototypeOf$4(RegExpPrototype$1, this);
3420
+ var thisIsRegExp = isPrototypeOf$3(RegExpPrototype$1, this);
3341
3421
  var patternIsRegExp = isRegExp(pattern);
3342
3422
  var flagsAreUndefined = flags === undefined;
3343
3423
  var groups = [];
@@ -3348,25 +3428,25 @@ if (isForced$1('RegExp', BASE_FORCED)) {
3348
3428
  return pattern;
3349
3429
  }
3350
3430
 
3351
- if (patternIsRegExp || isPrototypeOf$4(RegExpPrototype$1, pattern)) {
3431
+ if (patternIsRegExp || isPrototypeOf$3(RegExpPrototype$1, pattern)) {
3352
3432
  pattern = pattern.source;
3353
3433
  if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);
3354
3434
  }
3355
3435
 
3356
- pattern = pattern === undefined ? '' : toString$6(pattern);
3357
- flags = flags === undefined ? '' : toString$6(flags);
3436
+ pattern = pattern === undefined ? '' : toString$5(pattern);
3437
+ flags = flags === undefined ? '' : toString$5(flags);
3358
3438
  rawPattern = pattern;
3359
3439
 
3360
3440
  if (UNSUPPORTED_DOT_ALL$1 && 'dotAll' in re1) {
3361
3441
  dotAll = !!flags && stringIndexOf(flags, 's') > -1;
3362
- if (dotAll) flags = replace$3(flags, /s/g, '');
3442
+ if (dotAll) flags = replace$2(flags, /s/g, '');
3363
3443
  }
3364
3444
 
3365
3445
  rawFlags = flags;
3366
3446
 
3367
3447
  if (MISSED_STICKY && 'sticky' in re1) {
3368
3448
  sticky = !!flags && stringIndexOf(flags, 'y') > -1;
3369
- if (sticky && UNSUPPORTED_Y) flags = replace$3(flags, /y/g, '');
3449
+ if (sticky && UNSUPPORTED_Y) flags = replace$2(flags, /y/g, '');
3370
3450
  }
3371
3451
 
3372
3452
  if (UNSUPPORTED_NCG) {
@@ -3401,16 +3481,16 @@ if (isForced$1('RegExp', BASE_FORCED)) {
3401
3481
 
3402
3482
  RegExpPrototype$1.constructor = RegExpWrapper;
3403
3483
  RegExpWrapper.prototype = RegExpPrototype$1;
3404
- defineBuiltIn$2(global$a, 'RegExp', RegExpWrapper, { constructor: true });
3484
+ defineBuiltIn$2(global$9, 'RegExp', RegExpWrapper, { constructor: true });
3405
3485
  }
3406
3486
 
3407
3487
  // https://tc39.es/ecma262/#sec-get-regexp-@@species
3408
3488
  setSpecies$1('RegExp');
3409
3489
 
3410
- var DESCRIPTORS$4 = descriptors;
3490
+ var DESCRIPTORS$3 = descriptors;
3411
3491
  var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
3412
3492
  var classof$3 = classofRaw$2;
3413
- var defineBuiltInAccessor$1 = defineBuiltInAccessor$3;
3493
+ var defineBuiltInAccessor = defineBuiltInAccessor$3;
3414
3494
  var getInternalState = internalState.get;
3415
3495
 
3416
3496
  var RegExpPrototype = RegExp.prototype;
@@ -3418,8 +3498,8 @@ var $TypeError$7 = TypeError;
3418
3498
 
3419
3499
  // `RegExp.prototype.dotAll` getter
3420
3500
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
3421
- if (DESCRIPTORS$4 && UNSUPPORTED_DOT_ALL) {
3422
- defineBuiltInAccessor$1(RegExpPrototype, 'dotAll', {
3501
+ if (DESCRIPTORS$3 && UNSUPPORTED_DOT_ALL) {
3502
+ defineBuiltInAccessor(RegExpPrototype, 'dotAll', {
3423
3503
  configurable: true,
3424
3504
  get: function dotAll() {
3425
3505
  if (this === RegExpPrototype) return;
@@ -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,28 +4912,33 @@ const BooleanComponent = ({
4880
4912
  path,
4881
4913
  label,
4882
4914
  required,
4883
- errors
4915
+ errors,
4916
+ schema
4884
4917
  }) => {
4885
- var _a, _b, _c;
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 = `${((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.text) ? (_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.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
- }, (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.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
4944
  input: BooleanComponent
@@ -4930,13 +4967,14 @@ const BooleanRadioComponent = ({
4930
4967
  const TrueDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForTrue);
4931
4968
  const FalseDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForFalse);
4932
4969
  const BaseTestId = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${path}-boolean-radio-jsonform`;
4970
+ const ctx = useJsonForms();
4933
4971
  const errorsFormInput = checkFieldValidity({
4934
4972
  data,
4935
4973
  uischema,
4936
4974
  label,
4937
4975
  required,
4938
4976
  errors
4939
- });
4977
+ }, ctx);
4940
4978
  return jsx(Visible, {
4941
4979
  visible: visible,
4942
4980
  children: jsxs(GoARadioGroup, Object.assign({
@@ -7533,6 +7571,20 @@ const SearchBox = styled.div(_t$1 || (_t$1 = _$1`
7533
7571
  cursor: pointer;
7534
7572
  font-weight: var(--fw-bold);
7535
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
+ }
7536
7588
  `));
7537
7589
  const AddressIndent = styled.div(_t2 || (_t2 = _$1`
7538
7590
  margin: 1em 1.5em 0 1.5em;
@@ -8121,28 +8173,33 @@ const AddressLookUpControl = props => {
8121
8173
  error: (_g = errors === null || errors === void 0 ? void 0 : errors['addressLine1']) !== null && _g !== void 0 ? _g : '',
8122
8174
  "data-testId": "form-address-line1",
8123
8175
  children: jsxs(SearchBox, {
8124
- children: [jsx(GoAInput, {
8125
- leadingIcon: autocompletion && enabled ? 'search' : undefined,
8126
- id: "goaInput",
8127
- name: "addressLine1",
8128
- testId: "address-form-address1",
8129
- readonly: readOnly,
8130
- disabled: !enabled,
8131
- ariaLabel: 'address-form-address1',
8132
- placeholder: "Start typing the first line of your address, required.",
8133
- value: (address === null || address === void 0 ? void 0 : address.addressLine1) || '',
8134
- onChange: (e, value) => handleDropdownChange(value),
8135
- onBlur: name => handleRequiredFieldBlur(name),
8136
- width: "100%",
8137
- onKeyPress: (e, value, key) => {
8138
- if (open) {
8139
- 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
+ }
8140
8195
  }
8141
- }
8142
- }), loading && autocompletion && jsx(GoACircularProgress, {
8143
- variant: "inline",
8144
- size: "small",
8145
- visible: true
8196
+ }), loading && jsx("div", {
8197
+ className: "input-spinner",
8198
+ children: jsx(GoASpinner, {
8199
+ type: "infinite",
8200
+ size: "small"
8201
+ })
8202
+ })]
8146
8203
  }), !loading && suggestions && autocompletion && jsx("ul", {
8147
8204
  ref: dropdownRef,
8148
8205
  className: "suggestions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.43.7",
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
  */