-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathindex.ts
103 lines (100 loc) · 3.53 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import InputTextControl, {
InputControlProps,
} from "components/propertyControls/InputTextControl";
import DropDownControl, {
DropDownControlProps,
} from "components/propertyControls/DropDownControl";
import SwitchControl, {
SwitchControlProps,
} from "components/propertyControls/SwitchControl";
import OptionControl from "components/propertyControls/OptionControl";
import BaseControl, {
ControlProps,
} from "components/propertyControls/BaseControl";
import CodeEditorControl from "components/propertyControls/CodeEditorControl";
import MultiSelectControl, {
MultiSelectControlProps,
} from "components/propertyControls/MultiSelectControl";
import DatePickerControl, {
DatePickerControlProps,
} from "components/propertyControls/DatePickerControl";
import ChartDataControl from "components/propertyControls/ChartDataControl";
import LocationSearchControl from "components/propertyControls/LocationSearchControl";
import StepControl, {
StepControlProps,
} from "components/propertyControls/StepControl";
import TabControl from "components/propertyControls/TabControl";
import ActionSelectorControl from "components/propertyControls/ActionSelectorControl";
import ColumnActionSelectorControl from "components/propertyControls/ColumnActionSelectorControl";
import PrimaryColumnsControl from "components/propertyControls/PrimaryColumnsControl";
import ColorPickerControl, {
ColorPickerControlProps,
} from "components/propertyControls/ColorPickerControl";
import ComputeTablePropertyControl, {
ComputeTablePropertyControlProps,
} from "components/propertyControls/ComputeTablePropertyControl";
import IconTabControl, {
IconTabControlProps,
} from "components/propertyControls/IconTabControl";
import ButtonTabControl, {
ButtonTabControlProps,
} from "components/propertyControls/ButtonTabControl";
import MultiSwitchControl, {
MultiSwitchControlProps,
} from "components/propertyControls/MultiSwitchControl";
import MenuItemsControl from "./MenuItemsControl";
import IconSelectControl from "./IconSelectControl";
import IconAlignControl from "./IconAlignControl";
import BoxShadowOptionsControl from "./BoxShadowOptionsControl";
import BorderRadiusOptionsControl from "./BorderRadiusOptionsControl";
import ButtonBorderRadiusOptionsControl from "./ButtonBorderRadiusControl";
export const PropertyControls = {
InputTextControl,
DropDownControl,
SwitchControl,
OptionControl,
CodeEditorControl,
MultiSelectControl,
DatePickerControl,
ActionSelectorControl,
ColumnActionSelectorControl,
MultiSwitchControl,
ChartDataControl,
LocationSearchControl,
StepControl,
TabControl,
ColorPickerControl,
PrimaryColumnsControl,
IconTabControl,
ButtonTabControl,
ComputeTablePropertyControl,
MenuItemsControl,
IconSelectControl,
IconAlignControl,
BoxShadowOptionsControl,
BorderRadiusOptionsControl,
ButtonBorderRadiusOptionsControl,
};
export type PropertyControlPropsType =
| ControlProps
| InputControlProps
| DropDownControlProps
| SwitchControlProps
| MultiSelectControlProps
| DatePickerControlProps
| MultiSwitchControlProps
| IconTabControlProps
| ButtonTabControlProps
| StepControlProps
| ColorPickerControlProps
| ComputeTablePropertyControlProps;
export const getPropertyControlTypes = (): { [key: string]: string } => {
const _types: { [key: string]: string } = {};
Object.values(PropertyControls).forEach(
(Control: typeof BaseControl & { getControlType: () => string }) => {
const controlType = Control.getControlType();
_types[controlType] = controlType;
},
);
return _types;
};