@forestadmin/datasource-toolkit
Advanced tools
Comparing version 1.9.0-alpha-widgets.1 to 1.9.0-alpha-widgets.2
@@ -7,6 +7,6 @@ /// <reference types="node" /> | ||
} | Array<Json>; | ||
export type DropdownOption = { | ||
value: string; | ||
export type DropdownOption<TValue> = { | ||
value: TValue; | ||
label: string; | ||
}; | ||
} | TValue; | ||
export type File = { | ||
@@ -29,6 +29,6 @@ mimeType: string; | ||
export type ActionFieldType = (typeof ActionFieldTypeList)[number]; | ||
export type ActionFieldDropdown = ActionFieldBase & { | ||
export type ActionFieldDropdown<TType extends ActionFieldType = ActionFieldType, TValue = string> = ActionFieldBase & { | ||
widget: 'Dropdown'; | ||
type: 'Date' | 'Dateonly' | 'Number' | 'String'; | ||
options?: DropdownOption[]; | ||
type: TType; | ||
options?: DropdownOption<TValue>[]; | ||
search?: 'static' | 'disabled'; | ||
@@ -49,3 +49,3 @@ placeholder?: string; | ||
}; | ||
export type ActionField = ActionFieldBase | ActionFieldEnum | ActionFieldEnumList | ActionFieldCollection | ActionFieldDropdown; | ||
export type ActionField = ActionFieldBase | ActionFieldEnum | ActionFieldEnumList | ActionFieldCollection | ActionFieldDropdown<'Date' | 'Dateonly' | 'Number' | 'String', string> | ActionFieldDropdown<'Number', number>; | ||
export type ActionFieldWidget = 'Dropdown'; | ||
@@ -52,0 +52,0 @@ export type SuccessResult = { |
{ | ||
"name": "@forestadmin/datasource-toolkit", | ||
"version": "1.9.0-alpha-widgets.1", | ||
"version": "1.9.0-alpha-widgets.2", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "license": "GPL-3.0", |
256858