@abgov/jsonforms-components 1.35.2 → 1.35.4

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
  }
@@ -4858,6 +4858,7 @@ styled.h3(_t9$1 || (_t9$1 = _$5`
4858
4858
  const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$5`
4859
4859
  display: flex;
4860
4860
  justify-content: flex-end;
4861
+ margin-bottom: var(--goa-space-l);
4861
4862
  `));
4862
4863
 
4863
4864
  var toString$2 = toString$d;
@@ -4894,13 +4895,13 @@ var errorStackClear = function (stack, dropEntries) {
4894
4895
  };
4895
4896
 
4896
4897
  var fails$4 = fails$r;
4897
- var createPropertyDescriptor = createPropertyDescriptor$4;
4898
+ var createPropertyDescriptor$1 = createPropertyDescriptor$5;
4898
4899
 
4899
4900
  var errorStackInstallable = !fails$4(function () {
4900
4901
  var error = new Error('a');
4901
4902
  if (!('stack' in error)) return true;
4902
4903
  // eslint-disable-next-line es/no-object-defineproperty -- safe
4903
- Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
4904
+ Object.defineProperty(error, 'stack', createPropertyDescriptor$1(1, 7));
4904
4905
  return error.stack !== 7;
4905
4906
  });
4906
4907
 
@@ -4929,7 +4930,7 @@ var inheritIfRequired = inheritIfRequired$2;
4929
4930
  var normalizeStringArgument = normalizeStringArgument$1;
4930
4931
  var installErrorCause = installErrorCause$1;
4931
4932
  var installErrorStack = errorStackInstall;
4932
- var DESCRIPTORS$1 = descriptors;
4933
+ var DESCRIPTORS$2 = descriptors;
4933
4934
 
4934
4935
  var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
4935
4936
  var STACK_TRACE_LIMIT = 'stackTraceLimit';
@@ -4964,7 +4965,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
4964
4965
  if (ERROR_NAME !== 'Error') {
4965
4966
  if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
4966
4967
  else copyConstructorProperties(WrappedError, BaseError, { name: true });
4967
- } else if (DESCRIPTORS$1 && STACK_TRACE_LIMIT in OriginalError) {
4968
+ } else if (DESCRIPTORS$2 && STACK_TRACE_LIMIT in OriginalError) {
4968
4969
  proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
4969
4970
  proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
4970
4971
  }
@@ -4983,7 +4984,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
4983
4984
  };
4984
4985
 
4985
4986
  /* eslint-disable no-unused-vars -- required for functions `.length` */
4986
- var $$9 = _export;
4987
+ var $$a = _export;
4987
4988
  var global$8 = global$o;
4988
4989
  var apply$1 = functionApply;
4989
4990
  var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
@@ -4997,14 +4998,14 @@ var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
4997
4998
  var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
4998
4999
  var O = {};
4999
5000
  O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
5000
- $$9({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
5001
+ $$a({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
5001
5002
  };
5002
5003
 
5003
5004
  var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
5004
5005
  if (WebAssembly && WebAssembly[ERROR_NAME]) {
5005
5006
  var O = {};
5006
5007
  O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
5007
- $$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);
5008
5009
  }
5009
5010
  };
5010
5011
 
@@ -5786,36 +5787,185 @@ const FileUploaderStyle = styled.div(_t3$1 || (_t3$1 = _$3`
5786
5787
 
5787
5788
  const FileUploaderTester = rankWith(3, and(schemaTypeIs('string'), formatIs('file-urn')));
5788
5789
 
5789
- const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
5790
- numColumns,
5791
- errors,
5792
- label,
5793
- path,
5794
- addItem,
5795
- schema,
5796
- enabled,
5797
- translations,
5798
- rootSchema,
5799
- uischema
5800
- }) {
5801
- var _a, _b, _c, _d;
5802
- const buttonPosition = ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.addButtonPosition) || 'left';
5803
- const arrayLabel = getLabelText(uischema.scope, label);
5804
- return jsx(Fragment, {
5805
- children: jsx("div", {
5806
- style: {
5807
- textAlign: buttonPosition
5808
- },
5809
- children: jsx(GoAButton, {
5810
- disabled: !enabled,
5811
- testId: `object-array-toolbar-${label}`,
5812
- "aria-label": translations.addAriaLabel,
5813
- onClick: addItem(path, createDefaultValue(schema, rootSchema)),
5814
- type: (_c = (_b = uischema.options) === null || _b === void 0 ? void 0 : _b.addButtonType) !== null && _c !== void 0 ? _c : 'primary',
5815
- children: ((_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.addButtonText) || capitalizeFirstLetter(`Add ${arrayLabel}`)
5816
- })
5817
- })
5818
- });
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
+ }
5819
5969
  });
5820
5970
 
5821
5971
  let _$2 = t => t,
@@ -5830,82 +5980,234 @@ let _$2 = t => t,
5830
5980
  _t9,
5831
5981
  _t10,
5832
5982
  _t11,
5833
- _t12;
5983
+ _t12,
5984
+ _t13;
5834
5985
  const DeleteDialogContent = styled.div(_t$2 || (_t$2 = _$2`
5835
5986
  margin-bottom: var(--goa-space-m);
5836
5987
  `));
5837
- 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`
5838
5994
  margin-bottom: var(--goa-space-l);
5839
5995
  `));
5840
- const ObjectArrayTitle = styled.h2(_t3 || (_t3 = _$2`
5996
+ const ObjectArrayTitle = styled.h2(_t4 || (_t4 = _$2`
5841
5997
  margin-bottom: var(--goa-space-l);
5842
5998
  `));
5843
- const TextCenter = styled.div(_t4 || (_t4 = _$2`
5999
+ const TextCenter = styled.div(_t5 || (_t5 = _$2`
5844
6000
  text-align: center;
5845
6001
  `));
5846
- const SideMenuItem = styled.div(_t5 || (_t5 = _$2`
6002
+ const SideMenuItem = styled.div(_t6 || (_t6 = _$2`
5847
6003
  &:hover {
5848
6004
  background: #f1f1f1;
5849
6005
  }
5850
6006
  `));
5851
- const RowFlex = styled.div(_t6 || (_t6 = _$2`
6007
+ const RowFlex = styled.div(_t7 || (_t7 = _$2`
5852
6008
  display: flex;
5853
6009
  align-items: stretch;
5854
6010
  `));
5855
- const RowFlexMenu = styled.div(_t7 || (_t7 = _$2`
6011
+ const RowFlexMenu = styled.div(_t8 || (_t8 = _$2`
5856
6012
  display: flex;
5857
6013
  flex-direction: row;
5858
6014
  border-bottom: 1px solid #dcdcdc;
5859
6015
  `));
5860
- const FlexTabs = styled.div(_t8 || (_t8 = _$2`
6016
+ const FlexTabs = styled.div(_t9 || (_t9 = _$2`
5861
6017
  flex-direction: column;
5862
6018
  flex: 1;
5863
6019
  overflow-y: auto !important;
5864
6020
  margin-right: 1.5rem;
5865
6021
  `));
5866
- const FlexForm = styled.div(_t9 || (_t9 = _$2`
6022
+ const FlexForm = styled.div(_t10 || (_t10 = _$2`
5867
6023
  flex-direction: column;
5868
6024
  margin: 1.5rem 0;
5869
6025
  flex: 3;
5870
6026
  `));
5871
- const TabName = styled.div(_t10 || (_t10 = _$2`
6027
+ const TabName = styled.div(_t11 || (_t11 = _$2`
5872
6028
  margin: 1rem 0 1rem 1rem;
5873
6029
  font-weight: 700;
5874
6030
  `));
5875
- const Trash = styled.div(_t11 || (_t11 = _$2`
6031
+ const Trash = styled.div(_t12 || (_t12 = _$2`
5876
6032
  margin: 0.75rem 1.25rem 0.75rem 0.75rem;
5877
6033
  margin-left: auto;
5878
6034
  `));
5879
- const ListContainer = styled.div(_t12 || (_t12 = _$2`
6035
+ const ListContainer = styled.div(_t13 || (_t13 = _$2`
5880
6036
  padding: 0 1.5rem 0 0;
5881
6037
  border: 1px solid #dcdcdc;
5882
6038
  `));
5883
6039
 
5884
- // eslint-disable-next-line
5885
- const extractScopesFromUISchema$1 = uischema => {
5886
- var _a;
5887
- const scopes = [];
5888
- if (uischema === null || uischema === void 0 ? void 0 : uischema.elements) {
5889
- // eslint-disable-next-line
5890
- (_a = uischema === null || uischema === void 0 ? void 0 : uischema.elements) === null || _a === void 0 ? void 0 : _a.forEach(element => {
5891
- var _a;
5892
- if (element === null || element === void 0 ? void 0 : element.elements) {
5893
- // eslint-disable-next-line
5894
- (_a = element === null || element === void 0 ? void 0 : element.elements) === null || _a === void 0 ? void 0 : _a.forEach(internalElement => {
5895
- if (internalElement === null || internalElement === void 0 ? void 0 : internalElement.scope) {
5896
- scopes.push(internalElement === null || internalElement === void 0 ? void 0 : internalElement.scope);
5897
- }
5898
- });
5899
- } else {
5900
- if (element === null || element === void 0 ? void 0 : element.scope) {
5901
- scopes.push(element === null || element === void 0 ? void 0 : element.scope);
5902
- }
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
+ }
5903
6205
  }
5904
6206
  });
5905
6207
  }
5906
6208
  return scopes;
5907
6209
  };
5908
- 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) => {
5909
6211
  if (schema.type === 'object') {
5910
6212
  const props = {
5911
6213
  schema,
@@ -5913,19 +6215,34 @@ const GenerateRows$1 = (Cell, schema, rowPath, enabled, cells, uischema, isInRev
5913
6215
  enabled,
5914
6216
  cells,
5915
6217
  uischema,
5916
- isInReview
6218
+ isInReview,
6219
+ openDeleteDialog,
6220
+ data,
6221
+ handleChange
5917
6222
  };
5918
- 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
+ });
5919
6232
  } else {
5920
- // primitives
5921
6233
  const props = {
5922
6234
  schema,
5923
6235
  rowPath,
5924
6236
  cellPath: rowPath,
5925
6237
  enabled,
5926
- isInReview
6238
+ isInReview,
6239
+ openDeleteDialog,
6240
+ handleChange,
6241
+ data
5927
6242
  };
5928
- return jsx(Cell, Object.assign({}, props), rowPath);
6243
+ return jsx(Cell, Object.assign({}, props, {
6244
+ count: count || 0
6245
+ }), rowPath);
5929
6246
  }
5930
6247
  };
5931
6248
  const getValidColumnProps$1 = scopedSchema => {
@@ -5951,7 +6268,6 @@ const EmptyList$1 = ({
5951
6268
  });
5952
6269
  const ctxToNonEmptyCellProps$1 = (ctx, ownProps) => {
5953
6270
  var _a;
5954
- ownProps.rowPath + (ownProps.schema.type === 'object' ? '.' + ownProps.propName : '');
5955
6271
  const errors = '';
5956
6272
  return {
5957
6273
  uischema: ownProps.uischema,
@@ -5961,21 +6277,24 @@ const ctxToNonEmptyCellProps$1 = (ctx, ownProps) => {
5961
6277
  errors,
5962
6278
  enabled: ownProps.enabled,
5963
6279
  cells: ownProps.cells || ctx.cells,
5964
- renderers: ownProps.renderers || ctx.renderers
6280
+ renderers: ownProps.renderers || ctx.renderers,
6281
+ handleChange: ownProps.handleChange
5965
6282
  };
5966
6283
  };
5967
6284
  const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellComponent(props) {
5968
- var _a, _b;
6285
+ var _a;
5969
6286
  const {
5970
6287
  schema,
5971
- errors,
5972
6288
  enabled,
5973
6289
  renderers,
5974
6290
  cells,
5975
6291
  rowPath,
5976
- isValid,
5977
6292
  uischema,
5978
- isInReview
6293
+ isInReview,
6294
+ data,
6295
+ count,
6296
+ openDeleteDialog,
6297
+ handleChange
5979
6298
  } = props;
5980
6299
  const propNames = getValidColumnProps$1(schema);
5981
6300
  const propScopes = (uischema === null || uischema === void 0 ? void 0 : uischema.scope) ? propNames.map(name => {
@@ -5992,7 +6311,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
5992
6311
  */
5993
6312
  const getFirstLayoutType = () => {
5994
6313
  var _a, _b, _c, _d, _e, _f, _g, _h;
5995
- let defaultType = 'VerticalLayout';
6314
+ let defaultType = 'HorizontalLayout';
5996
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;
5997
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) {
5998
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;
@@ -6002,7 +6321,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
6002
6321
  /* Create default elements for scope not defined in the uischema
6003
6322
  * future work: merge the options
6004
6323
  */
6005
- const uiSchemaElementsForNotDefined = {
6324
+ ({
6006
6325
  type: getFirstLayoutType(),
6007
6326
  elements: scopesNotInElements.map(scope => {
6008
6327
  return {
@@ -6013,8 +6332,10 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
6013
6332
  }
6014
6333
  };
6015
6334
  })
6016
- };
6017
- 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, {
6018
6339
  children: [
6019
6340
  // eslint-disable-next-line
6020
6341
  (_a = uischema === null || uischema === void 0 ? void 0 : uischema.elements) === null || _a === void 0 ? void 0 : _a.map(element => {
@@ -6027,47 +6348,99 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
6027
6348
  renderers: isInReview ? GoAReviewRenderers : renderers,
6028
6349
  cells: cells
6029
6350
  }, rowPath);
6030
- }), ((_b = uiSchemaElementsForNotDefined === null || uiSchemaElementsForNotDefined === void 0 ? void 0 : uiSchemaElementsForNotDefined.elements) === null || _b === void 0 ? void 0 : _b.length) > 0 && jsx(JsonFormsDispatch, {
6031
- schema: schema,
6032
- uischema: uiSchemaElementsForNotDefined,
6033
- path: rowPath,
6034
- enabled: enabled,
6035
- renderers: isInReview ? GoAReviewRenderers : renderers,
6036
- 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
+ })]
6037
6406
  })]
6038
6407
  });
6039
6408
  });
6040
6409
  const NonEmptyCell$1 = ownProps => {
6410
+ const data = ownProps.data || {};
6041
6411
  const ctx = useJsonForms();
6042
- const emptyCellProps = ctxToNonEmptyCellProps$1(ctx, ownProps);
6412
+ const emptyCellProps = ctxToNonEmptyCellProps$1(ctx, Object.assign(Object.assign({}, ownProps), {
6413
+ data
6414
+ }));
6043
6415
  const isValid = isEmpty$1(emptyCellProps.errors);
6044
6416
  return jsx(NonEmptyCellComponent$1, Object.assign({}, emptyCellProps, {
6417
+ handleChange: ownProps === null || ownProps === void 0 ? void 0 : ownProps.handleChange,
6045
6418
  isInReview: ownProps === null || ownProps === void 0 ? void 0 : ownProps.isInReview,
6046
- 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
6047
6423
  }));
6048
6424
  };
6049
6425
  const NonEmptyRowComponent$1 = ({
6050
6426
  childPath,
6051
6427
  schema,
6052
- rowIndex,
6053
6428
  openDeleteDialog,
6054
6429
  enabled,
6055
6430
  cells,
6056
- path,
6057
- translations,
6058
6431
  uischema,
6059
- isInReview
6432
+ isInReview,
6433
+ data,
6434
+ count,
6435
+ handleChange
6060
6436
  }) => {
6061
6437
  return jsx("div", {
6062
- children: enabled ? jsxs(GoAContainer, {
6063
- children: [isInReview !== true && jsx(GoAGrid, {
6064
- minChildWidth: "30ch",
6065
- children: jsx(GoAIconButton, {
6066
- icon: "trash",
6067
- "aria-label": translations.removeAriaLabel,
6068
- 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)
6069
6442
  })
6070
- }), GenerateRows$1(NonEmptyCell$1, schema, childPath, enabled, cells, uischema, isInReview)]
6443
+ })
6071
6444
  }) : null
6072
6445
  }, childPath);
6073
6446
  };
@@ -6082,9 +6455,11 @@ const ObjectArrayList$1 = ({
6082
6455
  enabled,
6083
6456
  cells,
6084
6457
  translations,
6085
- isInReview
6458
+ count,
6459
+ isInReview,
6460
+ handleChange
6086
6461
  }) => {
6087
- const isEmptyList = data === 0;
6462
+ const isEmptyList = count === 0;
6088
6463
  if (isEmptyList) {
6089
6464
  return jsx(EmptyList$1, {
6090
6465
  numColumns: getValidColumnProps$1(schema).length + 1,
@@ -6092,182 +6467,230 @@ const ObjectArrayList$1 = ({
6092
6467
  });
6093
6468
  }
6094
6469
  const appliedUiSchemaOptions = merge({}, config, uischema.options);
6095
- return jsx(Fragment, {
6096
- children: range(data).map(index => {
6097
- const childPath = Paths.compose(path, `${index}`);
6098
- return jsx(NonEmptyList$1, {
6099
- childPath: childPath,
6100
- rowIndex: index,
6101
- schema: schema,
6102
- openDeleteDialog: openDeleteDialog,
6103
- showSortButtons: appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayTableSortButtons,
6104
- enabled: enabled,
6105
- cells: cells,
6106
- path: path,
6107
- uischema: uischema,
6108
- translations: translations,
6109
- isInReview: isInReview
6110
- }, childPath);
6111
- })
6112
- });
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);
6113
6487
  };
6114
6488
  // eslint-disable-next-line
6115
- class ObjectArrayControl extends React.Component {
6116
- constructor() {
6117
- super(...arguments);
6118
- // eslint-disable-next-line
6119
- this.addItem = (path, value) => this.props.addItem(path, value);
6120
- }
6121
- render() {
6122
- var _a;
6123
- const _b = this.props,
6124
- {
6125
- label,
6126
- path,
6127
- schema,
6128
- rootSchema,
6129
- uischema,
6130
- errors,
6131
- openDeleteDialog,
6132
- visible,
6133
- enabled,
6134
- cells,
6135
- translations,
6136
- data,
6137
- config,
6138
- isStepperReview
6139
- } = _b,
6140
- additionalProps = __rest(_b, ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "translations", "data", "config", "isStepperReview"]);
6141
- const controlElement = uischema;
6142
- // eslint-disable-next-line
6143
- const listTitle = label || ((_a = uischema.options) === null || _a === void 0 ? void 0 : _a.title);
6144
- const isInReview = isStepperReview === true;
6145
- return jsxs(Visible, {
6146
- visible: visible,
6147
- "data-testid": "jsonforms-object-list-wrapper",
6148
- children: [jsxs(ToolBarHeader, {
6149
- children: [isInReview && listTitle && jsx("b", {
6150
- children: listTitle
6151
- }), !isInReview && listTitle && jsx(ObjectArrayTitle, {
6152
- children: listTitle
6153
- }), !isInReview && jsx(ObjectArrayToolBar, {
6154
- errors: errors,
6155
- label: label,
6156
- addItem: this.addItem,
6157
- numColumns: 0,
6158
- path: path,
6159
- uischema: controlElement,
6160
- schema: schema,
6161
- rootSchema: rootSchema,
6162
- enabled: enabled,
6163
- translations: translations
6164
- })]
6165
- }), jsx("div", {
6166
- children: jsx(ObjectArrayList$1, Object.assign({
6167
- path: path,
6168
- schema: schema,
6169
- uischema: uischema,
6170
- enabled: enabled,
6171
- openDeleteDialog: openDeleteDialog,
6172
- translations: translations,
6173
- data: data,
6174
- cells: cells,
6175
- config: config,
6176
- isInReview: isInReview
6177
- }, additionalProps))
6178
- })]
6179
- });
6180
- }
6181
- }
6182
-
6183
- const DeleteDialog = /*#__PURE__*/React.memo(function DeleteDialog({
6184
- open,
6185
- onConfirm,
6186
- onCancel,
6187
- title,
6188
- message
6189
- }) {
6190
- return jsxs(GoAModal, {
6191
- open: open,
6192
- testId: "object-array-modal",
6193
- heading: title,
6194
- children: [jsx(DeleteDialogContent, {
6195
- "data-testid": "object-array-modal-content",
6196
- children: message
6197
- }), jsxs(GoAButtonGroup, {
6198
- alignment: "end",
6199
- children: [jsx(GoAButton, {
6200
- type: "secondary",
6201
- testId: "object-array-modal-button",
6202
- onClick: () => {
6203
- onCancel();
6204
- },
6205
- children: "Cancel"
6206
- }), jsx(GoAButton, {
6207
- type: "primary",
6208
- variant: "destructive",
6209
- testId: "object-array-confirm-button",
6210
- onClick: () => {
6211
- onConfirm();
6212
- },
6213
- children: "Delete"
6214
- })]
6215
- })]
6216
- }, 1);
6217
- });
6218
-
6219
- const ArrayControl = props => {
6489
+ const ObjectArrayControl = props => {
6490
+ var _a, _b, _c;
6491
+ const [registers, dispatch] = useReducer(objectListReducer, initialState);
6220
6492
  const [open, setOpen] = useState(false);
6221
- const [path, setPath] = useState();
6222
6493
  const [rowData, setRowData] = useState(0);
6223
6494
  const {
6224
- removeItems,
6225
- visible
6226
- } = props;
6227
- 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) => {
6228
6514
  setOpen(true);
6229
- setPath(p);
6230
6515
  setRowData(rowIndex);
6231
- }, [setOpen, setPath, setRowData]);
6516
+ }, [setOpen, setRowData]);
6232
6517
  const deleteCancel = useCallback(() => setOpen(false), [setOpen]);
6233
- // eslint-disable-next-line
6234
- const deleteConfirm = useCallback(() => {
6235
- const p = path === null || path === void 0 ? void 0 : path.substring(0, path.lastIndexOf('.'));
6236
- if (removeItems && p) {
6237
- removeItems(p, [rowData])();
6518
+ const deleteConfirm = () => {
6519
+ if (deleteItem && path) {
6520
+ deleteItem(path, rowData);
6238
6521
  }
6239
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(() => {
6240
6587
  // eslint-disable-next-line
6241
- }, [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;
6242
6608
  return jsxs(Visible, {
6243
6609
  visible: visible,
6244
- children: [jsx(ObjectArrayControl, Object.assign({}, props, {
6245
- openDeleteDialog: openDeleteDialog
6246
- })), jsx(DeleteDialog, {
6247
- open: open,
6248
- onCancel: deleteCancel,
6249
- onConfirm: deleteConfirm,
6250
- title: props.translations.deleteDialogTitle || '',
6251
- 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
+ })]
6252
6649
  })]
6253
6650
  });
6254
6651
  };
6255
- 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 => {
6256
6679
  const {
6257
6680
  visible
6258
6681
  } = props;
6259
6682
  return jsx(Visible, {
6260
6683
  visible: visible,
6261
6684
  children: jsx(ObjectArrayControl, Object.assign({}, props, {
6262
- openDeleteDialog: () => {},
6685
+ addItem: () => () => {},
6686
+ translations: {},
6263
6687
  isStepperReview: true,
6264
6688
  enabled: true
6265
6689
  }))
6266
6690
  });
6267
6691
  };
6268
- const GoAArrayControlTester = rankWith(3, or(isObjectArrayControl, isPrimitiveArrayControl));
6269
- const GoAArrayControlRenderer = withJsonFormsArrayLayoutProps(ArrayControl);
6270
- const GoAArrayControlReviewRenderer = withJsonFormsArrayLayoutProps(ArrayBaseReviewControl);
6692
+ const GoAArrayControlRenderer = withJsonFormsControlProps(ArrayControlBase);
6693
+ const GoAArrayControlReviewRenderer = withJsonFormsControlProps(ArrayControlReview);
6271
6694
 
6272
6695
  // eslint-disable-next-line
6273
6696
  const extractScopesFromUISchema = uischema => {
@@ -6726,7 +7149,7 @@ const SearchBox = styled.div(_t$1 || (_t$1 = _$1`
6726
7149
  const LabelDiv = styled.div(_t2 || (_t2 = _$1`
6727
7150
  font-size: var(--fs-sl);
6728
7151
  font-weight: var(--fw-bold);
6729
- padding-bottom: 0.5rem;
7152
+ padding-bottom: 1.5rem;
6730
7153
  `));
6731
7154
 
6732
7155
  const AddressInputs = ({
@@ -6734,7 +7157,8 @@ const AddressInputs = ({
6734
7157
  handleInputChange,
6735
7158
  isAlbertaAddress,
6736
7159
  errors,
6737
- handleOnBlur
7160
+ handleOnBlur,
7161
+ requiredFields
6738
7162
  }) => {
6739
7163
  var _a, _b;
6740
7164
  const provinces = [{
@@ -6795,18 +7219,20 @@ const AddressInputs = ({
6795
7219
  children: [jsx(GoAFormItem, {
6796
7220
  label: "City",
6797
7221
  error: (_a = errors === null || errors === void 0 ? void 0 : errors['municipality']) !== null && _a !== void 0 ? _a : '',
7222
+ requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('municipality')) ? 'required' : 'optional',
6798
7223
  children: jsx(GoAInput, {
6799
- name: "city",
7224
+ name: "municipality",
6800
7225
  testId: "address-form-city",
6801
7226
  ariaLabel: 'address-form-city',
6802
- value: (address === null || address === void 0 ? void 0 : address.city) || '',
7227
+ value: (address === null || address === void 0 ? void 0 : address.municipality) || '',
6803
7228
  onChange: (name, value) => handleInputChange(name, value),
6804
- onBlur: (name, value) => handleOnBlur('municipality'),
7229
+ onBlur: (name, value) => handleOnBlur(name),
6805
7230
  width: "100%"
6806
7231
  })
6807
7232
  }), jsx(GoAFormItem, {
6808
7233
  label: "Postal Code",
6809
7234
  error: (_b = errors === null || errors === void 0 ? void 0 : errors['postalCode']) !== null && _b !== void 0 ? _b : '',
7235
+ requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('postalCode')) ? 'required' : 'optional',
6810
7236
  children: jsx(GoAInput, {
6811
7237
  name: "postalCode",
6812
7238
  testId: "address-form-postal-code",
@@ -6831,7 +7257,7 @@ const AddressInputs = ({
6831
7257
  name: "province",
6832
7258
  testId: "address-form-province-dropdown",
6833
7259
  ariaLabel: 'address-form-province',
6834
- value: (address === null || address === void 0 ? void 0 : address.province) || '',
7260
+ value: (address === null || address === void 0 ? void 0 : address.subdivisionCode) || '',
6835
7261
  onChange: value => handleInputChange('province', value),
6836
7262
  relative: true,
6837
7263
  width: "25ch",
@@ -6851,18 +7277,8 @@ const AddressInputs = ({
6851
7277
  });
6852
7278
  };
6853
7279
 
6854
- var classofRaw = classofRaw$2;
6855
- var uncurryThis$4 = functionUncurryThis;
6856
-
6857
- var functionUncurryThisClause = function (fn) {
6858
- // Nashorn bug:
6859
- // https://github.com/zloirock/core-js/issues/1128
6860
- // https://github.com/zloirock/core-js/issues/1130
6861
- if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
6862
- };
6863
-
6864
7280
  var $$8 = _export;
6865
- var uncurryThis$3 = functionUncurryThisClause;
7281
+ var uncurryThis$2 = functionUncurryThisClause;
6866
7282
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
6867
7283
  var toLength = toLength$4;
6868
7284
  var toString$1 = toString$d;
@@ -6870,7 +7286,7 @@ var notARegExp = notARegexp;
6870
7286
  var requireObjectCoercible$1 = requireObjectCoercible$a;
6871
7287
  var correctIsRegExpLogic = correctIsRegexpLogic;
6872
7288
 
6873
- var slice = uncurryThis$3(''.slice);
7289
+ var slice = uncurryThis$2(''.slice);
6874
7290
  var min = Math.min;
6875
7291
 
6876
7292
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
@@ -6898,12 +7314,12 @@ $$8({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_RE
6898
7314
  var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
6899
7315
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
6900
7316
 
6901
- var uncurryThis$2 = functionUncurryThis;
7317
+ var uncurryThis$1 = functionUncurryThis;
6902
7318
  var requireObjectCoercible = requireObjectCoercible$a;
6903
7319
  var toString = toString$d;
6904
7320
  var whitespaces$1 = whitespaces$2;
6905
7321
 
6906
- var replace = uncurryThis$2(''.replace);
7322
+ var replace = uncurryThis$1(''.replace);
6907
7323
  var ltrim = RegExp('^[' + whitespaces$1 + ']+');
6908
7324
  var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
6909
7325
 
@@ -6995,15 +7411,15 @@ const mapSuggestionToAddress = suggestion => {
6995
7411
  addressLine1 = suggestion.Text.trim();
6996
7412
  }
6997
7413
  const descriptionParts = suggestion.Description.split(',');
6998
- const city = descriptionParts[0].trim();
7414
+ const municipality = descriptionParts[0].trim();
6999
7415
  const provinceAndPostalCode = descriptionParts[1].trim().split(' ');
7000
- const province = provinceAndPostalCode[0];
7416
+ const subdivisionCode = provinceAndPostalCode[0];
7001
7417
  const postalCode = descriptionParts[2].trim();
7002
7418
  return {
7003
7419
  addressLine1,
7004
7420
  addressLine2,
7005
- city,
7006
- province,
7421
+ municipality,
7422
+ subdivisionCode,
7007
7423
  postalCode,
7008
7424
  country: 'CA'
7009
7425
  };
@@ -7021,6 +7437,12 @@ const handlePostalCodeValidation = (validatePc, message, value, errors) => {
7021
7437
  }
7022
7438
  return newErrors;
7023
7439
  };
7440
+ const formatPostalCode = value => {
7441
+ if (value.length >= 4 && value.indexOf(' ') === -1) {
7442
+ return value.slice(0, 3) + ' ' + value.slice(3);
7443
+ }
7444
+ return value;
7445
+ };
7024
7446
 
7025
7447
  let _ = t => t,
7026
7448
  _t;
@@ -7224,8 +7646,8 @@ const AddressLookUpControl = props => {
7224
7646
  const defaultAddress = {
7225
7647
  addressLine1: '',
7226
7648
  addressLine2: '',
7227
- city: '',
7228
- province: isAlbertaAddress ? 'AB' : '',
7649
+ municipality: '',
7650
+ subdivisionCode: isAlbertaAddress ? 'AB' : '',
7229
7651
  postalCode: '',
7230
7652
  country: 'CA'
7231
7653
  };
@@ -7234,6 +7656,7 @@ const AddressLookUpControl = props => {
7234
7656
  const [suggestions, setSuggestions] = useState([]);
7235
7657
  const [loading, setLoading] = useState(false);
7236
7658
  const [errors, setErrors] = useState({});
7659
+ const requiredFields = schema.required;
7237
7660
  const updateFormData = updatedAddress => {
7238
7661
  setAddress(updatedAddress);
7239
7662
  handleChange(path, updatedAddress);
@@ -7245,9 +7668,7 @@ const AddressLookUpControl = props => {
7245
7668
  if (field === 'postalCode') {
7246
7669
  const validatePc = validatePostalCode(value);
7247
7670
  setErrors(handlePostalCodeValidation(validatePc, postalCodeErrorMessage ? postalCodeErrorMessage : '', value, errors));
7248
- if (value.length >= 4 && value.indexOf(' ') === -1) {
7249
- value = value.slice(0, 3) + ' ' + value.slice(3);
7250
- }
7671
+ value = formatPostalCode(value);
7251
7672
  newAddress = Object.assign(Object.assign({}, address), {
7252
7673
  [field]: value.toUpperCase()
7253
7674
  });
@@ -7255,6 +7676,7 @@ const AddressLookUpControl = props => {
7255
7676
  newAddress = Object.assign(Object.assign({}, address), {
7256
7677
  [field]: value
7257
7678
  });
7679
+ delete errors[field];
7258
7680
  }
7259
7681
  setAddress(newAddress);
7260
7682
  updateFormData(newAddress);
@@ -7297,8 +7719,7 @@ const AddressLookUpControl = props => {
7297
7719
  setErrors({});
7298
7720
  };
7299
7721
  const handleRequiredFieldBlur = name => {
7300
- const requiredFields = schema.required;
7301
- if (!(data === null || data === void 0 ? void 0 : data[name]) || data[name] === '' || requiredFields.includes(name)) {
7722
+ if ((!(data === null || data === void 0 ? void 0 : data[name]) || (data === null || data === void 0 ? void 0 : data[name]) === '') && requiredFields.includes(name)) {
7302
7723
  const err = Object.assign({}, errors);
7303
7724
  err[name] = name === 'municipality' ? `city is required` : `${name} is required`;
7304
7725
  setErrors(err);
@@ -7317,10 +7738,10 @@ const AddressLookUpControl = props => {
7317
7738
  name: "addressLine1",
7318
7739
  testId: "address-form-address1",
7319
7740
  ariaLabel: 'address-form-address1',
7320
- placeholder: "Start typing the first line of your address",
7741
+ placeholder: "Start typing the first line of your address, required.",
7321
7742
  value: (address === null || address === void 0 ? void 0 : address.addressLine1) || '',
7322
7743
  onChange: (name, value) => handleDropdownChange(value),
7323
- onBlur: (name, value) => handleRequiredFieldBlur(name),
7744
+ onBlur: name => handleRequiredFieldBlur(name),
7324
7745
  width: "100%"
7325
7746
  }), loading && autocompletion && jsx(GoASkeleton, {
7326
7747
  type: "text",
@@ -7329,7 +7750,7 @@ const AddressLookUpControl = props => {
7329
7750
  className: "suggestions",
7330
7751
  tabIndex: 0,
7331
7752
  children: suggestions && autocompletion && open && suggestions.map((suggestion, index) => jsx("li", {
7332
- onClick: () => handleSuggestionClick(suggestion),
7753
+ onClick: e => handleSuggestionClick(suggestion),
7333
7754
  children: `${suggestion.Text} ${suggestion.Description}`
7334
7755
  }, index))
7335
7756
  })]
@@ -7339,7 +7760,8 @@ const AddressLookUpControl = props => {
7339
7760
  errors: errors,
7340
7761
  handleInputChange: handleInputChange,
7341
7762
  isAlbertaAddress: isAlbertaAddress,
7342
- handleOnBlur: handleRequiredFieldBlur
7763
+ handleOnBlur: handleRequiredFieldBlur,
7764
+ requiredFields: requiredFields
7343
7765
  })]
7344
7766
  });
7345
7767
  };
@@ -7695,12 +8117,12 @@ const createDefaultAjv = (...schemas) => {
7695
8117
  return ajv;
7696
8118
  };
7697
8119
 
7698
- var aCallable$6 = aCallable$9;
8120
+ var aCallable$4 = aCallable$9;
7699
8121
  var toObject = toObject$7;
7700
8122
  var IndexedObject = indexedObject;
7701
- var lengthOfArrayLike$1 = lengthOfArrayLike$5;
8123
+ var lengthOfArrayLike = lengthOfArrayLike$5;
7702
8124
 
7703
- var $TypeError$6 = TypeError;
8125
+ var $TypeError$4 = TypeError;
7704
8126
 
7705
8127
  var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
7706
8128
 
@@ -7709,9 +8131,9 @@ var createMethod = function (IS_RIGHT) {
7709
8131
  return function (that, callbackfn, argumentsLength, memo) {
7710
8132
  var O = toObject(that);
7711
8133
  var self = IndexedObject(O);
7712
- var length = lengthOfArrayLike$1(O);
7713
- aCallable$6(callbackfn);
7714
- if (length === 0 && argumentsLength < 2) throw new $TypeError$6(REDUCE_EMPTY);
8134
+ var length = lengthOfArrayLike(O);
8135
+ aCallable$4(callbackfn);
8136
+ if (length === 0 && argumentsLength < 2) throw new $TypeError$4(REDUCE_EMPTY);
7715
8137
  var index = IS_RIGHT ? length - 1 : 0;
7716
8138
  var i = IS_RIGHT ? -1 : 1;
7717
8139
  if (argumentsLength < 2) while (true) {
@@ -7722,7 +8144,7 @@ var createMethod = function (IS_RIGHT) {
7722
8144
  }
7723
8145
  index += i;
7724
8146
  if (IS_RIGHT ? index < 0 : length <= index) {
7725
- throw new $TypeError$6(REDUCE_EMPTY);
8147
+ throw new $TypeError$4(REDUCE_EMPTY);
7726
8148
  }
7727
8149
  }
7728
8150
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -7752,9 +8174,9 @@ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
7752
8174
  };
7753
8175
 
7754
8176
  var global$7 = global$o;
7755
- var classof$2 = classofRaw$2;
8177
+ var classof$1 = classofRaw$2;
7756
8178
 
7757
- var engineIsNode = classof$2(global$7.process) === 'process';
8179
+ var engineIsNode = classof$1(global$7.process) === 'process';
7758
8180
 
7759
8181
  var $$6 = _export;
7760
8182
  var $reduce = arrayReduce.left;
@@ -7776,26 +8198,26 @@ $$6({ target: 'Array', proto: true, forced: FORCED }, {
7776
8198
  }
7777
8199
  });
7778
8200
 
7779
- var isPrototypeOf$1 = objectIsPrototypeOf;
8201
+ var isPrototypeOf = objectIsPrototypeOf;
7780
8202
 
7781
- var $TypeError$5 = TypeError;
8203
+ var $TypeError$3 = TypeError;
7782
8204
 
7783
8205
  var anInstance$1 = function (it, Prototype) {
7784
- if (isPrototypeOf$1(Prototype, it)) return it;
7785
- throw new $TypeError$5('Incorrect invocation');
8206
+ if (isPrototypeOf(Prototype, it)) return it;
8207
+ throw new $TypeError$3('Incorrect invocation');
7786
8208
  };
7787
8209
 
7788
- var uncurryThis$1 = functionUncurryThis;
8210
+ var uncurryThis = functionUncurryThis;
7789
8211
  var fails$1 = fails$r;
7790
8212
  var isCallable$4 = isCallable$q;
7791
- var classof$1 = classof$9;
8213
+ var classof = classof$9;
7792
8214
  var getBuiltIn$2 = getBuiltIn$9;
7793
8215
  var inspectSource$1 = inspectSource$3;
7794
8216
 
7795
8217
  var noop = function () { /* empty */ };
7796
8218
  var construct = getBuiltIn$2('Reflect', 'construct');
7797
8219
  var constructorRegExp = /^\s*(?:class|function)\b/;
7798
- var exec = uncurryThis$1(constructorRegExp.exec);
8220
+ var exec = uncurryThis(constructorRegExp.exec);
7799
8221
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
7800
8222
 
7801
8223
  var isConstructorModern = function isConstructor(argument) {
@@ -7810,7 +8232,7 @@ var isConstructorModern = function isConstructor(argument) {
7810
8232
 
7811
8233
  var isConstructorLegacy = function isConstructor(argument) {
7812
8234
  if (!isCallable$4(argument)) return false;
7813
- switch (classof$1(argument)) {
8235
+ switch (classof(argument)) {
7814
8236
  case 'AsyncFunction':
7815
8237
  case 'GeneratorFunction':
7816
8238
  case 'AsyncGeneratorFunction': return false;
@@ -7838,49 +8260,35 @@ var isConstructor$1 = !construct || fails$1(function () {
7838
8260
  }) ? isConstructorLegacy : isConstructorModern;
7839
8261
 
7840
8262
  var isConstructor = isConstructor$1;
7841
- var tryToString$2 = tryToString$4;
8263
+ var tryToString = tryToString$4;
7842
8264
 
7843
- var $TypeError$4 = TypeError;
8265
+ var $TypeError$2 = TypeError;
7844
8266
 
7845
8267
  // `Assert: IsConstructor(argument) is true`
7846
8268
  var aConstructor$1 = function (argument) {
7847
8269
  if (isConstructor(argument)) return argument;
7848
- throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
8270
+ throw new $TypeError$2(tryToString(argument) + ' is not a constructor');
7849
8271
  };
7850
8272
 
7851
- var anObject$4 = anObject$f;
8273
+ var anObject$1 = anObject$f;
7852
8274
  var aConstructor = aConstructor$1;
7853
- var isNullOrUndefined$1 = isNullOrUndefined$6;
7854
- var wellKnownSymbol$4 = wellKnownSymbol$j;
8275
+ var isNullOrUndefined = isNullOrUndefined$6;
8276
+ var wellKnownSymbol$2 = wellKnownSymbol$j;
7855
8277
 
7856
- var SPECIES$1 = wellKnownSymbol$4('species');
8278
+ var SPECIES$1 = wellKnownSymbol$2('species');
7857
8279
 
7858
8280
  // `SpeciesConstructor` abstract operation
7859
8281
  // https://tc39.es/ecma262/#sec-speciesconstructor
7860
8282
  var speciesConstructor$1 = function (O, defaultConstructor) {
7861
- var C = anObject$4(O).constructor;
8283
+ var C = anObject$1(O).constructor;
7862
8284
  var S;
7863
- return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
7864
- };
7865
-
7866
- var uncurryThis = functionUncurryThisClause;
7867
- var aCallable$5 = aCallable$9;
7868
- var NATIVE_BIND = functionBindNative;
7869
-
7870
- var bind$4 = uncurryThis(uncurryThis.bind);
7871
-
7872
- // optional / simple context binding
7873
- var functionBindContext = function (fn, that) {
7874
- aCallable$5(fn);
7875
- return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
7876
- return fn.apply(that, arguments);
7877
- };
8285
+ return C === undefined || isNullOrUndefined(S = anObject$1(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
7878
8286
  };
7879
8287
 
7880
- var $TypeError$3 = TypeError;
8288
+ var $TypeError$1 = TypeError;
7881
8289
 
7882
8290
  var validateArgumentsLength$1 = function (passed, required) {
7883
- if (passed < required) throw new $TypeError$3('Not enough arguments');
8291
+ if (passed < required) throw new $TypeError$1('Not enough arguments');
7884
8292
  return passed;
7885
8293
  };
7886
8294
 
@@ -7891,7 +8299,7 @@ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
7891
8299
 
7892
8300
  var global$6 = global$o;
7893
8301
  var apply = functionApply;
7894
- var bind$3 = functionBindContext;
8302
+ var bind$2 = functionBindContext;
7895
8303
  var isCallable$3 = isCallable$q;
7896
8304
  var hasOwn = hasOwnProperty_1;
7897
8305
  var fails = fails$r;
@@ -7973,7 +8381,7 @@ if (!set || !clear) {
7973
8381
  channel = new MessageChannel();
7974
8382
  port = channel.port2;
7975
8383
  channel.port1.onmessage = eventListener;
7976
- defer = bind$3(port.postMessage, port);
8384
+ defer = bind$2(port.postMessage, port);
7977
8385
  // Browsers with postMessage, skip WebWorkers
7978
8386
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
7979
8387
  } else if (
@@ -8054,7 +8462,7 @@ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
8054
8462
 
8055
8463
  var global$4 = global$o;
8056
8464
  var safeGetBuiltIn = safeGetBuiltIn$1;
8057
- var bind$2 = functionBindContext;
8465
+ var bind$1 = functionBindContext;
8058
8466
  var macrotask = task$1.set;
8059
8467
  var Queue$1 = queue$1;
8060
8468
  var IS_IOS = engineIsIos;
@@ -8100,7 +8508,7 @@ if (!microtask$1) {
8100
8508
  promise = Promise$1.resolve(undefined);
8101
8509
  // workaround of WebKit ~ iOS Safari 10.1 bug
8102
8510
  promise.constructor = Promise$1;
8103
- then = bind$2(promise.then, promise);
8511
+ then = bind$1(promise.then, promise);
8104
8512
  notify$1 = function () {
8105
8513
  then(flush);
8106
8514
  };
@@ -8117,7 +8525,7 @@ if (!microtask$1) {
8117
8525
  // - setTimeout
8118
8526
  } else {
8119
8527
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
8120
- macrotask = bind$2(macrotask, global$4);
8528
+ macrotask = bind$1(macrotask, global$4);
8121
8529
  notify$1 = function () {
8122
8530
  macrotask(flush);
8123
8531
  };
@@ -8165,13 +8573,13 @@ var NativePromiseConstructor$3 = promiseNativeConstructor;
8165
8573
  var isCallable$2 = isCallable$q;
8166
8574
  var isForced = isForced_1;
8167
8575
  var inspectSource = inspectSource$3;
8168
- var wellKnownSymbol$3 = wellKnownSymbol$j;
8576
+ var wellKnownSymbol$1 = wellKnownSymbol$j;
8169
8577
  var IS_BROWSER = engineIsBrowser;
8170
8578
  var IS_DENO = engineIsDeno;
8171
8579
  var V8_VERSION = engineV8Version;
8172
8580
 
8173
8581
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
8174
- var SPECIES = wellKnownSymbol$3('species');
8582
+ var SPECIES = wellKnownSymbol$1('species');
8175
8583
  var SUBCLASSING = false;
8176
8584
  var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
8177
8585
 
@@ -8207,19 +8615,19 @@ var promiseConstructorDetection = {
8207
8615
 
8208
8616
  var newPromiseCapability$2 = {};
8209
8617
 
8210
- var aCallable$4 = aCallable$9;
8618
+ var aCallable$3 = aCallable$9;
8211
8619
 
8212
- var $TypeError$2 = TypeError;
8620
+ var $TypeError = TypeError;
8213
8621
 
8214
8622
  var PromiseCapability = function (C) {
8215
8623
  var resolve, reject;
8216
8624
  this.promise = new C(function ($$resolve, $$reject) {
8217
- if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
8625
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
8218
8626
  resolve = $$resolve;
8219
8627
  reject = $$reject;
8220
8628
  });
8221
- this.resolve = aCallable$4(resolve);
8222
- this.reject = aCallable$4(reject);
8629
+ this.resolve = aCallable$3(resolve);
8630
+ this.reject = aCallable$3(reject);
8223
8631
  };
8224
8632
 
8225
8633
  // `NewPromiseCapability` abstract operation
@@ -8231,12 +8639,12 @@ newPromiseCapability$2.f = function (C) {
8231
8639
  var $$5 = _export;
8232
8640
  var IS_NODE = engineIsNode;
8233
8641
  var global$1 = global$o;
8234
- var call$5 = functionCall;
8642
+ var call$2 = functionCall;
8235
8643
  var defineBuiltIn$1 = defineBuiltIn$8;
8236
8644
  var setPrototypeOf = objectSetPrototypeOf;
8237
8645
  var setToStringTag = setToStringTag$4;
8238
8646
  var setSpecies = setSpecies$2;
8239
- var aCallable$3 = aCallable$9;
8647
+ var aCallable$2 = aCallable$9;
8240
8648
  var isCallable$1 = isCallable$q;
8241
8649
  var isObject$1 = isObject$d;
8242
8650
  var anInstance = anInstance$1;
@@ -8309,7 +8717,7 @@ var callReaction = function (reaction, state) {
8309
8717
  if (result === reaction.promise) {
8310
8718
  reject(new TypeError$1('Promise-chain cycle'));
8311
8719
  } else if (then = isThenable(result)) {
8312
- call$5(then, result, resolve, reject);
8720
+ call$2(then, result, resolve, reject);
8313
8721
  } else resolve(result);
8314
8722
  } else reject(value);
8315
8723
  } catch (error) {
@@ -8346,7 +8754,7 @@ var dispatchEvent = function (name, promise, reason) {
8346
8754
  };
8347
8755
 
8348
8756
  var onUnhandled = function (state) {
8349
- call$5(task, global$1, function () {
8757
+ call$2(task, global$1, function () {
8350
8758
  var promise = state.facade;
8351
8759
  var value = state.value;
8352
8760
  var IS_UNHANDLED = isUnhandled(state);
@@ -8369,7 +8777,7 @@ var isUnhandled = function (state) {
8369
8777
  };
8370
8778
 
8371
8779
  var onHandleUnhandled = function (state) {
8372
- call$5(task, global$1, function () {
8780
+ call$2(task, global$1, function () {
8373
8781
  var promise = state.facade;
8374
8782
  if (IS_NODE) {
8375
8783
  process.emit('rejectionHandled', promise);
@@ -8377,7 +8785,7 @@ var onHandleUnhandled = function (state) {
8377
8785
  });
8378
8786
  };
8379
8787
 
8380
- var bind$1 = function (fn, state, unwrap) {
8788
+ var bind = function (fn, state, unwrap) {
8381
8789
  return function (value) {
8382
8790
  fn(state, value, unwrap);
8383
8791
  };
@@ -8403,9 +8811,9 @@ var internalResolve = function (state, value, unwrap) {
8403
8811
  microtask(function () {
8404
8812
  var wrapper = { done: false };
8405
8813
  try {
8406
- call$5(then, value,
8407
- bind$1(internalResolve, wrapper, state),
8408
- bind$1(internalReject, wrapper, state)
8814
+ call$2(then, value,
8815
+ bind(internalResolve, wrapper, state),
8816
+ bind(internalReject, wrapper, state)
8409
8817
  );
8410
8818
  } catch (error) {
8411
8819
  internalReject(wrapper, error, state);
@@ -8426,11 +8834,11 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
8426
8834
  // 25.4.3.1 Promise(executor)
8427
8835
  PromiseConstructor = function Promise(executor) {
8428
8836
  anInstance(this, PromisePrototype);
8429
- aCallable$3(executor);
8430
- call$5(Internal, this);
8837
+ aCallable$2(executor);
8838
+ call$2(Internal, this);
8431
8839
  var state = getInternalPromiseState(this);
8432
8840
  try {
8433
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
8841
+ executor(bind(internalResolve, state), bind(internalReject, state));
8434
8842
  } catch (error) {
8435
8843
  internalReject(state, error);
8436
8844
  }
@@ -8472,8 +8880,8 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
8472
8880
  var promise = new Internal();
8473
8881
  var state = getInternalPromiseState(promise);
8474
8882
  this.promise = promise;
8475
- this.resolve = bind$1(internalResolve, state);
8476
- this.reject = bind$1(internalReject, state);
8883
+ this.resolve = bind(internalResolve, state);
8884
+ this.reject = bind(internalReject, state);
8477
8885
  };
8478
8886
 
8479
8887
  newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
@@ -8490,7 +8898,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
8490
8898
  defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
8491
8899
  var that = this;
8492
8900
  return new PromiseConstructor(function (resolve, reject) {
8493
- call$5(nativeThen, that, resolve, reject);
8901
+ call$2(nativeThen, that, resolve, reject);
8494
8902
  }).then(onFulfilled, onRejected);
8495
8903
  // https://github.com/zloirock/core-js/issues/640
8496
8904
  }, { unsafe: true });
@@ -8515,138 +8923,6 @@ $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTR
8515
8923
  setToStringTag(PromiseConstructor, PROMISE, false);
8516
8924
  setSpecies(PROMISE);
8517
8925
 
8518
- var wellKnownSymbol$2 = wellKnownSymbol$j;
8519
- var Iterators$1 = iterators;
8520
-
8521
- var ITERATOR$2 = wellKnownSymbol$2('iterator');
8522
- var ArrayPrototype = Array.prototype;
8523
-
8524
- // check on default Array iterator
8525
- var isArrayIteratorMethod$1 = function (it) {
8526
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
8527
- };
8528
-
8529
- var classof = classof$9;
8530
- var getMethod$1 = getMethod$5;
8531
- var isNullOrUndefined = isNullOrUndefined$6;
8532
- var Iterators = iterators;
8533
- var wellKnownSymbol$1 = wellKnownSymbol$j;
8534
-
8535
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
8536
-
8537
- var getIteratorMethod$2 = function (it) {
8538
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
8539
- || getMethod$1(it, '@@iterator')
8540
- || Iterators[classof(it)];
8541
- };
8542
-
8543
- var call$4 = functionCall;
8544
- var aCallable$2 = aCallable$9;
8545
- var anObject$3 = anObject$f;
8546
- var tryToString$1 = tryToString$4;
8547
- var getIteratorMethod$1 = getIteratorMethod$2;
8548
-
8549
- var $TypeError$1 = TypeError;
8550
-
8551
- var getIterator$1 = function (argument, usingIterator) {
8552
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
8553
- if (aCallable$2(iteratorMethod)) return anObject$3(call$4(iteratorMethod, argument));
8554
- throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
8555
- };
8556
-
8557
- var call$3 = functionCall;
8558
- var anObject$2 = anObject$f;
8559
- var getMethod = getMethod$5;
8560
-
8561
- var iteratorClose$1 = function (iterator, kind, value) {
8562
- var innerResult, innerError;
8563
- anObject$2(iterator);
8564
- try {
8565
- innerResult = getMethod(iterator, 'return');
8566
- if (!innerResult) {
8567
- if (kind === 'throw') throw value;
8568
- return value;
8569
- }
8570
- innerResult = call$3(innerResult, iterator);
8571
- } catch (error) {
8572
- innerError = true;
8573
- innerResult = error;
8574
- }
8575
- if (kind === 'throw') throw value;
8576
- if (innerError) throw innerResult;
8577
- anObject$2(innerResult);
8578
- return value;
8579
- };
8580
-
8581
- var bind = functionBindContext;
8582
- var call$2 = functionCall;
8583
- var anObject$1 = anObject$f;
8584
- var tryToString = tryToString$4;
8585
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
8586
- var lengthOfArrayLike = lengthOfArrayLike$5;
8587
- var isPrototypeOf = objectIsPrototypeOf;
8588
- var getIterator = getIterator$1;
8589
- var getIteratorMethod = getIteratorMethod$2;
8590
- var iteratorClose = iteratorClose$1;
8591
-
8592
- var $TypeError = TypeError;
8593
-
8594
- var Result = function (stopped, result) {
8595
- this.stopped = stopped;
8596
- this.result = result;
8597
- };
8598
-
8599
- var ResultPrototype = Result.prototype;
8600
-
8601
- var iterate$2 = function (iterable, unboundFunction, options) {
8602
- var that = options && options.that;
8603
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
8604
- var IS_RECORD = !!(options && options.IS_RECORD);
8605
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
8606
- var INTERRUPTED = !!(options && options.INTERRUPTED);
8607
- var fn = bind(unboundFunction, that);
8608
- var iterator, iterFn, index, length, result, next, step;
8609
-
8610
- var stop = function (condition) {
8611
- if (iterator) iteratorClose(iterator, 'normal', condition);
8612
- return new Result(true, condition);
8613
- };
8614
-
8615
- var callFn = function (value) {
8616
- if (AS_ENTRIES) {
8617
- anObject$1(value);
8618
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
8619
- } return INTERRUPTED ? fn(value, stop) : fn(value);
8620
- };
8621
-
8622
- if (IS_RECORD) {
8623
- iterator = iterable.iterator;
8624
- } else if (IS_ITERATOR) {
8625
- iterator = iterable;
8626
- } else {
8627
- iterFn = getIteratorMethod(iterable);
8628
- if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
8629
- // optimisation for array iterators
8630
- if (isArrayIteratorMethod(iterFn)) {
8631
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
8632
- result = callFn(iterable[index]);
8633
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
8634
- } return new Result(false);
8635
- }
8636
- iterator = getIterator(iterable, iterFn);
8637
- }
8638
-
8639
- next = IS_RECORD ? iterable.next : iterator.next;
8640
- while (!(step = call$2(next, iterator)).done) {
8641
- try {
8642
- result = callFn(step.value);
8643
- } catch (error) {
8644
- iteratorClose(iterator, 'throw', error);
8645
- }
8646
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
8647
- } return new Result(false);
8648
- };
8649
-
8650
8926
  var wellKnownSymbol = wellKnownSymbol$j;
8651
8927
 
8652
8928
  var ITERATOR = wellKnownSymbol('iterator');
@@ -8701,7 +8977,7 @@ var call$1 = functionCall;
8701
8977
  var aCallable$1 = aCallable$9;
8702
8978
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
8703
8979
  var perform$1 = perform$3;
8704
- var iterate$1 = iterate$2;
8980
+ var iterate$1 = iterate$3;
8705
8981
  var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
8706
8982
 
8707
8983
  // `Promise.all` method
@@ -8765,7 +9041,7 @@ var call = functionCall;
8765
9041
  var aCallable = aCallable$9;
8766
9042
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
8767
9043
  var perform = perform$3;
8768
- var iterate = iterate$2;
9044
+ var iterate = iterate$3;
8769
9045
  var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
8770
9046
 
8771
9047
  // `Promise.race` method