@forestadmin/forestadmin-client
Advanced tools
Comparing version 1.5.10 to 1.6.0-alpha-widgets.1
@@ -48,7 +48,15 @@ import type { PrimitiveTypes } from '@forestadmin/datasource-toolkit'; | ||
}; | ||
export type ForestServerActionField = { | ||
export type ForestServerActionFieldWidgetEditBase<TType = string, TConfig = unknown> = { | ||
name: TType; | ||
parameters: TConfig; | ||
}; | ||
export type WidgetEditConfiguration = { | ||
name: string; | ||
parameters: Record<string, unknown>; | ||
}; | ||
export type ForestServerActionFieldCommon<TType extends ForestServerColumnType = ForestServerColumnType, TWidgetEdit extends WidgetEditConfiguration = null> = { | ||
type: TType; | ||
value: unknown; | ||
defaultValue: unknown; | ||
description: string | null; | ||
enums: string[]; | ||
field: string; | ||
@@ -58,6 +66,23 @@ hook: string; | ||
isRequired: boolean; | ||
enums: null | string[]; | ||
widgetEdit: TWidgetEdit; | ||
}; | ||
export type ForestServerActionFieldBase = ForestServerActionFieldCommon & { | ||
reference: string | null; | ||
type: ForestServerColumnType; | ||
widget: null | 'belongsto select' | 'file picker'; | ||
}; | ||
export type ForestServerActionFieldDropdownOptions<TValue = string> = { | ||
name: 'dropdown'; | ||
parameters: { | ||
placeholder?: string | null; | ||
isSearchable?: boolean; | ||
static: { | ||
options: Array<{ | ||
label: TValue; | ||
value: string; | ||
}>; | ||
}; | ||
}; | ||
}; | ||
export type ForestServerActionFieldDropdown = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Timeonly', ForestServerActionFieldDropdownOptions<string>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldDropdownOptions<number>>; | ||
export type ForestServerActionField = ForestServerActionFieldDropdown | ForestServerActionFieldBase; | ||
export type ForestServerField = Partial<{ | ||
@@ -64,0 +89,0 @@ field: string; |
{ | ||
"name": "@forestadmin/forestadmin-client", | ||
"version": "1.5.10", | ||
"version": "1.6.0-alpha-widgets.1", | ||
"main": "dist/index.js", | ||
@@ -34,3 +34,3 @@ "license": "GPL-3.0", | ||
"devDependencies": { | ||
"@forestadmin/datasource-toolkit": "1.9.0", | ||
"@forestadmin/datasource-toolkit": "1.9.0-alpha-widgets.1", | ||
"@types/json-api-serializer": "^2.6.3", | ||
@@ -37,0 +37,0 @@ "@types/jsonwebtoken": "^9.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206609
2372
2