Skip to content

Commit

Permalink
fix: label not working properly on slug fields
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpopus committed Mar 17, 2024
1 parent ef28c3d commit 64bb888
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 88 deletions.
8 changes: 4 additions & 4 deletions dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema"
},
"dependencies": {
"@payloadcms/bundler-webpack": "^1.0.5",
"@payloadcms/db-mongodb": "^1.0.5",
"@payloadcms/richtext-slate": "^1.1.0",
"@payloadcms/bundler-webpack": "^1.0.6",
"@payloadcms/db-mongodb": "^1.4.3",
"@payloadcms/richtext-slate": "^1.4.0",
"cross-env": "^7.0.3",
"dotenv": "^8.6.0",
"express": "^4.18.2",
"payload": "^2.0.14"
"payload": "^2.11.2"
},
"devDependencies": {
"@swc/jest": "^0.2.29",
Expand Down
9 changes: 8 additions & 1 deletion dev/src/collections/ComboExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ const ComboExamples: CollectionConfig = {
},
],
},
...ComboField({ name: 'fullName', admin: { readOnly: true } }, ['firstName', 'lastName']),
...ComboField(
{
name: 'fullName',
label: { en: 'Full name', de: 'Full name in german' },
admin: { readOnly: true },
},
['firstName', 'lastName'],
),
...ComboField({ name: 'identifier', admin: { readOnly: true } }, ['lastName'], {
initial: 'ID-',
separator: '-',
Expand Down
1 change: 1 addition & 0 deletions dev/src/collections/SlugExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const SlugExamples: CollectionConfig = {
...SlugField(
{
name: 'slug',
label: { en: 'Slug eng', de: 'Slug in german' },
admin: {
position: 'sidebar',
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nouance/payload-better-fields-plugin",
"version": "1.3.5",
"version": "1.3.6",
"homepage:": "https://github.com/NouanceLabs/payload-better-fields-plugin",
"repository": "[email protected]:NouanceLabs/payload-better-fields-plugin.git",
"description": "A Payload plugin that aims to provide improved fields for the admin panel",
Expand Down Expand Up @@ -39,7 +39,7 @@
"eslint-plugin-import": "2.29.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.7.0",
"payload": "^2.0.14",
"payload": "^2.11.2",
"prettier": "^2.8.8",
"react": "^18.2.0",
"typescript": "^5.2.2",
Expand Down
1 change: 0 additions & 1 deletion src/fields/Slug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ export const SlugField: Slug = (
const slugField = deepMerge<TextField, Partial<TextField>>(
{
name: slugName,
label: 'Slug',
type: 'text',
index: true,
required: false,
Expand Down
167 changes: 87 additions & 80 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -916,71 +916,79 @@
dependencies:
"@sinonjs/commons" "^3.0.0"

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.76.tgz#757f10c6482a44b8cea3e85b8ae714ce9b31b4b5"
integrity sha512-ovviEhZ/1E81Z9OGrO0ivLWk4VCa3I3ZzM+cd3gugglRRwVwtlIaoIYqY5S3KiCAupDd1+UCl5X7Vbio7a/V8g==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.76.tgz#edba4a4dbbc7454bc914fc8cf61545a74622d46f"
integrity sha512-tcySTDqs0SHCebtW35sCdcLWsmTEo7bEwx0gNL/spetqVT9fpFi6qU8qcnt7i2KaZHbeNl9g1aadu+Yrni+GzA==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.76.tgz#d998f0e51ebec03e8666f02cee3fc6e40ceaf680"
integrity sha512-apgzpGWy1AwoMF4urAAASsAjE7rEzZFIF+p6utuxhS7cNHzE0AyEVDYJbo+pzBdlZ8orBdzzsHtFwoEgKOjebA==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.76.tgz#4f4d98f699e92ebafb10ed75e468384a81ab128c"
integrity sha512-c3c0zz6S0eludqidDpuqbadE0WT3OZczyQxe9Vw8lFFXES85mvNGtwYzyGK2o7TICpsuHrndwDIoYpmpWk879g==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.76.tgz#4341ca15e4a398de73af149c52c4d45b8cf5c4c8"
integrity sha512-Is3bpq7F2qtlnkzEeOD6HIZJPpOmu3q6c82lKww90Q0NnrlSluVMozTHJgwVoFZyizH7uLnk0LuNcEAWLnmJIw==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.76.tgz#cc2e6f0f90f0e9d6dcb8bc62cd31172e0967b396"
integrity sha512-iwCeRzd9oSvUzqt7nU6p/ztceAWfnO9XVxBn502R5gs6QCBbE1HCKrWHDO77aKPK7ss+0NcIGHvXTd9L8/wRzw==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.76.tgz#ebc327df5e07aa02e41309e56590f505f1fc64c0"
integrity sha512-a671g4tW8kyFeuICsgq4uB9ukQfiIyXJT4V6YSnmqhCTz5mazWuDxZ5wKnx/1g5nXTl+U5cWH2TZaCJatp4GKA==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.76.tgz#34fb884d2ee2eec3382c01f712bde0f05e058a3b"
integrity sha512-+swEFtjdMezS0vKUhJC3psdSDtOJGY5pEOt4e8XOPvn7aQpKQ9LfF49XVtIwDSk5SGuWtVoLFzkSY3reWUJCyg==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.76.tgz#a0dc94357d72eca6572522ed1202b6476222c249"
integrity sha512-5CqwAykpGBJ3PqGLOlWGLGIPpBAG1IwWVDUfro3hhjQ7XJxV5Z1aQf5V5OJ90HJVtrEAVx2xx59UV/Dh081LOg==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.76.tgz#eea647407895a5a410a459b2abf8572adb147927"
integrity sha512-CiMpWLLlR3Cew9067E7XxaLBwYYJ90r9EhGSO6V1pvYSWj7ET/Ppmtj1ZhzPJMqRXAP6xflfl5R5o4ee1m4WLA==

"@swc/[email protected]":
version "1.3.76"
resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.76.tgz#f5259bd718e11854d9bd3a05f91f40bca21dffbc"
integrity sha512-aYYTA2aVYkwJAZepQXtPnkUthhOfn8qd6rsh+lrJxonFrjmpI7RHt2tMDVTXP6XDX7fvnvrVtT1bwZfmBFPh0Q==
"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.107.tgz#abac4c19816751de1dcbaab456710ca55e580782"
integrity sha512-47tD/5vSXWxPd0j/ZllyQUg4bqalbQTsmqSw0J4dDdS82MWqCAwUErUrAZPRjBkjNQ6Kmrf5rpCWaGTtPw+ngw==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.107.tgz#4c0df233ebf293429cd2f10224d6a870a5cc019e"
integrity sha512-hwiLJ2ulNkBGAh1m1eTfeY1417OAYbRGcb/iGsJ+LuVLvKAhU/itzsl535CvcwAlt2LayeCFfcI8gdeOLeZa9A==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.107.tgz#81004cca4c7554007ea5ac51e276147e958e3e9f"
integrity sha512-I2wzcC0KXqh0OwymCmYwNRgZ9nxX7DWnOOStJXV3pS0uB83TXAkmqd7wvMBuIl9qu4Hfomi9aDM7IlEEn9tumQ==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.107.tgz#c01d75df662067fb7805bfdfa66c2f17f2b3185f"
integrity sha512-HWgnn7JORYlOYnGsdunpSF8A+BCZKPLzLtEUA27/M/ZuANcMZabKL9Zurt7XQXq888uJFAt98Gy+59PU90aHKg==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.107.tgz#5e0c4fe3fcc49a7bb77ffafa680622e53c982e0a"
integrity sha512-vfPF74cWfAm8hyhS8yvYI94ucMHIo8xIYU+oFOW9uvDlGQRgnUf/6DEVbLyt/3yfX5723Ln57U8uiMALbX5Pyw==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.107.tgz#afb4a656a1717170b2c8b76c9b2349b5077630b4"
integrity sha512-uBVNhIg0ip8rH9OnOsCARUFZ3Mq3tbPHxtmWk9uAa5u8jQwGWeBx5+nTHpDOVd3YxKb6+5xDEI/edeeLpha/9g==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.107.tgz#3f9bce2fe13691be39fddc39bba8558fe6308823"
integrity sha512-mvACkUvzSIB12q1H5JtabWATbk3AG+pQgXEN95AmEX2ZA5gbP9+B+mijsg7Sd/3tboHr7ZHLz/q3SHTvdFJrEw==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.107.tgz#5b485e9ce2de6f27ce2fbc1ba8c0b4e98009318d"
integrity sha512-J3P14Ngy/1qtapzbguEH41kY109t6DFxfbK4Ntz9dOWNuVY3o9/RTB841ctnJk0ZHEG+BjfCJjsD2n8H5HcaOA==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.107.tgz#1bbe3ce6784b3e4203bf89443c33411c27389b56"
integrity sha512-ZBUtgyjTHlz8TPJh7kfwwwFma+ktr6OccB1oXC8fMSopD0AxVnQasgun3l3099wIsAB9eEsJDQ/3lDkOLs1gBA==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.107.tgz#c89640b16504ddda1f1faf573a7ed7193dc87485"
integrity sha512-Eyzo2XRqWOxqhE1gk9h7LWmUf4Bp4Xn2Ttb0ayAXFp6YSTxQIThXcT9kipXZqcpxcmDwoq8iWbbf2P8XL743EA==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.107.tgz#081697224ec3bffa63c33209d242e4f0b2c49e78"
integrity sha512-zKhqDyFcTsyLIYK1iEmavljZnf4CCor5pF52UzLAz4B6Nu/4GLU+2LQVAf+oRHjusG39PTPjd2AlRT3f3QWfsQ==
dependencies:
"@swc/counter" "^0.1.1"
"@swc/types" "^0.1.5"
optionalDependencies:
"@swc/core-darwin-arm64" "1.3.76"
"@swc/core-darwin-x64" "1.3.76"
"@swc/core-linux-arm-gnueabihf" "1.3.76"
"@swc/core-linux-arm64-gnu" "1.3.76"
"@swc/core-linux-arm64-musl" "1.3.76"
"@swc/core-linux-x64-gnu" "1.3.76"
"@swc/core-linux-x64-musl" "1.3.76"
"@swc/core-win32-arm64-msvc" "1.3.76"
"@swc/core-win32-ia32-msvc" "1.3.76"
"@swc/core-win32-x64-msvc" "1.3.76"
"@swc/core-darwin-arm64" "1.3.107"
"@swc/core-darwin-x64" "1.3.107"
"@swc/core-linux-arm-gnueabihf" "1.3.107"
"@swc/core-linux-arm64-gnu" "1.3.107"
"@swc/core-linux-arm64-musl" "1.3.107"
"@swc/core-linux-x64-gnu" "1.3.107"
"@swc/core-linux-x64-musl" "1.3.107"
"@swc/core-win32-arm64-msvc" "1.3.107"
"@swc/core-win32-ia32-msvc" "1.3.107"
"@swc/core-win32-x64-msvc" "1.3.107"

"@swc/counter@^0.1.1":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9"
integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==

"@swc/jest@^0.2.29":
version "0.2.29"
Expand All @@ -999,6 +1007,11 @@
pirates "^4.0.1"
source-map-support "^0.5.13"

"@swc/types@^0.1.5":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.5.tgz#043b731d4f56a79b4897a3de1af35e75d56bc63a"
integrity sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==

"@tokenizer/token@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276"
Expand Down Expand Up @@ -4681,11 +4694,6 @@ methods@~1.1.2:
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==

[email protected]:
version "4.1.2"
resolved "https://registry.yarnpkg.com/micro-memoize/-/micro-memoize-4.1.2.tgz#ce719c1ba1e41592f1cd91c64c5f41dcbf135f36"
integrity sha512-+HzcV2H+rbSJzApgkj0NdTakkC+bnyeiUxgT6/m7mjcz1CmM22KYFKp+EVj1sWe4UYcnriJr5uqHQD/gMHLD+g==

micromatch@^4.0.4:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
Expand Down Expand Up @@ -4860,10 +4868,10 @@ node-releases@^2.0.14:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==

[email protected].4:
version "6.9.4"
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.4.tgz#93bd4a60eb0be6fa088a0483340551ebabfd2abf"
integrity sha512-CXjQvrQZV4+6X5wP6ZIgdehJamI63MFoYFGGPtHudWym9qaEHDNdPzaj5bfMCvxG1vhAileSWW90q7nL0N36mA==
[email protected].8:
version "6.9.8"
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.8.tgz#29601e80440f2af7aa62b32758fdac7c6b784143"
integrity sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ==

normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
Expand Down Expand Up @@ -5171,10 +5179,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d"
integrity sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==

payload@^2.0.14:
version "2.4.0"
resolved "https://registry.yarnpkg.com/payload/-/payload-2.4.0.tgz#bb443560bccee7ea5e0695eb360b8520e4af62b8"
integrity sha512-o4TYlJvSYopgmX6S9TF0rcKj6A4Mv9Phhxw0fkWMb414Iz41SqqGMhHNTVVYpXuZ66mmZigTA6SoT6C1cTwcMw==
payload@^2.11.2:
version "2.11.2"
resolved "https://registry.yarnpkg.com/payload/-/payload-2.11.2.tgz#d774a4736d6a5ab0fea4d4c555dd825ce534c1e2"
integrity sha512-UaruSsw7nFOzLurBjPWIHiDzGuTIGEK5UrEEfHagJnYe6xUP3/cg44qD+RQNb5D1FkV7x/B+ha8Ci7YVdz9eAA==
dependencies:
"@date-io/date-fns" "2.16.0"
"@dnd-kit/core" "6.0.8"
Expand All @@ -5183,7 +5191,7 @@ payload@^2.0.14:
"@faceless-ui/scroll-info" "1.3.0"
"@faceless-ui/window-info" "2.1.1"
"@monaco-editor/react" "4.5.1"
"@swc/core" "1.3.76"
"@swc/core" "1.3.107"
"@swc/register" "0.1.10"
body-parser "1.20.2"
body-scroll-lock "4.0.0-beta.0"
Expand Down Expand Up @@ -5225,11 +5233,10 @@ payload@^2.0.14:
jwt-decode "3.1.2"
md5 "2.3.0"
method-override "3.0.0"
micro-memoize "4.1.2"
minimist "1.2.8"
mkdirp "1.0.4"
monaco-editor "0.38.0"
nodemailer "6.9.4"
nodemailer "6.9.8"
object-to-formdata "4.5.1"
passport "0.6.0"
passport-anonymous "1.0.1"
Expand Down

0 comments on commit 64bb888

Please sign in to comment.