@remoteoss/json-schema-form 0.2.0-beta.0 → 0.3.0-beta.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/CHANGELOG.md +10 -0
- package/dist/index.cjs +13 -3
- package/dist/index.js +13 -3
- package/dist/standalone.js +796 -358
- package/package.json +3 -2
- package/src/tests/createHeadlessForm.test.js +18 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
#### 0.3.0-beta.0 (2023-06-21)
|
|
2
|
+
|
|
3
|
+
##### Fixes
|
|
4
|
+
|
|
5
|
+
- Fix validation for text schema to only validate strings ([#12](https://github.com/remoteoss/json-schema-form/pull/12)) ([00017c0](https://github.com/remoteoss/json-schema-form/commit/00017c056d8a3583d56d9fefc4d3c7e0f4c1dd99))
|
|
6
|
+
|
|
7
|
+
##### Chores
|
|
8
|
+
|
|
9
|
+
- Update yup version to v.0.30.0 ([#12](https://github.com/remoteoss/json-schema-form/pull/12)) ([00017c0](https://github.com/remoteoss/json-schema-form/commit/00017c056d8a3583d56d9fefc4d3c7e0f4c1dd99))
|
|
10
|
+
|
|
1
11
|
#### 0.2.0-beta.0 (2023-06-20)
|
|
2
12
|
|
|
3
13
|
##### New Features
|
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
|
-
Generated:
|
|
4
|
+
NPM Package: @remoteoss/json-schema-form@0.3.0-beta.0
|
|
5
|
+
Generated: Wed, 21 Jun 2023 11:17:55 GMT
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
|
@@ -371,8 +371,18 @@ var baseString = (0, import_yup.string)().trim();
|
|
|
371
371
|
var todayDateHint = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
372
372
|
var convertBytesToKB = convertDiskSizeFromTo("Bytes", "KB");
|
|
373
373
|
var convertKbBytesToMB = convertDiskSizeFromTo("KB", "MB");
|
|
374
|
+
var validateOnlyStrings = (0, import_yup.string)().trim().nullable().test(
|
|
375
|
+
"is-string",
|
|
376
|
+
"${path} must be a `string` type, but the final value was: `${value}`.",
|
|
377
|
+
(value, context) => {
|
|
378
|
+
if (context.originalValue !== null && context.originalValue !== void 0) {
|
|
379
|
+
return typeof context.originalValue === "string";
|
|
380
|
+
}
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
);
|
|
374
384
|
var yupSchemas = {
|
|
375
|
-
text:
|
|
385
|
+
text: validateOnlyStrings,
|
|
376
386
|
select: (0, import_yup.string)().trim().nullable(),
|
|
377
387
|
radio: (0, import_yup.string)().trim().nullable(),
|
|
378
388
|
date: (0, import_yup.string)().nullable().trim().matches(
|
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
|
-
Generated:
|
|
4
|
+
NPM Package: @remoteoss/json-schema-form@0.3.0-beta.0
|
|
5
|
+
Generated: Wed, 21 Jun 2023 11:17:55 GMT
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
|
@@ -335,8 +335,18 @@ var baseString = string().trim();
|
|
|
335
335
|
var todayDateHint = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
336
336
|
var convertBytesToKB = convertDiskSizeFromTo("Bytes", "KB");
|
|
337
337
|
var convertKbBytesToMB = convertDiskSizeFromTo("KB", "MB");
|
|
338
|
+
var validateOnlyStrings = string().trim().nullable().test(
|
|
339
|
+
"is-string",
|
|
340
|
+
"${path} must be a `string` type, but the final value was: `${value}`.",
|
|
341
|
+
(value, context) => {
|
|
342
|
+
if (context.originalValue !== null && context.originalValue !== void 0) {
|
|
343
|
+
return typeof context.originalValue === "string";
|
|
344
|
+
}
|
|
345
|
+
return true;
|
|
346
|
+
}
|
|
347
|
+
);
|
|
338
348
|
var yupSchemas = {
|
|
339
|
-
text:
|
|
349
|
+
text: validateOnlyStrings,
|
|
340
350
|
select: string().trim().nullable(),
|
|
341
351
|
radio: string().trim().nullable(),
|
|
342
352
|
date: string().nullable().trim().matches(
|