payload 0.14.0 → 0.14.5-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.
Files changed (46) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/components/index.js +2 -2
  3. package/dist/admin/components/forms/Form/index.js +10 -2
  4. package/dist/admin/components/forms/field-types/Checkbox/index.js +2 -1
  5. package/dist/admin/components/forms/field-types/Code/Code.js +2 -1
  6. package/dist/admin/components/forms/field-types/DateTime/index.js +2 -1
  7. package/dist/admin/components/forms/field-types/Email/index.js +2 -1
  8. package/dist/admin/components/forms/field-types/Group/index.js +2 -1
  9. package/dist/admin/components/forms/field-types/Number/index.js +2 -1
  10. package/dist/admin/components/forms/field-types/Password/index.js +2 -1
  11. package/dist/admin/components/forms/field-types/Password/types.d.ts +1 -0
  12. package/dist/admin/components/forms/field-types/Point/index.js +2 -1
  13. package/dist/admin/components/forms/field-types/RadioGroup/index.js +2 -1
  14. package/dist/admin/components/forms/field-types/Relationship/index.js +2 -1
  15. package/dist/admin/components/forms/field-types/RichText/RichText.js +2 -1
  16. package/dist/admin/components/forms/field-types/Select/Input.d.ts +1 -0
  17. package/dist/admin/components/forms/field-types/Select/Input.js +2 -1
  18. package/dist/admin/components/forms/field-types/Select/index.js +2 -2
  19. package/dist/admin/components/forms/field-types/Text/Input.d.ts +1 -0
  20. package/dist/admin/components/forms/field-types/Text/Input.js +2 -1
  21. package/dist/admin/components/forms/field-types/Text/index.js +2 -2
  22. package/dist/admin/components/forms/field-types/Textarea/Input.d.ts +1 -0
  23. package/dist/admin/components/forms/field-types/Textarea/Input.js +2 -1
  24. package/dist/admin/components/forms/field-types/Textarea/index.js +2 -2
  25. package/dist/admin/components/forms/field-types/Upload/Input.d.ts +1 -0
  26. package/dist/admin/components/forms/field-types/Upload/Input.js +2 -1
  27. package/dist/admin/components/forms/field-types/Upload/index.js +2 -2
  28. package/dist/admin/components/forms/useField/index.js +1 -0
  29. package/dist/admin/components/forms/useField/types.d.ts +1 -0
  30. package/dist/collections/config/sanitize.js +1 -1
  31. package/dist/express/middleware/convertPayload.d.ts +3 -0
  32. package/dist/express/middleware/convertPayload.js +14 -0
  33. package/dist/express/middleware/index.js +3 -1
  34. package/dist/fields/config/schema.js +2 -1
  35. package/dist/fields/config/types.d.ts +1 -0
  36. package/dist/fields/config/types.js +1 -1
  37. package/dist/fields/traverseFields.js +4 -3
  38. package/dist/fields/validations.js +5 -5
  39. package/dist/mongoose/buildSchema.js +7 -3
  40. package/dist/mongoose/sanitizeFormattedValue.js +7 -7
  41. package/dist/preferences/model.d.ts +1 -2
  42. package/dist/webpack/components.config.d.ts +2 -1
  43. package/docs/fields/overview.mdx +2 -0
  44. package/docs/fields/point.mdx +1 -1
  45. package/package.json +1 -1
  46. package/types.d.ts +1 -0
@@ -1,5 +1,4 @@
1
- /// <reference types="mongoose-paginate-v2" />
2
1
  import mongoose from 'mongoose';
3
2
  import { Preference } from './types';
4
- declare const Model: mongoose.PaginateModel<Preference>;
3
+ declare const Model: mongoose.Model<Preference, {}, {}, {}>;
5
4
  export default Model;
@@ -1,4 +1,5 @@
1
1
  import MiniCSSExtractPlugin from 'mini-css-extract-plugin';
2
+ import TerserJSPlugin from 'terser-webpack-plugin';
2
3
  import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
3
4
  declare const _default: {
4
5
  entry: {
@@ -14,7 +15,7 @@ declare const _default: {
14
15
  libraryTarget: string;
15
16
  };
16
17
  optimization: {
17
- minimizer: (import("terser-webpack-plugin/types").default<import("terser").MinifyOptions> | OptimizeCSSAssetsPlugin)[];
18
+ minimizer: (TerserJSPlugin<import("terser").MinifyOptions> | OptimizeCSSAssetsPlugin)[];
18
19
  };
19
20
  mode: string;
20
21
  stats: string;
@@ -114,6 +114,8 @@ In addition to each field's base configuration, you can define specific traits a
114
114
  | `description` | Helper text to display with the field to provide more information for the editor user. [Click here](#description) for more info. |
115
115
  | `position` | Specify if the field should be rendered in the sidebar by defining `position: 'sidebar'`. |
116
116
  | `width` | Restrict the width of a field. you can pass any string-based value here, be it pixels, percentages, etc. This property is especially useful when fields are nested within a `Row` type where they can be organized horizontally. |
117
+ | `style` | Attach raw CSS style properties to the root DOM element of a field. |
118
+ | `className` | Attach a CSS class name to the root DOM element of a field. |
117
119
  | `readOnly` | Setting a field to `readOnly` has no effect on the API whatsoever but disables the admin component's editability to prevent editors from modifying the field's value. |
118
120
  | `disabled` | If a field is `disabled`, it is completely omitted from the Admin panel. |
119
121
  | `hidden` | Setting a field's `hidden` property on its `admin` config will transform it into a `hidden` input type. Its value will still submit with the Admin panel's requests, but the field itself will not be visible to editors. |
@@ -11,7 +11,7 @@ keywords: point, geolocation, geospatial, geojson, 2dsphere, config, configurati
11
11
  The Point field type saves a pair of coordinates in the database and assigns an index for location related queries.
12
12
  </Banner>
13
13
 
14
- The data structure in the database matches the GeoJSON structure to represent point. The Payload APIs simplifies the object data to only the [x, y] location.
14
+ The data structure in the database matches the GeoJSON structure to represent point. The Payload APIs simplifies the object data to only the [longitude, latitude] location.
15
15
 
16
16
  ### Config
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "0.14.0",
3
+ "version": "0.14.5-beta.0",
4
4
  "description": "Node, React and MongoDB Headless CMS and Application Framework",
5
5
  "license": "SEE LICENSE IN license.md",
6
6
  "author": {
package/types.d.ts CHANGED
@@ -29,6 +29,7 @@ export {
29
29
  export {
30
30
  Field,
31
31
  FieldHook,
32
+ FieldWithPath,
32
33
  FieldAccess,
33
34
  RichTextCustomElement,
34
35
  RichTextCustomLeaf,