@forestadmin/forestadmin-client 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,7 +53,8 @@ export type WidgetEditConfiguration = {
53
53
  name: string;
54
54
  parameters: Record<string, unknown>;
55
55
  };
56
- export type ForestServerActionFieldCommon<TType extends ForestServerColumnType = ForestServerColumnType, TWidgetEdit extends WidgetEditConfiguration = null> = {
56
+ type ForestServerActionFieldType = ForestServerColumnType | 'File' | ['File'];
57
+ export type ForestServerActionFieldCommon<TType extends ForestServerActionFieldType = ForestServerActionFieldType, TWidgetEdit extends WidgetEditConfiguration = null> = {
57
58
  type: TType;
58
59
  value: unknown;
59
60
  defaultValue: unknown;
@@ -186,10 +187,19 @@ export type ForestServerActionFieldJsonEditorOptions = {
186
187
  name: 'json code editor';
187
188
  parameters: Record<string, never>;
188
189
  };
190
+ export type ForestServerActionFieldFilePickerOptions = {
191
+ name: 'file picker';
192
+ parameters: {
193
+ prefix: null;
194
+ filesCountLimit: number | null;
195
+ filesExtensions: string[] | null;
196
+ filesSizeLimit: number | null;
197
+ };
198
+ };
189
199
  export type ForestServerActionFieldDropdown = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Time', ForestServerActionFieldDropdownOptions<string>> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldDropdownOptions<string[]>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldDropdownOptions<number>>;
190
200
  export type ForestServerActionFieldRadioGroup = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Time', ForestServerActionFieldRadioButtonOptions<string>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldRadioButtonOptions<number>>;
191
201
  export type ForestServerActionFieldCheckboxGroup = ForestServerActionFieldCommon<['String'], ForestServerActionFieldCheckboxGroupOptions<string>> | ForestServerActionFieldCommon<['Number'], ForestServerActionFieldCheckboxGroupOptions<number>>;
192
- export type ForestServerActionField = ForestServerActionFieldDropdown | ForestServerActionFieldRadioGroup | ForestServerActionFieldCheckboxGroup | ForestServerActionFieldBase | ForestServerActionFieldCommon<'Boolean', ForestServerActionFieldCheckboxOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextInputOptions> | ForestServerActionFieldCommon<'Date', ForestServerActionFieldDatePickerInputOptions> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldTextInputListOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextAreaOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldUserDropdown> | ForestServerActionFieldCommon<'String', ForestServerActionFieldRichTextOptions> | ForestServerActionFieldCommon<'Time', ForestServerActionFieldTimePickerOptions> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldNumberInputOptions> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldCurrencyInputOptions> | ForestServerActionFieldCommon<['Number'], ForestServerActionFieldNumberInputListOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldColorPickerOptions> | ForestServerActionFieldCommon<'Json', ForestServerActionFieldJsonEditorOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldAddressAutocompleteOptions>;
202
+ export type ForestServerActionField = ForestServerActionFieldDropdown | ForestServerActionFieldRadioGroup | ForestServerActionFieldCheckboxGroup | ForestServerActionFieldBase | ForestServerActionFieldCommon<'Boolean', ForestServerActionFieldCheckboxOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextInputOptions> | ForestServerActionFieldCommon<'Date', ForestServerActionFieldDatePickerInputOptions> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldTextInputListOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextAreaOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldUserDropdown> | ForestServerActionFieldCommon<'String', ForestServerActionFieldRichTextOptions> | ForestServerActionFieldCommon<'Time', ForestServerActionFieldTimePickerOptions> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldNumberInputOptions> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldCurrencyInputOptions> | ForestServerActionFieldCommon<['Number'], ForestServerActionFieldNumberInputListOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldColorPickerOptions> | ForestServerActionFieldCommon<'File' | ['File'], ForestServerActionFieldFilePickerOptions> | ForestServerActionFieldCommon<'Json', ForestServerActionFieldJsonEditorOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldAddressAutocompleteOptions>;
193
203
  export type ForestServerField = Partial<{
194
204
  field: string;
195
205
  type: ForestServerColumnType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forestadmin/forestadmin-client",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "GPL-3.0",
6
6
  "publishConfig": {
@@ -31,7 +31,7 @@
31
31
  "test": "jest"
32
32
  },
33
33
  "devDependencies": {
34
- "@forestadmin/datasource-toolkit": "1.27.0",
34
+ "@forestadmin/datasource-toolkit": "1.28.0",
35
35
  "@types/json-api-serializer": "^2.6.3",
36
36
  "@types/jsonwebtoken": "^9.0.1",
37
37
  "@types/superagent": "^4.1.16"