@rjsf/core 5.18.6 → 5.19.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/dist/core.umd.js +2 -9
- package/dist/index.esm.js +3 -10
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +2 -9
- package/dist/index.js.map +2 -2
- package/lib/components/fields/SchemaField.js +3 -3
- package/lib/components/fields/SchemaField.js.map +1 -1
- package/lib/components/widgets/AltDateWidget.js +2 -9
- package/lib/components/widgets/AltDateWidget.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/components/fields/SchemaField.tsx +1 -1
- package/src/components/widgets/AltDateWidget.tsx +2 -10
package/dist/index.js
CHANGED
|
@@ -1505,7 +1505,7 @@ function SchemaFieldRender(props) {
|
|
|
1505
1505
|
);
|
|
1506
1506
|
const FieldComponent = getFieldComponent(schema, uiOptions, idSchema, registry);
|
|
1507
1507
|
const disabled = Boolean(uiOptions.disabled ?? props.disabled);
|
|
1508
|
-
const readonly = Boolean(uiOptions.readonly ?? props.readonly
|
|
1508
|
+
const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));
|
|
1509
1509
|
const uiSchemaHideError = uiOptions.hideError;
|
|
1510
1510
|
const hideError = uiSchemaHideError === void 0 ? props.hideError : Boolean(uiSchemaHideError);
|
|
1511
1511
|
const autofocus = Boolean(uiOptions.autofocus ?? props.autofocus);
|
|
@@ -2462,13 +2462,6 @@ var templates_default = templates;
|
|
|
2462
2462
|
var import_react8 = require("react");
|
|
2463
2463
|
var import_utils22 = require("@rjsf/utils");
|
|
2464
2464
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2465
|
-
function rangeOptions(start, stop) {
|
|
2466
|
-
const options = [];
|
|
2467
|
-
for (let i = start; i <= stop; i++) {
|
|
2468
|
-
options.push({ value: i, label: (0, import_utils22.pad)(i, 2) });
|
|
2469
|
-
}
|
|
2470
|
-
return options;
|
|
2471
|
-
}
|
|
2472
2465
|
function readyForChange(state) {
|
|
2473
2466
|
return Object.values(state).every((value) => value !== -1);
|
|
2474
2467
|
}
|
|
@@ -2495,7 +2488,7 @@ function DateElement({
|
|
|
2495
2488
|
id,
|
|
2496
2489
|
name,
|
|
2497
2490
|
className: "form-control",
|
|
2498
|
-
options: { enumOptions:
|
|
2491
|
+
options: { enumOptions: (0, import_utils22.dateRangeOptions)(range[0], range[1]) },
|
|
2499
2492
|
placeholder: type,
|
|
2500
2493
|
value,
|
|
2501
2494
|
disabled,
|