@forestadmin/forestadmin-client 1.22.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;
@@ -96,6 +97,12 @@ export type ForestServerActionFieldTextInputOptions = {
96
97
  placeholder?: string | null;
97
98
  };
98
99
  };
100
+ export type ForestServerActionFieldAddressAutocompleteOptions = {
101
+ name: 'address editor';
102
+ parameters: {
103
+ placeholder?: string | null;
104
+ };
105
+ };
99
106
  export type ForestServerActionFieldDatePickerInputOptions = {
100
107
  name: 'date editor';
101
108
  parameters: {
@@ -180,10 +187,19 @@ export type ForestServerActionFieldJsonEditorOptions = {
180
187
  name: 'json code editor';
181
188
  parameters: Record<string, never>;
182
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
+ };
183
199
  export type ForestServerActionFieldDropdown = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Time', ForestServerActionFieldDropdownOptions<string>> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldDropdownOptions<string[]>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldDropdownOptions<number>>;
184
200
  export type ForestServerActionFieldRadioGroup = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Time', ForestServerActionFieldRadioButtonOptions<string>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldRadioButtonOptions<number>>;
185
201
  export type ForestServerActionFieldCheckboxGroup = ForestServerActionFieldCommon<['String'], ForestServerActionFieldCheckboxGroupOptions<string>> | ForestServerActionFieldCommon<['Number'], ForestServerActionFieldCheckboxGroupOptions<number>>;
186
- 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>;
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>;
187
203
  export type ForestServerField = Partial<{
188
204
  field: string;
189
205
  type: ForestServerColumnType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forestadmin/forestadmin-client",
3
- "version": "1.22.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.26.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"