Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/plugin-form-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@
"import": "./src/exports/client.ts",
"types": "./src/exports/client.ts",
"default": "./src/exports/client.ts"
},
"./translations/languages/all": {
"import": "./src/translations/index.ts",
"types": "./src/translations/index.ts",
"default": "./src/translations/index.ts"
},
"./translations/languages/*": {
"import": "./src/translations/languages/*.ts",
"types": "./src/translations/languages/*.ts",
"default": "./src/translations/languages/*.ts"
}
},
"main": "./src/index.ts",
Expand All @@ -62,6 +72,7 @@
"test": "echo \"No tests available.\""
},
"dependencies": {
"@payloadcms/translations": "workspace:*",
"@payloadcms/ui": "workspace:*",
"escape-html": "^1.0.3"
},
Expand Down Expand Up @@ -95,6 +106,16 @@
"import": "./dist/exports/client.js",
"types": "./dist/exports/client.d.ts",
"default": "./dist/exports/client.js"
},
"./translations/languages/all": {
"import": "./dist/translations/index.js",
"types": "./dist/translations/index.d.ts",
"default": "./dist/translations/index.js"
},
"./translations/languages/*": {
"import": "./dist/translations/languages/*.js",
"types": "./dist/translations/languages/*.d.ts",
"default": "./dist/translations/languages/*.js"
}
},
"main": "./dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ export const defaultPaymentFields: Field = {
{
name: 'field',
type: 'text',
label: 'Field',
label: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:field'),
},
{
name: 'status',
type: 'text',
label: 'Status',
label: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:paymentStatus'),
},
{
name: 'amount',
type: 'number',
admin: {
description: 'Amount in cents',
description: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:amountInCents'),
},
},
{
Expand All @@ -32,20 +38,28 @@ export const defaultPaymentFields: Field = {
{
name: 'token',
type: 'text',
label: 'token',
label: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:token'),
},
{
name: 'brand',
type: 'text',
label: 'Brand',
label: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:brand'),
},
{
name: 'number',
type: 'text',
label: 'Number',
label: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:numberLabelSingular'),
},
],
label: 'Credit Card',
label: ({ t }) =>
// @ts-expect-error - translations are not typed in plugins yet
t('plugin-form-builder:creditCard'),
},
],
}
Loading
Loading