@abgov/jsonforms-components 1.16.10 → 1.17.0
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 +1100 -1070
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/Context/ContextProvider.d.ts +0 -5
- package/src/lib/Context/register/actions.d.ts +22 -0
- package/src/lib/Context/register/index.d.ts +3 -0
- package/src/lib/Context/register/reducer.d.ts +2 -0
- package/src/lib/Context/register/registerContext.d.ts +15 -0
- package/src/lib/Context/register/util.d.ts +2 -0
- package/src/lib/Controls/Inputs/InputEnum.d.ts +3 -3
- package/src/lib/Controls/Inputs/index.d.ts +0 -1
- package/src/lib/Controls/Inputs/InputEnumAutoComplete.d.ts +0 -10
package/index.esm.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import React, { createContext, useContext,
|
|
2
|
+
import React, { createContext, useContext, useReducer, useMemo, useEffect, useState, useCallback } from 'react';
|
|
3
3
|
import { GoAFormItem, GoAInput, GoATextArea, GoACallout, GoAInputDate, GoAInputDateTime, GoAInputTime, GoADropdown, GoADropdownItem, GoARadioGroup, GoARadioItem, GoACheckbox, GoAGrid, GoAFormStepper, GoAFormStep, GoAPages, GoAButton, GoAModal, GoAButtonGroup, GoAIconButton, GoAFileUploadInput, GoACircularProgress, GoAContainer, GoADetails } from '@abgov/react-components';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import axios from 'axios';
|
|
6
|
+
import get$1 from 'lodash/get';
|
|
5
7
|
import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, getAjv, isVisible, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, Paths, or, isObjectArrayControl, isPrimitiveArrayControl, withIncreasedRank, hasType, isControl, isCategorization, isLayout } from '@jsonforms/core';
|
|
6
8
|
import { withJsonFormsControlProps, withJsonFormsRendererProps, withJsonFormsEnumProps, withTranslateProps, useJsonForms, JsonFormsDispatch, withJsonFormsLayoutProps, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
|
|
7
9
|
import merge from 'lodash/merge';
|
|
8
|
-
import axios from 'axios';
|
|
9
10
|
import isEmpty$1 from 'lodash/isEmpty';
|
|
10
11
|
import range from 'lodash/range';
|
|
11
12
|
import Ajv from 'ajv';
|
|
@@ -1896,11 +1897,46 @@ $$8({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
|
1896
1897
|
exec: exec$1
|
|
1897
1898
|
});
|
|
1898
1899
|
|
|
1900
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1901
|
+
|
|
1899
1902
|
var $$7 = _export;
|
|
1903
|
+
var call$6 = functionCall;
|
|
1904
|
+
var isCallable$6 = isCallable$l;
|
|
1905
|
+
var anObject$3 = anObject$9;
|
|
1906
|
+
var toString$7 = toString$9;
|
|
1907
|
+
|
|
1908
|
+
var DELEGATES_TO_EXEC = function () {
|
|
1909
|
+
var execCalled = false;
|
|
1910
|
+
var re = /[ac]/;
|
|
1911
|
+
re.exec = function () {
|
|
1912
|
+
execCalled = true;
|
|
1913
|
+
return /./.exec.apply(this, arguments);
|
|
1914
|
+
};
|
|
1915
|
+
return re.test('abc') === true && execCalled;
|
|
1916
|
+
}();
|
|
1917
|
+
|
|
1918
|
+
var nativeTest = /./.test;
|
|
1919
|
+
|
|
1920
|
+
// `RegExp.prototype.test` method
|
|
1921
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.test
|
|
1922
|
+
$$7({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
|
|
1923
|
+
test: function (S) {
|
|
1924
|
+
var R = anObject$3(this);
|
|
1925
|
+
var string = toString$7(S);
|
|
1926
|
+
var exec = R.exec;
|
|
1927
|
+
if (!isCallable$6(exec)) return call$6(nativeTest, R, string);
|
|
1928
|
+
var result = call$6(exec, R, string);
|
|
1929
|
+
if (result === null) return false;
|
|
1930
|
+
anObject$3(result);
|
|
1931
|
+
return true;
|
|
1932
|
+
}
|
|
1933
|
+
});
|
|
1934
|
+
|
|
1935
|
+
var $$6 = _export;
|
|
1900
1936
|
var uncurryThis$9 = functionUncurryThis;
|
|
1901
1937
|
var requireObjectCoercible$3 = requireObjectCoercible$7;
|
|
1902
1938
|
var toIntegerOrInfinity$2 = toIntegerOrInfinity$6;
|
|
1903
|
-
var toString$
|
|
1939
|
+
var toString$6 = toString$9;
|
|
1904
1940
|
var fails$7 = fails$m;
|
|
1905
1941
|
|
|
1906
1942
|
var charAt$4 = uncurryThis$9(''.charAt);
|
|
@@ -1912,9 +1948,9 @@ var FORCED$2 = fails$7(function () {
|
|
|
1912
1948
|
|
|
1913
1949
|
// `String.prototype.at` method
|
|
1914
1950
|
// https://tc39.es/ecma262/#sec-string.prototype.at
|
|
1915
|
-
$$
|
|
1951
|
+
$$6({ target: 'String', proto: true, forced: FORCED$2 }, {
|
|
1916
1952
|
at: function at(index) {
|
|
1917
|
-
var S = toString$
|
|
1953
|
+
var S = toString$6(requireObjectCoercible$3(this));
|
|
1918
1954
|
var len = S.length;
|
|
1919
1955
|
var relativeIndex = toIntegerOrInfinity$2(index);
|
|
1920
1956
|
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
@@ -1926,16 +1962,16 @@ var NATIVE_BIND = functionBindNative;
|
|
|
1926
1962
|
|
|
1927
1963
|
var FunctionPrototype = Function.prototype;
|
|
1928
1964
|
var apply$3 = FunctionPrototype.apply;
|
|
1929
|
-
var call$
|
|
1965
|
+
var call$5 = FunctionPrototype.call;
|
|
1930
1966
|
|
|
1931
1967
|
// eslint-disable-next-line es/no-reflect -- safe
|
|
1932
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
1933
|
-
return call$
|
|
1968
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$5.bind(apply$3) : function () {
|
|
1969
|
+
return call$5.apply(apply$3, arguments);
|
|
1934
1970
|
});
|
|
1935
1971
|
|
|
1936
1972
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1937
1973
|
|
|
1938
|
-
var call$
|
|
1974
|
+
var call$4 = functionCall;
|
|
1939
1975
|
var defineBuiltIn$1 = defineBuiltIn$5;
|
|
1940
1976
|
var regexpExec$1 = regexpExec$2;
|
|
1941
1977
|
var fails$6 = fails$m;
|
|
@@ -1995,9 +2031,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
1995
2031
|
// The native String method already delegates to @@method (this
|
|
1996
2032
|
// polyfilled function), leasing to infinite recursion.
|
|
1997
2033
|
// We avoid it by directly calling the native @@method method.
|
|
1998
|
-
return { done: true, value: call$
|
|
2034
|
+
return { done: true, value: call$4(nativeRegExpMethod, regexp, str, arg2) };
|
|
1999
2035
|
}
|
|
2000
|
-
return { done: true, value: call$
|
|
2036
|
+
return { done: true, value: call$4(nativeMethod, str, regexp, arg2) };
|
|
2001
2037
|
}
|
|
2002
2038
|
return { done: false };
|
|
2003
2039
|
});
|
|
@@ -2011,7 +2047,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2011
2047
|
|
|
2012
2048
|
var uncurryThis$8 = functionUncurryThis;
|
|
2013
2049
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$6;
|
|
2014
|
-
var toString$
|
|
2050
|
+
var toString$5 = toString$9;
|
|
2015
2051
|
var requireObjectCoercible$2 = requireObjectCoercible$7;
|
|
2016
2052
|
|
|
2017
2053
|
var charAt$3 = uncurryThis$8(''.charAt);
|
|
@@ -2020,7 +2056,7 @@ var stringSlice$3 = uncurryThis$8(''.slice);
|
|
|
2020
2056
|
|
|
2021
2057
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
2022
2058
|
return function ($this, pos) {
|
|
2023
|
-
var S = toString$
|
|
2059
|
+
var S = toString$5(requireObjectCoercible$2($this));
|
|
2024
2060
|
var position = toIntegerOrInfinity$1(pos);
|
|
2025
2061
|
var size = S.length;
|
|
2026
2062
|
var first, second;
|
|
@@ -2100,9 +2136,9 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
2100
2136
|
});
|
|
2101
2137
|
};
|
|
2102
2138
|
|
|
2103
|
-
var call$
|
|
2104
|
-
var anObject$
|
|
2105
|
-
var isCallable$
|
|
2139
|
+
var call$3 = functionCall;
|
|
2140
|
+
var anObject$2 = anObject$9;
|
|
2141
|
+
var isCallable$5 = isCallable$l;
|
|
2106
2142
|
var classof$3 = classofRaw$1;
|
|
2107
2143
|
var regexpExec = regexpExec$2;
|
|
2108
2144
|
|
|
@@ -2112,26 +2148,26 @@ var $TypeError$3 = TypeError;
|
|
|
2112
2148
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
2113
2149
|
var regexpExecAbstract = function (R, S) {
|
|
2114
2150
|
var exec = R.exec;
|
|
2115
|
-
if (isCallable$
|
|
2116
|
-
var result = call$
|
|
2117
|
-
if (result !== null) anObject$
|
|
2151
|
+
if (isCallable$5(exec)) {
|
|
2152
|
+
var result = call$3(exec, R, S);
|
|
2153
|
+
if (result !== null) anObject$2(result);
|
|
2118
2154
|
return result;
|
|
2119
2155
|
}
|
|
2120
|
-
if (classof$3(R) === 'RegExp') return call$
|
|
2156
|
+
if (classof$3(R) === 'RegExp') return call$3(regexpExec, R, S);
|
|
2121
2157
|
throw new $TypeError$3('RegExp#exec called on incompatible receiver');
|
|
2122
2158
|
};
|
|
2123
2159
|
|
|
2124
2160
|
var apply$2 = functionApply;
|
|
2125
|
-
var call$
|
|
2161
|
+
var call$2 = functionCall;
|
|
2126
2162
|
var uncurryThis$6 = functionUncurryThis;
|
|
2127
2163
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
2128
2164
|
var fails$5 = fails$m;
|
|
2129
|
-
var anObject$
|
|
2130
|
-
var isCallable$
|
|
2165
|
+
var anObject$1 = anObject$9;
|
|
2166
|
+
var isCallable$4 = isCallable$l;
|
|
2131
2167
|
var isNullOrUndefined = isNullOrUndefined$3;
|
|
2132
2168
|
var toIntegerOrInfinity = toIntegerOrInfinity$6;
|
|
2133
2169
|
var toLength = toLength$2;
|
|
2134
|
-
var toString$
|
|
2170
|
+
var toString$4 = toString$9;
|
|
2135
2171
|
var requireObjectCoercible$1 = requireObjectCoercible$7;
|
|
2136
2172
|
var advanceStringIndex = advanceStringIndex$1;
|
|
2137
2173
|
var getMethod = getMethod$2;
|
|
@@ -2188,14 +2224,14 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2188
2224
|
var O = requireObjectCoercible$1(this);
|
|
2189
2225
|
var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
|
|
2190
2226
|
return replacer
|
|
2191
|
-
? call$
|
|
2192
|
-
: call$
|
|
2227
|
+
? call$2(replacer, searchValue, O, replaceValue)
|
|
2228
|
+
: call$2(nativeReplace, toString$4(O), searchValue, replaceValue);
|
|
2193
2229
|
},
|
|
2194
2230
|
// `RegExp.prototype[@@replace]` method
|
|
2195
2231
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2196
2232
|
function (string, replaceValue) {
|
|
2197
|
-
var rx = anObject$
|
|
2198
|
-
var S = toString$
|
|
2233
|
+
var rx = anObject$1(this);
|
|
2234
|
+
var S = toString$4(string);
|
|
2199
2235
|
|
|
2200
2236
|
if (
|
|
2201
2237
|
typeof replaceValue == 'string' &&
|
|
@@ -2206,8 +2242,8 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2206
2242
|
if (res.done) return res.value;
|
|
2207
2243
|
}
|
|
2208
2244
|
|
|
2209
|
-
var functionalReplace = isCallable$
|
|
2210
|
-
if (!functionalReplace) replaceValue = toString$
|
|
2245
|
+
var functionalReplace = isCallable$4(replaceValue);
|
|
2246
|
+
if (!functionalReplace) replaceValue = toString$4(replaceValue);
|
|
2211
2247
|
|
|
2212
2248
|
var global = rx.global;
|
|
2213
2249
|
var fullUnicode;
|
|
@@ -2225,7 +2261,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2225
2261
|
push$1(results, result);
|
|
2226
2262
|
if (!global) break;
|
|
2227
2263
|
|
|
2228
|
-
var matchStr = toString$
|
|
2264
|
+
var matchStr = toString$4(result[0]);
|
|
2229
2265
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
2230
2266
|
}
|
|
2231
2267
|
|
|
@@ -2234,7 +2270,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2234
2270
|
for (var i = 0; i < results.length; i++) {
|
|
2235
2271
|
result = results[i];
|
|
2236
2272
|
|
|
2237
|
-
var matched = toString$
|
|
2273
|
+
var matched = toString$4(result[0]);
|
|
2238
2274
|
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
2239
2275
|
var captures = [];
|
|
2240
2276
|
var replacement;
|
|
@@ -2248,7 +2284,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2248
2284
|
if (functionalReplace) {
|
|
2249
2285
|
var replacerArgs = concat([matched], captures, position, S);
|
|
2250
2286
|
if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
|
|
2251
|
-
replacement = toString$
|
|
2287
|
+
replacement = toString$4(apply$2(replaceValue, undefined, replacerArgs));
|
|
2252
2288
|
} else {
|
|
2253
2289
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
2254
2290
|
}
|
|
@@ -2293,13 +2329,16 @@ const controlScopeMatchesLabel = (scope, label) => {
|
|
|
2293
2329
|
*/
|
|
2294
2330
|
const getLabelText = (scope, label) => {
|
|
2295
2331
|
let labelToUpdate = '';
|
|
2296
|
-
if (controlScopeMatchesLabel(scope, label || '')) {
|
|
2332
|
+
if (controlScopeMatchesLabel(scope, label || '') && !areAllUppercase(label)) {
|
|
2297
2333
|
labelToUpdate = capitalizeFirstLetter(label || '');
|
|
2298
2334
|
} else {
|
|
2299
2335
|
labelToUpdate = label || '';
|
|
2300
2336
|
}
|
|
2301
2337
|
return labelToUpdate;
|
|
2302
2338
|
};
|
|
2339
|
+
const areAllUppercase = label => {
|
|
2340
|
+
return /^[^a-z]*$/.test(label);
|
|
2341
|
+
};
|
|
2303
2342
|
const isEmptyBoolean = (schema, data) => {
|
|
2304
2343
|
return schema.type !== undefined && schema.type === 'boolean' && (data === null || data === undefined);
|
|
2305
2344
|
};
|
|
@@ -2661,21 +2700,259 @@ const Visible = styled.div(_t2$4 || (_t2$4 = _$6`
|
|
|
2661
2700
|
display: ${0};
|
|
2662
2701
|
`), p => p.visible ? 'initial' : 'none');
|
|
2663
2702
|
|
|
2703
|
+
const ADD_REGISTER_DATA_ACTION = 'jsonforms/register/data/add';
|
|
2704
|
+
|
|
2705
|
+
var classof$2 = classofRaw$1;
|
|
2706
|
+
|
|
2707
|
+
// `IsArray` abstract operation
|
|
2708
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
2709
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
2710
|
+
var isArray$2 = Array.isArray || function isArray(argument) {
|
|
2711
|
+
return classof$2(argument) === 'Array';
|
|
2712
|
+
};
|
|
2713
|
+
|
|
2714
|
+
var DESCRIPTORS$2 = descriptors;
|
|
2715
|
+
var isArray$1 = isArray$2;
|
|
2716
|
+
|
|
2717
|
+
var $TypeError$2 = TypeError;
|
|
2718
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2719
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2720
|
+
|
|
2721
|
+
// Safari < 13 does not throw an error in this case
|
|
2722
|
+
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$2 && !function () {
|
|
2723
|
+
// makes no sense without proper strict mode support
|
|
2724
|
+
if (this !== undefined) return true;
|
|
2725
|
+
try {
|
|
2726
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
2727
|
+
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
|
2728
|
+
} catch (error) {
|
|
2729
|
+
return error instanceof TypeError;
|
|
2730
|
+
}
|
|
2731
|
+
}();
|
|
2732
|
+
|
|
2733
|
+
var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
2734
|
+
if (isArray$1(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
|
|
2735
|
+
throw new $TypeError$2('Cannot set read only .length');
|
|
2736
|
+
} return O.length = length;
|
|
2737
|
+
} : function (O, length) {
|
|
2738
|
+
return O.length = length;
|
|
2739
|
+
};
|
|
2740
|
+
|
|
2741
|
+
var $TypeError$1 = TypeError;
|
|
2742
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
2743
|
+
|
|
2744
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
2745
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
|
|
2746
|
+
return it;
|
|
2747
|
+
};
|
|
2748
|
+
|
|
2749
|
+
var $$5 = _export;
|
|
2750
|
+
var toObject = toObject$6;
|
|
2751
|
+
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
2752
|
+
var setArrayLength = arraySetLength;
|
|
2753
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
2754
|
+
var fails$4 = fails$m;
|
|
2755
|
+
|
|
2756
|
+
var INCORRECT_TO_LENGTH = fails$4(function () {
|
|
2757
|
+
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
|
|
2758
|
+
});
|
|
2759
|
+
|
|
2760
|
+
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
|
|
2761
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
|
|
2762
|
+
var properErrorOnNonWritableLength = function () {
|
|
2763
|
+
try {
|
|
2764
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
2765
|
+
Object.defineProperty([], 'length', { writable: false }).push();
|
|
2766
|
+
} catch (error) {
|
|
2767
|
+
return error instanceof TypeError;
|
|
2768
|
+
}
|
|
2769
|
+
};
|
|
2770
|
+
|
|
2771
|
+
var FORCED$1 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
2772
|
+
|
|
2773
|
+
// `Array.prototype.push` method
|
|
2774
|
+
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
2775
|
+
$$5({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
|
|
2776
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2777
|
+
push: function push(item) {
|
|
2778
|
+
var O = toObject(this);
|
|
2779
|
+
var len = lengthOfArrayLike(O);
|
|
2780
|
+
var argCount = arguments.length;
|
|
2781
|
+
doesNotExceedSafeInteger(len + argCount);
|
|
2782
|
+
for (var i = 0; i < argCount; i++) {
|
|
2783
|
+
O[len] = arguments[i];
|
|
2784
|
+
len++;
|
|
2785
|
+
}
|
|
2786
|
+
setArrayLength(O, len);
|
|
2787
|
+
return len;
|
|
2788
|
+
}
|
|
2789
|
+
});
|
|
2790
|
+
|
|
2791
|
+
function registerReducer(registerData, action) {
|
|
2792
|
+
switch (action.type) {
|
|
2793
|
+
case ADD_REGISTER_DATA_ACTION:
|
|
2794
|
+
{
|
|
2795
|
+
registerData.push(action.payload);
|
|
2796
|
+
return [...registerData];
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
return registerData;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
/******************************************************************************
|
|
2803
|
+
Copyright (c) Microsoft Corporation.
|
|
2804
|
+
|
|
2805
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
2806
|
+
purpose with or without fee is hereby granted.
|
|
2807
|
+
|
|
2808
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2809
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2810
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2811
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2812
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2813
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2814
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
2815
|
+
***************************************************************************** */
|
|
2816
|
+
|
|
2817
|
+
function __rest(s, e) {
|
|
2818
|
+
var t = {};
|
|
2819
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2820
|
+
t[p] = s[p];
|
|
2821
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2822
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2823
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2824
|
+
t[p[i]] = s[p[i]];
|
|
2825
|
+
}
|
|
2826
|
+
return t;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2830
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2831
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2832
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2833
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2834
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2835
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
2840
|
+
var e = new Error(message);
|
|
2841
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
2842
|
+
};
|
|
2843
|
+
|
|
2844
|
+
const fetchRegister = props => __awaiter(void 0, void 0, void 0, function* () {
|
|
2845
|
+
let headers = {};
|
|
2846
|
+
const {
|
|
2847
|
+
token,
|
|
2848
|
+
responsePrefixPath,
|
|
2849
|
+
url,
|
|
2850
|
+
objectPathInArray
|
|
2851
|
+
} = props;
|
|
2852
|
+
if (token) {
|
|
2853
|
+
headers = {
|
|
2854
|
+
Authorization: `Bearer ${token}`
|
|
2855
|
+
};
|
|
2856
|
+
}
|
|
2857
|
+
if (url) {
|
|
2858
|
+
try {
|
|
2859
|
+
const res = yield axios.get(url, {
|
|
2860
|
+
headers: headers
|
|
2861
|
+
});
|
|
2862
|
+
// eslint-disable-next-line
|
|
2863
|
+
const responseData = responsePrefixPath ? get$1(res.data, responsePrefixPath) : res.data;
|
|
2864
|
+
if (objectPathInArray) {
|
|
2865
|
+
return responseData === null || responseData === void 0 ? void 0 : responseData.map(d => get$1(d, objectPathInArray));
|
|
2866
|
+
}
|
|
2867
|
+
return responseData;
|
|
2868
|
+
} catch (err) {
|
|
2869
|
+
console.warn(`Error in fetch enum register data from remote: ${err}`);
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
return undefined;
|
|
2873
|
+
});
|
|
2874
|
+
|
|
2875
|
+
const JsonFormsRegisterContext = /*#__PURE__*/createContext(undefined);
|
|
2876
|
+
const JsonFormRegisterProvider = ({
|
|
2877
|
+
children,
|
|
2878
|
+
defaultRegisters
|
|
2879
|
+
}) => {
|
|
2880
|
+
const registerCtx = useContext(JsonFormsRegisterContext);
|
|
2881
|
+
const [registers, dispatch] = useReducer(registerReducer, []);
|
|
2882
|
+
const context = useMemo(() => {
|
|
2883
|
+
return {
|
|
2884
|
+
isProvided: true,
|
|
2885
|
+
registerDispatch: dispatch,
|
|
2886
|
+
selectRegisterDataByUrl: url => {
|
|
2887
|
+
var _a;
|
|
2888
|
+
return ((_a = registers === null || registers === void 0 ? void 0 : registers.find(r => r.url === url)) === null || _a === void 0 ? void 0 : _a.data) || [];
|
|
2889
|
+
},
|
|
2890
|
+
fetchRegisterByUrl: registerConfig => __awaiter(void 0, void 0, void 0, function* () {
|
|
2891
|
+
// Prevent re-freshing remote data
|
|
2892
|
+
if (registers === null || registers === void 0 ? void 0 : registers.find(r => r.url === (registerConfig === null || registerConfig === void 0 ? void 0 : registerConfig.url))) {
|
|
2893
|
+
return;
|
|
2894
|
+
}
|
|
2895
|
+
const data = yield fetchRegister(registerConfig);
|
|
2896
|
+
// TODO: check the data type
|
|
2897
|
+
if (data) {
|
|
2898
|
+
dispatch({
|
|
2899
|
+
type: ADD_REGISTER_DATA_ACTION,
|
|
2900
|
+
payload: Object.assign(Object.assign({}, registerConfig), {
|
|
2901
|
+
data
|
|
2902
|
+
})
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
2905
|
+
})
|
|
2906
|
+
};
|
|
2907
|
+
}, [registers]);
|
|
2908
|
+
useEffect(() => {
|
|
2909
|
+
if (defaultRegisters) {
|
|
2910
|
+
defaultRegisters === null || defaultRegisters === void 0 ? void 0 : defaultRegisters.forEach(register => {
|
|
2911
|
+
if ((register === null || register === void 0 ? void 0 : register.data) !== undefined) {
|
|
2912
|
+
// Register comes with data from remote
|
|
2913
|
+
dispatch({
|
|
2914
|
+
type: ADD_REGISTER_DATA_ACTION,
|
|
2915
|
+
payload: Object.assign({}, register)
|
|
2916
|
+
});
|
|
2917
|
+
} else {
|
|
2918
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
2919
|
+
const data = yield fetchRegister(register);
|
|
2920
|
+
if (data) {
|
|
2921
|
+
dispatch({
|
|
2922
|
+
type: ADD_REGISTER_DATA_ACTION,
|
|
2923
|
+
payload: Object.assign(Object.assign({}, register), {
|
|
2924
|
+
data
|
|
2925
|
+
})
|
|
2926
|
+
});
|
|
2927
|
+
}
|
|
2928
|
+
}))();
|
|
2929
|
+
}
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
}, [dispatch, defaultRegisters]);
|
|
2933
|
+
/* The client might use the context outside of the Jsonform to provide custom register data */
|
|
2934
|
+
if (registerCtx === null || registerCtx === void 0 ? void 0 : registerCtx.isProvided) {
|
|
2935
|
+
return children;
|
|
2936
|
+
}
|
|
2937
|
+
return jsx(JsonFormsRegisterContext.Provider, {
|
|
2938
|
+
value: context,
|
|
2939
|
+
children: children
|
|
2940
|
+
});
|
|
2941
|
+
};
|
|
2942
|
+
|
|
2664
2943
|
const GoAInputBaseControl = props => {
|
|
2665
|
-
var _a, _b
|
|
2944
|
+
var _a, _b;
|
|
2666
2945
|
const {
|
|
2667
2946
|
uischema,
|
|
2668
2947
|
visible,
|
|
2669
2948
|
label,
|
|
2670
2949
|
input,
|
|
2671
|
-
required
|
|
2950
|
+
required,
|
|
2951
|
+
errors
|
|
2672
2952
|
} = props;
|
|
2673
2953
|
const InnerComponent = input;
|
|
2674
2954
|
const labelToUpdate = getLabelText(uischema.scope, label || '');
|
|
2675
|
-
|
|
2676
|
-
if (modifiedErrors === 'should be equal to one of the allowed values' && ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.enumContext)) {
|
|
2677
|
-
modifiedErrors = '';
|
|
2678
|
-
}
|
|
2955
|
+
checkFieldValidity(props);
|
|
2679
2956
|
const getStepStatus = (props, value) => {
|
|
2680
2957
|
return {
|
|
2681
2958
|
id: props.id,
|
|
@@ -2700,15 +2977,18 @@ const GoAInputBaseControl = props => {
|
|
|
2700
2977
|
}
|
|
2701
2978
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2702
2979
|
}, []);
|
|
2703
|
-
return jsx(
|
|
2704
|
-
|
|
2705
|
-
children: jsx(
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2980
|
+
return jsx(JsonFormRegisterProvider, {
|
|
2981
|
+
defaultRegisters: undefined,
|
|
2982
|
+
children: jsx(Visible, {
|
|
2983
|
+
visible: visible,
|
|
2984
|
+
children: jsx(FormFieldWrapper, {
|
|
2985
|
+
children: jsx(GoAFormItem, {
|
|
2986
|
+
requirement: required ? 'required' : undefined,
|
|
2987
|
+
error: '',
|
|
2988
|
+
label: (props === null || props === void 0 ? void 0 : props.noLabel) === true ? '' : labelToUpdate,
|
|
2989
|
+
helpText: typeof ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.help) === 'string' ? (_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.help : '',
|
|
2990
|
+
children: jsx(InnerComponent, Object.assign({}, modifiedProps))
|
|
2991
|
+
})
|
|
2712
2992
|
})
|
|
2713
2993
|
})
|
|
2714
2994
|
});
|
|
@@ -2723,28 +3003,28 @@ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
|
2723
3003
|
return defineProperty$1.f(target, name, descriptor);
|
|
2724
3004
|
};
|
|
2725
3005
|
|
|
2726
|
-
var $$
|
|
2727
|
-
var DESCRIPTORS$
|
|
3006
|
+
var $$4 = _export;
|
|
3007
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2728
3008
|
var global$2 = global$g;
|
|
2729
3009
|
var uncurryThis$5 = functionUncurryThis;
|
|
2730
3010
|
var hasOwn$2 = hasOwnProperty_1;
|
|
2731
|
-
var isCallable$
|
|
3011
|
+
var isCallable$3 = isCallable$l;
|
|
2732
3012
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
2733
|
-
var toString$
|
|
3013
|
+
var toString$3 = toString$9;
|
|
2734
3014
|
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
2735
3015
|
var copyConstructorProperties$1 = copyConstructorProperties$3;
|
|
2736
3016
|
|
|
2737
3017
|
var NativeSymbol = global$2.Symbol;
|
|
2738
3018
|
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
2739
3019
|
|
|
2740
|
-
if (DESCRIPTORS$
|
|
3020
|
+
if (DESCRIPTORS$1 && isCallable$3(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
2741
3021
|
// Safari 12 bug
|
|
2742
3022
|
NativeSymbol().description !== undefined
|
|
2743
3023
|
)) {
|
|
2744
3024
|
var EmptyStringDescriptionStore = {};
|
|
2745
3025
|
// wrap Symbol constructor for correct work with undefined description
|
|
2746
3026
|
var SymbolWrapper = function Symbol() {
|
|
2747
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$
|
|
3027
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$3(arguments[0]);
|
|
2748
3028
|
var result = isPrototypeOf$2(SymbolPrototype, this)
|
|
2749
3029
|
? new NativeSymbol(description)
|
|
2750
3030
|
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
@@ -2775,7 +3055,7 @@ if (DESCRIPTORS$2 && isCallable$4(NativeSymbol) && (!('description' in SymbolPro
|
|
|
2775
3055
|
}
|
|
2776
3056
|
});
|
|
2777
3057
|
|
|
2778
|
-
$$
|
|
3058
|
+
$$4({ global: true, constructor: true, forced: true }, {
|
|
2779
3059
|
Symbol: SymbolWrapper
|
|
2780
3060
|
});
|
|
2781
3061
|
}
|
|
@@ -2989,32 +3269,23 @@ var uncurryThis$4 = functionUncurryThis;
|
|
|
2989
3269
|
|
|
2990
3270
|
var arraySlice$1 = uncurryThis$4([].slice);
|
|
2991
3271
|
|
|
2992
|
-
var classof$2 = classofRaw$1;
|
|
2993
|
-
|
|
2994
|
-
// `IsArray` abstract operation
|
|
2995
|
-
// https://tc39.es/ecma262/#sec-isarray
|
|
2996
|
-
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
2997
|
-
var isArray$2 = Array.isArray || function isArray(argument) {
|
|
2998
|
-
return classof$2(argument) === 'Array';
|
|
2999
|
-
};
|
|
3000
|
-
|
|
3001
3272
|
var uncurryThis$3 = functionUncurryThis;
|
|
3002
|
-
var isArray
|
|
3003
|
-
var isCallable$
|
|
3273
|
+
var isArray = isArray$2;
|
|
3274
|
+
var isCallable$2 = isCallable$l;
|
|
3004
3275
|
var classof$1 = classofRaw$1;
|
|
3005
|
-
var toString$
|
|
3276
|
+
var toString$2 = toString$9;
|
|
3006
3277
|
|
|
3007
3278
|
var push = uncurryThis$3([].push);
|
|
3008
3279
|
|
|
3009
3280
|
var getJsonReplacerFunction = function (replacer) {
|
|
3010
|
-
if (isCallable$
|
|
3011
|
-
if (!isArray
|
|
3281
|
+
if (isCallable$2(replacer)) return replacer;
|
|
3282
|
+
if (!isArray(replacer)) return;
|
|
3012
3283
|
var rawLength = replacer.length;
|
|
3013
3284
|
var keys = [];
|
|
3014
3285
|
for (var i = 0; i < rawLength; i++) {
|
|
3015
3286
|
var element = replacer[i];
|
|
3016
3287
|
if (typeof element == 'string') push(keys, element);
|
|
3017
|
-
else if (typeof element == 'number' || classof$1(element) === 'Number' || classof$1(element) === 'String') push(keys, toString$
|
|
3288
|
+
else if (typeof element == 'number' || classof$1(element) === 'Number' || classof$1(element) === 'String') push(keys, toString$2(element));
|
|
3018
3289
|
}
|
|
3019
3290
|
var keysLength = keys.length;
|
|
3020
3291
|
var root = true;
|
|
@@ -3023,18 +3294,18 @@ var getJsonReplacerFunction = function (replacer) {
|
|
|
3023
3294
|
root = false;
|
|
3024
3295
|
return value;
|
|
3025
3296
|
}
|
|
3026
|
-
if (isArray
|
|
3297
|
+
if (isArray(this)) return value;
|
|
3027
3298
|
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
|
|
3028
3299
|
};
|
|
3029
3300
|
};
|
|
3030
3301
|
|
|
3031
|
-
var $$
|
|
3302
|
+
var $$3 = _export;
|
|
3032
3303
|
var getBuiltIn$1 = getBuiltIn$5;
|
|
3033
3304
|
var apply$1 = functionApply;
|
|
3034
|
-
var call$
|
|
3305
|
+
var call$1 = functionCall;
|
|
3035
3306
|
var uncurryThis$2 = functionUncurryThis;
|
|
3036
|
-
var fails$
|
|
3037
|
-
var isCallable$
|
|
3307
|
+
var fails$3 = fails$m;
|
|
3308
|
+
var isCallable$1 = isCallable$l;
|
|
3038
3309
|
var isSymbol = isSymbol$3;
|
|
3039
3310
|
var arraySlice = arraySlice$1;
|
|
3040
3311
|
var getReplacerFunction = getJsonReplacerFunction;
|
|
@@ -3052,7 +3323,7 @@ var tester = /[\uD800-\uDFFF]/g;
|
|
|
3052
3323
|
var low = /^[\uD800-\uDBFF]$/;
|
|
3053
3324
|
var hi = /^[\uDC00-\uDFFF]$/;
|
|
3054
3325
|
|
|
3055
|
-
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$
|
|
3326
|
+
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$3(function () {
|
|
3056
3327
|
var symbol = getBuiltIn$1('Symbol')('stringify detection');
|
|
3057
3328
|
// MS Edge converts symbol values to JSON as {}
|
|
3058
3329
|
return $stringify([symbol]) !== '[null]'
|
|
@@ -3063,7 +3334,7 @@ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$4(function () {
|
|
|
3063
3334
|
});
|
|
3064
3335
|
|
|
3065
3336
|
// https://github.com/tc39/proposal-well-formed-stringify
|
|
3066
|
-
var ILL_FORMED_UNICODE = fails$
|
|
3337
|
+
var ILL_FORMED_UNICODE = fails$3(function () {
|
|
3067
3338
|
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
|
3068
3339
|
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
3069
3340
|
});
|
|
@@ -3071,10 +3342,10 @@ var ILL_FORMED_UNICODE = fails$4(function () {
|
|
|
3071
3342
|
var stringifyWithSymbolsFix = function (it, replacer) {
|
|
3072
3343
|
var args = arraySlice(arguments);
|
|
3073
3344
|
var $replacer = getReplacerFunction(replacer);
|
|
3074
|
-
if (!isCallable$
|
|
3345
|
+
if (!isCallable$1($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
|
|
3075
3346
|
args[1] = function (key, value) {
|
|
3076
3347
|
// some old implementations (like WebKit) could pass numbers as keys
|
|
3077
|
-
if (isCallable$
|
|
3348
|
+
if (isCallable$1($replacer)) value = call$1($replacer, this, $String(key), value);
|
|
3078
3349
|
if (!isSymbol(value)) return value;
|
|
3079
3350
|
};
|
|
3080
3351
|
return apply$1($stringify, null, args);
|
|
@@ -3091,7 +3362,7 @@ var fixIllFormed = function (match, offset, string) {
|
|
|
3091
3362
|
if ($stringify) {
|
|
3092
3363
|
// `JSON.stringify` method
|
|
3093
3364
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
3094
|
-
$$
|
|
3365
|
+
$$3({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
|
3095
3366
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
3096
3367
|
stringify: function stringify(it, replacer, space) {
|
|
3097
3368
|
var args = arraySlice(arguments);
|
|
@@ -3346,1005 +3617,802 @@ const GoATimeControl = props => jsx(GoAInputBaseControl, Object.assign({}, props
|
|
|
3346
3617
|
const GoATimeControlTester = rankWith(4, isTimeControl);
|
|
3347
3618
|
const GoAInputTimeControl = withJsonFormsControlProps(GoATimeControl);
|
|
3348
3619
|
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
return $this;
|
|
3376
|
-
};
|
|
3377
|
-
|
|
3378
|
-
var toString$2 = toString$9;
|
|
3379
|
-
|
|
3380
|
-
var normalizeStringArgument$1 = function (argument, $default) {
|
|
3381
|
-
return argument === undefined ? arguments.length < 2 ? '' : $default : toString$2(argument);
|
|
3382
|
-
};
|
|
3383
|
-
|
|
3384
|
-
var isObject$1 = isObject$b;
|
|
3385
|
-
var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
|
|
3386
|
-
|
|
3387
|
-
// `InstallErrorCause` abstract operation
|
|
3388
|
-
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
|
|
3389
|
-
var installErrorCause$1 = function (O, options) {
|
|
3390
|
-
if (isObject$1(options) && 'cause' in options) {
|
|
3391
|
-
createNonEnumerableProperty$2(O, 'cause', options.cause);
|
|
3620
|
+
function fetchRegisterConfigFromOptions(options) {
|
|
3621
|
+
if (!(options === null || options === void 0 ? void 0 : options.url)) return undefined;
|
|
3622
|
+
const config = Object.assign({}, options);
|
|
3623
|
+
return config;
|
|
3624
|
+
}
|
|
3625
|
+
const EnumSelect = props => {
|
|
3626
|
+
var _a, _b, _c, _d, _e;
|
|
3627
|
+
const {
|
|
3628
|
+
data,
|
|
3629
|
+
id,
|
|
3630
|
+
enabled,
|
|
3631
|
+
errors,
|
|
3632
|
+
schema,
|
|
3633
|
+
path,
|
|
3634
|
+
handleChange,
|
|
3635
|
+
options,
|
|
3636
|
+
config,
|
|
3637
|
+
label,
|
|
3638
|
+
uischema,
|
|
3639
|
+
required
|
|
3640
|
+
} = props;
|
|
3641
|
+
const registerCtx = useContext(JsonFormsRegisterContext);
|
|
3642
|
+
const registerConfig = fetchRegisterConfigFromOptions((_b = (_a = props.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.register);
|
|
3643
|
+
let registerData = [];
|
|
3644
|
+
if (registerConfig) {
|
|
3645
|
+
registerData = registerCtx === null || registerCtx === void 0 ? void 0 : registerCtx.selectRegisterDataByUrl(registerConfig.url);
|
|
3392
3646
|
}
|
|
3647
|
+
const autocompletion = ((_d = (_c = props.uischema) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.autocomplete) === true;
|
|
3648
|
+
const appliedUiSchemaOptions = merge({}, config, props.uischema.options);
|
|
3649
|
+
const mergedOptions = useMemo(() => {
|
|
3650
|
+
return [...(options || []), ...registerData.map(d => {
|
|
3651
|
+
return {
|
|
3652
|
+
value: d,
|
|
3653
|
+
label: d
|
|
3654
|
+
};
|
|
3655
|
+
})];
|
|
3656
|
+
}, [registerData, options]);
|
|
3657
|
+
useEffect(() => {
|
|
3658
|
+
if (registerConfig) {
|
|
3659
|
+
registerCtx === null || registerCtx === void 0 ? void 0 : registerCtx.fetchRegisterByUrl(registerConfig);
|
|
3660
|
+
}
|
|
3661
|
+
}, [registerCtx, registerConfig]);
|
|
3662
|
+
return jsx(GoADropdown, Object.assign({
|
|
3663
|
+
name: `${label}`,
|
|
3664
|
+
value: data,
|
|
3665
|
+
disabled: !enabled,
|
|
3666
|
+
relative: true,
|
|
3667
|
+
width: "100%",
|
|
3668
|
+
filterable: autocompletion,
|
|
3669
|
+
testId: `${id || label}-jsonform`
|
|
3670
|
+
}, appliedUiSchemaOptions, {
|
|
3671
|
+
onChange: (name, value) => {
|
|
3672
|
+
handleChange(path, value);
|
|
3673
|
+
}
|
|
3674
|
+
}, (_e = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _e === void 0 ? void 0 : _e.componentProps, {
|
|
3675
|
+
children: mergedOptions === null || mergedOptions === void 0 ? void 0 : mergedOptions.map(item => {
|
|
3676
|
+
return jsx(GoADropdownItem, {
|
|
3677
|
+
value: `${item.value}`,
|
|
3678
|
+
label: `${item.label}`
|
|
3679
|
+
}, `json-form-dropdown-${item.value}`);
|
|
3680
|
+
})
|
|
3681
|
+
}), `${id}-jsonform-key`);
|
|
3393
3682
|
};
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
var replace = uncurryThis$1(''.replace);
|
|
3399
|
-
|
|
3400
|
-
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
|
|
3401
|
-
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
3402
|
-
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
|
3403
|
-
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
|
3404
|
-
|
|
3405
|
-
var errorStackClear = function (stack, dropEntries) {
|
|
3406
|
-
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
|
3407
|
-
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
|
3408
|
-
} return stack;
|
|
3683
|
+
const enumControl = props => {
|
|
3684
|
+
return jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
3685
|
+
input: EnumSelect
|
|
3686
|
+
}));
|
|
3409
3687
|
};
|
|
3688
|
+
const GoAEnumControlTester = rankWith(2, isEnumControl);
|
|
3689
|
+
// HOC order can be reversed with https://github.com/eclipsesource/jsonforms/issues/1987
|
|
3690
|
+
const GoAEnumControl = withJsonFormsEnumProps(withTranslateProps(enumControl), true);
|
|
3410
3691
|
|
|
3411
|
-
|
|
3412
|
-
var
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3692
|
+
const RadioGroup = props => {
|
|
3693
|
+
var _a;
|
|
3694
|
+
const {
|
|
3695
|
+
data,
|
|
3696
|
+
className,
|
|
3697
|
+
id,
|
|
3698
|
+
enabled,
|
|
3699
|
+
schema,
|
|
3700
|
+
uischema,
|
|
3701
|
+
path,
|
|
3702
|
+
handleChange,
|
|
3703
|
+
options,
|
|
3704
|
+
config,
|
|
3705
|
+
label,
|
|
3706
|
+
t
|
|
3707
|
+
} = props;
|
|
3708
|
+
const enumData = (schema === null || schema === void 0 ? void 0 : schema.enum) || [];
|
|
3709
|
+
const appliedUiSchemaOptions = merge({}, config, props.uischema.options, options);
|
|
3710
|
+
const errorsFormInput = checkFieldValidity(props);
|
|
3711
|
+
return jsx(GoARadioGroup, Object.assign({
|
|
3712
|
+
error: errorsFormInput.length > 0,
|
|
3713
|
+
name: `${options || appliedUiSchemaOptions.label}`,
|
|
3714
|
+
testId: `${label || id}-jsonforms-radio`,
|
|
3715
|
+
value: data,
|
|
3716
|
+
disabled: !enabled
|
|
3717
|
+
}, appliedUiSchemaOptions, {
|
|
3718
|
+
onChange: (name, value) => handleChange(path, value)
|
|
3719
|
+
}, (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps, {
|
|
3720
|
+
children: enumData.map(enumValue => {
|
|
3721
|
+
return jsx(GoARadioItem, Object.assign({
|
|
3722
|
+
name: enumValue,
|
|
3723
|
+
value: `${enumValue}`
|
|
3724
|
+
}, appliedUiSchemaOptions, {
|
|
3725
|
+
label: enumValue
|
|
3726
|
+
}));
|
|
3727
|
+
})
|
|
3728
|
+
}));
|
|
3434
3729
|
};
|
|
3730
|
+
const EnumRadioControl = props => {
|
|
3731
|
+
return jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
3732
|
+
input: RadioGroup
|
|
3733
|
+
}));
|
|
3734
|
+
};
|
|
3735
|
+
const GoAEnumRadioGroupControl = withJsonFormsEnumProps(withTranslateProps(EnumRadioControl), true);
|
|
3736
|
+
const GoARadioGroupControlTester = rankWith(20, and(isEnumControl, optionIs('format', 'radio')));
|
|
3435
3737
|
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
var
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
var ERROR_NAME = path[path.length - 1];
|
|
3454
|
-
var OriginalError = getBuiltIn.apply(null, path);
|
|
3455
|
-
|
|
3456
|
-
if (!OriginalError) return;
|
|
3457
|
-
|
|
3458
|
-
var OriginalErrorPrototype = OriginalError.prototype;
|
|
3459
|
-
|
|
3460
|
-
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
3461
|
-
if (hasOwn$1(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
3462
|
-
|
|
3463
|
-
if (!FORCED) return OriginalError;
|
|
3464
|
-
|
|
3465
|
-
var BaseError = getBuiltIn('Error');
|
|
3466
|
-
|
|
3467
|
-
var WrappedError = wrapper(function (a, b) {
|
|
3468
|
-
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
|
|
3469
|
-
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
3470
|
-
if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
|
|
3471
|
-
installErrorStack(result, WrappedError, result.stack, 2);
|
|
3472
|
-
if (this && isPrototypeOf$1(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
3473
|
-
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
3474
|
-
return result;
|
|
3738
|
+
const BooleanComponent = ({
|
|
3739
|
+
data,
|
|
3740
|
+
enabled,
|
|
3741
|
+
uischema,
|
|
3742
|
+
handleChange,
|
|
3743
|
+
path,
|
|
3744
|
+
label,
|
|
3745
|
+
required,
|
|
3746
|
+
errors
|
|
3747
|
+
}) => {
|
|
3748
|
+
var _a;
|
|
3749
|
+
const errorsFormInput = checkFieldValidity({
|
|
3750
|
+
data,
|
|
3751
|
+
uischema,
|
|
3752
|
+
label,
|
|
3753
|
+
required,
|
|
3754
|
+
errors
|
|
3475
3755
|
});
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
copyConstructorProperties(WrappedError, OriginalError);
|
|
3488
|
-
|
|
3489
|
-
try {
|
|
3490
|
-
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
|
|
3491
|
-
if (OriginalErrorPrototype.name !== ERROR_NAME) {
|
|
3492
|
-
createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
|
|
3756
|
+
const text = label + (required ? ' (required)' : '');
|
|
3757
|
+
return jsx(GoACheckbox, Object.assign({
|
|
3758
|
+
error: errorsFormInput.length > 0,
|
|
3759
|
+
testId: `${path}-checkbox-test-id`,
|
|
3760
|
+
disabled: !enabled,
|
|
3761
|
+
text: text,
|
|
3762
|
+
name: `${path}`,
|
|
3763
|
+
checked: data,
|
|
3764
|
+
onChange: (_, checked) => {
|
|
3765
|
+
handleChange(path, checked);
|
|
3493
3766
|
}
|
|
3494
|
-
|
|
3495
|
-
} catch (error) { /* empty */ }
|
|
3496
|
-
|
|
3497
|
-
return WrappedError;
|
|
3767
|
+
}, (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps));
|
|
3498
3768
|
};
|
|
3769
|
+
const BooleanControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
3770
|
+
noLabel: true,
|
|
3771
|
+
input: BooleanComponent
|
|
3772
|
+
}));
|
|
3773
|
+
const GoABooleanControlTester = rankWith(2, isBooleanControl);
|
|
3774
|
+
const GoABooleanControl = withJsonFormsControlProps(BooleanControl);
|
|
3499
3775
|
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
var
|
|
3514
|
-
|
|
3515
|
-
|
|
3776
|
+
const BooleanRadioComponent = ({
|
|
3777
|
+
data,
|
|
3778
|
+
visible,
|
|
3779
|
+
enabled,
|
|
3780
|
+
uischema,
|
|
3781
|
+
handleChange,
|
|
3782
|
+
path,
|
|
3783
|
+
config,
|
|
3784
|
+
label,
|
|
3785
|
+
required,
|
|
3786
|
+
errors,
|
|
3787
|
+
description
|
|
3788
|
+
}) => {
|
|
3789
|
+
var _a;
|
|
3790
|
+
const appliedUiSchemaOptions = Object.assign(Object.assign({}, config), uischema === null || uischema === void 0 ? void 0 : uischema.options);
|
|
3791
|
+
const TrueValue = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.textForTrue) || 'Yes';
|
|
3792
|
+
const FalseValue = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.textForFalse) || 'No';
|
|
3793
|
+
const EnableDescription = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.enableDescription) === true;
|
|
3794
|
+
const TrueDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForTrue);
|
|
3795
|
+
const FalseDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForFalse);
|
|
3796
|
+
const BaseTestId = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${path}-boolean-radio-jsonform`;
|
|
3797
|
+
const errorsFormInput = checkFieldValidity({
|
|
3798
|
+
data,
|
|
3799
|
+
uischema,
|
|
3800
|
+
label,
|
|
3801
|
+
required,
|
|
3802
|
+
errors
|
|
3803
|
+
});
|
|
3804
|
+
return jsx(Visible, {
|
|
3805
|
+
visible: visible,
|
|
3806
|
+
children: jsxs(GoARadioGroup, Object.assign({
|
|
3807
|
+
error: errorsFormInput.length > 0,
|
|
3808
|
+
name: `${label}`,
|
|
3809
|
+
value: data === true ? TrueValue : data === false ? FalseValue : null,
|
|
3810
|
+
disabled: !enabled,
|
|
3811
|
+
testId: BaseTestId,
|
|
3812
|
+
onChange: (_name, value) => {
|
|
3813
|
+
if (value === TrueValue) {
|
|
3814
|
+
handleChange(path, true);
|
|
3815
|
+
}
|
|
3816
|
+
if (value === FalseValue) {
|
|
3817
|
+
handleChange(path, false);
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
}, (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps, {
|
|
3821
|
+
children: [jsx(GoARadioItem, {
|
|
3822
|
+
value: TrueValue,
|
|
3823
|
+
testId: `${BaseTestId}-yes-option`,
|
|
3824
|
+
description: EnableDescription ? TrueDescription : null
|
|
3825
|
+
}), jsx(GoARadioItem, {
|
|
3826
|
+
value: FalseValue,
|
|
3827
|
+
testId: `${BaseTestId}-no-option`,
|
|
3828
|
+
description: EnableDescription ? FalseDescription : null
|
|
3829
|
+
})]
|
|
3830
|
+
}))
|
|
3831
|
+
});
|
|
3516
3832
|
};
|
|
3833
|
+
const BooleanRadioControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
3834
|
+
input: BooleanRadioComponent
|
|
3835
|
+
}));
|
|
3836
|
+
const GoABooleanRadioControlTester = rankWith(3, and(isBooleanControl, optionIs('radio', true)));
|
|
3837
|
+
const GoABooleanRadioControl = withJsonFormsControlProps(BooleanRadioControl);
|
|
3517
3838
|
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3839
|
+
const renderLayoutElements = (elements, schema, path, enabled, renderers, cells) => {
|
|
3840
|
+
return elements.map((child, index) => jsx("div", {
|
|
3841
|
+
children: jsx(JsonFormsDispatch, {
|
|
3842
|
+
uischema: child,
|
|
3843
|
+
schema: schema,
|
|
3844
|
+
path: path,
|
|
3845
|
+
enabled: enabled,
|
|
3846
|
+
renderers: renderers,
|
|
3847
|
+
cells: cells
|
|
3848
|
+
}, path)
|
|
3849
|
+
}, index));
|
|
3850
|
+
};
|
|
3851
|
+
const withAjvProps = Component => function WithAjvProps(props) {
|
|
3852
|
+
const ctx = useJsonForms();
|
|
3853
|
+
const ajv = getAjv({
|
|
3854
|
+
jsonforms: Object.assign({}, ctx)
|
|
3855
|
+
});
|
|
3856
|
+
return jsx(Component, Object.assign({}, props, {
|
|
3857
|
+
ajv: ajv
|
|
3858
|
+
}));
|
|
3859
|
+
};
|
|
3860
|
+
const LayoutRenderer = ({
|
|
3861
|
+
elements,
|
|
3862
|
+
schema,
|
|
3863
|
+
path,
|
|
3864
|
+
enabled,
|
|
3865
|
+
direction,
|
|
3866
|
+
renderers,
|
|
3867
|
+
cells,
|
|
3868
|
+
visible
|
|
3869
|
+
}) => {
|
|
3870
|
+
if (isEmpty$1(elements)) {
|
|
3871
|
+
return null;
|
|
3872
|
+
} else {
|
|
3873
|
+
if (direction === 'row') {
|
|
3874
|
+
return jsx(Visible, {
|
|
3875
|
+
visible: visible,
|
|
3876
|
+
children: jsx(GoAGrid, {
|
|
3877
|
+
minChildWidth: "10ch",
|
|
3878
|
+
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
3879
|
+
})
|
|
3880
|
+
});
|
|
3881
|
+
} else {
|
|
3882
|
+
return jsx(Visible, {
|
|
3883
|
+
visible: visible,
|
|
3884
|
+
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
3885
|
+
});
|
|
3886
|
+
}
|
|
3523
3887
|
}
|
|
3524
3888
|
};
|
|
3525
3889
|
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
});
|
|
3539
|
-
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
|
|
3540
|
-
return function SyntaxError(message) { return apply(init, this, arguments); };
|
|
3541
|
-
});
|
|
3542
|
-
exportGlobalErrorCauseWrapper('TypeError', function (init) {
|
|
3543
|
-
return function TypeError(message) { return apply(init, this, arguments); };
|
|
3544
|
-
});
|
|
3545
|
-
exportGlobalErrorCauseWrapper('URIError', function (init) {
|
|
3546
|
-
return function URIError(message) { return apply(init, this, arguments); };
|
|
3547
|
-
});
|
|
3548
|
-
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
|
|
3549
|
-
return function CompileError(message) { return apply(init, this, arguments); };
|
|
3550
|
-
});
|
|
3551
|
-
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
|
|
3552
|
-
return function LinkError(message) { return apply(init, this, arguments); };
|
|
3553
|
-
});
|
|
3554
|
-
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
3555
|
-
return function RuntimeError(message) { return apply(init, this, arguments); };
|
|
3556
|
-
});
|
|
3557
|
-
|
|
3558
|
-
var $$3 = _export;
|
|
3559
|
-
var $includes = arrayIncludes.includes;
|
|
3560
|
-
var fails$2 = fails$m;
|
|
3561
|
-
var addToUnscopables = addToUnscopables$3;
|
|
3562
|
-
|
|
3563
|
-
// FF99+ bug
|
|
3564
|
-
var BROKEN_ON_SPARSE = fails$2(function () {
|
|
3565
|
-
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
3566
|
-
return !Array(1).includes();
|
|
3567
|
-
});
|
|
3890
|
+
let _$5 = t => t,
|
|
3891
|
+
_t$5,
|
|
3892
|
+
_t2$3;
|
|
3893
|
+
const Grid = styled.div(_t$5 || (_t$5 = _$5`
|
|
3894
|
+
display: flex;
|
|
3895
|
+
flex-direction: row;
|
|
3896
|
+
flex-wrap: wrap;
|
|
3897
|
+
justify-content: space-between;
|
|
3898
|
+
align-items: stretch;
|
|
3899
|
+
`));
|
|
3900
|
+
const GridItem = styled.div(_t2$3 || (_t2$3 = _$5`
|
|
3901
|
+
margin-bottom: ${0};
|
|
3568
3902
|
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
includes: function includes(el /* , fromIndex = 0 */) {
|
|
3573
|
-
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
3903
|
+
> .goa-card {
|
|
3904
|
+
height: 100% !important;
|
|
3905
|
+
width: 100% !important;
|
|
3574
3906
|
}
|
|
3575
|
-
});
|
|
3576
|
-
|
|
3577
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3578
|
-
addToUnscopables('includes');
|
|
3579
|
-
|
|
3580
|
-
var DESCRIPTORS = descriptors;
|
|
3581
|
-
var isArray = isArray$2;
|
|
3582
|
-
|
|
3583
|
-
var $TypeError$2 = TypeError;
|
|
3584
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
3585
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
3586
3907
|
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
// makes no sense without proper strict mode support
|
|
3590
|
-
if (this !== undefined) return true;
|
|
3591
|
-
try {
|
|
3592
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
3593
|
-
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
|
3594
|
-
} catch (error) {
|
|
3595
|
-
return error instanceof TypeError;
|
|
3908
|
+
> img {
|
|
3909
|
+
width: 100%;
|
|
3596
3910
|
}
|
|
3597
|
-
}();
|
|
3598
|
-
|
|
3599
|
-
var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
3600
|
-
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
|
|
3601
|
-
throw new $TypeError$2('Cannot set read only .length');
|
|
3602
|
-
} return O.length = length;
|
|
3603
|
-
} : function (O, length) {
|
|
3604
|
-
return O.length = length;
|
|
3605
|
-
};
|
|
3606
|
-
|
|
3607
|
-
var $TypeError$1 = TypeError;
|
|
3608
|
-
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
3609
|
-
|
|
3610
|
-
var doesNotExceedSafeInteger$1 = function (it) {
|
|
3611
|
-
if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
|
|
3612
|
-
return it;
|
|
3613
|
-
};
|
|
3614
|
-
|
|
3615
|
-
var $$2 = _export;
|
|
3616
|
-
var toObject = toObject$6;
|
|
3617
|
-
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
3618
|
-
var setArrayLength = arraySetLength;
|
|
3619
|
-
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
3620
|
-
var fails$1 = fails$m;
|
|
3621
3911
|
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
});
|
|
3912
|
+
flex: 0 1
|
|
3913
|
+
${0};
|
|
3625
3914
|
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
var properErrorOnNonWritableLength = function () {
|
|
3629
|
-
try {
|
|
3630
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
3631
|
-
Object.defineProperty([], 'length', { writable: false }).push();
|
|
3632
|
-
} catch (error) {
|
|
3633
|
-
return error instanceof TypeError;
|
|
3915
|
+
@media (min-width: 768px) {
|
|
3916
|
+
flex-basis: ${0};
|
|
3634
3917
|
}
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
3638
|
-
|
|
3639
|
-
// `Array.prototype.push` method
|
|
3640
|
-
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
3641
|
-
$$2({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
3642
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
3643
|
-
push: function push(item) {
|
|
3644
|
-
var O = toObject(this);
|
|
3645
|
-
var len = lengthOfArrayLike(O);
|
|
3646
|
-
var argCount = arguments.length;
|
|
3647
|
-
doesNotExceedSafeInteger(len + argCount);
|
|
3648
|
-
for (var i = 0; i < argCount; i++) {
|
|
3649
|
-
O[len] = arguments[i];
|
|
3650
|
-
len++;
|
|
3651
|
-
}
|
|
3652
|
-
setArrayLength(O, len);
|
|
3653
|
-
return len;
|
|
3918
|
+
@media (min-width: 1024px) {
|
|
3919
|
+
flex-basis: ${0};
|
|
3654
3920
|
}
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
var isObject = isObject$b;
|
|
3658
|
-
var classof = classofRaw$1;
|
|
3659
|
-
var wellKnownSymbol$1 = wellKnownSymbol$c;
|
|
3660
|
-
|
|
3661
|
-
var MATCH$1 = wellKnownSymbol$1('match');
|
|
3662
|
-
|
|
3663
|
-
// `IsRegExp` abstract operation
|
|
3664
|
-
// https://tc39.es/ecma262/#sec-isregexp
|
|
3665
|
-
var isRegexp = function (it) {
|
|
3666
|
-
var isRegExp;
|
|
3667
|
-
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
|
|
3668
|
-
};
|
|
3669
|
-
|
|
3670
|
-
var isRegExp = isRegexp;
|
|
3671
|
-
|
|
3672
|
-
var $TypeError = TypeError;
|
|
3673
|
-
|
|
3674
|
-
var notARegexp = function (it) {
|
|
3675
|
-
if (isRegExp(it)) {
|
|
3676
|
-
throw new $TypeError("The method doesn't accept regular expressions");
|
|
3677
|
-
} return it;
|
|
3678
|
-
};
|
|
3679
|
-
|
|
3680
|
-
var wellKnownSymbol = wellKnownSymbol$c;
|
|
3681
|
-
|
|
3682
|
-
var MATCH = wellKnownSymbol('match');
|
|
3683
|
-
|
|
3684
|
-
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
3685
|
-
var regexp = /./;
|
|
3686
|
-
try {
|
|
3687
|
-
'/./'[METHOD_NAME](regexp);
|
|
3688
|
-
} catch (error1) {
|
|
3689
|
-
try {
|
|
3690
|
-
regexp[MATCH] = false;
|
|
3691
|
-
return '/./'[METHOD_NAME](regexp);
|
|
3692
|
-
} catch (error2) { /* empty */ }
|
|
3693
|
-
} return false;
|
|
3694
|
-
};
|
|
3695
|
-
|
|
3696
|
-
var $$1 = _export;
|
|
3697
|
-
var uncurryThis = functionUncurryThis;
|
|
3698
|
-
var notARegExp = notARegexp;
|
|
3699
|
-
var requireObjectCoercible = requireObjectCoercible$7;
|
|
3700
|
-
var toString$1 = toString$9;
|
|
3701
|
-
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
3702
|
-
|
|
3703
|
-
var stringIndexOf = uncurryThis(''.indexOf);
|
|
3704
|
-
|
|
3705
|
-
// `String.prototype.includes` method
|
|
3706
|
-
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
3707
|
-
$$1({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
3708
|
-
includes: function includes(searchString /* , position = 0 */) {
|
|
3709
|
-
return !!~stringIndexOf(
|
|
3710
|
-
toString$1(requireObjectCoercible(this)),
|
|
3711
|
-
toString$1(notARegExp(searchString)),
|
|
3712
|
-
arguments.length > 1 ? arguments[1] : undefined
|
|
3713
|
-
);
|
|
3921
|
+
@media (min-width: 1280px) {
|
|
3922
|
+
flex-basis: ${0};
|
|
3714
3923
|
}
|
|
3924
|
+
`), props => {
|
|
3925
|
+
var _a;
|
|
3926
|
+
return `${(_a = props.vSpacing) !== null && _a !== void 0 ? _a : 0}rem`;
|
|
3927
|
+
}, props => {
|
|
3928
|
+
var _a, _b;
|
|
3929
|
+
return props.sm === 12 || props.sm === undefined ? '100%' : `calc(${100 * ((_a = props === null || props === void 0 ? void 0 : props.sm) !== null && _a !== void 0 ? _a : 12) / 12}% - ${(_b = props.hSpacing) !== null && _b !== void 0 ? _b : 0}rem)`;
|
|
3930
|
+
}, props => {
|
|
3931
|
+
var _a, _b, _c;
|
|
3932
|
+
return props.md === 12 ? '100%' : `calc(${100 * ((_b = (_a = props === null || props === void 0 ? void 0 : props.md) !== null && _a !== void 0 ? _a : props.sm) !== null && _b !== void 0 ? _b : 12) / 12}% - ${(_c = props.hSpacing) !== null && _c !== void 0 ? _c : 0}rem)`;
|
|
3933
|
+
}, props => {
|
|
3934
|
+
var _a, _b, _c, _d;
|
|
3935
|
+
return props.lg === 12 ? '100%' : `calc(${100 * ((_c = (_b = (_a = props === null || props === void 0 ? void 0 : props.lg) !== null && _a !== void 0 ? _a : props === null || props === void 0 ? void 0 : props.md) !== null && _b !== void 0 ? _b : props.sm) !== null && _c !== void 0 ? _c : 12) / 12}% - ${(_d = props.hSpacing) !== null && _d !== void 0 ? _d : 0}rem)`;
|
|
3936
|
+
}, props => {
|
|
3937
|
+
var _a, _b, _c, _d;
|
|
3938
|
+
return props.xl === 12 ? '100%' : `calc(${100 * ((_c = (_b = (_a = props === null || props === void 0 ? void 0 : props.xl) !== null && _a !== void 0 ? _a : props === null || props === void 0 ? void 0 : props.md) !== null && _b !== void 0 ? _b : props.sm) !== null && _c !== void 0 ? _c : 12) / 12}% - ${(_d = props.hSpacing) !== null && _d !== void 0 ? _d : 0}rem)`;
|
|
3715
3939
|
});
|
|
3716
3940
|
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
}
|
|
3778
|
-
});
|
|
3779
|
-
axiosWithConfig.interceptors.request.eject(requestId);
|
|
3780
|
-
});
|
|
3781
|
-
}
|
|
3782
|
-
constructor() {
|
|
3783
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3784
|
-
this.enumValues = new Map();
|
|
3785
|
-
this.enumFunctions = new Map();
|
|
3786
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3787
|
-
this.enumSubmitFunctions = new Map();
|
|
3788
|
-
this.addFormContextData = (key, data) => {
|
|
3789
|
-
this.enumValues.set(key, () => data);
|
|
3790
|
-
};
|
|
3791
|
-
this.setup = props => {
|
|
3792
|
-
var _a, _b, _c;
|
|
3793
|
-
this.selfProps = props;
|
|
3794
|
-
if (props.fileManagement) {
|
|
3795
|
-
const {
|
|
3796
|
-
fileList,
|
|
3797
|
-
uploadFile,
|
|
3798
|
-
downloadFile,
|
|
3799
|
-
deleteFile
|
|
3800
|
-
} = props.fileManagement;
|
|
3801
|
-
this.enumValues.set('file-list', () => fileList);
|
|
3802
|
-
this.enumFunctions.set('upload-file', () => uploadFile);
|
|
3803
|
-
this.enumFunctions.set('download-file', () => downloadFile);
|
|
3804
|
-
this.enumFunctions.set('delete-file', () => deleteFile);
|
|
3805
|
-
}
|
|
3806
|
-
if (props.submit) {
|
|
3807
|
-
const {
|
|
3808
|
-
submitForm
|
|
3809
|
-
} = props.submit;
|
|
3810
|
-
const submitFunction = submitForm;
|
|
3811
|
-
this.enumSubmitFunctions.set('submit-form', () => submitFunction);
|
|
3812
|
-
}
|
|
3813
|
-
if (props.data) {
|
|
3814
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3815
|
-
(_a = props.data) === null || _a === void 0 ? void 0 : _a.forEach(item => {
|
|
3816
|
-
this.enumValues.set(Object.keys(item)[0], () => item);
|
|
3817
|
-
});
|
|
3818
|
-
}
|
|
3819
|
-
if (!props.children) {
|
|
3820
|
-
return null;
|
|
3821
|
-
}
|
|
3822
|
-
this.baseEnumerator.isFormSubmitted = (_b = props.isFormSubmitted) !== null && _b !== void 0 ? _b : false;
|
|
3823
|
-
return jsx(JsonFormContext.Provider, {
|
|
3824
|
-
value: this.baseEnumerator,
|
|
3825
|
-
children: (_c = this.selfProps) === null || _c === void 0 ? void 0 : _c.children
|
|
3826
|
-
});
|
|
3827
|
-
};
|
|
3828
|
-
this.getContextProvider = () => {
|
|
3829
|
-
var _a;
|
|
3830
|
-
return jsx(JsonFormContext.Provider, {
|
|
3831
|
-
value: this.baseEnumerator,
|
|
3832
|
-
children: (_a = this.selfProps) === null || _a === void 0 ? void 0 : _a.children
|
|
3833
|
-
});
|
|
3834
|
-
};
|
|
3835
|
-
this.getAxiosInterceptorConfig = axios => {
|
|
3836
|
-
const requestId = axios.interceptors.request.use(req => {
|
|
3837
|
-
if (req.data === undefined) {
|
|
3838
|
-
throw new Error(`The URL: ${req.url} encountered a CORS error.`);
|
|
3839
|
-
}
|
|
3840
|
-
return req;
|
|
3841
|
-
});
|
|
3842
|
-
return [requestId, axios];
|
|
3843
|
-
};
|
|
3844
|
-
this.addDataByOptions = (key, url, location, type, values = ['']) => {
|
|
3845
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3846
|
-
const dataFunction = data => {
|
|
3847
|
-
let dataLink = data;
|
|
3848
|
-
let returnData = [''];
|
|
3849
|
-
const locationArray = location && Array.isArray(location) ? location : [location];
|
|
3850
|
-
const locationArrayTyped = locationArray;
|
|
3851
|
-
locationArrayTyped === null || locationArrayTyped === void 0 ? void 0 : locationArrayTyped.forEach(attribute => {
|
|
3852
|
-
dataLink = dataLink[attribute];
|
|
3853
|
-
});
|
|
3854
|
-
const valuesArray = Array.isArray(values) ? values : [values];
|
|
3855
|
-
if (type === 'keys') {
|
|
3856
|
-
returnData = Object.keys(dataLink);
|
|
3857
|
-
} else {
|
|
3858
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3859
|
-
returnData = dataLink.map(entry => {
|
|
3860
|
-
let parse = '';
|
|
3861
|
-
valuesArray.forEach((v, index) => {
|
|
3862
|
-
parse += `${entry[v]}`;
|
|
3863
|
-
if (index < valuesArray.length - 1) {
|
|
3864
|
-
parse += ' ';
|
|
3865
|
-
}
|
|
3866
|
-
});
|
|
3867
|
-
return parse;
|
|
3868
|
-
});
|
|
3869
|
-
}
|
|
3870
|
-
return returnData;
|
|
3871
|
-
};
|
|
3872
|
-
this.addDataByUrl(key, url, dataFunction);
|
|
3873
|
-
};
|
|
3874
|
-
/**
|
|
3875
|
-
* Grabs data stored under a given key
|
|
3876
|
-
*
|
|
3877
|
-
*/
|
|
3878
|
-
// FIXME give some clue as to what data is being fetched.
|
|
3879
|
-
// e.g.is it getFormContextData?
|
|
3880
|
-
this.getFormContextData = key => {
|
|
3881
|
-
const dataFunction = this.baseEnumerator.data.get(key);
|
|
3882
|
-
return dataFunction && dataFunction();
|
|
3883
|
-
};
|
|
3884
|
-
/**
|
|
3885
|
-
* Grabs all data
|
|
3886
|
-
*
|
|
3887
|
-
*/
|
|
3888
|
-
this.getAllFormContextData = () => {
|
|
3889
|
-
const allData = [];
|
|
3890
|
-
this.baseEnumerator.data.forEach((d, key) => {
|
|
3891
|
-
allData.push({
|
|
3892
|
-
[key]: d()
|
|
3893
|
-
});
|
|
3894
|
-
});
|
|
3895
|
-
return allData;
|
|
3896
|
-
};
|
|
3897
|
-
this.baseEnumerator = {
|
|
3898
|
-
data: this.enumValues,
|
|
3899
|
-
functions: this.enumFunctions,
|
|
3900
|
-
submitFunction: this.enumSubmitFunctions,
|
|
3901
|
-
addFormContextData: this.addFormContextData,
|
|
3902
|
-
addDataByOptions: this.addDataByOptions,
|
|
3903
|
-
addDataByUrl: this.addDataByUrl,
|
|
3904
|
-
getFormContextData: this.getFormContextData,
|
|
3905
|
-
getAllFormContextData: this.getAllFormContextData
|
|
3906
|
-
};
|
|
3907
|
-
this.selfProps = {};
|
|
3908
|
-
}
|
|
3909
|
-
}
|
|
3910
|
-
const ContextProviderC = new ContextProviderClass();
|
|
3911
|
-
const ContextProviderFactory = () => new ContextProviderClass().setup;
|
|
3912
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3913
|
-
const JsonFormContext = /*#__PURE__*/createContext(null);
|
|
3941
|
+
let _$4 = t => t,
|
|
3942
|
+
_t$4,
|
|
3943
|
+
_t2$2,
|
|
3944
|
+
_t3$2,
|
|
3945
|
+
_t4$1,
|
|
3946
|
+
_t5,
|
|
3947
|
+
_t6,
|
|
3948
|
+
_t7,
|
|
3949
|
+
_t8,
|
|
3950
|
+
_t9,
|
|
3951
|
+
_t10;
|
|
3952
|
+
const ReviewItem = styled.div(_t$4 || (_t$4 = _$4`
|
|
3953
|
+
display: flex;
|
|
3954
|
+
flex-direction: column;
|
|
3955
|
+
border: var(--goa-border-width-s) solid grey;
|
|
3956
|
+
border-radius: var(--goa-border-radius-m);
|
|
3957
|
+
margin: var(--goa-space-2xs);
|
|
3958
|
+
padding: var(--goa-space-xs);
|
|
3959
|
+
`));
|
|
3960
|
+
const ReviewItemSection = styled.div(_t2$2 || (_t2$2 = _$4`
|
|
3961
|
+
background-color: #f1f1f1;
|
|
3962
|
+
margin-bottom: 1rem;
|
|
3963
|
+
padding: 1rem;
|
|
3964
|
+
border: 1px solid #dcdcdc;
|
|
3965
|
+
border-radius: 5px;
|
|
3966
|
+
`));
|
|
3967
|
+
const ReviewItemHeader = styled.div(_t3$2 || (_t3$2 = _$4`
|
|
3968
|
+
display: flex;
|
|
3969
|
+
align-items: center;
|
|
3970
|
+
justify-content: space-between;
|
|
3971
|
+
margin-bottom: 2rem;
|
|
3972
|
+
`));
|
|
3973
|
+
const ReviewItemTitle = styled.div(_t4$1 || (_t4$1 = _$4`
|
|
3974
|
+
font-size: var(--fs-xl);
|
|
3975
|
+
line-height: var(--lh-lg);
|
|
3976
|
+
font-weight: var(--fw-light);
|
|
3977
|
+
`));
|
|
3978
|
+
const Anchor = styled.div(_t5 || (_t5 = _$4`
|
|
3979
|
+
color: #0070c4;
|
|
3980
|
+
text-decoration: underline;
|
|
3981
|
+
outline: none;
|
|
3982
|
+
cursor: pointer;
|
|
3983
|
+
`));
|
|
3984
|
+
styled.div(_t6 || (_t6 = _$4`
|
|
3985
|
+
margin-left: var(--goa-space-m);
|
|
3986
|
+
`));
|
|
3987
|
+
styled.div(_t7 || (_t7 = _$4`
|
|
3988
|
+
margin-bottom: var(--goa-space-m);
|
|
3989
|
+
`));
|
|
3990
|
+
const ListWithDetail = styled.div(_t8 || (_t8 = _$4`
|
|
3991
|
+
margin: var(--goa-space-s);
|
|
3992
|
+
width: 100%;
|
|
3993
|
+
`));
|
|
3994
|
+
const ListWithDetailHeading = styled.h3(_t9 || (_t9 = _$4`
|
|
3995
|
+
text-transform: capitalize;
|
|
3996
|
+
`));
|
|
3997
|
+
const RightAlignmentDiv = styled.div(_t10 || (_t10 = _$4`
|
|
3998
|
+
display: flex;
|
|
3999
|
+
justify-content: flex-end;
|
|
4000
|
+
`));
|
|
3914
4001
|
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
path,
|
|
3924
|
-
handleChange,
|
|
3925
|
-
options,
|
|
3926
|
-
config,
|
|
3927
|
-
label,
|
|
3928
|
-
uischema
|
|
3929
|
-
} = props;
|
|
3930
|
-
const enumerators = useContext(JsonFormContext);
|
|
3931
|
-
let enumData = (schema === null || schema === void 0 ? void 0 : schema.enum) || [];
|
|
3932
|
-
const appliedUiSchemaOptions = merge({}, config, props.uischema.options, options);
|
|
3933
|
-
const dataKey = (_b = (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.enumContext) === null || _b === void 0 ? void 0 : _b.key;
|
|
3934
|
-
const url = (_d = (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.enumContext) === null || _d === void 0 ? void 0 : _d.url;
|
|
3935
|
-
const location = (_f = (_e = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _e === void 0 ? void 0 : _e.enumContext) === null || _f === void 0 ? void 0 : _f.location;
|
|
3936
|
-
const type = (_h = (_g = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _g === void 0 ? void 0 : _g.enumContext) === null || _h === void 0 ? void 0 : _h.type;
|
|
3937
|
-
const values = (_k = (_j = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _j === void 0 ? void 0 : _j.enumContext) === null || _k === void 0 ? void 0 : _k.values;
|
|
3938
|
-
const errorsFormInput = checkFieldValidity(props);
|
|
3939
|
-
useEffect(() => {
|
|
3940
|
-
if (dataKey && url) {
|
|
3941
|
-
enumerators.addDataByOptions(dataKey, url, location, type, values);
|
|
3942
|
-
}
|
|
3943
|
-
}, [url, location, type, values, dataKey, enumerators]);
|
|
3944
|
-
if (dataKey && enumerators.getFormContextData(dataKey)) {
|
|
3945
|
-
const newData = enumerators.getFormContextData(dataKey);
|
|
3946
|
-
enumData = newData;
|
|
3947
|
-
}
|
|
3948
|
-
return jsx(GoADropdown, Object.assign({
|
|
3949
|
-
error: errorsFormInput.length > 0,
|
|
3950
|
-
name: `${label}`,
|
|
3951
|
-
value: data,
|
|
3952
|
-
disabled: !enabled,
|
|
3953
|
-
relative: true,
|
|
3954
|
-
testId: `${id || label}-jsonform`
|
|
3955
|
-
}, appliedUiSchemaOptions, {
|
|
3956
|
-
onChange: (name, value) => {
|
|
3957
|
-
handleChange(path, value);
|
|
3958
|
-
}
|
|
3959
|
-
}, (_l = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _l === void 0 ? void 0 : _l.componentProps, {
|
|
3960
|
-
children: enumData === null || enumData === void 0 ? void 0 : enumData.map(item => {
|
|
3961
|
-
return jsx(GoADropdownItem, {
|
|
3962
|
-
value: `${item}`,
|
|
3963
|
-
label: `${item}`
|
|
3964
|
-
}, `json-form-dropdown-${item}`);
|
|
3965
|
-
})
|
|
3966
|
-
}), `${id}-jsonform-key`);
|
|
4002
|
+
var defineProperty = objectDefineProperty.f;
|
|
4003
|
+
|
|
4004
|
+
var proxyAccessor$1 = function (Target, Source, key) {
|
|
4005
|
+
key in Target || defineProperty(Target, key, {
|
|
4006
|
+
configurable: true,
|
|
4007
|
+
get: function () { return Source[key]; },
|
|
4008
|
+
set: function (it) { Source[key] = it; }
|
|
4009
|
+
});
|
|
3967
4010
|
};
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
4011
|
+
|
|
4012
|
+
var isCallable = isCallable$l;
|
|
4013
|
+
var isObject$2 = isObject$b;
|
|
4014
|
+
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
4015
|
+
|
|
4016
|
+
// makes subclassing work correct for wrapped built-ins
|
|
4017
|
+
var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
|
|
4018
|
+
var NewTarget, NewTargetPrototype;
|
|
4019
|
+
if (
|
|
4020
|
+
// it can work only with native `setPrototypeOf`
|
|
4021
|
+
setPrototypeOf$1 &&
|
|
4022
|
+
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
4023
|
+
isCallable(NewTarget = dummy.constructor) &&
|
|
4024
|
+
NewTarget !== Wrapper &&
|
|
4025
|
+
isObject$2(NewTargetPrototype = NewTarget.prototype) &&
|
|
4026
|
+
NewTargetPrototype !== Wrapper.prototype
|
|
4027
|
+
) setPrototypeOf$1($this, NewTargetPrototype);
|
|
4028
|
+
return $this;
|
|
3972
4029
|
};
|
|
3973
|
-
const GoAEnumControlTester = rankWith(2, isEnumControl);
|
|
3974
|
-
// HOC order can be reversed with https://github.com/eclipsesource/jsonforms/issues/1987
|
|
3975
|
-
const GoAEnumControl = withJsonFormsEnumProps(withTranslateProps(numControl), true);
|
|
3976
4030
|
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
schema,
|
|
3982
|
-
path,
|
|
3983
|
-
handleChange,
|
|
3984
|
-
uischema,
|
|
3985
|
-
label
|
|
3986
|
-
} = props;
|
|
3987
|
-
let enumData = (schema === null || schema === void 0 ? void 0 : schema.enum) || [];
|
|
3988
|
-
const enumerators = useContext(JsonFormContext);
|
|
3989
|
-
const dataKey = (_b = (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.enumContext) === null || _b === void 0 ? void 0 : _b.key;
|
|
3990
|
-
const url = (_d = (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.enumContext) === null || _d === void 0 ? void 0 : _d.url;
|
|
3991
|
-
const location = (_f = (_e = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _e === void 0 ? void 0 : _e.enumContext) === null || _f === void 0 ? void 0 : _f.location;
|
|
3992
|
-
const type = (_h = (_g = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _g === void 0 ? void 0 : _g.enumContext) === null || _h === void 0 ? void 0 : _h.type;
|
|
3993
|
-
const values = (_k = (_j = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _j === void 0 ? void 0 : _j.enumContext) === null || _k === void 0 ? void 0 : _k.values;
|
|
3994
|
-
useEffect(() => {
|
|
3995
|
-
if (dataKey && url) {
|
|
3996
|
-
enumerators.addDataByOptions(dataKey, url, location, type, values);
|
|
3997
|
-
}
|
|
3998
|
-
}, [url, location, type, values, dataKey, enumerators]);
|
|
3999
|
-
if (dataKey && enumerators.getFormContextData(dataKey)) {
|
|
4000
|
-
const newData = enumerators.getFormContextData(dataKey);
|
|
4001
|
-
enumData = newData;
|
|
4002
|
-
}
|
|
4003
|
-
const readOnly = (_o = (_m = (_l = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _l === void 0 ? void 0 : _l.componentProps) === null || _m === void 0 ? void 0 : _m.readOnly) !== null && _o !== void 0 ? _o : false;
|
|
4004
|
-
return jsx("div", {
|
|
4005
|
-
children: readOnly ? jsx("div", {
|
|
4006
|
-
children: jsx(GoADropdown, {
|
|
4007
|
-
disabled: true,
|
|
4008
|
-
placeholder: data,
|
|
4009
|
-
onChange: () => {}
|
|
4010
|
-
})
|
|
4011
|
-
}) : jsx(GoADropdown, {
|
|
4012
|
-
value: data,
|
|
4013
|
-
onChange: (name, value) => {
|
|
4014
|
-
handleChange(path, value);
|
|
4015
|
-
},
|
|
4016
|
-
testId: `autocomplete-dropdown-${label}`,
|
|
4017
|
-
id: `autocomplete-dropdown-${label}`,
|
|
4018
|
-
width: "100%",
|
|
4019
|
-
filterable: true,
|
|
4020
|
-
relative: true,
|
|
4021
|
-
ariaLabel: label,
|
|
4022
|
-
children: enumData === null || enumData === void 0 ? void 0 : enumData.map(item => {
|
|
4023
|
-
return jsx(GoADropdownItem, {
|
|
4024
|
-
value: item,
|
|
4025
|
-
label: item
|
|
4026
|
-
}, `autocomplete-${item}`);
|
|
4027
|
-
})
|
|
4028
|
-
})
|
|
4029
|
-
});
|
|
4031
|
+
var toString$1 = toString$9;
|
|
4032
|
+
|
|
4033
|
+
var normalizeStringArgument$1 = function (argument, $default) {
|
|
4034
|
+
return argument === undefined ? arguments.length < 2 ? '' : $default : toString$1(argument);
|
|
4030
4035
|
};
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4036
|
+
|
|
4037
|
+
var isObject$1 = isObject$b;
|
|
4038
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
|
|
4039
|
+
|
|
4040
|
+
// `InstallErrorCause` abstract operation
|
|
4041
|
+
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
|
|
4042
|
+
var installErrorCause$1 = function (O, options) {
|
|
4043
|
+
if (isObject$1(options) && 'cause' in options) {
|
|
4044
|
+
createNonEnumerableProperty$2(O, 'cause', options.cause);
|
|
4045
|
+
}
|
|
4035
4046
|
};
|
|
4036
|
-
const GoAEnumControlAutoCompleteTester = rankWith(3, and(isEnumControl, optionIs('autocomplete', true)));
|
|
4037
|
-
const GoAEnumAutoCompleteControl = withJsonFormsEnumProps(withTranslateProps(numControlAutoComplete), true);
|
|
4038
4047
|
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
t
|
|
4054
|
-
} = props;
|
|
4055
|
-
const enumData = (schema === null || schema === void 0 ? void 0 : schema.enum) || [];
|
|
4056
|
-
const appliedUiSchemaOptions = merge({}, config, props.uischema.options, uischema, options);
|
|
4057
|
-
const errorsFormInput = checkFieldValidity(props);
|
|
4058
|
-
return jsx(GoARadioGroup, Object.assign({
|
|
4059
|
-
error: errorsFormInput.length > 0,
|
|
4060
|
-
name: `${options || appliedUiSchemaOptions.label}`,
|
|
4061
|
-
testId: `${label || id}-jsonforms-radio`,
|
|
4062
|
-
value: data,
|
|
4063
|
-
disabled: !enabled
|
|
4064
|
-
}, appliedUiSchemaOptions, {
|
|
4065
|
-
onChange: (name, value) => handleChange(path, value)
|
|
4066
|
-
}, (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps, {
|
|
4067
|
-
children: enumData.map(value => {
|
|
4068
|
-
return jsx(GoARadioItem, Object.assign({
|
|
4069
|
-
name: value,
|
|
4070
|
-
value: `${value}`
|
|
4071
|
-
}, appliedUiSchemaOptions, {
|
|
4072
|
-
label: value
|
|
4073
|
-
}));
|
|
4074
|
-
})
|
|
4075
|
-
}));
|
|
4048
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
4049
|
+
|
|
4050
|
+
var $Error = Error;
|
|
4051
|
+
var replace = uncurryThis$1(''.replace);
|
|
4052
|
+
|
|
4053
|
+
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
|
|
4054
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
4055
|
+
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
|
4056
|
+
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
|
4057
|
+
|
|
4058
|
+
var errorStackClear = function (stack, dropEntries) {
|
|
4059
|
+
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
|
4060
|
+
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
|
4061
|
+
} return stack;
|
|
4076
4062
|
};
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4063
|
+
|
|
4064
|
+
var fails$2 = fails$m;
|
|
4065
|
+
var createPropertyDescriptor = createPropertyDescriptor$4;
|
|
4066
|
+
|
|
4067
|
+
var errorStackInstallable = !fails$2(function () {
|
|
4068
|
+
var error = new Error('a');
|
|
4069
|
+
if (!('stack' in error)) return true;
|
|
4070
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
4071
|
+
Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
|
|
4072
|
+
return error.stack !== 7;
|
|
4073
|
+
});
|
|
4074
|
+
|
|
4075
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
|
|
4076
|
+
var clearErrorStack = errorStackClear;
|
|
4077
|
+
var ERROR_STACK_INSTALLABLE = errorStackInstallable;
|
|
4078
|
+
|
|
4079
|
+
// non-standard V8
|
|
4080
|
+
var captureStackTrace = Error.captureStackTrace;
|
|
4081
|
+
|
|
4082
|
+
var errorStackInstall = function (error, C, stack, dropEntries) {
|
|
4083
|
+
if (ERROR_STACK_INSTALLABLE) {
|
|
4084
|
+
if (captureStackTrace) captureStackTrace(error, C);
|
|
4085
|
+
else createNonEnumerableProperty$1(error, 'stack', clearErrorStack(stack, dropEntries));
|
|
4086
|
+
}
|
|
4081
4087
|
};
|
|
4082
|
-
const GoAEnumRadioGroupControl = withJsonFormsEnumProps(withTranslateProps(EnumRadioControl), true);
|
|
4083
|
-
const GoARadioGroupControlTester = rankWith(20, and(isEnumControl, optionIs('format', 'radio')));
|
|
4084
4088
|
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4089
|
+
var getBuiltIn = getBuiltIn$5;
|
|
4090
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
4091
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$8;
|
|
4092
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
4093
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
4094
|
+
var copyConstructorProperties = copyConstructorProperties$3;
|
|
4095
|
+
var proxyAccessor = proxyAccessor$1;
|
|
4096
|
+
var inheritIfRequired = inheritIfRequired$1;
|
|
4097
|
+
var normalizeStringArgument = normalizeStringArgument$1;
|
|
4098
|
+
var installErrorCause = installErrorCause$1;
|
|
4099
|
+
var installErrorStack = errorStackInstall;
|
|
4100
|
+
var DESCRIPTORS = descriptors;
|
|
4101
|
+
|
|
4102
|
+
var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
4103
|
+
var STACK_TRACE_LIMIT = 'stackTraceLimit';
|
|
4104
|
+
var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
|
|
4105
|
+
var path = FULL_NAME.split('.');
|
|
4106
|
+
var ERROR_NAME = path[path.length - 1];
|
|
4107
|
+
var OriginalError = getBuiltIn.apply(null, path);
|
|
4108
|
+
|
|
4109
|
+
if (!OriginalError) return;
|
|
4110
|
+
|
|
4111
|
+
var OriginalErrorPrototype = OriginalError.prototype;
|
|
4112
|
+
|
|
4113
|
+
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
4114
|
+
if (hasOwn$1(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
4115
|
+
|
|
4116
|
+
if (!FORCED) return OriginalError;
|
|
4117
|
+
|
|
4118
|
+
var BaseError = getBuiltIn('Error');
|
|
4119
|
+
|
|
4120
|
+
var WrappedError = wrapper(function (a, b) {
|
|
4121
|
+
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
|
|
4122
|
+
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
4123
|
+
if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
|
|
4124
|
+
installErrorStack(result, WrappedError, result.stack, 2);
|
|
4125
|
+
if (this && isPrototypeOf$1(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
4126
|
+
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
4127
|
+
return result;
|
|
4102
4128
|
});
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4129
|
+
|
|
4130
|
+
WrappedError.prototype = OriginalErrorPrototype;
|
|
4131
|
+
|
|
4132
|
+
if (ERROR_NAME !== 'Error') {
|
|
4133
|
+
if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
|
|
4134
|
+
else copyConstructorProperties(WrappedError, BaseError, { name: true });
|
|
4135
|
+
} else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
|
|
4136
|
+
proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
|
|
4137
|
+
proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
|
|
4138
|
+
}
|
|
4139
|
+
|
|
4140
|
+
copyConstructorProperties(WrappedError, OriginalError);
|
|
4141
|
+
|
|
4142
|
+
try {
|
|
4143
|
+
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
|
|
4144
|
+
if (OriginalErrorPrototype.name !== ERROR_NAME) {
|
|
4145
|
+
createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
|
|
4113
4146
|
}
|
|
4114
|
-
|
|
4115
|
-
}
|
|
4116
|
-
const BooleanControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
4117
|
-
noLabel: true,
|
|
4118
|
-
input: BooleanComponent
|
|
4119
|
-
}));
|
|
4120
|
-
const GoABooleanControlTester = rankWith(2, isBooleanControl);
|
|
4121
|
-
const GoABooleanControl = withJsonFormsControlProps(BooleanControl);
|
|
4147
|
+
OriginalErrorPrototype.constructor = WrappedError;
|
|
4148
|
+
} catch (error) { /* empty */ }
|
|
4122
4149
|
|
|
4123
|
-
|
|
4124
|
-
data,
|
|
4125
|
-
visible,
|
|
4126
|
-
enabled,
|
|
4127
|
-
uischema,
|
|
4128
|
-
handleChange,
|
|
4129
|
-
path,
|
|
4130
|
-
config,
|
|
4131
|
-
label,
|
|
4132
|
-
required,
|
|
4133
|
-
errors,
|
|
4134
|
-
description
|
|
4135
|
-
}) => {
|
|
4136
|
-
var _a;
|
|
4137
|
-
const appliedUiSchemaOptions = Object.assign(Object.assign({}, config), uischema === null || uischema === void 0 ? void 0 : uischema.options);
|
|
4138
|
-
const TrueValue = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.textForTrue) || 'Yes';
|
|
4139
|
-
const FalseValue = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.textForFalse) || 'No';
|
|
4140
|
-
const EnableDescription = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.enableDescription) === true;
|
|
4141
|
-
const TrueDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForTrue);
|
|
4142
|
-
const FalseDescription = description || (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.descriptionForFalse);
|
|
4143
|
-
const BaseTestId = (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${path}-boolean-radio-jsonform`;
|
|
4144
|
-
const errorsFormInput = checkFieldValidity({
|
|
4145
|
-
data,
|
|
4146
|
-
uischema,
|
|
4147
|
-
label,
|
|
4148
|
-
required,
|
|
4149
|
-
errors
|
|
4150
|
-
});
|
|
4151
|
-
return jsx(Visible, {
|
|
4152
|
-
visible: visible,
|
|
4153
|
-
children: jsxs(GoARadioGroup, Object.assign({
|
|
4154
|
-
error: errorsFormInput.length > 0,
|
|
4155
|
-
name: `${label}`,
|
|
4156
|
-
value: data === true ? TrueValue : data === false ? FalseValue : null,
|
|
4157
|
-
disabled: !enabled,
|
|
4158
|
-
testId: BaseTestId,
|
|
4159
|
-
onChange: (_name, value) => {
|
|
4160
|
-
if (value === TrueValue) {
|
|
4161
|
-
handleChange(path, true);
|
|
4162
|
-
}
|
|
4163
|
-
if (value === FalseValue) {
|
|
4164
|
-
handleChange(path, false);
|
|
4165
|
-
}
|
|
4166
|
-
}
|
|
4167
|
-
}, (_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps, {
|
|
4168
|
-
children: [jsx(GoARadioItem, {
|
|
4169
|
-
value: TrueValue,
|
|
4170
|
-
testId: `${BaseTestId}-yes-option`,
|
|
4171
|
-
description: EnableDescription ? TrueDescription : null
|
|
4172
|
-
}), jsx(GoARadioItem, {
|
|
4173
|
-
value: FalseValue,
|
|
4174
|
-
testId: `${BaseTestId}-no-option`,
|
|
4175
|
-
description: EnableDescription ? FalseDescription : null
|
|
4176
|
-
})]
|
|
4177
|
-
}))
|
|
4178
|
-
});
|
|
4150
|
+
return WrappedError;
|
|
4179
4151
|
};
|
|
4180
|
-
const BooleanRadioControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
4181
|
-
input: BooleanRadioComponent
|
|
4182
|
-
}));
|
|
4183
|
-
const GoABooleanRadioControlTester = rankWith(3, and(isBooleanControl, optionIs('radio', true)));
|
|
4184
|
-
const GoABooleanRadioControl = withJsonFormsControlProps(BooleanRadioControl);
|
|
4185
4152
|
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
});
|
|
4203
|
-
return jsx(Component, Object.assign({}, props, {
|
|
4204
|
-
ajv: ajv
|
|
4205
|
-
}));
|
|
4153
|
+
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
4154
|
+
var $$2 = _export;
|
|
4155
|
+
var global$1 = global$g;
|
|
4156
|
+
var apply = functionApply;
|
|
4157
|
+
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
4158
|
+
|
|
4159
|
+
var WEB_ASSEMBLY = 'WebAssembly';
|
|
4160
|
+
var WebAssembly = global$1[WEB_ASSEMBLY];
|
|
4161
|
+
|
|
4162
|
+
// eslint-disable-next-line es/no-error-cause -- feature detection
|
|
4163
|
+
var FORCED = new Error('e', { cause: 7 }).cause !== 7;
|
|
4164
|
+
|
|
4165
|
+
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
4166
|
+
var O = {};
|
|
4167
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
|
|
4168
|
+
$$2({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
|
|
4206
4169
|
};
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
renderers,
|
|
4214
|
-
cells,
|
|
4215
|
-
visible
|
|
4216
|
-
}) => {
|
|
4217
|
-
if (isEmpty$1(elements)) {
|
|
4218
|
-
return null;
|
|
4219
|
-
} else {
|
|
4220
|
-
if (direction === 'row') {
|
|
4221
|
-
return jsx(Visible, {
|
|
4222
|
-
visible: visible,
|
|
4223
|
-
children: jsx(GoAGrid, {
|
|
4224
|
-
minChildWidth: "10ch",
|
|
4225
|
-
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
4226
|
-
})
|
|
4227
|
-
});
|
|
4228
|
-
} else {
|
|
4229
|
-
return jsx(Visible, {
|
|
4230
|
-
visible: visible,
|
|
4231
|
-
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
4232
|
-
});
|
|
4233
|
-
}
|
|
4170
|
+
|
|
4171
|
+
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
4172
|
+
if (WebAssembly && WebAssembly[ERROR_NAME]) {
|
|
4173
|
+
var O = {};
|
|
4174
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
|
|
4175
|
+
$$2({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
|
|
4234
4176
|
}
|
|
4235
4177
|
};
|
|
4236
4178
|
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4179
|
+
// https://tc39.es/ecma262/#sec-nativeerror
|
|
4180
|
+
exportGlobalErrorCauseWrapper('Error', function (init) {
|
|
4181
|
+
return function Error(message) { return apply(init, this, arguments); };
|
|
4182
|
+
});
|
|
4183
|
+
exportGlobalErrorCauseWrapper('EvalError', function (init) {
|
|
4184
|
+
return function EvalError(message) { return apply(init, this, arguments); };
|
|
4185
|
+
});
|
|
4186
|
+
exportGlobalErrorCauseWrapper('RangeError', function (init) {
|
|
4187
|
+
return function RangeError(message) { return apply(init, this, arguments); };
|
|
4188
|
+
});
|
|
4189
|
+
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
|
|
4190
|
+
return function ReferenceError(message) { return apply(init, this, arguments); };
|
|
4191
|
+
});
|
|
4192
|
+
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
|
|
4193
|
+
return function SyntaxError(message) { return apply(init, this, arguments); };
|
|
4194
|
+
});
|
|
4195
|
+
exportGlobalErrorCauseWrapper('TypeError', function (init) {
|
|
4196
|
+
return function TypeError(message) { return apply(init, this, arguments); };
|
|
4197
|
+
});
|
|
4198
|
+
exportGlobalErrorCauseWrapper('URIError', function (init) {
|
|
4199
|
+
return function URIError(message) { return apply(init, this, arguments); };
|
|
4200
|
+
});
|
|
4201
|
+
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
|
|
4202
|
+
return function CompileError(message) { return apply(init, this, arguments); };
|
|
4203
|
+
});
|
|
4204
|
+
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
|
|
4205
|
+
return function LinkError(message) { return apply(init, this, arguments); };
|
|
4206
|
+
});
|
|
4207
|
+
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
4208
|
+
return function RuntimeError(message) { return apply(init, this, arguments); };
|
|
4209
|
+
});
|
|
4249
4210
|
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4211
|
+
var $$1 = _export;
|
|
4212
|
+
var $includes = arrayIncludes.includes;
|
|
4213
|
+
var fails$1 = fails$m;
|
|
4214
|
+
var addToUnscopables = addToUnscopables$3;
|
|
4254
4215
|
|
|
4255
|
-
|
|
4256
|
-
|
|
4216
|
+
// FF99+ bug
|
|
4217
|
+
var BROKEN_ON_SPARSE = fails$1(function () {
|
|
4218
|
+
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
4219
|
+
return !Array(1).includes();
|
|
4220
|
+
});
|
|
4221
|
+
|
|
4222
|
+
// `Array.prototype.includes` method
|
|
4223
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
4224
|
+
$$1({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
4225
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
4226
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
4257
4227
|
}
|
|
4228
|
+
});
|
|
4229
|
+
|
|
4230
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
4231
|
+
addToUnscopables('includes');
|
|
4232
|
+
|
|
4233
|
+
var isObject = isObject$b;
|
|
4234
|
+
var classof = classofRaw$1;
|
|
4235
|
+
var wellKnownSymbol$1 = wellKnownSymbol$c;
|
|
4236
|
+
|
|
4237
|
+
var MATCH$1 = wellKnownSymbol$1('match');
|
|
4238
|
+
|
|
4239
|
+
// `IsRegExp` abstract operation
|
|
4240
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
4241
|
+
var isRegexp = function (it) {
|
|
4242
|
+
var isRegExp;
|
|
4243
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
|
|
4244
|
+
};
|
|
4245
|
+
|
|
4246
|
+
var isRegExp = isRegexp;
|
|
4247
|
+
|
|
4248
|
+
var $TypeError = TypeError;
|
|
4249
|
+
|
|
4250
|
+
var notARegexp = function (it) {
|
|
4251
|
+
if (isRegExp(it)) {
|
|
4252
|
+
throw new $TypeError("The method doesn't accept regular expressions");
|
|
4253
|
+
} return it;
|
|
4254
|
+
};
|
|
4255
|
+
|
|
4256
|
+
var wellKnownSymbol = wellKnownSymbol$c;
|
|
4257
|
+
|
|
4258
|
+
var MATCH = wellKnownSymbol('match');
|
|
4259
|
+
|
|
4260
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
4261
|
+
var regexp = /./;
|
|
4262
|
+
try {
|
|
4263
|
+
'/./'[METHOD_NAME](regexp);
|
|
4264
|
+
} catch (error1) {
|
|
4265
|
+
try {
|
|
4266
|
+
regexp[MATCH] = false;
|
|
4267
|
+
return '/./'[METHOD_NAME](regexp);
|
|
4268
|
+
} catch (error2) { /* empty */ }
|
|
4269
|
+
} return false;
|
|
4270
|
+
};
|
|
4271
|
+
|
|
4272
|
+
var $ = _export;
|
|
4273
|
+
var uncurryThis = functionUncurryThis;
|
|
4274
|
+
var notARegExp = notARegexp;
|
|
4275
|
+
var requireObjectCoercible = requireObjectCoercible$7;
|
|
4276
|
+
var toString = toString$9;
|
|
4277
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
4258
4278
|
|
|
4259
|
-
|
|
4260
|
-
${0};
|
|
4279
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
4261
4280
|
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4281
|
+
// `String.prototype.includes` method
|
|
4282
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
4283
|
+
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
4284
|
+
includes: function includes(searchString /* , position = 0 */) {
|
|
4285
|
+
return !!~stringIndexOf(
|
|
4286
|
+
toString(requireObjectCoercible(this)),
|
|
4287
|
+
toString(notARegExp(searchString)),
|
|
4288
|
+
arguments.length > 1 ? arguments[1] : undefined
|
|
4289
|
+
);
|
|
4270
4290
|
}
|
|
4271
|
-
`), props => {
|
|
4272
|
-
var _a;
|
|
4273
|
-
return `${(_a = props.vSpacing) !== null && _a !== void 0 ? _a : 0}rem`;
|
|
4274
|
-
}, props => {
|
|
4275
|
-
var _a, _b;
|
|
4276
|
-
return props.sm === 12 || props.sm === undefined ? '100%' : `calc(${100 * ((_a = props === null || props === void 0 ? void 0 : props.sm) !== null && _a !== void 0 ? _a : 12) / 12}% - ${(_b = props.hSpacing) !== null && _b !== void 0 ? _b : 0}rem)`;
|
|
4277
|
-
}, props => {
|
|
4278
|
-
var _a, _b, _c;
|
|
4279
|
-
return props.md === 12 ? '100%' : `calc(${100 * ((_b = (_a = props === null || props === void 0 ? void 0 : props.md) !== null && _a !== void 0 ? _a : props.sm) !== null && _b !== void 0 ? _b : 12) / 12}% - ${(_c = props.hSpacing) !== null && _c !== void 0 ? _c : 0}rem)`;
|
|
4280
|
-
}, props => {
|
|
4281
|
-
var _a, _b, _c, _d;
|
|
4282
|
-
return props.lg === 12 ? '100%' : `calc(${100 * ((_c = (_b = (_a = props === null || props === void 0 ? void 0 : props.lg) !== null && _a !== void 0 ? _a : props === null || props === void 0 ? void 0 : props.md) !== null && _b !== void 0 ? _b : props.sm) !== null && _c !== void 0 ? _c : 12) / 12}% - ${(_d = props.hSpacing) !== null && _d !== void 0 ? _d : 0}rem)`;
|
|
4283
|
-
}, props => {
|
|
4284
|
-
var _a, _b, _c, _d;
|
|
4285
|
-
return props.xl === 12 ? '100%' : `calc(${100 * ((_c = (_b = (_a = props === null || props === void 0 ? void 0 : props.xl) !== null && _a !== void 0 ? _a : props === null || props === void 0 ? void 0 : props.md) !== null && _b !== void 0 ? _b : props.sm) !== null && _c !== void 0 ? _c : 12) / 12}% - ${(_d = props.hSpacing) !== null && _d !== void 0 ? _d : 0}rem)`;
|
|
4286
4291
|
});
|
|
4287
4292
|
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
const
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4293
|
+
class ContextProviderClass {
|
|
4294
|
+
addDataByUrl(key, url, processDataFunction, token) {
|
|
4295
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4296
|
+
let header = {};
|
|
4297
|
+
const [requestId, axiosWithConfig] = this.getAxiosInterceptorConfig(axios);
|
|
4298
|
+
if (token) {
|
|
4299
|
+
header = Object.assign(Object.assign({}, header), {
|
|
4300
|
+
Authorization: `Bearer ${token}`
|
|
4301
|
+
});
|
|
4302
|
+
}
|
|
4303
|
+
yield axiosWithConfig.get(url, header).then(response => {
|
|
4304
|
+
const processedData = processDataFunction(response.data);
|
|
4305
|
+
this.enumValues.set(key, () => processedData);
|
|
4306
|
+
}).catch(err => {
|
|
4307
|
+
if (err.message.includes('CORS')) {
|
|
4308
|
+
console.warn(err.message);
|
|
4309
|
+
} else {
|
|
4310
|
+
console.warn(`addDataByUrl: ${err.message}`);
|
|
4311
|
+
}
|
|
4312
|
+
});
|
|
4313
|
+
axiosWithConfig.interceptors.request.eject(requestId);
|
|
4314
|
+
});
|
|
4315
|
+
}
|
|
4316
|
+
constructor() {
|
|
4317
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4318
|
+
this.enumValues = new Map();
|
|
4319
|
+
this.enumFunctions = new Map();
|
|
4320
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4321
|
+
this.enumSubmitFunctions = new Map();
|
|
4322
|
+
this.addFormContextData = (key, data) => {
|
|
4323
|
+
this.enumValues.set(key, () => data);
|
|
4324
|
+
};
|
|
4325
|
+
this.setup = props => {
|
|
4326
|
+
var _a, _b, _c;
|
|
4327
|
+
this.selfProps = props;
|
|
4328
|
+
if (props.fileManagement) {
|
|
4329
|
+
const {
|
|
4330
|
+
fileList,
|
|
4331
|
+
uploadFile,
|
|
4332
|
+
downloadFile,
|
|
4333
|
+
deleteFile
|
|
4334
|
+
} = props.fileManagement;
|
|
4335
|
+
this.enumValues.set('file-list', () => fileList);
|
|
4336
|
+
this.enumFunctions.set('upload-file', () => uploadFile);
|
|
4337
|
+
this.enumFunctions.set('download-file', () => downloadFile);
|
|
4338
|
+
this.enumFunctions.set('delete-file', () => deleteFile);
|
|
4339
|
+
}
|
|
4340
|
+
if (props.submit) {
|
|
4341
|
+
const {
|
|
4342
|
+
submitForm
|
|
4343
|
+
} = props.submit;
|
|
4344
|
+
const submitFunction = submitForm;
|
|
4345
|
+
this.enumSubmitFunctions.set('submit-form', () => submitFunction);
|
|
4346
|
+
}
|
|
4347
|
+
if (props.data) {
|
|
4348
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4349
|
+
(_a = props.data) === null || _a === void 0 ? void 0 : _a.forEach(item => {
|
|
4350
|
+
this.enumValues.set(Object.keys(item)[0], () => item);
|
|
4351
|
+
});
|
|
4352
|
+
}
|
|
4353
|
+
if (!props.children) {
|
|
4354
|
+
return null;
|
|
4355
|
+
}
|
|
4356
|
+
this.baseEnumerator.isFormSubmitted = (_b = props.isFormSubmitted) !== null && _b !== void 0 ? _b : false;
|
|
4357
|
+
return jsx(JsonFormContext.Provider, {
|
|
4358
|
+
value: this.baseEnumerator,
|
|
4359
|
+
children: (_c = this.selfProps) === null || _c === void 0 ? void 0 : _c.children
|
|
4360
|
+
});
|
|
4361
|
+
};
|
|
4362
|
+
this.getContextProvider = () => {
|
|
4363
|
+
var _a;
|
|
4364
|
+
return jsx(JsonFormContext.Provider, {
|
|
4365
|
+
value: this.baseEnumerator,
|
|
4366
|
+
children: (_a = this.selfProps) === null || _a === void 0 ? void 0 : _a.children
|
|
4367
|
+
});
|
|
4368
|
+
};
|
|
4369
|
+
this.getAxiosInterceptorConfig = axios => {
|
|
4370
|
+
const requestId = axios.interceptors.request.use(req => {
|
|
4371
|
+
if (req.data === undefined) {
|
|
4372
|
+
throw new Error(`The URL: ${req.url} encountered a CORS error.`);
|
|
4373
|
+
}
|
|
4374
|
+
return req;
|
|
4375
|
+
});
|
|
4376
|
+
return [requestId, axios];
|
|
4377
|
+
};
|
|
4378
|
+
/**
|
|
4379
|
+
* Grabs data stored under a given key
|
|
4380
|
+
*
|
|
4381
|
+
*/
|
|
4382
|
+
// FIXME give some clue as to what data is being fetched.
|
|
4383
|
+
// e.g.is it getFormContextData?
|
|
4384
|
+
this.getFormContextData = key => {
|
|
4385
|
+
const dataFunction = this.baseEnumerator.data.get(key);
|
|
4386
|
+
return dataFunction && dataFunction();
|
|
4387
|
+
};
|
|
4388
|
+
/**
|
|
4389
|
+
* Grabs all data
|
|
4390
|
+
*
|
|
4391
|
+
*/
|
|
4392
|
+
this.getAllFormContextData = () => {
|
|
4393
|
+
const allData = [];
|
|
4394
|
+
this.baseEnumerator.data.forEach((d, key) => {
|
|
4395
|
+
allData.push({
|
|
4396
|
+
[key]: d()
|
|
4397
|
+
});
|
|
4398
|
+
});
|
|
4399
|
+
return allData;
|
|
4400
|
+
};
|
|
4401
|
+
this.baseEnumerator = {
|
|
4402
|
+
data: this.enumValues,
|
|
4403
|
+
functions: this.enumFunctions,
|
|
4404
|
+
submitFunction: this.enumSubmitFunctions,
|
|
4405
|
+
addFormContextData: this.addFormContextData,
|
|
4406
|
+
getFormContextData: this.getFormContextData,
|
|
4407
|
+
getAllFormContextData: this.getAllFormContextData
|
|
4408
|
+
};
|
|
4409
|
+
this.selfProps = {};
|
|
4410
|
+
}
|
|
4411
|
+
}
|
|
4412
|
+
const ContextProviderC = new ContextProviderClass();
|
|
4413
|
+
const ContextProviderFactory = () => new ContextProviderClass().setup;
|
|
4414
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4415
|
+
const JsonFormContext = /*#__PURE__*/createContext(null);
|
|
4348
4416
|
|
|
4349
4417
|
const getAllRequiredFields = schema => {
|
|
4350
4418
|
const requiredFields = [];
|
|
@@ -4369,7 +4437,7 @@ const getAllRequiredFields = schema => {
|
|
|
4369
4437
|
return requiredFields;
|
|
4370
4438
|
};
|
|
4371
4439
|
|
|
4372
|
-
var call
|
|
4440
|
+
var call = functionCall;
|
|
4373
4441
|
var hasOwn = hasOwnProperty_1;
|
|
4374
4442
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
4375
4443
|
var regExpFlags = regexpFlags$1;
|
|
@@ -4379,12 +4447,12 @@ var RegExpPrototype$1 = RegExp.prototype;
|
|
|
4379
4447
|
var regexpGetFlags = function (R) {
|
|
4380
4448
|
var flags = R.flags;
|
|
4381
4449
|
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
|
|
4382
|
-
? call
|
|
4450
|
+
? call(regExpFlags, R) : flags;
|
|
4383
4451
|
};
|
|
4384
4452
|
|
|
4385
4453
|
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
4386
4454
|
var defineBuiltIn = defineBuiltIn$5;
|
|
4387
|
-
var anObject
|
|
4455
|
+
var anObject = anObject$9;
|
|
4388
4456
|
var $toString = toString$9;
|
|
4389
4457
|
var fails = fails$m;
|
|
4390
4458
|
var getRegExpFlags = regexpGetFlags;
|
|
@@ -4401,48 +4469,13 @@ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
|
|
|
4401
4469
|
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
4402
4470
|
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
4403
4471
|
defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
|
|
4404
|
-
var R = anObject
|
|
4472
|
+
var R = anObject(this);
|
|
4405
4473
|
var pattern = $toString(R.source);
|
|
4406
4474
|
var flags = $toString(getRegExpFlags(R));
|
|
4407
4475
|
return '/' + pattern + '/' + flags;
|
|
4408
4476
|
}, { unsafe: true });
|
|
4409
4477
|
}
|
|
4410
4478
|
|
|
4411
|
-
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
4412
|
-
|
|
4413
|
-
var $ = _export;
|
|
4414
|
-
var call = functionCall;
|
|
4415
|
-
var isCallable = isCallable$l;
|
|
4416
|
-
var anObject = anObject$9;
|
|
4417
|
-
var toString = toString$9;
|
|
4418
|
-
|
|
4419
|
-
var DELEGATES_TO_EXEC = function () {
|
|
4420
|
-
var execCalled = false;
|
|
4421
|
-
var re = /[ac]/;
|
|
4422
|
-
re.exec = function () {
|
|
4423
|
-
execCalled = true;
|
|
4424
|
-
return /./.exec.apply(this, arguments);
|
|
4425
|
-
};
|
|
4426
|
-
return re.test('abc') === true && execCalled;
|
|
4427
|
-
}();
|
|
4428
|
-
|
|
4429
|
-
var nativeTest = /./.test;
|
|
4430
|
-
|
|
4431
|
-
// `RegExp.prototype.test` method
|
|
4432
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype.test
|
|
4433
|
-
$({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
|
|
4434
|
-
test: function (S) {
|
|
4435
|
-
var R = anObject(this);
|
|
4436
|
-
var string = toString(S);
|
|
4437
|
-
var exec = R.exec;
|
|
4438
|
-
if (!isCallable(exec)) return call(nativeTest, R, string);
|
|
4439
|
-
var result = call(exec, R, string);
|
|
4440
|
-
if (result === null) return false;
|
|
4441
|
-
anObject(result);
|
|
4442
|
-
return true;
|
|
4443
|
-
}
|
|
4444
|
-
});
|
|
4445
|
-
|
|
4446
4479
|
const resolveLabelFromScope = scope => {
|
|
4447
4480
|
// eslint-disable-next-line no-useless-escape
|
|
4448
4481
|
const validPatternRegex = /^#(\/properties\/[^\/]+)+$/;
|
|
@@ -5910,9 +5943,6 @@ const GoABaseRenderers = [
|
|
|
5910
5943
|
{
|
|
5911
5944
|
tester: GoAEnumControlTester,
|
|
5912
5945
|
renderer: GoAEnumControl
|
|
5913
|
-
}, {
|
|
5914
|
-
tester: GoAEnumControlAutoCompleteTester,
|
|
5915
|
-
renderer: GoAEnumAutoCompleteControl
|
|
5916
5946
|
}, {
|
|
5917
5947
|
tester: GoAIntegerControlTester,
|
|
5918
5948
|
renderer: GoAInputIntegerControl
|
|
@@ -5981,4 +6011,4 @@ const GoARenderers = [...GoABaseRenderers, {
|
|
|
5981
6011
|
}];
|
|
5982
6012
|
const GoACells = [...InputCells];
|
|
5983
6013
|
|
|
5984
|
-
export { ContextProviderC, ContextProviderClass, ContextProviderFactory, GoABaseRenderers, GoACells, GoARenderers, JsonFormContext, ajv };
|
|
6014
|
+
export { ADD_REGISTER_DATA_ACTION, ContextProviderC, ContextProviderClass, ContextProviderFactory, GoABaseRenderers, GoACells, GoARenderers, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ajv, registerReducer };
|