@react-typed-forms/schemas 11.6.0 → 11.6.1
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/index.js +9 -1
- package/lib/index.js.map +1 -1
- package/lib/schemaInterface.d.ts +2 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1273,7 +1273,13 @@ function cc(n) {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
1275
|
var DefaultSchemaInterface = /*#__PURE__*/function () {
|
|
1276
|
-
function DefaultSchemaInterface() {
|
|
1276
|
+
function DefaultSchemaInterface(boolStrings) {
|
|
1277
|
+
if (boolStrings === void 0) {
|
|
1278
|
+
boolStrings = ["No", "Yes"];
|
|
1279
|
+
}
|
|
1280
|
+
this.boolStrings = void 0;
|
|
1281
|
+
this.boolStrings = boolStrings;
|
|
1282
|
+
}
|
|
1277
1283
|
var _proto = DefaultSchemaInterface.prototype;
|
|
1278
1284
|
_proto.getOptions = function getOptions(_ref) {
|
|
1279
1285
|
var options = _ref.options;
|
|
@@ -1294,6 +1300,8 @@ var DefaultSchemaInterface = /*#__PURE__*/function () {
|
|
|
1294
1300
|
return new Date(value).toLocaleDateString();
|
|
1295
1301
|
case exports.FieldType.Date:
|
|
1296
1302
|
return new Date(value).toLocaleDateString();
|
|
1303
|
+
case exports.FieldType.Bool:
|
|
1304
|
+
return this.boolStrings[value ? 1 : 0];
|
|
1297
1305
|
default:
|
|
1298
1306
|
return value != null ? value.toString() : undefined;
|
|
1299
1307
|
}
|