payload 0.14.12-beta.0 → 0.14.14-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 +29 -2
- package/dist/admin/components/forms/Form/fieldReducer.js +0 -1
- package/dist/admin/components/forms/Form/reduceFieldsToValues.js +1 -6
- package/dist/admin/components/forms/Form/types.d.ts +0 -1
- package/dist/admin/components/forms/field-types/RichText/RichText.js +0 -1
- package/dist/admin/components/forms/useField/index.js +1 -3
- package/dist/admin/components/forms/useField/types.d.ts +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
## [0.14.
|
|
1
|
+
## [0.14.14-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.14-beta.0) (2022-01-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* awaits beforeDelete hooks ([609b871](https://github.com/payloadcms/payload/commit/609b871fa274e8b6d9eaf301e52ab42179aad9b7))
|
|
7
|
+
* ensures multipart/form-data using _payload flattens field data before sending ([ae44727](https://github.com/payloadcms/payload/commit/ae44727fb9734fc3801f7249fa9e78668311c09e))
|
|
8
|
+
* ensures nested lists always render properly ([20e5dfb](https://github.com/payloadcms/payload/commit/20e5dfbb4ab8dab320d60772f5195c5faffe38d3))
|
|
9
|
+
* ensures rte upload is populated when only upload is enabled ([39438b8](https://github.com/payloadcms/payload/commit/39438b8460f853f64d84436eed49dde74cd207d2))
|
|
10
|
+
* import path for createRichTextRelationshipPromise ([586cd4d](https://github.com/payloadcms/payload/commit/586cd4d6af5485116ebb299a5af3d24f5baeaa2e))
|
|
11
|
+
* new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9))
|
|
12
|
+
* rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517))
|
|
13
|
+
* type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* adds admin.upload.collections[collection-name].fields to the RTE to save specific data on upload elements ([3adf44a](https://github.com/payloadcms/payload/commit/3adf44a24162e5adbcebdb0ca7d0d460d23c57eb))
|
|
19
|
+
* adds indentation controls to rich text ([7df50f9](https://github.com/payloadcms/payload/commit/7df50f9bf9d4867e65bdd8cebdf43e0ab1737a63))
|
|
20
|
+
* adds recursion to richText field to populate relationship and upload nested fields ([42af22c](https://github.com/payloadcms/payload/commit/42af22c2a10de44555bfedf902e7b4a4c9b25d6b))
|
|
21
|
+
* builds a way for multipart/form-data reqs to retain non-string values ([65b0ad7](https://github.com/payloadcms/payload/commit/65b0ad7f084a9c279a1e4fb799542f97c645653d))
|
|
22
|
+
* enhances rich text upload with custom field API ([0e4eb90](https://github.com/payloadcms/payload/commit/0e4eb906f2881dca518fea6b41e460bc57da9801))
|
|
23
|
+
* exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f))
|
|
24
|
+
* rich text indent PoC ([2deed8b](https://github.com/payloadcms/payload/commit/2deed8b1464931c4bc76a288923b307cf04b6a4a))
|
|
25
|
+
|
|
26
|
+
## [0.14.13-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.13-beta.0) (2022-01-25)
|
|
2
27
|
|
|
3
28
|
|
|
4
29
|
### Bug Fixes
|
|
@@ -23,7 +48,7 @@
|
|
|
23
48
|
* exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f))
|
|
24
49
|
* rich text indent PoC ([2deed8b](https://github.com/payloadcms/payload/commit/2deed8b1464931c4bc76a288923b307cf04b6a4a))
|
|
25
50
|
|
|
26
|
-
## [0.14.
|
|
51
|
+
## [0.14.12-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.12-beta.0) (2022-01-24)
|
|
27
52
|
|
|
28
53
|
|
|
29
54
|
### Bug Fixes
|
|
@@ -34,6 +59,7 @@
|
|
|
34
59
|
* ensures rte upload is populated when only upload is enabled ([39438b8](https://github.com/payloadcms/payload/commit/39438b8460f853f64d84436eed49dde74cd207d2))
|
|
35
60
|
* import path for createRichTextRelationshipPromise ([586cd4d](https://github.com/payloadcms/payload/commit/586cd4d6af5485116ebb299a5af3d24f5baeaa2e))
|
|
36
61
|
* new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9))
|
|
62
|
+
* rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517))
|
|
37
63
|
* type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97))
|
|
38
64
|
|
|
39
65
|
|
|
@@ -47,6 +73,7 @@
|
|
|
47
73
|
* exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f))
|
|
48
74
|
* rich text indent PoC ([2deed8b](https://github.com/payloadcms/payload/commit/2deed8b1464931c4bc76a288923b307cf04b6a4a))
|
|
49
75
|
|
|
76
|
+
|
|
50
77
|
# [0.14.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.14.0) (2022-01-03)
|
|
51
78
|
|
|
52
79
|
|
|
@@ -134,7 +134,6 @@ function fieldReducer(state, action) {
|
|
|
134
134
|
disableFormData: action.disableFormData,
|
|
135
135
|
ignoreWhileFlattening: action.ignoreWhileFlattening,
|
|
136
136
|
initialValue: action.initialValue,
|
|
137
|
-
stringify: action.stringify,
|
|
138
137
|
validate: action.validate,
|
|
139
138
|
condition: action.condition,
|
|
140
139
|
passesCondition: action.passesCondition,
|
|
@@ -3,12 +3,7 @@ const reduceFieldsToValues = (fields, unflatten) => {
|
|
|
3
3
|
const data = {};
|
|
4
4
|
Object.keys(fields).forEach((key) => {
|
|
5
5
|
if (!fields[key].disableFormData) {
|
|
6
|
-
|
|
7
|
-
data[key] = JSON.stringify(fields[key].value);
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
data[key] = fields[key].value;
|
|
11
|
-
}
|
|
6
|
+
data[key] = fields[key].value;
|
|
12
7
|
}
|
|
13
8
|
});
|
|
14
9
|
if (unflatten) {
|
|
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState, } from 'react';
|
|
|
2
2
|
import { useFormProcessing, useFormSubmitted, useFormModified, useForm } from '../Form/context';
|
|
3
3
|
import useDebounce from '../../../hooks/useDebounce';
|
|
4
4
|
const useField = (options) => {
|
|
5
|
-
const { path, validate, enableDebouncedValue, disableFormData, ignoreWhileFlattening,
|
|
5
|
+
const { path, validate, enableDebouncedValue, disableFormData, ignoreWhileFlattening, condition, } = options;
|
|
6
6
|
const formContext = useForm();
|
|
7
7
|
const submitted = useFormSubmitted();
|
|
8
8
|
const processing = useFormProcessing();
|
|
@@ -22,7 +22,6 @@ const useField = (options) => {
|
|
|
22
22
|
const sendField = useCallback(async (valueToSend) => {
|
|
23
23
|
const fieldToDispatch = {
|
|
24
24
|
path,
|
|
25
|
-
stringify,
|
|
26
25
|
disableFormData,
|
|
27
26
|
ignoreWhileFlattening,
|
|
28
27
|
initialValue,
|
|
@@ -50,7 +49,6 @@ const useField = (options) => {
|
|
|
50
49
|
disableFormData,
|
|
51
50
|
ignoreWhileFlattening,
|
|
52
51
|
initialValue,
|
|
53
|
-
stringify,
|
|
54
52
|
condition,
|
|
55
53
|
]);
|
|
56
54
|
// Method to return from `useField`, used to
|