@forestadmin/datasource-toolkit
Advanced tools
Comparing version 1.9.0 to 1.10.0-alpha-widgets.1
@@ -7,2 +7,6 @@ /// <reference types="node" /> | ||
} | Array<Json>; | ||
export type DropdownOption<TValue> = { | ||
value: TValue; | ||
label: string; | ||
} | TValue; | ||
export type File = { | ||
@@ -14,3 +18,3 @@ mimeType: string; | ||
}; | ||
export interface ActionField { | ||
export type ActionFieldBase = { | ||
type: ActionFieldType; | ||
@@ -23,6 +27,26 @@ label: string; | ||
watchChanges: boolean; | ||
enumValues?: string[]; | ||
collectionName?: string; | ||
} | ||
export type ActionFieldType = 'Boolean' | 'Collection' | 'Date' | 'Dateonly' | 'Enum' | 'File' | 'Json' | 'Number' | 'String' | 'EnumList' | 'FileList' | 'NumberList' | 'StringList'; | ||
}; | ||
export declare const ActionFieldTypeList: readonly ["Boolean", "Collection", "Date", "Dateonly", "Enum", "File", "Json", "Number", "String", "EnumList", "FileList", "NumberList", "StringList"]; | ||
export type ActionFieldType = (typeof ActionFieldTypeList)[number]; | ||
export type ActionFieldDropdown<TType extends ActionFieldType = ActionFieldType, TValue = string> = ActionFieldBase & { | ||
widget: 'Dropdown'; | ||
type: TType; | ||
options?: DropdownOption<TValue>[]; | ||
search?: 'static' | 'disabled'; | ||
placeholder?: string; | ||
}; | ||
export type ActionFieldEnum = ActionFieldBase & { | ||
type: 'Enum'; | ||
enumValues: string[]; | ||
}; | ||
export type ActionFieldEnumList = ActionFieldBase & { | ||
type: 'EnumList'; | ||
enumValues: string[]; | ||
}; | ||
export type ActionFieldCollection = ActionFieldBase & { | ||
type: 'Collection'; | ||
collectionName: string; | ||
}; | ||
export type ActionField = ActionFieldBase | ActionFieldEnum | ActionFieldEnumList | ActionFieldCollection | ActionFieldDropdown<'Date' | 'Dateonly' | 'Number' | 'String', string> | ActionFieldDropdown<'Number', number>; | ||
export type ActionFieldWidget = 'Dropdown'; | ||
export type SuccessResult = { | ||
@@ -29,0 +53,0 @@ type: 'Success'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ludGVyZmFjZXMvYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== | ||
exports.ActionFieldTypeList = void 0; | ||
exports.ActionFieldTypeList = [ | ||
'Boolean', | ||
'Collection', | ||
'Date', | ||
'Dateonly', | ||
'Enum', | ||
'File', | ||
'Json', | ||
'Number', | ||
'String', | ||
'EnumList', | ||
'FileList', | ||
'NumberList', | ||
'StringList', | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ludGVyZmFjZXMvYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQXNCYSxRQUFBLG1CQUFtQixHQUFHO0lBQ2pDLFNBQVM7SUFDVCxZQUFZO0lBQ1osTUFBTTtJQUNOLFVBQVU7SUFDVixNQUFNO0lBQ04sTUFBTTtJQUNOLE1BQU07SUFDTixRQUFRO0lBQ1IsUUFBUTtJQUNSLFVBQVU7SUFDVixVQUFVO0lBQ1YsWUFBWTtJQUNaLFlBQVk7Q0FDSixDQUFDIn0= |
{ | ||
"name": "@forestadmin/datasource-toolkit", | ||
"version": "1.9.0", | ||
"version": "1.10.0-alpha-widgets.1", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "license": "GPL-3.0", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
258109
2733
2