@quitecustard/payload 0.1.0 → 0.1.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/README.md +3 -3
- package/dist/fields/colour-picker-field.d.ts +3 -3
- package/dist/fields/colour-picker-field.js +3 -3
- package/dist/fields/height-field.d.ts +2 -3
- package/dist/fields/height-field.js +2 -3
- package/dist/fields/phone-field.d.ts +2 -3
- package/dist/fields/phone-field.js +2 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,9 +46,9 @@ shows on hover — this page is the map, not the reference.
|
|
|
46
46
|
|
|
47
47
|
### `fields/` — field and admin-config factories
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
Every field rendered by a custom component takes that component's import path as a **required**
|
|
50
|
+
parameter — pass your own. Each is a factory, never a shared constant: `buildConfig` sanitises field
|
|
51
|
+
objects in place, so two collections must not receive one.
|
|
52
52
|
|
|
53
53
|
- `link-field` — polymorphic link (internal reference, custom URL, optional static route, dropdown,
|
|
54
54
|
phone, email); each type appears only if its collection or component was supplied
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TextField } from 'payload';
|
|
2
2
|
import { type ComponentFieldOverrides } from '../internal/component-field.js';
|
|
3
3
|
/**
|
|
4
|
-
* A text field rendered by a custom colour-picker admin component. `component` is the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* A text field rendered by a custom colour-picker admin component. `component` is required: the
|
|
5
|
+
* import path of your own component (e.g. `@/components/colour-picker/ColourPicker`), as Payload
|
|
6
|
+
* resolves it for `admin.components.Field`.
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* colourField('@/components/colour-picker/ColourPicker', { name: 'colour', label: 'Colour' })
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { componentField } from '../internal/component-field.js';
|
|
2
2
|
/**
|
|
3
|
-
* A text field rendered by a custom colour-picker admin component. `component` is the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* A text field rendered by a custom colour-picker admin component. `component` is required: the
|
|
4
|
+
* import path of your own component (e.g. `@/components/colour-picker/ColourPicker`), as Payload
|
|
5
|
+
* resolves it for `admin.components.Field`.
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* colourField('@/components/colour-picker/ColourPicker', { name: 'colour', label: 'Colour' })
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { NumberField } from 'payload';
|
|
2
2
|
import { type ComponentFieldOverrides } from '../internal/component-field.js';
|
|
3
3
|
/**
|
|
4
|
-
* A number field rendered by a custom height-input admin component. `component` is the
|
|
5
|
-
* Payload resolves for `admin.components.Field
|
|
6
|
-
* component is a required parameter, not a default.
|
|
4
|
+
* A number field rendered by a custom height-input admin component. `component` is required: the
|
|
5
|
+
* import path of your own component, as Payload resolves it for `admin.components.Field`.
|
|
7
6
|
*
|
|
8
7
|
* ```ts
|
|
9
8
|
* heightField('@/components/height-input/HeightInput')
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { componentField } from '../internal/component-field.js';
|
|
2
2
|
/**
|
|
3
|
-
* A number field rendered by a custom height-input admin component. `component` is the
|
|
4
|
-
* Payload resolves for `admin.components.Field
|
|
5
|
-
* component is a required parameter, not a default.
|
|
3
|
+
* A number field rendered by a custom height-input admin component. `component` is required: the
|
|
4
|
+
* import path of your own component, as Payload resolves it for `admin.components.Field`.
|
|
6
5
|
*
|
|
7
6
|
* ```ts
|
|
8
7
|
* heightField('@/components/height-input/HeightInput')
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { TextField } from 'payload';
|
|
2
2
|
import { type ComponentFieldOverrides } from '../internal/component-field.js';
|
|
3
3
|
/**
|
|
4
|
-
* A text field rendered by a custom phone-input admin component. `component` is the
|
|
5
|
-
*
|
|
6
|
-
* component is a required parameter, not a default.
|
|
4
|
+
* A text field rendered by a custom phone-input admin component. `component` is required: the
|
|
5
|
+
* import path of your own component, as Payload resolves it for `admin.components.Field`.
|
|
7
6
|
*
|
|
8
7
|
* ```ts
|
|
9
8
|
* phoneField('@/components/phone/Phone', { name: 'phone', required: true })
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { componentField } from '../internal/component-field.js';
|
|
2
2
|
/**
|
|
3
|
-
* A text field rendered by a custom phone-input admin component. `component` is the
|
|
4
|
-
*
|
|
5
|
-
* component is a required parameter, not a default.
|
|
3
|
+
* A text field rendered by a custom phone-input admin component. `component` is required: the
|
|
4
|
+
* import path of your own component, as Payload resolves it for `admin.components.Field`.
|
|
6
5
|
*
|
|
7
6
|
* ```ts
|
|
8
7
|
* phoneField('@/components/phone/Phone', { name: 'phone', required: true })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quitecustard/payload",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Payload v3 helpers: relation narrowing, transactions, autosave-vs-unpublish detection, sync locks, unique slugs and usernames",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@quitecustard/core": "^0.1.
|
|
40
|
+
"@quitecustard/core": "^0.1.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@payloadcms/drizzle": "^3.0.0",
|