@abgov/jsonforms-components 1.35.3 → 1.35.5

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,6 +1,6 @@
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, GoADropdown, GoADropdownItem, GoADetails, GoASkeleton } 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, GoASkeleton } from '@abgov/react-components';
4
4
  import styled from 'styled-components';
5
5
  import axios from 'axios';
6
6
  import get$1 from 'lodash/get';
@@ -292,12 +292,12 @@ var descriptors = !fails$n(function () {
292
292
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
293
293
  });
294
294
 
295
- var DESCRIPTORS$g = descriptors;
295
+ var DESCRIPTORS$h = descriptors;
296
296
  var fails$m = fails$r;
297
297
 
298
298
  // V8 ~ Chrome 36-
299
299
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
300
- var v8PrototypeDefineBug = DESCRIPTORS$g && fails$m(function () {
300
+ var v8PrototypeDefineBug = DESCRIPTORS$h && fails$m(function () {
301
301
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
302
302
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
303
303
  value: 42,
@@ -318,12 +318,12 @@ var documentCreateElement$2 = function (it) {
318
318
  return EXISTS$1 ? document$3.createElement(it) : {};
319
319
  };
320
320
 
321
- var DESCRIPTORS$f = descriptors;
321
+ var DESCRIPTORS$g = descriptors;
322
322
  var fails$l = fails$r;
323
323
  var createElement$1 = documentCreateElement$2;
324
324
 
325
325
  // Thanks to IE8 for its funny defineProperty
326
- var ie8DomDefine = !DESCRIPTORS$f && !fails$l(function () {
326
+ var ie8DomDefine = !DESCRIPTORS$g && !fails$l(function () {
327
327
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
328
328
  return Object.defineProperty(createElement$1('div'), 'a', {
329
329
  get: function () { return 7; }
@@ -450,7 +450,7 @@ var toPropertyKey$2 = function (argument) {
450
450
  return isSymbol$1(key) ? key : key + '';
451
451
  };
452
452
 
453
- var DESCRIPTORS$e = descriptors;
453
+ var DESCRIPTORS$f = descriptors;
454
454
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
455
455
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
456
456
  var anObject$e = anObject$f;
@@ -467,7 +467,7 @@ var WRITABLE = 'writable';
467
467
 
468
468
  // `Object.defineProperty` method
469
469
  // https://tc39.es/ecma262/#sec-object.defineproperty
470
- objectDefineProperty.f = DESCRIPTORS$e ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
470
+ objectDefineProperty.f = DESCRIPTORS$f ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
471
471
  anObject$e(O);
472
472
  P = toPropertyKey$1(P);
473
473
  anObject$e(Attributes);
@@ -625,9 +625,9 @@ var objectKeys$2 = Object.keys || function keys(O) {
625
625
  return internalObjectKeys$1(O, enumBugKeys$2);
626
626
  };
627
627
 
628
- var DESCRIPTORS$d = descriptors;
628
+ var DESCRIPTORS$e = descriptors;
629
629
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
630
- var definePropertyModule$3 = objectDefineProperty;
630
+ var definePropertyModule$4 = objectDefineProperty;
631
631
  var anObject$d = anObject$f;
632
632
  var toIndexedObject$2 = toIndexedObject$5;
633
633
  var objectKeys$1 = objectKeys$2;
@@ -635,14 +635,14 @@ var objectKeys$1 = objectKeys$2;
635
635
  // `Object.defineProperties` method
636
636
  // https://tc39.es/ecma262/#sec-object.defineproperties
637
637
  // eslint-disable-next-line es/no-object-defineproperties -- safe
638
- objectDefineProperties.f = DESCRIPTORS$d && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
638
+ objectDefineProperties.f = DESCRIPTORS$e && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
639
639
  anObject$d(O);
640
640
  var props = toIndexedObject$2(Properties);
641
641
  var keys = objectKeys$1(Properties);
642
642
  var length = keys.length;
643
643
  var index = 0;
644
644
  var key;
645
- while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
645
+ while (length > index) definePropertyModule$4.f(O, key = keys[index++], props[key]);
646
646
  return O;
647
647
  };
648
648
 
@@ -773,7 +773,7 @@ var WeakMap$1 = global$h.WeakMap;
773
773
 
774
774
  var weakMapBasicDetection = isCallable$k(WeakMap$1) && /native code/.test(String(WeakMap$1));
775
775
 
776
- var createPropertyDescriptor$4 = function (bitmap, value) {
776
+ var createPropertyDescriptor$5 = function (bitmap, value) {
777
777
  return {
778
778
  enumerable: !(bitmap & 1),
779
779
  configurable: !(bitmap & 2),
@@ -782,12 +782,12 @@ var createPropertyDescriptor$4 = function (bitmap, value) {
782
782
  };
783
783
  };
784
784
 
785
- var DESCRIPTORS$c = descriptors;
786
- var definePropertyModule$2 = objectDefineProperty;
787
- var createPropertyDescriptor$3 = createPropertyDescriptor$4;
785
+ var DESCRIPTORS$d = descriptors;
786
+ var definePropertyModule$3 = objectDefineProperty;
787
+ var createPropertyDescriptor$4 = createPropertyDescriptor$5;
788
788
 
789
- var createNonEnumerableProperty$9 = DESCRIPTORS$c ? function (object, key, value) {
790
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$3(1, value));
789
+ var createNonEnumerableProperty$9 = DESCRIPTORS$d ? function (object, key, value) {
790
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$4(1, value));
791
791
  } : function (object, key, value) {
792
792
  object[key] = value;
793
793
  return object;
@@ -882,10 +882,10 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
882
882
  return !!descriptor && descriptor.enumerable;
883
883
  } : $propertyIsEnumerable;
884
884
 
885
- var DESCRIPTORS$b = descriptors;
885
+ var DESCRIPTORS$c = descriptors;
886
886
  var call$h = functionCall;
887
887
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
888
- var createPropertyDescriptor$2 = createPropertyDescriptor$4;
888
+ var createPropertyDescriptor$3 = createPropertyDescriptor$5;
889
889
  var toIndexedObject$1 = toIndexedObject$5;
890
890
  var toPropertyKey = toPropertyKey$2;
891
891
  var hasOwn$a = hasOwnProperty_1;
@@ -896,28 +896,28 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
896
896
 
897
897
  // `Object.getOwnPropertyDescriptor` method
898
898
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
899
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$b ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
899
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$c ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
900
900
  O = toIndexedObject$1(O);
901
901
  P = toPropertyKey(P);
902
902
  if (IE8_DOM_DEFINE) try {
903
903
  return $getOwnPropertyDescriptor(O, P);
904
904
  } catch (error) { /* empty */ }
905
- if (hasOwn$a(O, P)) return createPropertyDescriptor$2(!call$h(propertyIsEnumerableModule$1.f, O, P), O[P]);
905
+ if (hasOwn$a(O, P)) return createPropertyDescriptor$3(!call$h(propertyIsEnumerableModule$1.f, O, P), O[P]);
906
906
  };
907
907
 
908
908
  var makeBuiltIn$3 = {exports: {}};
909
909
 
910
- var DESCRIPTORS$a = descriptors;
910
+ var DESCRIPTORS$b = descriptors;
911
911
  var hasOwn$9 = hasOwnProperty_1;
912
912
 
913
913
  var FunctionPrototype$1 = Function.prototype;
914
914
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
915
- var getDescriptor = DESCRIPTORS$a && Object.getOwnPropertyDescriptor;
915
+ var getDescriptor = DESCRIPTORS$b && Object.getOwnPropertyDescriptor;
916
916
 
917
917
  var EXISTS = hasOwn$9(FunctionPrototype$1, 'name');
918
918
  // additional protection from minified / mangled / dropped function names
919
919
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
920
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$a || (DESCRIPTORS$a && getDescriptor(FunctionPrototype$1, 'name').configurable));
920
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$b || (DESCRIPTORS$b && getDescriptor(FunctionPrototype$1, 'name').configurable));
921
921
 
922
922
  var functionName = {
923
923
  EXISTS: EXISTS,
@@ -944,7 +944,7 @@ var uncurryThis$k = functionUncurryThis;
944
944
  var fails$k = fails$r;
945
945
  var isCallable$i = isCallable$q;
946
946
  var hasOwn$8 = hasOwnProperty_1;
947
- var DESCRIPTORS$9 = descriptors;
947
+ var DESCRIPTORS$a = descriptors;
948
948
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
949
949
  var inspectSource$2 = inspectSource$3;
950
950
  var InternalStateModule$2 = internalState;
@@ -958,7 +958,7 @@ var stringSlice$6 = uncurryThis$k(''.slice);
958
958
  var replace$7 = uncurryThis$k(''.replace);
959
959
  var join = uncurryThis$k([].join);
960
960
 
961
- var CONFIGURABLE_LENGTH = DESCRIPTORS$9 && !fails$k(function () {
961
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$a && !fails$k(function () {
962
962
  return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
963
963
  });
964
964
 
@@ -971,7 +971,7 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
971
971
  if (options && options.getter) name = 'get ' + name;
972
972
  if (options && options.setter) name = 'set ' + name;
973
973
  if (!hasOwn$8(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
974
- if (DESCRIPTORS$9) defineProperty$5(value, 'name', { value: name, configurable: true });
974
+ if (DESCRIPTORS$a) defineProperty$5(value, 'name', { value: name, configurable: true });
975
975
  else value.name = name;
976
976
  }
977
977
  if (CONFIGURABLE_LENGTH && options && hasOwn$8(options, 'arity') && value.length !== options.arity) {
@@ -979,7 +979,7 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
979
979
  }
980
980
  try {
981
981
  if (options && hasOwn$8(options, 'constructor') && options.constructor) {
982
- if (DESCRIPTORS$9) defineProperty$5(value, 'prototype', { writable: false });
982
+ if (DESCRIPTORS$a) defineProperty$5(value, 'prototype', { writable: false });
983
983
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
984
984
  } else if (value.prototype) value.prototype = undefined;
985
985
  } catch (error) { /* empty */ }
@@ -996,7 +996,7 @@ Function.prototype.toString = makeBuiltIn$2(function toString() {
996
996
  }, 'toString');
997
997
 
998
998
  var isCallable$h = isCallable$q;
999
- var definePropertyModule$1 = objectDefineProperty;
999
+ var definePropertyModule$2 = objectDefineProperty;
1000
1000
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
1001
1001
  var defineGlobalProperty$1 = defineGlobalProperty$3;
1002
1002
 
@@ -1014,7 +1014,7 @@ var defineBuiltIn$8 = function (O, key, value, options) {
1014
1014
  else if (O[key]) simple = true;
1015
1015
  } catch (error) { /* empty */ }
1016
1016
  if (simple) O[key] = value;
1017
- else definePropertyModule$1.f(O, key, {
1017
+ else definePropertyModule$2.f(O, key, {
1018
1018
  value: value,
1019
1019
  enumerable: false,
1020
1020
  configurable: !options.nonConfigurable,
@@ -1060,11 +1060,11 @@ var ownKeys$1 = getBuiltIn$6('Reflect', 'ownKeys') || function ownKeys(it) {
1060
1060
  var hasOwn$7 = hasOwnProperty_1;
1061
1061
  var ownKeys = ownKeys$1;
1062
1062
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1063
- var definePropertyModule = objectDefineProperty;
1063
+ var definePropertyModule$1 = objectDefineProperty;
1064
1064
 
1065
1065
  var copyConstructorProperties$3 = function (target, source, exceptions) {
1066
1066
  var keys = ownKeys(source);
1067
- var defineProperty = definePropertyModule.f;
1067
+ var defineProperty = definePropertyModule$1.f;
1068
1068
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1069
1069
  for (var i = 0; i < keys.length; i++) {
1070
1070
  var key = keys[i];
@@ -1244,7 +1244,7 @@ var setToStringTag$4 = function (target, TAG, STATIC) {
1244
1244
 
1245
1245
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1246
1246
  var create$2 = objectCreate;
1247
- var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1247
+ var createPropertyDescriptor$2 = createPropertyDescriptor$5;
1248
1248
  var setToStringTag$3 = setToStringTag$4;
1249
1249
  var Iterators$4 = iterators;
1250
1250
 
@@ -1252,7 +1252,7 @@ var returnThis$1 = function () { return this; };
1252
1252
 
1253
1253
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1254
1254
  var TO_STRING_TAG = NAME + ' Iterator';
1255
- IteratorConstructor.prototype = create$2(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1255
+ IteratorConstructor.prototype = create$2(IteratorPrototype$1, { next: createPropertyDescriptor$2(+!ENUMERABLE_NEXT, next) });
1256
1256
  setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
1257
1257
  Iterators$4[TO_STRING_TAG] = returnThis$1;
1258
1258
  return IteratorConstructor;
@@ -1313,7 +1313,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1313
1313
  };
1314
1314
  }() : undefined);
1315
1315
 
1316
- var $$k = _export;
1316
+ var $$l = _export;
1317
1317
  var call$g = functionCall;
1318
1318
  var FunctionName = functionName;
1319
1319
  var isCallable$d = isCallable$q;
@@ -1401,7 +1401,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1401
1401
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1402
1402
  defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
1403
1403
  }
1404
- } else $$k({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1404
+ } else $$l({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1405
1405
  }
1406
1406
 
1407
1407
  // define iterator
@@ -1426,7 +1426,7 @@ var InternalStateModule$1 = internalState;
1426
1426
  var defineProperty$3 = objectDefineProperty.f;
1427
1427
  var defineIterator = iteratorDefine;
1428
1428
  var createIterResultObject = createIterResultObject$1;
1429
- var DESCRIPTORS$8 = descriptors;
1429
+ var DESCRIPTORS$9 = descriptors;
1430
1430
 
1431
1431
  var ARRAY_ITERATOR = 'Array Iterator';
1432
1432
  var setInternalState$1 = InternalStateModule$1.set;
@@ -1476,7 +1476,7 @@ addToUnscopables$2('values');
1476
1476
  addToUnscopables$2('entries');
1477
1477
 
1478
1478
  // V8 ~ Chrome 45- bug
1479
- if (DESCRIPTORS$8 && values.name !== 'values') try {
1479
+ if (DESCRIPTORS$9 && values.name !== 'values') try {
1480
1480
  defineProperty$3(values, 'name', { value: 'values' });
1481
1481
  } catch (error) { /* empty */ }
1482
1482
 
@@ -1561,7 +1561,7 @@ for (var COLLECTION_NAME in DOMIterables) {
1561
1561
 
1562
1562
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1563
1563
 
1564
- var DESCRIPTORS$7 = descriptors;
1564
+ var DESCRIPTORS$8 = descriptors;
1565
1565
  var uncurryThis$h = functionUncurryThis;
1566
1566
  var call$f = functionCall;
1567
1567
  var fails$g = fails$r;
@@ -1581,7 +1581,7 @@ var concat$1 = uncurryThis$h([].concat);
1581
1581
  // https://tc39.es/ecma262/#sec-object.assign
1582
1582
  var objectAssign = !$assign || fails$g(function () {
1583
1583
  // should have correct order of operations (Edge bug)
1584
- if (DESCRIPTORS$7 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1584
+ if (DESCRIPTORS$8 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1585
1585
  enumerable: true,
1586
1586
  get: function () {
1587
1587
  defineProperty$2(this, 'b', {
@@ -1613,18 +1613,18 @@ var objectAssign = !$assign || fails$g(function () {
1613
1613
  var key;
1614
1614
  while (length > j) {
1615
1615
  key = keys[j++];
1616
- if (!DESCRIPTORS$7 || call$f(propertyIsEnumerable, S, key)) T[key] = S[key];
1616
+ if (!DESCRIPTORS$8 || call$f(propertyIsEnumerable, S, key)) T[key] = S[key];
1617
1617
  }
1618
1618
  } return T;
1619
1619
  } : $assign;
1620
1620
 
1621
- var $$j = _export;
1621
+ var $$k = _export;
1622
1622
  var assign = objectAssign;
1623
1623
 
1624
1624
  // `Object.assign` method
1625
1625
  // https://tc39.es/ecma262/#sec-object.assign
1626
1626
  // eslint-disable-next-line es/no-object-assign -- required for testing
1627
- $$j({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1627
+ $$k({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1628
1628
  assign: assign
1629
1629
  });
1630
1630
 
@@ -1634,7 +1634,7 @@ const FormFieldWrapper = styled.div(_t$9 || (_t$9 = _$9`
1634
1634
  margin-bottom: var(--goa-space-l);
1635
1635
  `));
1636
1636
 
1637
- var $$i = _export;
1637
+ var $$j = _export;
1638
1638
  var toObject$3 = toObject$7;
1639
1639
  var lengthOfArrayLike$3 = lengthOfArrayLike$5;
1640
1640
  var toIntegerOrInfinity$3 = toIntegerOrInfinity$6;
@@ -1642,7 +1642,7 @@ var addToUnscopables$1 = addToUnscopables$3;
1642
1642
 
1643
1643
  // `Array.prototype.at` method
1644
1644
  // https://tc39.es/ecma262/#sec-array.prototype.at
1645
- $$i({ target: 'Array', proto: true }, {
1645
+ $$j({ target: 'Array', proto: true }, {
1646
1646
  at: function at(index) {
1647
1647
  var O = toObject$3(this);
1648
1648
  var len = lengthOfArrayLike$3(O);
@@ -1891,18 +1891,18 @@ if (PATCH) {
1891
1891
 
1892
1892
  var regexpExec$2 = patchedExec;
1893
1893
 
1894
- var $$h = _export;
1894
+ var $$i = _export;
1895
1895
  var exec$3 = regexpExec$2;
1896
1896
 
1897
1897
  // `RegExp.prototype.exec` method
1898
1898
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1899
- $$h({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
1899
+ $$i({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
1900
1900
  exec: exec$3
1901
1901
  });
1902
1902
 
1903
1903
  // TODO: Remove from `core-js@4` since it's moved to entry points
1904
1904
 
1905
- var $$g = _export;
1905
+ var $$h = _export;
1906
1906
  var call$d = functionCall;
1907
1907
  var isCallable$b = isCallable$q;
1908
1908
  var anObject$9 = anObject$f;
@@ -1922,7 +1922,7 @@ var nativeTest = /./.test;
1922
1922
 
1923
1923
  // `RegExp.prototype.test` method
1924
1924
  // https://tc39.es/ecma262/#sec-regexp.prototype.test
1925
- $$g({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1925
+ $$h({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
1926
1926
  test: function (S) {
1927
1927
  var R = anObject$9(this);
1928
1928
  var string = toString$b(S);
@@ -1974,7 +1974,7 @@ if (NOT_GENERIC || INCORRECT_NAME) {
1974
1974
  }, { unsafe: true });
1975
1975
  }
1976
1976
 
1977
- var $$f = _export;
1977
+ var $$g = _export;
1978
1978
  var uncurryThis$f = functionUncurryThis;
1979
1979
  var requireObjectCoercible$6 = requireObjectCoercible$a;
1980
1980
  var toIntegerOrInfinity$2 = toIntegerOrInfinity$6;
@@ -1990,7 +1990,7 @@ var FORCED$3 = fails$b(function () {
1990
1990
 
1991
1991
  // `String.prototype.at` method
1992
1992
  // https://tc39.es/ecma262/#sec-string.prototype.at
1993
- $$f({ target: 'String', proto: true, forced: FORCED$3 }, {
1993
+ $$g({ target: 'String', proto: true, forced: FORCED$3 }, {
1994
1994
  at: function at(index) {
1995
1995
  var S = toString$a(requireObjectCoercible$6(this));
1996
1996
  var len = S.length;
@@ -2810,7 +2810,7 @@ var isArray$2 = Array.isArray || function isArray(argument) {
2810
2810
  return classof$6(argument) === 'Array';
2811
2811
  };
2812
2812
 
2813
- var DESCRIPTORS$6 = descriptors;
2813
+ var DESCRIPTORS$7 = descriptors;
2814
2814
  var isArray$1 = isArray$2;
2815
2815
 
2816
2816
  var $TypeError$a = TypeError;
@@ -2818,7 +2818,7 @@ var $TypeError$a = TypeError;
2818
2818
  var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
2819
2819
 
2820
2820
  // Safari < 13 does not throw an error in this case
2821
- var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$6 && !function () {
2821
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$7 && !function () {
2822
2822
  // makes no sense without proper strict mode support
2823
2823
  if (this !== undefined) return true;
2824
2824
  try {
@@ -2845,7 +2845,7 @@ var doesNotExceedSafeInteger$1 = function (it) {
2845
2845
  return it;
2846
2846
  };
2847
2847
 
2848
- var $$e = _export;
2848
+ var $$f = _export;
2849
2849
  var toObject$1 = toObject$7;
2850
2850
  var lengthOfArrayLike$2 = lengthOfArrayLike$5;
2851
2851
  var setArrayLength = arraySetLength;
@@ -2871,7 +2871,7 @@ var FORCED$2 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2871
2871
 
2872
2872
  // `Array.prototype.push` method
2873
2873
  // https://tc39.es/ecma262/#sec-array.prototype.push
2874
- $$e({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
2874
+ $$f({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
2875
2875
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2876
2876
  push: function push(item) {
2877
2877
  var O = toObject$1(this);
@@ -2922,7 +2922,7 @@ function registerReducer(state, action) {
2922
2922
  return state;
2923
2923
  }
2924
2924
 
2925
- var $$d = _export;
2925
+ var $$e = _export;
2926
2926
  var $includes = arrayIncludes.includes;
2927
2927
  var fails$7 = fails$r;
2928
2928
  var addToUnscopables = addToUnscopables$3;
@@ -2935,7 +2935,7 @@ var BROKEN_ON_SPARSE = fails$7(function () {
2935
2935
 
2936
2936
  // `Array.prototype.includes` method
2937
2937
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2938
- $$d({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2938
+ $$e({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2939
2939
  includes: function includes(el /* , fromIndex = 0 */) {
2940
2940
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2941
2941
  }
@@ -2978,7 +2978,7 @@ var getJsonReplacerFunction = function (replacer) {
2978
2978
  };
2979
2979
  };
2980
2980
 
2981
- var $$c = _export;
2981
+ var $$d = _export;
2982
2982
  var getBuiltIn$5 = getBuiltIn$9;
2983
2983
  var apply$2 = functionApply;
2984
2984
  var call$7 = functionCall;
@@ -3041,7 +3041,7 @@ var fixIllFormed = function (match, offset, string) {
3041
3041
  if ($stringify) {
3042
3042
  // `JSON.stringify` method
3043
3043
  // https://tc39.es/ecma262/#sec-json.stringify
3044
- $$c({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
3044
+ $$d({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
3045
3045
  // eslint-disable-next-line no-unused-vars -- required for `.length`
3046
3046
  stringify: function stringify(it, replacer, space) {
3047
3047
  var args = arraySlice$1(arguments);
@@ -3090,7 +3090,7 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
3090
3090
  } return false;
3091
3091
  };
3092
3092
 
3093
- var $$b = _export;
3093
+ var $$c = _export;
3094
3094
  var uncurryThis$8 = functionUncurryThis;
3095
3095
  var notARegExp$1 = notARegexp;
3096
3096
  var requireObjectCoercible$3 = requireObjectCoercible$a;
@@ -3101,7 +3101,7 @@ var stringIndexOf$1 = uncurryThis$8(''.indexOf);
3101
3101
 
3102
3102
  // `String.prototype.includes` method
3103
3103
  // https://tc39.es/ecma262/#sec-string.prototype.includes
3104
- $$b({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
3104
+ $$c({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
3105
3105
  includes: function includes(searchString /* , position = 0 */) {
3106
3106
  return !!~stringIndexOf$1(
3107
3107
  toString$6(requireObjectCoercible$3(this)),
@@ -3194,14 +3194,14 @@ var defineBuiltInAccessor$3 = function (target, name, descriptor) {
3194
3194
  var getBuiltIn$4 = getBuiltIn$9;
3195
3195
  var defineBuiltInAccessor$2 = defineBuiltInAccessor$3;
3196
3196
  var wellKnownSymbol$6 = wellKnownSymbol$j;
3197
- var DESCRIPTORS$5 = descriptors;
3197
+ var DESCRIPTORS$6 = descriptors;
3198
3198
 
3199
3199
  var SPECIES$2 = wellKnownSymbol$6('species');
3200
3200
 
3201
3201
  var setSpecies$2 = function (CONSTRUCTOR_NAME) {
3202
3202
  var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
3203
3203
 
3204
- if (DESCRIPTORS$5 && Constructor && !Constructor[SPECIES$2]) {
3204
+ if (DESCRIPTORS$6 && Constructor && !Constructor[SPECIES$2]) {
3205
3205
  defineBuiltInAccessor$2(Constructor, SPECIES$2, {
3206
3206
  configurable: true,
3207
3207
  get: function () { return this; }
@@ -3209,7 +3209,7 @@ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
3209
3209
  }
3210
3210
  };
3211
3211
 
3212
- var DESCRIPTORS$4 = descriptors;
3212
+ var DESCRIPTORS$5 = descriptors;
3213
3213
  var global$a = global$o;
3214
3214
  var uncurryThis$7 = functionUncurryThis;
3215
3215
  var isForced$1 = isForced_1;
@@ -3252,7 +3252,7 @@ var CORRECT_NEW = new NativeRegExp(re1) !== re1;
3252
3252
  var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
3253
3253
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
3254
3254
 
3255
- var BASE_FORCED = DESCRIPTORS$4 &&
3255
+ var BASE_FORCED = DESCRIPTORS$5 &&
3256
3256
  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG || fails$5(function () {
3257
3257
  re2[MATCH] = false;
3258
3258
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
@@ -3401,7 +3401,7 @@ if (isForced$1('RegExp', BASE_FORCED)) {
3401
3401
  // https://tc39.es/ecma262/#sec-get-regexp-@@species
3402
3402
  setSpecies$1('RegExp');
3403
3403
 
3404
- var DESCRIPTORS$3 = descriptors;
3404
+ var DESCRIPTORS$4 = descriptors;
3405
3405
  var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
3406
3406
  var classof$3 = classofRaw$2;
3407
3407
  var defineBuiltInAccessor$1 = defineBuiltInAccessor$3;
@@ -3412,7 +3412,7 @@ var $TypeError$7 = TypeError;
3412
3412
 
3413
3413
  // `RegExp.prototype.dotAll` getter
3414
3414
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
3415
- if (DESCRIPTORS$3 && UNSUPPORTED_DOT_ALL) {
3415
+ if (DESCRIPTORS$4 && UNSUPPORTED_DOT_ALL) {
3416
3416
  defineBuiltInAccessor$1(RegExpPrototype, 'dotAll', {
3417
3417
  configurable: true,
3418
3418
  get: function dotAll() {
@@ -3680,8 +3680,8 @@ const GoAInputBaseControl = props => {
3680
3680
  });
3681
3681
  };
3682
3682
 
3683
- var $$a = _export;
3684
- var DESCRIPTORS$2 = descriptors;
3683
+ var $$b = _export;
3684
+ var DESCRIPTORS$3 = descriptors;
3685
3685
  var global$9 = global$o;
3686
3686
  var uncurryThis$6 = functionUncurryThis;
3687
3687
  var hasOwn$2 = hasOwnProperty_1;
@@ -3694,7 +3694,7 @@ var copyConstructorProperties$1 = copyConstructorProperties$3;
3694
3694
  var NativeSymbol = global$9.Symbol;
3695
3695
  var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
3696
3696
 
3697
- if (DESCRIPTORS$2 && isCallable$5(NativeSymbol) && (!('description' in SymbolPrototype) ||
3697
+ if (DESCRIPTORS$3 && isCallable$5(NativeSymbol) && (!('description' in SymbolPrototype) ||
3698
3698
  // Safari 12 bug
3699
3699
  NativeSymbol().description !== undefined
3700
3700
  )) {
@@ -3732,7 +3732,7 @@ if (DESCRIPTORS$2 && isCallable$5(NativeSymbol) && (!('description' in SymbolPro
3732
3732
  }
3733
3733
  });
3734
3734
 
3735
- $$a({ global: true, constructor: true, forced: true }, {
3735
+ $$b({ global: true, constructor: true, forced: true }, {
3736
3736
  Symbol: SymbolWrapper
3737
3737
  });
3738
3738
  }
@@ -4895,13 +4895,13 @@ var errorStackClear = function (stack, dropEntries) {
4895
4895
  };
4896
4896
 
4897
4897
  var fails$4 = fails$r;
4898
- var createPropertyDescriptor = createPropertyDescriptor$4;
4898
+ var createPropertyDescriptor$1 = createPropertyDescriptor$5;
4899
4899
 
4900
4900
  var errorStackInstallable = !fails$4(function () {
4901
4901
  var error = new Error('a');
4902
4902
  if (!('stack' in error)) return true;
4903
4903
  // eslint-disable-next-line es/no-object-defineproperty -- safe
4904
- Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
4904
+ Object.defineProperty(error, 'stack', createPropertyDescriptor$1(1, 7));
4905
4905
  return error.stack !== 7;
4906
4906
  });
4907
4907
 
@@ -4930,7 +4930,7 @@ var inheritIfRequired = inheritIfRequired$2;
4930
4930
  var normalizeStringArgument = normalizeStringArgument$1;
4931
4931
  var installErrorCause = installErrorCause$1;
4932
4932
  var installErrorStack = errorStackInstall;
4933
- var DESCRIPTORS$1 = descriptors;
4933
+ var DESCRIPTORS$2 = descriptors;
4934
4934
 
4935
4935
  var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
4936
4936
  var STACK_TRACE_LIMIT = 'stackTraceLimit';
@@ -4965,7 +4965,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
4965
4965
  if (ERROR_NAME !== 'Error') {
4966
4966
  if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
4967
4967
  else copyConstructorProperties(WrappedError, BaseError, { name: true });
4968
- } else if (DESCRIPTORS$1 && STACK_TRACE_LIMIT in OriginalError) {
4968
+ } else if (DESCRIPTORS$2 && STACK_TRACE_LIMIT in OriginalError) {
4969
4969
  proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
4970
4970
  proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
4971
4971
  }
@@ -4984,7 +4984,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
4984
4984
  };
4985
4985
 
4986
4986
  /* eslint-disable no-unused-vars -- required for functions `.length` */
4987
- var $$9 = _export;
4987
+ var $$a = _export;
4988
4988
  var global$8 = global$o;
4989
4989
  var apply$1 = functionApply;
4990
4990
  var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
@@ -4998,14 +4998,14 @@ var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
4998
4998
  var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
4999
4999
  var O = {};
5000
5000
  O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
5001
- $$9({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
5001
+ $$a({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
5002
5002
  };
5003
5003
 
5004
5004
  var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
5005
5005
  if (WebAssembly && WebAssembly[ERROR_NAME]) {
5006
5006
  var O = {};
5007
5007
  O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
5008
- $$9({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
5008
+ $$a({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
5009
5009
  }
5010
5010
  };
5011
5011
 
@@ -5787,36 +5787,185 @@ const FileUploaderStyle = styled.div(_t3$1 || (_t3$1 = _$3`
5787
5787
 
5788
5788
  const FileUploaderTester = rankWith(3, and(schemaTypeIs('string'), formatIs('file-urn')));
5789
5789
 
5790
- const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
5791
- numColumns,
5792
- errors,
5793
- label,
5794
- path,
5795
- addItem,
5796
- schema,
5797
- enabled,
5798
- translations,
5799
- rootSchema,
5800
- uischema
5801
- }) {
5802
- var _a, _b, _c, _d;
5803
- const buttonPosition = ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.addButtonPosition) || 'left';
5804
- const arrayLabel = getLabelText(uischema.scope, label);
5805
- return jsx(Fragment, {
5806
- children: jsx("div", {
5807
- style: {
5808
- textAlign: buttonPosition
5809
- },
5810
- children: jsx(GoAButton, {
5811
- disabled: !enabled,
5812
- testId: `object-array-toolbar-${label}`,
5813
- "aria-label": translations.addAriaLabel,
5814
- onClick: addItem(path, createDefaultValue(schema, rootSchema)),
5815
- type: (_c = (_b = uischema.options) === null || _b === void 0 ? void 0 : _b.addButtonType) !== null && _c !== void 0 ? _c : 'primary',
5816
- children: ((_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.addButtonText) || capitalizeFirstLetter(`Add ${arrayLabel}`)
5817
- })
5818
- })
5819
- });
5790
+ var classofRaw = classofRaw$2;
5791
+ var uncurryThis$4 = functionUncurryThis;
5792
+
5793
+ var functionUncurryThisClause = function (fn) {
5794
+ // Nashorn bug:
5795
+ // https://github.com/zloirock/core-js/issues/1128
5796
+ // https://github.com/zloirock/core-js/issues/1130
5797
+ if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
5798
+ };
5799
+
5800
+ var uncurryThis$3 = functionUncurryThisClause;
5801
+ var aCallable$6 = aCallable$9;
5802
+ var NATIVE_BIND = functionBindNative;
5803
+
5804
+ var bind$4 = uncurryThis$3(uncurryThis$3.bind);
5805
+
5806
+ // optional / simple context binding
5807
+ var functionBindContext = function (fn, that) {
5808
+ aCallable$6(fn);
5809
+ return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
5810
+ return fn.apply(that, arguments);
5811
+ };
5812
+ };
5813
+
5814
+ var wellKnownSymbol$4 = wellKnownSymbol$j;
5815
+ var Iterators$1 = iterators;
5816
+
5817
+ var ITERATOR$2 = wellKnownSymbol$4('iterator');
5818
+ var ArrayPrototype = Array.prototype;
5819
+
5820
+ // check on default Array iterator
5821
+ var isArrayIteratorMethod$1 = function (it) {
5822
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
5823
+ };
5824
+
5825
+ var classof$2 = classof$9;
5826
+ var getMethod$1 = getMethod$5;
5827
+ var isNullOrUndefined$1 = isNullOrUndefined$6;
5828
+ var Iterators = iterators;
5829
+ var wellKnownSymbol$3 = wellKnownSymbol$j;
5830
+
5831
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
5832
+
5833
+ var getIteratorMethod$2 = function (it) {
5834
+ if (!isNullOrUndefined$1(it)) return getMethod$1(it, ITERATOR$1)
5835
+ || getMethod$1(it, '@@iterator')
5836
+ || Iterators[classof$2(it)];
5837
+ };
5838
+
5839
+ var call$5 = functionCall;
5840
+ var aCallable$5 = aCallable$9;
5841
+ var anObject$4 = anObject$f;
5842
+ var tryToString$2 = tryToString$4;
5843
+ var getIteratorMethod$1 = getIteratorMethod$2;
5844
+
5845
+ var $TypeError$6 = TypeError;
5846
+
5847
+ var getIterator$1 = function (argument, usingIterator) {
5848
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
5849
+ if (aCallable$5(iteratorMethod)) return anObject$4(call$5(iteratorMethod, argument));
5850
+ throw new $TypeError$6(tryToString$2(argument) + ' is not iterable');
5851
+ };
5852
+
5853
+ var call$4 = functionCall;
5854
+ var anObject$3 = anObject$f;
5855
+ var getMethod = getMethod$5;
5856
+
5857
+ var iteratorClose$1 = function (iterator, kind, value) {
5858
+ var innerResult, innerError;
5859
+ anObject$3(iterator);
5860
+ try {
5861
+ innerResult = getMethod(iterator, 'return');
5862
+ if (!innerResult) {
5863
+ if (kind === 'throw') throw value;
5864
+ return value;
5865
+ }
5866
+ innerResult = call$4(innerResult, iterator);
5867
+ } catch (error) {
5868
+ innerError = true;
5869
+ innerResult = error;
5870
+ }
5871
+ if (kind === 'throw') throw value;
5872
+ if (innerError) throw innerResult;
5873
+ anObject$3(innerResult);
5874
+ return value;
5875
+ };
5876
+
5877
+ var bind$3 = functionBindContext;
5878
+ var call$3 = functionCall;
5879
+ var anObject$2 = anObject$f;
5880
+ var tryToString$1 = tryToString$4;
5881
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
5882
+ var lengthOfArrayLike$1 = lengthOfArrayLike$5;
5883
+ var isPrototypeOf$1 = objectIsPrototypeOf;
5884
+ var getIterator = getIterator$1;
5885
+ var getIteratorMethod = getIteratorMethod$2;
5886
+ var iteratorClose = iteratorClose$1;
5887
+
5888
+ var $TypeError$5 = TypeError;
5889
+
5890
+ var Result = function (stopped, result) {
5891
+ this.stopped = stopped;
5892
+ this.result = result;
5893
+ };
5894
+
5895
+ var ResultPrototype = Result.prototype;
5896
+
5897
+ var iterate$3 = function (iterable, unboundFunction, options) {
5898
+ var that = options && options.that;
5899
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
5900
+ var IS_RECORD = !!(options && options.IS_RECORD);
5901
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
5902
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
5903
+ var fn = bind$3(unboundFunction, that);
5904
+ var iterator, iterFn, index, length, result, next, step;
5905
+
5906
+ var stop = function (condition) {
5907
+ if (iterator) iteratorClose(iterator, 'normal', condition);
5908
+ return new Result(true, condition);
5909
+ };
5910
+
5911
+ var callFn = function (value) {
5912
+ if (AS_ENTRIES) {
5913
+ anObject$2(value);
5914
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
5915
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
5916
+ };
5917
+
5918
+ if (IS_RECORD) {
5919
+ iterator = iterable.iterator;
5920
+ } else if (IS_ITERATOR) {
5921
+ iterator = iterable;
5922
+ } else {
5923
+ iterFn = getIteratorMethod(iterable);
5924
+ if (!iterFn) throw new $TypeError$5(tryToString$1(iterable) + ' is not iterable');
5925
+ // optimisation for array iterators
5926
+ if (isArrayIteratorMethod(iterFn)) {
5927
+ for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
5928
+ result = callFn(iterable[index]);
5929
+ if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
5930
+ } return new Result(false);
5931
+ }
5932
+ iterator = getIterator(iterable, iterFn);
5933
+ }
5934
+
5935
+ next = IS_RECORD ? iterable.next : iterator.next;
5936
+ while (!(step = call$3(next, iterator)).done) {
5937
+ try {
5938
+ result = callFn(step.value);
5939
+ } catch (error) {
5940
+ iteratorClose(iterator, 'throw', error);
5941
+ }
5942
+ if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
5943
+ } return new Result(false);
5944
+ };
5945
+
5946
+ var DESCRIPTORS$1 = descriptors;
5947
+ var definePropertyModule = objectDefineProperty;
5948
+ var createPropertyDescriptor = createPropertyDescriptor$5;
5949
+
5950
+ var createProperty$1 = function (object, key, value) {
5951
+ if (DESCRIPTORS$1) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
5952
+ else object[key] = value;
5953
+ };
5954
+
5955
+ var $$9 = _export;
5956
+ var iterate$2 = iterate$3;
5957
+ var createProperty = createProperty$1;
5958
+
5959
+ // `Object.fromEntries` method
5960
+ // https://github.com/tc39/proposal-object-from-entries
5961
+ $$9({ target: 'Object', stat: true }, {
5962
+ fromEntries: function fromEntries(iterable) {
5963
+ var obj = {};
5964
+ iterate$2(iterable, function (k, v) {
5965
+ createProperty(obj, k, v);
5966
+ }, { AS_ENTRIES: true });
5967
+ return obj;
5968
+ }
5820
5969
  });
5821
5970
 
5822
5971
  let _$2 = t => t,
@@ -5831,82 +5980,234 @@ let _$2 = t => t,
5831
5980
  _t9,
5832
5981
  _t10,
5833
5982
  _t11,
5834
- _t12;
5983
+ _t12,
5984
+ _t13;
5835
5985
  const DeleteDialogContent = styled.div(_t$2 || (_t$2 = _$2`
5836
5986
  margin-bottom: var(--goa-space-m);
5837
5987
  `));
5838
- const ToolBarHeader = styled.div(_t2$1 || (_t2$1 = _$2`
5988
+ const NonEmptyCellStyle = styled.div(_t2$1 || (_t2$1 = _$2`
5989
+ goa-table thead th {
5990
+ background-color: #000:
5991
+ }
5992
+ `));
5993
+ const ToolBarHeader = styled.div(_t3 || (_t3 = _$2`
5839
5994
  margin-bottom: var(--goa-space-l);
5840
5995
  `));
5841
- const ObjectArrayTitle = styled.h2(_t3 || (_t3 = _$2`
5996
+ const ObjectArrayTitle = styled.h2(_t4 || (_t4 = _$2`
5842
5997
  margin-bottom: var(--goa-space-l);
5843
5998
  `));
5844
- const TextCenter = styled.div(_t4 || (_t4 = _$2`
5999
+ const TextCenter = styled.div(_t5 || (_t5 = _$2`
5845
6000
  text-align: center;
5846
6001
  `));
5847
- const SideMenuItem = styled.div(_t5 || (_t5 = _$2`
6002
+ const SideMenuItem = styled.div(_t6 || (_t6 = _$2`
5848
6003
  &:hover {
5849
6004
  background: #f1f1f1;
5850
6005
  }
5851
6006
  `));
5852
- const RowFlex = styled.div(_t6 || (_t6 = _$2`
6007
+ const RowFlex = styled.div(_t7 || (_t7 = _$2`
5853
6008
  display: flex;
5854
6009
  align-items: stretch;
5855
6010
  `));
5856
- const RowFlexMenu = styled.div(_t7 || (_t7 = _$2`
6011
+ const RowFlexMenu = styled.div(_t8 || (_t8 = _$2`
5857
6012
  display: flex;
5858
6013
  flex-direction: row;
5859
6014
  border-bottom: 1px solid #dcdcdc;
5860
6015
  `));
5861
- const FlexTabs = styled.div(_t8 || (_t8 = _$2`
6016
+ const FlexTabs = styled.div(_t9 || (_t9 = _$2`
5862
6017
  flex-direction: column;
5863
6018
  flex: 1;
5864
6019
  overflow-y: auto !important;
5865
6020
  margin-right: 1.5rem;
5866
6021
  `));
5867
- const FlexForm = styled.div(_t9 || (_t9 = _$2`
6022
+ const FlexForm = styled.div(_t10 || (_t10 = _$2`
5868
6023
  flex-direction: column;
5869
6024
  margin: 1.5rem 0;
5870
6025
  flex: 3;
5871
6026
  `));
5872
- const TabName = styled.div(_t10 || (_t10 = _$2`
6027
+ const TabName = styled.div(_t11 || (_t11 = _$2`
5873
6028
  margin: 1rem 0 1rem 1rem;
5874
6029
  font-weight: 700;
5875
6030
  `));
5876
- const Trash = styled.div(_t11 || (_t11 = _$2`
6031
+ const Trash = styled.div(_t12 || (_t12 = _$2`
5877
6032
  margin: 0.75rem 1.25rem 0.75rem 0.75rem;
5878
6033
  margin-left: auto;
5879
6034
  `));
5880
- const ListContainer = styled.div(_t12 || (_t12 = _$2`
6035
+ const ListContainer = styled.div(_t13 || (_t13 = _$2`
5881
6036
  padding: 0 1.5rem 0 0;
5882
6037
  border: 1px solid #dcdcdc;
5883
6038
  `));
5884
6039
 
5885
- // eslint-disable-next-line
5886
- const extractScopesFromUISchema$1 = uischema => {
5887
- var _a;
5888
- const scopes = [];
5889
- if (uischema === null || uischema === void 0 ? void 0 : uischema.elements) {
5890
- // eslint-disable-next-line
5891
- (_a = uischema === null || uischema === void 0 ? void 0 : uischema.elements) === null || _a === void 0 ? void 0 : _a.forEach(element => {
5892
- var _a;
5893
- if (element === null || element === void 0 ? void 0 : element.elements) {
5894
- // eslint-disable-next-line
5895
- (_a = element === null || element === void 0 ? void 0 : element.elements) === null || _a === void 0 ? void 0 : _a.forEach(internalElement => {
5896
- if (internalElement === null || internalElement === void 0 ? void 0 : internalElement.scope) {
5897
- scopes.push(internalElement === null || internalElement === void 0 ? void 0 : internalElement.scope);
5898
- }
5899
- });
5900
- } else {
5901
- if (element === null || element === void 0 ? void 0 : element.scope) {
5902
- scopes.push(element === null || element === void 0 ? void 0 : element.scope);
5903
- }
5904
- }
6040
+ const DeleteDialog = /*#__PURE__*/React.memo(function DeleteDialog({
6041
+ open,
6042
+ onConfirm,
6043
+ onCancel,
6044
+ title,
6045
+ message
6046
+ }) {
6047
+ return jsxs(GoAModal, {
6048
+ open: open,
6049
+ testId: "object-array-modal",
6050
+ heading: title,
6051
+ children: [jsx(DeleteDialogContent, {
6052
+ "data-testid": "object-array-modal-content",
6053
+ children: message
6054
+ }), jsxs(GoAButtonGroup, {
6055
+ alignment: "end",
6056
+ children: [jsx(GoAButton, {
6057
+ type: "secondary",
6058
+ testId: "object-array-modal-button",
6059
+ onClick: () => {
6060
+ onCancel();
6061
+ },
6062
+ children: "Cancel"
6063
+ }), jsx(GoAButton, {
6064
+ type: "primary",
6065
+ variant: "destructive",
6066
+ testId: "object-array-confirm-button",
6067
+ onClick: () => {
6068
+ onConfirm();
6069
+ },
6070
+ children: "Delete"
6071
+ })]
6072
+ })]
6073
+ }, 1);
6074
+ });
6075
+
6076
+ const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
6077
+ label,
6078
+ path,
6079
+ addItem,
6080
+ schema,
6081
+ enabled,
6082
+ translations,
6083
+ rootSchema,
6084
+ uischema
6085
+ }) {
6086
+ var _a, _b, _c, _d;
6087
+ const buttonPosition = ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.addButtonPosition) || 'left';
6088
+ const arrayLabel = getLabelText(uischema.scope, label);
6089
+ return jsx(Fragment, {
6090
+ children: jsx("div", {
6091
+ style: {
6092
+ textAlign: buttonPosition
6093
+ },
6094
+ children: jsx(GoAButton, {
6095
+ disabled: !enabled,
6096
+ testId: `object-array-toolbar-${label}`,
6097
+ "aria-label": translations.addAriaLabel,
6098
+ onClick: addItem(path, createDefaultValue(schema, rootSchema)),
6099
+ type: (_c = (_b = uischema.options) === null || _b === void 0 ? void 0 : _b.addButtonType) !== null && _c !== void 0 ? _c : 'primary',
6100
+ children: ((_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.addButtonText) || capitalizeFirstLetter(`Add ${arrayLabel}`)
6101
+ })
6102
+ })
6103
+ });
6104
+ });
6105
+
6106
+ const ADD_DATA_ACTION = 'jsonforms/register/add_data_action';
6107
+ const SET_DATA_ACTION = 'jsonforms/register/set_data_action';
6108
+ const INCREMENT_ACTION = 'jsonforms/register/increment_action';
6109
+ const DELETE_ACTION = 'jsonforms/register/delete_action';
6110
+ const initialState = {
6111
+ categories: {}
6112
+ };
6113
+
6114
+ function objectListReducer(state, action) {
6115
+ switch (action.type) {
6116
+ case ADD_DATA_ACTION:
6117
+ {
6118
+ //ok so we're assuming we're already getting the updated category data
6119
+ const {
6120
+ categories
6121
+ } = state;
6122
+ const {
6123
+ name,
6124
+ category
6125
+ } = action.payload;
6126
+ const newCategories = Object.assign({}, categories);
6127
+ newCategories[name].data = category;
6128
+ return Object.assign(Object.assign({}, state), {
6129
+ categories: newCategories
6130
+ });
6131
+ }
6132
+ case SET_DATA_ACTION:
6133
+ {
6134
+ const CategoriesStateData = action.payload;
6135
+ return Object.assign(Object.assign({}, state), {
6136
+ categories: CategoriesStateData
6137
+ });
6138
+ }
6139
+ case INCREMENT_ACTION:
6140
+ {
6141
+ const {
6142
+ categories
6143
+ } = state;
6144
+ const name = action.payload;
6145
+ const newCategories = Object.assign({}, categories);
6146
+ // Assuming you want to increment the count of a category:
6147
+ if (newCategories[name]) {
6148
+ const updatedCategory = Object.assign(Object.assign({}, categories[name]), {
6149
+ count: (categories[name].count || 0) + 1
6150
+ });
6151
+ return Object.assign(Object.assign({}, state), {
6152
+ categories: Object.assign(Object.assign({}, categories), {
6153
+ [name]: updatedCategory
6154
+ })
6155
+ });
6156
+ } else {
6157
+ newCategories[name] = {
6158
+ count: 1,
6159
+ data: {}
6160
+ };
6161
+ }
6162
+ return Object.assign(Object.assign({}, state), {
6163
+ categories: newCategories
6164
+ });
6165
+ }
6166
+ case DELETE_ACTION:
6167
+ {
6168
+ const {
6169
+ name,
6170
+ category
6171
+ } = action.payload;
6172
+ const {
6173
+ categories
6174
+ } = state;
6175
+ const newCategories = Object.assign({}, categories);
6176
+ newCategories[name] = category;
6177
+ return Object.assign(Object.assign({}, state), {
6178
+ categories: newCategories
6179
+ });
6180
+ }
6181
+ default:
6182
+ return state;
6183
+ }
6184
+ }
6185
+
6186
+ // eslint-disable-next-line
6187
+ const extractScopesFromUISchema$1 = uischema => {
6188
+ var _a;
6189
+ const scopes = [];
6190
+ if (uischema === null || uischema === void 0 ? void 0 : uischema.elements) {
6191
+ // eslint-disable-next-line
6192
+ (_a = uischema === null || uischema === void 0 ? void 0 : uischema.elements) === null || _a === void 0 ? void 0 : _a.forEach(element => {
6193
+ var _a;
6194
+ if (element === null || element === void 0 ? void 0 : element.elements) {
6195
+ // eslint-disable-next-line
6196
+ (_a = element === null || element === void 0 ? void 0 : element.elements) === null || _a === void 0 ? void 0 : _a.forEach(internalElement => {
6197
+ if (internalElement === null || internalElement === void 0 ? void 0 : internalElement.scope) {
6198
+ scopes.push(internalElement === null || internalElement === void 0 ? void 0 : internalElement.scope);
6199
+ }
6200
+ });
6201
+ } else {
6202
+ if (element === null || element === void 0 ? void 0 : element.scope) {
6203
+ scopes.push(element === null || element === void 0 ? void 0 : element.scope);
6204
+ }
6205
+ }
5905
6206
  });
5906
6207
  }
5907
6208
  return scopes;
5908
6209
  };
5909
- const GenerateRows$1 = (Cell, schema, rowPath, enabled, cells, uischema, isInReview) => {
6210
+ const GenerateRows$1 = (Cell, schema, rowPath, enabled, openDeleteDialog, handleChange, cells, uischema, isInReview, count, data) => {
5910
6211
  if (schema.type === 'object') {
5911
6212
  const props = {
5912
6213
  schema,
@@ -5914,19 +6215,34 @@ const GenerateRows$1 = (Cell, schema, rowPath, enabled, cells, uischema, isInRev
5914
6215
  enabled,
5915
6216
  cells,
5916
6217
  uischema,
5917
- isInReview
6218
+ isInReview,
6219
+ openDeleteDialog,
6220
+ data,
6221
+ handleChange
5918
6222
  };
5919
- return jsx(Cell, Object.assign({}, props));
6223
+ return jsxs("div", {
6224
+ style: {
6225
+ display: 'flex',
6226
+ flexDirection: 'column'
6227
+ },
6228
+ children: [jsx(Cell, Object.assign({}, props, {
6229
+ count: count || 0
6230
+ })), "d"]
6231
+ });
5920
6232
  } else {
5921
- // primitives
5922
6233
  const props = {
5923
6234
  schema,
5924
6235
  rowPath,
5925
6236
  cellPath: rowPath,
5926
6237
  enabled,
5927
- isInReview
6238
+ isInReview,
6239
+ openDeleteDialog,
6240
+ handleChange,
6241
+ data
5928
6242
  };
5929
- return jsx(Cell, Object.assign({}, props), rowPath);
6243
+ return jsx(Cell, Object.assign({}, props, {
6244
+ count: count || 0
6245
+ }), rowPath);
5930
6246
  }
5931
6247
  };
5932
6248
  const getValidColumnProps$1 = scopedSchema => {
@@ -5952,7 +6268,6 @@ const EmptyList$1 = ({
5952
6268
  });
5953
6269
  const ctxToNonEmptyCellProps$1 = (ctx, ownProps) => {
5954
6270
  var _a;
5955
- ownProps.rowPath + (ownProps.schema.type === 'object' ? '.' + ownProps.propName : '');
5956
6271
  const errors = '';
5957
6272
  return {
5958
6273
  uischema: ownProps.uischema,
@@ -5962,21 +6277,24 @@ const ctxToNonEmptyCellProps$1 = (ctx, ownProps) => {
5962
6277
  errors,
5963
6278
  enabled: ownProps.enabled,
5964
6279
  cells: ownProps.cells || ctx.cells,
5965
- renderers: ownProps.renderers || ctx.renderers
6280
+ renderers: ownProps.renderers || ctx.renderers,
6281
+ handleChange: ownProps.handleChange
5966
6282
  };
5967
6283
  };
5968
6284
  const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellComponent(props) {
5969
- var _a, _b;
6285
+ var _a;
5970
6286
  const {
5971
6287
  schema,
5972
- errors,
5973
6288
  enabled,
5974
6289
  renderers,
5975
6290
  cells,
5976
6291
  rowPath,
5977
- isValid,
5978
6292
  uischema,
5979
- isInReview
6293
+ isInReview,
6294
+ data,
6295
+ count,
6296
+ openDeleteDialog,
6297
+ handleChange
5980
6298
  } = props;
5981
6299
  const propNames = getValidColumnProps$1(schema);
5982
6300
  const propScopes = (uischema === null || uischema === void 0 ? void 0 : uischema.scope) ? propNames.map(name => {
@@ -5993,7 +6311,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
5993
6311
  */
5994
6312
  const getFirstLayoutType = () => {
5995
6313
  var _a, _b, _c, _d, _e, _f, _g, _h;
5996
- let defaultType = 'VerticalLayout';
6314
+ let defaultType = 'HorizontalLayout';
5997
6315
  if ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.defaultType) return (_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.defaultType;
5998
6316
  if (((_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.detail) && ((_f = (_e = (_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.detail) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.length) > 0) {
5999
6317
  defaultType = (_h = (_g = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _g === void 0 ? void 0 : _g.detail) === null || _h === void 0 ? void 0 : _h.elements.at(0).type;
@@ -6003,7 +6321,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
6003
6321
  /* Create default elements for scope not defined in the uischema
6004
6322
  * future work: merge the options
6005
6323
  */
6006
- const uiSchemaElementsForNotDefined = {
6324
+ ({
6007
6325
  type: getFirstLayoutType(),
6008
6326
  elements: scopesNotInElements.map(scope => {
6009
6327
  return {
@@ -6014,8 +6332,10 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
6014
6332
  }
6015
6333
  };
6016
6334
  })
6017
- };
6018
- return jsxs(Fragment, {
6335
+ });
6336
+ const properties = (schema === null || schema === void 0 ? void 0 : schema.items) && 'properties' in schema.items && schema.items.properties || {};
6337
+ const title = rowPath.split('.')[0];
6338
+ return jsxs(NonEmptyCellStyle, {
6019
6339
  children: [
6020
6340
  // eslint-disable-next-line
6021
6341
  (_a = uischema === null || uischema === void 0 ? void 0 : uischema.elements) === null || _a === void 0 ? void 0 : _a.map(element => {
@@ -6028,47 +6348,99 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
6028
6348
  renderers: isInReview ? GoAReviewRenderers : renderers,
6029
6349
  cells: cells
6030
6350
  }, rowPath);
6031
- }), ((_b = uiSchemaElementsForNotDefined === null || uiSchemaElementsForNotDefined === void 0 ? void 0 : uiSchemaElementsForNotDefined.elements) === null || _b === void 0 ? void 0 : _b.length) > 0 && jsx(JsonFormsDispatch, {
6032
- schema: schema,
6033
- uischema: uiSchemaElementsForNotDefined,
6034
- path: rowPath,
6035
- enabled: enabled,
6036
- renderers: isInReview ? GoAReviewRenderers : renderers,
6037
- cells: cells
6351
+ }), Object.keys(properties).length > 0 && jsxs(GoATable, {
6352
+ width: "100%",
6353
+ children: [jsx("thead", {
6354
+ children: jsxs("tr", {
6355
+ children: [Object.keys(properties).map((key, index) => {
6356
+ return jsx("th", {
6357
+ children: jsx("p", {
6358
+ children: key
6359
+ })
6360
+ }, index);
6361
+ }), isInReview !== true && jsx("th", {
6362
+ children: jsx("p", {
6363
+ children: "Actions"
6364
+ })
6365
+ })]
6366
+ }, 0)
6367
+ }), jsx("tbody", {
6368
+ children: range(count || 0).map((num, i) => {
6369
+ return jsxs("tr", {
6370
+ children: [Object.keys(properties).map((element, ix) => {
6371
+ const dataObject = properties[element];
6372
+ const schemaName = element;
6373
+ return jsx("td", {
6374
+ children: isInReview ? jsx("div", {
6375
+ "data-testid": `#/properties/${schemaName}-input-${i}-review`,
6376
+ children: data && data[num] ? data[num][element] : ''
6377
+ }) : jsx("div", {
6378
+ children: jsx(GoAInput, {
6379
+ type: dataObject.type === 'number' ? 'number' : 'text',
6380
+ id: schemaName,
6381
+ name: schemaName,
6382
+ value: data && data[num] ? data[num][element] : '',
6383
+ testId: `#/properties/${schemaName}-input-${i}`,
6384
+ onChange: (name, value) => {
6385
+ handleChange(title, {
6386
+ [num]: {
6387
+ [name]: value
6388
+ }
6389
+ });
6390
+ },
6391
+ "aria-label": schemaName,
6392
+ width: "100%"
6393
+ })
6394
+ })
6395
+ }, ix);
6396
+ }), jsx("td", {
6397
+ children: isInReview !== true && jsx(GoAIconButton, {
6398
+ icon: "trash",
6399
+ "aria-label": `remove-element-${num}`,
6400
+ onClick: () => openDeleteDialog(num)
6401
+ })
6402
+ })]
6403
+ }, i);
6404
+ })
6405
+ })]
6038
6406
  })]
6039
6407
  });
6040
6408
  });
6041
6409
  const NonEmptyCell$1 = ownProps => {
6410
+ const data = ownProps.data || {};
6042
6411
  const ctx = useJsonForms();
6043
- const emptyCellProps = ctxToNonEmptyCellProps$1(ctx, ownProps);
6412
+ const emptyCellProps = ctxToNonEmptyCellProps$1(ctx, Object.assign(Object.assign({}, ownProps), {
6413
+ data
6414
+ }));
6044
6415
  const isValid = isEmpty$1(emptyCellProps.errors);
6045
6416
  return jsx(NonEmptyCellComponent$1, Object.assign({}, emptyCellProps, {
6417
+ handleChange: ownProps === null || ownProps === void 0 ? void 0 : ownProps.handleChange,
6046
6418
  isInReview: ownProps === null || ownProps === void 0 ? void 0 : ownProps.isInReview,
6047
- isValid: isValid
6419
+ isValid: isValid,
6420
+ openDeleteDialog: ownProps === null || ownProps === void 0 ? void 0 : ownProps.openDeleteDialog,
6421
+ data: data,
6422
+ count: ownProps === null || ownProps === void 0 ? void 0 : ownProps.count
6048
6423
  }));
6049
6424
  };
6050
6425
  const NonEmptyRowComponent$1 = ({
6051
6426
  childPath,
6052
6427
  schema,
6053
- rowIndex,
6054
6428
  openDeleteDialog,
6055
6429
  enabled,
6056
6430
  cells,
6057
- path,
6058
- translations,
6059
6431
  uischema,
6060
- isInReview
6432
+ isInReview,
6433
+ data,
6434
+ count,
6435
+ handleChange
6061
6436
  }) => {
6062
6437
  return jsx("div", {
6063
- children: enabled ? jsxs(GoAContainer, {
6064
- children: [isInReview !== true && jsx(GoAGrid, {
6065
- minChildWidth: "30ch",
6066
- children: jsx(GoAIconButton, {
6067
- icon: "trash",
6068
- "aria-label": translations.removeAriaLabel,
6069
- onClick: () => openDeleteDialog(childPath, rowIndex)
6438
+ children: enabled ? jsx(GoAContainer, {
6439
+ children: jsx("div", {
6440
+ children: jsx("div", {
6441
+ children: GenerateRows$1(NonEmptyCell$1, schema, childPath, enabled, openDeleteDialog, handleChange, cells, uischema, isInReview, count, data)
6070
6442
  })
6071
- }), GenerateRows$1(NonEmptyCell$1, schema, childPath, enabled, cells, uischema, isInReview)]
6443
+ })
6072
6444
  }) : null
6073
6445
  }, childPath);
6074
6446
  };
@@ -6083,9 +6455,11 @@ const ObjectArrayList$1 = ({
6083
6455
  enabled,
6084
6456
  cells,
6085
6457
  translations,
6086
- isInReview
6458
+ count,
6459
+ isInReview,
6460
+ handleChange
6087
6461
  }) => {
6088
- const isEmptyList = data === 0;
6462
+ const isEmptyList = count === 0;
6089
6463
  if (isEmptyList) {
6090
6464
  return jsx(EmptyList$1, {
6091
6465
  numColumns: getValidColumnProps$1(schema).length + 1,
@@ -6093,182 +6467,230 @@ const ObjectArrayList$1 = ({
6093
6467
  });
6094
6468
  }
6095
6469
  const appliedUiSchemaOptions = merge({}, config, uischema.options);
6096
- return jsx(Fragment, {
6097
- children: range(data).map(index => {
6098
- const childPath = Paths.compose(path, `${index}`);
6099
- return jsx(NonEmptyList$1, {
6100
- childPath: childPath,
6101
- rowIndex: index,
6102
- schema: schema,
6103
- openDeleteDialog: openDeleteDialog,
6104
- showSortButtons: appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayTableSortButtons,
6105
- enabled: enabled,
6106
- cells: cells,
6107
- path: path,
6108
- uischema: uischema,
6109
- translations: translations,
6110
- isInReview: isInReview
6111
- }, childPath);
6112
- })
6113
- });
6470
+ const childPath = Paths.compose(path, `${0}`);
6471
+ return jsx(NonEmptyList$1, {
6472
+ childPath: childPath,
6473
+ rowIndex: 0,
6474
+ schema: schema,
6475
+ openDeleteDialog: openDeleteDialog,
6476
+ showSortButtons: appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayTableSortButtons,
6477
+ enabled: enabled,
6478
+ handleChange: handleChange,
6479
+ cells: cells,
6480
+ path: path,
6481
+ uischema: uischema,
6482
+ translations: translations,
6483
+ isInReview: isInReview,
6484
+ count: count,
6485
+ data: data
6486
+ }, 0);
6114
6487
  };
6115
6488
  // eslint-disable-next-line
6116
- class ObjectArrayControl extends React.Component {
6117
- constructor() {
6118
- super(...arguments);
6119
- // eslint-disable-next-line
6120
- this.addItem = (path, value) => this.props.addItem(path, value);
6121
- }
6122
- render() {
6123
- var _a;
6124
- const _b = this.props,
6125
- {
6126
- label,
6127
- path,
6128
- schema,
6129
- rootSchema,
6130
- uischema,
6131
- errors,
6132
- openDeleteDialog,
6133
- visible,
6134
- enabled,
6135
- cells,
6136
- translations,
6137
- data,
6138
- config,
6139
- isStepperReview
6140
- } = _b,
6141
- additionalProps = __rest(_b, ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "translations", "data", "config", "isStepperReview"]);
6142
- const controlElement = uischema;
6143
- // eslint-disable-next-line
6144
- const listTitle = label || ((_a = uischema.options) === null || _a === void 0 ? void 0 : _a.title);
6145
- const isInReview = isStepperReview === true;
6146
- return jsxs(Visible, {
6147
- visible: visible,
6148
- "data-testid": "jsonforms-object-list-wrapper",
6149
- children: [jsxs(ToolBarHeader, {
6150
- children: [isInReview && listTitle && jsx("b", {
6151
- children: listTitle
6152
- }), !isInReview && listTitle && jsx(ObjectArrayTitle, {
6153
- children: listTitle
6154
- }), !isInReview && jsx(ObjectArrayToolBar, {
6155
- errors: errors,
6156
- label: label,
6157
- addItem: this.addItem,
6158
- numColumns: 0,
6159
- path: path,
6160
- uischema: controlElement,
6161
- schema: schema,
6162
- rootSchema: rootSchema,
6163
- enabled: enabled,
6164
- translations: translations
6165
- })]
6166
- }), jsx("div", {
6167
- children: jsx(ObjectArrayList$1, Object.assign({
6168
- path: path,
6169
- schema: schema,
6170
- uischema: uischema,
6171
- enabled: enabled,
6172
- openDeleteDialog: openDeleteDialog,
6173
- translations: translations,
6174
- data: data,
6175
- cells: cells,
6176
- config: config,
6177
- isInReview: isInReview
6178
- }, additionalProps))
6179
- })]
6180
- });
6181
- }
6182
- }
6183
-
6184
- const DeleteDialog = /*#__PURE__*/React.memo(function DeleteDialog({
6185
- open,
6186
- onConfirm,
6187
- onCancel,
6188
- title,
6189
- message
6190
- }) {
6191
- return jsxs(GoAModal, {
6192
- open: open,
6193
- testId: "object-array-modal",
6194
- heading: title,
6195
- children: [jsx(DeleteDialogContent, {
6196
- "data-testid": "object-array-modal-content",
6197
- children: message
6198
- }), jsxs(GoAButtonGroup, {
6199
- alignment: "end",
6200
- children: [jsx(GoAButton, {
6201
- type: "secondary",
6202
- testId: "object-array-modal-button",
6203
- onClick: () => {
6204
- onCancel();
6205
- },
6206
- children: "Cancel"
6207
- }), jsx(GoAButton, {
6208
- type: "primary",
6209
- variant: "destructive",
6210
- testId: "object-array-confirm-button",
6211
- onClick: () => {
6212
- onConfirm();
6213
- },
6214
- children: "Delete"
6215
- })]
6216
- })]
6217
- }, 1);
6218
- });
6219
-
6220
- const ArrayControl = props => {
6489
+ const ObjectArrayControl = props => {
6490
+ var _a, _b, _c;
6491
+ const [registers, dispatch] = useReducer(objectListReducer, initialState);
6221
6492
  const [open, setOpen] = useState(false);
6222
- const [path, setPath] = useState();
6223
6493
  const [rowData, setRowData] = useState(0);
6224
6494
  const {
6225
- removeItems,
6226
- visible
6227
- } = props;
6228
- const openDeleteDialog = useCallback((p, rowIndex) => {
6495
+ label,
6496
+ path,
6497
+ schema,
6498
+ rootSchema,
6499
+ uischema,
6500
+ errors,
6501
+ visible,
6502
+ enabled,
6503
+ cells,
6504
+ translations,
6505
+ data,
6506
+ config,
6507
+ isStepperReview,
6508
+ handleChange,
6509
+ removeItems
6510
+ } = props,
6511
+ additionalProps = __rest(props, ["label", "path", "schema", "rootSchema", "uischema", "errors", "visible", "enabled", "cells", "translations", "data", "config", "isStepperReview", "handleChange", "removeItems"]);
6512
+ const parsedData = data;
6513
+ const openDeleteDialog = useCallback((rowIndex, name) => {
6229
6514
  setOpen(true);
6230
- setPath(p);
6231
6515
  setRowData(rowIndex);
6232
- }, [setOpen, setPath, setRowData]);
6516
+ }, [setOpen, setRowData]);
6233
6517
  const deleteCancel = useCallback(() => setOpen(false), [setOpen]);
6234
- // eslint-disable-next-line
6235
- const deleteConfirm = useCallback(() => {
6236
- const p = path === null || path === void 0 ? void 0 : path.substring(0, path.lastIndexOf('.'));
6237
- if (removeItems && p) {
6238
- removeItems(p, [rowData])();
6518
+ const deleteConfirm = () => {
6519
+ if (deleteItem && path) {
6520
+ deleteItem(path, rowData);
6239
6521
  }
6240
6522
  setOpen(false);
6523
+ };
6524
+ // eslint-disable-next-line
6525
+ const addItem = (path, value) => {
6526
+ dispatch({
6527
+ type: INCREMENT_ACTION,
6528
+ payload: path
6529
+ });
6530
+ return () => props.addItem(path, value);
6531
+ };
6532
+ // eslint-disable-next-line
6533
+ const deleteItem = (path, value) => {
6534
+ const categories = registers.categories;
6535
+ const currentCategory = categories[path];
6536
+ const newCategoryData = {};
6537
+ if (currentCategory === null || currentCategory === void 0 ? void 0 : currentCategory.data) {
6538
+ delete currentCategory.data[value];
6539
+ Object.keys(currentCategory.data).forEach((key, index) => {
6540
+ newCategoryData[index] = currentCategory.data[key];
6541
+ });
6542
+ currentCategory.data = newCategoryData;
6543
+ }
6544
+ if ((currentCategory === null || currentCategory === void 0 ? void 0 : currentCategory.count) > 0) currentCategory.count--;
6545
+ const handleChangeData = Object.keys(newCategoryData).map(key => {
6546
+ return newCategoryData[key];
6547
+ });
6548
+ props.handleChange(path, handleChangeData);
6549
+ dispatch({
6550
+ type: DELETE_ACTION,
6551
+ payload: {
6552
+ name: path,
6553
+ category: currentCategory
6554
+ }
6555
+ });
6556
+ };
6557
+ const handleChangeWithData = (name, value) => {
6558
+ const categories = registers.categories;
6559
+ const currentCategory = categories[name].data;
6560
+ const newData = {};
6561
+ const allKeys = Object.keys(value).concat(Object.keys(currentCategory));
6562
+ const allKeysUnique = allKeys.filter((a, b) => allKeys.indexOf(a) === b);
6563
+ Object.keys(allKeysUnique).forEach(num => {
6564
+ if (!newData[num]) {
6565
+ newData[num] = {};
6566
+ }
6567
+ currentCategory[num] && Object.keys(currentCategory[num]).forEach(name => {
6568
+ newData[num][name] = currentCategory[num][name];
6569
+ });
6570
+ value[num] && Object.keys(value[num]).forEach(name => {
6571
+ newData[num][name] = value[num][name] || currentCategory[num] && currentCategory[num][name];
6572
+ });
6573
+ });
6574
+ const handleChangeData = Object.keys(newData).map(key => {
6575
+ return newData[key];
6576
+ });
6577
+ props.handleChange(name, handleChangeData);
6578
+ dispatch({
6579
+ type: ADD_DATA_ACTION,
6580
+ payload: {
6581
+ name,
6582
+ category: newData
6583
+ }
6584
+ });
6585
+ };
6586
+ useEffect(() => {
6241
6587
  // eslint-disable-next-line
6242
- }, [setOpen, path, rowData]);
6588
+ const updatedData = Object.fromEntries((parsedData || []).map((item, index) => [index, item]));
6589
+ const count = Object.keys(updatedData).length;
6590
+ const dispatchData = {
6591
+ [path]: {
6592
+ count: count,
6593
+ data: updatedData
6594
+ }
6595
+ };
6596
+ if (Object.keys(updatedData).length > 0) {
6597
+ dispatch({
6598
+ type: SET_DATA_ACTION,
6599
+ payload: dispatchData
6600
+ });
6601
+ }
6602
+ }, []);
6603
+ const title = path.split('.')[0];
6604
+ const controlElement = uischema;
6605
+ // eslint-disable-next-line
6606
+ const listTitle = label || ((_a = uischema.options) === null || _a === void 0 ? void 0 : _a.title);
6607
+ const isInReview = isStepperReview === true;
6243
6608
  return jsxs(Visible, {
6244
6609
  visible: visible,
6245
- children: [jsx(ObjectArrayControl, Object.assign({}, props, {
6246
- openDeleteDialog: openDeleteDialog
6247
- })), jsx(DeleteDialog, {
6248
- open: open,
6249
- onCancel: deleteCancel,
6250
- onConfirm: deleteConfirm,
6251
- title: props.translations.deleteDialogTitle || '',
6252
- message: props.translations.deleteDialogMessage || ''
6610
+ "data-testid": "jsonforms-object-list-wrapper",
6611
+ children: [jsxs(ToolBarHeader, {
6612
+ children: [isInReview && listTitle && jsx("b", {
6613
+ children: listTitle
6614
+ }), !isInReview && listTitle && jsx(ObjectArrayTitle, {
6615
+ children: listTitle
6616
+ }), !isInReview && jsx(ObjectArrayToolBar, {
6617
+ errors: errors,
6618
+ label: label,
6619
+ addItem: (a, b) => () => addItem(a, b),
6620
+ numColumns: 0,
6621
+ path: path,
6622
+ uischema: controlElement,
6623
+ schema: schema,
6624
+ rootSchema: rootSchema,
6625
+ enabled: enabled,
6626
+ translations: translations
6627
+ })]
6628
+ }), jsxs("div", {
6629
+ children: [jsx(ObjectArrayList$1, Object.assign({
6630
+ path: path,
6631
+ schema: schema,
6632
+ uischema: uischema,
6633
+ enabled: enabled,
6634
+ openDeleteDialog: openDeleteDialog,
6635
+ translations: translations,
6636
+ count: ((_b = registers.categories[title]) === null || _b === void 0 ? void 0 : _b.count) || Object.keys(data || []).length,
6637
+ data: data || ((_c = registers.categories[title]) === null || _c === void 0 ? void 0 : _c.data),
6638
+ cells: cells,
6639
+ config: config,
6640
+ isInReview: isInReview,
6641
+ handleChange: handleChangeWithData
6642
+ }, additionalProps)), jsx(DeleteDialog, {
6643
+ open: open,
6644
+ onCancel: deleteCancel,
6645
+ onConfirm: deleteConfirm,
6646
+ title: 'Remove item',
6647
+ message: 'Are you sure you wish to remove the selected item'
6648
+ })]
6253
6649
  })]
6254
6650
  });
6255
6651
  };
6256
- const ArrayBaseReviewControl = props => {
6652
+
6653
+ const ArrayControl = props => {
6654
+ const {
6655
+ visible,
6656
+ handleChange
6657
+ } = props;
6658
+ return jsx(Visible, {
6659
+ visible: visible,
6660
+ children: jsx(ObjectArrayControl, Object.assign({}, props, {
6661
+ handleChange: handleChange
6662
+ }))
6663
+ });
6664
+ };
6665
+ const GoAArrayControlTester = rankWith(3, or(isObjectArrayControl, isPrimitiveArrayControl));
6666
+ const ArrayControlBase = props => {
6667
+ const {
6668
+ visible
6669
+ } = props;
6670
+ return jsx(Visible, {
6671
+ visible: visible,
6672
+ children: jsx(ArrayControl, Object.assign({}, props, {
6673
+ addItem: () => () => {},
6674
+ translations: {}
6675
+ }))
6676
+ });
6677
+ };
6678
+ const ArrayControlReview = props => {
6257
6679
  const {
6258
6680
  visible
6259
6681
  } = props;
6260
6682
  return jsx(Visible, {
6261
6683
  visible: visible,
6262
6684
  children: jsx(ObjectArrayControl, Object.assign({}, props, {
6263
- openDeleteDialog: () => {},
6685
+ addItem: () => () => {},
6686
+ translations: {},
6264
6687
  isStepperReview: true,
6265
6688
  enabled: true
6266
6689
  }))
6267
6690
  });
6268
6691
  };
6269
- const GoAArrayControlTester = rankWith(3, or(isObjectArrayControl, isPrimitiveArrayControl));
6270
- const GoAArrayControlRenderer = withJsonFormsArrayLayoutProps(ArrayControl);
6271
- const GoAArrayControlReviewRenderer = withJsonFormsArrayLayoutProps(ArrayBaseReviewControl);
6692
+ const GoAArrayControlRenderer = withJsonFormsControlProps(ArrayControlBase);
6693
+ const GoAArrayControlReviewRenderer = withJsonFormsControlProps(ArrayControlReview);
6272
6694
 
6273
6695
  // eslint-disable-next-line
6274
6696
  const extractScopesFromUISchema = uischema => {
@@ -6726,8 +7148,7 @@ const SearchBox = styled.div(_t$1 || (_t$1 = _$1`
6726
7148
  `));
6727
7149
  const LabelDiv = styled.div(_t2 || (_t2 = _$1`
6728
7150
  font-size: var(--fs-sl);
6729
- font-weight: var(--fw-bold);
6730
- padding-bottom: 0.5rem;
7151
+ padding-bottom: 1.5rem;
6731
7152
  `));
6732
7153
 
6733
7154
  const AddressInputs = ({
@@ -6735,7 +7156,8 @@ const AddressInputs = ({
6735
7156
  handleInputChange,
6736
7157
  isAlbertaAddress,
6737
7158
  errors,
6738
- handleOnBlur
7159
+ handleOnBlur,
7160
+ requiredFields
6739
7161
  }) => {
6740
7162
  var _a, _b;
6741
7163
  const provinces = [{
@@ -6796,18 +7218,20 @@ const AddressInputs = ({
6796
7218
  children: [jsx(GoAFormItem, {
6797
7219
  label: "City",
6798
7220
  error: (_a = errors === null || errors === void 0 ? void 0 : errors['municipality']) !== null && _a !== void 0 ? _a : '',
7221
+ requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('municipality')) ? 'required' : 'optional',
6799
7222
  children: jsx(GoAInput, {
6800
- name: "city",
7223
+ name: "municipality",
6801
7224
  testId: "address-form-city",
6802
7225
  ariaLabel: 'address-form-city',
6803
- value: (address === null || address === void 0 ? void 0 : address.city) || '',
7226
+ value: (address === null || address === void 0 ? void 0 : address.municipality) || '',
6804
7227
  onChange: (name, value) => handleInputChange(name, value),
6805
- onBlur: (name, value) => handleOnBlur('municipality'),
7228
+ onBlur: (name, value) => handleOnBlur(name),
6806
7229
  width: "100%"
6807
7230
  })
6808
7231
  }), jsx(GoAFormItem, {
6809
7232
  label: "Postal Code",
6810
7233
  error: (_b = errors === null || errors === void 0 ? void 0 : errors['postalCode']) !== null && _b !== void 0 ? _b : '',
7234
+ requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('postalCode')) ? 'required' : 'optional',
6811
7235
  children: jsx(GoAInput, {
6812
7236
  name: "postalCode",
6813
7237
  testId: "address-form-postal-code",
@@ -6832,7 +7256,7 @@ const AddressInputs = ({
6832
7256
  name: "province",
6833
7257
  testId: "address-form-province-dropdown",
6834
7258
  ariaLabel: 'address-form-province',
6835
- value: (address === null || address === void 0 ? void 0 : address.province) || '',
7259
+ value: (address === null || address === void 0 ? void 0 : address.subdivisionCode) || '',
6836
7260
  onChange: value => handleInputChange('province', value),
6837
7261
  relative: true,
6838
7262
  width: "25ch",
@@ -6852,18 +7276,8 @@ const AddressInputs = ({
6852
7276
  });
6853
7277
  };
6854
7278
 
6855
- var classofRaw = classofRaw$2;
6856
- var uncurryThis$4 = functionUncurryThis;
6857
-
6858
- var functionUncurryThisClause = function (fn) {
6859
- // Nashorn bug:
6860
- // https://github.com/zloirock/core-js/issues/1128
6861
- // https://github.com/zloirock/core-js/issues/1130
6862
- if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
6863
- };
6864
-
6865
7279
  var $$8 = _export;
6866
- var uncurryThis$3 = functionUncurryThisClause;
7280
+ var uncurryThis$2 = functionUncurryThisClause;
6867
7281
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
6868
7282
  var toLength = toLength$4;
6869
7283
  var toString$1 = toString$d;
@@ -6871,7 +7285,7 @@ var notARegExp = notARegexp;
6871
7285
  var requireObjectCoercible$1 = requireObjectCoercible$a;
6872
7286
  var correctIsRegExpLogic = correctIsRegexpLogic;
6873
7287
 
6874
- var slice = uncurryThis$3(''.slice);
7288
+ var slice = uncurryThis$2(''.slice);
6875
7289
  var min = Math.min;
6876
7290
 
6877
7291
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
@@ -6899,12 +7313,12 @@ $$8({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_RE
6899
7313
  var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
6900
7314
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
6901
7315
 
6902
- var uncurryThis$2 = functionUncurryThis;
7316
+ var uncurryThis$1 = functionUncurryThis;
6903
7317
  var requireObjectCoercible = requireObjectCoercible$a;
6904
7318
  var toString = toString$d;
6905
7319
  var whitespaces$1 = whitespaces$2;
6906
7320
 
6907
- var replace = uncurryThis$2(''.replace);
7321
+ var replace = uncurryThis$1(''.replace);
6908
7322
  var ltrim = RegExp('^[' + whitespaces$1 + ']+');
6909
7323
  var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
6910
7324
 
@@ -6996,15 +7410,15 @@ const mapSuggestionToAddress = suggestion => {
6996
7410
  addressLine1 = suggestion.Text.trim();
6997
7411
  }
6998
7412
  const descriptionParts = suggestion.Description.split(',');
6999
- const city = descriptionParts[0].trim();
7413
+ const municipality = descriptionParts[0].trim();
7000
7414
  const provinceAndPostalCode = descriptionParts[1].trim().split(' ');
7001
- const province = provinceAndPostalCode[0];
7415
+ const subdivisionCode = provinceAndPostalCode[0];
7002
7416
  const postalCode = descriptionParts[2].trim();
7003
7417
  return {
7004
7418
  addressLine1,
7005
7419
  addressLine2,
7006
- city,
7007
- province,
7420
+ municipality,
7421
+ subdivisionCode,
7008
7422
  postalCode,
7009
7423
  country: 'CA'
7010
7424
  };
@@ -7022,6 +7436,12 @@ const handlePostalCodeValidation = (validatePc, message, value, errors) => {
7022
7436
  }
7023
7437
  return newErrors;
7024
7438
  };
7439
+ const formatPostalCode = value => {
7440
+ if (value.length >= 4 && value.indexOf(' ') === -1) {
7441
+ return value.slice(0, 3) + ' ' + value.slice(3);
7442
+ }
7443
+ return value;
7444
+ };
7025
7445
 
7026
7446
  let _ = t => t,
7027
7447
  _t;
@@ -7225,8 +7645,8 @@ const AddressLookUpControl = props => {
7225
7645
  const defaultAddress = {
7226
7646
  addressLine1: '',
7227
7647
  addressLine2: '',
7228
- city: '',
7229
- province: isAlbertaAddress ? 'AB' : '',
7648
+ municipality: '',
7649
+ subdivisionCode: isAlbertaAddress ? 'AB' : '',
7230
7650
  postalCode: '',
7231
7651
  country: 'CA'
7232
7652
  };
@@ -7235,6 +7655,7 @@ const AddressLookUpControl = props => {
7235
7655
  const [suggestions, setSuggestions] = useState([]);
7236
7656
  const [loading, setLoading] = useState(false);
7237
7657
  const [errors, setErrors] = useState({});
7658
+ const requiredFields = schema.required;
7238
7659
  const updateFormData = updatedAddress => {
7239
7660
  setAddress(updatedAddress);
7240
7661
  handleChange(path, updatedAddress);
@@ -7246,9 +7667,7 @@ const AddressLookUpControl = props => {
7246
7667
  if (field === 'postalCode') {
7247
7668
  const validatePc = validatePostalCode(value);
7248
7669
  setErrors(handlePostalCodeValidation(validatePc, postalCodeErrorMessage ? postalCodeErrorMessage : '', value, errors));
7249
- if (value.length >= 4 && value.indexOf(' ') === -1) {
7250
- value = value.slice(0, 3) + ' ' + value.slice(3);
7251
- }
7670
+ value = formatPostalCode(value);
7252
7671
  newAddress = Object.assign(Object.assign({}, address), {
7253
7672
  [field]: value.toUpperCase()
7254
7673
  });
@@ -7256,6 +7675,7 @@ const AddressLookUpControl = props => {
7256
7675
  newAddress = Object.assign(Object.assign({}, address), {
7257
7676
  [field]: value
7258
7677
  });
7678
+ delete errors[field];
7259
7679
  }
7260
7680
  setAddress(newAddress);
7261
7681
  updateFormData(newAddress);
@@ -7298,8 +7718,7 @@ const AddressLookUpControl = props => {
7298
7718
  setErrors({});
7299
7719
  };
7300
7720
  const handleRequiredFieldBlur = name => {
7301
- const requiredFields = schema.required;
7302
- if (!(data === null || data === void 0 ? void 0 : data[name]) || data[name] === '' || requiredFields.includes(name)) {
7721
+ if ((!(data === null || data === void 0 ? void 0 : data[name]) || (data === null || data === void 0 ? void 0 : data[name]) === '') && requiredFields.includes(name)) {
7303
7722
  const err = Object.assign({}, errors);
7304
7723
  err[name] = name === 'municipality' ? `city is required` : `${name} is required`;
7305
7724
  setErrors(err);
@@ -7318,10 +7737,10 @@ const AddressLookUpControl = props => {
7318
7737
  name: "addressLine1",
7319
7738
  testId: "address-form-address1",
7320
7739
  ariaLabel: 'address-form-address1',
7321
- placeholder: "Start typing the first line of your address",
7740
+ placeholder: "Start typing the first line of your address, required.",
7322
7741
  value: (address === null || address === void 0 ? void 0 : address.addressLine1) || '',
7323
7742
  onChange: (name, value) => handleDropdownChange(value),
7324
- onBlur: (name, value) => handleRequiredFieldBlur(name),
7743
+ onBlur: name => handleRequiredFieldBlur(name),
7325
7744
  width: "100%"
7326
7745
  }), loading && autocompletion && jsx(GoASkeleton, {
7327
7746
  type: "text",
@@ -7330,7 +7749,7 @@ const AddressLookUpControl = props => {
7330
7749
  className: "suggestions",
7331
7750
  tabIndex: 0,
7332
7751
  children: suggestions && autocompletion && open && suggestions.map((suggestion, index) => jsx("li", {
7333
- onClick: () => handleSuggestionClick(suggestion),
7752
+ onClick: e => handleSuggestionClick(suggestion),
7334
7753
  children: `${suggestion.Text} ${suggestion.Description}`
7335
7754
  }, index))
7336
7755
  })]
@@ -7340,7 +7759,8 @@ const AddressLookUpControl = props => {
7340
7759
  errors: errors,
7341
7760
  handleInputChange: handleInputChange,
7342
7761
  isAlbertaAddress: isAlbertaAddress,
7343
- handleOnBlur: handleRequiredFieldBlur
7762
+ handleOnBlur: handleRequiredFieldBlur,
7763
+ requiredFields: requiredFields
7344
7764
  })]
7345
7765
  });
7346
7766
  };
@@ -7696,12 +8116,12 @@ const createDefaultAjv = (...schemas) => {
7696
8116
  return ajv;
7697
8117
  };
7698
8118
 
7699
- var aCallable$6 = aCallable$9;
8119
+ var aCallable$4 = aCallable$9;
7700
8120
  var toObject = toObject$7;
7701
8121
  var IndexedObject = indexedObject;
7702
- var lengthOfArrayLike$1 = lengthOfArrayLike$5;
8122
+ var lengthOfArrayLike = lengthOfArrayLike$5;
7703
8123
 
7704
- var $TypeError$6 = TypeError;
8124
+ var $TypeError$4 = TypeError;
7705
8125
 
7706
8126
  var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
7707
8127
 
@@ -7710,9 +8130,9 @@ var createMethod = function (IS_RIGHT) {
7710
8130
  return function (that, callbackfn, argumentsLength, memo) {
7711
8131
  var O = toObject(that);
7712
8132
  var self = IndexedObject(O);
7713
- var length = lengthOfArrayLike$1(O);
7714
- aCallable$6(callbackfn);
7715
- if (length === 0 && argumentsLength < 2) throw new $TypeError$6(REDUCE_EMPTY);
8133
+ var length = lengthOfArrayLike(O);
8134
+ aCallable$4(callbackfn);
8135
+ if (length === 0 && argumentsLength < 2) throw new $TypeError$4(REDUCE_EMPTY);
7716
8136
  var index = IS_RIGHT ? length - 1 : 0;
7717
8137
  var i = IS_RIGHT ? -1 : 1;
7718
8138
  if (argumentsLength < 2) while (true) {
@@ -7723,7 +8143,7 @@ var createMethod = function (IS_RIGHT) {
7723
8143
  }
7724
8144
  index += i;
7725
8145
  if (IS_RIGHT ? index < 0 : length <= index) {
7726
- throw new $TypeError$6(REDUCE_EMPTY);
8146
+ throw new $TypeError$4(REDUCE_EMPTY);
7727
8147
  }
7728
8148
  }
7729
8149
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -7753,9 +8173,9 @@ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
7753
8173
  };
7754
8174
 
7755
8175
  var global$7 = global$o;
7756
- var classof$2 = classofRaw$2;
8176
+ var classof$1 = classofRaw$2;
7757
8177
 
7758
- var engineIsNode = classof$2(global$7.process) === 'process';
8178
+ var engineIsNode = classof$1(global$7.process) === 'process';
7759
8179
 
7760
8180
  var $$6 = _export;
7761
8181
  var $reduce = arrayReduce.left;
@@ -7777,26 +8197,26 @@ $$6({ target: 'Array', proto: true, forced: FORCED }, {
7777
8197
  }
7778
8198
  });
7779
8199
 
7780
- var isPrototypeOf$1 = objectIsPrototypeOf;
8200
+ var isPrototypeOf = objectIsPrototypeOf;
7781
8201
 
7782
- var $TypeError$5 = TypeError;
8202
+ var $TypeError$3 = TypeError;
7783
8203
 
7784
8204
  var anInstance$1 = function (it, Prototype) {
7785
- if (isPrototypeOf$1(Prototype, it)) return it;
7786
- throw new $TypeError$5('Incorrect invocation');
8205
+ if (isPrototypeOf(Prototype, it)) return it;
8206
+ throw new $TypeError$3('Incorrect invocation');
7787
8207
  };
7788
8208
 
7789
- var uncurryThis$1 = functionUncurryThis;
8209
+ var uncurryThis = functionUncurryThis;
7790
8210
  var fails$1 = fails$r;
7791
8211
  var isCallable$4 = isCallable$q;
7792
- var classof$1 = classof$9;
8212
+ var classof = classof$9;
7793
8213
  var getBuiltIn$2 = getBuiltIn$9;
7794
8214
  var inspectSource$1 = inspectSource$3;
7795
8215
 
7796
8216
  var noop = function () { /* empty */ };
7797
8217
  var construct = getBuiltIn$2('Reflect', 'construct');
7798
8218
  var constructorRegExp = /^\s*(?:class|function)\b/;
7799
- var exec = uncurryThis$1(constructorRegExp.exec);
8219
+ var exec = uncurryThis(constructorRegExp.exec);
7800
8220
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
7801
8221
 
7802
8222
  var isConstructorModern = function isConstructor(argument) {
@@ -7811,7 +8231,7 @@ var isConstructorModern = function isConstructor(argument) {
7811
8231
 
7812
8232
  var isConstructorLegacy = function isConstructor(argument) {
7813
8233
  if (!isCallable$4(argument)) return false;
7814
- switch (classof$1(argument)) {
8234
+ switch (classof(argument)) {
7815
8235
  case 'AsyncFunction':
7816
8236
  case 'GeneratorFunction':
7817
8237
  case 'AsyncGeneratorFunction': return false;
@@ -7839,49 +8259,35 @@ var isConstructor$1 = !construct || fails$1(function () {
7839
8259
  }) ? isConstructorLegacy : isConstructorModern;
7840
8260
 
7841
8261
  var isConstructor = isConstructor$1;
7842
- var tryToString$2 = tryToString$4;
8262
+ var tryToString = tryToString$4;
7843
8263
 
7844
- var $TypeError$4 = TypeError;
8264
+ var $TypeError$2 = TypeError;
7845
8265
 
7846
8266
  // `Assert: IsConstructor(argument) is true`
7847
8267
  var aConstructor$1 = function (argument) {
7848
8268
  if (isConstructor(argument)) return argument;
7849
- throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
8269
+ throw new $TypeError$2(tryToString(argument) + ' is not a constructor');
7850
8270
  };
7851
8271
 
7852
- var anObject$4 = anObject$f;
8272
+ var anObject$1 = anObject$f;
7853
8273
  var aConstructor = aConstructor$1;
7854
- var isNullOrUndefined$1 = isNullOrUndefined$6;
7855
- var wellKnownSymbol$4 = wellKnownSymbol$j;
8274
+ var isNullOrUndefined = isNullOrUndefined$6;
8275
+ var wellKnownSymbol$2 = wellKnownSymbol$j;
7856
8276
 
7857
- var SPECIES$1 = wellKnownSymbol$4('species');
8277
+ var SPECIES$1 = wellKnownSymbol$2('species');
7858
8278
 
7859
8279
  // `SpeciesConstructor` abstract operation
7860
8280
  // https://tc39.es/ecma262/#sec-speciesconstructor
7861
8281
  var speciesConstructor$1 = function (O, defaultConstructor) {
7862
- var C = anObject$4(O).constructor;
8282
+ var C = anObject$1(O).constructor;
7863
8283
  var S;
7864
- return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
7865
- };
7866
-
7867
- var uncurryThis = functionUncurryThisClause;
7868
- var aCallable$5 = aCallable$9;
7869
- var NATIVE_BIND = functionBindNative;
7870
-
7871
- var bind$4 = uncurryThis(uncurryThis.bind);
7872
-
7873
- // optional / simple context binding
7874
- var functionBindContext = function (fn, that) {
7875
- aCallable$5(fn);
7876
- return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
7877
- return fn.apply(that, arguments);
7878
- };
8284
+ return C === undefined || isNullOrUndefined(S = anObject$1(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
7879
8285
  };
7880
8286
 
7881
- var $TypeError$3 = TypeError;
8287
+ var $TypeError$1 = TypeError;
7882
8288
 
7883
8289
  var validateArgumentsLength$1 = function (passed, required) {
7884
- if (passed < required) throw new $TypeError$3('Not enough arguments');
8290
+ if (passed < required) throw new $TypeError$1('Not enough arguments');
7885
8291
  return passed;
7886
8292
  };
7887
8293
 
@@ -7892,7 +8298,7 @@ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
7892
8298
 
7893
8299
  var global$6 = global$o;
7894
8300
  var apply = functionApply;
7895
- var bind$3 = functionBindContext;
8301
+ var bind$2 = functionBindContext;
7896
8302
  var isCallable$3 = isCallable$q;
7897
8303
  var hasOwn = hasOwnProperty_1;
7898
8304
  var fails = fails$r;
@@ -7974,7 +8380,7 @@ if (!set || !clear) {
7974
8380
  channel = new MessageChannel();
7975
8381
  port = channel.port2;
7976
8382
  channel.port1.onmessage = eventListener;
7977
- defer = bind$3(port.postMessage, port);
8383
+ defer = bind$2(port.postMessage, port);
7978
8384
  // Browsers with postMessage, skip WebWorkers
7979
8385
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
7980
8386
  } else if (
@@ -8055,7 +8461,7 @@ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
8055
8461
 
8056
8462
  var global$4 = global$o;
8057
8463
  var safeGetBuiltIn = safeGetBuiltIn$1;
8058
- var bind$2 = functionBindContext;
8464
+ var bind$1 = functionBindContext;
8059
8465
  var macrotask = task$1.set;
8060
8466
  var Queue$1 = queue$1;
8061
8467
  var IS_IOS = engineIsIos;
@@ -8101,7 +8507,7 @@ if (!microtask$1) {
8101
8507
  promise = Promise$1.resolve(undefined);
8102
8508
  // workaround of WebKit ~ iOS Safari 10.1 bug
8103
8509
  promise.constructor = Promise$1;
8104
- then = bind$2(promise.then, promise);
8510
+ then = bind$1(promise.then, promise);
8105
8511
  notify$1 = function () {
8106
8512
  then(flush);
8107
8513
  };
@@ -8118,7 +8524,7 @@ if (!microtask$1) {
8118
8524
  // - setTimeout
8119
8525
  } else {
8120
8526
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
8121
- macrotask = bind$2(macrotask, global$4);
8527
+ macrotask = bind$1(macrotask, global$4);
8122
8528
  notify$1 = function () {
8123
8529
  macrotask(flush);
8124
8530
  };
@@ -8166,13 +8572,13 @@ var NativePromiseConstructor$3 = promiseNativeConstructor;
8166
8572
  var isCallable$2 = isCallable$q;
8167
8573
  var isForced = isForced_1;
8168
8574
  var inspectSource = inspectSource$3;
8169
- var wellKnownSymbol$3 = wellKnownSymbol$j;
8575
+ var wellKnownSymbol$1 = wellKnownSymbol$j;
8170
8576
  var IS_BROWSER = engineIsBrowser;
8171
8577
  var IS_DENO = engineIsDeno;
8172
8578
  var V8_VERSION = engineV8Version;
8173
8579
 
8174
8580
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
8175
- var SPECIES = wellKnownSymbol$3('species');
8581
+ var SPECIES = wellKnownSymbol$1('species');
8176
8582
  var SUBCLASSING = false;
8177
8583
  var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
8178
8584
 
@@ -8208,19 +8614,19 @@ var promiseConstructorDetection = {
8208
8614
 
8209
8615
  var newPromiseCapability$2 = {};
8210
8616
 
8211
- var aCallable$4 = aCallable$9;
8617
+ var aCallable$3 = aCallable$9;
8212
8618
 
8213
- var $TypeError$2 = TypeError;
8619
+ var $TypeError = TypeError;
8214
8620
 
8215
8621
  var PromiseCapability = function (C) {
8216
8622
  var resolve, reject;
8217
8623
  this.promise = new C(function ($$resolve, $$reject) {
8218
- if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
8624
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
8219
8625
  resolve = $$resolve;
8220
8626
  reject = $$reject;
8221
8627
  });
8222
- this.resolve = aCallable$4(resolve);
8223
- this.reject = aCallable$4(reject);
8628
+ this.resolve = aCallable$3(resolve);
8629
+ this.reject = aCallable$3(reject);
8224
8630
  };
8225
8631
 
8226
8632
  // `NewPromiseCapability` abstract operation
@@ -8232,12 +8638,12 @@ newPromiseCapability$2.f = function (C) {
8232
8638
  var $$5 = _export;
8233
8639
  var IS_NODE = engineIsNode;
8234
8640
  var global$1 = global$o;
8235
- var call$5 = functionCall;
8641
+ var call$2 = functionCall;
8236
8642
  var defineBuiltIn$1 = defineBuiltIn$8;
8237
8643
  var setPrototypeOf = objectSetPrototypeOf;
8238
8644
  var setToStringTag = setToStringTag$4;
8239
8645
  var setSpecies = setSpecies$2;
8240
- var aCallable$3 = aCallable$9;
8646
+ var aCallable$2 = aCallable$9;
8241
8647
  var isCallable$1 = isCallable$q;
8242
8648
  var isObject$1 = isObject$d;
8243
8649
  var anInstance = anInstance$1;
@@ -8310,7 +8716,7 @@ var callReaction = function (reaction, state) {
8310
8716
  if (result === reaction.promise) {
8311
8717
  reject(new TypeError$1('Promise-chain cycle'));
8312
8718
  } else if (then = isThenable(result)) {
8313
- call$5(then, result, resolve, reject);
8719
+ call$2(then, result, resolve, reject);
8314
8720
  } else resolve(result);
8315
8721
  } else reject(value);
8316
8722
  } catch (error) {
@@ -8347,7 +8753,7 @@ var dispatchEvent = function (name, promise, reason) {
8347
8753
  };
8348
8754
 
8349
8755
  var onUnhandled = function (state) {
8350
- call$5(task, global$1, function () {
8756
+ call$2(task, global$1, function () {
8351
8757
  var promise = state.facade;
8352
8758
  var value = state.value;
8353
8759
  var IS_UNHANDLED = isUnhandled(state);
@@ -8370,7 +8776,7 @@ var isUnhandled = function (state) {
8370
8776
  };
8371
8777
 
8372
8778
  var onHandleUnhandled = function (state) {
8373
- call$5(task, global$1, function () {
8779
+ call$2(task, global$1, function () {
8374
8780
  var promise = state.facade;
8375
8781
  if (IS_NODE) {
8376
8782
  process.emit('rejectionHandled', promise);
@@ -8378,7 +8784,7 @@ var onHandleUnhandled = function (state) {
8378
8784
  });
8379
8785
  };
8380
8786
 
8381
- var bind$1 = function (fn, state, unwrap) {
8787
+ var bind = function (fn, state, unwrap) {
8382
8788
  return function (value) {
8383
8789
  fn(state, value, unwrap);
8384
8790
  };
@@ -8404,9 +8810,9 @@ var internalResolve = function (state, value, unwrap) {
8404
8810
  microtask(function () {
8405
8811
  var wrapper = { done: false };
8406
8812
  try {
8407
- call$5(then, value,
8408
- bind$1(internalResolve, wrapper, state),
8409
- bind$1(internalReject, wrapper, state)
8813
+ call$2(then, value,
8814
+ bind(internalResolve, wrapper, state),
8815
+ bind(internalReject, wrapper, state)
8410
8816
  );
8411
8817
  } catch (error) {
8412
8818
  internalReject(wrapper, error, state);
@@ -8427,11 +8833,11 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
8427
8833
  // 25.4.3.1 Promise(executor)
8428
8834
  PromiseConstructor = function Promise(executor) {
8429
8835
  anInstance(this, PromisePrototype);
8430
- aCallable$3(executor);
8431
- call$5(Internal, this);
8836
+ aCallable$2(executor);
8837
+ call$2(Internal, this);
8432
8838
  var state = getInternalPromiseState(this);
8433
8839
  try {
8434
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
8840
+ executor(bind(internalResolve, state), bind(internalReject, state));
8435
8841
  } catch (error) {
8436
8842
  internalReject(state, error);
8437
8843
  }
@@ -8473,8 +8879,8 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
8473
8879
  var promise = new Internal();
8474
8880
  var state = getInternalPromiseState(promise);
8475
8881
  this.promise = promise;
8476
- this.resolve = bind$1(internalResolve, state);
8477
- this.reject = bind$1(internalReject, state);
8882
+ this.resolve = bind(internalResolve, state);
8883
+ this.reject = bind(internalReject, state);
8478
8884
  };
8479
8885
 
8480
8886
  newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
@@ -8491,7 +8897,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
8491
8897
  defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
8492
8898
  var that = this;
8493
8899
  return new PromiseConstructor(function (resolve, reject) {
8494
- call$5(nativeThen, that, resolve, reject);
8900
+ call$2(nativeThen, that, resolve, reject);
8495
8901
  }).then(onFulfilled, onRejected);
8496
8902
  // https://github.com/zloirock/core-js/issues/640
8497
8903
  }, { unsafe: true });
@@ -8516,138 +8922,6 @@ $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTR
8516
8922
  setToStringTag(PromiseConstructor, PROMISE, false);
8517
8923
  setSpecies(PROMISE);
8518
8924
 
8519
- var wellKnownSymbol$2 = wellKnownSymbol$j;
8520
- var Iterators$1 = iterators;
8521
-
8522
- var ITERATOR$2 = wellKnownSymbol$2('iterator');
8523
- var ArrayPrototype = Array.prototype;
8524
-
8525
- // check on default Array iterator
8526
- var isArrayIteratorMethod$1 = function (it) {
8527
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
8528
- };
8529
-
8530
- var classof = classof$9;
8531
- var getMethod$1 = getMethod$5;
8532
- var isNullOrUndefined = isNullOrUndefined$6;
8533
- var Iterators = iterators;
8534
- var wellKnownSymbol$1 = wellKnownSymbol$j;
8535
-
8536
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
8537
-
8538
- var getIteratorMethod$2 = function (it) {
8539
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
8540
- || getMethod$1(it, '@@iterator')
8541
- || Iterators[classof(it)];
8542
- };
8543
-
8544
- var call$4 = functionCall;
8545
- var aCallable$2 = aCallable$9;
8546
- var anObject$3 = anObject$f;
8547
- var tryToString$1 = tryToString$4;
8548
- var getIteratorMethod$1 = getIteratorMethod$2;
8549
-
8550
- var $TypeError$1 = TypeError;
8551
-
8552
- var getIterator$1 = function (argument, usingIterator) {
8553
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
8554
- if (aCallable$2(iteratorMethod)) return anObject$3(call$4(iteratorMethod, argument));
8555
- throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
8556
- };
8557
-
8558
- var call$3 = functionCall;
8559
- var anObject$2 = anObject$f;
8560
- var getMethod = getMethod$5;
8561
-
8562
- var iteratorClose$1 = function (iterator, kind, value) {
8563
- var innerResult, innerError;
8564
- anObject$2(iterator);
8565
- try {
8566
- innerResult = getMethod(iterator, 'return');
8567
- if (!innerResult) {
8568
- if (kind === 'throw') throw value;
8569
- return value;
8570
- }
8571
- innerResult = call$3(innerResult, iterator);
8572
- } catch (error) {
8573
- innerError = true;
8574
- innerResult = error;
8575
- }
8576
- if (kind === 'throw') throw value;
8577
- if (innerError) throw innerResult;
8578
- anObject$2(innerResult);
8579
- return value;
8580
- };
8581
-
8582
- var bind = functionBindContext;
8583
- var call$2 = functionCall;
8584
- var anObject$1 = anObject$f;
8585
- var tryToString = tryToString$4;
8586
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
8587
- var lengthOfArrayLike = lengthOfArrayLike$5;
8588
- var isPrototypeOf = objectIsPrototypeOf;
8589
- var getIterator = getIterator$1;
8590
- var getIteratorMethod = getIteratorMethod$2;
8591
- var iteratorClose = iteratorClose$1;
8592
-
8593
- var $TypeError = TypeError;
8594
-
8595
- var Result = function (stopped, result) {
8596
- this.stopped = stopped;
8597
- this.result = result;
8598
- };
8599
-
8600
- var ResultPrototype = Result.prototype;
8601
-
8602
- var iterate$2 = function (iterable, unboundFunction, options) {
8603
- var that = options && options.that;
8604
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
8605
- var IS_RECORD = !!(options && options.IS_RECORD);
8606
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
8607
- var INTERRUPTED = !!(options && options.INTERRUPTED);
8608
- var fn = bind(unboundFunction, that);
8609
- var iterator, iterFn, index, length, result, next, step;
8610
-
8611
- var stop = function (condition) {
8612
- if (iterator) iteratorClose(iterator, 'normal', condition);
8613
- return new Result(true, condition);
8614
- };
8615
-
8616
- var callFn = function (value) {
8617
- if (AS_ENTRIES) {
8618
- anObject$1(value);
8619
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
8620
- } return INTERRUPTED ? fn(value, stop) : fn(value);
8621
- };
8622
-
8623
- if (IS_RECORD) {
8624
- iterator = iterable.iterator;
8625
- } else if (IS_ITERATOR) {
8626
- iterator = iterable;
8627
- } else {
8628
- iterFn = getIteratorMethod(iterable);
8629
- if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
8630
- // optimisation for array iterators
8631
- if (isArrayIteratorMethod(iterFn)) {
8632
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
8633
- result = callFn(iterable[index]);
8634
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
8635
- } return new Result(false);
8636
- }
8637
- iterator = getIterator(iterable, iterFn);
8638
- }
8639
-
8640
- next = IS_RECORD ? iterable.next : iterator.next;
8641
- while (!(step = call$2(next, iterator)).done) {
8642
- try {
8643
- result = callFn(step.value);
8644
- } catch (error) {
8645
- iteratorClose(iterator, 'throw', error);
8646
- }
8647
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
8648
- } return new Result(false);
8649
- };
8650
-
8651
8925
  var wellKnownSymbol = wellKnownSymbol$j;
8652
8926
 
8653
8927
  var ITERATOR = wellKnownSymbol('iterator');
@@ -8702,7 +8976,7 @@ var call$1 = functionCall;
8702
8976
  var aCallable$1 = aCallable$9;
8703
8977
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
8704
8978
  var perform$1 = perform$3;
8705
- var iterate$1 = iterate$2;
8979
+ var iterate$1 = iterate$3;
8706
8980
  var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
8707
8981
 
8708
8982
  // `Promise.all` method
@@ -8766,7 +9040,7 @@ var call = functionCall;
8766
9040
  var aCallable = aCallable$9;
8767
9041
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
8768
9042
  var perform = perform$3;
8769
- var iterate = iterate$2;
9043
+ var iterate = iterate$3;
8770
9044
  var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
8771
9045
 
8772
9046
  // `Promise.race` method