@prorobotech/openapi-k8s-toolkit 1.5.0-alpha.2 → 1.5.0-alpha.3
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/dist/{index-BYGA57EJ.mjs → index-BsjtTIr1.mjs} +954 -147
- package/dist/index-BsjtTIr1.mjs.map +1 -0
- package/dist/{index-DoND5hQh.mjs → index-D0cUc0Rp.mjs} +2 -2
- package/dist/{index-DoND5hQh.mjs.map → index-D0cUc0Rp.mjs.map} +1 -1
- package/dist/openapi-k8s-toolkit.es.js +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +952 -145
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/FormListInput.d.ts +2 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/FormNamespaceInput.d.ts +9 -2
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/FormNamespaceInput.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNumberInput/FormNumberInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.d.ts +2 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringInput/FormStringInput.d.ts +4 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/FormStringMultilineInput.d.ts +4 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/oneOfBranch.d.ts +9 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/oneOfBranch.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/validation.d.ts +18 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/oneOfBranchCleanup.d.ts +7 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/oneOfBranchCleanup.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/oneOfBranchVisibility.d.ts +6 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/oneOfBranchVisibility.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +20 -5
- package/dist/types/localTypes/formSchema.d.ts +15 -0
- package/package.json +1 -1
- package/dist/index-BYGA57EJ.mjs.map +0 -1
|
@@ -1714,7 +1714,7 @@
|
|
|
1714
1714
|
*
|
|
1715
1715
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
1716
1716
|
*/
|
|
1717
|
-
const {isArray: isArray$
|
|
1717
|
+
const {isArray: isArray$5} = Array;
|
|
1718
1718
|
|
|
1719
1719
|
/**
|
|
1720
1720
|
* Determine if a value is undefined
|
|
@@ -1960,7 +1960,7 @@
|
|
|
1960
1960
|
obj = [obj];
|
|
1961
1961
|
}
|
|
1962
1962
|
|
|
1963
|
-
if (isArray$
|
|
1963
|
+
if (isArray$5(obj)) {
|
|
1964
1964
|
// Iterate over array values
|
|
1965
1965
|
for (i = 0, l = obj.length; i < l; i++) {
|
|
1966
1966
|
fn.call(null, obj[i], i, obj);
|
|
@@ -2036,7 +2036,7 @@
|
|
|
2036
2036
|
result[targetKey] = merge$2(result[targetKey], val);
|
|
2037
2037
|
} else if (isPlainObject$6(val)) {
|
|
2038
2038
|
result[targetKey] = merge$2({}, val);
|
|
2039
|
-
} else if (isArray$
|
|
2039
|
+
} else if (isArray$5(val)) {
|
|
2040
2040
|
result[targetKey] = val.slice();
|
|
2041
2041
|
} else if (!skipUndefined || !isUndefined(val)) {
|
|
2042
2042
|
result[targetKey] = val;
|
|
@@ -2166,7 +2166,7 @@
|
|
|
2166
2166
|
*/
|
|
2167
2167
|
const toArray$3 = (thing) => {
|
|
2168
2168
|
if (!thing) return null;
|
|
2169
|
-
if (isArray$
|
|
2169
|
+
if (isArray$5(thing)) return thing;
|
|
2170
2170
|
let i = thing.length;
|
|
2171
2171
|
if (!isNumber$1(i)) return null;
|
|
2172
2172
|
const arr = new Array(i);
|
|
@@ -2244,7 +2244,7 @@
|
|
|
2244
2244
|
};
|
|
2245
2245
|
|
|
2246
2246
|
/* Creating a function that will check if an object has a property. */
|
|
2247
|
-
const hasOwnProperty$
|
|
2247
|
+
const hasOwnProperty$7 = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
2248
2248
|
|
|
2249
2249
|
/**
|
|
2250
2250
|
* Determine if a value is a RegExp object
|
|
@@ -2309,7 +2309,7 @@
|
|
|
2309
2309
|
});
|
|
2310
2310
|
};
|
|
2311
2311
|
|
|
2312
|
-
isArray$
|
|
2312
|
+
isArray$5(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
2313
2313
|
|
|
2314
2314
|
return obj;
|
|
2315
2315
|
};
|
|
@@ -2350,7 +2350,7 @@
|
|
|
2350
2350
|
|
|
2351
2351
|
if(!('toJSON' in source)) {
|
|
2352
2352
|
stack[i] = source;
|
|
2353
|
-
const target = isArray$
|
|
2353
|
+
const target = isArray$5(source) ? [] : {};
|
|
2354
2354
|
|
|
2355
2355
|
forEach(source, (value, key) => {
|
|
2356
2356
|
const reducedValue = visit(value, i + 1);
|
|
@@ -2409,7 +2409,7 @@
|
|
|
2409
2409
|
|
|
2410
2410
|
|
|
2411
2411
|
const utils$1 = {
|
|
2412
|
-
isArray: isArray$
|
|
2412
|
+
isArray: isArray$5,
|
|
2413
2413
|
isArrayBuffer,
|
|
2414
2414
|
isBuffer,
|
|
2415
2415
|
isFormData,
|
|
@@ -2448,8 +2448,8 @@
|
|
|
2448
2448
|
forEachEntry,
|
|
2449
2449
|
matchAll,
|
|
2450
2450
|
isHTMLForm,
|
|
2451
|
-
hasOwnProperty: hasOwnProperty$
|
|
2452
|
-
hasOwnProp: hasOwnProperty$
|
|
2451
|
+
hasOwnProperty: hasOwnProperty$7,
|
|
2452
|
+
hasOwnProp: hasOwnProperty$7, // an alias to avoid ESLint no-prototype-builtins detection
|
|
2453
2453
|
reduceDescriptors,
|
|
2454
2454
|
freezeMethods,
|
|
2455
2455
|
toObjectSet,
|
|
@@ -36485,14 +36485,14 @@
|
|
|
36485
36485
|
return typeof value === 'function';
|
|
36486
36486
|
}
|
|
36487
36487
|
|
|
36488
|
-
function hasOwnProperty$
|
|
36488
|
+
function hasOwnProperty$6(object, property) {
|
|
36489
36489
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
36490
36490
|
}
|
|
36491
36491
|
|
|
36492
36492
|
function validateChanges(initial, changes) {
|
|
36493
36493
|
if (!isObject$7(changes)) errorHandler$1('changeType');
|
|
36494
36494
|
if (Object.keys(changes).some(function (field) {
|
|
36495
|
-
return !hasOwnProperty$
|
|
36495
|
+
return !hasOwnProperty$6(initial, field);
|
|
36496
36496
|
})) errorHandler$1('changeField');
|
|
36497
36497
|
return changes;
|
|
36498
36498
|
}
|
|
@@ -44657,7 +44657,8 @@
|
|
|
44657
44657
|
const secondArr = toArray$2(secondName);
|
|
44658
44658
|
const isHidden = !!hiddenPaths && !!nameArr && includesPath(hiddenPaths, nameArr);
|
|
44659
44659
|
const isHiddenSecond = !!hiddenPaths && !!secondArr && includesPath(hiddenPaths, secondArr);
|
|
44660
|
-
|
|
44660
|
+
const shouldHide = !hiddenPaths || isHidden || isHiddenSecond;
|
|
44661
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PossibleHiddenContainer, { $isHidden: shouldHide, "aria-hidden": shouldHide, hidden: shouldHide || void 0, children });
|
|
44661
44662
|
};
|
|
44662
44663
|
|
|
44663
44664
|
const HeightContainer = styled.div`
|
|
@@ -49662,7 +49663,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
49662
49663
|
exports.isDeepKey = isDeepKey;
|
|
49663
49664
|
} (isDeepKey));
|
|
49664
49665
|
|
|
49665
|
-
var toKey$
|
|
49666
|
+
var toKey$3 = {};
|
|
49666
49667
|
|
|
49667
49668
|
(function (exports) {
|
|
49668
49669
|
|
|
@@ -49679,7 +49680,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
49679
49680
|
}
|
|
49680
49681
|
|
|
49681
49682
|
exports.toKey = toKey;
|
|
49682
|
-
} (toKey$
|
|
49683
|
+
} (toKey$3));
|
|
49683
49684
|
|
|
49684
49685
|
var toPath = {};
|
|
49685
49686
|
|
|
@@ -49714,7 +49715,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
49714
49715
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
49715
49716
|
|
|
49716
49717
|
const toString = toString$3;
|
|
49717
|
-
const toKey = toKey$
|
|
49718
|
+
const toKey = toKey$3;
|
|
49718
49719
|
|
|
49719
49720
|
function toPath(deepKey) {
|
|
49720
49721
|
if (Array.isArray(deepKey)) {
|
|
@@ -49799,7 +49800,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
49799
49800
|
|
|
49800
49801
|
const isUnsafeProperty$1 = isUnsafeProperty;
|
|
49801
49802
|
const isDeepKey$1 = isDeepKey;
|
|
49802
|
-
const toKey = toKey$
|
|
49803
|
+
const toKey = toKey$3;
|
|
49803
49804
|
const toPath$1 = toPath;
|
|
49804
49805
|
|
|
49805
49806
|
function get(object, path, defaultValue) {
|
|
@@ -50357,7 +50358,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
50357
50358
|
|
|
50358
50359
|
var isArrayLike = {};
|
|
50359
50360
|
|
|
50360
|
-
var isLength = {};
|
|
50361
|
+
var isLength$2 = {};
|
|
50361
50362
|
|
|
50362
50363
|
(function (exports) {
|
|
50363
50364
|
|
|
@@ -50368,22 +50369,22 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
50368
50369
|
}
|
|
50369
50370
|
|
|
50370
50371
|
exports.isLength = isLength;
|
|
50371
|
-
} (isLength));
|
|
50372
|
+
} (isLength$2));
|
|
50372
50373
|
|
|
50373
50374
|
(function (exports) {
|
|
50374
50375
|
|
|
50375
50376
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
50376
50377
|
|
|
50377
|
-
const isLength
|
|
50378
|
+
const isLength = isLength$2;
|
|
50378
50379
|
|
|
50379
50380
|
function isArrayLike(value) {
|
|
50380
|
-
return value != null && typeof value !== 'function' && isLength
|
|
50381
|
+
return value != null && typeof value !== 'function' && isLength.isLength(value.length);
|
|
50381
50382
|
}
|
|
50382
50383
|
|
|
50383
50384
|
exports.isArrayLike = isArrayLike;
|
|
50384
50385
|
} (isArrayLike));
|
|
50385
50386
|
|
|
50386
|
-
var isObjectLike$
|
|
50387
|
+
var isObjectLike$5 = {};
|
|
50387
50388
|
|
|
50388
50389
|
(function (exports) {
|
|
50389
50390
|
|
|
@@ -50394,14 +50395,14 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
50394
50395
|
}
|
|
50395
50396
|
|
|
50396
50397
|
exports.isObjectLike = isObjectLike;
|
|
50397
|
-
} (isObjectLike$
|
|
50398
|
+
} (isObjectLike$5));
|
|
50398
50399
|
|
|
50399
50400
|
(function (exports) {
|
|
50400
50401
|
|
|
50401
50402
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
50402
50403
|
|
|
50403
50404
|
const isArrayLike$1 = isArrayLike;
|
|
50404
|
-
const isObjectLike = isObjectLike$
|
|
50405
|
+
const isObjectLike = isObjectLike$5;
|
|
50405
50406
|
|
|
50406
50407
|
function isArrayLikeObject(value) {
|
|
50407
50408
|
return isObjectLike.isObjectLike(value) && isArrayLike$1.isArrayLike(value);
|
|
@@ -51020,9 +51021,9 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
51020
51021
|
exports.cloneDeep = cloneDeep;
|
|
51021
51022
|
} (cloneDeep));
|
|
51022
51023
|
|
|
51023
|
-
var has$
|
|
51024
|
+
var has$3 = {};
|
|
51024
51025
|
|
|
51025
|
-
var isIndex = {};
|
|
51026
|
+
var isIndex$2 = {};
|
|
51026
51027
|
|
|
51027
51028
|
(function (exports) {
|
|
51028
51029
|
|
|
@@ -51044,9 +51045,9 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
51044
51045
|
}
|
|
51045
51046
|
|
|
51046
51047
|
exports.isIndex = isIndex;
|
|
51047
|
-
} (isIndex));
|
|
51048
|
+
} (isIndex$2));
|
|
51048
51049
|
|
|
51049
|
-
var isArguments = {};
|
|
51050
|
+
var isArguments$2 = {};
|
|
51050
51051
|
|
|
51051
51052
|
(function (exports) {
|
|
51052
51053
|
|
|
@@ -51059,15 +51060,15 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
51059
51060
|
}
|
|
51060
51061
|
|
|
51061
51062
|
exports.isArguments = isArguments;
|
|
51062
|
-
} (isArguments));
|
|
51063
|
+
} (isArguments$2));
|
|
51063
51064
|
|
|
51064
51065
|
(function (exports) {
|
|
51065
51066
|
|
|
51066
51067
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
51067
51068
|
|
|
51068
51069
|
const isDeepKey$1 = isDeepKey;
|
|
51069
|
-
const isIndex
|
|
51070
|
-
const isArguments
|
|
51070
|
+
const isIndex = isIndex$2;
|
|
51071
|
+
const isArguments = isArguments$2;
|
|
51071
51072
|
const toPath$1 = toPath;
|
|
51072
51073
|
|
|
51073
51074
|
function has(object, path) {
|
|
@@ -51088,7 +51089,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
51088
51089
|
for (let i = 0; i < resolvedPath.length; i++) {
|
|
51089
51090
|
const key = resolvedPath[i];
|
|
51090
51091
|
if (current == null || !Object.hasOwn(current, key)) {
|
|
51091
|
-
const isSparseIndex = (Array.isArray(current) || isArguments
|
|
51092
|
+
const isSparseIndex = (Array.isArray(current) || isArguments.isArguments(current)) && isIndex.isIndex(key) && key < current.length;
|
|
51092
51093
|
if (!isSparseIndex) {
|
|
51093
51094
|
return false;
|
|
51094
51095
|
}
|
|
@@ -51099,17 +51100,17 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
51099
51100
|
}
|
|
51100
51101
|
|
|
51101
51102
|
exports.has = has;
|
|
51102
|
-
} (has$
|
|
51103
|
+
} (has$3));
|
|
51103
51104
|
|
|
51104
51105
|
(function (exports) {
|
|
51105
51106
|
|
|
51106
51107
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
51107
51108
|
|
|
51108
51109
|
const isMatch$1 = isMatch;
|
|
51109
|
-
const toKey = toKey$
|
|
51110
|
+
const toKey = toKey$3;
|
|
51110
51111
|
const cloneDeep$1 = cloneDeep;
|
|
51111
51112
|
const get = get$4;
|
|
51112
|
-
const has = has$
|
|
51113
|
+
const has = has$3;
|
|
51113
51114
|
|
|
51114
51115
|
function matchesProperty(property, source) {
|
|
51115
51116
|
switch (typeof property) {
|
|
@@ -52168,7 +52169,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
52168
52169
|
|
|
52169
52170
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
52170
52171
|
|
|
52171
|
-
const isIndex
|
|
52172
|
+
const isIndex = isIndex$2;
|
|
52172
52173
|
const isArrayLike$1 = isArrayLike;
|
|
52173
52174
|
const isObject = isObject$4;
|
|
52174
52175
|
const eq = eq$2;
|
|
@@ -52177,7 +52178,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
52177
52178
|
if (!isObject.isObject(object)) {
|
|
52178
52179
|
return false;
|
|
52179
52180
|
}
|
|
52180
|
-
if ((typeof index === 'number' && isArrayLike$1.isArrayLike(object) && isIndex
|
|
52181
|
+
if ((typeof index === 'number' && isArrayLike$1.isArrayLike(object) && isIndex.isIndex(index) && index < object.length) ||
|
|
52181
52182
|
(typeof index === 'string' && index in object)) {
|
|
52182
52183
|
return eq.eq(object[index], value);
|
|
52183
52184
|
}
|
|
@@ -52715,7 +52716,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
52715
52716
|
const state = thing[DRAFT_STATE];
|
|
52716
52717
|
return state ? state.type_ : Array.isArray(thing) ? 1 /* Array */ : isMap(thing) ? 2 /* Map */ : isSet(thing) ? 3 /* Set */ : 0 /* Object */;
|
|
52717
52718
|
}
|
|
52718
|
-
function has(thing, prop) {
|
|
52719
|
+
function has$2(thing, prop) {
|
|
52719
52720
|
return getArchtype(thing) === 2 /* Map */ ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
|
|
52720
52721
|
}
|
|
52721
52722
|
function set(thing, propOrOldValue, value) {
|
|
@@ -52937,7 +52938,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
52937
52938
|
die(5);
|
|
52938
52939
|
if (isDraft(childValue)) {
|
|
52939
52940
|
const path = rootPath && parentState && parentState.type_ !== 3 /* Set */ && // Set objects are atomic since they have no keys.
|
|
52940
|
-
!has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
|
|
52941
|
+
!has$2(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
|
|
52941
52942
|
const res = finalize(rootScope, childValue, path);
|
|
52942
52943
|
set(targetObject, prop, res);
|
|
52943
52944
|
if (isDraft(res)) {
|
|
@@ -53004,7 +53005,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
53004
53005
|
if (prop === DRAFT_STATE)
|
|
53005
53006
|
return state;
|
|
53006
53007
|
const source = latest(state);
|
|
53007
|
-
if (!has(source, prop)) {
|
|
53008
|
+
if (!has$2(source, prop)) {
|
|
53008
53009
|
return readPropFromProto(state, source, prop);
|
|
53009
53010
|
}
|
|
53010
53011
|
const value = source[prop];
|
|
@@ -53037,7 +53038,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
53037
53038
|
state.assigned_[prop] = false;
|
|
53038
53039
|
return true;
|
|
53039
53040
|
}
|
|
53040
|
-
if (is$1(value, current2) && (value !== void 0 || has(state.base_, prop)))
|
|
53041
|
+
if (is$1(value, current2) && (value !== void 0 || has$2(state.base_, prop)))
|
|
53041
53042
|
return true;
|
|
53042
53043
|
prepareCopy(state);
|
|
53043
53044
|
markChanged(state);
|
|
@@ -61600,8 +61601,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
61600
61601
|
ONE,
|
|
61601
61602
|
BASE = 1e7,
|
|
61602
61603
|
LOG_BASE = 7,
|
|
61603
|
-
MAX_SAFE_INTEGER = 9007199254740991,
|
|
61604
|
-
MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), // 1286742750677284
|
|
61604
|
+
MAX_SAFE_INTEGER$2 = 9007199254740991,
|
|
61605
|
+
MAX_E = mathfloor(MAX_SAFE_INTEGER$2 / LOG_BASE), // 1286742750677284
|
|
61605
61606
|
|
|
61606
61607
|
// Decimal.prototype object
|
|
61607
61608
|
P = {};
|
|
@@ -62291,7 +62292,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
62291
62292
|
if (sign < 0) throw Error(decimalError + 'NaN');
|
|
62292
62293
|
|
|
62293
62294
|
// If y is a small integer use the 'exponentiation by squaring' algorithm.
|
|
62294
|
-
} else if ((k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {
|
|
62295
|
+
} else if ((k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER$2) {
|
|
62295
62296
|
r = new Ctor(ONE);
|
|
62296
62297
|
|
|
62297
62298
|
// Max k of 9007199254740991 takes 53 loop iterations.
|
|
@@ -83303,14 +83304,14 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
83303
83304
|
var root$4 = freeGlobal$2 || freeSelf$1 || Function('return this')();
|
|
83304
83305
|
|
|
83305
83306
|
/** Used for built-in method references. */
|
|
83306
|
-
var objectProto$
|
|
83307
|
+
var objectProto$7 = Object.prototype;
|
|
83307
83308
|
|
|
83308
83309
|
/**
|
|
83309
83310
|
* Used to resolve the
|
|
83310
83311
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
83311
83312
|
* of values.
|
|
83312
83313
|
*/
|
|
83313
|
-
var objectToString$2 = objectProto$
|
|
83314
|
+
var objectToString$2 = objectProto$7.toString;
|
|
83314
83315
|
|
|
83315
83316
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
83316
83317
|
var nativeMax = Math.max,
|
|
@@ -83566,7 +83567,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
83566
83567
|
* _.isObjectLike(null);
|
|
83567
83568
|
* // => false
|
|
83568
83569
|
*/
|
|
83569
|
-
function isObjectLike$
|
|
83570
|
+
function isObjectLike$4(value) {
|
|
83570
83571
|
return !!value && typeof value == 'object';
|
|
83571
83572
|
}
|
|
83572
83573
|
|
|
@@ -83589,7 +83590,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
83589
83590
|
*/
|
|
83590
83591
|
function isSymbol$4(value) {
|
|
83591
83592
|
return typeof value == 'symbol' ||
|
|
83592
|
-
(isObjectLike$
|
|
83593
|
+
(isObjectLike$4(value) && objectToString$2.call(value) == symbolTag$1);
|
|
83593
83594
|
}
|
|
83594
83595
|
|
|
83595
83596
|
/**
|
|
@@ -84031,9 +84032,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84031
84032
|
* // => false
|
|
84032
84033
|
*/
|
|
84033
84034
|
|
|
84034
|
-
var isArray$
|
|
84035
|
+
var isArray$4 = Array.isArray;
|
|
84035
84036
|
|
|
84036
|
-
var isArray_1 = isArray$
|
|
84037
|
+
var isArray_1 = isArray$4;
|
|
84037
84038
|
|
|
84038
84039
|
/** Detect free variable `global` from Node.js. */
|
|
84039
84040
|
|
|
@@ -84061,17 +84062,17 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84061
84062
|
var Symbol$3 = _Symbol;
|
|
84062
84063
|
|
|
84063
84064
|
/** Used for built-in method references. */
|
|
84064
|
-
var objectProto$
|
|
84065
|
+
var objectProto$6 = Object.prototype;
|
|
84065
84066
|
|
|
84066
84067
|
/** Used to check objects for own properties. */
|
|
84067
|
-
var hasOwnProperty$
|
|
84068
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
84068
84069
|
|
|
84069
84070
|
/**
|
|
84070
84071
|
* Used to resolve the
|
|
84071
84072
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
84072
84073
|
* of values.
|
|
84073
84074
|
*/
|
|
84074
|
-
var nativeObjectToString$1 = objectProto$
|
|
84075
|
+
var nativeObjectToString$1 = objectProto$6.toString;
|
|
84075
84076
|
|
|
84076
84077
|
/** Built-in value references. */
|
|
84077
84078
|
var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : undefined;
|
|
@@ -84084,7 +84085,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84084
84085
|
* @returns {string} Returns the raw `toStringTag`.
|
|
84085
84086
|
*/
|
|
84086
84087
|
function getRawTag$1(value) {
|
|
84087
|
-
var isOwn = hasOwnProperty$
|
|
84088
|
+
var isOwn = hasOwnProperty$5.call(value, symToStringTag$1),
|
|
84088
84089
|
tag = value[symToStringTag$1];
|
|
84089
84090
|
|
|
84090
84091
|
try {
|
|
@@ -84107,14 +84108,14 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84107
84108
|
|
|
84108
84109
|
/** Used for built-in method references. */
|
|
84109
84110
|
|
|
84110
|
-
var objectProto$
|
|
84111
|
+
var objectProto$5 = Object.prototype;
|
|
84111
84112
|
|
|
84112
84113
|
/**
|
|
84113
84114
|
* Used to resolve the
|
|
84114
84115
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
84115
84116
|
* of values.
|
|
84116
84117
|
*/
|
|
84117
|
-
var nativeObjectToString = objectProto$
|
|
84118
|
+
var nativeObjectToString = objectProto$5.toString;
|
|
84118
84119
|
|
|
84119
84120
|
/**
|
|
84120
84121
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -84147,7 +84148,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84147
84148
|
* @param {*} value The value to query.
|
|
84148
84149
|
* @returns {string} Returns the `toStringTag`.
|
|
84149
84150
|
*/
|
|
84150
|
-
function baseGetTag$
|
|
84151
|
+
function baseGetTag$3(value) {
|
|
84151
84152
|
if (value == null) {
|
|
84152
84153
|
return value === undefined ? undefinedTag : nullTag;
|
|
84153
84154
|
}
|
|
@@ -84156,7 +84157,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84156
84157
|
: objectToString(value);
|
|
84157
84158
|
}
|
|
84158
84159
|
|
|
84159
|
-
var _baseGetTag = baseGetTag$
|
|
84160
|
+
var _baseGetTag = baseGetTag$3;
|
|
84160
84161
|
|
|
84161
84162
|
/**
|
|
84162
84163
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
@@ -84183,14 +84184,14 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84183
84184
|
* // => false
|
|
84184
84185
|
*/
|
|
84185
84186
|
|
|
84186
|
-
function isObjectLike$
|
|
84187
|
+
function isObjectLike$3(value) {
|
|
84187
84188
|
return value != null && typeof value == 'object';
|
|
84188
84189
|
}
|
|
84189
84190
|
|
|
84190
|
-
var isObjectLike_1 = isObjectLike$
|
|
84191
|
+
var isObjectLike_1 = isObjectLike$3;
|
|
84191
84192
|
|
|
84192
|
-
var baseGetTag$
|
|
84193
|
-
isObjectLike = isObjectLike_1;
|
|
84193
|
+
var baseGetTag$2 = _baseGetTag,
|
|
84194
|
+
isObjectLike$2 = isObjectLike_1;
|
|
84194
84195
|
|
|
84195
84196
|
/** `Object#toString` result references. */
|
|
84196
84197
|
var symbolTag = '[object Symbol]';
|
|
@@ -84214,12 +84215,12 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84214
84215
|
*/
|
|
84215
84216
|
function isSymbol$3(value) {
|
|
84216
84217
|
return typeof value == 'symbol' ||
|
|
84217
|
-
(isObjectLike(value) && baseGetTag$
|
|
84218
|
+
(isObjectLike$2(value) && baseGetTag$2(value) == symbolTag);
|
|
84218
84219
|
}
|
|
84219
84220
|
|
|
84220
84221
|
var isSymbol_1 = isSymbol$3;
|
|
84221
84222
|
|
|
84222
|
-
var isArray$
|
|
84223
|
+
var isArray$3 = isArray_1,
|
|
84223
84224
|
isSymbol$2 = isSymbol_1;
|
|
84224
84225
|
|
|
84225
84226
|
/** Used to match property names within property paths. */
|
|
@@ -84235,7 +84236,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84235
84236
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
84236
84237
|
*/
|
|
84237
84238
|
function isKey$1(value, object) {
|
|
84238
|
-
if (isArray$
|
|
84239
|
+
if (isArray$3(value)) {
|
|
84239
84240
|
return false;
|
|
84240
84241
|
}
|
|
84241
84242
|
var type = typeof value;
|
|
@@ -84282,7 +84283,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84282
84283
|
|
|
84283
84284
|
var isObject_1 = isObject$2;
|
|
84284
84285
|
|
|
84285
|
-
var baseGetTag = _baseGetTag,
|
|
84286
|
+
var baseGetTag$1 = _baseGetTag,
|
|
84286
84287
|
isObject$1 = isObject_1;
|
|
84287
84288
|
|
|
84288
84289
|
/** `Object#toString` result references. */
|
|
@@ -84314,7 +84315,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84314
84315
|
}
|
|
84315
84316
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
84316
84317
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
84317
|
-
var tag = baseGetTag(value);
|
|
84318
|
+
var tag = baseGetTag$1(value);
|
|
84318
84319
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
84319
84320
|
}
|
|
84320
84321
|
|
|
@@ -84392,17 +84393,17 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84392
84393
|
|
|
84393
84394
|
/** Used for built-in method references. */
|
|
84394
84395
|
var funcProto = Function.prototype,
|
|
84395
|
-
objectProto$
|
|
84396
|
+
objectProto$4 = Object.prototype;
|
|
84396
84397
|
|
|
84397
84398
|
/** Used to resolve the decompiled source of functions. */
|
|
84398
84399
|
var funcToString = funcProto.toString;
|
|
84399
84400
|
|
|
84400
84401
|
/** Used to check objects for own properties. */
|
|
84401
|
-
var hasOwnProperty$
|
|
84402
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
84402
84403
|
|
|
84403
84404
|
/** Used to detect if a method is native. */
|
|
84404
84405
|
var reIsNative = RegExp('^' +
|
|
84405
|
-
funcToString.call(hasOwnProperty$
|
|
84406
|
+
funcToString.call(hasOwnProperty$4).replace(reRegExpChar, '\\$&')
|
|
84406
84407
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
84407
84408
|
);
|
|
84408
84409
|
|
|
@@ -84505,10 +84506,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84505
84506
|
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
84506
84507
|
|
|
84507
84508
|
/** Used for built-in method references. */
|
|
84508
|
-
var objectProto$
|
|
84509
|
+
var objectProto$3 = Object.prototype;
|
|
84509
84510
|
|
|
84510
84511
|
/** Used to check objects for own properties. */
|
|
84511
|
-
var hasOwnProperty$
|
|
84512
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
84512
84513
|
|
|
84513
84514
|
/**
|
|
84514
84515
|
* Gets the hash value for `key`.
|
|
@@ -84525,7 +84526,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84525
84526
|
var result = data[key];
|
|
84526
84527
|
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
84527
84528
|
}
|
|
84528
|
-
return hasOwnProperty$
|
|
84529
|
+
return hasOwnProperty$3.call(data, key) ? data[key] : undefined;
|
|
84529
84530
|
}
|
|
84530
84531
|
|
|
84531
84532
|
var _hashGet = hashGet$1;
|
|
@@ -84533,10 +84534,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84533
84534
|
var nativeCreate$1 = _nativeCreate;
|
|
84534
84535
|
|
|
84535
84536
|
/** Used for built-in method references. */
|
|
84536
|
-
var objectProto = Object.prototype;
|
|
84537
|
+
var objectProto$2 = Object.prototype;
|
|
84537
84538
|
|
|
84538
84539
|
/** Used to check objects for own properties. */
|
|
84539
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
84540
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
84540
84541
|
|
|
84541
84542
|
/**
|
|
84542
84543
|
* Checks if a hash value for `key` exists.
|
|
@@ -84549,7 +84550,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
84549
84550
|
*/
|
|
84550
84551
|
function hashHas$1(key) {
|
|
84551
84552
|
var data = this.__data__;
|
|
84552
|
-
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
84553
|
+
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$2.call(data, key);
|
|
84553
84554
|
}
|
|
84554
84555
|
|
|
84555
84556
|
var _hashHas = hashHas$1;
|
|
@@ -85149,7 +85150,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85149
85150
|
|
|
85150
85151
|
var Symbol$1 = _Symbol,
|
|
85151
85152
|
arrayMap = _arrayMap,
|
|
85152
|
-
isArray$
|
|
85153
|
+
isArray$2 = isArray_1,
|
|
85153
85154
|
isSymbol$1 = isSymbol_1;
|
|
85154
85155
|
|
|
85155
85156
|
/** Used to convert symbols to primitives and strings. */
|
|
@@ -85169,7 +85170,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85169
85170
|
if (typeof value == 'string') {
|
|
85170
85171
|
return value;
|
|
85171
85172
|
}
|
|
85172
|
-
if (isArray$
|
|
85173
|
+
if (isArray$2(value)) {
|
|
85173
85174
|
// Recursively convert values (susceptible to call stack limits).
|
|
85174
85175
|
return arrayMap(value, baseToString$1) + '';
|
|
85175
85176
|
}
|
|
@@ -85211,7 +85212,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85211
85212
|
|
|
85212
85213
|
var toString_1 = toString$1;
|
|
85213
85214
|
|
|
85214
|
-
var isArray = isArray_1,
|
|
85215
|
+
var isArray$1 = isArray_1,
|
|
85215
85216
|
isKey = _isKey,
|
|
85216
85217
|
stringToPath = _stringToPath,
|
|
85217
85218
|
toString = toString_1;
|
|
@@ -85224,14 +85225,14 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85224
85225
|
* @param {Object} [object] The object to query keys on.
|
|
85225
85226
|
* @returns {Array} Returns the cast property path array.
|
|
85226
85227
|
*/
|
|
85227
|
-
function castPath$
|
|
85228
|
-
if (isArray(value)) {
|
|
85228
|
+
function castPath$2(value, object) {
|
|
85229
|
+
if (isArray$1(value)) {
|
|
85229
85230
|
return value;
|
|
85230
85231
|
}
|
|
85231
85232
|
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
85232
85233
|
}
|
|
85233
85234
|
|
|
85234
|
-
var _castPath = castPath$
|
|
85235
|
+
var _castPath = castPath$2;
|
|
85235
85236
|
|
|
85236
85237
|
var isSymbol = isSymbol_1;
|
|
85237
85238
|
|
|
@@ -85242,7 +85243,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85242
85243
|
* @param {*} value The value to inspect.
|
|
85243
85244
|
* @returns {string|symbol} Returns the key.
|
|
85244
85245
|
*/
|
|
85245
|
-
function toKey$
|
|
85246
|
+
function toKey$2(value) {
|
|
85246
85247
|
if (typeof value == 'string' || isSymbol(value)) {
|
|
85247
85248
|
return value;
|
|
85248
85249
|
}
|
|
@@ -85250,10 +85251,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85250
85251
|
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
85251
85252
|
}
|
|
85252
85253
|
|
|
85253
|
-
var _toKey = toKey$
|
|
85254
|
+
var _toKey = toKey$2;
|
|
85254
85255
|
|
|
85255
|
-
var castPath = _castPath,
|
|
85256
|
-
toKey = _toKey;
|
|
85256
|
+
var castPath$1 = _castPath,
|
|
85257
|
+
toKey$1 = _toKey;
|
|
85257
85258
|
|
|
85258
85259
|
/**
|
|
85259
85260
|
* The base implementation of `_.get` without support for default values.
|
|
@@ -85264,13 +85265,13 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85264
85265
|
* @returns {*} Returns the resolved value.
|
|
85265
85266
|
*/
|
|
85266
85267
|
function baseGet$1(object, path) {
|
|
85267
|
-
path = castPath(path, object);
|
|
85268
|
+
path = castPath$1(path, object);
|
|
85268
85269
|
|
|
85269
85270
|
var index = 0,
|
|
85270
85271
|
length = path.length;
|
|
85271
85272
|
|
|
85272
85273
|
while (object != null && index < length) {
|
|
85273
|
-
object = object[toKey(path[index++])];
|
|
85274
|
+
object = object[toKey$1(path[index++])];
|
|
85274
85275
|
}
|
|
85275
85276
|
return (index && index == length) ? object : undefined;
|
|
85276
85277
|
}
|
|
@@ -85313,10 +85314,82 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85313
85314
|
|
|
85314
85315
|
const get$1 = /*@__PURE__*/getDefaultExportFromCjs(get_1);
|
|
85315
85316
|
|
|
85317
|
+
const toOneOfBranchPath = (path) => path.split(".").filter(Boolean);
|
|
85318
|
+
const getOneOfBranchPathKey = (path) => JSON.stringify(path);
|
|
85319
|
+
const matchesOneOfBranch = (value, branch) => {
|
|
85320
|
+
const matchEntries = Object.entries(branch.match || {});
|
|
85321
|
+
if (matchEntries.length === 0) {
|
|
85322
|
+
return false;
|
|
85323
|
+
}
|
|
85324
|
+
return matchEntries.every(([path, expectedValue]) => get$1(value, path) === expectedValue);
|
|
85325
|
+
};
|
|
85326
|
+
const collectOneOfBranchMatchKeys = (branches) => {
|
|
85327
|
+
const set = /* @__PURE__ */ new Set();
|
|
85328
|
+
branches.forEach((branch) => {
|
|
85329
|
+
Object.keys(branch.match || {}).forEach((key) => {
|
|
85330
|
+
set.add(key);
|
|
85331
|
+
});
|
|
85332
|
+
});
|
|
85333
|
+
return Array.from(set);
|
|
85334
|
+
};
|
|
85335
|
+
const collectInactiveOneOfBranchPaths = ({
|
|
85336
|
+
branches,
|
|
85337
|
+
activeBranch
|
|
85338
|
+
}) => {
|
|
85339
|
+
const visibleBranchPathKeys = /* @__PURE__ */ new Set([
|
|
85340
|
+
...Object.keys(activeBranch.match || {}).map((matchPath) => getOneOfBranchPathKey(toOneOfBranchPath(matchPath))),
|
|
85341
|
+
...(activeBranch.required || []).map((requiredPath) => getOneOfBranchPathKey(toOneOfBranchPath(requiredPath)))
|
|
85342
|
+
]);
|
|
85343
|
+
const candidatePathKeys = /* @__PURE__ */ new Set();
|
|
85344
|
+
const candidatePaths = [];
|
|
85345
|
+
const addCandidatePath = (branchPath) => {
|
|
85346
|
+
const normalizedPath = toOneOfBranchPath(branchPath);
|
|
85347
|
+
const key = getOneOfBranchPathKey(normalizedPath);
|
|
85348
|
+
if (visibleBranchPathKeys.has(key) || candidatePathKeys.has(key)) {
|
|
85349
|
+
return;
|
|
85350
|
+
}
|
|
85351
|
+
candidatePathKeys.add(key);
|
|
85352
|
+
candidatePaths.push(normalizedPath);
|
|
85353
|
+
};
|
|
85354
|
+
(activeBranch.forbidden || []).forEach(addCandidatePath);
|
|
85355
|
+
branches.filter((branch) => branch !== activeBranch).forEach((branch) => {
|
|
85356
|
+
(branch.required || []).forEach(addCandidatePath);
|
|
85357
|
+
(branch.forbidden || []).forEach(addCandidatePath);
|
|
85358
|
+
});
|
|
85359
|
+
return candidatePaths;
|
|
85360
|
+
};
|
|
85361
|
+
|
|
85316
85362
|
const prettyFieldPath = (name) => {
|
|
85317
85363
|
return Array.isArray(name) ? name.map((segment) => String(segment)).join(".") : String(name);
|
|
85318
85364
|
};
|
|
85319
85365
|
const isEmptyValue = (value) => value === void 0 || value === "" || Array.isArray(value) && value.length === 0;
|
|
85366
|
+
const INT32_MIN = -2147483648;
|
|
85367
|
+
const INT32_MAX = 2147483647;
|
|
85368
|
+
const DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
85369
|
+
const DATE_TIME_PATTERN = /^(\d{4})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(\.\d+)?([Zz]|[+-](\d{2}):(\d{2}))$/;
|
|
85370
|
+
const isValidDateParts = (year, month, day) => {
|
|
85371
|
+
if (month < 1 || month > 12) return false;
|
|
85372
|
+
const isLeapYear = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
85373
|
+
const daysByMonth = [31, isLeapYear ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
85374
|
+
return day >= 1 && day <= daysByMonth[month - 1];
|
|
85375
|
+
};
|
|
85376
|
+
const matchesDateFormat = (value) => {
|
|
85377
|
+
const match = DATE_PATTERN.exec(value);
|
|
85378
|
+
if (!match) return false;
|
|
85379
|
+
const [, year, month, day] = match.map(Number);
|
|
85380
|
+
return isValidDateParts(year, month, day);
|
|
85381
|
+
};
|
|
85382
|
+
const matchesDateTimeFormat = (value) => {
|
|
85383
|
+
const match = DATE_TIME_PATTERN.exec(value);
|
|
85384
|
+
if (!match) return false;
|
|
85385
|
+
const [, year, month, day, hour, minute, second, , , offsetHour, offsetMinute] = match;
|
|
85386
|
+
const parsedHour = Number(hour);
|
|
85387
|
+
const parsedMinute = Number(minute);
|
|
85388
|
+
const parsedSecond = Number(second);
|
|
85389
|
+
const parsedOffsetHour = offsetHour === void 0 ? void 0 : Number(offsetHour);
|
|
85390
|
+
const parsedOffsetMinute = offsetMinute === void 0 ? void 0 : Number(offsetMinute);
|
|
85391
|
+
return isValidDateParts(Number(year), Number(month), Number(day)) && parsedHour >= 0 && parsedHour <= 23 && parsedMinute >= 0 && parsedMinute <= 59 && parsedSecond >= 0 && parsedSecond <= 59 && (parsedOffsetHour === void 0 || parsedOffsetHour >= 0 && parsedOffsetHour <= 23) && (parsedOffsetMinute === void 0 || parsedOffsetMinute >= 0 && parsedOffsetMinute <= 59);
|
|
85392
|
+
};
|
|
85320
85393
|
const isPresentForOneOf = (value) => {
|
|
85321
85394
|
if (value === null) return true;
|
|
85322
85395
|
if (value === void 0) return false;
|
|
@@ -85344,23 +85417,75 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85344
85417
|
}
|
|
85345
85418
|
return getOneOfRequiredGroupsMessage(name, groups);
|
|
85346
85419
|
};
|
|
85420
|
+
const formatOneOfBranchMatch = (branch) => {
|
|
85421
|
+
const matchEntries = Object.entries(branch.match || {});
|
|
85422
|
+
if (matchEntries.length === 0) {
|
|
85423
|
+
return "selected branch";
|
|
85424
|
+
}
|
|
85425
|
+
return matchEntries.map(([path, expectedValue]) => `${path}=${String(expectedValue)}`).join(", ");
|
|
85426
|
+
};
|
|
85427
|
+
const getOneOfBranchErrors = ({
|
|
85428
|
+
value,
|
|
85429
|
+
name,
|
|
85430
|
+
branches
|
|
85431
|
+
}) => {
|
|
85432
|
+
if (!isPresentForOneOf(value)) {
|
|
85433
|
+
return [];
|
|
85434
|
+
}
|
|
85435
|
+
const matchedBranches = branches.filter((branch) => matchesOneOfBranch(value, branch));
|
|
85436
|
+
if (matchedBranches.length === 0) {
|
|
85437
|
+
return [];
|
|
85438
|
+
}
|
|
85439
|
+
if (matchedBranches.length > 1) {
|
|
85440
|
+
const branchText2 = matchedBranches.map(formatOneOfBranchMatch).join(", ");
|
|
85441
|
+
return [`Please match exactly one branch for ${prettyFieldPath(name)}: ${branchText2}`];
|
|
85442
|
+
}
|
|
85443
|
+
const [activeBranch] = matchedBranches;
|
|
85444
|
+
const branchText = formatOneOfBranchMatch(activeBranch);
|
|
85445
|
+
const missingRequiredFields = (activeBranch.required || []).filter((path) => !isPresentForOneOf(get$1(value, path)));
|
|
85446
|
+
const presentForbiddenFields = (activeBranch.forbidden || []).filter((path) => isPresentForOneOf(get$1(value, path)));
|
|
85447
|
+
const errors = [];
|
|
85448
|
+
if (missingRequiredFields.length > 0) {
|
|
85449
|
+
errors.push(
|
|
85450
|
+
`Please provide required fields for ${prettyFieldPath(name)} when ${branchText}: ${formatOneOfGroup(
|
|
85451
|
+
missingRequiredFields
|
|
85452
|
+
)}`
|
|
85453
|
+
);
|
|
85454
|
+
}
|
|
85455
|
+
if (presentForbiddenFields.length > 0) {
|
|
85456
|
+
errors.push(
|
|
85457
|
+
`Please remove forbidden fields for ${prettyFieldPath(name)} when ${branchText}: ${formatOneOfGroup(
|
|
85458
|
+
presentForbiddenFields
|
|
85459
|
+
)}`
|
|
85460
|
+
);
|
|
85461
|
+
}
|
|
85462
|
+
return errors;
|
|
85463
|
+
};
|
|
85347
85464
|
const getCurrentOneOfRequiredGroupState = ({
|
|
85348
85465
|
path,
|
|
85349
85466
|
nodeOneOfRequiredGroups,
|
|
85467
|
+
nodeOneOfBranches,
|
|
85350
85468
|
value
|
|
85351
85469
|
}) => {
|
|
85352
|
-
|
|
85470
|
+
const hasRequiredGroups = Boolean(nodeOneOfRequiredGroups && nodeOneOfRequiredGroups.length > 0);
|
|
85471
|
+
const hasBranches = Boolean(nodeOneOfBranches && nodeOneOfBranches.length > 0);
|
|
85472
|
+
if (!hasRequiredGroups && !hasBranches) {
|
|
85353
85473
|
return [];
|
|
85354
85474
|
}
|
|
85355
|
-
const
|
|
85475
|
+
const requiredGroupError = hasRequiredGroups ? getOneOfRequiredGroupsError({
|
|
85356
85476
|
value,
|
|
85357
85477
|
name: path,
|
|
85358
|
-
groups: nodeOneOfRequiredGroups
|
|
85359
|
-
});
|
|
85478
|
+
groups: nodeOneOfRequiredGroups || []
|
|
85479
|
+
}) : void 0;
|
|
85480
|
+
const branchErrors = hasBranches ? getOneOfBranchErrors({
|
|
85481
|
+
value,
|
|
85482
|
+
name: path,
|
|
85483
|
+
branches: nodeOneOfBranches || []
|
|
85484
|
+
}) : [];
|
|
85360
85485
|
return [
|
|
85361
85486
|
{
|
|
85362
85487
|
name: path,
|
|
85363
|
-
errors:
|
|
85488
|
+
errors: [...requiredGroupError ? [requiredGroupError] : [], ...branchErrors]
|
|
85364
85489
|
}
|
|
85365
85490
|
];
|
|
85366
85491
|
};
|
|
@@ -85375,6 +85500,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85375
85500
|
const currentState = getCurrentOneOfRequiredGroupState({
|
|
85376
85501
|
path,
|
|
85377
85502
|
nodeOneOfRequiredGroups: node.oneOfRequiredGroups,
|
|
85503
|
+
nodeOneOfBranches: node.oneOfBranches,
|
|
85378
85504
|
value
|
|
85379
85505
|
});
|
|
85380
85506
|
const nestedObjectStates = node.properties && value && typeof value === "object" && !Array.isArray(value) ? collectOneOfRequiredGroupStates({
|
|
@@ -85386,6 +85512,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85386
85512
|
...getCurrentOneOfRequiredGroupState({
|
|
85387
85513
|
path: [...path, index],
|
|
85388
85514
|
nodeOneOfRequiredGroups: node.items?.oneOfRequiredGroups,
|
|
85515
|
+
nodeOneOfBranches: node.items?.oneOfBranches,
|
|
85389
85516
|
value: get$1(values, [...path, index])
|
|
85390
85517
|
}),
|
|
85391
85518
|
...node.items?.properties ? collectOneOfRequiredGroupStates({
|
|
@@ -85416,6 +85543,145 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85416
85543
|
}
|
|
85417
85544
|
return { required: true, message };
|
|
85418
85545
|
};
|
|
85546
|
+
const getPatternRule = (pattern, name) => {
|
|
85547
|
+
if (!pattern) {
|
|
85548
|
+
return void 0;
|
|
85549
|
+
}
|
|
85550
|
+
let regexp;
|
|
85551
|
+
const fieldPath = prettyFieldPath(name);
|
|
85552
|
+
try {
|
|
85553
|
+
regexp = new RegExp(pattern);
|
|
85554
|
+
} catch (error) {
|
|
85555
|
+
console.warn("[BlackholeForm] OpenAPI pattern cannot be compiled as JavaScript RegExp", {
|
|
85556
|
+
fieldPath,
|
|
85557
|
+
pattern,
|
|
85558
|
+
error
|
|
85559
|
+
});
|
|
85560
|
+
return void 0;
|
|
85561
|
+
}
|
|
85562
|
+
const message = `Value must match pattern for ${fieldPath}: ${pattern}`;
|
|
85563
|
+
return {
|
|
85564
|
+
validator: async (_, value) => {
|
|
85565
|
+
if (value === void 0 || value === null || value === "") return;
|
|
85566
|
+
if (typeof value !== "string") return;
|
|
85567
|
+
if (!regexp.test(value)) {
|
|
85568
|
+
throw new Error(message);
|
|
85569
|
+
}
|
|
85570
|
+
}
|
|
85571
|
+
};
|
|
85572
|
+
};
|
|
85573
|
+
const getStringLengthRule = ({
|
|
85574
|
+
minLength,
|
|
85575
|
+
maxLength,
|
|
85576
|
+
name
|
|
85577
|
+
}) => {
|
|
85578
|
+
if (minLength === void 0 && maxLength === void 0) {
|
|
85579
|
+
return void 0;
|
|
85580
|
+
}
|
|
85581
|
+
let message = `Value must be at most ${maxLength} characters for ${prettyFieldPath(name)}`;
|
|
85582
|
+
if (minLength !== void 0 && maxLength !== void 0) {
|
|
85583
|
+
message = `Value must be between ${minLength} and ${maxLength} characters for ${prettyFieldPath(name)}`;
|
|
85584
|
+
} else if (minLength !== void 0) {
|
|
85585
|
+
message = `Value must be at least ${minLength} characters for ${prettyFieldPath(name)}`;
|
|
85586
|
+
}
|
|
85587
|
+
return {
|
|
85588
|
+
validator: async (_, value) => {
|
|
85589
|
+
if (value === void 0 || value === null || value === "") return;
|
|
85590
|
+
if (typeof value !== "string") return;
|
|
85591
|
+
if (minLength !== void 0 && value.length < minLength) {
|
|
85592
|
+
throw new Error(message);
|
|
85593
|
+
}
|
|
85594
|
+
if (maxLength !== void 0 && value.length > maxLength) {
|
|
85595
|
+
throw new Error(message);
|
|
85596
|
+
}
|
|
85597
|
+
}
|
|
85598
|
+
};
|
|
85599
|
+
};
|
|
85600
|
+
const getStringFormatRule = (format, name) => {
|
|
85601
|
+
if (!format || format !== "date" && format !== "date-time") {
|
|
85602
|
+
return void 0;
|
|
85603
|
+
}
|
|
85604
|
+
const message = format === "date" ? `Value must match date format for ${prettyFieldPath(name)}: YYYY-MM-DD` : `Value must match date-time format for ${prettyFieldPath(name)}: RFC 3339 date-time`;
|
|
85605
|
+
return {
|
|
85606
|
+
validator: async (_, value) => {
|
|
85607
|
+
if (value === void 0 || value === null || value === "") return;
|
|
85608
|
+
if (typeof value !== "string") return;
|
|
85609
|
+
const matchesFormat = format === "date" ? matchesDateFormat(value) : matchesDateTimeFormat(value);
|
|
85610
|
+
if (!matchesFormat) {
|
|
85611
|
+
throw new Error(message);
|
|
85612
|
+
}
|
|
85613
|
+
}
|
|
85614
|
+
};
|
|
85615
|
+
};
|
|
85616
|
+
const getArrayItemsRule = ({
|
|
85617
|
+
minItems,
|
|
85618
|
+
maxItems,
|
|
85619
|
+
name
|
|
85620
|
+
}) => {
|
|
85621
|
+
if (minItems === void 0 && maxItems === void 0) {
|
|
85622
|
+
return void 0;
|
|
85623
|
+
}
|
|
85624
|
+
let message = `Value must contain at most ${maxItems} items for ${prettyFieldPath(name)}`;
|
|
85625
|
+
if (minItems !== void 0 && maxItems !== void 0) {
|
|
85626
|
+
message = `Value must contain between ${minItems} and ${maxItems} items for ${prettyFieldPath(name)}`;
|
|
85627
|
+
} else if (minItems !== void 0) {
|
|
85628
|
+
message = `Value must contain at least ${minItems} items for ${prettyFieldPath(name)}`;
|
|
85629
|
+
}
|
|
85630
|
+
return {
|
|
85631
|
+
validator: async (_, value) => {
|
|
85632
|
+
if (value === void 0 || value === null) return;
|
|
85633
|
+
if (!Array.isArray(value)) return;
|
|
85634
|
+
if (minItems !== void 0 && value.length < minItems) {
|
|
85635
|
+
throw new Error(message);
|
|
85636
|
+
}
|
|
85637
|
+
if (maxItems !== void 0 && value.length > maxItems) {
|
|
85638
|
+
throw new Error(message);
|
|
85639
|
+
}
|
|
85640
|
+
}
|
|
85641
|
+
};
|
|
85642
|
+
};
|
|
85643
|
+
const getNumberFormatRule = (format, name) => {
|
|
85644
|
+
if (format !== "int32") {
|
|
85645
|
+
return void 0;
|
|
85646
|
+
}
|
|
85647
|
+
const message = `Value must be a 32-bit signed integer for ${prettyFieldPath(name)}`;
|
|
85648
|
+
return {
|
|
85649
|
+
validator: async (_, value) => {
|
|
85650
|
+
if (value === void 0 || value === null || value === "") return;
|
|
85651
|
+
if (typeof value !== "number") return;
|
|
85652
|
+
if (!Number.isInteger(value) || value < INT32_MIN || value > INT32_MAX) {
|
|
85653
|
+
throw new Error(message);
|
|
85654
|
+
}
|
|
85655
|
+
}
|
|
85656
|
+
};
|
|
85657
|
+
};
|
|
85658
|
+
const getNumberRangeRule = ({
|
|
85659
|
+
minimum,
|
|
85660
|
+
maximum,
|
|
85661
|
+
name
|
|
85662
|
+
}) => {
|
|
85663
|
+
if (minimum === void 0 && maximum === void 0) {
|
|
85664
|
+
return void 0;
|
|
85665
|
+
}
|
|
85666
|
+
let message = `Value must be at most ${maximum} for ${prettyFieldPath(name)}`;
|
|
85667
|
+
if (minimum !== void 0 && maximum !== void 0) {
|
|
85668
|
+
message = `Value must be between ${minimum} and ${maximum} for ${prettyFieldPath(name)}`;
|
|
85669
|
+
} else if (minimum !== void 0) {
|
|
85670
|
+
message = `Value must be at least ${minimum} for ${prettyFieldPath(name)}`;
|
|
85671
|
+
}
|
|
85672
|
+
return {
|
|
85673
|
+
validator: async (_, value) => {
|
|
85674
|
+
if (value === void 0 || value === null || value === "") return;
|
|
85675
|
+
if (typeof value !== "number") return;
|
|
85676
|
+
if (minimum !== void 0 && value < minimum) {
|
|
85677
|
+
throw new Error(message);
|
|
85678
|
+
}
|
|
85679
|
+
if (maximum !== void 0 && value > maximum) {
|
|
85680
|
+
throw new Error(message);
|
|
85681
|
+
}
|
|
85682
|
+
}
|
|
85683
|
+
};
|
|
85684
|
+
};
|
|
85419
85685
|
|
|
85420
85686
|
const FormListInput = ({
|
|
85421
85687
|
name,
|
|
@@ -85431,7 +85697,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85431
85697
|
customProps,
|
|
85432
85698
|
urlParams,
|
|
85433
85699
|
onRemoveByMinus,
|
|
85434
|
-
defaultValue
|
|
85700
|
+
defaultValue,
|
|
85701
|
+
minItems,
|
|
85702
|
+
maxItems
|
|
85435
85703
|
}) => {
|
|
85436
85704
|
const designNewLayout = useDesignNewLayout();
|
|
85437
85705
|
const onValuesChangeCallBack = useOnValuesChangeCallback();
|
|
@@ -85443,6 +85711,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85443
85711
|
const fixedName = name === "nodeName" ? "nodeNameBecauseOfSuddenBug" : name;
|
|
85444
85712
|
const formFieldName = arrName || fixedName;
|
|
85445
85713
|
const defaultBtn = useDefaultValueButton(formFieldName, defaultValue);
|
|
85714
|
+
const arrayItemsRule = getArrayItemsRule({ minItems, maxItems, name });
|
|
85446
85715
|
const fullFieldPath = normalizeNameToPath(fixedName);
|
|
85447
85716
|
const baseForRelative = listItemBasePath(fullFieldPath);
|
|
85448
85717
|
const relatedPath = customProps.relatedValuePath ? resolveFormPath(customProps.relatedValuePath, baseForRelative) : void 0;
|
|
@@ -85578,7 +85847,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85578
85847
|
ResetedFormItem$1,
|
|
85579
85848
|
{
|
|
85580
85849
|
name: formFieldName,
|
|
85581
|
-
rules: [
|
|
85850
|
+
rules: [
|
|
85851
|
+
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name),
|
|
85852
|
+
...arrayItemsRule ? [arrayItemsRule] : []
|
|
85853
|
+
],
|
|
85582
85854
|
validateTrigger: "onBlur",
|
|
85583
85855
|
hasFeedback: designNewLayout ? { icons: feedbackIcons } : true,
|
|
85584
85856
|
style: { flex: 1 },
|
|
@@ -85989,15 +86261,42 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
85989
86261
|
);
|
|
85990
86262
|
};
|
|
85991
86263
|
|
|
86264
|
+
const isNamespaceAvailable = (candidate, namespaceData) => namespaceData.selectValues.some((option) => option.value === candidate);
|
|
85992
86265
|
const FormNamespaceInput = ({
|
|
85993
86266
|
name,
|
|
85994
86267
|
namespaceData,
|
|
85995
86268
|
isAdditionalProperties,
|
|
85996
86269
|
removeField,
|
|
85997
|
-
defaultValue
|
|
86270
|
+
defaultValue,
|
|
86271
|
+
contextNamespace
|
|
85998
86272
|
}) => {
|
|
85999
86273
|
const designNewLayout = useDesignNewLayout();
|
|
86274
|
+
const form = antd.Form.useFormInstance();
|
|
86000
86275
|
const defaultBtn = useDefaultValueButton(name, defaultValue);
|
|
86276
|
+
const cascadeAppliedRef = React$1.useRef(false);
|
|
86277
|
+
React$1.useEffect(() => {
|
|
86278
|
+
if (cascadeAppliedRef.current) return;
|
|
86279
|
+
if (!namespaceData) return;
|
|
86280
|
+
const currentValue = form.getFieldValue(name);
|
|
86281
|
+
if (currentValue !== void 0 && currentValue !== null && currentValue !== "") {
|
|
86282
|
+
cascadeAppliedRef.current = true;
|
|
86283
|
+
return;
|
|
86284
|
+
}
|
|
86285
|
+
const defaultIsValid = defaultValue !== void 0 && isNamespaceAvailable(defaultValue, namespaceData);
|
|
86286
|
+
if (defaultValue !== void 0 && !defaultIsValid) {
|
|
86287
|
+
console.warn(
|
|
86288
|
+
`[FormNamespaceInput] Default namespace "${defaultValue}" is not available in this cluster for ${prettyFieldPath(
|
|
86289
|
+
name
|
|
86290
|
+
)}, falling back to URL context`
|
|
86291
|
+
);
|
|
86292
|
+
}
|
|
86293
|
+
if (defaultIsValid) {
|
|
86294
|
+
form.setFieldValue(name, defaultValue);
|
|
86295
|
+
} else if (contextNamespace !== void 0 && isNamespaceAvailable(contextNamespace, namespaceData)) {
|
|
86296
|
+
form.setFieldValue(name, contextNamespace);
|
|
86297
|
+
}
|
|
86298
|
+
cascadeAppliedRef.current = true;
|
|
86299
|
+
}, [namespaceData, defaultValue, contextNamespace, form, name]);
|
|
86001
86300
|
if (!namespaceData) {
|
|
86002
86301
|
return null;
|
|
86003
86302
|
}
|
|
@@ -86080,7 +86379,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86080
86379
|
onRemoveByMinus,
|
|
86081
86380
|
defaultValue,
|
|
86082
86381
|
example,
|
|
86083
|
-
nullable
|
|
86382
|
+
nullable,
|
|
86383
|
+
format,
|
|
86384
|
+
pattern,
|
|
86385
|
+
minLength,
|
|
86386
|
+
maxLength
|
|
86084
86387
|
}) => {
|
|
86085
86388
|
const designNewLayout = useDesignNewLayout();
|
|
86086
86389
|
const fixedName = name === "nodeName" ? "nodeNameBecauseOfSuddenBug" : name;
|
|
@@ -86088,6 +86391,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86088
86391
|
const defaultBtn = useDefaultValueButton(formFieldName, defaultValue, nullable);
|
|
86089
86392
|
const nullBtn = useNullToggleButton(formFieldName, nullable);
|
|
86090
86393
|
const exampleTooltip = getExampleTooltip(defaultValue, example);
|
|
86394
|
+
const formatRule = getStringFormatRule(format, name);
|
|
86395
|
+
const patternRule = getPatternRule(pattern, name);
|
|
86396
|
+
const lengthRule = getStringLengthRule({ minLength, maxLength, name });
|
|
86091
86397
|
const title = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
86092
86398
|
getStringByName(name),
|
|
86093
86399
|
required?.includes(getStringByName(name)) && /* @__PURE__ */ jsxRuntimeExports.jsx(antd.Typography.Text, { type: "danger", children: "*" }),
|
|
@@ -86117,7 +86423,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86117
86423
|
{
|
|
86118
86424
|
name: formFieldName,
|
|
86119
86425
|
rules: [
|
|
86120
|
-
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name, nullable)
|
|
86426
|
+
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name, nullable),
|
|
86427
|
+
...formatRule ? [formatRule] : [],
|
|
86428
|
+
...patternRule ? [patternRule] : [],
|
|
86429
|
+
...lengthRule ? [lengthRule] : []
|
|
86121
86430
|
],
|
|
86122
86431
|
validateTrigger: "onBlur",
|
|
86123
86432
|
hasFeedback: designNewLayout ? { icons: feedbackIcons } : true,
|
|
@@ -86175,7 +86484,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86175
86484
|
isBase64,
|
|
86176
86485
|
defaultValue,
|
|
86177
86486
|
example,
|
|
86178
|
-
nullable
|
|
86487
|
+
nullable,
|
|
86488
|
+
format,
|
|
86489
|
+
pattern,
|
|
86490
|
+
minLength,
|
|
86491
|
+
maxLength
|
|
86179
86492
|
}) => {
|
|
86180
86493
|
const designNewLayout = useDesignNewLayout();
|
|
86181
86494
|
const placeholder = buildPlaceholder(name, defaultValue, example);
|
|
@@ -86186,6 +86499,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86186
86499
|
const form = antd.Form.useFormInstance();
|
|
86187
86500
|
const defaultBtn = useDefaultValueButton(formFieldName, defaultValue, nullable);
|
|
86188
86501
|
const nullBtn = useNullToggleButton(formFieldName, nullable);
|
|
86502
|
+
const formatRule = !isBase64 ? getStringFormatRule(format, name) : void 0;
|
|
86503
|
+
const patternRule = !isBase64 ? getPatternRule(pattern, name) : void 0;
|
|
86504
|
+
const lengthRule = !isBase64 ? getStringLengthRule({ minLength, maxLength, name }) : void 0;
|
|
86189
86505
|
const title = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
86190
86506
|
getStringByName(name),
|
|
86191
86507
|
required?.includes(getStringByName(name)) && /* @__PURE__ */ jsxRuntimeExports.jsx(antd.Typography.Text, { type: "danger", children: "*" }),
|
|
@@ -86224,7 +86540,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86224
86540
|
{
|
|
86225
86541
|
name: arrName || fixedName,
|
|
86226
86542
|
rules: [
|
|
86227
|
-
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name, nullable)
|
|
86543
|
+
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name, nullable),
|
|
86544
|
+
...formatRule ? [formatRule] : [],
|
|
86545
|
+
...patternRule ? [patternRule] : [],
|
|
86546
|
+
...lengthRule ? [lengthRule] : []
|
|
86228
86547
|
],
|
|
86229
86548
|
validateTrigger: "onBlur",
|
|
86230
86549
|
hasFeedback: designNewLayout ? { icons: feedbackIcons } : true,
|
|
@@ -86416,13 +86735,18 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86416
86735
|
onRemoveByMinus,
|
|
86417
86736
|
defaultValue,
|
|
86418
86737
|
example,
|
|
86419
|
-
nullable
|
|
86738
|
+
nullable,
|
|
86739
|
+
format,
|
|
86740
|
+
minimum,
|
|
86741
|
+
maximum
|
|
86420
86742
|
}) => {
|
|
86421
86743
|
const designNewLayout = useDesignNewLayout();
|
|
86422
86744
|
const formFieldName = arrName || name;
|
|
86423
86745
|
const defaultBtn = useDefaultValueButton(formFieldName, defaultValue, nullable);
|
|
86424
86746
|
const nullBtn = useNullToggleButton(formFieldName, nullable);
|
|
86425
86747
|
const exampleTooltip = getExampleTooltip(defaultValue, example);
|
|
86748
|
+
const formatRule = getNumberFormatRule(format, name);
|
|
86749
|
+
const rangeRule = getNumberRangeRule({ minimum, maximum, name });
|
|
86426
86750
|
const title = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
86427
86751
|
getStringByName(name),
|
|
86428
86752
|
required?.includes(getStringByName(name)) && /* @__PURE__ */ jsxRuntimeExports.jsx(antd.Typography.Text, { type: "danger", children: "*" }),
|
|
@@ -86452,7 +86776,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86452
86776
|
{
|
|
86453
86777
|
name: formFieldName,
|
|
86454
86778
|
rules: [
|
|
86455
|
-
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name, nullable)
|
|
86779
|
+
getRequiredRule(forceNonRequired === false && !!required?.includes(getStringByName(name)), name, nullable),
|
|
86780
|
+
...formatRule ? [formatRule] : [],
|
|
86781
|
+
...rangeRule ? [rangeRule] : []
|
|
86456
86782
|
],
|
|
86457
86783
|
validateTrigger: "onBlur",
|
|
86458
86784
|
hasFeedback: designNewLayout ? { icons: feedbackIcons } : true,
|
|
@@ -86461,6 +86787,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86461
86787
|
{
|
|
86462
86788
|
placeholder: buildPlaceholder(name, defaultValue, example),
|
|
86463
86789
|
step: isNumber ? 0.1 : 1,
|
|
86790
|
+
min: minimum,
|
|
86791
|
+
max: maximum,
|
|
86464
86792
|
disabled: nullBtn.visible && nullBtn.isNull
|
|
86465
86793
|
}
|
|
86466
86794
|
)
|
|
@@ -86483,6 +86811,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86483
86811
|
collapseTitle,
|
|
86484
86812
|
collapseFormName,
|
|
86485
86813
|
oneOfRequiredGroups,
|
|
86814
|
+
oneOfBranches,
|
|
86486
86815
|
validationErrors,
|
|
86487
86816
|
data,
|
|
86488
86817
|
inputProps,
|
|
@@ -86491,6 +86820,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86491
86820
|
const designNewLayout = useDesignNewLayout();
|
|
86492
86821
|
const form = antd.Form.useFormInstance();
|
|
86493
86822
|
const [additionalPropValue, setAddditionalPropValue] = React$1.useState();
|
|
86823
|
+
const hasOneOfValidation = Boolean(oneOfRequiredGroups && oneOfRequiredGroups.length > 0) || Boolean(oneOfBranches && oneOfBranches.length > 0);
|
|
86494
86824
|
const focusFieldInput = (path) => {
|
|
86495
86825
|
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
86496
86826
|
return;
|
|
@@ -86554,7 +86884,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86554
86884
|
persistedCheckbox: inputProps ? void 0 : /* @__PURE__ */ jsxRuntimeExports.jsx(PersistedCheckbox, { formName: persistName || name, persistedControls, type: "obj" }),
|
|
86555
86885
|
children: [
|
|
86556
86886
|
data,
|
|
86557
|
-
|
|
86887
|
+
hasOneOfValidation ? /* @__PURE__ */ jsxRuntimeExports.jsx(antd.Form.ErrorList, { errors: validationErrors }) : null,
|
|
86558
86888
|
inputProps && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
86559
86889
|
antd.Input,
|
|
86560
86890
|
{
|
|
@@ -86968,7 +87298,12 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86968
87298
|
onRemoveByMinus,
|
|
86969
87299
|
defaultValue,
|
|
86970
87300
|
example,
|
|
86971
|
-
nullable
|
|
87301
|
+
nullable,
|
|
87302
|
+
format,
|
|
87303
|
+
pattern,
|
|
87304
|
+
minLength,
|
|
87305
|
+
maxLength,
|
|
87306
|
+
urlParams
|
|
86972
87307
|
}) => {
|
|
86973
87308
|
if (Array.isArray(name) && name.length === 2 && name[0] === "metadata" && name[1] === "namespace" && namespaceData) {
|
|
86974
87309
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -86977,7 +87312,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86977
87312
|
name,
|
|
86978
87313
|
namespaceData,
|
|
86979
87314
|
isAdditionalProperties,
|
|
86980
|
-
removeField
|
|
87315
|
+
removeField,
|
|
87316
|
+
defaultValue,
|
|
87317
|
+
contextNamespace: urlParams?.namespace
|
|
86981
87318
|
},
|
|
86982
87319
|
`${arrKey}-${JSON.stringify(name)}-namespace`
|
|
86983
87320
|
);
|
|
@@ -86998,7 +87335,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
86998
87335
|
onRemoveByMinus,
|
|
86999
87336
|
defaultValue,
|
|
87000
87337
|
example,
|
|
87001
|
-
nullable
|
|
87338
|
+
nullable,
|
|
87339
|
+
format,
|
|
87340
|
+
pattern,
|
|
87341
|
+
minLength,
|
|
87342
|
+
maxLength
|
|
87002
87343
|
},
|
|
87003
87344
|
`${arrKey}-${JSON.stringify(name)}`
|
|
87004
87345
|
);
|
|
@@ -87057,7 +87398,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87057
87398
|
onRemoveByMinus,
|
|
87058
87399
|
defaultValue,
|
|
87059
87400
|
example,
|
|
87060
|
-
nullable
|
|
87401
|
+
nullable,
|
|
87402
|
+
format,
|
|
87403
|
+
minimum,
|
|
87404
|
+
maximum
|
|
87061
87405
|
}) => {
|
|
87062
87406
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
87063
87407
|
FormNumberInput,
|
|
@@ -87076,7 +87420,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87076
87420
|
onRemoveByMinus,
|
|
87077
87421
|
defaultValue,
|
|
87078
87422
|
example,
|
|
87079
|
-
nullable
|
|
87423
|
+
nullable,
|
|
87424
|
+
format,
|
|
87425
|
+
minimum,
|
|
87426
|
+
maximum
|
|
87080
87427
|
},
|
|
87081
87428
|
`${arrKey}-${JSON.stringify(name)}`
|
|
87082
87429
|
);
|
|
@@ -87129,7 +87476,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87129
87476
|
isBase64,
|
|
87130
87477
|
defaultValue,
|
|
87131
87478
|
example,
|
|
87132
|
-
nullable
|
|
87479
|
+
nullable,
|
|
87480
|
+
format,
|
|
87481
|
+
pattern,
|
|
87482
|
+
minLength,
|
|
87483
|
+
maxLength
|
|
87133
87484
|
}) => {
|
|
87134
87485
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
87135
87486
|
FormStringMultilineInput,
|
|
@@ -87148,7 +87499,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87148
87499
|
isBase64,
|
|
87149
87500
|
defaultValue,
|
|
87150
87501
|
example,
|
|
87151
|
-
nullable
|
|
87502
|
+
nullable,
|
|
87503
|
+
format,
|
|
87504
|
+
pattern,
|
|
87505
|
+
minLength,
|
|
87506
|
+
maxLength
|
|
87152
87507
|
},
|
|
87153
87508
|
`${arrKey}-${JSON.stringify(name)}`
|
|
87154
87509
|
);
|
|
@@ -87167,7 +87522,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87167
87522
|
customProps,
|
|
87168
87523
|
urlParams,
|
|
87169
87524
|
onRemoveByMinus,
|
|
87170
|
-
defaultValue
|
|
87525
|
+
defaultValue,
|
|
87526
|
+
minItems,
|
|
87527
|
+
maxItems
|
|
87171
87528
|
}) => {
|
|
87172
87529
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
87173
87530
|
FormListInput,
|
|
@@ -87185,7 +87542,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87185
87542
|
customProps,
|
|
87186
87543
|
urlParams,
|
|
87187
87544
|
onRemoveByMinus,
|
|
87188
|
-
defaultValue
|
|
87545
|
+
defaultValue,
|
|
87546
|
+
minItems,
|
|
87547
|
+
maxItems
|
|
87189
87548
|
},
|
|
87190
87549
|
`${arrKey}-${JSON.stringify(name)}`
|
|
87191
87550
|
);
|
|
@@ -87240,6 +87599,21 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87240
87599
|
onRemoveByMinus
|
|
87241
87600
|
}) => {
|
|
87242
87601
|
if (schema.type === "array") {
|
|
87602
|
+
const requiredArrayRule = !forceNonRequired && required?.includes(getStringByName(name)) ? {
|
|
87603
|
+
validator: async (_, value) => {
|
|
87604
|
+
if (!Array.isArray(value) || value.length < 1) {
|
|
87605
|
+
return Promise.reject(new Error(`Please enter ${prettyFieldPath(name)}`));
|
|
87606
|
+
}
|
|
87607
|
+
}
|
|
87608
|
+
} : void 0;
|
|
87609
|
+
const arrayItemsRule = getArrayItemsRule({
|
|
87610
|
+
minItems: schema.minItems,
|
|
87611
|
+
maxItems: schema.maxItems,
|
|
87612
|
+
name
|
|
87613
|
+
});
|
|
87614
|
+
const arrayRules = [];
|
|
87615
|
+
if (requiredArrayRule) arrayRules.push(requiredArrayRule);
|
|
87616
|
+
if (arrayItemsRule) arrayRules.push(arrayItemsRule);
|
|
87243
87617
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(HiddenContainer$1, { name, children: [
|
|
87244
87618
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
87245
87619
|
FormArrayHeader,
|
|
@@ -87258,15 +87632,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87258
87632
|
Styled$i.ResetedFormList,
|
|
87259
87633
|
{
|
|
87260
87634
|
name: arrName || name,
|
|
87261
|
-
rules:
|
|
87262
|
-
{
|
|
87263
|
-
validator: async (_, value) => {
|
|
87264
|
-
if (!value || value.length < 1) {
|
|
87265
|
-
return Promise.reject(new Error(`Please enter ${prettyFieldPath(name)}`));
|
|
87266
|
-
}
|
|
87267
|
-
}
|
|
87268
|
-
}
|
|
87269
|
-
] : void 0,
|
|
87635
|
+
rules: arrayRules.length > 0 ? arrayRules : void 0,
|
|
87270
87636
|
children: (fields, { add, remove }, { errors }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
87271
87637
|
fields.map((field) => {
|
|
87272
87638
|
const itemSchema = schema.items;
|
|
@@ -87285,7 +87651,12 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87285
87651
|
description: description2,
|
|
87286
87652
|
removeField,
|
|
87287
87653
|
persistedControls,
|
|
87288
|
-
onRemoveByMinus: () => remove(field.name)
|
|
87654
|
+
onRemoveByMinus: () => remove(field.name),
|
|
87655
|
+
format: itemSchema?.format,
|
|
87656
|
+
pattern: itemSchema?.pattern,
|
|
87657
|
+
minLength: itemSchema?.minLength,
|
|
87658
|
+
maxLength: itemSchema?.maxLength,
|
|
87659
|
+
urlParams
|
|
87289
87660
|
}),
|
|
87290
87661
|
(fieldType === "number" || fieldType === "integer") && getNumberFormItemFromSwagger({
|
|
87291
87662
|
isNumber: fieldType === "number",
|
|
@@ -87297,7 +87668,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87297
87668
|
description: description2,
|
|
87298
87669
|
removeField,
|
|
87299
87670
|
persistedControls,
|
|
87300
|
-
onRemoveByMinus: () => remove(field.name)
|
|
87671
|
+
onRemoveByMinus: () => remove(field.name),
|
|
87672
|
+
format: itemSchema?.format,
|
|
87673
|
+
minimum: itemSchema?.minimum,
|
|
87674
|
+
maximum: itemSchema?.maximum
|
|
87301
87675
|
}),
|
|
87302
87676
|
(fieldType === "rangeInputCpu" || fieldType === "rangeInputMemory") && getRangeInputFormItemFromSwagger({
|
|
87303
87677
|
name: Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
@@ -87323,7 +87697,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87323
87697
|
persistedControls,
|
|
87324
87698
|
customProps: schema.items.customProps,
|
|
87325
87699
|
urlParams,
|
|
87326
|
-
onRemoveByMinus: () => remove(field.name)
|
|
87700
|
+
onRemoveByMinus: () => remove(field.name),
|
|
87701
|
+
minItems: itemSchema?.minItems,
|
|
87702
|
+
maxItems: itemSchema?.maxItems
|
|
87327
87703
|
}),
|
|
87328
87704
|
(fieldType === "multilineString" || fieldType === "multilineStringBase64") && getStringMultilineFormItemFromSwagger({
|
|
87329
87705
|
name: Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
@@ -87335,7 +87711,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87335
87711
|
removeField,
|
|
87336
87712
|
persistedControls,
|
|
87337
87713
|
onRemoveByMinus: () => remove(field.name),
|
|
87338
|
-
isBase64: fieldType === "multilineStringBase64"
|
|
87714
|
+
isBase64: fieldType === "multilineStringBase64",
|
|
87715
|
+
format: itemSchema?.format,
|
|
87716
|
+
pattern: itemSchema?.pattern,
|
|
87717
|
+
minLength: itemSchema?.minLength,
|
|
87718
|
+
maxLength: itemSchema?.maxLength
|
|
87339
87719
|
}),
|
|
87340
87720
|
fieldType === "boolean" && getBooleanFormItemFromSwagger({
|
|
87341
87721
|
name: Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
@@ -87370,6 +87750,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87370
87750
|
// merging properties near items by this
|
|
87371
87751
|
properties: deepMerge(entry.properties, additionalProperties?.[field.key]?.properties || {}),
|
|
87372
87752
|
oneOfRequiredGroups: entry.oneOfRequiredGroups,
|
|
87753
|
+
oneOfBranches: entry.oneOfBranches,
|
|
87373
87754
|
name: Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
87374
87755
|
arrKey: field.key,
|
|
87375
87756
|
arrName: [field.name],
|
|
@@ -87398,6 +87779,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87398
87779
|
{
|
|
87399
87780
|
type: "text",
|
|
87400
87781
|
size: "small",
|
|
87782
|
+
disabled: schema.maxItems !== void 0 && fields.length >= schema.maxItems,
|
|
87401
87783
|
onClick: () => {
|
|
87402
87784
|
add();
|
|
87403
87785
|
},
|
|
@@ -87497,7 +87879,12 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87497
87879
|
persistedControls,
|
|
87498
87880
|
defaultValue: extractStringDefault(properties[el].default),
|
|
87499
87881
|
example: extractStringDefault(properties[el].example),
|
|
87500
|
-
nullable: properties[el].nullable
|
|
87882
|
+
nullable: properties[el].nullable,
|
|
87883
|
+
format: properties[el].format,
|
|
87884
|
+
pattern: properties[el].pattern,
|
|
87885
|
+
minLength: properties[el].minLength,
|
|
87886
|
+
maxLength: properties[el].maxLength,
|
|
87887
|
+
urlParams
|
|
87501
87888
|
});
|
|
87502
87889
|
}
|
|
87503
87890
|
if (properties[el].type === "number" || properties[el].type === "integer") {
|
|
@@ -87516,7 +87903,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87516
87903
|
persistedControls,
|
|
87517
87904
|
defaultValue: extractNumberDefault(properties[el].default),
|
|
87518
87905
|
example: extractNumberDefault(properties[el].example),
|
|
87519
|
-
nullable: properties[el].nullable
|
|
87906
|
+
nullable: properties[el].nullable,
|
|
87907
|
+
format: properties[el].format,
|
|
87908
|
+
minimum: properties[el].minimum,
|
|
87909
|
+
maximum: properties[el].maximum
|
|
87520
87910
|
});
|
|
87521
87911
|
}
|
|
87522
87912
|
if (properties[el].type === "rangeInputCpu" || properties[el].type === "rangeInputMemory") {
|
|
@@ -87549,7 +87939,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87549
87939
|
removeField,
|
|
87550
87940
|
persistedControls,
|
|
87551
87941
|
urlParams,
|
|
87552
|
-
defaultValue: extractListInputDefault(properties[el].default)
|
|
87942
|
+
defaultValue: extractListInputDefault(properties[el].default),
|
|
87943
|
+
minItems: properties[el].minItems,
|
|
87944
|
+
maxItems: properties[el].maxItems
|
|
87553
87945
|
});
|
|
87554
87946
|
}
|
|
87555
87947
|
if (properties[el].type === "multilineString" || properties[el].type === "multilineStringBase64") {
|
|
@@ -87568,7 +87960,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87568
87960
|
isBase64: properties[el].type === "multilineStringBase64",
|
|
87569
87961
|
defaultValue: extractStringDefault(properties[el].default),
|
|
87570
87962
|
example: extractStringDefault(properties[el].example),
|
|
87571
|
-
nullable: properties[el].nullable
|
|
87963
|
+
nullable: properties[el].nullable,
|
|
87964
|
+
format: properties[el].format,
|
|
87965
|
+
pattern: properties[el].pattern,
|
|
87966
|
+
minLength: properties[el].minLength,
|
|
87967
|
+
maxLength: properties[el].maxLength
|
|
87572
87968
|
});
|
|
87573
87969
|
}
|
|
87574
87970
|
if (properties[el].type === "boolean") {
|
|
@@ -87653,6 +88049,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87653
88049
|
return getObjectFormItemFromSwagger({
|
|
87654
88050
|
properties: properties[el].properties,
|
|
87655
88051
|
oneOfRequiredGroups: properties[el].oneOfRequiredGroups,
|
|
88052
|
+
oneOfBranches: properties[el].oneOfBranches,
|
|
87656
88053
|
name: Array.isArray(name) ? [...name, String(el)] : [name, String(el)],
|
|
87657
88054
|
arrKey,
|
|
87658
88055
|
arrName: Array.isArray(arrName) ? [...arrName, String(el)] : void 0,
|
|
@@ -87681,6 +88078,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87681
88078
|
const getObjectFormItemFromSwagger = ({
|
|
87682
88079
|
properties,
|
|
87683
88080
|
oneOfRequiredGroups,
|
|
88081
|
+
oneOfBranches,
|
|
87684
88082
|
objectValidationErrors,
|
|
87685
88083
|
name,
|
|
87686
88084
|
arrKey,
|
|
@@ -87732,6 +88130,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87732
88130
|
selfRequired,
|
|
87733
88131
|
description,
|
|
87734
88132
|
oneOfRequiredGroups,
|
|
88133
|
+
oneOfBranches,
|
|
87735
88134
|
validationErrors: objectValidationErrors?.[pathKey$1(Array.isArray(name) ? name : [name])],
|
|
87736
88135
|
isAdditionalProperties,
|
|
87737
88136
|
removeField,
|
|
@@ -87888,6 +88287,370 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
87888
88287
|
const toStringPath = (p) => isPathArray(p) ? p.map(String) : [String(p)];
|
|
87889
88288
|
const isPrefix = (full, prefix) => prefix.length <= full.length && prefix.every((seg, i) => full[i] === seg);
|
|
87890
88289
|
|
|
88290
|
+
const isPresentForOneOfBranchVisibility = (value) => {
|
|
88291
|
+
if (value === null) return true;
|
|
88292
|
+
if (value === void 0) return false;
|
|
88293
|
+
if (typeof value === "string") return value.length > 0;
|
|
88294
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
88295
|
+
if (typeof value === "object") return Object.keys(value).length > 0;
|
|
88296
|
+
return true;
|
|
88297
|
+
};
|
|
88298
|
+
const getCurrentNodeHiddenPaths = ({
|
|
88299
|
+
node,
|
|
88300
|
+
value,
|
|
88301
|
+
path
|
|
88302
|
+
}) => {
|
|
88303
|
+
if (!node.oneOfBranches || node.oneOfBranches.length === 0) {
|
|
88304
|
+
return [];
|
|
88305
|
+
}
|
|
88306
|
+
const matchedBranches = node.oneOfBranches.filter((branch) => matchesOneOfBranch(value, branch));
|
|
88307
|
+
if (matchedBranches.length !== 1) {
|
|
88308
|
+
return [];
|
|
88309
|
+
}
|
|
88310
|
+
const [activeBranch] = matchedBranches;
|
|
88311
|
+
return collectInactiveOneOfBranchPaths({ branches: node.oneOfBranches, activeBranch }).filter((branchPath) => !isPresentForOneOfBranchVisibility(get$1(value, branchPath))).map((branchPath) => [...path, ...branchPath]);
|
|
88312
|
+
};
|
|
88313
|
+
const collectOneOfBranchHiddenPaths = ({
|
|
88314
|
+
properties,
|
|
88315
|
+
values,
|
|
88316
|
+
currentPath = []
|
|
88317
|
+
}) => {
|
|
88318
|
+
return Object.entries(properties).flatMap(([key, node]) => {
|
|
88319
|
+
const path = [...currentPath, key];
|
|
88320
|
+
const value = get$1(values, path);
|
|
88321
|
+
const currentHiddenPaths = getCurrentNodeHiddenPaths({
|
|
88322
|
+
node,
|
|
88323
|
+
value,
|
|
88324
|
+
path
|
|
88325
|
+
});
|
|
88326
|
+
const nestedObjectHiddenPaths = node.properties ? collectOneOfBranchHiddenPaths({
|
|
88327
|
+
properties: node.properties,
|
|
88328
|
+
values,
|
|
88329
|
+
currentPath: path
|
|
88330
|
+
}) : [];
|
|
88331
|
+
const nestedArrayHiddenPaths = node.type === "array" && node.items && Array.isArray(value) ? value.flatMap((_, index) => {
|
|
88332
|
+
const itemPath = [...path, index];
|
|
88333
|
+
const itemValue = get$1(values, itemPath);
|
|
88334
|
+
const itemHiddenPaths = getCurrentNodeHiddenPaths({
|
|
88335
|
+
node: node.items,
|
|
88336
|
+
value: itemValue,
|
|
88337
|
+
path: itemPath
|
|
88338
|
+
});
|
|
88339
|
+
return [
|
|
88340
|
+
...itemHiddenPaths,
|
|
88341
|
+
...node.items?.properties ? collectOneOfBranchHiddenPaths({
|
|
88342
|
+
properties: node.items.properties,
|
|
88343
|
+
values,
|
|
88344
|
+
currentPath: itemPath
|
|
88345
|
+
}) : []
|
|
88346
|
+
];
|
|
88347
|
+
}) : [];
|
|
88348
|
+
return [...currentHiddenPaths, ...nestedObjectHiddenPaths, ...nestedArrayHiddenPaths];
|
|
88349
|
+
});
|
|
88350
|
+
};
|
|
88351
|
+
|
|
88352
|
+
/** Used for built-in method references. */
|
|
88353
|
+
|
|
88354
|
+
var objectProto$1 = Object.prototype;
|
|
88355
|
+
|
|
88356
|
+
/** Used to check objects for own properties. */
|
|
88357
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
88358
|
+
|
|
88359
|
+
/**
|
|
88360
|
+
* The base implementation of `_.has` without support for deep paths.
|
|
88361
|
+
*
|
|
88362
|
+
* @private
|
|
88363
|
+
* @param {Object} [object] The object to query.
|
|
88364
|
+
* @param {Array|string} key The key to check.
|
|
88365
|
+
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
88366
|
+
*/
|
|
88367
|
+
function baseHas$1(object, key) {
|
|
88368
|
+
return object != null && hasOwnProperty$1.call(object, key);
|
|
88369
|
+
}
|
|
88370
|
+
|
|
88371
|
+
var _baseHas = baseHas$1;
|
|
88372
|
+
|
|
88373
|
+
var baseGetTag = _baseGetTag,
|
|
88374
|
+
isObjectLike$1 = isObjectLike_1;
|
|
88375
|
+
|
|
88376
|
+
/** `Object#toString` result references. */
|
|
88377
|
+
var argsTag = '[object Arguments]';
|
|
88378
|
+
|
|
88379
|
+
/**
|
|
88380
|
+
* The base implementation of `_.isArguments`.
|
|
88381
|
+
*
|
|
88382
|
+
* @private
|
|
88383
|
+
* @param {*} value The value to check.
|
|
88384
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
88385
|
+
*/
|
|
88386
|
+
function baseIsArguments$1(value) {
|
|
88387
|
+
return isObjectLike$1(value) && baseGetTag(value) == argsTag;
|
|
88388
|
+
}
|
|
88389
|
+
|
|
88390
|
+
var _baseIsArguments = baseIsArguments$1;
|
|
88391
|
+
|
|
88392
|
+
var baseIsArguments = _baseIsArguments,
|
|
88393
|
+
isObjectLike = isObjectLike_1;
|
|
88394
|
+
|
|
88395
|
+
/** Used for built-in method references. */
|
|
88396
|
+
var objectProto = Object.prototype;
|
|
88397
|
+
|
|
88398
|
+
/** Used to check objects for own properties. */
|
|
88399
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
88400
|
+
|
|
88401
|
+
/** Built-in value references. */
|
|
88402
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
88403
|
+
|
|
88404
|
+
/**
|
|
88405
|
+
* Checks if `value` is likely an `arguments` object.
|
|
88406
|
+
*
|
|
88407
|
+
* @static
|
|
88408
|
+
* @memberOf _
|
|
88409
|
+
* @since 0.1.0
|
|
88410
|
+
* @category Lang
|
|
88411
|
+
* @param {*} value The value to check.
|
|
88412
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
88413
|
+
* else `false`.
|
|
88414
|
+
* @example
|
|
88415
|
+
*
|
|
88416
|
+
* _.isArguments(function() { return arguments; }());
|
|
88417
|
+
* // => true
|
|
88418
|
+
*
|
|
88419
|
+
* _.isArguments([1, 2, 3]);
|
|
88420
|
+
* // => false
|
|
88421
|
+
*/
|
|
88422
|
+
var isArguments$1 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
88423
|
+
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
|
88424
|
+
!propertyIsEnumerable.call(value, 'callee');
|
|
88425
|
+
};
|
|
88426
|
+
|
|
88427
|
+
var isArguments_1 = isArguments$1;
|
|
88428
|
+
|
|
88429
|
+
/** Used as references for various `Number` constants. */
|
|
88430
|
+
|
|
88431
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
88432
|
+
|
|
88433
|
+
/** Used to detect unsigned integer values. */
|
|
88434
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
88435
|
+
|
|
88436
|
+
/**
|
|
88437
|
+
* Checks if `value` is a valid array-like index.
|
|
88438
|
+
*
|
|
88439
|
+
* @private
|
|
88440
|
+
* @param {*} value The value to check.
|
|
88441
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
88442
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
88443
|
+
*/
|
|
88444
|
+
function isIndex$1(value, length) {
|
|
88445
|
+
var type = typeof value;
|
|
88446
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
88447
|
+
|
|
88448
|
+
return !!length &&
|
|
88449
|
+
(type == 'number' ||
|
|
88450
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
88451
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
88452
|
+
}
|
|
88453
|
+
|
|
88454
|
+
var _isIndex = isIndex$1;
|
|
88455
|
+
|
|
88456
|
+
/** Used as references for various `Number` constants. */
|
|
88457
|
+
|
|
88458
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
88459
|
+
|
|
88460
|
+
/**
|
|
88461
|
+
* Checks if `value` is a valid array-like length.
|
|
88462
|
+
*
|
|
88463
|
+
* **Note:** This method is loosely based on
|
|
88464
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
88465
|
+
*
|
|
88466
|
+
* @static
|
|
88467
|
+
* @memberOf _
|
|
88468
|
+
* @since 4.0.0
|
|
88469
|
+
* @category Lang
|
|
88470
|
+
* @param {*} value The value to check.
|
|
88471
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
88472
|
+
* @example
|
|
88473
|
+
*
|
|
88474
|
+
* _.isLength(3);
|
|
88475
|
+
* // => true
|
|
88476
|
+
*
|
|
88477
|
+
* _.isLength(Number.MIN_VALUE);
|
|
88478
|
+
* // => false
|
|
88479
|
+
*
|
|
88480
|
+
* _.isLength(Infinity);
|
|
88481
|
+
* // => false
|
|
88482
|
+
*
|
|
88483
|
+
* _.isLength('3');
|
|
88484
|
+
* // => false
|
|
88485
|
+
*/
|
|
88486
|
+
function isLength$1(value) {
|
|
88487
|
+
return typeof value == 'number' &&
|
|
88488
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
88489
|
+
}
|
|
88490
|
+
|
|
88491
|
+
var isLength_1 = isLength$1;
|
|
88492
|
+
|
|
88493
|
+
var castPath = _castPath,
|
|
88494
|
+
isArguments = isArguments_1,
|
|
88495
|
+
isArray = isArray_1,
|
|
88496
|
+
isIndex = _isIndex,
|
|
88497
|
+
isLength = isLength_1,
|
|
88498
|
+
toKey = _toKey;
|
|
88499
|
+
|
|
88500
|
+
/**
|
|
88501
|
+
* Checks if `path` exists on `object`.
|
|
88502
|
+
*
|
|
88503
|
+
* @private
|
|
88504
|
+
* @param {Object} object The object to query.
|
|
88505
|
+
* @param {Array|string} path The path to check.
|
|
88506
|
+
* @param {Function} hasFunc The function to check properties.
|
|
88507
|
+
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
88508
|
+
*/
|
|
88509
|
+
function hasPath$1(object, path, hasFunc) {
|
|
88510
|
+
path = castPath(path, object);
|
|
88511
|
+
|
|
88512
|
+
var index = -1,
|
|
88513
|
+
length = path.length,
|
|
88514
|
+
result = false;
|
|
88515
|
+
|
|
88516
|
+
while (++index < length) {
|
|
88517
|
+
var key = toKey(path[index]);
|
|
88518
|
+
if (!(result = object != null && hasFunc(object, key))) {
|
|
88519
|
+
break;
|
|
88520
|
+
}
|
|
88521
|
+
object = object[key];
|
|
88522
|
+
}
|
|
88523
|
+
if (result || ++index != length) {
|
|
88524
|
+
return result;
|
|
88525
|
+
}
|
|
88526
|
+
length = object == null ? 0 : object.length;
|
|
88527
|
+
return !!length && isLength(length) && isIndex(key, length) &&
|
|
88528
|
+
(isArray(object) || isArguments(object));
|
|
88529
|
+
}
|
|
88530
|
+
|
|
88531
|
+
var _hasPath = hasPath$1;
|
|
88532
|
+
|
|
88533
|
+
var baseHas = _baseHas,
|
|
88534
|
+
hasPath = _hasPath;
|
|
88535
|
+
|
|
88536
|
+
/**
|
|
88537
|
+
* Checks if `path` is a direct property of `object`.
|
|
88538
|
+
*
|
|
88539
|
+
* @static
|
|
88540
|
+
* @since 0.1.0
|
|
88541
|
+
* @memberOf _
|
|
88542
|
+
* @category Object
|
|
88543
|
+
* @param {Object} object The object to query.
|
|
88544
|
+
* @param {Array|string} path The path to check.
|
|
88545
|
+
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
88546
|
+
* @example
|
|
88547
|
+
*
|
|
88548
|
+
* var object = { 'a': { 'b': 2 } };
|
|
88549
|
+
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
88550
|
+
*
|
|
88551
|
+
* _.has(object, 'a');
|
|
88552
|
+
* // => true
|
|
88553
|
+
*
|
|
88554
|
+
* _.has(object, 'a.b');
|
|
88555
|
+
* // => true
|
|
88556
|
+
*
|
|
88557
|
+
* _.has(object, ['a', 'b']);
|
|
88558
|
+
* // => true
|
|
88559
|
+
*
|
|
88560
|
+
* _.has(other, 'a');
|
|
88561
|
+
* // => false
|
|
88562
|
+
*/
|
|
88563
|
+
function has(object, path) {
|
|
88564
|
+
return object != null && hasPath(object, path, baseHas);
|
|
88565
|
+
}
|
|
88566
|
+
|
|
88567
|
+
var has_1 = has;
|
|
88568
|
+
|
|
88569
|
+
const has$1 = /*@__PURE__*/getDefaultExportFromCjs(has_1);
|
|
88570
|
+
|
|
88571
|
+
const isAnyMatchKeyChangedAtNode = ({
|
|
88572
|
+
branches,
|
|
88573
|
+
nodePath,
|
|
88574
|
+
changedValues
|
|
88575
|
+
}) => {
|
|
88576
|
+
return collectOneOfBranchMatchKeys(branches).some((matchKey) => {
|
|
88577
|
+
const fullPath = [...nodePath, ...toOneOfBranchPath(matchKey)];
|
|
88578
|
+
return has$1(changedValues, fullPath);
|
|
88579
|
+
});
|
|
88580
|
+
};
|
|
88581
|
+
const getCurrentNodeCleanupPaths = ({
|
|
88582
|
+
node,
|
|
88583
|
+
value,
|
|
88584
|
+
path,
|
|
88585
|
+
changedValues
|
|
88586
|
+
}) => {
|
|
88587
|
+
if (!node.oneOfBranches || node.oneOfBranches.length === 0) {
|
|
88588
|
+
return [];
|
|
88589
|
+
}
|
|
88590
|
+
if (!isAnyMatchKeyChangedAtNode({
|
|
88591
|
+
branches: node.oneOfBranches,
|
|
88592
|
+
nodePath: path,
|
|
88593
|
+
changedValues
|
|
88594
|
+
})) {
|
|
88595
|
+
return [];
|
|
88596
|
+
}
|
|
88597
|
+
const matchedBranches = node.oneOfBranches.filter((branch) => matchesOneOfBranch(value, branch));
|
|
88598
|
+
if (matchedBranches.length !== 1) {
|
|
88599
|
+
return [];
|
|
88600
|
+
}
|
|
88601
|
+
const [activeBranch] = matchedBranches;
|
|
88602
|
+
return collectInactiveOneOfBranchPaths({ branches: node.oneOfBranches, activeBranch }).map((branchPath) => [
|
|
88603
|
+
...path,
|
|
88604
|
+
...branchPath
|
|
88605
|
+
]);
|
|
88606
|
+
};
|
|
88607
|
+
const collectInactiveBranchCleanupPaths = ({
|
|
88608
|
+
properties,
|
|
88609
|
+
values,
|
|
88610
|
+
changedValues,
|
|
88611
|
+
currentPath = []
|
|
88612
|
+
}) => {
|
|
88613
|
+
if (!changedValues) {
|
|
88614
|
+
return [];
|
|
88615
|
+
}
|
|
88616
|
+
return Object.entries(properties).flatMap(([key, node]) => {
|
|
88617
|
+
const path = [...currentPath, key];
|
|
88618
|
+
const value = get$1(values, path);
|
|
88619
|
+
const currentCleanupPaths = getCurrentNodeCleanupPaths({
|
|
88620
|
+
node,
|
|
88621
|
+
value,
|
|
88622
|
+
path,
|
|
88623
|
+
changedValues
|
|
88624
|
+
});
|
|
88625
|
+
const nestedObjectCleanupPaths = node.properties ? collectInactiveBranchCleanupPaths({
|
|
88626
|
+
properties: node.properties,
|
|
88627
|
+
values,
|
|
88628
|
+
changedValues,
|
|
88629
|
+
currentPath: path
|
|
88630
|
+
}) : [];
|
|
88631
|
+
const nestedArrayCleanupPaths = node.type === "array" && node.items && Array.isArray(value) ? value.flatMap((_, index) => {
|
|
88632
|
+
const itemPath = [...path, index];
|
|
88633
|
+
const itemValue = get$1(values, itemPath);
|
|
88634
|
+
const itemCleanupPaths = getCurrentNodeCleanupPaths({
|
|
88635
|
+
node: node.items,
|
|
88636
|
+
value: itemValue,
|
|
88637
|
+
path: itemPath,
|
|
88638
|
+
changedValues
|
|
88639
|
+
});
|
|
88640
|
+
return [
|
|
88641
|
+
...itemCleanupPaths,
|
|
88642
|
+
...node.items?.properties ? collectInactiveBranchCleanupPaths({
|
|
88643
|
+
properties: node.items.properties,
|
|
88644
|
+
values,
|
|
88645
|
+
changedValues,
|
|
88646
|
+
currentPath: itemPath
|
|
88647
|
+
}) : []
|
|
88648
|
+
];
|
|
88649
|
+
}) : [];
|
|
88650
|
+
return [...currentCleanupPaths, ...nestedObjectCleanupPaths, ...nestedArrayCleanupPaths];
|
|
88651
|
+
});
|
|
88652
|
+
};
|
|
88653
|
+
|
|
87891
88654
|
const handleSubmitError = ({
|
|
87892
88655
|
error,
|
|
87893
88656
|
expandedKeys
|
|
@@ -88180,7 +88943,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
88180
88943
|
}
|
|
88181
88944
|
});
|
|
88182
88945
|
}
|
|
88183
|
-
|
|
88946
|
+
const schemaNamespaceDefault = staticProperties.metadata?.properties?.namespace?.default;
|
|
88947
|
+
const hasSchemaNamespaceDefault = typeof schemaNamespaceDefault === "string" && schemaNamespaceDefault.length > 0;
|
|
88948
|
+
if (prefillValueNamespaceOnly && !hasSchemaNamespaceDefault) {
|
|
88184
88949
|
_$1.set(allValues2, ["metadata", "namespace"], prefillValueNamespaceOnly);
|
|
88185
88950
|
}
|
|
88186
88951
|
if (normalizedPrefill) {
|
|
@@ -88190,7 +88955,15 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
88190
88955
|
}
|
|
88191
88956
|
const sorted = Object.fromEntries(Object.entries(allValues2).sort(([a], [b]) => a.localeCompare(b)));
|
|
88192
88957
|
return sorted;
|
|
88193
|
-
}, [
|
|
88958
|
+
}, [
|
|
88959
|
+
formsPrefills,
|
|
88960
|
+
prefillValueNamespaceOnly,
|
|
88961
|
+
isCreate,
|
|
88962
|
+
apiGroupApiVersion,
|
|
88963
|
+
kind,
|
|
88964
|
+
normalizedPrefill,
|
|
88965
|
+
staticProperties
|
|
88966
|
+
]);
|
|
88194
88967
|
const prefillTemplates = React$1.useMemo(() => {
|
|
88195
88968
|
const templates = [];
|
|
88196
88969
|
if (formsPrefills?.spec?.values?.length) {
|
|
@@ -88266,12 +89039,31 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
88266
89039
|
sanitized.forEach((p, i) => wdbg(`#${i}`, prettyPath(p)));
|
|
88267
89040
|
return sanitized;
|
|
88268
89041
|
}, [expandedPaths]);
|
|
89042
|
+
const resolveHiddenPaths = React$1.useCallback(
|
|
89043
|
+
(values) => {
|
|
89044
|
+
const hiddenResolved = expandWildcardTemplates(hiddenWildcardTemplates, values, {
|
|
89045
|
+
includeMissingExact: true,
|
|
89046
|
+
includeMissingFinalForWildcard: true
|
|
89047
|
+
});
|
|
89048
|
+
const oneOfBranchHiddenPaths = collectOneOfBranchHiddenPaths({
|
|
89049
|
+
properties,
|
|
89050
|
+
values
|
|
89051
|
+
});
|
|
89052
|
+
const seen = /* @__PURE__ */ new Set();
|
|
89053
|
+
return [...hiddenResolved, ...oneOfBranchHiddenPaths].filter((path) => {
|
|
89054
|
+
const key = JSON.stringify(path);
|
|
89055
|
+
if (seen.has(key)) {
|
|
89056
|
+
return false;
|
|
89057
|
+
}
|
|
89058
|
+
seen.add(key);
|
|
89059
|
+
return true;
|
|
89060
|
+
});
|
|
89061
|
+
},
|
|
89062
|
+
[hiddenWildcardTemplates, properties]
|
|
89063
|
+
);
|
|
88269
89064
|
React$1.useEffect(() => {
|
|
88270
89065
|
if (!initialValues) return;
|
|
88271
|
-
const hiddenResolved =
|
|
88272
|
-
includeMissingExact: true,
|
|
88273
|
-
includeMissingFinalForWildcard: true
|
|
88274
|
-
});
|
|
89066
|
+
const hiddenResolved = resolveHiddenPaths(initialValues);
|
|
88275
89067
|
wdbg("hidden resolved", hiddenResolved.map(prettyPath));
|
|
88276
89068
|
setResolvedHiddenPaths(hiddenResolved);
|
|
88277
89069
|
const expandedResolved = expandWildcardTemplates(expandedWildcardTemplates, initialValues);
|
|
@@ -88307,7 +89099,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
88307
89099
|
}
|
|
88308
89100
|
return merged;
|
|
88309
89101
|
});
|
|
88310
|
-
}, [initialValues,
|
|
89102
|
+
}, [initialValues, resolveHiddenPaths, expandedWildcardTemplates, persistedWildcardTemplates]);
|
|
88311
89103
|
const resolvedHiddenStringPaths = React$1.useMemo(
|
|
88312
89104
|
() => resolvedHiddenPaths.map(toStringPath),
|
|
88313
89105
|
[resolvedHiddenPaths]
|
|
@@ -88334,14 +89126,28 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
88334
89126
|
const onValuesChangeCallback = React$1.useCallback(
|
|
88335
89127
|
(values, changedValues) => {
|
|
88336
89128
|
const vRaw = values ?? form.getFieldsValue(true);
|
|
88337
|
-
|
|
89129
|
+
let v = scrubLiteralWildcardKeys(vRaw);
|
|
89130
|
+
if (changedValues) {
|
|
89131
|
+
const inactiveCleanupPaths = collectInactiveBranchCleanupPaths({
|
|
89132
|
+
properties,
|
|
89133
|
+
values: v,
|
|
89134
|
+
changedValues
|
|
89135
|
+
});
|
|
89136
|
+
if (inactiveCleanupPaths.length > 0) {
|
|
89137
|
+
inactiveCleanupPaths.forEach((path) => {
|
|
89138
|
+
form.setFieldValue(path, void 0);
|
|
89139
|
+
});
|
|
89140
|
+
v = scrubLiteralWildcardKeys(form.getFieldsValue(true));
|
|
89141
|
+
const formattedPaths = inactiveCleanupPaths.map((path) => prettyFieldPath(path)).join(", ");
|
|
89142
|
+
notificationApi.info({
|
|
89143
|
+
message: inactiveCleanupPaths.length === 1 ? "Cleared 1 inactive branch field" : `Cleared ${inactiveCleanupPaths.length} inactive branch fields`,
|
|
89144
|
+
description: `Removed ${formattedPaths} to match the new selector.`,
|
|
89145
|
+
placement: "bottomRight"
|
|
89146
|
+
});
|
|
89147
|
+
}
|
|
89148
|
+
}
|
|
88338
89149
|
applyOneOfValidationErrors(computeOneOfValidationStates(v));
|
|
88339
|
-
const hiddenResolved =
|
|
88340
|
-
hiddenWildcardTemplates,
|
|
88341
|
-
v,
|
|
88342
|
-
{ includeMissingExact: true, includeMissingFinalForWildcard: true }
|
|
88343
|
-
// only hidden opts in
|
|
88344
|
-
);
|
|
89150
|
+
const hiddenResolved = resolveHiddenPaths(v);
|
|
88345
89151
|
wdbg("hidden resolved", hiddenResolved.map(prettyPath));
|
|
88346
89152
|
setResolvedHiddenPaths(hiddenResolved);
|
|
88347
89153
|
const expandedResolved = expandWildcardTemplates(expandedWildcardTemplates, v);
|
|
@@ -88485,8 +89291,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|
|
88485
89291
|
applyOneOfValidationErrors,
|
|
88486
89292
|
applyPrefillForNewArrayItem,
|
|
88487
89293
|
applyPersistedForNewArrayItem,
|
|
88488
|
-
|
|
88489
|
-
expandedWildcardTemplates
|
|
89294
|
+
resolveHiddenPaths,
|
|
89295
|
+
expandedWildcardTemplates,
|
|
89296
|
+
notificationApi
|
|
88490
89297
|
]
|
|
88491
89298
|
);
|
|
88492
89299
|
React$1.useEffect(() => {
|