@forestadmin/datasource-customizer 1.28.2 → 1.29.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.
|
@@ -32,7 +32,8 @@ type FileListDynamicField<Context> = BaseDynamicField<'FileList', Context, File[
|
|
|
32
32
|
type JsonDynamicField<Context> = BaseDynamicField<'Json', Context, Json>;
|
|
33
33
|
type NumberDynamicField<Context> = BaseDynamicField<'Number', Context, number>;
|
|
34
34
|
type NumberListDynamicField<Context> = BaseDynamicField<'NumberList', Context, number[]>;
|
|
35
|
-
type
|
|
35
|
+
type DateDynamicField<Context> = BaseDynamicField<'Date' | 'Dateonly', Context, Date>;
|
|
36
|
+
type StringDynamicField<Context> = BaseDynamicField<'String' | 'Date' | 'Dateonly', Context, string>;
|
|
36
37
|
type StringListDynamicField<Context> = BaseDynamicField<'StringList', Context, string[]>;
|
|
37
38
|
type LimitedValueDynamicFieldConfiguration<Context, TWidget, TValue = string> = {
|
|
38
39
|
widget: TWidget;
|
|
@@ -49,6 +50,13 @@ type TextInputFieldConfiguration = {
|
|
|
49
50
|
widget: 'TextInput';
|
|
50
51
|
placeholder?: string;
|
|
51
52
|
};
|
|
53
|
+
type DatePickerInputFieldConfiguration<Context> = {
|
|
54
|
+
widget: 'DatePicker';
|
|
55
|
+
format?: ValueOrHandler<Context, string>;
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
min?: ValueOrHandler<Context, Date>;
|
|
58
|
+
max?: ValueOrHandler<Context, Date>;
|
|
59
|
+
};
|
|
52
60
|
type ArrayTextInputFieldConfiguration = {
|
|
53
61
|
widget: 'TextInputList';
|
|
54
62
|
placeholder?: string;
|
|
@@ -98,6 +106,6 @@ type CurrencyInputFieldConfiguration<Context> = {
|
|
|
98
106
|
};
|
|
99
107
|
type RadioButtonFieldConfiguration<Context = unknown, TValue = string> = LimitedValueDynamicFieldConfiguration<Context, 'RadioGroup', TValue>;
|
|
100
108
|
type CheckboxesFieldConfiguration<Context = unknown, TValue = string> = LimitedValueDynamicFieldConfiguration<Context, 'CheckboxGroup', TValue>;
|
|
101
|
-
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>) | (NumberDynamicField<Context> & CurrencyInputFieldConfiguration<Context>) | 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) | (StringDynamicField<Context> & ColorPickerFieldConfiguration) | StringListDynamicField<Context> | (StringListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & CheckboxesFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & ArrayTextInputFieldConfiguration)>;
|
|
109
|
+
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>) | (NumberDynamicField<Context> & CurrencyInputFieldConfiguration<Context>) | NumberListDynamicField<Context> | (NumberListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, number>) | (NumberListDynamicField<Context> & CheckboxesFieldConfiguration<Context, number>) | (NumberListDynamicField<Context> & ArrayNumberInputFieldConfiguration<Context>) | StringDynamicField<Context> | (DateDynamicField<Context> & DatePickerInputFieldConfiguration<Context>) | (StringDynamicField<Context> & TextInputFieldConfiguration) | (StringDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringDynamicField<Context> & RadioButtonFieldConfiguration<Context, string>) | (StringDynamicField<Context> & TextAreaFieldConfiguration) | (StringDynamicField<Context> & RichTextFieldConfiguration) | (StringDynamicField<Context> & ColorPickerFieldConfiguration) | StringListDynamicField<Context> | (StringListDynamicField<Context> & DropdownDynamicFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & CheckboxesFieldConfiguration<Context, string>) | (StringListDynamicField<Context> & ArrayTextInputFieldConfiguration)>;
|
|
102
110
|
export {};
|
|
103
111
|
//# sourceMappingURL=fields.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forestadmin/datasource-customizer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.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.
|
|
31
|
+
"@forestadmin/datasource-toolkit": "1.22.0",
|
|
32
32
|
"file-type": "^16.5.4",
|
|
33
33
|
"luxon": "^3.2.1",
|
|
34
34
|
"object-hash": "^3.0.0",
|