@react-typed-forms/schemas 9.2.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/DefaultArrayRenderer.d.ts +16 -0
- package/lib/controlRender.d.ts +31 -20
- package/lib/createDefaultRenderers.d.ts +2 -10
- package/lib/hooks.d.ts +2 -3
- package/lib/index.js +275 -214
- package/lib/index.js.map +1 -1
- package/lib/schemaInterface.d.ts +7 -2
- package/lib/types.d.ts +10 -1
- package/lib/util.d.ts +7 -1
- package/lib/validators.d.ts +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -103,6 +103,7 @@ exports.ValidatorType = void 0;
|
|
|
103
103
|
(function (ValidatorType) {
|
|
104
104
|
ValidatorType["Jsonata"] = "Jsonata";
|
|
105
105
|
ValidatorType["Date"] = "Date";
|
|
106
|
+
ValidatorType["Length"] = "Length";
|
|
106
107
|
})(exports.ValidatorType || (exports.ValidatorType = {}));
|
|
107
108
|
exports.DateComparison = void 0;
|
|
108
109
|
(function (DateComparison) {
|
|
@@ -570,6 +571,14 @@ function toDepString(x) {
|
|
|
570
571
|
if (x === null) return "~";
|
|
571
572
|
return x.toString();
|
|
572
573
|
}
|
|
574
|
+
function appendElementIndex(dataContext, elementIndex) {
|
|
575
|
+
return _extends({}, dataContext, {
|
|
576
|
+
path: [].concat(dataContext.path, [elementIndex])
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
function applyLengthRestrictions(length, min, max, minValue, maxValue) {
|
|
580
|
+
return [min == null || length > min ? minValue : undefined, max == null || length < max ? maxValue : undefined];
|
|
581
|
+
}
|
|
573
582
|
|
|
574
583
|
function buildSchema(def) {
|
|
575
584
|
return Object.entries(def).map(function (x) {
|
|
@@ -923,7 +932,7 @@ function useEvalDisabledHook(useEvalExpressionHook, definition) {
|
|
|
923
932
|
function useEvalDisplayHook(useEvalExpressionHook, definition) {
|
|
924
933
|
return useEvalDynamicHook(definition, exports.DynamicPropertyType.Display, useEvalExpressionHook);
|
|
925
934
|
}
|
|
926
|
-
function useEvalDefaultValueHook(useEvalExpressionHook, definition, schemaField) {
|
|
935
|
+
function useEvalDefaultValueHook(useEvalExpressionHook, definition, schemaField, element) {
|
|
927
936
|
var dynamicValue = useEvalDynamicHook(definition, exports.DynamicPropertyType.DefaultValue, useEvalExpressionHook);
|
|
928
937
|
return makeDynamicPropertyHook(dynamicValue, function (ctx, _ref3) {
|
|
929
938
|
var definition = _ref3.definition,
|
|
@@ -933,7 +942,7 @@ function useEvalDefaultValueHook(useEvalExpressionHook, definition, schemaField)
|
|
|
933
942
|
var _ref4 = isDataControlDefinition(definition) ? [definition.required, definition.defaultValue] : [false, undefined],
|
|
934
943
|
required = _ref4[0],
|
|
935
944
|
dcv = _ref4[1];
|
|
936
|
-
return dcv != null ? dcv : schemaField ? defaultValueForField(schemaField, required) : undefined;
|
|
945
|
+
return dcv != null ? dcv : schemaField ? element ? elementValueForField(schemaField) : defaultValueForField(schemaField, required) : undefined;
|
|
937
946
|
}
|
|
938
947
|
}, {
|
|
939
948
|
definition: definition,
|
|
@@ -1070,16 +1079,21 @@ function makeDynamicPropertyHook(dynamicValue, makeDefault, state, deps) {
|
|
|
1070
1079
|
};
|
|
1071
1080
|
}
|
|
1072
1081
|
|
|
1073
|
-
function useValidationHook(definition) {
|
|
1082
|
+
function useValidationHook(definition, field) {
|
|
1074
1083
|
var _definition$validator, _definition$validator2;
|
|
1075
1084
|
var validatorTypes = isDataControlDefinition(definition) ? (_definition$validator = (_definition$validator2 = definition.validators) == null ? void 0 : _definition$validator2.map(function (x) {
|
|
1076
1085
|
return x.type;
|
|
1077
1086
|
})) != null ? _definition$validator : [] : null;
|
|
1078
|
-
var r = useUpdatedRef(
|
|
1079
|
-
|
|
1087
|
+
var r = useUpdatedRef({
|
|
1088
|
+
definition: definition,
|
|
1089
|
+
field: field
|
|
1090
|
+
});
|
|
1091
|
+
return React.useCallback(function (control, hidden, groupContext, schemaInterface) {
|
|
1080
1092
|
var _dd$validators;
|
|
1081
1093
|
if (!validatorTypes) return;
|
|
1082
|
-
var
|
|
1094
|
+
var _r$current = r.current,
|
|
1095
|
+
dd = _r$current.definition,
|
|
1096
|
+
field = _r$current.field;
|
|
1083
1097
|
core.useValueChangeEffect(control, function () {
|
|
1084
1098
|
return control.setError("default", "");
|
|
1085
1099
|
});
|
|
@@ -1088,6 +1102,27 @@ function useValidationHook(definition) {
|
|
|
1088
1102
|
}, "required");
|
|
1089
1103
|
((_dd$validators = dd.validators) != null ? _dd$validators : []).forEach(function (x, i) {
|
|
1090
1104
|
switch (x.type) {
|
|
1105
|
+
case exports.ValidatorType.Length:
|
|
1106
|
+
var lv = x;
|
|
1107
|
+
core.useControlEffect(function () {
|
|
1108
|
+
core.trackControlChange(control, core.ControlChange.Validate);
|
|
1109
|
+
return field ? schemaInterface.controlLength(field, control) : 0;
|
|
1110
|
+
}, function (len) {
|
|
1111
|
+
if (lv.min != null && len < lv.min) {
|
|
1112
|
+
if (field != null && field.collection) {
|
|
1113
|
+
control.setValue(function (v) {
|
|
1114
|
+
return [].concat(v, Array.from({
|
|
1115
|
+
length: lv.min - len
|
|
1116
|
+
}));
|
|
1117
|
+
});
|
|
1118
|
+
} else {
|
|
1119
|
+
control.setError("length", "Length must be at least " + lv.min);
|
|
1120
|
+
}
|
|
1121
|
+
} else if (lv.max != null && len > lv.max) {
|
|
1122
|
+
control.setError("length", "Length must be less than " + lv.max);
|
|
1123
|
+
}
|
|
1124
|
+
}, true);
|
|
1125
|
+
break;
|
|
1091
1126
|
case exports.ValidatorType.Jsonata:
|
|
1092
1127
|
return useJsonataValidator(control, groupContext, x, hidden, i);
|
|
1093
1128
|
case exports.ValidatorType.Date:
|
|
@@ -1129,31 +1164,41 @@ function useDateValidator(control, dv, i) {
|
|
|
1129
1164
|
}, "date" + i);
|
|
1130
1165
|
}
|
|
1131
1166
|
|
|
1132
|
-
var
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1167
|
+
var DefaultSchemaInterface = /*#__PURE__*/function () {
|
|
1168
|
+
function DefaultSchemaInterface() {}
|
|
1169
|
+
var _proto = DefaultSchemaInterface.prototype;
|
|
1170
|
+
_proto.isEmptyValue = function isEmptyValue(f, value) {
|
|
1171
|
+
if (f.collection) return Array.isArray(value) ? value.length === 0 : value == null;
|
|
1172
|
+
switch (f.type) {
|
|
1173
|
+
case exports.FieldType.String:
|
|
1174
|
+
return !value;
|
|
1175
|
+
default:
|
|
1176
|
+
return value == null;
|
|
1177
|
+
}
|
|
1178
|
+
};
|
|
1179
|
+
_proto.textValue = function textValue(field, value, element) {
|
|
1180
|
+
switch (field.type) {
|
|
1181
|
+
case exports.FieldType.DateTime:
|
|
1182
|
+
return new Date(value).toLocaleDateString();
|
|
1183
|
+
case exports.FieldType.Date:
|
|
1184
|
+
return new Date(value).toLocaleDateString();
|
|
1185
|
+
default:
|
|
1186
|
+
return value != null ? value.toString() : undefined;
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
_proto.controlLength = function controlLength(f, control) {
|
|
1190
|
+
var _control$elements$len, _control$elements;
|
|
1191
|
+
return f.collection ? (_control$elements$len = (_control$elements = control.elements) == null ? void 0 : _control$elements.length) != null ? _control$elements$len : 0 : this.valueLength(f, control.value);
|
|
1192
|
+
};
|
|
1193
|
+
_proto.valueLength = function valueLength(field, value) {
|
|
1194
|
+
var _ref;
|
|
1195
|
+
return (_ref = value && (value == null ? void 0 : value.length)) != null ? _ref : 0;
|
|
1196
|
+
};
|
|
1197
|
+
return DefaultSchemaInterface;
|
|
1198
|
+
}();
|
|
1199
|
+
var defaultSchemaInterface = new DefaultSchemaInterface();
|
|
1155
1200
|
|
|
1156
|
-
var _excluded$3 = ["definition", "field", "control", "
|
|
1201
|
+
var _excluded$3 = ["definition", "field", "control", "formOptions", "style", "allowedOptions"];
|
|
1157
1202
|
var AppendAdornmentPriority = 0;
|
|
1158
1203
|
var WrapAdornmentPriority = 1000;
|
|
1159
1204
|
exports.LabelType = void 0;
|
|
@@ -1167,11 +1212,12 @@ function useControlRenderer(definition, fields, renderer, options) {
|
|
|
1167
1212
|
options = {};
|
|
1168
1213
|
}
|
|
1169
1214
|
var dataProps = (_options$useDataHook = options.useDataHook == null ? void 0 : options.useDataHook(definition)) != null ? _options$useDataHook : defaultDataProps;
|
|
1215
|
+
var elementIndex = options.elementIndex;
|
|
1170
1216
|
var schemaInterface = (_options$schemaInterf = options.schemaInterface) != null ? _options$schemaInterf : defaultSchemaInterface;
|
|
1171
1217
|
var useExpr = (_options$useEvalExpre = options.useEvalExpressionHook) != null ? _options$useEvalExpre : defaultUseEvalExpressionHook;
|
|
1172
1218
|
var schemaField = lookupSchemaField(definition, fields);
|
|
1173
1219
|
var dynamicHooks = useDynamicHooks({
|
|
1174
|
-
defaultValueControl: useEvalDefaultValueHook(useExpr, definition, schemaField),
|
|
1220
|
+
defaultValueControl: useEvalDefaultValueHook(useExpr, definition, schemaField, elementIndex != null),
|
|
1175
1221
|
visibleControl: useEvalVisibilityHook(useExpr, definition, schemaField),
|
|
1176
1222
|
readonlyControl: useEvalReadonlyHook(useExpr, definition),
|
|
1177
1223
|
disabledControl: useEvalDisabledHook(useExpr, definition),
|
|
@@ -1181,12 +1227,13 @@ function useControlRenderer(definition, fields, renderer, options) {
|
|
|
1181
1227
|
layoutStyle: useEvalStyleHook(useExpr, exports.DynamicPropertyType.LayoutStyle, definition),
|
|
1182
1228
|
displayControl: useEvalDisplayHook(useExpr, definition)
|
|
1183
1229
|
});
|
|
1184
|
-
var useValidation = useValidationHook(definition);
|
|
1230
|
+
var useValidation = useValidationHook(definition, schemaField);
|
|
1185
1231
|
var r = useUpdatedRef({
|
|
1186
1232
|
options: options,
|
|
1187
1233
|
definition: definition,
|
|
1188
1234
|
fields: fields,
|
|
1189
|
-
schemaField: schemaField
|
|
1235
|
+
schemaField: schemaField,
|
|
1236
|
+
elementIndex: elementIndex
|
|
1190
1237
|
});
|
|
1191
1238
|
var Component = React.useCallback(function (_ref) {
|
|
1192
1239
|
var rootControl = _ref.control,
|
|
@@ -1199,7 +1246,8 @@ function useControlRenderer(definition, fields, renderer, options) {
|
|
|
1199
1246
|
c = _r$current.definition,
|
|
1200
1247
|
_options = _r$current.options,
|
|
1201
1248
|
_fields = _r$current.fields,
|
|
1202
|
-
_schemaField = _r$current.schemaField
|
|
1249
|
+
_schemaField = _r$current.schemaField,
|
|
1250
|
+
_elementIndex = _r$current.elementIndex;
|
|
1203
1251
|
var parentDataContext = {
|
|
1204
1252
|
fields: _fields,
|
|
1205
1253
|
schemaInterface: schemaInterface,
|
|
@@ -1233,7 +1281,7 @@ function useControlRenderer(definition, fields, renderer, options) {
|
|
|
1233
1281
|
};
|
|
1234
1282
|
});
|
|
1235
1283
|
});
|
|
1236
|
-
var _getControlData = getControlData(_schemaField, parentDataContext),
|
|
1284
|
+
var _getControlData = getControlData(_schemaField, parentDataContext, _elementIndex),
|
|
1237
1285
|
parentControl = _getControlData[0],
|
|
1238
1286
|
control = _getControlData[1],
|
|
1239
1287
|
controlDataContext = _getControlData[2];
|
|
@@ -1267,8 +1315,10 @@ function useControlRenderer(definition, fields, renderer, options) {
|
|
|
1267
1315
|
disabled: _options.disabled || disabledControl.value
|
|
1268
1316
|
};
|
|
1269
1317
|
}).value;
|
|
1270
|
-
useValidation(control != null ? control : core.newControl(null), !!myOptions.hidden, parentDataContext);
|
|
1271
|
-
var childOptions = _extends({}, _options, myOptions
|
|
1318
|
+
useValidation(control != null ? control : core.newControl(null), !!myOptions.hidden, parentDataContext, schemaInterface);
|
|
1319
|
+
var childOptions = _extends({}, _options, myOptions, {
|
|
1320
|
+
elementIndex: undefined
|
|
1321
|
+
});
|
|
1272
1322
|
React.useEffect(function () {
|
|
1273
1323
|
if (control && typeof myOptions.disabled === "boolean") control.disabled = myOptions.disabled;
|
|
1274
1324
|
}, [control, myOptions.disabled]);
|
|
@@ -1281,29 +1331,34 @@ function useControlRenderer(definition, fields, renderer, options) {
|
|
|
1281
1331
|
var labelAndChildren = renderControlLayout({
|
|
1282
1332
|
definition: c,
|
|
1283
1333
|
renderer: renderer,
|
|
1284
|
-
renderChild: function renderChild(k, child,
|
|
1334
|
+
renderChild: function renderChild(k, child, options) {
|
|
1335
|
+
var _options$dataContext;
|
|
1336
|
+
var dataContext = (_options$dataContext = options == null ? void 0 : options.dataContext) != null ? _options$dataContext : controlDataContext;
|
|
1285
1337
|
return /*#__PURE__*/React__default["default"].createElement(ControlRenderer, {
|
|
1286
1338
|
key: k,
|
|
1287
|
-
control:
|
|
1288
|
-
fields:
|
|
1289
|
-
definition:
|
|
1290
|
-
parentPath:
|
|
1339
|
+
control: dataContext.data,
|
|
1340
|
+
fields: dataContext.fields,
|
|
1341
|
+
definition: child,
|
|
1342
|
+
parentPath: dataContext.path,
|
|
1291
1343
|
renderer: renderer,
|
|
1292
|
-
options: childOptions
|
|
1344
|
+
options: options ? _extends({}, childOptions, {
|
|
1345
|
+
elementIndex: options == null ? void 0 : options.elementIndex
|
|
1346
|
+
}) : childOptions
|
|
1293
1347
|
});
|
|
1294
1348
|
},
|
|
1295
1349
|
createDataProps: dataProps,
|
|
1296
1350
|
formOptions: myOptions,
|
|
1297
1351
|
dataContext: controlDataContext,
|
|
1352
|
+
parentContext: parentDataContext,
|
|
1298
1353
|
control: displayControl != null ? displayControl : control,
|
|
1354
|
+
elementIndex: _elementIndex,
|
|
1299
1355
|
labelText: labelText,
|
|
1300
|
-
|
|
1356
|
+
field: _schemaField,
|
|
1301
1357
|
displayControl: displayControl,
|
|
1302
1358
|
style: customStyle.value,
|
|
1303
1359
|
allowedOptions: allowedOptions,
|
|
1304
|
-
useChildVisibility: function useChildVisibility(
|
|
1305
|
-
var
|
|
1306
|
-
var schemaField = lookupSchemaField(childDef, controlDataContext.fields);
|
|
1360
|
+
useChildVisibility: function useChildVisibility(childDef, context) {
|
|
1361
|
+
var schemaField = lookupSchemaField(childDef, (context != null ? context : controlDataContext).fields);
|
|
1307
1362
|
return useEvalVisibilityHook(useExpr, childDef, schemaField);
|
|
1308
1363
|
}
|
|
1309
1364
|
});
|
|
@@ -1326,14 +1381,14 @@ function lookupSchemaField(c, fields) {
|
|
|
1326
1381
|
var fieldName = isGroupControlsDefinition(c) ? c.compoundField : isDataControlDefinition(c) ? c.field : undefined;
|
|
1327
1382
|
return fieldName ? findField(fields, fieldName) : undefined;
|
|
1328
1383
|
}
|
|
1329
|
-
function getControlData(schemaField, parentContext) {
|
|
1330
|
-
var _parentControl$fields;
|
|
1384
|
+
function getControlData(schemaField, parentContext, elementIndex) {
|
|
1385
|
+
var _parentControl$fields, _childControl$element;
|
|
1331
1386
|
var data = parentContext.data,
|
|
1332
1387
|
path = parentContext.path;
|
|
1333
1388
|
var parentControl = data.lookupControl(path);
|
|
1334
|
-
var childPath = schemaField ? [].concat(path, [schemaField.field]) : path;
|
|
1389
|
+
var childPath = schemaField ? elementIndex != null ? [].concat(path, [schemaField.field, elementIndex]) : [].concat(path, [schemaField.field]) : path;
|
|
1335
1390
|
var childControl = schemaField && parentControl ? (_parentControl$fields = parentControl.fields) == null ? void 0 : _parentControl$fields[schemaField.field] : undefined;
|
|
1336
|
-
return [parentControl, childControl, schemaField ? _extends({}, parentContext, {
|
|
1391
|
+
return [parentControl, childControl && elementIndex != null ? (_childControl$element = childControl.elements) == null ? void 0 : _childControl$element[elementIndex] : childControl, schemaField ? _extends({}, parentContext, {
|
|
1337
1392
|
path: childPath,
|
|
1338
1393
|
fields: isCompoundField(schemaField) ? schemaField.children : parentContext.fields
|
|
1339
1394
|
}) : parentContext];
|
|
@@ -1356,64 +1411,61 @@ function ControlRenderer(_ref3) {
|
|
|
1356
1411
|
_effect();
|
|
1357
1412
|
}
|
|
1358
1413
|
}
|
|
1359
|
-
function groupProps(definition, renderChild, dataContext, className, style, useChildVisibility) {
|
|
1360
|
-
var _definition$children, _definition$groupOpti;
|
|
1361
|
-
return {
|
|
1362
|
-
childDefinitions: (_definition$children = definition.children) != null ? _definition$children : [],
|
|
1363
|
-
renderChild: renderChild,
|
|
1364
|
-
dataContext: dataContext,
|
|
1365
|
-
renderOptions: (_definition$groupOpti = definition.groupOptions) != null ? _definition$groupOpti : {
|
|
1366
|
-
type: "Standard"
|
|
1367
|
-
},
|
|
1368
|
-
className: cc(className),
|
|
1369
|
-
useChildVisibility: useChildVisibility,
|
|
1370
|
-
style: style
|
|
1371
|
-
};
|
|
1372
|
-
}
|
|
1373
1414
|
function defaultDataProps(_ref4) {
|
|
1374
|
-
var _field$options$length, _field$options, _allowedOptions$value, _definition$
|
|
1415
|
+
var _definition$validator, _field$options$length, _field$options, _allowedOptions$value, _definition$children, _definition$renderOpt;
|
|
1375
1416
|
var definition = _ref4.definition,
|
|
1376
1417
|
field = _ref4.field,
|
|
1377
1418
|
control = _ref4.control,
|
|
1378
|
-
|
|
1379
|
-
elementRenderer = _ref4.elementRenderer,
|
|
1419
|
+
formOptions = _ref4.formOptions,
|
|
1380
1420
|
style = _ref4.style,
|
|
1381
1421
|
allowedOptions = _ref4.allowedOptions,
|
|
1382
1422
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded$3);
|
|
1423
|
+
var lengthVal = (_definition$validator = definition.validators) == null ? void 0 : _definition$validator.find(function (x) {
|
|
1424
|
+
return x.type === exports.ValidatorType.Length;
|
|
1425
|
+
});
|
|
1383
1426
|
var className = cc(definition.styleClass);
|
|
1384
1427
|
var required = !!definition.required;
|
|
1385
1428
|
var fieldOptions = ((_field$options$length = (_field$options = field.options) == null ? void 0 : _field$options.length) != null ? _field$options$length : 0) === 0 ? null : field.options;
|
|
1386
1429
|
var allowed = (_allowedOptions$value = allowedOptions == null ? void 0 : allowedOptions.value) != null ? _allowedOptions$value : [];
|
|
1387
1430
|
return _extends({
|
|
1388
1431
|
definition: definition,
|
|
1389
|
-
childDefinitions: (_definition$
|
|
1432
|
+
childDefinitions: (_definition$children = definition.children) != null ? _definition$children : [],
|
|
1390
1433
|
control: control,
|
|
1391
1434
|
field: field,
|
|
1392
1435
|
id: "c" + control.uniqueId,
|
|
1393
1436
|
options: fieldOptions && allowed.length > 0 ? fieldOptions.filter(function (x) {
|
|
1394
1437
|
return allowed.includes(x.value);
|
|
1395
1438
|
}) : fieldOptions,
|
|
1396
|
-
readonly: !!
|
|
1439
|
+
readonly: !!formOptions.readonly,
|
|
1397
1440
|
renderOptions: (_definition$renderOpt = definition.renderOptions) != null ? _definition$renderOpt : {
|
|
1398
1441
|
type: "Standard"
|
|
1399
1442
|
},
|
|
1400
1443
|
required: required,
|
|
1401
|
-
hidden: !!
|
|
1444
|
+
hidden: !!formOptions.hidden,
|
|
1402
1445
|
className: className,
|
|
1403
1446
|
style: style
|
|
1404
1447
|
}, props, {
|
|
1405
|
-
toArrayProps:
|
|
1406
|
-
return defaultArrayProps(control, field, required, style, className,
|
|
1448
|
+
toArrayProps: field.collection && props.elementIndex == null ? function () {
|
|
1449
|
+
return defaultArrayProps(control, field, required, style, className, function (elementIndex) {
|
|
1450
|
+
var _control$elements$ele, _control$elements;
|
|
1451
|
+
return props.renderChild((_control$elements$ele = (_control$elements = control.elements) == null ? void 0 : _control$elements[elementIndex].uniqueId) != null ? _control$elements$ele : elementIndex, {
|
|
1452
|
+
type: exports.ControlDefinitionType.Data,
|
|
1453
|
+
field: definition.field,
|
|
1454
|
+
children: definition.children,
|
|
1455
|
+
hideTitle: true
|
|
1456
|
+
}, {
|
|
1457
|
+
elementIndex: elementIndex,
|
|
1458
|
+
dataContext: props.parentContext
|
|
1459
|
+
});
|
|
1460
|
+
}, lengthVal == null ? void 0 : lengthVal.min, lengthVal == null ? void 0 : lengthVal.max);
|
|
1407
1461
|
} : undefined
|
|
1408
1462
|
});
|
|
1409
1463
|
}
|
|
1410
|
-
function defaultArrayProps(arrayControl, field, required, style, className, _renderElement) {
|
|
1411
|
-
var _field$displayName
|
|
1464
|
+
function defaultArrayProps(arrayControl, field, required, style, className, _renderElement, min, max) {
|
|
1465
|
+
var _field$displayName;
|
|
1412
1466
|
var noun = (_field$displayName = field.displayName) != null ? _field$displayName : field.field;
|
|
1413
|
-
var elems = (_arrayControl$element = arrayControl.elements) != null ? _arrayControl$element : [];
|
|
1414
1467
|
return {
|
|
1415
1468
|
arrayControl: arrayControl,
|
|
1416
|
-
elementCount: elems.length,
|
|
1417
1469
|
required: required,
|
|
1418
1470
|
addAction: {
|
|
1419
1471
|
actionId: "add",
|
|
@@ -1422,9 +1474,6 @@ function defaultArrayProps(arrayControl, field, required, style, className, _ren
|
|
|
1422
1474
|
return core.addElement(arrayControl, elementValueForField(field));
|
|
1423
1475
|
}
|
|
1424
1476
|
},
|
|
1425
|
-
elementKey: function elementKey(i) {
|
|
1426
|
-
return elems[i].uniqueId;
|
|
1427
|
-
},
|
|
1428
1477
|
removeAction: function removeAction(i) {
|
|
1429
1478
|
return {
|
|
1430
1479
|
actionId: "",
|
|
@@ -1438,28 +1487,29 @@ function defaultArrayProps(arrayControl, field, required, style, className, _ren
|
|
|
1438
1487
|
return _renderElement(i);
|
|
1439
1488
|
},
|
|
1440
1489
|
className: cc(className),
|
|
1441
|
-
style: style
|
|
1490
|
+
style: style,
|
|
1491
|
+
min: min,
|
|
1492
|
+
max: max
|
|
1442
1493
|
};
|
|
1443
1494
|
}
|
|
1444
|
-
function renderControlLayout(
|
|
1445
|
-
var c =
|
|
1446
|
-
renderer =
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
dataContext =
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
useChildVisibility = _ref5.useChildVisibility;
|
|
1495
|
+
function renderControlLayout(props) {
|
|
1496
|
+
var c = props.definition,
|
|
1497
|
+
renderer = props.renderer,
|
|
1498
|
+
renderChild = props.renderChild,
|
|
1499
|
+
control = props.control,
|
|
1500
|
+
field = props.field,
|
|
1501
|
+
dataContext = props.dataContext,
|
|
1502
|
+
dataProps = props.createDataProps,
|
|
1503
|
+
displayControl = props.displayControl,
|
|
1504
|
+
style = props.style,
|
|
1505
|
+
labelText = props.labelText,
|
|
1506
|
+
parentContext = props.parentContext,
|
|
1507
|
+
useChildVisibility = props.useChildVisibility;
|
|
1458
1508
|
if (isDataControlDefinition(c)) {
|
|
1459
1509
|
return renderData(c);
|
|
1460
1510
|
}
|
|
1461
1511
|
if (isGroupControlsDefinition(c)) {
|
|
1462
|
-
var _labelText$value, _c$
|
|
1512
|
+
var _c$children, _c$groupOptions2, _labelText$value, _c$groupOptions3;
|
|
1463
1513
|
if (c.compoundField) {
|
|
1464
1514
|
var _c$groupOptions;
|
|
1465
1515
|
return renderData(dataControl(c.compoundField, c.title, {
|
|
@@ -1468,20 +1518,32 @@ function renderControlLayout(_ref5) {
|
|
|
1468
1518
|
}));
|
|
1469
1519
|
}
|
|
1470
1520
|
return {
|
|
1471
|
-
processLayout: renderer.renderGroup(
|
|
1521
|
+
processLayout: renderer.renderGroup({
|
|
1522
|
+
childDefinitions: (_c$children = c.children) != null ? _c$children : [],
|
|
1523
|
+
definition: c,
|
|
1524
|
+
parentContext: parentContext,
|
|
1525
|
+
renderChild: renderChild,
|
|
1526
|
+
dataContext: dataContext,
|
|
1527
|
+
renderOptions: (_c$groupOptions2 = c.groupOptions) != null ? _c$groupOptions2 : {
|
|
1528
|
+
type: "Standard"
|
|
1529
|
+
},
|
|
1530
|
+
className: cc(c.styleClass),
|
|
1531
|
+
useChildVisibility: useChildVisibility,
|
|
1532
|
+
style: style
|
|
1533
|
+
}),
|
|
1472
1534
|
label: {
|
|
1473
1535
|
label: (_labelText$value = labelText == null ? void 0 : labelText.value) != null ? _labelText$value : c.title,
|
|
1474
1536
|
className: cc(c.labelClass),
|
|
1475
1537
|
type: exports.LabelType.Group,
|
|
1476
|
-
hide: (_c$
|
|
1538
|
+
hide: (_c$groupOptions3 = c.groupOptions) == null ? void 0 : _c$groupOptions3.hideTitle
|
|
1477
1539
|
}
|
|
1478
1540
|
};
|
|
1479
1541
|
}
|
|
1480
1542
|
if (isActionControlsDefinition(c)) {
|
|
1481
|
-
var
|
|
1543
|
+
var _ref5, _labelText$value2;
|
|
1482
1544
|
return {
|
|
1483
1545
|
children: renderer.renderAction({
|
|
1484
|
-
actionText: (
|
|
1546
|
+
actionText: (_ref5 = (_labelText$value2 = labelText == null ? void 0 : labelText.value) != null ? _labelText$value2 : c.title) != null ? _ref5 : c.actionId,
|
|
1485
1547
|
actionId: c.actionId,
|
|
1486
1548
|
onClick: function onClick() {},
|
|
1487
1549
|
className: cc(c.styleClass),
|
|
@@ -1502,44 +1564,27 @@ function renderControlLayout(_ref5) {
|
|
|
1502
1564
|
};
|
|
1503
1565
|
}
|
|
1504
1566
|
return {};
|
|
1505
|
-
function renderData(c
|
|
1567
|
+
function renderData(c) {
|
|
1506
1568
|
var _labelText$value3;
|
|
1507
|
-
if (!
|
|
1569
|
+
if (!field) return {
|
|
1508
1570
|
children: "No schema field for: " + c.field
|
|
1509
1571
|
};
|
|
1510
|
-
if (!
|
|
1572
|
+
if (!control) return {
|
|
1511
1573
|
children: "No control for: " + c.field
|
|
1512
1574
|
};
|
|
1513
|
-
var
|
|
1514
|
-
|
|
1515
|
-
field: schemaField,
|
|
1516
|
-
dataContext: elemIndex != null ? _extends({}, dataContext, {
|
|
1517
|
-
path: [].concat(dataContext.path, [elemIndex])
|
|
1518
|
-
}) : dataContext,
|
|
1519
|
-
control: elemIndex != null ? childControl.elements[elemIndex] : childControl,
|
|
1520
|
-
options: dataOptions,
|
|
1521
|
-
style: style,
|
|
1522
|
-
allowedOptions: allowedOptions,
|
|
1523
|
-
renderChild: elemIndex != null ? function (k, d, p) {
|
|
1524
|
-
return childRenderer(k, d, p ? [elemIndex].concat(p) : [elemIndex]);
|
|
1525
|
-
} : childRenderer,
|
|
1526
|
-
useChildVisibility: useChildVisibility,
|
|
1527
|
-
elementRenderer: elemIndex == null && schemaField.collection ? function (ei) {
|
|
1528
|
-
return renderLayoutParts(renderData(c, ei), renderer).children;
|
|
1529
|
-
} : undefined
|
|
1530
|
-
});
|
|
1531
|
-
var label = !c.hideTitle ? controlTitle((_labelText$value3 = labelText == null ? void 0 : labelText.value) != null ? _labelText$value3 : c.title, schemaField) : undefined;
|
|
1575
|
+
var rendererProps = dataProps(props);
|
|
1576
|
+
var label = !c.hideTitle ? controlTitle((_labelText$value3 = labelText == null ? void 0 : labelText.value) != null ? _labelText$value3 : c.title, field) : undefined;
|
|
1532
1577
|
return {
|
|
1533
|
-
processLayout: renderer.renderData(
|
|
1578
|
+
processLayout: renderer.renderData(rendererProps),
|
|
1534
1579
|
label: {
|
|
1535
1580
|
type: exports.LabelType.Control,
|
|
1536
1581
|
label: label,
|
|
1537
|
-
forId:
|
|
1582
|
+
forId: rendererProps.id,
|
|
1538
1583
|
required: c.required,
|
|
1539
1584
|
hide: c.hideTitle,
|
|
1540
1585
|
className: cc(c.labelClass)
|
|
1541
1586
|
},
|
|
1542
|
-
errorControl:
|
|
1587
|
+
errorControl: control
|
|
1543
1588
|
};
|
|
1544
1589
|
}
|
|
1545
1590
|
}
|
|
@@ -1573,13 +1618,13 @@ function wrapMarkupAt(pos, wrap) {
|
|
|
1573
1618
|
}
|
|
1574
1619
|
function renderLayoutParts(props, renderer) {
|
|
1575
1620
|
var _props$processLayout;
|
|
1576
|
-
var
|
|
1577
|
-
className =
|
|
1578
|
-
children =
|
|
1579
|
-
style =
|
|
1580
|
-
errorControl =
|
|
1581
|
-
label =
|
|
1582
|
-
adornments =
|
|
1621
|
+
var _ref6 = (_props$processLayout = props.processLayout == null ? void 0 : props.processLayout(props)) != null ? _props$processLayout : props,
|
|
1622
|
+
className = _ref6.className,
|
|
1623
|
+
children = _ref6.children,
|
|
1624
|
+
style = _ref6.style,
|
|
1625
|
+
errorControl = _ref6.errorControl,
|
|
1626
|
+
label = _ref6.label,
|
|
1627
|
+
adornments = _ref6.adornments;
|
|
1583
1628
|
var layout = {
|
|
1584
1629
|
children: children,
|
|
1585
1630
|
errorControl: errorControl,
|
|
@@ -1597,6 +1642,24 @@ function renderLayoutParts(props, renderer) {
|
|
|
1597
1642
|
function controlTitle(title, field) {
|
|
1598
1643
|
return title ? title : fieldDisplayName(field);
|
|
1599
1644
|
}
|
|
1645
|
+
function applyArrayLengthRestrictions(_ref7, disable) {
|
|
1646
|
+
var _arrayControl$element, _arrayControl$element2;
|
|
1647
|
+
var arrayControl = _ref7.arrayControl,
|
|
1648
|
+
min = _ref7.min,
|
|
1649
|
+
max = _ref7.max,
|
|
1650
|
+
aa = _ref7.addAction,
|
|
1651
|
+
ra = _ref7.removeAction,
|
|
1652
|
+
required = _ref7.required;
|
|
1653
|
+
var _applyLengthRestricti = applyLengthRestrictions((_arrayControl$element = (_arrayControl$element2 = arrayControl.elements) == null ? void 0 : _arrayControl$element2.length) != null ? _arrayControl$element : 0, min == null && required ? 1 : min, max, true, true),
|
|
1654
|
+
removeAllowed = _applyLengthRestricti[0],
|
|
1655
|
+
addAllowed = _applyLengthRestricti[1];
|
|
1656
|
+
return {
|
|
1657
|
+
addAction: disable || addAllowed ? aa : undefined,
|
|
1658
|
+
removeAction: disable || removeAllowed ? ra : undefined,
|
|
1659
|
+
removeDisabled: !removeAllowed,
|
|
1660
|
+
addDisabled: !addAllowed
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1600
1663
|
|
|
1601
1664
|
function isIconAdornment(a) {
|
|
1602
1665
|
return a.type === exports.ControlAdornmentType.Icon;
|
|
@@ -2008,78 +2071,86 @@ function RadioButtons(_ref) {
|
|
|
2008
2071
|
}
|
|
2009
2072
|
}
|
|
2010
2073
|
|
|
2011
|
-
function
|
|
2012
|
-
if (options === void 0) {
|
|
2013
|
-
options = {};
|
|
2014
|
-
}
|
|
2015
|
-
function render(_ref) {
|
|
2016
|
-
var onClick = _ref.onClick,
|
|
2017
|
-
actionText = _ref.actionText;
|
|
2018
|
-
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2019
|
-
className: options.className,
|
|
2020
|
-
onClick: onClick
|
|
2021
|
-
}, actionText);
|
|
2022
|
-
}
|
|
2074
|
+
function createDefaultArrayRenderer(options) {
|
|
2023
2075
|
return {
|
|
2024
|
-
render: render,
|
|
2025
|
-
|
|
2076
|
+
render: function render(props, _ref) {
|
|
2077
|
+
var renderAction = _ref.renderAction;
|
|
2078
|
+
return /*#__PURE__*/React__default["default"].createElement(DefaultArrayRenderer, _extends({}, props, options, {
|
|
2079
|
+
renderAction: renderAction
|
|
2080
|
+
}));
|
|
2081
|
+
},
|
|
2082
|
+
type: "array"
|
|
2026
2083
|
};
|
|
2027
2084
|
}
|
|
2028
|
-
function
|
|
2029
|
-
var
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2085
|
+
function DefaultArrayRenderer(props) {
|
|
2086
|
+
var _effect = core.useComponentTracking();
|
|
2087
|
+
try {
|
|
2088
|
+
var renderElement = props.renderElement,
|
|
2089
|
+
className = props.className,
|
|
2090
|
+
removableClass = props.removableClass,
|
|
2091
|
+
childClass = props.childClass,
|
|
2092
|
+
removableChildClass = props.removableChildClass,
|
|
2093
|
+
removeActionClass = props.removeActionClass,
|
|
2094
|
+
addActionClass = props.addActionClass,
|
|
2095
|
+
arrayControl = props.arrayControl,
|
|
2096
|
+
renderAction = props.renderAction,
|
|
2097
|
+
style = props.style;
|
|
2098
|
+
var _applyArrayLengthRest = applyArrayLengthRestrictions(props),
|
|
2099
|
+
addAction = _applyArrayLengthRest.addAction,
|
|
2100
|
+
removeAction = _applyArrayLengthRest.removeAction;
|
|
2101
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2102
|
+
style: style
|
|
2103
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2046
2104
|
className: clsx__default["default"](className, removeAction && removableClass)
|
|
2047
|
-
},
|
|
2048
|
-
|
|
2105
|
+
}, /*#__PURE__*/React__default["default"].createElement(core.RenderElements, {
|
|
2106
|
+
control: arrayControl
|
|
2049
2107
|
}, function (_, x) {
|
|
2050
|
-
return removeAction ? /*#__PURE__*/React__default["default"].createElement(
|
|
2051
|
-
key: elementKey(x)
|
|
2052
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2108
|
+
return removeAction ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2053
2109
|
className: clsx__default["default"](childClass, removableChildClass)
|
|
2054
2110
|
}, renderElement(x)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2055
2111
|
className: removeActionClass
|
|
2056
|
-
},
|
|
2057
|
-
key: elementKey(x),
|
|
2112
|
+
}, renderAction(removeAction(x)))) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2058
2113
|
className: childClass
|
|
2059
2114
|
}, renderElement(x));
|
|
2060
2115
|
})), addAction && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2061
2116
|
className: addActionClass
|
|
2062
2117
|
}, renderAction(addAction)));
|
|
2118
|
+
} finally {
|
|
2119
|
+
_effect();
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
function createDefaultActionRenderer(options) {
|
|
2124
|
+
if (options === void 0) {
|
|
2125
|
+
options = {};
|
|
2126
|
+
}
|
|
2127
|
+
function render(_ref) {
|
|
2128
|
+
var onClick = _ref.onClick,
|
|
2129
|
+
actionText = _ref.actionText;
|
|
2130
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2131
|
+
className: options.className,
|
|
2132
|
+
onClick: onClick
|
|
2133
|
+
}, actionText);
|
|
2063
2134
|
}
|
|
2064
2135
|
return {
|
|
2065
2136
|
render: render,
|
|
2066
|
-
type: "
|
|
2137
|
+
type: "action"
|
|
2067
2138
|
};
|
|
2068
2139
|
}
|
|
2069
2140
|
function createDefaultGroupRenderer(options) {
|
|
2070
|
-
var
|
|
2071
|
-
className =
|
|
2072
|
-
|
|
2073
|
-
gridStyles =
|
|
2074
|
-
|
|
2075
|
-
defaultGridColumns =
|
|
2076
|
-
gridClassName =
|
|
2077
|
-
standardClassName =
|
|
2078
|
-
flexClassName =
|
|
2079
|
-
defaultFlexGap =
|
|
2080
|
-
function defaultGridStyles(
|
|
2081
|
-
var
|
|
2082
|
-
columns =
|
|
2141
|
+
var _ref2 = options != null ? options : {},
|
|
2142
|
+
className = _ref2.className,
|
|
2143
|
+
_ref2$gridStyles = _ref2.gridStyles,
|
|
2144
|
+
gridStyles = _ref2$gridStyles === void 0 ? defaultGridStyles : _ref2$gridStyles,
|
|
2145
|
+
_ref2$defaultGridColu = _ref2.defaultGridColumns,
|
|
2146
|
+
defaultGridColumns = _ref2$defaultGridColu === void 0 ? 2 : _ref2$defaultGridColu,
|
|
2147
|
+
gridClassName = _ref2.gridClassName,
|
|
2148
|
+
standardClassName = _ref2.standardClassName,
|
|
2149
|
+
flexClassName = _ref2.flexClassName,
|
|
2150
|
+
defaultFlexGap = _ref2.defaultFlexGap;
|
|
2151
|
+
function defaultGridStyles(_ref3) {
|
|
2152
|
+
var _ref3$columns = _ref3.columns,
|
|
2153
|
+
columns = _ref3$columns === void 0 ? defaultGridColumns : _ref3$columns;
|
|
2083
2154
|
return {
|
|
2084
2155
|
className: gridClassName,
|
|
2085
2156
|
style: {
|
|
@@ -2102,18 +2173,18 @@ function createDefaultGroupRenderer(options) {
|
|
|
2102
2173
|
var renderChild = props.renderChild,
|
|
2103
2174
|
renderOptions = props.renderOptions,
|
|
2104
2175
|
childDefinitions = props.childDefinitions;
|
|
2105
|
-
var
|
|
2176
|
+
var _ref4 = isGridRenderer(renderOptions) ? gridStyles(renderOptions) : isFlexRenderer(renderOptions) ? flexStyles(renderOptions) : {
|
|
2106
2177
|
className: standardClassName
|
|
2107
2178
|
},
|
|
2108
|
-
style =
|
|
2109
|
-
gcn =
|
|
2179
|
+
style = _ref4.style,
|
|
2180
|
+
gcn = _ref4.className;
|
|
2110
2181
|
return function (cp) {
|
|
2111
2182
|
return _extends({}, cp, {
|
|
2112
2183
|
children: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2113
2184
|
className: rendererClass(props.className, clsx__default["default"](className, gcn)),
|
|
2114
2185
|
style: style
|
|
2115
2186
|
}, childDefinitions == null ? void 0 : childDefinitions.map(function (c, i) {
|
|
2116
|
-
return renderChild(i,
|
|
2187
|
+
return renderChild(i, c);
|
|
2117
2188
|
}))
|
|
2118
2189
|
});
|
|
2119
2190
|
};
|
|
@@ -2155,25 +2226,14 @@ function createDefaultDataRenderer(options) {
|
|
|
2155
2226
|
}
|
|
2156
2227
|
var renderOptions = props.renderOptions;
|
|
2157
2228
|
if (fieldType === exports.FieldType.Compound) {
|
|
2158
|
-
var
|
|
2159
|
-
var
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
style: style,
|
|
2167
|
-
className: className,
|
|
2168
|
-
childDefinitions: childDefinitions,
|
|
2169
|
-
renderOptions: groupOptions != null ? groupOptions : {
|
|
2170
|
-
type: "Standard",
|
|
2171
|
-
hideTitle: true
|
|
2172
|
-
},
|
|
2173
|
-
renderChild: renderChild,
|
|
2174
|
-
dataContext: dataContext,
|
|
2175
|
-
useChildVisibility: useChildVisibility
|
|
2176
|
-
});
|
|
2229
|
+
var _ref5;
|
|
2230
|
+
var groupOptions = (_ref5 = isDataGroupRenderer(renderOptions) ? renderOptions.groupOptions : undefined) != null ? _ref5 : {
|
|
2231
|
+
type: "Standard",
|
|
2232
|
+
hideTitle: true
|
|
2233
|
+
};
|
|
2234
|
+
return renderers.renderGroup(_extends({}, props, {
|
|
2235
|
+
renderOptions: groupOptions
|
|
2236
|
+
}));
|
|
2177
2237
|
}
|
|
2178
2238
|
var renderType = renderOptions.type;
|
|
2179
2239
|
if (fieldType == exports.FieldType.Any) return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, "No control for Any");
|
|
@@ -2226,8 +2286,8 @@ function createDefaultDataRenderer(options) {
|
|
|
2226
2286
|
function createDefaultAdornmentRenderer(options) {
|
|
2227
2287
|
return {
|
|
2228
2288
|
type: "adornment",
|
|
2229
|
-
render: function render(
|
|
2230
|
-
var adornment =
|
|
2289
|
+
render: function render(_ref6) {
|
|
2290
|
+
var adornment = _ref6.adornment;
|
|
2231
2291
|
return {
|
|
2232
2292
|
apply: function apply(rl) {
|
|
2233
2293
|
if (isIconAdornment(adornment)) {
|
|
@@ -2362,7 +2422,7 @@ function createFormRenderer(customRenderers, defaultRenderers) {
|
|
|
2362
2422
|
var options = hasOptions(props);
|
|
2363
2423
|
var renderer = (_dataRegistrations$fi = dataRegistrations.find(function (x) {
|
|
2364
2424
|
var _x$collection, _field$collection, _x$options;
|
|
2365
|
-
return ((_x$collection = x.collection) != null ? _x$collection : false) === ((_field$collection = field.collection) != null ? _field$collection : false) && ((_x$options = x.options) != null ? _x$options : false) === options && (x.schemaType && isOneOf(x.schemaType, field.type) || x.renderType && isOneOf(x.renderType, renderType) || x.match && x.match(props));
|
|
2425
|
+
return ((_x$collection = x.collection) != null ? _x$collection : false) === (props.elementIndex == null && ((_field$collection = field.collection) != null ? _field$collection : false)) && ((_x$options = x.options) != null ? _x$options : false) === options && (x.schemaType && isOneOf(x.schemaType, field.type) || x.renderType && isOneOf(x.renderType, renderType) || x.match && x.match(props));
|
|
2366
2426
|
})) != null ? _dataRegistrations$fi : defaultRenderers.data;
|
|
2367
2427
|
var result = renderer.render(props, formRenderers);
|
|
2368
2428
|
if (typeof result === "function") return result;
|
|
@@ -2464,18 +2524,22 @@ exports.DefaultBoolOptions = DefaultBoolOptions;
|
|
|
2464
2524
|
exports.DefaultDisplay = DefaultDisplay;
|
|
2465
2525
|
exports.DefaultDisplayOnly = DefaultDisplayOnly;
|
|
2466
2526
|
exports.DefaultLayout = DefaultLayout;
|
|
2527
|
+
exports.DefaultSchemaInterface = DefaultSchemaInterface;
|
|
2467
2528
|
exports.DefaultVisibility = DefaultVisibility;
|
|
2468
2529
|
exports.RadioButtons = RadioButtons;
|
|
2469
2530
|
exports.SelectDataRenderer = SelectDataRenderer;
|
|
2470
2531
|
exports.WrapAdornmentPriority = WrapAdornmentPriority;
|
|
2471
2532
|
exports.addFieldOption = addFieldOption;
|
|
2472
2533
|
exports.addMissingControls = addMissingControls;
|
|
2534
|
+
exports.appendElementIndex = appendElementIndex;
|
|
2473
2535
|
exports.appendMarkup = appendMarkup;
|
|
2474
2536
|
exports.appendMarkupAt = appendMarkupAt;
|
|
2537
|
+
exports.applyArrayLengthRestrictions = applyArrayLengthRestrictions;
|
|
2475
2538
|
exports.applyDefaultForField = applyDefaultForField;
|
|
2476
2539
|
exports.applyDefaultValues = applyDefaultValues;
|
|
2477
2540
|
exports.applyExtensionToSchema = applyExtensionToSchema;
|
|
2478
2541
|
exports.applyExtensionsToSchema = applyExtensionsToSchema;
|
|
2542
|
+
exports.applyLengthRestrictions = applyLengthRestrictions;
|
|
2479
2543
|
exports.boolField = boolField;
|
|
2480
2544
|
exports.buildSchema = buildSchema;
|
|
2481
2545
|
exports.cleanDataForSchema = cleanDataForSchema;
|
|
@@ -2488,7 +2552,6 @@ exports.createArrayRenderer = createArrayRenderer;
|
|
|
2488
2552
|
exports.createDataRenderer = createDataRenderer;
|
|
2489
2553
|
exports.createDefaultActionRenderer = createDefaultActionRenderer;
|
|
2490
2554
|
exports.createDefaultAdornmentRenderer = createDefaultAdornmentRenderer;
|
|
2491
|
-
exports.createDefaultArrayRenderer = createDefaultArrayRenderer;
|
|
2492
2555
|
exports.createDefaultDataRenderer = createDefaultDataRenderer;
|
|
2493
2556
|
exports.createDefaultDisplayRenderer = createDefaultDisplayRenderer;
|
|
2494
2557
|
exports.createDefaultGroupRenderer = createDefaultGroupRenderer;
|
|
@@ -2511,11 +2574,9 @@ exports.defaultCompoundField = defaultCompoundField;
|
|
|
2511
2574
|
exports.defaultControlForField = defaultControlForField;
|
|
2512
2575
|
exports.defaultDataProps = defaultDataProps;
|
|
2513
2576
|
exports.defaultEvalHooks = defaultEvalHooks;
|
|
2514
|
-
exports.defaultIsEmpty = defaultIsEmpty;
|
|
2515
2577
|
exports.defaultScalarField = defaultScalarField;
|
|
2516
2578
|
exports.defaultSchemaInterface = defaultSchemaInterface;
|
|
2517
2579
|
exports.defaultTailwindTheme = defaultTailwindTheme;
|
|
2518
|
-
exports.defaultTextValue = defaultTextValue;
|
|
2519
2580
|
exports.defaultUseEvalExpressionHook = defaultUseEvalExpressionHook;
|
|
2520
2581
|
exports.defaultValueForField = defaultValueForField;
|
|
2521
2582
|
exports.defaultValueForFields = defaultValueForFields;
|