@remoteoss/json-schema-form 0.5.0-dev.20230719145458 → 0.5.0-dev.20230719162322

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.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230719145458
5
- Generated: Wed, 19 Jul 2023 14:55:12 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230719162322
5
+ Generated: Wed, 19 Jul 2023 16:23:38 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -414,7 +414,12 @@ var yupSchemas = {
414
414
  return `The option ${JSON.stringify(value)} is not valid.`;
415
415
  }),
416
416
  date: ({ minDate, maxDate }) => {
417
- let dateString = (0, import_yup.string)().nullable().trim().matches(
417
+ let dateString = (0, import_yup.string)().nullable().transform((value) => {
418
+ if (value === "") {
419
+ return void 0;
420
+ }
421
+ return value === null ? void 0 : value;
422
+ }).trim().matches(
418
423
  /(?:\d){4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9]|3[0-1])/,
419
424
  `Must be a valid date in ${DEFAULT_DATE_FORMAT.toLocaleLowerCase()} format. e.g. ${todayDateHint}`
420
425
  );
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230719145458
5
- Generated: Wed, 19 Jul 2023 14:55:12 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230719162322
5
+ Generated: Wed, 19 Jul 2023 16:23:38 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -378,7 +378,12 @@ var yupSchemas = {
378
378
  return `The option ${JSON.stringify(value)} is not valid.`;
379
379
  }),
380
380
  date: ({ minDate, maxDate }) => {
381
- let dateString = string().nullable().trim().matches(
381
+ let dateString = string().nullable().transform((value) => {
382
+ if (value === "") {
383
+ return void 0;
384
+ }
385
+ return value === null ? void 0 : value;
386
+ }).trim().matches(
382
387
  /(?:\d){4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9]|3[0-1])/,
383
388
  `Must be a valid date in ${DEFAULT_DATE_FORMAT.toLocaleLowerCase()} format. e.g. ${todayDateHint}`
384
389
  );
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230719145458
5
- Generated: Wed, 19 Jul 2023 14:55:12 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230719162322
5
+ Generated: Wed, 19 Jul 2023 16:23:38 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -11354,7 +11354,12 @@ var yupSchemas = {
11354
11354
  return `The option ${JSON.stringify(value)} is not valid.`;
11355
11355
  }),
11356
11356
  date: ({ minDate, maxDate }) => {
11357
- let dateString = StringSchema().nullable().trim().matches(
11357
+ let dateString = StringSchema().nullable().transform((value) => {
11358
+ if (value === "") {
11359
+ return void 0;
11360
+ }
11361
+ return value === null ? void 0 : value;
11362
+ }).trim().matches(
11358
11363
  /(?:\d){4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9]|3[0-1])/,
11359
11364
  `Must be a valid date in ${DEFAULT_DATE_FORMAT.toLocaleLowerCase()} format. e.g. ${todayDateHint}`
11360
11365
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/json-schema-form",
3
- "version": "0.5.0-dev.20230719145458",
3
+ "version": "0.5.0-dev.20230719162322",
4
4
  "description": "Headless UI form powered by JSON Schemas",
5
5
  "author": "Remote.com <engineering@remote.com> (https://remote.com/)",
6
6
  "license": "MIT",