@forestadmin/datasource-customizer 1.24.0 → 1.26.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.
@@ -49,13 +49,22 @@ type TextInputFieldConfiguration = {
49
49
  widget: 'TextInput';
50
50
  placeholder?: string;
51
51
  };
52
- type ArrayInputFieldConfiguration = {
52
+ type ArrayTextInputFieldConfiguration = {
53
53
  widget: 'TextInputList';
54
54
  placeholder?: string;
55
55
  enableReorder?: boolean;
56
56
  allowEmptyValues?: boolean;
57
57
  allowDuplicates?: boolean;
58
58
  };
59
+ type ArrayNumberInputFieldConfiguration<Context> = {
60
+ widget: 'NumberInputList';
61
+ placeholder?: string;
62
+ enableReorder?: boolean;
63
+ allowDuplicates?: boolean;
64
+ min?: ValueOrHandler<Context, number>;
65
+ max?: ValueOrHandler<Context, number>;
66
+ step?: ValueOrHandler<Context, number>;
67
+ };
59
68
  type TextAreaFieldConfiguration = {
60
69
  widget: 'TextArea';
61
70
  placeholder?: string;
@@ -65,8 +74,15 @@ type RichTextFieldConfiguration = {
65
74
  widget: 'RichText';
66
75
  placeholder?: string;
67
76
  };
77
+ type NumberInputFieldConfiguration<Context> = {
78
+ widget: 'NumberInput';
79
+ placeholder?: string;
80
+ min?: ValueOrHandler<Context, number>;
81
+ max?: ValueOrHandler<Context, number>;
82
+ step?: ValueOrHandler<Context, number>;
83
+ };
68
84
  type RadioButtonFieldConfiguration<Context = unknown, TValue = string> = LimitedValueDynamicFieldConfiguration<Context, 'RadioGroup', TValue>;
69
85
  type CheckboxesFieldConfiguration<Context = unknown, TValue = string> = LimitedValueDynamicFieldConfiguration<Context, 'CheckboxGroup', TValue>;
70
- export type DynamicField<Context = unknown> = StrictUnion<BooleanDynamicField<Context> | (BooleanDynamicField<Context> & CheckboxDynamicFieldConfiguration) | CollectionDynamicField<Context> | EnumDynamicField<Context> | EnumListDynamicField<Context> | FileDynamicField<Context> | FileListDynamicField<Context> | JsonDynamicField<Context> | NumberDynamicField<Context> | (NumberDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, number>) | (NumberDynamicField<Context> & RadioButtonFieldConfiguration<Context, number>) | (NumberListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, number>) | (NumberListDynamicField<Context> & CheckboxesFieldConfiguration<Context, number>) | StringDynamicField<Context> | (StringDynamicField<Context> & TextInputFieldConfiguration) | (StringDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringDynamicField<Context> & RadioButtonFieldConfiguration<Context, string>) | (StringDynamicField<Context> & TextAreaFieldConfiguration) | (StringDynamicField<Context> & RichTextFieldConfiguration) | StringListDynamicField<Context> | (StringListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & CheckboxesFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & ArrayInputFieldConfiguration)>;
86
+ export type DynamicField<Context = unknown> = StrictUnion<BooleanDynamicField<Context> | (BooleanDynamicField<Context> & CheckboxDynamicFieldConfiguration) | CollectionDynamicField<Context> | EnumDynamicField<Context> | EnumListDynamicField<Context> | FileDynamicField<Context> | FileListDynamicField<Context> | JsonDynamicField<Context> | NumberDynamicField<Context> | (NumberDynamicField<Context> & NumberInputFieldConfiguration<Context>) | (NumberDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, number>) | (NumberDynamicField<Context> & RadioButtonFieldConfiguration<Context, number>) | NumberListDynamicField<Context> | (NumberListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, number>) | (NumberListDynamicField<Context> & CheckboxesFieldConfiguration<Context, number>) | (NumberListDynamicField<Context> & ArrayNumberInputFieldConfiguration<Context>) | StringDynamicField<Context> | (StringDynamicField<Context> & TextInputFieldConfiguration) | (StringDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringDynamicField<Context> & RadioButtonFieldConfiguration<Context, string>) | (StringDynamicField<Context> & TextAreaFieldConfiguration) | (StringDynamicField<Context> & RichTextFieldConfiguration) | StringListDynamicField<Context> | (StringListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & CheckboxesFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & ArrayTextInputFieldConfiguration)>;
71
87
  export {};
72
88
  //# sourceMappingURL=fields.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forestadmin/datasource-customizer",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "GPL-3.0",
6
6
  "publishConfig": {
@@ -28,7 +28,7 @@
28
28
  "@types/uuid": "^9.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@forestadmin/datasource-toolkit": "1.17.0",
31
+ "@forestadmin/datasource-toolkit": "1.19.0",
32
32
  "file-type": "^16.5.4",
33
33
  "luxon": "^3.2.1",
34
34
  "object-hash": "^3.0.0",