## Description TL;DR This is a complete architectural change of of List widget works to support all widgets we currently have and should automatically support any future widgets. It also introduces nested List widgets i.e a list widget can have a another list widget which in turn can have another list widget. Fixes #18206 Fixes #6775 Fixes #13211 Fixes #16582 Fixes #11739 Fixes #15094 Fixes #6840 Fixes #10841 Fixes #17386 Fixes #18340 Fixes #16898 Fixes #17555 Fixes #6858 Fixes #9568 Fixes #17480 Fixes #18523 Fixes #18206 Fixes #16586 Fixes #18106 Fixes #16576 Fixes #14697 Fixes #9607 Fixes #19648 Fixes #19739 Fixes #19652 Fixes #18730 Fixes #19503 Fixes #19498 Fixes #19437 Fixes #5245 Fixes #19150 Fixes #18638 Fixes #11332 Fixes #17901 Fixes #19043 Fixes #17777 Fixes #8237 Fixes #15487 Fixes #15988 Fixes #18621 Fixes #16788 Fixes #18110 Fixes #18382 Fixes #17427 Fixes #18105 Fixes #18287 Fixes #19808 Fixes #14655 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Cypress - Jest - Manual ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes --------- Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com>
159 lines
5.8 KiB
TypeScript
159 lines
5.8 KiB
TypeScript
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 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 PrimaryColumnDropdownControl, {
|
|
PrimaryColumnDropdownControlProps,
|
|
} from "components/propertyControls/PrimaryColumnDropdownControl";
|
|
import ColorPickerControl, {
|
|
ColorPickerControlProps,
|
|
} from "components/propertyControls/ColorPickerControl";
|
|
import PrimaryColumnColorPickerControl, {
|
|
PrimaryColumnColorPickerControlProps,
|
|
} from "components/propertyControls/PrimaryColumnColorPickerControl";
|
|
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 OpenConfigPanelControl from "./OpenConfigPanelControl";
|
|
import ButtonListControl from "./ButtonListControl";
|
|
import IconSelectControl from "./IconSelectControl";
|
|
import BoxShadowOptionsControl from "./BoxShadowOptionsControl";
|
|
import BorderRadiusOptionsControl from "./BorderRadiusOptionsControl";
|
|
import ButtonBorderRadiusOptionsControl from "./ButtonBorderRadiusControl";
|
|
import FieldConfigurationControl from "components/propertyControls/FieldConfigurationControl";
|
|
import JSONFormComputeControl from "./JSONFormComputeControl";
|
|
import ButtonControl from "./ButtonControl";
|
|
import LabelAlignmentOptionsControl from "./LabelAlignmentOptionsControl";
|
|
import NumericInputControl, {
|
|
NumericInputControlProps,
|
|
} from "./NumericInputControl";
|
|
import PrimaryColumnsControlV2 from "components/propertyControls/PrimaryColumnsControlV2";
|
|
import SelectDefaultValueControl, {
|
|
SelectDefaultValueControlProps,
|
|
} from "./SelectDefaultValueControl";
|
|
import ComputeTablePropertyControlV2, {
|
|
ComputeTablePropertyControlPropsV2,
|
|
} from "components/propertyControls/TableComputeValue";
|
|
import PrimaryColumnColorPickerControlV2, {
|
|
PrimaryColumnColorPickerControlPropsV2,
|
|
} from "components/propertyControls/PrimaryColumnColorPickerControlV2";
|
|
import TableInlineEditValidationControl, {
|
|
TableInlineEditValidationControlProps,
|
|
} from "./TableInlineEditValidationControl";
|
|
import TableInlineEditValidPropertyControl from "./TableInlineEditValidPropertyControl";
|
|
import MenuButtonDynamicItemsControl, {
|
|
MenuButtonDynamicItemsControlProps,
|
|
} from "components/propertyControls/MenuButtonDynamicItemsControl";
|
|
import ListComputeControl, {
|
|
ListComputeControlProps,
|
|
} from "./ListComputeControl";
|
|
|
|
export const PropertyControls = {
|
|
InputTextControl,
|
|
DropDownControl,
|
|
SwitchControl,
|
|
OptionControl,
|
|
CodeEditorControl,
|
|
DatePickerControl,
|
|
ActionSelectorControl,
|
|
ColumnActionSelectorControl,
|
|
MultiSwitchControl,
|
|
ChartDataControl,
|
|
LocationSearchControl,
|
|
StepControl,
|
|
TabControl,
|
|
ColorPickerControl,
|
|
PrimaryColumnsControl,
|
|
PrimaryColumnsControlV2,
|
|
PrimaryColumnDropdownControl,
|
|
IconTabControl,
|
|
ButtonTabControl,
|
|
ComputeTablePropertyControl,
|
|
ComputeTablePropertyControlV2,
|
|
MenuItemsControl,
|
|
MenuButtonDynamicItemsControl,
|
|
OpenConfigPanelControl,
|
|
ButtonListControl,
|
|
IconSelectControl,
|
|
BoxShadowOptionsControl,
|
|
BorderRadiusOptionsControl,
|
|
ButtonBorderRadiusOptionsControl,
|
|
FieldConfigurationControl,
|
|
JSONFormComputeControl,
|
|
ButtonControl,
|
|
LabelAlignmentOptionsControl,
|
|
NumericInputControl,
|
|
PrimaryColumnColorPickerControl,
|
|
PrimaryColumnColorPickerControlV2,
|
|
SelectDefaultValueControl,
|
|
TableInlineEditValidationControl,
|
|
TableInlineEditValidPropertyControl,
|
|
ListComputeControl,
|
|
};
|
|
|
|
export type PropertyControlPropsType =
|
|
| ControlProps
|
|
| InputControlProps
|
|
| DropDownControlProps
|
|
| SwitchControlProps
|
|
| DatePickerControlProps
|
|
| MultiSwitchControlProps
|
|
| IconTabControlProps
|
|
| ButtonTabControlProps
|
|
| StepControlProps
|
|
| ColorPickerControlProps
|
|
| ComputeTablePropertyControlProps
|
|
| PrimaryColumnDropdownControlProps
|
|
| NumericInputControlProps
|
|
| PrimaryColumnColorPickerControlProps
|
|
| ComputeTablePropertyControlPropsV2
|
|
| MenuButtonDynamicItemsControlProps
|
|
| PrimaryColumnDropdownControlProps
|
|
| PrimaryColumnColorPickerControlPropsV2
|
|
| SelectDefaultValueControlProps
|
|
| TableInlineEditValidationControlProps
|
|
| ListComputeControlProps;
|
|
|
|
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;
|
|
};
|